openc3-cosmos-tool-bucketexplorer 6.6.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/bucketexplorer/ArrayWidget-j3ncPuPx-da5985883a34c0d972ea.js +2 -0
- data/tools/bucketexplorer/ArrayplotWidget-DuLaiGa9-9281e1674fb8412b20fd.js +1 -0
- data/tools/bucketexplorer/BarColumn-BWJ0Dd4O-c65d83233a4b9ccdb078.js +1 -0
- data/tools/bucketexplorer/BlockWidget-Bf5Dd6Cr-6a43592f7c4d34c82922.js +2 -0
- data/tools/bucketexplorer/BucketExplorer-b3ce4406818923a83715.js +1506 -0
- data/tools/bucketexplorer/ButtonWidget-bl_mGFYh-b9e2750374f4cdc1cab9.js +2 -0
- data/tools/bucketexplorer/CanvasWidget-boDemgx1-23367a9d812da4de1cc5.js +1 -0
- data/tools/bucketexplorer/CanvasdotWidget-BZBbJcER-dc74284ce2d69b9330a7.js +1 -0
- data/tools/bucketexplorer/CanvasimageWidget-6ywvT5jd-91d72e97c7e1c8b70c03.js +1 -0
- data/tools/bucketexplorer/CanvasimagevalueWidget-DjWrA3gX-e117912ff1f7cbb72c36.js +1 -0
- data/tools/bucketexplorer/CanvaslabelWidget-Bq4V2BQh-73922eea6e87d17b4530.js +1 -0
- data/tools/bucketexplorer/CanvaslabelvalueWidget-C8oNcFLi-e15a34adfbae05efaf7f.js +1 -0
- data/tools/bucketexplorer/CanvaslineWidget-nvbL2GoL-3b11e59f1652c97ce7e8.js +1 -0
- data/tools/bucketexplorer/CanvaslinevalueWidget-ZACQedKx-6c04ae957afa8e40f07a.js +1 -0
- data/tools/bucketexplorer/CheckbuttonWidget-B82UE8AB-bb172fab2561aa844e4b.js +1 -0
- data/tools/bucketexplorer/ComboboxWidget-4OFiSkI6-fdb8a17551208781b92e.js +1 -0
- data/tools/bucketexplorer/DateWidget-BmwtdirF-d9f441f3a9601081d425.js +1 -0
- data/tools/bucketexplorer/DetailsDialog-CLKEfU0s-a53dc30123147ae4fe11.js +1 -0
- data/tools/bucketexplorer/DynamicWidget-CfMtj7H8-61c87513a545424da716.js +1 -0
- data/tools/bucketexplorer/FormatvalueWidget-C8exC3bj-ff440d82b88447956f5e.js +1 -0
- data/tools/bucketexplorer/Graph-CWcrowaT-244c2bc376c8e0e3f7ca.js +1 -0
- data/tools/bucketexplorer/GraphWidget-CvzxZYVx-6d757df4577991c4c99b.js +1 -0
- data/tools/bucketexplorer/HorizontalWidget-Ck151zVw-8945a581dbb8ab20a795.js +1 -0
- data/tools/bucketexplorer/HorizontalboxWidget-D3P-cl9V-bfd3b0f3794fd3f5872b.js +1 -0
- data/tools/bucketexplorer/HorizontallineWidget-BE1TjPU8-55eec81e6defca3792ed.js +1 -0
- data/tools/bucketexplorer/IframeWidget-BgJCgues-44e46793e1766771bec5.js +1 -0
- data/tools/bucketexplorer/ImageLoader-CWn-PLOk-57ae212f49ef6cb54edd.js +1 -0
- data/tools/bucketexplorer/ImageviewerWidget-BlhFZD2f-f7f0f36dd3eaf495d1f4.js +1 -0
- data/tools/bucketexplorer/LabelWidget-Cwosk4x2-701fa0e87df7d5027069.js +1 -0
- data/tools/bucketexplorer/LabelledWidget-Dl6rAFTQ-66132cb2f81c6abfc282.js +1 -0
- data/tools/bucketexplorer/LabelprogressbarWidget-MuAKesOz-b6da3062cb38dead58b5.js +1 -0
- data/tools/bucketexplorer/LabelsparklineWidget-6LA6Ox3d-5b060ec1b0d7d91b6fe3.js +1 -0
- data/tools/bucketexplorer/LabelvalueWidget-BxAXx-Tf-96bf8575052dd81cb32d.js +1 -0
- data/tools/bucketexplorer/LabelvaluedescWidget-Dwwlnd1g-251d34b241e8c9bdf629.js +1 -0
- data/tools/bucketexplorer/LabelvaluelimitsbarWidget-Dv8Qk8kK-6996b80d8ad2cd915574.js +1 -0
- data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-D-_gl6fq-213fb47dc57155d4d97f.js +1 -0
- data/tools/bucketexplorer/LabelvaluerangebarWidget-B3MKT-3Y-3bda2f57a1634da36add.js +1 -0
- data/tools/bucketexplorer/Layout-Bkb6VP3e-3534dee217b3dd1654f3.js +1 -0
- data/tools/bucketexplorer/LedWidget-DOuDD8LI-fb5000760a2482bca972.js +1 -0
- data/tools/bucketexplorer/LimitsbarWidget-D1U6SvVL-50bdb2765fd146a1f145.js +1 -0
- data/tools/bucketexplorer/LimitscolorWidget-iSMGusqt-3d744d496f962997f15f.js +1 -0
- data/tools/bucketexplorer/LimitscolumnWidget-DjxZTt_r-4df27ed5fd612ba6e8ca.js +1 -0
- data/tools/bucketexplorer/LinegraphWidget-BHKU6zlT-30dab2b7f4512e017bc5.js +1 -0
- data/tools/bucketexplorer/MatrixbycolumnsWidget-BKO-A2QD-751a7cf61b7bfbd80f04.js +1 -0
- data/tools/bucketexplorer/ProgressbarWidget-fbr2qu_N-2ba2e3df5600064627f3.js +1 -0
- data/tools/bucketexplorer/RadiobuttonWidget-DL08zcQT-dcb10451dfd8b33afca1.js +1 -0
- data/tools/bucketexplorer/RadiogroupWidget-DW9Xpj3c-ff779f948f547f5121b5.js +1 -0
- data/tools/bucketexplorer/RangebarWidget-o9q55kjc-f31bf18c07714e4de09f.js +1 -0
- data/tools/bucketexplorer/RollupWidget-BHnjj-DF-361afcfe8999a46671c5.js +1 -0
- data/tools/bucketexplorer/ScrollwindowWidget-D-QVwztC-b548230e817571eeda23.js +1 -0
- data/tools/bucketexplorer/SignalWidget-CsWuufdx-7e3e4d2ef801a375e33d.js +1 -0
- data/tools/bucketexplorer/SpacerWidget-Di9-qunj-7af4824b3f2581f3ec50.js +1 -0
- data/tools/bucketexplorer/SparklineWidget-B6-zhdPW-4574b3edc9c842cacc67.js +1 -0
- data/tools/bucketexplorer/TabbookWidget-B1E1_mzA-4432d3a1c56f1fb31f14.js +1 -0
- data/tools/bucketexplorer/TextboxWidget-CBVEXPw_-eafdeaac29bac9de454e.js +1 -0
- data/tools/bucketexplorer/TextfieldWidget-DZMHrtQa-34afc66f6de03da98660.js +1 -0
- data/tools/bucketexplorer/TimeWidget-K4MNmJ7J-e5d126c2dfc721447a5f.js +1 -0
- data/tools/bucketexplorer/TitleWidget-8IcwweFE-917a3736a4cb7bcb0da6.js +1 -0
- data/tools/bucketexplorer/VWidget-CoIgX3hM-58c56be911a91ce085b3.js +1 -0
- data/tools/bucketexplorer/ValueWidget-BvT1ASar-6e16aaa5c695b3c2c654.js +1 -0
- data/tools/bucketexplorer/ValuelimitsbarWidget-C5lBnUmB-7d4e5dc70d58bccbba82.js +1 -0
- data/tools/bucketexplorer/ValuelimitscolumnWidget-DHYI0WBL-b0323ba6b831e9fa59c2.js +1 -0
- data/tools/bucketexplorer/ValuerangebarWidget-BSszZhlE-b47792ca68105d09e2a1.js +1 -0
- data/tools/bucketexplorer/VerticalWidget-1GhgYrC3-371ad0e2e9ad43b19d10.js +1 -0
- data/tools/bucketexplorer/VerticalboxWidget-DYHJqEzd-e43509011849bcf5a06c.js +1 -0
- data/tools/bucketexplorer/Widget-B8t93Oid-de73447fbee441060e5b.js +1 -0
- data/tools/bucketexplorer/main-1300788aafccaab39fcc.js +8 -0
- data/tools/bucketexplorer/main.js +1 -1
- metadata +69 -69
- data/tools/bucketexplorer/ArrayWidget-Ck6pzAyW-248c868dafa81b4771a3.js +0 -2
- data/tools/bucketexplorer/ArrayplotWidget-ntRLh6-B-ce89330ee04833dc8b9c.js +0 -1
- data/tools/bucketexplorer/BarColumn-Bgz2YJ59-158d2ff2aba1195f6e35.js +0 -1
- data/tools/bucketexplorer/BlockWidget-DGH3Zz5p-f928de15696285952cc6.js +0 -2
- data/tools/bucketexplorer/BucketExplorer-4e6950ca8f998237d2da.js +0 -1505
- data/tools/bucketexplorer/ButtonWidget-D_tupiPB-491c342ab9d236879940.js +0 -2
- data/tools/bucketexplorer/CanvasWidget-CzG2jYQb-75d42817d89e4a627bc2.js +0 -1
- data/tools/bucketexplorer/CanvasdotWidget-0FAaw4G2-9d5d94c492cf26e6cfcd.js +0 -1
- data/tools/bucketexplorer/CanvasimageWidget-CNJlzLqo-6363392e532f208b6040.js +0 -1
- data/tools/bucketexplorer/CanvasimagevalueWidget-DudwwOD6-60c8e96fd2423e57b4f7.js +0 -1
- data/tools/bucketexplorer/CanvaslabelWidget-BZQp16dH-73c941b54c1fa9050433.js +0 -1
- data/tools/bucketexplorer/CanvaslabelvalueWidget-CHS36Te9-6b4e4f79db23fc5209ad.js +0 -1
- data/tools/bucketexplorer/CanvaslineWidget-nhKEAGhs-8a69d1b2234d8cf221ac.js +0 -1
- data/tools/bucketexplorer/CanvaslinevalueWidget-DsyIDkJy-599d9c7fbef7b8e6cc7e.js +0 -1
- data/tools/bucketexplorer/CheckbuttonWidget-DCam7Jd0-d2b768c497f938efa928.js +0 -1
- data/tools/bucketexplorer/ComboboxWidget-ZX-k-_aK-d7e4f2c1a1a4f14cb067.js +0 -1
- data/tools/bucketexplorer/DateWidget-DuJ5uC2t-689ae8489194fd5a23eb.js +0 -1
- data/tools/bucketexplorer/DetailsDialog-BQE0TraI-6c3e51b00d8cd8220f20.js +0 -1
- data/tools/bucketexplorer/DynamicWidget-CfMtj7H8-8427a75b34ada8b43cd7.js +0 -1
- data/tools/bucketexplorer/FormatvalueWidget-DYICPNcx-9e9050d5d6bfe40ae2ac.js +0 -1
- data/tools/bucketexplorer/Graph-DCihpnT0-d8ec98a052f33e209631.js +0 -1
- data/tools/bucketexplorer/GraphWidget-cTVq29cY-e7df9a189a1a87602faf.js +0 -1
- data/tools/bucketexplorer/HorizontalWidget-v1pfd94Z-e2fcd38de2aee0d7e705.js +0 -1
- data/tools/bucketexplorer/HorizontalboxWidget-B06-c_n4-1ccee4d45000db461f97.js +0 -1
- data/tools/bucketexplorer/HorizontallineWidget-DEODVJCk-f359db5fac63cdba8670.js +0 -1
- data/tools/bucketexplorer/IframeWidget-n8lNXrpt-25beb324d7c94fcb2587.js +0 -1
- data/tools/bucketexplorer/ImageLoader-CfcErydq-b34075b82a3ca52e6cb4.js +0 -1
- data/tools/bucketexplorer/ImageviewerWidget-DE8fj06Z-c597f57f8771f2a316f3.js +0 -1
- data/tools/bucketexplorer/LabelWidget-iUIJLhdA-31a53ff04c781779b7dd.js +0 -1
- data/tools/bucketexplorer/LabelledWidget-KI6fMlsr-89015a7708d97367a699.js +0 -1
- data/tools/bucketexplorer/LabelprogressbarWidget-C2lzmqBH-dd6b995f8ae6c670062a.js +0 -1
- data/tools/bucketexplorer/LabelsparklineWidget-Ci6GGm29-cddcaaaf6038f1f6a069.js +0 -1
- data/tools/bucketexplorer/LabelvalueWidget-oiW-JDw6-71c580546745185a134a.js +0 -1
- data/tools/bucketexplorer/LabelvaluedescWidget-Ck0AJ9g0-b23e94daacc2094d2c6b.js +0 -1
- data/tools/bucketexplorer/LabelvaluelimitsbarWidget-aaVLaejn-5618332877b352aae488.js +0 -1
- data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-Uur6aqOg-bf5fd048ead1265047e7.js +0 -1
- data/tools/bucketexplorer/LabelvaluerangebarWidget-Bs9locqu-7e8a41e0a5cb676e9725.js +0 -1
- data/tools/bucketexplorer/Layout-1z8iJV5--e2149a421f5f94cf2ab1.js +0 -1
- data/tools/bucketexplorer/LedWidget-BN8IgAxJ-72070d388f1f98d34aed.js +0 -1
- data/tools/bucketexplorer/LimitsbarWidget-BxxoKTjp-d5e39f0a3e3c8f007c8a.js +0 -1
- data/tools/bucketexplorer/LimitscolorWidget-DFDwf4In-b428434ede1d27ec4e85.js +0 -1
- data/tools/bucketexplorer/LimitscolumnWidget-CdBh2mJu-3f9df3a2736bdf91a181.js +0 -1
- data/tools/bucketexplorer/LinegraphWidget-jXksfbPb-2532e808b50c6d20b2b5.js +0 -1
- data/tools/bucketexplorer/MatrixbycolumnsWidget-DCwxPjwS-997e5f2c7bfa58d5735d.js +0 -1
- data/tools/bucketexplorer/ProgressbarWidget-Cdu5nJC3-23275a043cd333b54152.js +0 -1
- data/tools/bucketexplorer/RadiobuttonWidget-CZZGbvdG-3f88dffdb407e7058527.js +0 -1
- data/tools/bucketexplorer/RadiogroupWidget-CQN3v8Ip-9ff3dd0e0e9318097e0d.js +0 -1
- data/tools/bucketexplorer/RangebarWidget-dZN9WjoZ-b5480e12a25f605b5c4b.js +0 -1
- data/tools/bucketexplorer/RollupWidget-i9DnNJl6-709fe0ecaaa86f58ead2.js +0 -1
- data/tools/bucketexplorer/ScrollwindowWidget-54GU96Ve-f88cb05ec99e8258eb71.js +0 -1
- data/tools/bucketexplorer/SignalWidget-B_kA9eCJ-5216f78da1ea6a7e129a.js +0 -1
- data/tools/bucketexplorer/SpacerWidget-XoMPHak8-945a5e140370e15d839f.js +0 -1
- data/tools/bucketexplorer/SparklineWidget-DQNsvEj9-5fd4b63fc301802d3711.js +0 -1
- data/tools/bucketexplorer/TabbookWidget-_HVA72t5-d44283b14e4553c272d3.js +0 -1
- data/tools/bucketexplorer/TextboxWidget-0JXn4bMH-fb960f5997bec13f12ef.js +0 -1
- data/tools/bucketexplorer/TextfieldWidget-BXr9MkVW-b49ae39fbad61d8f5216.js +0 -1
- data/tools/bucketexplorer/TimeWidget-C67uwMGH-48d02c03a45270d9f994.js +0 -1
- data/tools/bucketexplorer/TitleWidget-t_YLgUMB-0be28905410f921687d1.js +0 -1
- data/tools/bucketexplorer/VWidget-j2GIGGSX-4dee999bd181ee784af4.js +0 -1
- data/tools/bucketexplorer/ValueWidget-3jNtnh5i-810c3eee894ee83c85d3.js +0 -1
- data/tools/bucketexplorer/ValuelimitsbarWidget-JSceOzGS-06b9243d5d7eff116ffb.js +0 -1
- data/tools/bucketexplorer/ValuelimitscolumnWidget-HR1TNHwQ-acb0a1165f6004748cff.js +0 -1
- data/tools/bucketexplorer/ValuerangebarWidget-DnZrho8S-a488c07d5bb3870d3e6a.js +0 -1
- data/tools/bucketexplorer/VerticalWidget-DJvoxqLE-72131832452e09d61990.js +0 -1
- data/tools/bucketexplorer/VerticalboxWidget-CYYyLBoO-2b31707b9f1cb7d47bd0.js +0 -1
- data/tools/bucketexplorer/Widget-Bn_S-zBo-f98bfe1e65b14d185a6d.js +0 -1
- data/tools/bucketexplorer/main-758334bf1197ec2fdd55.js +0 -8
@@ -0,0 +1,1506 @@
|
|
1
|
+
System.register(["./main-1300788aafccaab39fcc.js","vue","single-spa"],(function(Fi,at){"use strict";var ot,Qu,$f,Zu,Mf,It,qn,zt,et,tt,cr,Ir,Vn,Af,Vr,ko,Ko,Ju,eh,oo,th,ys,Tf;return{setters:[an=>{ot=an._,Qu=an.d,$f=an.a,Zu=an.r},an=>{Mf=an.defineAsyncComponent,It=an.resolveComponent,qn=an.createBlock,zt=an.openBlock,et=an.withCtx,tt=an.createVNode,cr=an.createElementVNode,Ir=an.toDisplayString,Vn=an.createTextVNode,Af=an.Teleport,Vr=an.createElementBlock,ko=an.Fragment,Ko=an.renderList,Ju=an.mergeProps,eh=an.createSlots,oo=an.createCommentVNode,th=an.normalizeStyle,ys=an.withModifiers,Tf=an.withKeys},null],execute:(function(){var an=document.createElement("style");an.textContent=`.font-size[data-v-c0c99680]{font-size:1rem}.small-font-size[data-v-c0c99680]{font-size:.8rem}.file-input[data-v-c0c99680]{padding-top:0;margin-top:0}
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(an),Fi({$:bg,c:cR,f:kr,l:yn,y:Kn,z:op});var Kx=Object.defineProperty,Gx=(t,e,n)=>e in t?Kx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ef=(t,e,n)=>Gx(t,e+"",n);function Rf(t,e){return function(){return t.apply(e,arguments)}}const{toString:Yx}=Object.prototype,{getPrototypeOf:nh}=Object,{iterator:Yl,toStringTag:Lf}=Symbol,Xl=(t=>e=>{const n=Yx.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=t=>(t=t.toLowerCase(),e=>Xl(e)===t),Ql=t=>e=>typeof e===t,{isArray:sa}=Array,qa=Ql("undefined");function Va(t){return t!==null&&!qa(t)&&t.constructor!==null&&!qa(t.constructor)&&Kr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Of=Bi("ArrayBuffer");function Xx(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Of(t.buffer),e}const Qx=Ql("string"),Kr=Ql("function"),If=Ql("number"),Ka=t=>t!==null&&typeof t=="object",Zx=t=>t===!0||t===!1,Zl=t=>{if(Xl(t)!=="object")return!1;const e=nh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Lf in t)&&!(Yl in t)},Jx=t=>{if(!Ka(t)||Va(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},e1=Bi("Date"),t1=Bi("File"),n1=Bi("Blob"),r1=Bi("FileList"),i1=t=>Ka(t)&&Kr(t.pipe),o1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Kr(t.append)&&((e=Xl(t))==="formdata"||e==="object"&&Kr(t.toString)&&t.toString()==="[object FormData]"))},s1=Bi("URLSearchParams"),[a1,l1,c1,u1]=["ReadableStream","Request","Response","Headers"].map(Bi),h1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ga(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,h;if(typeof t!="object"&&(t=[t]),sa(t))for(r=0,h=t.length;r<h;r++)e.call(null,t[r],r,t);else{if(Va(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let w;for(r=0;r<f;r++)w=d[r],e.call(null,t[w],w,t)}}function Nf(t,e){if(Va(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,h;for(;r-- >0;)if(h=n[r],e===h.toLowerCase())return h;return null}const vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Df=t=>!qa(t)&&t!==vs;function rh(){const{caseless:t}=Df(this)&&this||{},e={},n=(r,h)=>{const d=t&&Nf(e,h)||h;Zl(e[d])&&Zl(r)?e[d]=rh(e[d],r):Zl(r)?e[d]=rh({},r):sa(r)?e[d]=r.slice():e[d]=r};for(let r=0,h=arguments.length;r<h;r++)arguments[r]&&Ga(arguments[r],n);return e}const d1=(t,e,n,{allOwnKeys:r}={})=>(Ga(e,(h,d)=>{n&&Kr(h)?t[d]=Rf(h,n):t[d]=h},{allOwnKeys:r}),t),p1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),f1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},g1=(t,e,n,r)=>{let h,d,f;const w={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),d=h.length;d-- >0;)f=h[d],(!r||r(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&nh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},m1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},y1=t=>{if(!t)return null;if(sa(t))return t;let e=t.length;if(!If(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},v1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&nh(Uint8Array)),w1=(t,e)=>{const n=(t&&t[Yl]).call(t);let r;for(;(r=n.next())&&!r.done;){const h=r.value;e.call(t,h[0],h[1])}},b1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},x1=Bi("HTMLFormElement"),S1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Pf=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),k1=Bi("RegExp"),Ff=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ga(n,(h,d)=>{let f;(f=e(h,d,t))!==!1&&(r[d]=f||h)}),Object.defineProperties(t,r)},_1=t=>{Ff(t,(e,n)=>{if(Kr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Kr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},C1=(t,e)=>{const n={},r=h=>{h.forEach(d=>{n[d]=!0})};return sa(t)?r(t):r(String(t).split(e)),n},$1=()=>{},M1=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function A1(t){return!!(t&&Kr(t.append)&&t[Lf]==="FormData"&&t[Yl])}const T1=t=>{const e=new Array(10),n=(r,h)=>{if(Ka(r)){if(e.indexOf(r)>=0)return;if(Va(r))return r;if(!("toJSON"in r)){e[h]=r;const d=sa(r)?[]:{};return Ga(r,(f,w)=>{const p=n(f,h+1);!qa(p)&&(d[w]=p)}),e[h]=void 0,d}}return r};return n(t,0)},E1=Bi("AsyncFunction"),R1=t=>t&&(Ka(t)||Kr(t))&&Kr(t.then)&&Kr(t.catch),Bf=((t,e)=>t?setImmediate:e?((n,r)=>(vs.addEventListener("message",({source:h,data:d})=>{h===vs&&d===n&&r.length&&r.shift()()},!1),h=>{r.push(h),vs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kr(vs.postMessage)),L1=typeof queueMicrotask<"u"?queueMicrotask.bind(vs):typeof process<"u"&&process.nextTick||Bf,O1=t=>t!=null&&Kr(t[Yl]),ke={isArray:sa,isArrayBuffer:Of,isBuffer:Va,isFormData:o1,isArrayBufferView:Xx,isString:Qx,isNumber:If,isBoolean:Zx,isObject:Ka,isPlainObject:Zl,isEmptyObject:Jx,isReadableStream:a1,isRequest:l1,isResponse:c1,isHeaders:u1,isUndefined:qa,isDate:e1,isFile:t1,isBlob:n1,isRegExp:k1,isFunction:Kr,isStream:i1,isURLSearchParams:s1,isTypedArray:v1,isFileList:r1,forEach:Ga,merge:rh,extend:d1,trim:h1,stripBOM:p1,inherits:f1,toFlatObject:g1,kindOf:Xl,kindOfTest:Bi,endsWith:m1,toArray:y1,forEachEntry:w1,matchAll:b1,isHTMLForm:x1,hasOwnProperty:Pf,hasOwnProp:Pf,reduceDescriptors:Ff,freezeMethods:_1,toObjectSet:C1,toCamelCase:S1,noop:$1,toFiniteNumber:M1,findKey:Nf,global:vs,isContextDefined:Df,isSpecCompliantForm:A1,toJSONObject:T1,isAsyncFn:E1,isThenable:R1,setImmediate:Bf,asap:L1,isIterable:O1};function St(t,e,n,r,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),h&&(this.response=h,this.status=h.status?h.status:null)}ke.inherits(St,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ke.toJSONObject(this.config),code:this.code,status:this.status}}});const jf=St.prototype,Wf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Wf[t]={value:t}}),Object.defineProperties(St,Wf),Object.defineProperty(jf,"isAxiosError",{value:!0}),St.from=(t,e,n,r,h,d)=>{const f=Object.create(jf);return ke.toFlatObject(t,f,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),St.call(f,t.message,e,n,r,h),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const I1=null;function ih(t){return ke.isPlainObject(t)||ke.isArray(t)}function zf(t){return ke.endsWith(t,"[]")?t.slice(0,-2):t}function Hf(t,e,n){return t?t.concat(e).map(function(r,h){return r=zf(r),!n&&h?"["+r+"]":r}).join(n?".":""):e}function N1(t){return ke.isArray(t)&&!t.some(ih)}const D1=ke.toFlatObject(ke,{},null,function(t){return/^is[A-Z]/.test(t)});function Jl(t,e,n){if(!ke.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=ke.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!ke.isUndefined(o[c])});const r=n.metaTokens,h=n.visitor||g,d=n.dots,f=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&ke.isSpecCompliantForm(e);if(!ke.isFunction(h))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(ke.isDate(c))return c.toISOString();if(ke.isBoolean(c))return c.toString();if(!w&&ke.isBlob(c))throw new St("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(c)||ke.isTypedArray(c)?w&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if(ke.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(ke.isArray(c)&&N1(c)||(ke.isFileList(c)||ke.endsWith(o,"[]"))&&(m=ke.toArray(c)))return o=zf(o),m.forEach(function(b,S){!(ke.isUndefined(b)||b===null)&&e.append(f===!0?Hf([o],S,d):f===null?o:o+"[]",p(b))}),!1}return ih(c)?!0:(e.append(Hf(l,o,d),p(c)),!1)}const i=[],a=Object.assign(D1,{defaultVisitor:g,convertValue:p,isVisitable:ih});function u(c,o){if(!ke.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),ke.forEach(c,function(l,m){(!(ke.isUndefined(l)||l===null)&&h.call(e,l,ke.isString(m)?m.trim():m,o,a))===!0&&u(l,o?o.concat(m):[m])}),i.pop()}}if(!ke.isObject(t))throw new TypeError("data must be an object");return u(t),e}function Uf(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function oh(t,e){this._pairs=[],t&&Jl(t,this,e)}const qf=oh.prototype;qf.append=function(t,e){this._pairs.push([t,e])},qf.toString=function(t){const e=t?function(n){return t.call(this,n,Uf)}:Uf;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function P1(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vf(t,e,n){if(!e)return t;const r=n&&n.encode||P1;ke.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let d;if(h?d=h(e,n):d=ke.isURLSearchParams(e)?e.toString():new oh(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let Kf=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ke.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Gf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},F1=typeof URLSearchParams<"u"?URLSearchParams:oh,B1=typeof FormData<"u"?FormData:null,j1=typeof Blob<"u"?Blob:null,W1={isBrowser:!0,classes:{URLSearchParams:F1,FormData:B1,Blob:j1},protocols:["http","https","file","blob","url","data"]},sh=typeof window<"u"&&typeof document<"u",ah=typeof navigator=="object"&&navigator||void 0,z1=sh&&(!ah||["ReactNative","NativeScript","NS"].indexOf(ah.product)<0),H1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",U1=sh&&window.location.href||"http://localhost",q1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sh,hasStandardBrowserEnv:z1,hasStandardBrowserWebWorkerEnv:H1,navigator:ah,origin:U1},Symbol.toStringTag,{value:"Module"})),xr={...q1,...W1};function V1(t,e){return Jl(t,new xr.classes.URLSearchParams,{visitor:function(n,r,h,d){return xr.isNode&&ke.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function K1(t){return ke.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function G1(t){const e={},n=Object.keys(t);let r;const h=n.length;let d;for(r=0;r<h;r++)d=n[r],e[d]=t[d];return e}function Yf(t){function e(n,r,h,d){let f=n[d++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=d>=n.length;return f=!f&&ke.isArray(h)?h.length:f,p?(ke.hasOwnProp(h,f)?h[f]=[h[f],r]:h[f]=r,!w):((!h[f]||!ke.isObject(h[f]))&&(h[f]=[]),e(n,r,h[f],d)&&ke.isArray(h[f])&&(h[f]=G1(h[f])),!w)}if(ke.isFormData(t)&&ke.isFunction(t.entries)){const n={};return ke.forEachEntry(t,(r,h)=>{e(K1(r),h,n,0)}),n}return null}function Y1(t,e,n){if(ke.isString(t))try{return(e||JSON.parse)(t),ke.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Ya={transitional:Gf,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,h=ke.isObject(t);if(h&&ke.isHTMLForm(t)&&(t=new FormData(t)),ke.isFormData(t))return r?JSON.stringify(Yf(t)):t;if(ke.isArrayBuffer(t)||ke.isBuffer(t)||ke.isStream(t)||ke.isFile(t)||ke.isBlob(t)||ke.isReadableStream(t))return t;if(ke.isArrayBufferView(t))return t.buffer;if(ke.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(h){if(n.indexOf("application/x-www-form-urlencoded")>-1)return V1(t,this.formSerializer).toString();if((d=ke.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Jl(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return h||r?(e.setContentType("application/json",!1),Y1(t)):t}],transformResponse:[function(t){const e=this.transitional||Ya.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(ke.isResponse(t)||ke.isReadableStream(t))return t;if(t&&ke.isString(t)&&(n&&!this.responseType||r)){const h=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(h)throw d.name==="SyntaxError"?St.from(d,St.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xr.classes.FormData,Blob:xr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ke.forEach(["delete","get","head","post","put","patch"],t=>{Ya.headers[t]={}});const X1=ke.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Q1=t=>{const e={};let n,r,h;return t&&t.split(`
|
3
|
+
`).forEach(function(d){h=d.indexOf(":"),n=d.substring(0,h).trim().toLowerCase(),r=d.substring(h+1).trim(),!(!n||e[n]&&X1[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Xf=Symbol("internals");function Xa(t){return t&&String(t).trim().toLowerCase()}function ec(t){return t===!1||t==null?t:ke.isArray(t)?t.map(ec):String(t)}function Z1(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const J1=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function lh(t,e,n,r,h){if(ke.isFunction(r))return r.call(this,e,n);if(h&&(e=n),!!ke.isString(e)){if(ke.isString(r))return e.indexOf(r)!==-1;if(ke.isRegExp(r))return r.test(e)}}function eS(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function tS(t,e){const n=ke.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(h,d,f){return this[r].call(this,e,h,d,f)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,n,r){const h=this;function d(w,p,g){const i=Xa(p);if(!i)throw new Error("header name must be a non-empty string");const a=ke.findKey(h,i);(!a||h[a]===void 0||g===!0||g===void 0&&h[a]!==!1)&&(h[a||p]=ec(w))}const f=(w,p)=>ke.forEach(w,(g,i)=>d(g,i,p));if(ke.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if(ke.isString(e)&&(e=e.trim())&&!J1(e))f(Q1(e),n);else if(ke.isObject(e)&&ke.isIterable(e)){let w={},p,g;for(const i of e){if(!ke.isArray(i))throw TypeError("Object iterator must return a key-value pair");w[g=i[0]]=(p=w[g])?ke.isArray(p)?[...p,i[1]]:[p,i[1]]:i[1]}f(w,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Xa(e),e){const r=ke.findKey(this,e);if(r){const h=this[r];if(!n)return h;if(n===!0)return Z1(h);if(ke.isFunction(n))return n.call(this,h,r);if(ke.isRegExp(n))return n.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Xa(e),e){const r=ke.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||lh(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let h=!1;function d(f){if(f=Xa(f),f){const w=ke.findKey(r,f);w&&(!n||lh(r,r[w],w,n))&&(delete r[w],h=!0)}}return ke.isArray(e)?e.forEach(d):d(e),h}clear(e){const n=Object.keys(this);let r=n.length,h=!1;for(;r--;){const d=n[r];(!e||lh(this,this[d],d,e,!0))&&(delete this[d],h=!0)}return h}normalize(e){const n=this,r={};return ke.forEach(this,(h,d)=>{const f=ke.findKey(r,d);if(f){n[f]=ec(h),delete n[d];return}const w=e?eS(d):String(d).trim();w!==d&&delete n[d],n[w]=ec(h),r[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return ke.forEach(this,(r,h)=>{r!=null&&r!==!1&&(n[h]=e&&ke.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
4
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(h=>r.set(h)),r}static accessor(e){const n=(this[Xf]=this[Xf]={accessors:{}}).accessors,r=this.prototype;function h(d){const f=Xa(d);n[f]||(tS(r,d),n[f]=!0)}return ke.isArray(e)?e.forEach(h):h(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ke.reduceDescriptors(Gr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),ke.freezeMethods(Gr);function ch(t,e){const n=this||Ya,r=e||n,h=Gr.from(r.headers);let d=r.data;return ke.forEach(t,function(f){d=f.call(n,d,h.normalize(),e?e.status:void 0)}),h.normalize(),d}function Qf(t){return!!(t&&t.__CANCEL__)}function aa(t,e,n){St.call(this,t??"canceled",St.ERR_CANCELED,e,n),this.name="CanceledError"}ke.inherits(aa,St,{__CANCEL__:!0});function Zf(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new St("Request failed with status code "+n.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nS(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function rS(t,e){t=t||10;const n=new Array(t),r=new Array(t);let h=0,d=0,f;return e=e!==void 0?e:1e3,function(w){const p=Date.now(),g=r[d];f||(f=p),n[h]=w,r[h]=p;let i=d,a=0;for(;i!==h;)a+=n[i++],i=i%t;if(h=(h+1)%t,h===d&&(d=(d+1)%t),p-f<e)return;const u=g&&p-g;return u?Math.round(a*1e3/u):void 0}}function iS(t,e){let n=0,r=1e3/e,h,d;const f=(w,p=Date.now())=>{n=p,h=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const p=Date.now(),g=p-n;g>=r?f(w,p):(h=w,d||(d=setTimeout(()=>{d=null,f(h)},r-g)))},()=>h&&f(h)]}const tc=(t,e,n=3)=>{let r=0;const h=rS(50,250);return iS(d=>{const f=d.loaded,w=d.lengthComputable?d.total:void 0,p=f-r,g=h(p),i=f<=w;r=f;const a={loaded:f,total:w,progress:w?f/w:void 0,bytes:p,rate:g||void 0,estimated:g&&w&&i?(w-f)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},Jf=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},eg=t=>(...e)=>ke.asap(()=>t(...e)),oS=xr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,xr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(xr.origin),xr.navigator&&/(msie|trident)/i.test(xr.navigator.userAgent)):()=>!0,sS=xr.hasStandardBrowserEnv?{write(t,e,n,r,h,d){const f=[t+"="+encodeURIComponent(e)];ke.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),ke.isString(r)&&f.push("path="+r),ke.isString(h)&&f.push("domain="+h),d===!0&&f.push("secure"),document.cookie=f.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function aS(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function lS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function tg(t,e,n){let r=!aS(e);return t&&(r||n==!1)?lS(t,e):e}const ng=t=>t instanceof Gr?{...t}:t;function ws(t,e){e=e||{};const n={};function r(g,i,a,u){return ke.isPlainObject(g)&&ke.isPlainObject(i)?ke.merge.call({caseless:u},g,i):ke.isPlainObject(i)?ke.merge({},i):ke.isArray(i)?i.slice():i}function h(g,i,a,u){if(ke.isUndefined(i)){if(!ke.isUndefined(g))return r(void 0,g,a,u)}else return r(g,i,a,u)}function d(g,i){if(!ke.isUndefined(i))return r(void 0,i)}function f(g,i){if(ke.isUndefined(i)){if(!ke.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function w(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:w,headers:(g,i,a)=>h(ng(g),ng(i),a,!0)};return ke.forEach(Object.keys({...t,...e}),function(g){const i=p[g]||h,a=i(t[g],e[g],g);ke.isUndefined(a)&&i!==w||(n[g]=a)}),n}const rg=t=>{const e=ws({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:h,xsrfCookieName:d,headers:f,auth:w}=e;e.headers=f=Gr.from(f),e.url=Vf(tg(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&f.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let p;if(ke.isFormData(n)){if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(xr.hasStandardBrowserEnv&&(r&&ke.isFunction(r)&&(r=r(e)),r||r!==!1&&oS(e.url))){const g=h&&d&&sS.read(d);g&&f.set(h,g)}return e},cS=typeof XMLHttpRequest<"u",uS=cS&&function(t){return new Promise(function(e,n){const r=rg(t);let h=r.data;const d=Gr.from(r.headers).normalize();let{responseType:f,onUploadProgress:w,onDownloadProgress:p}=r,g,i,a,u,c;function o(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const S=Gr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:S,config:t,request:l};Zf(function(M){e(M),o()},function(M){n(M),o()},E),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new St("Request aborted",St.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new St("Network Error",St.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let S=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Gf;r.timeoutErrorMessage&&(S=r.timeoutErrorMessage),n(new St(S,E.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,t,l)),l=null},h===void 0&&d.setContentType(null),"setRequestHeader"in l&&ke.forEach(d.toJSON(),function(S,E){l.setRequestHeader(E,S)}),ke.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=tc(p,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,u]=tc(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(g=S=>{l&&(n(!S||S.type?new aa(null,t,l):S),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=nS(r.url);if(b&&xr.protocols.indexOf(b)===-1){n(new St("Unsupported protocol "+b+":",St.ERR_BAD_REQUEST,t));return}l.send(h||null)})},hS=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,h;const d=function(g){if(!h){h=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof St?i:new aa(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new St(`timeout ${e} of ms exceeded`,St.ETIMEDOUT))},e);const w=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>ke.asap(w),p}},dS=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,h;for(;r<n;)h=r+e,yield t.slice(r,h),r=h},pS=async function*(t,e){for await(const n of fS(t))yield*dS(n,e)},fS=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},ig=(t,e,n,r)=>{const h=pS(t,e);let d=0,f,w=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await h.next();if(g){w(),p.close();return}let a=i.byteLength;if(n){let u=d+=a;n(u)}p.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(p){return w(p),h.return()}},{highWaterMark:2})},nc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",og=nc&&typeof ReadableStream=="function",gS=nc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),sg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mS=og&&sg(()=>{let t=!1;const e=new Request(xr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ag=64*1024,uh=og&&sg(()=>ke.isReadableStream(new Response("").body)),rc={stream:uh&&(t=>t.body)};nc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!rc[e]&&(rc[e]=ke.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new St(`Response type '${e}' is not supported`,St.ERR_NOT_SUPPORT,r)})})})(new Response);const yS=async t=>{if(t==null)return 0;if(ke.isBlob(t))return t.size;if(ke.isSpecCompliantForm(t))return(await new Request(xr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(ke.isArrayBufferView(t)||ke.isArrayBuffer(t))return t.byteLength;if(ke.isURLSearchParams(t)&&(t=t+""),ke.isString(t))return(await gS(t)).byteLength},vS=async(t,e)=>ke.toFiniteNumber(t.getContentLength())??yS(e),wS=nc&&(async t=>{let{url:e,method:n,data:r,signal:h,cancelToken:d,timeout:f,onDownloadProgress:w,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:u}=rg(t);g=g?(g+"").toLowerCase():"text";let c=hS([h,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&mS&&n!=="get"&&n!=="head"&&(m=await vS(i,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(ke.isFormData(r)&&(x=k.headers.get("content-type"))&&i.setContentType(x),k.body){const[R,I]=Jf(m,tc(eg(p)));r=ig(k.body,ag,R,I)}}ke.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...u,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let S=await fetch(o,u);const E=uh&&(g==="stream"||g==="response");if(uh&&(w||E&&l)){const k={};["status","statusText","headers"].forEach(O=>{k[O]=S[O]});const x=ke.toFiniteNumber(S.headers.get("content-length")),[R,I]=w&&Jf(x,tc(eg(w),!0))||[];S=new Response(ig(S.body,ag,R,()=>{I&&I(),l&&l()}),k)}g=g||"text";let M=await rc[ke.findKey(rc,g)||"text"](S,t);return!E&&l&&l(),await new Promise((k,x)=>{Zf(k,x,{data:M,headers:Gr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:o})})}catch(b){throw l&&l(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,t,o),{cause:b.cause||b}):St.from(b,b&&b.code,t,o)}}),hh={http:I1,xhr:uS,fetch:wS};ke.forEach(hh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const lg=t=>`- ${t}`,bS=t=>ke.isFunction(t)||t===null||t===!1,cg={getAdapter:t=>{t=ke.isArray(t)?t:[t];const{length:e}=t;let n,r;const h={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!bS(n)&&(r=hh[(f=String(n)).toLowerCase()],r===void 0))throw new St(`Unknown adapter '${f}'`);if(r)break;h[f||"#"+d]=r}if(!r){const d=Object.entries(h).map(([w,p])=>`adapter ${w} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
|
5
|
+
`+d.map(lg).join(`
|
6
|
+
`):" "+lg(d[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:hh};function dh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new aa(null,t)}function ug(t){return dh(t),t.headers=Gr.from(t.headers),t.data=ch.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),cg.getAdapter(t.adapter||Ya.adapter)(t).then(function(e){return dh(t),e.data=ch.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return Qf(e)||(dh(t),e&&e.response&&(e.response.data=ch.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const hg="1.11.0",ic={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ic[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const dg={};ic.transitional=function(t,e,n){function r(h,d){return"[Axios v"+hg+"] Transitional option '"+h+"'"+d+(n?". "+n:"")}return(h,d,f)=>{if(t===!1)throw new St(r(d," has been removed"+(e?" in "+e:"")),St.ERR_DEPRECATED);return e&&!dg[d]&&(dg[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(h,d,f):!0}},ic.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function xS(t,e,n){if(typeof t!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let h=r.length;for(;h-- >0;){const d=r[h],f=e[d];if(f){const w=t[d],p=w===void 0||f(w,d,t);if(p!==!0)throw new St("option "+d+" must be "+p,St.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new St("Unknown option "+d,St.ERR_BAD_OPTION)}}const oc={assertOptions:xS,validators:ic},so=oc.validators;let bs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Kf,response:new Kf}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let h={};Error.captureStackTrace?Error.captureStackTrace(h):h=new Error;const d=h.stack?h.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
7
|
+
`+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ws(this.defaults,n);const{transitional:r,paramsSerializer:h,headers:d}=n;r!==void 0&&oc.assertOptions(r,{silentJSONParsing:so.transitional(so.boolean),forcedJSONParsing:so.transitional(so.boolean),clarifyTimeoutError:so.transitional(so.boolean)},!1),h!=null&&(ke.isFunction(h)?n.paramsSerializer={serialize:h}:oc.assertOptions(h,{encode:so.function,serialize:so.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),oc.assertOptions(n,{baseUrl:so.spelling("baseURL"),withXsrfToken:so.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=d&&ke.merge(d.common,d[n.method]);d&&ke.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Gr.concat(f,d);const w=[];let p=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(p=p&&o.synchronous,w.unshift(o.fulfilled,o.rejected))});const g=[];this.interceptors.response.forEach(function(o){g.push(o.fulfilled,o.rejected)});let i,a=0,u;if(!p){const o=[ug.bind(this),void 0];for(o.unshift(...w),o.push(...g),u=o.length,i=Promise.resolve(n);a<u;)i=i.then(o[a++],o[a++]);return i}u=w.length;let c=n;for(a=0;a<u;){const o=w[a++],l=w[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=ug.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,u=g.length;a<u;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=ws(this.defaults,e);const n=tg(e.baseURL,e.url,e.allowAbsoluteUrls);return Vf(n,e.params,e.paramsSerializer)}};ke.forEach(["delete","get","head","options"],function(t){bs.prototype[t]=function(e,n){return this.request(ws(n||{},{method:t,url:e,data:(n||{}).data}))}}),ke.forEach(["post","put","patch"],function(t){function e(n){return function(r,h,d){return this.request(ws(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}bs.prototype[t]=e(),bs.prototype[t+"Form"]=e(!0)});let SS=class Hx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(h){n=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const f=new Promise(w=>{r.subscribe(w),d=w}).then(h);return f.cancel=function(){r.unsubscribe(d)},f},e(function(h,d,f){r.reason||(r.reason=new aa(h,d,f),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Hx(function(n){e=n}),cancel:e}}};function kS(t){return function(e){return t.apply(null,e)}}function _S(t){return ke.isObject(t)&&t.isAxiosError===!0}const ph={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ph).forEach(([t,e])=>{ph[e]=t});function pg(t){const e=new bs(t),n=Rf(bs.prototype.request,e);return ke.extend(n,bs.prototype,e,{allOwnKeys:!0}),ke.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return pg(ws(t,r))},n}const In=pg(Ya);In.Axios=bs,In.CanceledError=aa,In.CancelToken=SS,In.isCancel=Qf,In.VERSION=hg,In.toFormData=Jl,In.AxiosError=St,In.Cancel=In.CanceledError,In.all=function(t){return Promise.all(t)},In.spread=kS,In.isAxiosError=_S,In.mergeConfig=ws,In.AxiosHeaders=Gr,In.formToJSON=t=>Yf(ke.isHTMLForm(t)?new FormData(t):t),In.getAdapter=cg.getAdapter,In.HttpStatusCode=ph,In.default=In;const{Axios:CB,AxiosError:$B,CanceledError:MB,isCancel:AB,CancelToken:TB,VERSION:EB,all:RB,Cancel:LB,isAxiosError:OB,spread:IB,toFormData:NB,AxiosHeaders:DB,HttpStatusCode:PB,formToJSON:FB,getAdapter:BB,mergeConfig:jB}=In,fg=In.create({baseURL:location.origin,timeout:6e4,params:{}});fg.interceptors.response.use(t=>t,t=>{var e,n,r,h,d,f,w,p,g,i,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let u=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(u+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(u+=`${t.response.config.data} `),(d=(h=t.response)==null?void 0:h.data)!=null&&d.message?u+=`${t.response.data.message}`:(w=(f=t.response)==null?void 0:f.data)!=null&&w.exception?u+=`${t.response.data.exception}`:(i=(g=(p=t.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(u+=`${t.response.data.error.class} `),u+=`${t.response.data.error.message}`):u+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),t}else throw t});const sc=async function(t,e,{data:n,params:r={},headers:h,noAuth:d=!1,noScope:f=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}h.Authorization=localStorage.openc3Token}return h.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),fg({method:t,url:e,data:n,params:r,headers:h,onUploadProgress:w})},fh={Accept:"application/json"},gg={...fh,"Content-Type":"application/json"},xs={get:function(t,{params:e,headers:n=fh,noScope:r,noAuth:h,onUploadProgress:d}={}){return sc("get",t,{params:e,headers:n,noScope:r,noAuth:h,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=gg,noScope:h,noAuth:d,onUploadProgress:f}={}){return sc("put",t,{data:e,params:n,headers:r,noScope:h,noAuth:d,onUploadProgress:f})},post:function(t,{data:e,params:n,headers:r=gg,noScope:h,noAuth:d,onUploadProgress:f}={}){return sc("post",t,{data:e,params:n,headers:r,noScope:h,noAuth:d,onUploadProgress:f})},delete:function(t,{params:e,headers:n=fh,noScope:r,noAuth:h,onUploadProgress:d}={}){return sc("delete",t,{params:e,headers:n,noScope:r,noAuth:h,onUploadProgress:d})}};let CS=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,h=n.length;r<h;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(h=>e!==h)}}}),$S=class extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}};function MS(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class AS{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:h})=>(n[r]=h,n),{})}}const Ss=Symbol("state");let mg=class{constructor(e={}){this.emitter=CS(),this.params=Object.freeze(e),this.presence=new AS(this),this.initialConnect=!0,this[Ss]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=MS({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Ss]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[Ss]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Ss]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[Ss]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[Ss]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[Ss]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...h)=>{r(),n(...h)});return r}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(h=>h()),e()})),r.push(this.on("close",h=>{r.forEach(d=>d()),n(h||new $S("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};Ef(class extends mg{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}},"identifier","__ghost__"),Ef(class extends mg{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}},"identifier","$pubsub");const ac=6e4,gh=36e5,TS=1e3,yg=Symbol.for("constructDateFrom");function Kn(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&yg in t?t[yg](e):t instanceof Date?new t.constructor(e):new Date(e)}function yn(t,e){return Kn(e||t,t)}let ES={};function la(){return ES}function Go(t,e){var n,r,h,d;const f=la(),w=(e==null?void 0:e.weekStartsOn)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??f.weekStartsOn??((d=(h=f.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,p=yn(t,e==null?void 0:e.in),g=p.getDay(),i=(g<w?7:0)+g-w;return p.setDate(p.getDate()-i),p.setHours(0,0,0,0),p}function ca(t,e){return Go(t,{...e,weekStartsOn:1})}function vg(t,e){const n=yn(t,void 0),r=n.getFullYear(),h=Kn(n,0);h.setFullYear(r+1,0,4),h.setHours(0,0,0,0);const d=ca(h),f=Kn(n,0);f.setFullYear(r,0,4),f.setHours(0,0,0,0);const w=ca(f);return n.getTime()>=d.getTime()?r+1:n.getTime()>=w.getTime()?r:r-1}function lc(t){const e=yn(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function RS(t,...e){const n=Kn.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function wg(t,e){const n=yn(t,void 0);return n.setHours(0,0,0,0),n}function LS(t,e,n){const[r,h]=RS(void 0,t,e),d=wg(r),f=wg(h),w=+d-lc(d),p=+f-lc(f);return Math.round((w-p)/864e5)}function OS(t,e){const n=vg(t),r=Kn(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ca(r)}function IS(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function bg(t){return!(!IS(t)&&typeof t!="number"||isNaN(+yn(t)))}function NS(t,e){const n=yn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const DS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},PS=(t,e,n)=>{let r;const h=DS[t];return typeof h=="string"?r=h:e===1?r=h.one:r=h.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function mh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const FS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WS={date:mh({formats:FS,defaultWidth:"full"}),time:mh({formats:BS,defaultWidth:"full"}),dateTime:mh({formats:jS,defaultWidth:"full"})},zS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},HS=(t,e,n,r)=>zS[t];function Qa(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let h;if(r==="formatting"&&t.formattingValues){const f=t.defaultFormattingWidth||t.defaultWidth,w=n!=null&&n.width?String(n.width):f;h=t.formattingValues[w]||t.formattingValues[f]}else{const f=t.defaultWidth,w=n!=null&&n.width?String(n.width):t.defaultWidth;h=t.values[w]||t.values[f]}const d=t.argumentCallback?t.argumentCallback(e):e;return h[d]}}const US={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},VS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},GS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},YS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},XS=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},QS={ordinalNumber:XS,era:Qa({values:US,defaultWidth:"wide"}),quarter:Qa({values:qS,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Qa({values:VS,defaultWidth:"wide"}),day:Qa({values:KS,defaultWidth:"wide"}),dayPeriod:Qa({values:GS,defaultWidth:"wide",formattingValues:YS,defaultFormattingWidth:"wide"})};function Za(t){return(e,n={})=>{const r=n.width,h=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(h);if(!d)return null;const f=d[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],p=Array.isArray(w)?JS(w,a=>a.test(f)):ZS(w,a=>a.test(f));let g;g=t.valueCallback?t.valueCallback(p):p,g=n.valueCallback?n.valueCallback(g):g;const i=e.slice(f.length);return{value:g,rest:i}}}function ZS(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function JS(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function ek(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const h=r[0],d=e.match(t.parsePattern);if(!d)return null;let f=t.valueCallback?t.valueCallback(d[0]):d[0];f=n.valueCallback?n.valueCallback(f):f;const w=e.slice(h.length);return{value:f,rest:w}}}const tk=/^(\d+)(th|st|nd|rd)?/i,nk=/\d+/i,rk={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ik={any:[/^b/i,/^(a|c)/i]},ok={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sk={any:[/1/i,/2/i,/3/i,/4/i]},ak={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},lk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ck={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},hk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},pk={ordinalNumber:ek({matchPattern:tk,parsePattern:nk,valueCallback:t=>parseInt(t,10)}),era:Za({matchPatterns:rk,defaultMatchWidth:"wide",parsePatterns:ik,defaultParseWidth:"any"}),quarter:Za({matchPatterns:ok,defaultMatchWidth:"wide",parsePatterns:sk,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Za({matchPatterns:ak,defaultMatchWidth:"wide",parsePatterns:lk,defaultParseWidth:"any"}),day:Za({matchPatterns:ck,defaultMatchWidth:"wide",parsePatterns:uk,defaultParseWidth:"any"}),dayPeriod:Za({matchPatterns:hk,defaultMatchWidth:"any",parsePatterns:dk,defaultParseWidth:"any"})},xg={code:"en-US",formatDistance:PS,formatLong:WS,formatRelative:HS,localize:QS,match:pk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function fk(t,e){const n=yn(t,void 0);return LS(n,NS(n))+1}function Sg(t,e){const n=yn(t,void 0),r=+ca(n)-+OS(n);return Math.round(r/6048e5)+1}function yh(t,e){var n,r,h,d;const f=yn(t,e==null?void 0:e.in),w=f.getFullYear(),p=la(),g=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??p.firstWeekContainsDate??((d=(h=p.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,i=Kn((e==null?void 0:e.in)||t,0);i.setFullYear(w+1,0,g),i.setHours(0,0,0,0);const a=Go(i,e),u=Kn((e==null?void 0:e.in)||t,0);u.setFullYear(w,0,g),u.setHours(0,0,0,0);const c=Go(u,e);return+f>=+a?w+1:+f>=+c?w:w-1}function gk(t,e){var n,r,h,d;const f=la(),w=(e==null?void 0:e.firstWeekContainsDate)??((r=(n=e==null?void 0:e.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??f.firstWeekContainsDate??((d=(h=f.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,p=yh(t,e),g=Kn((e==null?void 0:e.in)||t,0);return g.setFullYear(p,0,w),g.setHours(0,0,0,0),Go(g,e)}function kg(t,e){const n=yn(t,e==null?void 0:e.in),r=+Go(n,e)-+gk(n,e);return Math.round(r/6048e5)+1}function en(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Yo={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return en(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):en(n+1,2)},d(t,e){return en(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return en(t.getHours()%12||12,e.length)},H(t,e){return en(t.getHours(),e.length)},m(t,e){return en(t.getMinutes(),e.length)},s(t,e){return en(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),h=Math.trunc(r*Math.pow(10,n-3));return en(h,e.length)}},ua={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_g={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),h=r>0?r:1-r;return n.ordinalNumber(h,{unit:"year"})}return Yo.y(t,e)},Y:function(t,e,n,r){const h=yh(t,r),d=h>0?h:1-h;if(e==="YY"){const f=d%100;return en(f,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):en(d,e.length)},R:function(t,e){const n=vg(t);return en(n,e.length)},u:function(t,e){const n=t.getFullYear();return en(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return en(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return en(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Yo.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return en(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const h=kg(t,r);return e==="wo"?n.ordinalNumber(h,{unit:"week"}):en(h,e.length)},I:function(t,e,n){const r=Sg(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):en(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Yo.d(t,e)},D:function(t,e,n){const r=fk(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):en(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const h=t.getDay(),d=(h-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(d);case"ee":return en(d,2);case"eo":return n.ordinalNumber(d,{unit:"day"});case"eee":return n.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(h,{width:"short",context:"formatting"});case"eeee":default:return n.day(h,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const h=t.getDay(),d=(h-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(d);case"cc":return en(d,e.length);case"co":return n.ordinalNumber(d,{unit:"day"});case"ccc":return n.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(h,{width:"narrow",context:"standalone"});case"cccccc":return n.day(h,{width:"short",context:"standalone"});case"cccc":default:return n.day(h,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),h=r===0?7:r;switch(e){case"i":return String(h);case"ii":return en(h,e.length);case"io":return n.ordinalNumber(h,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let h;switch(r===12?h=ua.noon:r===0?h=ua.midnight:h=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let h;switch(r>=17?h=ua.evening:r>=12?h=ua.afternoon:r>=4?h=ua.morning:h=ua.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Yo.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Yo.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):en(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):en(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Yo.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Yo.s(t,e)},S:function(t,e){return Yo.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return $g(r);case"XXXX":case"XX":return ks(r);case"XXXXX":case"XXX":default:return ks(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return $g(r);case"xxxx":case"xx":return ks(r);case"xxxxx":case"xxx":default:return ks(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Cg(r,":");case"OOOO":default:return"GMT"+ks(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Cg(r,":");case"zzzz":default:return"GMT"+ks(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return en(r,e.length)},T:function(t,e,n){return en(+t,e.length)}};function Cg(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),h=Math.trunc(r/60),d=r%60;return d===0?n+String(h):n+String(h)+e+en(d,2)}function $g(t,e){return t%60===0?(t>0?"-":"+")+en(Math.abs(t)/60,2):ks(t,e)}function ks(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),h=en(Math.trunc(r/60),2),d=en(r%60,2);return n+h+e+d}const Mg=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ag=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},mk=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],h=n[2];if(!h)return Mg(t,e);let d;switch(r){case"P":d=e.dateTime({width:"short"});break;case"PP":d=e.dateTime({width:"medium"});break;case"PPP":d=e.dateTime({width:"long"});break;case"PPPP":default:d=e.dateTime({width:"full"});break}return d.replace("{{date}}",Mg(r,e)).replace("{{time}}",Ag(h,e))},vh={p:Ag,P:mk},yk=/^D+$/,vk=/^Y+$/,wk=["D","DD","YY","YYYY"];function Tg(t){return yk.test(t)}function Eg(t){return vk.test(t)}function wh(t,e,n){const r=bk(t,e,n);if(console.warn(r),wk.includes(t))throw new RangeError(r)}function bk(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kk=/^'([^]*?)'?$/,_k=/''/g,Ck=/[a-zA-Z]/;function _s(t,e,n){var r,h,d,f,w,p,g,i;const a=la(),u=(n==null?void 0:n.locale)??a.locale??xg,c=(n==null?void 0:n.firstWeekContainsDate)??((h=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((f=(d=a.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((p=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:p.weekStartsOn)??a.weekStartsOn??((i=(g=a.locale)==null?void 0:g.options)==null?void 0:i.weekStartsOn)??0,l=yn(t,n==null?void 0:n.in);if(!bg(l))throw new RangeError("Invalid time value");let m=e.match(Sk).map(S=>{const E=S[0];if(E==="p"||E==="P"){const M=vh[E];return M(S,u.formatLong)}return S}).join("").match(xk).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const E=S[0];if(E==="'")return{isToken:!1,value:$k(S)};if(_g[E])return{isToken:!0,value:S};if(E.match(Ck))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:S}});u.localize.preprocessor&&(m=u.localize.preprocessor(l,m));const b={firstWeekContainsDate:c,weekStartsOn:o,locale:u};return m.map(S=>{if(!S.isToken)return S.value;const E=S.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Eg(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Tg(E))&&wh(E,e,String(t));const M=_g[E[0]];return M(l,E,u.localize,b)}).join("")}function $k(t){const e=t.match(kk);return e?e[1].replace(_k,"'"):t}var Xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rg={exports:{}},Lg;function Mk(){return Lg||(Lg=1,(function(t,e){(function(){var n="ace",r=(function(){return this})();!r&&typeof window<"u"&&(r=window);var h=function(i,a,u){if(typeof i!="string"){h.original?h.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),h.modules[i]||(h.payloads[i]=u,h.modules[i]=null)};h.modules={},h.payloads={};var d=function(i,a,u){if(typeof a=="string"){var c=p(i,a);if(c!=null)return u&&u(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],l=0,m=a.length;l<m;++l){var b=p(i,a[l]);if(b==null&&f.original)return;o.push(b)}return u&&u.apply(null,o)||!0}},f=function(i,a){var u=d("",i,a);return u==null&&f.original?f.original.apply(this,arguments):u},w=function(i,a){if(a.indexOf("!")!==-1){var u=a.split("!");return w(i,u[0])+"!"+w(i,u[1])}if(a.charAt(0)=="."){var c=i.split("/").slice(0,-1).join("/");for(a=c+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},p=function(i,a){a=w(i,a);var u=h.modules[a];if(!u){if(u=h.payloads[a],typeof u=="function"){var c={},o={id:a,uri:"",exports:c,packaged:!0},l=function(b,S){return d(a,b,S)},m=u(l,c,o);c=m||o.exports,h.modules[a]=c,delete h.payloads[a]}u=h.modules[a]=c||u}return u};function g(i){var a=r;r[i]||(r[i]={}),a=r[i],(!a.define||!a.define.packaged)&&(h.original=a.define,a.define=h,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(f.original=a.require,a.require=f,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,h){function d(f,w,p){Object.defineProperty(f,w,{value:p,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(f,w){return w=w||0,this.lastIndexOf(f,w)===w}),String.prototype.endsWith||d(String.prototype,"endsWith",function(f,w){var p=this;(w===void 0||w>p.length)&&(w=p.length),w-=f.length;var g=p.indexOf(f,w);return g!==-1&&g===w}),String.prototype.repeat||d(String.prototype,"repeat",function(f){for(var w="",p=this;f>0;)f&1&&(w+=p),(f>>=1)&&(p+=p);return w}),String.prototype.includes||d(String.prototype,"includes",function(f,w){return this.indexOf(f,w)!=-1}),Object.assign||(Object.assign=function(f){if(f==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(f),p=1;p<arguments.length;p++){var g=arguments[p];g!=null&&Object.keys(g).forEach(function(i){w[i]=g[i]})}return w}),Object.values||(Object.values=function(f){return Object.keys(f).map(function(w){return f[w]})}),Array.prototype.find||d(Array.prototype,"find",function(f){for(var w=this.length,p=arguments[1],g=0;g<w;g++){var i=this[g];if(f.call(p,i,g,this))return i}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(f){for(var w=this.length,p=arguments[1],g=0;g<w;g++){var i=this[g];if(f.call(p,i,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(f,w){return this.indexOf(f,w)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(f){for(var w=this,p=w.length>>>0,g=arguments[1],i=g>>0,a=i<0?Math.max(p+i,0):Math.min(i,p),u=arguments[2],c=u===void 0?p:u>>0,o=c<0?Math.max(p+c,0):Math.min(c,p);a<o;)w[a]=f,a++;return w}),Array.of||d(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,h){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,h){r.deepCopy=function d(f){if(typeof f!="object"||!f)return f;var w;if(Array.isArray(f)){w=[];for(var p=0;p<f.length;p++)w[p]=d(f[p]);return w}if(Object.prototype.toString.call(f)!=="[object Object]")return f;w={};for(var p in f)w[p]=d(f[p]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,h){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,p){for(var g="";p>0;)p&1&&(g+=w),(p>>=1)&&(w+=w);return g};var d=/^\s\s*/,f=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(d,"")},r.stringTrimRight=function(w){return w.replace(f,"")},r.copyObject=function(w){var p={};for(var g in w)p[g]=w[g];return p},r.copyArray=function(w){for(var p=[],g=0,i=w.length;g<i;g++)w[g]&&typeof w[g]=="object"?p[g]=this.copyObject(w[g]):p[g]=w[g];return p},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var p={},g=0;g<w.length;g++)p[w[g]]=1;return p},r.createMap=function(w){var p=Object.create(null);for(var g in w)p[g]=w[g];return p},r.arrayRemove=function(w,p){for(var g=0;g<=w.length;g++)p===w[g]&&w.splice(g,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(w,p){var g=[];return w.replace(p,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(w){var p=null,g=function(){p=null,w()},i=function(a){return i.cancel(),p=setTimeout(g,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),w(),i},i.cancel=function(){return clearTimeout(p),p=null,i},i.isPending=function(){return p},i},r.delayedCall=function(w,p){var g=null,i=function(){g=null,w()},a=function(u){g==null&&(g=setTimeout(i,u||p))};return a.delay=function(u){g&&clearTimeout(g),g=setTimeout(i,u||p)},a.schedule=a,a.call=function(){this.cancel(),w()},a.cancel=function(){g&&clearTimeout(g),g=null},a.isPending=function(){return g},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(w,p,g){return g&&w.codePointAt(p)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,h){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},f=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),w=d.userAgent||"",p=d.appName||"";r.isWin=f=="win",r.isMac=f=="mac",r.isLinux=f=="linux",r.isIE=p=="Microsoft Internet Explorer"||p.indexOf("MSAppHost")>=0?parseFloat((w.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((w.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=w.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(w.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(w.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(w.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(w.split(" Edge/")[1])||void 0,r.isAIR=w.indexOf("AdobeAIR")>=0,r.isAndroid=w.indexOf("Android")>=0,r.isChromeOS=w.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(w)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,h){var d=n("./useragent"),f="http://www.w3.org/1999/xhtml";r.buildDom=function u(c,o,l){if(typeof c=="string"&&c){var m=document.createTextNode(c);return o&&o.appendChild(m),m}if(!Array.isArray(c))return c&&c.appendChild&&o&&o.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var b=[],S=0;S<c.length;S++){var E=u(c[S],o,l);E&&b.push(E)}return b}var M=document.createElement(c[0]),k=c[1],x=1;k&&typeof k=="object"&&!Array.isArray(k)&&(x=2);for(var S=x;S<c.length;S++)u(c[S],M,l);return x==2&&Object.keys(k).forEach(function(R){var I=k[R];R==="class"?M.className=Array.isArray(I)?I.join(" "):I:typeof I=="function"||R=="value"||R[0]=="$"?M[R]=I:R==="ref"?l&&(l[I]=M):R==="style"?typeof I=="string"&&(M.style.cssText=I):I!=null&&M.setAttribute(R,I)}),o&&o.appendChild(M),M},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,c){return document.createElementNS?document.createElementNS(c||f,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,c){var o=c?c.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var c=u?u.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(u,c){var o=(u.className+"").split(/\s+/g);return o.indexOf(c)!==-1},r.addCssClass=function(u,c){r.hasCssClass(u,c)||(u.className+=" "+c)},r.removeCssClass=function(u,c){for(var o=u.className.split(/\s+/g);;){var l=o.indexOf(c);if(l==-1)break;o.splice(l,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,c){for(var o=u.className.split(/\s+/g),l=!0;;){var m=o.indexOf(c);if(m==-1)break;l=!1,o.splice(m,1)}return l&&o.push(c),u.className=o.join(" "),l},r.setCssClass=function(u,c,o){o?r.addCssClass(u,c):r.removeCssClass(u,c)},r.hasCssString=function(u,c){var o=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===u)return!0}},r.removeElementById=function(u,c){c=c||document,c.getElementById(u)&&c.getElementById(u).remove()};var w,p=[];r.useStrictCSP=function(u){w=u,u==!1?g():p||(p=[])};function g(){var u=p;p=null,u&&u.forEach(function(c){i(c[0],c[1])})}function i(u,c,o){if(!(typeof document>"u")){if(p){if(o)g();else if(o===!1)return p.push([u,c])}if(!w){var l=o;!o||!o.getRootNode?l=document:(l=o.getRootNode(),(!l||l==o)&&(l=document));var m=l.ownerDocument||l;if(c&&r.hasCssString(c,l))return null;c&&(u+=`
|
8
|
+
/*# sourceURL=ace/css/`+c+" */");var b=r.createElement("style");b.appendChild(m.createTextNode(u)),c&&(b.id=c),l==m&&(l=r.getDocumentHead(m)),l.insertBefore(b,l.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(u,c){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(c))},r.scrollbarWidth=function(u){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var o=r.createElement("ace_outer"),l=o.style;l.position="absolute",l.left="-10000px",l.overflow="hidden",l.width="200px",l.minWidth="0px",l.height="150px",l.display="block",o.appendChild(c);var m=u&&u.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var b=c.offsetWidth;l.overflow="scroll";var S=c.offsetWidth;return b===S&&(S=o.clientWidth),m.removeChild(o),b-S},r.computedStyle=function(u,c){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,c,o){u[c]!==o&&(u[c]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=d.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,d.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!d.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,c,o){u.style.transform="translate("+Math.round(c)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,c,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,h){/*
|
9
|
+
* based on code from:
|
10
|
+
*
|
11
|
+
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
12
|
+
* Available via the MIT or new BSD license.
|
13
|
+
* see: http://github.com/jrburke/requirejs for details
|
14
|
+
*/var d=n("./dom");r.get=function(f,w){var p=new XMLHttpRequest;p.open("GET",f,!0),p.onreadystatechange=function(){p.readyState===4&&w(p.responseText)},p.send(null)},r.loadScript=function(f,w){var p=d.getDocumentHead(),g=document.createElement("script");g.src=f,p.appendChild(g),g.onload=g.onreadystatechange=function(i,a){(a||!g.readyState||g.readyState=="loaded"||g.readyState=="complete")&&(g=g.onload=g.onreadystatechange=null,a||w())}},r.qualifyURL=function(f){var w=document.createElement("a");return w.href=f,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,h){r.inherits=function(d,f){d.super_=f,d.prototype=Object.create(f.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,f){for(var w in f)d[w]=f[w];return d},r.implement=function(d,f){r.mixin(d,f)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,h){var d={},f=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(p,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[p]||[],a=this._defaultHandlers[p];if(!(!i.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=p),g.stopPropagation||(g.stopPropagation=f),g.preventDefault||(g.preventDefault=w),i=i.slice();for(var u=0;u<i.length&&(i[u](g,this),!g.propagationStopped);u++);if(a&&!g.defaultPrevented)return a(g,this)}},d._signal=function(p,g){var i=(this._eventRegistry||{})[p];if(i){i=i.slice();for(var a=0;a<i.length;a++)i[a](g,this)}},d.once=function(p,g){var i=this;if(this.on(p,function a(){i.off(p,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},d.setDefaultHandler=function(p,g){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[p]){var a=i[p],u=i._disabled_[p];u||(i._disabled_[p]=u=[]),u.push(a);var c=u.indexOf(g);c!=-1&&u.splice(c,1)}i[p]=g},d.removeDefaultHandler=function(p,g){var i=this._defaultHandlers;if(i){var a=i._disabled_[p];if(i[p]==g)a&&this.setDefaultHandler(p,a.pop());else if(a){var u=a.indexOf(g);u!=-1&&a.splice(u,1)}}},d.on=d.addEventListener=function(p,g,i){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[p];return a||(a=this._eventRegistry[p]=[]),a.indexOf(g)==-1&&a[i?"unshift":"push"](g),g},d.off=d.removeListener=d.removeEventListener=function(p,g){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[p];if(i){var a=i.indexOf(g);a!==-1&&i.splice(a,1)}},d.removeAllListeners=function(p){p||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[p]=void 0),this._defaultHandlers&&(this._defaultHandlers[p]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,r,h){r.reportError=function(d,f){var w=new Error(d);w.data=f,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,r,h){var d={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};r.defaultEnglishMessages=d}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(n,r,h){"no use strict";var d=n("./oop"),f=n("./event_emitter").EventEmitter,w=n("./report_error").reportError,p=n("./default_english_messages").defaultEnglishMessages,g={setOptions:function(o){Object.keys(o).forEach(function(l){this.setOption(l,o[l])},this)},getOptions:function(o){var l={};if(o)Array.isArray(o)||(o=Object.keys(o));else{var m=this.$options;o=Object.keys(m).filter(function(b){return!m[b].hidden})}return o.forEach(function(b){l[b]=this.getOption(b)},this),l},setOption:function(o,l){if(this["$"+o]!==l){var m=this.$options[o];if(!m)return i('misspelled option "'+o+'"');if(m.forwardTo)return this[m.forwardTo]&&this[m.forwardTo].setOption(o,l);m.handlesSet||(this["$"+o]=l),m&&m.set&&m.set.call(this,l)}},getOption:function(o){var l=this.$options[o];return l?l.forwardTo?this[l.forwardTo]&&this[l.forwardTo].getOption(o):l&&l.get?l.get.call(this):this["$"+o]:i('misspelled option "'+o+'"')}};function i(o){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var a,u,c=(function(){function o(){this.$defaultOptions={},a=p,u="dollarSigns"}return o.prototype.defineOptions=function(l,m,b){return l.$options||(this.$defaultOptions[m]=l.$options={}),Object.keys(b).forEach(function(S){var E=b[S];typeof E=="string"&&(E={forwardTo:E}),E.name||(E.name=S),l.$options[E.name]=E,"initialValue"in E&&(l["$"+E.name]=E.initialValue)}),d.implement(l,g),this},o.prototype.resetOptions=function(l){Object.keys(l.$options).forEach(function(m){var b=l.$options[m];"value"in b&&l.setOption(m,b.value)})},o.prototype.setDefaultValue=function(l,m,b){if(!l){for(l in this.$defaultOptions)if(this.$defaultOptions[l][m])break;if(!this.$defaultOptions[l][m])return!1}var S=this.$defaultOptions[l]||(this.$defaultOptions[l]={});S[m]&&(S.forwardTo?this.setDefaultValue(S.forwardTo,m,b):S[m].value=b)},o.prototype.setDefaultValues=function(l,m){Object.keys(m).forEach(function(b){this.setDefaultValue(l,b,m[b])},this)},o.prototype.setMessages=function(l,m){a=l,m&&m.placeholders&&(u=m.placeholders)},o.prototype.nls=function(l,m,b){a[l]||(i("No message found for the key '"+l+"' in messages with id "+a.$id+", trying to find a translation for the default string '"+m+"'."),a[m]||i("No message found for the default string '"+m+"' in the provided messages. Falling back to the default English message."));var S=a[l]||a[m]||m;return b&&(u==="dollarSigns"&&(S=S.replace(/\$(\$|[\d]+)/g,function(E,M){return M=="$"?"$":b[M]})),u==="curlyBrackets"&&(S=S.replace(/\{([^\}]+)\}/g,function(E,M){return b[M]}))),S},o})();c.prototype.warn=i,c.prototype.reportError=w,d.implement(c.prototype,f),r.AppConfig=c}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,r,h){h.exports=`.ace-tm .ace_gutter {
|
15
|
+
background: #f0f0f0;
|
16
|
+
color: #333;
|
17
|
+
}
|
18
|
+
|
19
|
+
.ace-tm .ace_print-margin {
|
20
|
+
width: 1px;
|
21
|
+
background: #e8e8e8;
|
22
|
+
}
|
23
|
+
|
24
|
+
.ace-tm .ace_fold {
|
25
|
+
background-color: #6B72E6;
|
26
|
+
}
|
27
|
+
|
28
|
+
.ace-tm {
|
29
|
+
background-color: #FFFFFF;
|
30
|
+
color: black;
|
31
|
+
}
|
32
|
+
|
33
|
+
.ace-tm .ace_cursor {
|
34
|
+
color: black;
|
35
|
+
}
|
36
|
+
|
37
|
+
.ace-tm .ace_invisible {
|
38
|
+
color: rgb(191, 191, 191);
|
39
|
+
}
|
40
|
+
|
41
|
+
.ace-tm .ace_storage,
|
42
|
+
.ace-tm .ace_keyword {
|
43
|
+
color: blue;
|
44
|
+
}
|
45
|
+
|
46
|
+
.ace-tm .ace_constant {
|
47
|
+
color: rgb(197, 6, 11);
|
48
|
+
}
|
49
|
+
|
50
|
+
.ace-tm .ace_constant.ace_buildin {
|
51
|
+
color: rgb(88, 72, 246);
|
52
|
+
}
|
53
|
+
|
54
|
+
.ace-tm .ace_constant.ace_language {
|
55
|
+
color: rgb(88, 92, 246);
|
56
|
+
}
|
57
|
+
|
58
|
+
.ace-tm .ace_constant.ace_library {
|
59
|
+
color: rgb(6, 150, 14);
|
60
|
+
}
|
61
|
+
|
62
|
+
.ace-tm .ace_invalid {
|
63
|
+
background-color: rgba(255, 0, 0, 0.1);
|
64
|
+
color: red;
|
65
|
+
}
|
66
|
+
|
67
|
+
.ace-tm .ace_support.ace_function {
|
68
|
+
color: rgb(60, 76, 114);
|
69
|
+
}
|
70
|
+
|
71
|
+
.ace-tm .ace_support.ace_constant {
|
72
|
+
color: rgb(6, 150, 14);
|
73
|
+
}
|
74
|
+
|
75
|
+
.ace-tm .ace_support.ace_type,
|
76
|
+
.ace-tm .ace_support.ace_class {
|
77
|
+
color: rgb(109, 121, 222);
|
78
|
+
}
|
79
|
+
|
80
|
+
.ace-tm .ace_keyword.ace_operator {
|
81
|
+
color: rgb(104, 118, 135);
|
82
|
+
}
|
83
|
+
|
84
|
+
.ace-tm .ace_string {
|
85
|
+
color: rgb(3, 106, 7);
|
86
|
+
}
|
87
|
+
|
88
|
+
.ace-tm .ace_comment {
|
89
|
+
color: rgb(76, 136, 107);
|
90
|
+
}
|
91
|
+
|
92
|
+
.ace-tm .ace_comment.ace_doc {
|
93
|
+
color: rgb(0, 102, 255);
|
94
|
+
}
|
95
|
+
|
96
|
+
.ace-tm .ace_comment.ace_doc.ace_tag {
|
97
|
+
color: rgb(128, 159, 191);
|
98
|
+
}
|
99
|
+
|
100
|
+
.ace-tm .ace_constant.ace_numeric {
|
101
|
+
color: rgb(0, 0, 205);
|
102
|
+
}
|
103
|
+
|
104
|
+
.ace-tm .ace_variable {
|
105
|
+
color: rgb(49, 132, 149);
|
106
|
+
}
|
107
|
+
|
108
|
+
.ace-tm .ace_xml-pe {
|
109
|
+
color: rgb(104, 104, 91);
|
110
|
+
}
|
111
|
+
|
112
|
+
.ace-tm .ace_entity.ace_name.ace_function {
|
113
|
+
color: #0000A2;
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
.ace-tm .ace_heading {
|
118
|
+
color: rgb(12, 7, 255);
|
119
|
+
}
|
120
|
+
|
121
|
+
.ace-tm .ace_list {
|
122
|
+
color:rgb(185, 6, 144);
|
123
|
+
}
|
124
|
+
|
125
|
+
.ace-tm .ace_meta.ace_tag {
|
126
|
+
color:rgb(0, 22, 142);
|
127
|
+
}
|
128
|
+
|
129
|
+
.ace-tm .ace_string.ace_regex {
|
130
|
+
color: rgb(255, 0, 0)
|
131
|
+
}
|
132
|
+
|
133
|
+
.ace-tm .ace_marker-layer .ace_selection {
|
134
|
+
background: rgb(181, 213, 255);
|
135
|
+
}
|
136
|
+
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
137
|
+
box-shadow: 0 0 3px 0px white;
|
138
|
+
}
|
139
|
+
.ace-tm .ace_marker-layer .ace_step {
|
140
|
+
background: rgb(252, 255, 0);
|
141
|
+
}
|
142
|
+
|
143
|
+
.ace-tm .ace_marker-layer .ace_stack {
|
144
|
+
background: rgb(164, 229, 101);
|
145
|
+
}
|
146
|
+
|
147
|
+
.ace-tm .ace_marker-layer .ace_bracket {
|
148
|
+
margin: -1px 0 0 -1px;
|
149
|
+
border: 1px solid rgb(192, 192, 192);
|
150
|
+
}
|
151
|
+
|
152
|
+
.ace-tm .ace_marker-layer .ace_active-line {
|
153
|
+
background: rgba(0, 0, 0, 0.07);
|
154
|
+
}
|
155
|
+
|
156
|
+
.ace-tm .ace_gutter-active-line {
|
157
|
+
background-color : #dcdcdc;
|
158
|
+
}
|
159
|
+
|
160
|
+
.ace-tm .ace_marker-layer .ace_selected-word {
|
161
|
+
background: rgb(250, 250, 255);
|
162
|
+
border: 1px solid rgb(200, 200, 250);
|
163
|
+
}
|
164
|
+
|
165
|
+
.ace-tm .ace_indent-guide {
|
166
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
167
|
+
}
|
168
|
+
|
169
|
+
.ace-tm .ace_indent-guide-active {
|
170
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
171
|
+
}
|
172
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,h){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,h){"no use strict";var d=n("./lib/lang"),f=n("./lib/net"),w=n("./lib/dom"),p=n("./lib/app_config").AppConfig;h.exports=r=new p;var g={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!g.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return g[c]},r.set=function(c,o){if(g.hasOwnProperty(c))g[c]=o;else if(this.setDefaultValue("",c,o)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&w.useStrictCSP(o)},r.all=function(){return d.copyObject(g)},r.$modes={},r.moduleUrl=function(c,o){if(g.$moduleUrls[c])return g.$moduleUrls[c];var l=c.split("/");o=o||l[l.length-2]||"";var m=o=="snippets"?"/":"-",b=l[l.length-1];if(o=="worker"&&m=="-"){var S=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");b=b.replace(S,"")}(!b||b==o)&&l.length>1&&(b=l[l.length-2]);var E=g[o+"Path"];return E==null?E=g.basePath:m=="/"&&(o=m=""),E&&E.slice(-1)!="/"&&(E+="/"),E+o+m+b+this.get("suffix")},r.setModuleUrl=function(c,o){return g.$moduleUrls[c]=o};var i=function(c,o){if(c==="ace/theme/textmate"||c==="./theme/textmate")return o(null,n("./theme/textmate"));if(a)return a(c,o);console.error("loader is not configured")},a;r.setLoader=function(c){a=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,o){var l;if(Array.isArray(c))var m=c[0],b=c[1];else if(typeof c=="string")var b=c;var S=function(E){if(E&&!r.$loading[b])return o&&o(E);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(o),!(r.$loading[b].length>1)){var M=function(){i(b,function(k,x){x&&(r.$loaded[b]=x),r._emit("load.module",{name:b,module:x});var R=r.$loading[b];r.$loading[b]=null,R.forEach(function(I){I&&I(x)})})};if(!r.get("packaged"))return M();f.loadScript(r.moduleUrl(b,m),M),u()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(E){E.default?S(E.default):S(E)});else{try{l=this.$require(b)}catch{}S(l||r.$loaded[b])}},r.$require=function(c){if(typeof h.require=="function"){var o="require";return h[o](c)}},r.setModuleLoader=function(c,o){r.dynamicModules[c]=o};var u=function(){!g.basePath&&!g.workerPath&&!g.modePath&&!g.themePath&&!Object.keys(g.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),u=function(){})};r.version="1.43.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,h){n("./lib/fixoldbrowsers");var d=n("./config");d.setLoader(function(g,i){n([g],function(a){i(null,a)})});var f=(function(){return this||typeof window<"u"&&window})();h.exports=function(g){d.init=w,d.$require=n,g.require=n},w(!0);function w(g){if(!(!f||!f.document)){d.set("packaged",g||n.packaged||h.packaged||f.define&&(void 0).packaged);var i={},a="",u=document.currentScript||document._currentScript,c=u&&u.ownerDocument||document;u&&u.src&&(a=u.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var o=c.getElementsByTagName("script"),l=0;l<o.length;l++){var m=o[l],b=m.src||m.getAttribute("src");if(b){for(var S=m.attributes,E=0,M=S.length;E<M;E++){var k=S[E];k.name.indexOf("data-ace-")===0&&(i[p(k.name.replace(/^data-ace-/,""))]=k.value)}var x=b.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);x&&(a=x[1])}}a&&(i.base=i.base||a,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base;for(var R in i)typeof i[R]<"u"&&d.set(R,i[R])}}function p(g){return g.replace(/-(.)/g,function(i,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,h){var d=(function(){function f(w,p,g,i){this.start={row:w,column:p},this.end={row:g,column:i}}return f.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},f.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},f.prototype.contains=function(w,p){return this.compare(w,p)==0},f.prototype.compareRange=function(w){var p,g=w.end,i=w.start;return p=this.compare(g.row,g.column),p==1?(p=this.compare(i.row,i.column),p==1?2:p==0?1:0):p==-1?-2:(p=this.compare(i.row,i.column),p==-1?-1:p==1?42:0)},f.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},f.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},f.prototype.intersects=function(w){var p=this.compareRange(w);return p==-1||p==0||p==1},f.prototype.isEnd=function(w,p){return this.end.row==w&&this.end.column==p},f.prototype.isStart=function(w,p){return this.start.row==w&&this.start.column==p},f.prototype.setStart=function(w,p){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=p)},f.prototype.setEnd=function(w,p){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=p)},f.prototype.inside=function(w,p){return this.compare(w,p)==0?!(this.isEnd(w,p)||this.isStart(w,p)):!1},f.prototype.insideStart=function(w,p){return this.compare(w,p)==0?!this.isEnd(w,p):!1},f.prototype.insideEnd=function(w,p){return this.compare(w,p)==0?!this.isStart(w,p):!1},f.prototype.compare=function(w,p){return!this.isMultiLine()&&w===this.start.row?p<this.start.column?-1:p>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?p>=this.start.column?0:-1:this.end.row===w?p<=this.end.column?0:1:0},f.prototype.compareStart=function(w,p){return this.start.row==w&&this.start.column==p?-1:this.compare(w,p)},f.prototype.compareEnd=function(w,p){return this.end.row==w&&this.end.column==p?1:this.compare(w,p)},f.prototype.compareInside=function(w,p){return this.end.row==w&&this.end.column==p?1:this.start.row==w&&this.start.column==p?-1:this.compare(w,p)},f.prototype.clipRows=function(w,p){if(this.end.row>p)var g={row:p+1,column:0};else if(this.end.row<w)var g={row:w,column:0};if(this.start.row>p)var i={row:p+1,column:0};else if(this.start.row<w)var i={row:w,column:0};return f.fromPoints(i||this.start,g||this.end)},f.prototype.extend=function(w,p){var g=this.compare(w,p);if(g==0)return this;if(g==-1)var i={row:w,column:p};else var a={row:w,column:p};return f.fromPoints(i||this.start,a||this.end)},f.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},f.prototype.isMultiLine=function(){return this.start.row!==this.end.row},f.prototype.clone=function(){return f.fromPoints(this.start,this.end)},f.prototype.collapseRows=function(){return this.end.column==0?new f(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new f(this.start.row,0,this.end.row,0)},f.prototype.toScreenRange=function(w){var p=w.documentToScreenPosition(this.start),g=w.documentToScreenPosition(this.end);return new f(p.row,p.column,g.row,g.column)},f.prototype.moveBy=function(w,p){this.start.row+=w,this.start.column+=p,this.end.row+=w,this.end.column+=p},f})();d.fromPoints=function(f,w){return new d(f.row,f.column,w.row,w.column)},d.comparePoints=function(f,w){return f.row-w.row||f.column-w.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,h){for(var d=n("./oop"),f={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},p=0;p<10;p++)w["Digit"+p]=48+p,w["Numpad"+p]=96+p,f.PRINTABLE_KEYS[48+p]=""+p,f.FUNCTION_KEYS[96+p]="Numpad"+p;for(var p=65;p<91;p++){var g=String.fromCharCode(p+32);w["Key"+g.toUpperCase()]=p,f.PRINTABLE_KEYS[p]=g}for(var p=1;p<13;p++)w["F"+p]=111+p,f.FUNCTION_KEYS[111+p]="F"+p;var i={Shift:16,Control:17,Alt:18,Meta:224};for(var a in i)w[a]=w[a+"Left"]=w[a+"Right"]=i[a];r.$codeToKeyCode=w,f.PRINTABLE_KEYS[173]="-";for(var u in f.FUNCTION_KEYS){var c=f.FUNCTION_KEYS[u].toLowerCase();f[c]=parseInt(u,10)}for(var u in f.PRINTABLE_KEYS){var c=f.PRINTABLE_KEYS[u].toLowerCase();f[c]=parseInt(u,10)}d.mixin(f,f.MODIFIER_KEYS),d.mixin(f,f.PRINTABLE_KEYS),d.mixin(f,f.FUNCTION_KEYS),f.enter=f.return,f.escape=f.esc,f.del=f.delete,(function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)f.KEY_MODS[l]=o.filter(function(m){return l&f.KEY_MODS[m]}).join("-")+"-"})(),f.KEY_MODS[0]="",f.KEY_MODS[-1]="input-",d.mixin(r,f),r.default=r,r.keyCodeToString=function(o){var l=f[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,h){var d=n("./keys"),f=n("./useragent"),w=null,p=0,g;function i(){g=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return g={passive:!1},!0}})}catch{}}function a(){return g==null&&i(),g}function u(E,M,k){this.elem=E,this.type=M,this.callback=k}u.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(E,M,k,x){E.addEventListener(M,k,a()),x&&x.$toDestroy.push(new u(E,M,k))},o=r.removeListener=function(E,M,k){E.removeEventListener(M,k,a())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||f.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,M,k){var x=E&&E.ownerDocument||document;function R(I){M&&M(I),k&&k(I),o(x,"mousemove",M),o(x,"mouseup",R),o(x,"dragstart",R)}return c(x,"mousemove",M),c(x,"mouseup",R),c(x,"dragstart",R),R},r.addMouseWheelListener=function(E,M,k){c(E,"wheel",function(x){var R=.15,I=x.deltaX||0,O=x.deltaY||0;switch(x.deltaMode){case x.DOM_DELTA_PIXEL:x.wheelX=I*R,x.wheelY=O*R;break;case x.DOM_DELTA_LINE:var L=15;x.wheelX=I*L,x.wheelY=O*L;break;case x.DOM_DELTA_PAGE:var W=150;x.wheelX=I*W,x.wheelY=O*W;break}M(x)},k)},r.addMultiMouseDownListener=function(E,M,k,x,R){var I=0,O,L,W,F={2:"dblclick",3:"tripleclick",4:"quadclick"};function N($){if(r.getButton($)!==0?I=0:$.detail>1?(I++,I>4&&(I=1)):I=1,f.isIE){var _=Math.abs($.clientX-O)>5||Math.abs($.clientY-L)>5;(!W||_)&&(I=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},M[I-1]||600),I==1&&(O=$.clientX,L=$.clientY)}if($._clicks=I,k[x]("mousedown",$),I>4)I=0;else if(I>1)return k[x](F[I],$)}Array.isArray(E)||(E=[E]),E.forEach(function($){c($,"mousedown",N,R)})};function l(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)}r.getModifierString=function(E){return d.KEY_MODS[l(E)]};function m(E,M,k){var x=l(M);if(!k&&M.code&&(k=d.$codeToKeyCode[M.code]||k),!f.isMac&&w){if(M.getModifierState&&(M.getModifierState("OS")||M.getModifierState("Win"))&&(x|=8),w.altGr)if((3&x)!=3)w.altGr=0;else return;if(k===18||k===17){var R=M.location;if(k===17&&R===1)w[k]==1&&(p=M.timeStamp);else if(k===18&&x===3&&R===2){var I=M.timeStamp-p;I<50&&(w.altGr=!0)}}}if(k in d.MODIFIER_KEYS&&(k=-1),!(!x&&k===13&&M.location===3&&(E(M,x,-k),M.defaultPrevented))){if(f.isChromeOS&&x&8){if(E(M,x,k),M.defaultPrevented)return;x&=-9}return!x&&!(k in d.FUNCTION_KEYS)&&!(k in d.PRINTABLE_KEYS)?!1:E(M,x,k)}}r.addCommandKeyListener=function(E,M,k){var x=null;c(E,"keydown",function(R){w[R.keyCode]=(w[R.keyCode]||0)+1;var I=m(M,R,R.keyCode);return x=R.defaultPrevented,I},k),c(E,"keypress",function(R){x&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),x=null)},k),c(E,"keyup",function(R){w[R.keyCode]=null},k),w||(b(),c(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!f.isOldIE){var S=1;r.nextTick=function(E,M){M=M||window;var k="zero-timeout-message-"+S++,x=function(R){R.data==k&&(r.stopPropagation(R),o(M,"message",x),E())};c(M,"message",x),M.postMessage(k,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,M){return setTimeout(function k(){r.$idleBlocked?setTimeout(k,100):E()},M)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,h){var d;h.exports={lineMode:!1,pasteCancelled:function(){return d&&d>Date.now()-50?!0:d=!1},cancel:function(){d=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,h){var d=n("../lib/event"),f=n("../config").nls,w=n("../lib/useragent"),p=n("../lib/dom"),g=n("../lib/lang"),i=n("../clipboard"),a=w.isChrome<18,u=w.isIE,c=w.isChrome>63,o=400,l=n("../lib/keys"),m=l.KEY_MODS,b=w.isIOS,S=b?/\s/:/\n/,E=w.isMobile,M=(function(){function k(x,R){var I=this;this.host=R,this.text=p.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",x.insertBefore(this.text,x.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",E||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),d.addListener(this.text,"blur",function(O){I.ignoreFocusEvents||(R.onBlur(O),I.$isFocused=!1)},R),d.addListener(this.text,"focus",function(O){if(!I.ignoreFocusEvents){if(I.$isFocused=!0,w.isEdge)try{if(!document.hasFocus())return}catch{}R.onFocus(O),w.isEdge?setTimeout(I.resetSelection.bind(I)):I.resetSelection()}},R),this.$focusScroll=!1,R.on("beforeEndOperation",function(){var O=R.curOp,L=O&&O.command&&O.command.name;if(L!="insertstring"){var W=L&&(O.docChanged||O.selectionChanged);I.inComposition&&W&&(I.lastValue=I.text.value="",I.onCompositionEnd()),I.resetSelection()}}),R.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=b?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&R.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,d.addCommandKeyListener(this.text,function(O,L,W){if(!I.inComposition)return R.onCommandKey(O,L,W)},R),d.addListener(this.text,"select",this.onSelect.bind(this),R),d.addListener(this.text,"input",this.onInput.bind(this),R),d.addListener(this.text,"cut",this.onCut.bind(this),R),d.addListener(this.text,"copy",this.onCopy.bind(this),R),d.addListener(this.text,"paste",this.onPaste.bind(this),R),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&d.addListener(x,"keydown",function(O){if(!(w.isMac&&!O.metaKey||!O.ctrlKey))switch(O.keyCode){case 67:I.onCopy(O);break;case 86:I.onPaste(O);break;case 88:I.onCut(O);break}},R),this.syncComposition=g.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),d.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),R),d.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),R),d.addListener(this.text,"keyup",this.onKeyup.bind(this),R),d.addListener(this.text,"keydown",this.syncComposition.bind(this),R),d.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),R),this.closeTimeout,d.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),R),d.addListener(this.text,"mousedown",function(O){O.preventDefault(),I.onContextMenuClose()},R),d.addListener(R.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),R),d.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),R),b&&this.addIosSelectionHandler(x,R,this.text)}return k.prototype.addIosSelectionHandler=function(x,R,I){var O=this,L=null,W=!1;I.addEventListener("keydown",function(N){L&&clearTimeout(L),W=!0},!0),I.addEventListener("keyup",function(N){L=setTimeout(function(){W=!1},100)},!0);var F=function(N){if(document.activeElement===I&&!(W||O.inComposition||R.$mouseHandler.isMousePressed)&&!O.copied){var $=I.selectionStart,_=I.selectionEnd,D=null,z=0;if($==0?D=l.up:$==1?D=l.home:_>O.lastSelectionEnd&&O.lastValue[_]==`
|
173
|
+
`?D=l.end:$<O.lastSelectionStart&&O.lastValue[$-1]==" "?(D=l.left,z=m.option):$<O.lastSelectionStart||$==O.lastSelectionStart&&O.lastSelectionEnd!=O.lastSelectionStart&&$==_?D=l.left:_>O.lastSelectionEnd&&O.lastValue.slice(0,_).split(`
|
174
|
+
`).length>2?D=l.down:_>O.lastSelectionEnd&&O.lastValue[_-1]==" "?(D=l.right,z=m.option):(_>O.lastSelectionEnd||_==O.lastSelectionEnd&&O.lastSelectionEnd!=O.lastSelectionStart&&$==_)&&(D=l.right),$!==_&&(z|=m.shift),D){var U=R.onCommandKey({},z,D);if(!U&&R.commands){D=l.keyCodeToString(D);var G=R.commands.findKeyCommand(z,D);G&&R.execCommand(G)}O.lastSelectionStart=$,O.lastSelectionEnd=_,O.resetSelection("")}}};document.addEventListener("selectionchange",F),R.on("destroy",function(){document.removeEventListener("selectionchange",F)})},k.prototype.onContextMenuClose=function(){var x=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){x.tempStyle&&(x.text.style.cssText=x.tempStyle,x.tempStyle=""),x.host.renderer.$isMousePressed=!1,x.host.renderer.$keepTextAreaAtCursor&&x.host.renderer.$moveTextAreaToCursor()},0)},k.prototype.$onContextMenu=function(x){this.host.textInput.onContextMenu(x),this.onContextMenuClose()},k.prototype.onKeyup=function(x){x.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},k.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},k.prototype.onCompositionStart=function(x){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){x.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var R=this.host.getSelectionRange();R.end.row=R.start.row,R.end.column=R.start.column,this.inComposition.markerRange=R,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},k.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var x=this.text.value;this.sendText(x),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},k.prototype.onCompositionEnd=function(x){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),x&&this.onInput())},k.prototype.onCut=function(x){this.doCopy(x,!0)},k.prototype.onCopy=function(x){this.doCopy(x,!1)},k.prototype.onPaste=function(x){var R=this.handleClipboardData(x);i.pasteCancelled()||(typeof R=="string"?(R&&this.host.onPaste(R,x),w.isIE&&setTimeout(this.resetSelection),d.preventDefault(x)):(this.text.value="",this.pasted=!0))},k.prototype.doCopy=function(x,R){var I=this,O=this.host.getCopyText();if(!O)return d.preventDefault(x);this.handleClipboardData(x,O)?(b&&(this.resetSelection(O),this.copied=O,setTimeout(function(){I.copied=!1},10)),R?this.host.onCut():this.host.onCopy(),d.preventDefault(x)):(this.copied=!0,this.text.value=O,this.text.select(),setTimeout(function(){I.copied=!1,I.resetSelection(),R?I.host.onCut():I.host.onCopy()}))},k.prototype.handleClipboardData=function(x,R,I){var O=x.clipboardData||window.clipboardData;if(!(!O||a)){var L=u||I?"Text":"text/plain";try{return R?O.setData(L,R)!==!1:O.getData(L)}catch(W){if(!I)return this.handleClipboardData(W,R,!0)}}},k.prototype.onInput=function(x){if(this.inComposition)return this.onCompositionUpdate();if(x&&x.inputType){if(x.inputType=="historyUndo")return this.host.execCommand("undo");if(x.inputType=="historyRedo")return this.host.execCommand("redo")}var R=this.text.value,I=this.sendText(R,!0);(R.length>o+100||S.test(I)||E&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},k.prototype.sendText=function(x,R){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),x&&this.host.onPaste(x),this.pasted=!1,"";for(var I=this.text.selectionStart,O=this.text.selectionEnd,L=this.lastSelectionStart,W=this.lastValue.length-this.lastSelectionEnd,F=x,N=x.length-I,$=x.length-O,_=0;L>0&&this.lastValue[_]==x[_];)_++,L--;for(F=F.slice(_),_=1;W>0&&this.lastValue.length-_>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-_]==x[x.length-_];)_++,W--;N-=_-1,$-=_-1;var D=F.length-_+1;if(D<0&&(L=-D,D=0),F=F.slice(0,D),!R&&!F&&!N&&!L&&!W&&!$)return"";this.sendingText=!0;var z=!1;return w.isAndroid&&F==". "&&(F=" ",z=!0),F&&!L&&!W&&!N&&!$||this.commandMode?this.host.onTextInput(F):this.host.onTextInput(F,{extendLeft:L,extendRight:W,restoreStart:N,restoreEnd:$}),this.sendingText=!1,this.lastValue=x,this.lastSelectionStart=I,this.lastSelectionEnd=O,this.lastRestoreEnd=$,z?`
|
175
|
+
`:F},k.prototype.onSelect=function(x){var R=this;if(!this.inComposition){var I=function(O){return O.selectionStart===0&&O.selectionEnd>=R.lastValue.length&&O.value===R.lastValue&&R.lastValue&&O.selectionEnd!==R.lastSelectionEnd};this.copied?this.copied=!1:I(this.text)?(this.host.selectAll(),this.resetSelection()):E&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},k.prototype.$resetSelectionIOS=function(x){if(!(!this.$isFocused||this.copied&&!x||this.sendingText)){x||(x="");var R=`
|
176
|
+
ab`+x+`cde fg
|
177
|
+
`;R!=this.text.value&&(this.text.value=this.lastValue=R);var I=4,O=4+(x.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=I||this.lastSelectionEnd!=O)&&this.text.setSelectionRange(I,O),this.lastSelectionStart=I,this.lastSelectionEnd=O}},k.prototype.$resetSelection=function(){var x=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var R=0,I=0,O="",L=function(G,Z){for(var te=Z,he=1;he<=G-x.rowStart&&he<2*x.numberOfExtraLines+1;he++)te+=x.host.session.getLine(G-he).length+1;return te};if(this.host.session){var W=this.host.selection,F=W.getRange(),N=W.cursor.row;N===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):N===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(N<this.rowStart-1||N>this.rowEnd+1)&&(this.rowStart=N>this.numberOfExtraLines?N-this.numberOfExtraLines:0,this.rowEnd=N>this.numberOfExtraLines?N+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var $=[],_=this.rowStart;_<=this.rowEnd;_++)$.push(this.host.session.getLine(_));if(O=$.join(`
|
178
|
+
`),R=L(F.start.row,F.start.column),I=L(F.end.row,F.end.column),F.start.row<this.rowStart){var D=this.host.session.getLine(this.rowStart-1);R=F.start.row<this.rowStart-1?0:R,I+=D.length+1,O=D+`
|
179
|
+
`+O}else if(F.end.row>this.rowEnd){var z=this.host.session.getLine(this.rowEnd+1);I=F.end.row>this.rowEnd+1?z.length:F.end.column,I+=O.length+1,O=O+`
|
180
|
+
`+z}else E&&N>0&&(O=`
|
181
|
+
`+O,I+=1,R+=1);O.length>o&&(R<o&&I<o?O=O.slice(0,o):(O=`
|
182
|
+
`,R==I?R=I=0:(R=0,I=1)));var U=O+`
|
183
|
+
|
184
|
+
`;U!=this.lastValue&&(this.text.value=this.lastValue=U,this.lastSelectionStart=this.lastSelectionEnd=U.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=I||this.lastSelectionStart!=R||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(R,I),this.lastSelectionStart=R,this.lastSelectionEnd=I}catch{}this.inComposition=!1}},k.prototype.setHost=function(x){this.host=x},k.prototype.setNumberOfExtraLines=function(x){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,x<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=x},k.prototype.setAriaLabel=function(){var x="";if(this.host.$textInputAriaLabel&&(x+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var R=this.host.session.selection.cursor.row;x+=f("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",x)},k.prototype.setAriaOptions=function(x){x.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",x.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",x.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),x.role&&this.text.setAttribute("role",x.role),x.setLabel&&(this.text.setAttribute("aria-roledescription",f("text-input.aria-roledescription","editor")),this.setAriaLabel())},k.prototype.focus=function(){var x=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||c||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var R=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var I=this.text.getBoundingClientRect().top!=0}catch{return}var O=[];if(I)for(var L=this.text.parentElement;L&&L.nodeType==1;)O.push(L),L.setAttribute("ace_nocontext","true"),!L.parentElement&&L.getRootNode?L=L.getRootNode().host:L=L.parentElement;this.text.focus({preventScroll:!0}),I&&O.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){x.text.style.position="",x.text.style.top=="0px"&&(x.text.style.top=R)},0)},k.prototype.blur=function(){this.text.blur()},k.prototype.isFocused=function(){return this.$isFocused},k.prototype.setInputHandler=function(x){this.inputHandler=x},k.prototype.getInputHandler=function(){return this.inputHandler},k.prototype.getElement=function(){return this.text},k.prototype.setCommandMode=function(x){this.commandMode=x,this.text.readOnly=!1},k.prototype.setReadOnly=function(x){this.commandMode||(this.text.readOnly=x)},k.prototype.setCopyWithEmptySelection=function(x){},k.prototype.onContextMenu=function(x){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:x}),this.moveToMouse(x,!0)},k.prototype.moveToMouse=function(x,R){var I=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(R?"z-index:100000;":"")+(w.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var O=this.host.container.getBoundingClientRect(),L=p.computedStyle(this.host.container),W=O.top+(parseInt(L.borderTopWidth)||0),F=O.left+(parseInt(L.borderLeftWidth)||0),N=O.bottom-W-this.text.clientHeight-2,$=function(_){p.translate(I.text,_.clientX-F-2,Math.min(_.clientY-W-2,N))};$(x),x.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),w.isWin&&d.capture(this.host.container,$,this.onContextMenuClose.bind(this)))},k.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},k})();r.TextInput=M,r.$setUserAgentForTests=function(k,x){E=k,b=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,h){var d=n("../lib/useragent"),f=0,w=550,p=(function(){function a(u){u.$clickSelection=null;var c=u.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){u[l]=this[l]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var c=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var l=this.editor,m=u.getButton();if(m!==0){var b=l.getSelectionRange(),S=b.isEmpty();(S||m==1)&&l.selection.moveToPosition(o),m==2&&(l.textInput.onContextMenu(u.domEvent),d.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,c){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):c||o.selection.moveToPosition(u),c||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,c=this.editor,o=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)u=this.$clickSelection.end;else if(l==1)u=this.$clickSelection.start;else{var m=i(this.$clickSelection,o);o=m.cursor,u=m.anchor}c.selection.setSelectionAnchor(u.row,u.column)}c.selection.selectToPosition(o),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var c,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[u](l.row,l.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(m.start),S=this.$clickSelection.comparePoint(m.end);if(b==-1&&S<=0)c=this.$clickSelection.end,(m.end.row!=l.row||m.end.column!=l.column)&&(l=m.start);else if(S==1&&b>=0)c=this.$clickSelection.start,(m.start.row!=l.row||m.start.column!=l.column)&&(l=m.end);else if(b==-1&&S==1)l=m.end,c=m.start;else{var E=i(this.$clickSelection,l);l=E.cursor,c=E.anchor}o.selection.setSelectionAnchor(c.row,c.column)}o.selection.selectToPosition(l),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(u>f||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var c=u.getDocumentPosition(),o=this.editor,l=o.session,m=l.getBracketRange(c);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=o.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},a.prototype.onTripleClick=function(u){var c=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var l=o.getSelectionRange();l.isMultiLine()&&l.contains(c.row,c.column)?(this.$clickSelection=o.selection.getLineRange(l.start.row),this.$clickSelection.end=o.selection.getLineRange(l.end.row).end):this.$clickSelection=o.selection.getLineRange(c.row),this.select()},a.prototype.onQuadClick=function(u){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=u.domEvent.timeStamp,m=l-o.t,b=m?u.wheelX/m:o.vx,S=m?u.wheelY/m:o.vy;m<w&&(b=(b+o.vx)/2,S=(S+o.vy)/2);var E=Math.abs(b/S),M=!1;if(E>=1&&c.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(M=!0),E<=1&&c.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(M=!0),M)o.allowed=l;else if(l-o.allowed<w){var k=Math.abs(b)<=1.5*Math.abs(o.vx)&&Math.abs(S)<=1.5*Math.abs(o.vy);k?(M=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=b,o.vy=S,M)return c.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a})();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,r.DefaultHandlers=p;function g(a,u,c,o){return Math.sqrt(Math.pow(c-a,2)+Math.pow(o-u,2))}function i(a,u){if(a.start.row==a.end.row)var c=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var c=u.column-4;else var c=2*u.row-a.start.row-a.end.row;return c<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,h){r.preventParentScroll=function(d){d.stopPropagation();var f=d.currentTarget,w=f.scrollHeight>f.clientHeight;w||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,h){var d=this&&this.__extends||(function(){var l=function(m,b){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,E){S.__proto__=E}||function(S,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(S[M]=E[M])},l(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");l(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),f=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,b=m&&l[m],S=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&S>=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},w=n("./lib/dom");n("./lib/event");var p=n("./range").Range,g=n("./lib/scroll").preventParentScroll,i="ace_tooltip",a=(function(){function l(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return l.prototype.$init=function(){return this.$element=w.createElement("div"),this.$element.className=i,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},l.prototype.getElement=function(){return this.$element||this.$init()},l.prototype.setText=function(m){this.getElement().textContent=m},l.prototype.setHtml=function(m){this.getElement().innerHTML=m},l.prototype.setPosition=function(m,b){var S=this.getElement(),E=S.offsetParent&&S.offsetParent.getBoundingClientRect();S.style.left=m-(E?E.left:0)+"px",S.style.top=b-(E?E.top:0)+"px"},l.prototype.setClassName=function(m){w.addCssClass(this.getElement(),m)},l.prototype.setTheme=function(m){this.$element.className=i+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},l.prototype.show=function(m,b,S){m!=null&&this.setText(m),b!=null&&S!=null&&this.setPosition(b,S),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},l.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=i,this.isOpen=!1)},l.prototype.getHeight=function(){return this.getElement().offsetHeight},l.prototype.getWidth=function(){return this.getElement().offsetWidth},l.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},l})(),u=(function(){function l(){this.popups=[]}return l.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},l.prototype.removePopup=function(m){var b=this.popups.indexOf(m);b!==-1&&(this.popups.splice(b,1),this.updatePopups())},l.prototype.updatePopups=function(){var m,b,S,E;this.popups.sort(function(F,N){return N.priority-F.priority});var M=[];try{for(var k=f(this.popups),x=k.next();!x.done;x=k.next()){var R=x.value,I=!0;try{for(var O=(S=void 0,f(M)),L=O.next();!L.done;L=O.next()){var W=L.value;if(this.doPopupsOverlap(W,R)){I=!1;break}}}catch(F){S={error:F}}finally{try{L&&!L.done&&(E=O.return)&&E.call(O)}finally{if(S)throw S.error}}I?M.push(R):R.hide()}}catch(F){m={error:F}}finally{try{x&&!x.done&&(b=k.return)&&b.call(k)}finally{if(m)throw m.error}}},l.prototype.doPopupsOverlap=function(m,b){var S=m.getElement().getBoundingClientRect(),E=b.getElement().getBoundingClientRect();return S.left<E.right&&S.right>E.left&&S.top<E.bottom&&S.bottom>E.top},l})(),c=new u;r.popupManager=c,r.Tooltip=a;var o=(function(l){d(m,l);function m(b){b===void 0&&(b=document.body);var S=l.call(this,b)||this;S.timeout=void 0,S.lastT=0,S.idleTime=350,S.lastEvent=void 0,S.onMouseOut=S.onMouseOut.bind(S),S.onMouseMove=S.onMouseMove.bind(S),S.waitForHover=S.waitForHover.bind(S),S.hide=S.hide.bind(S);var E=S.getElement();return E.style.whiteSpace="pre-wrap",E.style.pointerEvents="auto",E.addEventListener("mouseout",S.onMouseOut),E.tabIndex=-1,E.addEventListener("blur",(function(){E.contains(document.activeElement)||this.hide()}).bind(S)),E.addEventListener("wheel",g),S}return m.prototype.addToEditor=function(b){b.on("mousemove",this.onMouseMove),b.on("mousedown",this.hide),b.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(b){b.off("mousemove",this.onMouseMove),b.off("mousedown",this.hide),b.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(b,S){this.lastEvent=b,this.lastT=Date.now();var E=S.$mouseHandler.isMousePressed;if(this.isOpen){var M=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(M.row,M.column)||E||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||E||(this.lastEvent=b,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var b=Date.now()-this.lastT;if(this.idleTime-b>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-b);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(b){var S=b.editor,E=b.getDocumentPosition(),M=S.session.getLine(E.row);if(E.column==M.length){var k=S.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),x=S.session.documentToScreenPosition(E.row,E.column);if(x.column!=k.column||x.row!=k.row)return!0}return!1},m.prototype.setDataProvider=function(b){this.$gatherData=b},m.prototype.showForRange=function(b,S,E,M){var k=10;if(!(M&&M!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var x=b.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(x.theme)),this.isOpen=!0,this.addMarker(S,b.session),this.range=p.fromPoints(S.start,S.end);var R=x.textToScreenCoordinates(S.start.row,S.start.column),I=x.scroller.getBoundingClientRect();R.pageX<I.left&&(R.pageX=I.left);var O=this.getElement();O.innerHTML="",O.appendChild(E),O.style.maxHeight="",O.style.display="block";var L=O.clientHeight,W=O.clientWidth,F=window.innerHeight-R.pageY-x.lineHeight,N=!0;R.pageY-L<0&&R.pageY<F&&(N=!1),O.style.maxHeight=(N?R.pageY:F)-k+"px",O.style.top=N?"":R.pageY+x.lineHeight+"px",O.style.bottom=N?window.innerHeight-R.pageY+"px":"",O.style.left=Math.min(R.pageX,window.innerWidth-W-k)+"px"}},m.prototype.addMarker=function(b,S){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=S,this.marker=S&&S.addMarker(b,"ace_highlight-marker","text")},m.prototype.hide=function(b){!b&&document.activeElement==this.getElement()||b&&b.target&&(b.type!="keydown"||b.ctrlKey||b.metaKey)&&this.$element.contains(b.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(b){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||b.relatedTarget.classList.contains("ace_content")||this.hide())},m})(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,h){var d=this&&this.__extends||(function(){var l=function(m,b){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,E){S.__proto__=E}||function(S,E){for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&(S[M]=E[M])},l(m,b)};return function(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");l(m,b);function S(){this.constructor=m}m.prototype=b===null?Object.create(b):(S.prototype=b.prototype,new S)}})(),f=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,b=m&&l[m],S=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&S>=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},w=n("../lib/dom"),p=n("../lib/event"),g=n("../tooltip").Tooltip,i=n("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function c(l){var m=l.editor,b=m.renderer.$gutterLayer,S=new o(m,!0);l.editor.setDefaultHandler("guttermousedown",function(I){if(!(!m.isFocused()||I.getButton()!=0)){var O=b.getRegion(I);if(O!="foldWidgets"){var L=I.getDocumentPosition().row,W=m.session.selection;if(I.getShiftKey())W.selectTo(L,0);else{if(I.domEvent.detail==2)return m.selectAll(),I.preventDefault();l.$clickSelection=m.selection.getLineRange(L)}return l.setState("selectByLines"),l.captureMouse(I),I.preventDefault()}}});var E,M;function k(){var I=M.getDocumentPosition().row,O=m.session.getLength();if(I==O){var L=m.renderer.pixelToScreenCoordinates(0,M.y).row,W=M.$pos;if(L>m.session.documentToScreenRow(W.row,W.column))return x()}if(S.showTooltip(I),!!S.isOpen)if(m.on("mousewheel",x),m.on("changeSession",x),window.addEventListener("keydown",x,!0),l.$tooltipFollowsMouse)R(M);else{var F=M.getGutterRow(),N=b.$lines.get(F);if(N){var $=N.element.querySelector(".ace_gutter_annotation"),_=$.getBoundingClientRect(),D=S.getElement().style;D.left=_.right-a+"px",D.top=_.bottom-u+"px"}else R(M)}}function x(I){I&&I.type==="keydown"&&(I.ctrlKey||I.metaKey)||I&&I.type==="mouseout"&&(!I.relatedTarget||S.getElement().contains(I.relatedTarget))||(E&&(E=clearTimeout(E)),S.isOpen&&(S.hideTooltip(),m.off("mousewheel",x),m.off("changeSession",x),window.removeEventListener("keydown",x,!0)))}function R(I){S.setPosition(I.x,I.y)}l.editor.setDefaultHandler("guttermousemove",function(I){var O=I.domEvent.target||I.domEvent.srcElement;if(w.hasCssClass(O,"ace_fold-widget")||w.hasCssClass(O,"ace_custom-widget"))return x();S.isOpen&&l.$tooltipFollowsMouse&&R(I),M=I,!E&&(E=setTimeout(function(){E=null,M&&!l.isMousePressed&&k()},50))}),p.addListener(m.renderer.$gutter,"mouseout",function(I){M=null,S.isOpen&&(E=setTimeout(function(){E=null,x(I)},50))},m)}r.GutterHandler=c;var o=(function(l){d(m,l);function m(b,S){S===void 0&&(S=!1);var E=l.call(this,b.container)||this;E.id="gt"+ ++m.$uid,E.editor=b,E.visibleTooltipRow;var M=E.getElement();return M.setAttribute("role","tooltip"),M.setAttribute("id",E.id),M.style.pointerEvents="auto",S&&(E.onMouseOut=E.onMouseOut.bind(E),M.addEventListener("mouseout",E.onMouseOut)),E}return m.prototype.onMouseOut=function(b){this.isOpen&&(!b.relatedTarget||this.getElement().contains(b.relatedTarget)||b&&b.currentTarget.contains(b.relatedTarget)||this.hideTooltip())},m.prototype.setPosition=function(b,S){var E=window.innerWidth||document.documentElement.clientWidth,M=window.innerHeight||document.documentElement.clientHeight,k=this.getWidth(),x=this.getHeight();b+=15,S+=15,b+k>E&&(b-=b+k-E),S+x>M&&(S-=20+x),g.prototype.setPosition.call(this,b,S)},Object.defineProperty(m,"annotationLabels",{get:function(){return{error:{singular:i("gutter-tooltip.aria-label.error.singular","error"),plural:i("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:i("gutter-tooltip.aria-label.security.singular","security finding"),plural:i("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:i("gutter-tooltip.aria-label.warning.singular","warning"),plural:i("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:i("gutter-tooltip.aria-label.info.singular","information message"),plural:i("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:i("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:i("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),m.prototype.showTooltip=function(b){var S,E=this.editor.renderer.$gutterLayer,M=E.$annotations[b],k;M?k={displayText:Array.from(M.displayText),type:Array.from(M.type)}:k={displayText:[],type:[]};var x=E.session.getFoldLine(b);if(x&&E.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},I={error:1,security:2,warning:3,info:4,hint:5},O,L=b+1;L<=x.end.row;L++)if(E.$annotations[L])for(var W=0;W<E.$annotations[L].text.length;W++){var F=E.$annotations[L].type[W];R[F].push(E.$annotations[L].text[W]),(!O||I[F]<I[O])&&(O=F)}if(["error","security","warning"].includes(O)){var N="".concat(m.annotationsToSummaryString(R)," in folded code.");k.displayText.push(N),k.type.push(O+"_fold")}}if(k.displayText.length===0)return this.hideTooltip();for(var $={error:[],security:[],warning:[],info:[],hint:[]},_=E.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<k.displayText.length;L++){var D=w.createElement("span"),z=w.createElement("span");(S=z.classList).add.apply(S,["ace_".concat(k.type[L]),_]),z.setAttribute("aria-label","".concat(m.annotationLabels[k.type[L].replace("_fold","")].singular)),z.setAttribute("role","img"),z.appendChild(w.createTextNode(" ")),D.appendChild(z),D.appendChild(w.createTextNode(k.displayText[L])),D.appendChild(w.createElement("br")),$[k.type[L].replace("_fold","")].push(D)}var U=this.getElement();w.removeChildren(U),$.error.forEach(function(Z){return U.appendChild(Z)}),$.security.forEach(function(Z){return U.appendChild(Z)}),$.warning.forEach(function(Z){return U.appendChild(Z)}),$.info.forEach(function(Z){return U.appendChild(Z)}),$.hint.forEach(function(Z){return U.appendChild(Z)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip"));var G=this.$findLinkedAnnotationNode(b);G&&G.setAttribute("aria-describedby",this.id),this.show(),this.visibleTooltipRow=b,this.editor._signal("showGutterTooltip",this)},m.prototype.$findLinkedAnnotationNode=function(b){var S=this.$findCellByRow(b);if(S){var E=S.element;if(E.childNodes.length>2)return E.childNodes[2]}},m.prototype.$findCellByRow=function(b){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(S){return S.row===b})},m.prototype.hideTooltip=function(){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow!=null){var b=this.$findLinkedAnnotationNode(this.visibleTooltipRow);b&&b.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this)}},m.annotationsToSummaryString=function(b){var S,E,M=[],k=["error","security","warning","info","hint"];try{for(var x=f(k),R=x.next();!R.done;R=x.next()){var I=R.value;if(b[I].length){var O=b[I].length===1?m.annotationLabels[I].singular:m.annotationLabels[I].plural;M.push("".concat(b[I].length," ").concat(O))}}}catch(L){S={error:L}}finally{try{R&&!R.done&&(E=x.return)&&E.call(x)}finally{if(S)throw S.error}}return M.join(", ")},m})(g);o.$uid=0,r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,h){var d=n("../lib/event"),f=n("../lib/useragent"),w=(function(){function p(g,i){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=i,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,i=this.editor.session.documentToScreenRow(g,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return i-a},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,i=g.getSelectionRange();if(i.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=i.contains(a.row,a.column)}return this.$inSelection},p.prototype.getButton=function(){return d.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return f.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p})();r.MouseEvent=w}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,h){var d=n("../lib/dom"),f=n("../lib/event"),w=n("../lib/useragent"),p=200,g=200,i=5;function a(c){var o=c.editor,l=d.createElement("div");l.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",l.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){c[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(c));var b=o.container,S,E,M,k,x,R,I=0,O,L,W,F,N;this.onDragStart=function(ne){if(this.cancelDrag||!b.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(ne)},0),ne.preventDefault()}x=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(l),ue.setDragImage&&ue.setDragImage(l,0,0),setTimeout(function(){o.container.removeChild(l)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),L=!0,this.setState("drag")},this.onDragEnd=function(ne){if(b.draggable=!1,L=!1,this.setState(null),!o.getReadOnly()){var le=ne.dataTransfer.dropEffect;!O&&le=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,S||z(),I++,ne.dataTransfer.dropEffect=O=he(ne),f.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return E=ne.clientX,M=ne.clientY,S||(z(),I++),G!==null&&(G=null),ne.dataTransfer.dropEffect=O=he(ne),f.preventDefault(ne)},this.onDragLeave=function(ne){if(I--,I<=0&&S)return U(),O=null,f.preventDefault(ne)},this.onDrop=function(ne){if(R){var le=ne.dataTransfer;if(L)switch(O){case"move":x.contains(R.row,R.column)?x={start:R,end:R}:x=o.moveText(x,R);break;case"copy":x=o.moveText(x,R,!0);break}else{var ue=le.getData("Text");x={start:R,end:o.session.insert(R,ue)},o.focus(),O=null}return U(),f.preventDefault(ne)}},f.addListener(b,"dragstart",this.onDragStart.bind(c),o),f.addListener(b,"dragend",this.onDragEnd.bind(c),o),f.addListener(b,"dragenter",this.onDragEnter.bind(c),o),f.addListener(b,"dragover",this.onDragOver.bind(c),o),f.addListener(b,"dragleave",this.onDragLeave.bind(c),o),f.addListener(b,"drop",this.onDrop.bind(c),o);function $(ne,le){var ue=Date.now(),ce=!le||ne.row!=le.row,ge=!le||ne.column!=le.column;if(!F||ce||ge)o.moveCursorToPosition(ne),F=ue,N={x:E,y:M};else{var Ae=u(N.x,N.y,E,M);Ae>i?F=null:ue-F>=g&&(o.renderer.scrollCursorIntoView(),F=null)}}function _(ne,le){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Ae=o.renderer.scroller.getBoundingClientRect(),Te={x:{left:E-Ae.left,right:Ae.right-E},y:{top:M-Ae.top,bottom:Ae.bottom-M}},Re=Math.min(Te.x.left,Te.x.right),Xe=Math.min(Te.y.top,Te.y.bottom),Ke={row:ne.row,column:ne.column};Re/ge<=2&&(Ke.column+=Te.x.left<Te.x.right?-3:2),Xe/ce<=1&&(Ke.row+=Te.y.top<Te.y.bottom?-1:1);var dt=ne.row!=Ke.row,rt=ne.column!=Ke.column,gt=!le||ne.row!=le.row;dt||rt&&!gt?W?ue-W>=p&&o.renderer.scrollCursorIntoView(Ke):W=ue:W=null}function D(){var ne=R;R=o.renderer.screenToTextCoordinates(E,M),$(R,ne),_(R,ne)}function z(){x=o.selection.toOrientedRange(),S=o.session.addMarker(x,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),D(),k=setInterval(D,20),I=0,f.addListener(document,"mousemove",Z)}function U(){clearInterval(k),o.session.removeMarker(S),S=null,o.selection.fromOrientedRange(x),o.isFocused()&&!L&&o.$resetCursorStyle(),x=null,R=null,I=0,W=null,F=null,f.removeListener(document,"mousemove",Z)}var G=null;function Z(){G==null&&(G=setTimeout(function(){G!=null&&S&&U()},20))}function te(ne){var le=ne.types;return!le||Array.prototype.some.call(le,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var le=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=w.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ae="none";return ce&&le.indexOf(ge)>=0?Ae="copy":ue.indexOf(ge)>=0?Ae="move":le.indexOf(ge)>=0&&(Ae="copy"),Ae}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,o=c.container;o.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var l=w.isWin?"default":"move";c.renderer.setCursorStyle(l),this.setState("dragReady")},this.onMouseDrag=function(c){var o=this.editor.container;if(w.isIE&&this.state=="dragReady"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var o=this.editor,l=c.inSelection(),m=c.getButton(),b=c.domEvent.detail||1;if(b===1&&m===0&&l){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),o.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var E=o.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function u(c,o,l,m){return Math.sqrt(Math.pow(l-c,2)+Math.pow(m-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,h){var d=n("./mouse_event").MouseEvent,f=n("../lib/event"),w=n("../lib/dom");r.addTouchListeners=function(p,g){var i="scroll",a,u,c,o,l,m,b=0,S,E=0,M=0,k=0,x,R;function I(){var $=window.navigator&&window.navigator.clipboard,_=!1,D=function(){var G=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.replaceChild(w.buildDom(_?["span",!G&&z("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],G&&z("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],G&&z("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],$&&z("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&z("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],z("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],z("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},z=function(G){return g.commands.canExecute(G,g)},U=function(G){var Z=G.target.getAttribute("action");if(Z=="more"||!_)return _=!_,D();Z=="paste"?$.readText().then(function(te){g.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&($?$.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),R.firstChild.style.display="none",_=!1,Z!="openCommandPalette"&&g.focus()};R=w.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(G){i="menu",G.stopPropagation(),G.preventDefault(),g.textInput.focus()},ontouchend:function(G){G.stopPropagation(),G.preventDefault(),U(G)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function O(){if(!g.getOption("enableMobileMenu")){R&&L();return}R||I();var $=g.selection.cursor,_=g.renderer.textToScreenCoordinates($.row,$.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,z=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();R.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=D+z-U.left+"px"),R.style.display="",R.firstChild.style.display="none",g.on("input",L)}function L($){R&&(R.style.display="none"),g.off("input",L)}function W(){l=null,clearTimeout(l);var $=g.selection.getRange(),_=$.contains(S.row,S.column);($.isEmpty()||!_)&&(g.selection.moveToPosition(S),g.selection.selectWord()),i="wait",O()}function F(){l=null,clearTimeout(l),g.selection.moveToPosition(S);var $=E>=2?g.selection.getLineRange(S.row):g.session.getBracketRange(S);$&&!$.isEmpty()?g.selection.setRange($):g.selection.selectWord(),i="wait"}f.addListener(p,"contextmenu",function($){if(x){var _=g.textInput.getElement();_.focus()}},g),f.addListener(p,"touchstart",function($){var _=$.touches;if(l||_.length>1){clearTimeout(l),l=null,c=-1,i="zoom";return}x=g.$mouseHandler.isMousePressed=!0;var D=g.renderer.layerConfig.lineHeight,z=g.renderer.layerConfig.lineHeight,U=$.timeStamp;o=U;var G=_[0],Z=G.clientX,te=G.clientY;Math.abs(a-Z)+Math.abs(u-te)>D&&(c=-1),a=$.clientX=Z,u=$.clientY=te,M=k=0;var he=new d($,g);if(S=he.getDocumentPosition(),U-c<500&&_.length==1&&!b)E++,$.preventDefault(),$.button=0,F();else{E=0;var ne=g.selection.cursor,le=g.selection.isEmpty()?ne:g.selection.anchor,ue=g.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=g.renderer.$cursorLayer.getPixelPosition(le,!0),ge=g.renderer.scroller.getBoundingClientRect(),Ae=g.renderer.layerConfig.offset,Te=g.renderer.scrollLeft,Re=function(dt,rt){return dt=dt/z,rt=rt/D-.75,dt*dt+rt*rt};if($.clientX<ge.left){i="zoom";return}var Xe=Re($.clientX-ge.left-ue.left+Te,$.clientY-ge.top-ue.top+Ae),Ke=Re($.clientX-ge.left-ce.left+Te,$.clientY-ge.top-ce.top+Ae);Xe<3.5&&Ke<3.5&&(i=Xe>Ke?"cursor":"anchor"),Ke<3.5?i="anchor":Xe<3.5?i="cursor":i="scroll",l=setTimeout(W,450)}c=U},g),f.addListener(p,"touchend",function($){x=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",b=0):l?(g.selection.moveToPosition(S),b=0,O()):i=="scroll"?(N(),L()):O(),clearTimeout(l),l=null},g),f.addListener(p,"touchmove",function($){l&&(clearTimeout(l),l=null);var _=$.touches;if(!(_.length>1||i=="zoom")){var D=_[0],z=a-D.clientX,U=u-D.clientY;if(i=="wait")if(z*z+U*U>4)i="cursor";else return $.preventDefault();a=D.clientX,u=D.clientY,$.clientX=D.clientX,$.clientY=D.clientY;var G=$.timeStamp,Z=G-o;if(o=G,i=="scroll"){var te=new d($,g);te.speed=1,te.wheelX=z,te.wheelY=U,10*Math.abs(z)<Math.abs(U)&&(z=0),10*Math.abs(U)<Math.abs(z)&&(U=0),Z!=0&&(M=z/Z,k=U/Z),g._emit("mousewheel",te),te.propagationStopped||(M=k=0)}else{var he=new d($,g),ne=he.getDocumentPosition();i=="cursor"?g.selection.moveCursorToPosition(ne):i=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),$.preventDefault()}}},g);function N(){b+=60,m=setInterval(function(){b--<=0&&(clearInterval(m),m=null),Math.abs(M)<.01&&(M=0),Math.abs(k)<.01&&(k=0),b<20&&(M=.9*M),b<20&&(k=.9*k);var $=g.session.getScrollTop();g.renderer.scrollBy(10*M,10*k),$==g.session.getScrollTop()&&(b=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,h){var d=n("../lib/event"),f=n("../lib/useragent"),w=n("./default_handlers").DefaultHandlers,p=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,i=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,u=n("../config"),c=(function(){function o(l){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=l,new w(this),new p(this),new i(this);var b=function(M){var k=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());k&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},S=l.renderer.getMouseEventTarget();d.addListener(S,"click",this.onMouseEvent.bind(this,"click"),l),d.addListener(S,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),d.addMultiMouseDownListener([S,l.renderer.scrollBarV&&l.renderer.scrollBarV.inner,l.renderer.scrollBarH&&l.renderer.scrollBarH.inner,l.textInput&&l.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",l),d.addMouseWheelListener(l.container,this.onMouseWheel.bind(this,"mousewheel"),l),a(l.container,l);var E=l.renderer.$gutter;d.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(S,"mousedown",b,l),d.addListener(E,"mousedown",b,l),f.isIE&&l.renderer.scrollBarV&&(d.addListener(l.renderer.scrollBarV.element,"mousedown",b,l),d.addListener(l.renderer.scrollBarH.element,"mousedown",b,l)),l.on("mousemove",function(M){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var k=l.renderer.screenToTextCoordinates(M.x,M.y),x=l.session.selection.getRange(),R=l.renderer;!x.isEmpty()&&x.insideStart(k.row,k.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},l)}return o.prototype.onMouseEvent=function(l,m){this.editor.session&&this.editor._emit(l,new g(m,this.editor))},o.prototype.onMouseMove=function(l,m){var b=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!b||!b.length||this.editor._emit(l,new g(m,this.editor))},o.prototype.onMouseWheel=function(l,m){var b=new g(m,this.editor);b.speed=this.$scrollSpeed*2,b.wheelX=m.wheelX,b.wheelY=m.wheelY,this.editor._emit(l,b)},o.prototype.setState=function(l){this.state=l},o.prototype.captureMouse=function(l,m){this.x=l.x,this.y=l.y,this.isMousePressed=!0;var b=this.editor,S=this.editor.renderer;S.$isMousePressed=!0;var E=this,M=!0,k=function(L){if(L){if(f.isWebKit&&!L.which&&E.releaseMouse)return E.releaseMouse();E.x=L.clientX,E.y=L.clientY,m&&m(L),E.mouseEvent=new g(L,E.editor),E.$mouseMoved=!0}},x=function(L){b.off("beforeEndOperation",O),M=!1,b.session&&R(),E[E.state+"End"]&&E[E.state+"End"](L),E.state="",E.isMousePressed=S.$isMousePressed=!1,S.$keepTextAreaAtCursor&&S.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,L&&E.onMouseEvent("mouseup",L),b.endOperation()},R=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1},I=function(){M&&(R(),d.nextFrame(I))};if(f.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){x(l)});var O=function(L){E.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};b.on("beforeEndOperation",O),b.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=k,E.releaseMouse=d.capture(this.editor.container,k,x),I()},o.prototype.cancelContextMenu=function(){var l=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",l),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(l,10),this.editor.on("nativecontextmenu",l)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o})();c.prototype.releaseMouse=null,u.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:f.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,h){var d=n("../lib/dom"),f=(function(){function w(p){p.on("click",function(g){var i=g.getDocumentPosition(),a=p.session,u=a.getFoldAt(i.row,i.column,1);u&&(g.getAccelKey()?a.removeFold(u):a.expandFold(u),g.stop());var c=g.domEvent&&g.domEvent.target;c&&d.hasCssClass(c,"ace_inline_button")&&d.hasCssClass(c,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(g){var i=p.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,u=p.session;u.foldWidgets&&u.foldWidgets[a]&&p.session.onFoldWidgetClick(a,g),p.isFocused()||p.focus(),g.stop()}}),p.on("gutterdblclick",function(g){var i=p.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,u=p.session,c=u.getParentFoldRangeData(a,!0),o=c.range||c.firstRange;if(o){a=o.start.row;var l=u.getFoldAt(a,u.getLine(a).length,1);l?u.removeFold(l):(u.addFold("...",o),p.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return w})();r.FoldHandler=f}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,h){var d=n("../lib/keys"),f=n("../lib/event"),w=(function(){function p(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return p.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},p.prototype.setKeyboardHandler=function(g){var i=this.$handlers;if(i[i.length-1]!=g){for(;i[i.length-1]&&i[i.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(i[i.length-1]);this.addKeyboardHandler(g,1)}},p.prototype.addKeyboardHandler=function(g,i){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var a=this.$handlers.indexOf(g);a!=-1&&this.$handlers.splice(a,1),i==null?this.$handlers.push(g):this.$handlers.splice(i,0,g),a==-1&&g.attach&&g.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(g){var i=this.$handlers.indexOf(g);return i==-1?!1:(this.$handlers.splice(i,1),g.detach&&g.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var g=this.$data,i=g.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(i,g)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(g,i,a,u){for(var c,o=!1,l=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,g,i,a,u),!(!(!c||!c.command)&&(c.command=="null"?o=!0:o=l.exec(c.command,this.$editor,c.args,u),o&&u&&g!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&f.stopEvent(u),o))););return!o&&g==-1&&(c={command:"insertstring"},o=l.exec("insertstring",this.$editor,i)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),o},p.prototype.onCommandKey=function(g,i,a){var u=d.keyCodeToString(a);return this.$callKeyboardHandlers(i,u,a,g)},p.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},p})();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,h){var d=0,f=0,w=!1,p=!1,g=!1,i=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,c=1,o=0,l=1,m=2,b=3,S=4,E=5,M=6,k=7,x=8,R=9,I=10,O=11,L=12,W=13,F=14,N=15,$=16,_=17,D=18,z=[D,D,D,D,D,D,D,D,D,M,E,M,x,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,E,E,E,M,x,S,S,O,O,O,S,S,S,S,S,I,R,I,R,R,m,m,m,m,m,m,m,m,m,m,R,S,S,S,S,S,S,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,S,S,S,S,S,S,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,S,S,S,S,D,D,D,D,D,D,E,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,D,R,S,O,O,O,O,S,S,S,S,o,S,S,D,S,S,O,O,m,m,S,o,S,S,S,m,o,S,S,S,S,S],U=[x,x,x,x,x,x,x,x,x,x,x,D,D,D,o,l,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,x,E,W,F,N,$,_,R,O,O,O,O,O,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,R,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,x];function G(ne,le,ue,ce){var ge=d?a:i,Ae=null,Te=null,Re=null,Xe=0,Ke=null,dt=null,rt=-1,gt=null,tn=null,Bn=[];if(!ce)for(gt=0,ce=[];gt<ue;gt++)ce[gt]=he(ne[gt]);for(f=d,w=!1,p=!1,g=!1,tn=0;tn<ue;tn++){if(Ae=Xe,Bn[tn]=Te=te(ne,ce,Bn,tn),Xe=ge[Ae][Te],Ke=Xe&240,Xe&=15,le[tn]=Re=ge[Xe][5],Ke>0)if(Ke==16){for(gt=rt;gt<tn;gt++)le[gt]=1;rt=-1}else rt=-1;if(dt=ge[Xe][6],dt)rt==-1&&(rt=tn);else if(rt>-1){for(gt=rt;gt<tn;gt++)le[gt]=Re;rt=-1}ce[tn]==E&&(le[tn]=0),f|=Re}if(g){for(gt=0;gt<ue;gt++)if(ce[gt]==M){le[gt]=d;for(var Zt=gt-1;Zt>=0&&ce[Zt]==x;Zt--)le[Zt]=d}}}function Z(ne,le,ue){if(!(f<ne)){if(ne==1&&d==c&&!p){ue.reverse();return}for(var ce=ue.length,ge=0,Ae,Te,Re,Xe;ge<ce;){if(le[ge]>=ne){for(Ae=ge+1;Ae<ce&&le[Ae]>=ne;)Ae++;for(Te=ge,Re=Ae-1;Te<Re;Te++,Re--)Xe=ue[Te],ue[Te]=ue[Re],ue[Re]=Xe;ge=Ae}ge++}}}function te(ne,le,ue,ce){var ge=le[ce],Ae,Te,Re,Xe;switch(ge){case o:case l:w=!1;case S:case b:return ge;case m:return w?b:m;case k:return w=!0,l;case x:return S;case R:return ce<1||ce+1>=le.length||(Ae=ue[ce-1])!=m&&Ae!=b||(Te=le[ce+1])!=m&&Te!=b?S:(w&&(Te=b),Te==Ae?Te:S);case I:return Ae=ce>0?ue[ce-1]:E,Ae==m&&ce+1<le.length&&le[ce+1]==m?m:S;case O:if(ce>0&&ue[ce-1]==m)return m;if(w)return S;for(Xe=ce+1,Re=le.length;Xe<Re&&le[Xe]==O;)Xe++;return Xe<Re&&le[Xe]==m?m:S;case L:for(Re=le.length,Xe=ce+1;Xe<Re&&le[Xe]==L;)Xe++;if(Xe<Re){var Ke=ne[ce],dt=Ke>=1425&&Ke<=2303||Ke==64286;if(Ae=le[Xe],dt&&(Ae==l||Ae==k))return l}return ce<1||(Ae=le[ce-1])==E?S:ue[ce-1];case E:return w=!1,p=!0,d;case M:return g=!0,S;case W:case F:case $:case _:case N:w=!1;case D:return S}}function he(ne){var le=ne.charCodeAt(0),ue=le>>8;return ue==0?le>191?o:z[le]:ue==5?/[\u0591-\u05f4]/.test(ne)?l:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?L:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?b:le==1642?O:/[\u06f0-\u06f9]/.test(ne)?m:k:ue==32&&le<=8287?U[le&255]:ue==254&&le>=65136?k:S}r.L=o,r.R=l,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,le,ue){if(ne.length<2)return{};var ce=ne.split(""),ge=new Array(ce.length),Ae=new Array(ce.length),Te=[];d=ue?c:u,G(ce,Te,ce.length,le);for(var Re=0;Re<ge.length;ge[Re]=Re,Re++);Z(2,Te,ge),Z(1,Te,ge);for(var Re=0;Re<ge.length-1;Re++)le[Re]===b?Te[Re]=r.AN:Te[Re]===l&&(le[Re]>k&&le[Re]<W||le[Re]===S||le[Re]===D)?Te[Re]=r.ON_R:Re>0&&ce[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Re])&&(Te[Re-1]=Te[Re]=r.R_H,Re++);ce[ce.length-1]===r.DOT&&(Te[ce.length-1]=r.B),ce[0]===""&&(Te[0]=r.RLE);for(var Re=0;Re<ge.length;Re++)Ae[Re]=Te[ge[Re]];return{logicalFromVisual:ge,bidiLevels:Ae}},r.hasBidiCharacters=function(ne,le){for(var ue=!1,ce=0;ce<ne.length;ce++)le[ce]=he(ne.charAt(ce)),!ue&&(le[ce]==l||le[ce]==k||le[ce]==b)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,le){for(var ue=0;ue<le.logicalFromVisual.length;ue++)if(le.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,h){var d=n("./lib/bidiutil"),f=n("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=(function(){function g(i){this.session=i,this.bidiMap={},this.currentRow=null,this.bidiUtil=d,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=w.test(i.getValue())}return g.prototype.isBidiRow=function(i,a,u){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(i){this.seenBidi?this.currentRow=null:i.action=="insert"&&w.test(i.lines.join(`
|
185
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var i=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(i=this.session.$docRowCache[u])}return i},g.prototype.getSplitIndex=function(){var i=0,a=this.session.$screenRowCache;if(a.length)for(var u,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-i>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-i-1),u===c);)c=u,i++;else i=this.currentRow;return i},g.prototype.updateRowLine=function(i,a){i===void 0&&(i=this.getDocumentRow());var u=i===this.session.getLength()-1,c=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(i),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[i];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?c:d.DOT))}else this.line+=this.showInvisibles?c:d.DOT;var l=this.session,m=0,b;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(S,E){return S===" "||l.isFullWidth(S.charCodeAt(0))?(b=S===" "?l.getScreenTabSize(E+m):2,m+=b-1,f.stringRepeat(d.DOT,b)):S}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var i=[];d.hasBidiCharacters(this.line,i)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,i,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(i){if(this.characterWidth!==i.$characterSize.width){this.fontMetrics=i;var a=this.characterWidth=i.$characterSize.width,u=i.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=u,this.charWidths[d.R_H]=u*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(i){this.showInvisibles=i,this.currentRow=null},g.prototype.setEolChar=function(i){this.EOL=i},g.prototype.setContentWidth=function(i){this.contentWidth=i},g.prototype.isRtlLine=function(i){return this.$isRtl?!0:i!=null?this.session.getLine(i).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(i,a){for(var u=i.getCursorPosition(),c=i.selection.getSelectionAnchor().row;c<=u.row;c++)!a&&i.session.getLine(c).charAt(0)===i.session.$bidiHandler.RLE?i.session.doc.removeInLine(c,0,1):a&&i.session.getLine(c).charAt(0)!==i.session.$bidiHandler.RLE&&i.session.doc.insert({column:0,row:c},i.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(i){i-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=i>a?this.session.getOverwrite()?i:i-1:a,c=d.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&i<=a&&o[c]%2!==0&&c++;for(var m=0;m<c;m++)l+=this.charWidths[o[m]];return!this.session.getOverwrite()&&i>a&&o[c]%2===0&&(l+=this.charWidths[o[c]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},g.prototype.getSelections=function(i,a){var u=this.bidiMap,c=u.bidiLevels,o,l=[],m=0,b=Math.min(i,a)-this.wrapIndent,S=Math.max(i,a)-this.wrapIndent,E=!1,M=!1,k=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,R=0;R<c.length;R++)x=u.logicalFromVisual[R],o=c[R],E=x>=b&&x<S,E&&!M?k=m:!E&&M&&l.push({left:k,width:m-k}),m+=this.charWidths[o],M=E;if(E&&R===c.length&&l.push({left:k,width:m-k}),this.isRtlDir)for(var I=0;I<l.length;I++)l[I].left+=this.rtlLineOffset;return l},g.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),c=0,o=0,l=this.bidiMap.bidiLevels,m=this.charWidths[l[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>c+m/2;){if(c+=m,o===l.length-1){m=0;break}m=this.charWidths[l[++o]]}return o>0&&l[o-1]%2!==0&&l[o]%2===0?(u<c&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?a=1+(u>c?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===l.length-1&&m===0&&l[o-1]%2===0||!this.isRtlDir&&o===0&&l[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&l[o-1]%2!==0&&m!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},g})();r.BidiHandler=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,h){var d=n("./lib/oop"),f=n("./lib/lang"),w=n("./lib/event_emitter").EventEmitter,p=n("./range").Range,g=(function(){function i(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(c){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return i.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},i.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},i.prototype.getCursor=function(){return this.lead.getPosition()},i.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},i.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},i.prototype.getSelectionLead=function(){return this.lead.getPosition()},i.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},i.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?p.fromPoints(u,u):this.isBackwards()?p.fromPoints(u,a):p.fromPoints(a,u)},i.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},i.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},i.prototype.setRange=function(a,u){var c=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(c.row,c.column,o.row,o.column)},i.prototype.$setSelection=function(a,u,c,o){if(!this.$silent){var l=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(c,o),this.$isEmpty=!p.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||l!=this.$isEmpty||m)&&this._emit("changeSelection")}},i.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},i.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},i.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},i.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},i.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},i.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},i.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},i.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},i.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},i.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},i.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},i.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},i.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},i.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},i.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},i.prototype.getWordRange=function(a,u){if(typeof u>"u"){var c=a||this.lead;a=c.row,u=c.column}return this.session.getWordRange(a,u)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},i.prototype.getLineRange=function(a,u){var c=typeof a=="number"?a:this.lead.row,o,l=this.session.getFoldLine(c);return l?(c=l.start.row,o=l.end.row):o=c,u===!0?new p(c,0,o,this.session.getLine(o).length):new p(c,0,o+1,0)},i.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},i.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},i.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},i.prototype.wouldMoveIntoSoftTab=function(a,u,c){var o=a.column,l=a.column+u;return c<0&&(o=a.column-u,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,l).split(" ").length-1==u},i.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},i.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},i.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,c=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,o.row,o.column),m=l.match(/^\s*/);m[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},i.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var c=this.session.getLine(u.row);if(u.column==c.length){var o=c.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},i.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),o=c.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,u,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=c.substring(u)),u>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var l=f.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(u-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},i.prototype.$shortWordEndIndex=function(a){var u=0,c,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(c=a[u])&&o.test(c);)u++;if(u<1){for(l.lastIndex=0;(c=a[u])&&!l.test(c);)if(l.lastIndex=0,u++,o.test(c))if(u>2){u--;break}else{for(;(c=a[u])&&o.test(c);)u++;if(u>2)break}}}return l.lastIndex=0,u},i.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,c=this.doc.getLine(a),o=c.substring(u),l=this.session.getFoldAt(a,u,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(u==c.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var b=this.$shortWordEndIndex(o);this.moveCursorTo(a,u+b)},i.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,c;if(c=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(c.start.row,c.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var l=f.stringReverse(o),m=this.$shortWordEndIndex(l);return this.moveCursorTo(a,u-m)},i.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},i.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},i.prototype.moveCursorBy=function(a,u){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var l=this.session.lineWidgets[this.lead.row];a<0?a-=l.rowsAbove||0:a>0&&(a+=l.rowCount-(l.rowsAbove||0))}var m=this.session.screenToDocumentPosition(c.row+a,c.column,o);a!==0&&u===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+u,u===0)},i.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},i.prototype.moveCursorTo=function(a,u,c){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(u))&&l.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(a,u,c){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,c)},i.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},i.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},i.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},i.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var c=this.getCursor();return p.fromPoints(u,c)}catch{return p.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},i.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var c=u.clone();return c.isBackwards=u.cursor==u.start,c});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},i.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var c=p.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},i.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},i})();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,d.implement(g.prototype,w),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,h){var d=n("./lib/report_error").reportError,f=2e3,w=(function(){function p(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var i in this.states){for(var a=this.states[i],u=[],c=0,o=this.matchMappings[i]={defaultToken:"text"},l="g",m=[],b=0;b<a.length;b++){var S=a[b];if(S.defaultToken&&(o.defaultToken=S.defaultToken),S.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),S.unicode&&l.indexOf("u")===-1&&(l+="u"),S.regex!=null){S.regex instanceof RegExp&&(S.regex=S.regex.toString().slice(1,-1));var E=S.regex,M=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(S.token)?S.token.length==1||M==1?S.token=S.token[0]:M-1!=S.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:S,groupCount:M-1}),S.token=S.token[0]):(S.tokenArray=S.token,S.token=null,S.onMatch=this.$arrayTokens):typeof S.token=="function"&&!S.onMatch&&(M>1?S.onMatch=this.$applyToken:S.onMatch=S.token),M>1&&(/\\\d/.test(S.regex)?E=S.regex.replace(/\\([0-9]+)/g,function(k,x){return"\\"+(parseInt(x,10)+c+1)}):(M=1,E=this.removeCapturingGroups(S.regex)),!S.splitRegex&&typeof S.token!="string"&&m.push(S)),o[c]=b,c+=M,u.push(E),S.onMatch||(S.onMatch=null)}}u.length||(o[0]=0,u.push("$")),m.forEach(function(k){k.splitRegex=this.createSplitterRegexp(k.regex,l)},this),this.regExps[i]=new RegExp("("+u.join(")|(")+")|($)",l)}}return p.prototype.$setMaxTokenCount=function(g){f=g|0},p.prototype.$applyToken=function(g){var i=this.splitRegex.exec(g).slice(1),a=this.token.apply(this,i);if(typeof a=="string")return[{type:a,value:g}];for(var u=[],c=0,o=a.length;c<o;c++)i[c]&&(u[u.length]={type:a[c],value:i[c]});return u},p.prototype.$arrayTokens=function(g){if(!g)return[];var i=this.splitRegex.exec(g);if(!i)return"text";for(var a=[],u=this.tokenArray,c=0,o=u.length;c<o;c++)i[c+1]&&(a[a.length]={type:u[c],value:i[c+1]});return a},p.prototype.removeCapturingGroups=function(g){var i=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return i},p.prototype.createSplitterRegexp=function(g,i){if(g.indexOf("(?=")!=-1){var a=0,u=!1,c={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,m,b,S,E){return u?u=S!="]":S?u=!0:b?(a==c.stack&&(c.end=E+1,c.stack=-1),a--):m&&(a++,m.length!=1&&(c.stack=a,c.start=E)),o}),c.end!=null&&/^\)*$/.test(g.substr(c.end))&&(g=g.substring(0,c.start)+g.substr(c.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(i||"").replace("g",""))},p.prototype.getLineTokens=function(g,i){if(i&&typeof i!="string"){var a=i.slice(0);i=a[0],i==="#tmp"&&(a.shift(),i=a.shift())}else var a=[];var u=i||"start",c=this.states[u];c||(u="start",c=this.states[u]);var o=this.matchMappings[u],l=this.regExps[u];l.lastIndex=0;for(var m,b=[],S=0,E=0,M={type:null,value:""};m=l.exec(g);){var k=o.defaultToken,x=null,R=m[0],I=l.lastIndex;if(I-R.length>S){var O=g.substring(S,I-R.length);M.type==k?M.value+=O:(M.type&&b.push(M),M={type:k,value:O})}for(var L=0;L<m.length-2;L++)if(m[L+1]!==void 0){x=c[o[L]],x.onMatch?k=x.onMatch(R,u,a,g):k=x.token,x.next&&(typeof x.next=="string"?u=x.next:u=x.next(u,a),c=this.states[u],c||(this.reportError("state doesn't exist",u),u="start",c=this.states[u]),o=this.matchMappings[u],S=I,l=this.regExps[u],l.lastIndex=I),x.consumeLineEnd&&(S=I);break}if(R){if(typeof k=="string")(!x||x.merge!==!1)&&M.type===k?M.value+=R:(M.type&&b.push(M),M={type:k,value:R});else if(k){M.type&&b.push(M),M={type:null,value:""};for(var L=0;L<k.length;L++)b.push(k[L])}}if(S==g.length)break;if(S=I,E++>f){for(E>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:g});S<g.length;)M.type&&b.push(M),M={value:g.substring(S,S+=500),type:"overflow"};u="start",a=[];break}}return M.type&&b.push(M),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:b,state:a.length?a:u}},p})();w.prototype.reportError=d,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,h){var d=n("../lib/deep_copy").deepCopy,f;f=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,i){if(!i){for(var a in g)this.$rules[a]=g[a];return}for(var a in g){for(var u=g[a],c=0;c<u.length;c++){var o=u[c];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(i)!==0&&(o.next=i+o.next),o.nextState&&o.nextState.indexOf(i)!==0&&(o.nextState=i+o.nextState))}this.$rules[i+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(g,i,a,u,c){var o=typeof g=="function"?new g().getRules():g;if(u)for(var l=0;l<u.length;l++)u[l]=i+u[l];else{u=[];for(var m in o)u.push(i+m)}if(this.addRules(o,i),a)for(var b=Array.prototype[c?"push":"unshift"],l=0;l<u.length;l++)b.apply(this.$rules[u[l]],d(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(i)},this.getEmbeds=function(){return this.$embeds};var w=function(g,i){return(g!="start"||i.length)&&i.unshift(this.nextState,g),this.nextState},p=function(g,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var g=0,i=this.$rules;function a(u){var c=i[u];c.processed=!0;for(var o=0;o<c.length;o++){var l=c[o],m=null;Array.isArray(l)&&(m=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var b=l.next||l.push;if(b&&Array.isArray(b)){var S=l.stateName;S||(S=l.token,typeof S!="string"&&(S=S[0]||""),i[S]&&(S+=g++)),i[S]=b,l.next=S,a(S)}else b=="pop"&&(l.next=p);if(l.push&&(l.nextState=l.next||l.push,l.next=w,delete l.push),l.rules)for(var E in l.rules)i[E]?i[E].push&&i[E].push.apply(i[E],l.rules[E]):i[E]=l.rules[E];var M=typeof l=="string"?l:l.include;if(M&&(M==="$self"&&(M="start"),Array.isArray(M)?m=M.map(function(x){return i[x]}):m=i[M]),m){var k=[o,1].concat(m);l.noEscape&&(k=k.filter(function(x){return!x.next})),c.splice.apply(c,k),o--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(a,this)},this.createKeywordMapper=function(g,i,a,u){var c=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var l=g[o],m=l.split(u||"|"),b=m.length;b--;){var S=m[b];this.$keywordList.push(S),a&&(S=S.toLowerCase()),c[S]=o}},this),g=null,a?function(o){return c[o.toLowerCase()]||i}:function(o){return c[o]||i}},this.getKeywords=function(){return this.$keywords}}).call(f.prototype),r.TextHighlightRules=f}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,h){var d;d=function(){this.$behaviours={}},(function(){this.add=function(f,w,p){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[f]:this.$behaviours[f]={}}this.$behaviours[f][w]=p},this.addBehaviours=function(f){for(var w in f)for(var p in f[w])this.add(w,p,f[w][p])},this.remove=function(f){this.$behaviours&&this.$behaviours[f]&&delete this.$behaviours[f]},this.inherit=function(f,w){if(typeof f=="function")var p=new f().getBehaviours(w);else var p=f.getBehaviours(w);this.addBehaviours(p)},this.getBehaviours=function(f){if(f){for(var w={},p=0;p<f.length;p++)this.$behaviours[f[p]]&&(w[f[p]]=this.$behaviours[f[p]]);return w}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,h){var d=n("./range").Range,f=(function(){function w(p,g,i){this.$session=p,this.$row=g,this.$rowTokens=p.getTokens(g);var a=p.getTokenAt(g,i);this.$tokenIndex=a?a.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 p;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-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 p=this.$rowTokens,g=this.$tokenIndex,i=p[g].start;if(i!==void 0)return i;for(i=0;g>0;)g-=1,i+=p[g].value.length;return i},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+p.value.length)},w})();r.TokenIterator=f}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,h){var d=n("../../lib/oop"),f=n("../behaviour").Behaviour,w=n("../../token_iterator").TokenIterator,p=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},c={'"':'"',"'":"'"},o=function(b){var S=-1;if(b.multiSelect&&(S=b.selection.index,u.rangeCount!=b.multiSelect.rangeCount&&(u={rangeCount:b.multiSelect.rangeCount})),u[S])return a=u[S];a=u[S]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(b,S,E,M){var k=b.end.row-b.start.row;return{text:E+S+M,selection:[0,b.start.column+1,k,b.end.column+(k?0:1)]}},m;m=function(b){b=b||{},this.add("braces","insertion",function(S,E,M,k,x){var R=M.getCursorPosition(),I=k.doc.getLine(R.row);if(x=="{"){o(M);var O=M.getSelectionRange(),L=k.doc.getTextRange(O),W=k.getTokenAt(R.row,R.column);if(L!==""&&L!=="{"&&M.getWrapBehavioursEnabled())return l(O,L,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var F=[/tag\-(?:open|name)/,/attribute\-name/];return F.some(function(G){return G.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[R.column-W.start-1]!=="$"?void 0:(m.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(M,k))return/[\]\}\)]/.test(I[R.column])||M.inMultiSelectMode||b.braces?(m.recordAutoInsert(M,k,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(M,k,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){o(M);var N=I.substring(R.column,R.column+1);if(N=="}"){var $=k.$findOpeningBracket("}",{column:R.column+1,row:R.row});if($!==null&&m.isAutoInsertedClosing(R,I,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(x==`
|
186
|
+
`||x==`\r
|
187
|
+
`){o(M);var _="";m.isMaybeInsertedClosing(R,I)&&(_=p.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var N=I.substring(R.column,R.column+1);if(N==="}"){var D=k.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var z=this.$getIndent(k.getLine(D.row))}else if(_)var z=this.$getIndent(I);else{m.clearMaybeInsertedClosing();return}var U=z+k.getTabString();return{text:`
|
188
|
+
`+U+`
|
189
|
+
`+z+_,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(S,E,M,k,x){var R=k.doc.getTextRange(x);if(!x.isMultiLine()&&R=="{"){o(M);var I=k.doc.getLine(x.start.row),O=I.substring(x.end.column,x.end.column+1);if(O=="}")return x.end.column++,x;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(S,E,M,k,x){if(x=="("){o(M);var R=M.getSelectionRange(),I=k.doc.getTextRange(R);if(I!==""&&M.getWrapBehavioursEnabled())return l(R,I,"(",")");if(m.isSaneInsertion(M,k))return m.recordAutoInsert(M,k,")"),{text:"()",selection:[1,1]}}else if(x==")"){o(M);var O=M.getCursorPosition(),L=k.doc.getLine(O.row),W=L.substring(O.column,O.column+1);if(W==")"){var F=k.$findOpeningBracket(")",{column:O.column+1,row:O.row});if(F!==null&&m.isAutoInsertedClosing(O,L,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(S,E,M,k,x){var R=k.doc.getTextRange(x);if(!x.isMultiLine()&&R=="("){o(M);var I=k.doc.getLine(x.start.row),O=I.substring(x.start.column+1,x.start.column+2);if(O==")")return x.end.column++,x}}),this.add("brackets","insertion",function(S,E,M,k,x){if(x=="["){o(M);var R=M.getSelectionRange(),I=k.doc.getTextRange(R);if(I!==""&&M.getWrapBehavioursEnabled())return l(R,I,"[","]");if(m.isSaneInsertion(M,k))return m.recordAutoInsert(M,k,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){o(M);var O=M.getCursorPosition(),L=k.doc.getLine(O.row),W=L.substring(O.column,O.column+1);if(W=="]"){var F=k.$findOpeningBracket("]",{column:O.column+1,row:O.row});if(F!==null&&m.isAutoInsertedClosing(O,L,x))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(S,E,M,k,x){var R=k.doc.getTextRange(x);if(!x.isMultiLine()&&R=="["){o(M);var I=k.doc.getLine(x.start.row),O=I.substring(x.start.column+1,x.start.column+2);if(O=="]")return x.end.column++,x}}),this.add("string_dquotes","insertion",function(S,E,M,k,x){var R=k.$mode.$quotes||c;if(x.length==1&&R[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;o(M);var I=x,O=M.getSelectionRange(),L=k.doc.getTextRange(O);if(L!==""&&(L.length!=1||!R[L])&&M.getWrapBehavioursEnabled())return l(O,L,I,I);if(!L){var W=M.getCursorPosition(),F=k.doc.getLine(W.row),N=F.substring(W.column-1,W.column),$=F.substring(W.column,W.column+1),_=k.getTokenAt(W.row,W.column),D=k.getTokenAt(W.row,W.column+1);if(N=="\\"&&_&&/escape/.test(_.type))return null;var z=_&&/string|escape/.test(_.type),U=!D||/string|escape/.test(D.type),G;if($==I)G=z!==U,G&&/string\.end/.test(D.type)&&(G=!1);else{if(z&&!U||z&&U)return null;var Z=k.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(N);Z.lastIndex=0;var he=Z.test($),ne=k.$mode.$pairQuotesAfter,le=ne&&ne[I]&&ne[I].test(N);if(!le&&te||he||$&&!/[\s;,.})\]\\]/.test($))return null;var ue=F[W.column-2];if(N==I&&(ue==I||Z.test(ue)))return null;G=!0}return{text:G?I+I:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(S,E,M,k,x){var R=k.$mode.$quotes||c,I=k.doc.getTextRange(x);if(!x.isMultiLine()&&R.hasOwnProperty(I)){o(M);var O=k.doc.getLine(x.start.row),L=O.substring(x.start.column+1,x.start.column+2);if(L==I)return x.end.column++,x}}),b.closeDocComment!==!1&&this.add("doc comment end","insertion",function(S,E,M,k,x){if(S==="doc-start"&&(x===`
|
190
|
+
`||x===`\r
|
191
|
+
`)&&M.selection.isEmpty()){var R=M.getCursorPosition();if(R.column===0)return;for(var I=k.doc.getLine(R.row),O=k.doc.getLine(R.row+1),L=k.getTokens(R.row),W=0,F=0;F<L.length;F++){W+=L[F].value.length;var N=L[F];if(W>=R.column){if(W===R.column){if(!/\.doc/.test(N.type))return;if(/\*\//.test(N.value)){var $=L[F+1];if(!$||!/\.doc/.test($.type))return}}var _=R.column-(W-N.value.length),D=N.value.indexOf("*/"),z=N.value.indexOf("/**",D>-1?D+2:0);if(z!==-1&&_>z&&_<z+3||D!==-1&&z!==-1&&_>=D&&_<=z||!/\.doc/.test(N.type))return;break}}var U=this.$getIndent(I);if(/\s*\*/.test(O))return/^\s*\*/.test(I)?{text:x+U+"* ",selection:[1,2+U.length,1,2+U.length]}:{text:x+U+" * ",selection:[1,3+U.length,1,3+U.length]};if(/\/\*\*/.test(I.substring(0,R.column)))return{text:x+U+" * "+x+" "+U+"*/",selection:[1,4+U.length,1,4+U.length]}}})},m.isSaneInsertion=function(b,S){var E=b.getCursorPosition(),M=new w(S,E.row,E.column);if(!this.$matchTokenType(M.getCurrentToken()||"text",g)){if(/[)}\]]/.test(b.session.getLine(E.row)[E.column]))return!0;var k=new w(S,E.row,E.column+1);if(!this.$matchTokenType(k.getCurrentToken()||"text",g))return!1}return M.stepForward(),M.getCurrentTokenRow()!==E.row||this.$matchTokenType(M.getCurrentToken()||"text",i)},m.$matchTokenType=function(b,S){return S.indexOf(b.type||b)>-1},m.recordAutoInsert=function(b,S,E){var M=b.getCursorPosition(),k=S.doc.getLine(M.row);this.isAutoInsertedClosing(M,k,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=M.row,a.autoInsertedLineEnd=E+k.substr(M.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(b,S,E){var M=b.getCursorPosition(),k=S.doc.getLine(M.row);this.isMaybeInsertedClosing(M,k)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=M.row,a.maybeInsertedLineStart=k.substr(0,M.column)+E,a.maybeInsertedLineEnd=k.substr(M.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(b,S,E){return a.autoInsertedBrackets>0&&b.row===a.autoInsertedRow&&E===a.autoInsertedLineEnd[0]&&S.substr(b.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(b,S){return a.maybeInsertedBrackets>0&&b.row===a.maybeInsertedRow&&S.substr(b.column)===a.maybeInsertedLineEnd&&S.substr(0,b.column)==a.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},d.inherits(m,f),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,h){for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],f=0,w=[],p=0;p<d.length;p+=2)w.push(f+=d[p]),d[p+1]&&w.push(45,f+=d[p+1]);r.wordChars=String.fromCharCode.apply(null,w)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,h){var d=n("../config"),f=n("../tokenizer").Tokenizer,w=n("./text_highlight_rules").TextHighlightRules,p=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),i=n("../lib/lang"),a=n("../token_iterator").TokenIterator,u=n("../range").Range,c;c=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new p,this.tokenRe=new RegExp("^["+g.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new f(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,m,b){var S=l.doc,E=!0,M=!0,k=1/0,x=l.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var I=this.lineCommentStart.map(i.escapeRegExp).join("|"),O=this.lineCommentStart[0];else var I=i.escapeRegExp(this.lineCommentStart),O=this.lineCommentStart;I=new RegExp("^(\\s*)(?:"+I+") ?"),R=l.getUseSoftTabs();var L=function(G,Z){var te=G.match(I);if(te){var he=te[1].length,ne=te[0].length;!$(G,he,ne)&&te[0][ne-1]==" "&&ne--,S.removeInLine(Z,he,ne)}},W=O+" ",F=function(G,Z){(!E||/\S/.test(G))&&($(G,k,k)?S.insertInLine({row:Z,column:k},W):S.insertInLine({row:Z,column:k},O))},N=function(G,Z){return I.test(G)},$=function(G,Z,te){for(var he=0;Z--&&G.charAt(Z)==" ";)he++;if(he%x!=0)return!1;for(var he=0;G.charAt(te++)==" ";)he++;return x>2?he%x!=x-1:he%x==0}}else{if(!this.blockComment)return!1;var O=this.blockComment.start,_=this.blockComment.end,I=new RegExp("^(\\s*)(?:"+i.escapeRegExp(O)+")"),D=new RegExp("(?:"+i.escapeRegExp(_)+")\\s*$"),F=function(le,ue){N(le,ue)||(!E||/\S/.test(le))&&(S.insertInLine({row:ue,column:le.length},_),S.insertInLine({row:ue,column:k},O))},L=function(le,ue){var ce;(ce=le.match(D))&&S.removeInLine(ue,le.length-ce[0].length,le.length),(ce=le.match(I))&&S.removeInLine(ue,ce[1].length,ce[0].length)},N=function(le,ue){if(I.test(le))return!0;for(var ce=l.getTokens(ue),ge=0;ge<ce.length;ge++)if(ce[ge].type==="comment")return!0}}function z(G){for(var Z=m;Z<=b;Z++)G(S.getLine(Z),Z)}var U=1/0;z(function(G,Z){var te=G.search(/\S/);te!==-1?(te<k&&(k=te),M&&!N(G,Z)&&(M=!1)):U>G.length&&(U=G.length)}),k==1/0&&(k=U,E=!1,M=!1),R&&k%x!=0&&(k=Math.floor(k/x)*x),z(M?L:F)},this.toggleBlockComment=function(o,l,m,b){var S=this.blockComment;if(S){!S.start&&S[0]&&(S=S[0]);var E=new a(l,b.row,b.column),M=E.getCurrentToken();l.selection;var k=l.selection.toOrientedRange(),x,R;if(M&&/comment/.test(M.type)){for(var I,O;M&&/comment/.test(M.type);){var L=M.value.indexOf(S.start);if(L!=-1){var W=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+L;I=new u(W,F,W,F+S.start.length);break}M=E.stepBackward()}for(var E=new a(l,b.row,b.column),M=E.getCurrentToken();M&&/comment/.test(M.type);){var L=M.value.indexOf(S.end);if(L!=-1){var W=E.getCurrentTokenRow(),F=E.getCurrentTokenColumn()+L;O=new u(W,F,W,F+S.end.length);break}M=E.stepForward()}O&&l.remove(O),I&&(l.remove(I),x=I.start.row,R=-S.start.length)}else R=S.start.length,x=m.start.row,l.insert(m.end,S.end),l.insert(m.start,S.start);k.start.row==x&&(k.start.column+=R),k.end.row==x&&(k.end.column+=R),l.selection.fromOrientedRange(k)}},this.getNextLineIndent=function(o,l,m){return this.$getIndent(l)},this.checkOutdent=function(o,l,m){return!1},this.autoOutdent=function(o,l,m){},this.$getIndent=function(o){return o.match(/^\s*/)[0]},this.createWorker=function(o){return null},this.createModeDelegates=function(o){this.$embeds=[],this.$modes={};for(var l in o)if(o[l]){var m=o[l],b=m.prototype.$id,S=d.$modes[b];S||(d.$modes[b]=S=new m),d.$modes[l]||(d.$modes[l]=S),this.$embeds.push(l),this.$modes[l]=S}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],M=function(R){(function(I){var O=E[R],L=I[O];I[E[R]]=function(){return this.$delegator(O,arguments,L)}})(k)},k=this,l=0;l<E.length;l++)M(l)},this.$delegator=function(o,l,m){var b=l[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var S=b[2][b[2].length-1],E=this.$modes[S];if(E)return E[o].apply(E,[b[1]].concat([].slice.call(l,1)))}b=b[0]||"start"}for(var M=0;M<this.$embeds.length;M++)if(this.$modes[this.$embeds[M]]){var k=b.split(this.$embeds[M]);if(!k[0]&&k[1]){l[0]=k[1];var E=this.$modes[this.$embeds[M]];return E[o].apply(E,l)}}var x=m.apply(this,l);return m?x:void 0},this.transformAction=function(o,l,m,b,S){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var M in E)if(E[M][l]){var k=E[M][l].apply(this,arguments);if(k)return k}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,m=[];for(var b in l)for(var S=l[b],E=0,M=S.length;E<M;E++)if(typeof S[E].token=="string")/keyword|support|storage/.test(S[E].token)&&m.push(S[E].regex);else if(typeof S[E].token=="object"){for(var k=0,x=S[E].token.length;k<x;k++)if(/keyword|support|storage/.test(S[E].token[k])){var b=S[E].regex.match(/\(.+?\)/g)[k];m.push(b.substr(1,b.length-2))}}this.completionKeywords=m}return o?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(o,l,m,b){var S=this.$keywordList||this.$createKeywordList();return S.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,h){var d=n("./lib/dom"),f=(function(){function w(p){this.session=p,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(p){var g;return this.lineWidgets?g=this.lineWidgets[p]&&this.lineWidgets[p].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[p]?1+g:this.$wrapData[p].length+1+g},w.prototype.$getWidgetScreenLength=function(){var p=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(p+=g.rowCount)}),p},w.prototype.$onChangeEditor=function(p){this.attach(p.editor)},w.prototype.attach=function(p){p&&p.widgetManager&&p.widgetManager!=this&&p.widgetManager.detach(),this.editor!=p&&(this.detach(),this.editor=p,p&&(p.widgetManager=this,p.renderer.on("beforeRender",this.measureWidgets),p.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(p){var g=this.editor;if(g){this.editor=null,g.widgetManager=null,g.renderer.off("beforeRender",this.measureWidgets),g.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},w.prototype.updateOnFold=function(p,g){var i=g.lineWidgets;if(!(!i||!p.action)){for(var a=p.data,u=a.start.row,c=a.end.row,o=p.action=="add",l=u+1;l<c;l++)i[l]&&(i[l].hidden=o);i[c]&&(o?i[u]?i[c].hidden=o:i[u]=i[c]:(i[u]==i[c]&&(i[u]=void 0),i[c].hidden=o))}},w.prototype.updateOnChange=function(p){var g=this.session.lineWidgets;if(g){var i=p.start.row,a=p.end.row-i;if(a!==0)if(p.action=="remove"){var u=g.splice(i+1,a);!g[i]&&u[u.length-1]&&(g[i]=u.pop()),u.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var c=new Array(a);g[i]&&g[i].column!=null&&p.start.column>g[i].column&&i++,c.unshift(i,0),g.splice.apply(g,c),this.$updateRows()}}},w.prototype.$updateRows=function(){var p=this.session.lineWidgets;if(p){var g=!0;p.forEach(function(i,a){if(i)for(g=!1,i.row=a;i.$oldWidget;)i.$oldWidget.row=a,i=i.$oldWidget}),g&&(this.session.lineWidgets=null)}},w.prototype.$registerLineWidget=function(p){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[p.row];return g&&(p.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[p.row]=p,p},w.prototype.addLineWidget=function(p){if(this.$registerLineWidget(p),p.session=this.session,!this.editor)return p;var g=this.editor.renderer;p.html&&!p.el&&(p.el=d.createElement("div"),p.el.innerHTML=p.html),p.text&&!p.el&&(p.el=d.createElement("div"),p.el.textContent=p.text),p.el&&(d.addCssClass(p.el,"ace_lineWidgetContainer"),p.className&&d.addCssClass(p.el,p.className),p.el.style.position="absolute",p.el.style.zIndex="5",g.container.appendChild(p.el),p._inDocument=!0,p.coverGutter||(p.el.style.zIndex="3"),p.pixelHeight==null&&(p.pixelHeight=p.el.offsetHeight)),p.rowCount==null&&(p.rowCount=p.pixelHeight/g.layerConfig.lineHeight);var i=this.session.getFoldAt(p.row,0);if(p.$fold=i,i){var a=this.session.lineWidgets;p.row==i.end.row&&!a[i.start.row]?a[i.start.row]=p:p.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(p),p},w.prototype.removeLineWidget=function(p){if(p._inDocument=!1,p.session=null,p.el&&p.el.parentNode&&p.el.parentNode.removeChild(p.el),p.editor&&p.editor.destroy)try{p.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[p.row];if(g==p)this.session.lineWidgets[p.row]=p.$oldWidget,p.$oldWidget&&this.onWidgetChanged(p.$oldWidget);else for(;g;){if(g.$oldWidget==p){g.$oldWidget=p.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:p.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(p){for(var g=this.session.lineWidgets,i=g&&g[p],a=[];i;)a.push(i),i=i.$oldWidget;return a},w.prototype.onWidgetChanged=function(p){this.session._changedWidgets.push(p),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(p,g){var i=this.session._changedWidgets,a=g.layerConfig;if(!(!i||!i.length)){for(var u=1/0,c=0;c<i.length;c++){var o=i[c];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,g.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/a.characterWidth));var l=o.h/a.lineHeight;o.coverLine&&(l-=this.session.getRowLineCount(o.row),l<0&&(l=0)),o.rowCount!=l&&(o.rowCount=l,o.row<u&&(u=o.row))}}u!=1/0&&(this.session._emit("changeFold",{data:{start:{row:u}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(p,g){var i=g.layerConfig,a=this.session.lineWidgets;if(a){for(var u=Math.min(this.firstRow,i.firstRow),c=Math.max(this.lastRow,i.lastRow,a.length);u>0&&!a[u];)u--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,g.$cursorLayer.config=i;for(var o=u;o<=c;o++){var l=a[o];if(!(!l||!l.el)){if(l.hidden){l.el.style.top=-100-(l.pixelHeight||0)+"px";continue}l._inDocument||(l._inDocument=!0,g.container.appendChild(l.el));var m=g.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;l.coverLine||(m+=i.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=m-i.offset+"px";var b=l.coverGutter?0:g.gutterWidth;l.fixedWidth||(b-=g.scrollLeft),l.el.style.left=b+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=i.width+2*i.padding+"px"),l.fixedWidth?l.el.style.right=g.scrollBar.getWidth()+"px":l.el.style.right=""}}}},w})();r.LineWidgets=f}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,h){r.applyDelta=function(d,f,w){var p=f.start.row,g=f.start.column,i=d[p]||"";switch(f.action){case"insert":var a=f.lines;if(a.length===1)d[p]=i.substring(0,g)+f.lines[0]+i.substring(g);else{var u=[p,1].concat(f.lines);d.splice.apply(d,u),d[p]=i.substring(0,g)+d[p],d[p+f.lines.length-1]+=i.substring(g)}break;case"remove":var c=f.end.column,o=f.end.row;p===o?d[p]=i.substring(0,g)+i.substring(c):d.splice(p,o-p+1,i.substring(0,g)+d[o].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,h){var d=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,w=(function(){function i(a,u,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof u!="number"?this.setPosition(u.row,u.column):this.setPosition(u,c)}return i.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},i.prototype.getDocument=function(){return this.document},i.prototype.onChange=function(a){if(!(a.start.row==a.end.row&&a.start.row!=this.row)&&!(a.start.row>this.row)){var u=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(u.row,u.column,!0)}},i.prototype.setPosition=function(a,u,c){var o;if(c?o={row:a,column:u}:o=this.$clipPositionToDocument(a,u),!(this.row==o.row&&this.column==o.column)){var l={row:this.row,column:this.column};this.row=o.row,this.column=o.column,this._signal("change",{old:l,value:o})}},i.prototype.detach=function(){this.document.off("change",this.$onChange)},i.prototype.attach=function(a){this.document=a||this.document,this.document.on("change",this.$onChange)},i.prototype.$clipPositionToDocument=function(a,u){var c={};return a>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,u))),u<0&&(c.column=0),c},i})();w.prototype.$insertRight=!1,d.implement(w.prototype,f);function p(i,a,u){var c=u?i.column<=a.column:i.column<a.column;return i.row<a.row||i.row==a.row&&c}function g(i,a,u){var c=i.action=="insert",o=(c?1:-1)*(i.end.row-i.start.row),l=(c?1:-1)*(i.end.column-i.start.column),m=i.start,b=c?m:i.end;return p(a,m,u)?{row:a.row,column:a.column}:p(b,a,!u)?{row:a.row+o,column:a.column+(a.row==b.row?l:0)}:{row:m.row,column:m.column}}r.Anchor=w}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,h){var d=n("./lib/oop"),f=n("./apply_delta").applyDelta,w=n("./lib/event_emitter").EventEmitter,p=n("./range").Range,g=n("./anchor").Anchor,i=(function(){function a(u){this.$lines=[""],u.length===0?this.$lines=[""]:Array.isArray(u)?this.insertMergedLines({row:0,column:0},u):this.insert({row:0,column:0},u)}return a.prototype.setValue=function(u){var c=this.getLength()-1;this.remove(new p(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},u||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(u,c){return new g(this,u,c)},a.prototype.$detectNewLine=function(u){var c=u.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
192
|
+
`,this._signal("changeNewLineMode")},a.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
193
|
+
`;case"unix":return`
|
194
|
+
`;default:return this.$autoNewLine||`
|
195
|
+
`}},a.prototype.setNewLineMode=function(u){this.$newLineMode!==u&&(this.$newLineMode=u,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(u){return u==`\r
|
196
|
+
`||u=="\r"||u==`
|
197
|
+
`},a.prototype.getLine=function(u){return this.$lines[u]||""},a.prototype.getLines=function(u,c){return this.$lines.slice(u,c+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(u){return this.getLinesForRange(u).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(u){var c;if(u.start.row===u.end.row)c=[this.getLine(u.start.row).substring(u.start.column,u.end.column)];else{c=this.getLines(u.start.row,u.end.row),c[0]=(c[0]||"").substring(u.start.column);var o=c.length-1;u.end.row-u.start.row==o&&(c[o]=c[o].substring(0,u.end.column))}return c},a.prototype.insertLines=function(u,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(u,c)},a.prototype.removeLines=function(u,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(u,c)},a.prototype.insertNewLine=function(u){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(u,["",""])},a.prototype.insert=function(u,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(u,this.$split(c))},a.prototype.insertInLine=function(u,c){var o=this.clippedPos(u.row,u.column),l=this.pos(u.row,u.column+c.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(u,c){var o=this.getLength();u===void 0?u=o:u<0?u=0:u>=o&&(u=o-1,c=void 0);var l=this.getLine(u);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:u,column:c}},a.prototype.clonePos=function(u){return{row:u.row,column:u.column}},a.prototype.pos=function(u,c){return{row:u,column:c}},a.prototype.$clipPosition=function(u){var c=this.getLength();return u.row>=c?(u.row=Math.max(0,c-1),u.column=this.getLine(c-1).length):(u.row=Math.max(0,u.row),u.column=Math.min(Math.max(u.column,0),this.getLine(u.row).length)),u},a.prototype.insertFullLines=function(u,c){u=Math.min(Math.max(u,0),this.getLength());var o=0;u<this.getLength()?(c=c.concat([""]),o=0):(c=[""].concat(c),u--,o=this.$lines[u].length),this.insertMergedLines({row:u,column:o},c)},a.prototype.insertMergedLines=function(u,c){var o=this.clippedPos(u.row,u.column),l={row:o.row+c.length-1,column:(c.length==1?o.column:0)+c[c.length-1].length};return this.applyDelta({start:o,end:l,action:"insert",lines:c}),this.clonePos(l)},a.prototype.remove=function(u){var c=this.clippedPos(u.start.row,u.start.column),o=this.clippedPos(u.end.row,u.end.column);return this.applyDelta({start:c,end:o,action:"remove",lines:this.getLinesForRange({start:c,end:o})}),this.clonePos(c)},a.prototype.removeInLine=function(u,c,o){var l=this.clippedPos(u,c),m=this.clippedPos(u,o);return this.applyDelta({start:l,end:m,action:"remove",lines:this.getLinesForRange({start:l,end:m})},!0),this.clonePos(l)},a.prototype.removeFullLines=function(u,c){u=Math.min(Math.max(0,u),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var o=c==this.getLength()-1&&u>0,l=c<this.getLength()-1,m=o?u-1:u,b=o?this.getLine(m).length:0,S=l?c+1:c,E=l?0:this.getLine(S).length,M=new p(m,b,S,E),k=this.$lines.slice(u,c+1);return this.applyDelta({start:M.start,end:M.end,action:"remove",lines:this.getLinesForRange(M)}),k},a.prototype.removeNewLine=function(u){u<this.getLength()-1&&u>=0&&this.applyDelta({start:this.pos(u,this.getLine(u).length),end:this.pos(u+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(u,c){if(u instanceof p||(u=p.fromPoints(u.start,u.end)),c.length===0&&u.isEmpty())return u.start;if(c==this.getTextRange(u))return u.end;this.remove(u);var o;return c?o=this.insert(u.start,c):o=u.start,o},a.prototype.applyDeltas=function(u){for(var c=0;c<u.length;c++)this.applyDelta(u[c])},a.prototype.revertDeltas=function(u){for(var c=u.length-1;c>=0;c--)this.revertDelta(u[c])},a.prototype.applyDelta=function(u,c){var o=u.action=="insert";(o?u.lines.length<=1&&!u.lines[0]:!p.comparePoints(u.start,u.end))||(o&&u.lines.length>2e4?this.$splitAndapplyLargeDelta(u,2e4):(f(this.$lines,u,c),this._signal("change",u)))},a.prototype.$safeApplyDelta=function(u){var c=this.$lines.length;(u.action=="remove"&&u.start.row<c&&u.end.row<c||u.action=="insert"&&u.start.row<=c)&&this.applyDelta(u)},a.prototype.$splitAndapplyLargeDelta=function(u,c){for(var o=u.lines,l=o.length-c+1,m=u.start.row,b=u.start.column,S=0,E=0;S<l;S=E){E+=c-1;var M=o.slice(S,E);M.push(""),this.applyDelta({start:this.pos(m+S,b),end:this.pos(m+E,b=0),action:u.action,lines:M},!0)}u.lines=o.slice(S),u.start.row=m+S,u.start.column=b,this.applyDelta(u,!0)},a.prototype.revertDelta=function(u){this.$safeApplyDelta({start:this.clonePos(u.start),end:this.clonePos(u.end),action:u.action=="insert"?"remove":"insert",lines:u.lines.slice()})},a.prototype.indexToPosition=function(u,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=c||0,b=o.length;m<b;m++)if(u-=o[m].length+l,u<0)return{row:m,column:u+o[m].length+l};return{row:b-1,column:u+o[b-1].length+l}},a.prototype.positionToIndex=function(u,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=0,b=Math.min(u.row,o.length),S=c||0;S<b;++S)m+=o[S].length+l;return m+u.column},a.prototype.$split=function(u){return u.split(/\r\n|\r|\n/)},a})();i.prototype.$autoNewLine="",i.prototype.$newLineMode="auto",d.implement(i.prototype,w),r.Document=i}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,h){var d=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,w=(function(){function p(g,i){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=g;var a=this;this.$worker=function(){if(a.running){for(var u=new Date,c=a.currentLine,o=-1,l=a.doc,m=c;a.lines[c];)c++;var b=l.getLength(),S=0;for(a.running=!1;c<b;){a.$tokenizeRow(c),o=c;do c++;while(a.lines[c]);if(S++,S%5===0&&new Date-u>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,o==-1&&(o=c),m<=o&&a.fireUpdateEvent(m,o)}}}return p.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},p.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},p.prototype.fireUpdateEvent=function(g,i){var a={first:g,last:i};this._signal("update",{data:a})},p.prototype.start=function(g){this.currentLine=Math.min(g||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)},p.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},p.prototype.$updateOnChange=function(g){var i=g.start.row,a=g.end.row-i;if(a===0)this.lines[i]=null;else if(g.action=="remove")this.lines.splice(i,a+1,null),this.states.splice(i,a+1,null);else{var u=Array(a+1);u.unshift(i,1),this.lines.splice.apply(this.lines,u),this.states.splice.apply(this.states,u)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},p.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},p.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},p.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},p.prototype.$tokenizeRow=function(g){var i=this.doc.getLine(g),a=this.states[g-1],u=this.tokenizer.getLineTokens(i,a,g);return this.states[g]+""!=u.state+""?(this.states[g]=u.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=u.tokens},p.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},p})();d.implement(w.prototype,f),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,h){var d=n("./lib/lang"),f=n("./range").Range,w=(function(){function p(g,i,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=i,this.type=a,this.docLen=0}return p.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},p.prototype.update=function(g,i,a,u){if(this.regExp){for(var c=u.firstRow,o=u.lastRow,l={},m=a.$editor&&a.$editor.$search,b=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),S=c;S<=o;S++){var E=this.cache[S];if(E==null||a.getValue().length!=this.docLen){if(b){E=[];var M=m.$multiLineForward(a,this.regExp,S,o);if(M){var k=M.endRow<=o?M.endRow-1:o;k>S&&(S=k),E.push(new f(M.startRow,M.startCol,M.endRow,M.endCol))}E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES))}else E=d.getMatchOffsets(a.getLine(S),this.regExp),E.length>this.MAX_RANGES&&(E=E.slice(0,this.MAX_RANGES)),E=E.map(function(O){return new f(S,O.offset,S,O.offset+O.length)});this.cache[S]=E.length?E:""}if(E.length!==0)for(var x=E.length;x--;){var R=E[x].toScreenRange(a),I=R.toString();l[I]||(l[I]=!0,i.drawSingleLineMarker(g,R,this.clazz,u))}}this.docLen=a.getValue().length}},p})();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,h){var d=(function(){function k(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return k.prototype.addSession=function(x){this.$session=x},k.prototype.add=function(x,R,I){if(!this.$fromUndo&&x!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var O=this.$undoStack.length;O>this.$undoDepth-1&&this.$undoStack.splice(0,O-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),x.id=this.$rev=++this.$maxRev}(x.action=="remove"||x.action=="insert")&&(this.$lastDelta=x),this.lastDeltas.push(x)}},k.prototype.addSelection=function(x,R){this.selections.push({value:x,rev:R||this.$rev})},k.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},k.prototype.markIgnored=function(x,R){R==null&&(R=this.$rev+1);for(var I=this.$undoStack,O=I.length;O--;){var L=I[O][0];if(L.id<=x)break;L.id<R&&(L.ignore=!0)}this.lastDeltas=null},k.prototype.getSelection=function(x,R){for(var I=this.selections,O=I.length;O--;){var L=I[O];if(L.rev<x)return R&&(L=I[O+1]),L}},k.prototype.getRevision=function(){return this.$rev},k.prototype.getDeltas=function(x,R){R==null&&(R=this.$rev+1);for(var I=this.$undoStack,O=null,L=0,W=I.length;W--;){var F=I[W][0];if(F.id<R&&!O&&(O=W+1),F.id<=x){L=W+1;break}}return I.slice(L,O)},k.prototype.getChangedRanges=function(x,R){R==null&&(R=this.$rev+1)},k.prototype.getChangedLines=function(x,R){R==null&&(R=this.$rev+1)},k.prototype.undo=function(x,R){this.lastDeltas=null;var I=this.$undoStack;if(f(I,I.length)){x||(x=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var O=I.pop(),L=null;return O&&(L=x.undoChanges(O,R),this.$redoStack.push(O),this.$syncRev()),this.$fromUndo=!1,L}},k.prototype.redo=function(x,R){if(this.lastDeltas=null,x||(x=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var I=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);M(this.$redoStack,I),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(W){W[0].id=++this.$maxRev},this)}var O=this.$redoStack.pop(),L=null;return O&&(L=x.redoChanges(O,R),this.$undoStack.push(O),this.$syncRev()),this.$fromUndo=!1,L},k.prototype.$syncRev=function(){var x=this.$undoStack,R=x[x.length-1],I=R&&R[0].id||0;this.$redoStackBaseRev=I,this.$rev=I},k.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},k.prototype.canUndo=function(){return this.$undoStack.length>0},k.prototype.canRedo=function(){return this.$redoStack.length>0},k.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},k.prototype.isAtBookmark=function(){return this.$rev===this.mark},k.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},k.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},k.prototype.$prettyPrint=function(x){return x?a(x):a(this.$undoStack)+`
|
198
|
+
---
|
199
|
+
`+a(this.$redoStack)},k})();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function f(k,x){for(var R=x;R--;){var I=k[R];if(I&&!I[0].ignore){for(;R<x-1;){var O=o(k[R],k[R+1]);k[R]=O[0],k[R+1]=O[1],R++}return!0}}}var w=n("./range").Range,p=w.comparePoints;w.comparePoints;function g(k){return{row:k.row,column:k.column}}function i(k){return{start:g(k.start),end:g(k.end),action:k.action,lines:k.lines.slice()}}function a(k){if(k=k||this,Array.isArray(k))return k.map(a).join(`
|
200
|
+
`);var x="";return k.action?(x=k.action=="insert"?"+":"-",x+="["+k.lines+"]"):k.value&&(Array.isArray(k.value)?x=k.value.map(u).join(`
|
201
|
+
`):x=u(k.value)),k.start&&(x+=u(k)),(k.id||k.rev)&&(x+=" ("+(k.id||k.rev)+")"),x}function u(k){return k.start.row+":"+k.start.column+"=>"+k.end.row+":"+k.end.column}function c(k,x){var R=k.action=="insert",I=x.action=="insert";if(R&&I)if(p(x.start,k.end)>=0)m(x,k,-1);else if(p(x.start,k.start)<=0)m(k,x,1);else return null;else if(R&&!I)if(p(x.start,k.end)>=0)m(x,k,-1);else if(p(x.end,k.start)<=0)m(k,x,-1);else return null;else if(!R&&I)if(p(x.start,k.start)>=0)m(x,k,1);else if(p(x.start,k.start)<=0)m(k,x,1);else return null;else if(!R&&!I)if(p(x.start,k.start)>=0)m(x,k,1);else if(p(x.end,k.start)<=0)m(k,x,-1);else return null;return[x,k]}function o(k,x){for(var R=k.length;R--;)for(var I=0;I<x.length;I++)if(!c(k[R],x[I])){for(;R<k.length;){for(;I--;)c(x[I],k[R]);I=x.length,R++}return[k,x]}return k.selectionBefore=x.selectionBefore=k.selectionAfter=x.selectionAfter=null,[x,k]}function l(k,x){var R=k.action=="insert",I=x.action=="insert";if(R&&I)p(k.start,x.start)<0?m(x,k,1):m(k,x,1);else if(R&&!I)p(k.start,x.end)>=0?m(k,x,-1):(p(k.start,x.start)<=0||m(k,w.fromPoints(x.start,k.start),-1),m(x,k,1));else if(!R&&I)p(x.start,k.end)>=0?m(x,k,-1):(p(x.start,k.start)<=0||m(x,w.fromPoints(k.start,x.start),-1),m(k,x,1));else if(!R&&!I)if(p(x.start,k.end)>=0)m(x,k,-1);else if(p(x.end,k.start)<=0)m(k,x,-1);else{var O,L;return p(k.start,x.start)<0&&(O=k,k=S(k,x.start)),p(k.end,x.end)>0&&(L=S(k,x.end)),b(x.end,k.start,k.end,-1),L&&!O&&(k.lines=L.lines,k.start=L.start,k.end=L.end,L=k),[x,O,L].filter(Boolean)}return[x,k]}function m(k,x,R){b(k.start,x.start,x.end,R),b(k.end,x.start,x.end,R)}function b(k,x,R,I){k.row==(I==1?x:R).row&&(k.column+=I*(R.column-x.column)),k.row+=I*(R.row-x.row)}function S(k,x){var R=k.lines,I=k.end;k.end=g(x);var O=k.end.row-k.start.row,L=R.splice(O,R.length),W=O?x.column:x.column-k.start.column;R.push(L[0].substring(0,W)),L[0]=L[0].substr(W);var F={start:g(x),end:I,lines:L,action:k.action};return F}function E(k,x){x=i(x);for(var R=k.length;R--;){for(var I=k[R],O=0;O<I.length;O++){var L=I[O],W=l(L,x);x=W[0],W.length!=2&&(W[2]?(I.splice(O+1,1,W[1],W[2]),O++):W[1]||(I.splice(O,1),O--))}I.length||k.splice(R,1)}return k}function M(k,x){for(var R=0;R<x.length;R++)for(var I=x[R],O=0;O<I.length;O++)E(k,I[O])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,h){var d=n("../range").Range,f=(function(){function w(p,g){this.foldData=p,Array.isArray(g)?this.folds=g:g=this.folds=[g];var i=g[g.length-1];this.range=new d(g[0].start.row,g[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}return w.prototype.shiftRow=function(p){this.start.row+=p,this.end.row+=p,this.folds.forEach(function(g){g.start.row+=p,g.end.row+=p})},w.prototype.addFold=function(p){if(p.sameRow){if(p.start.row<this.startRow||p.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(p),this.folds.sort(function(g,i){return-g.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(p.start.row,p.start.column)>0?(this.end.row=p.end.row,this.end.column=p.end.column):this.range.compareStart(p.end.row,p.end.column)<0&&(this.start.row=p.start.row,this.start.column=p.start.column)}else if(p.start.row==this.end.row)this.folds.push(p),this.end.row=p.end.row,this.end.column=p.end.column;else if(p.end.row==this.start.row)this.folds.unshift(p),this.start.row=p.start.row,this.start.column=p.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");p.foldLine=this},w.prototype.containsRow=function(p){return p>=this.start.row&&p<=this.end.row},w.prototype.walk=function(p,g,i){var a=0,u=this.folds,c,o,l,m=!0;g==null&&(g=this.end.row,i=this.end.column);for(var b=0;b<u.length;b++){if(c=u[b],o=c.range.compareStart(g,i),o==-1){p(null,g,i,a,m);return}if(l=p(null,c.start.row,c.start.column,a,m),l=!l&&p(c.placeholder,c.start.row,c.start.column,a),l||o===0)return;m=!c.sameRow,a=c.end.column}p(null,g,i,a,m)},w.prototype.getNextFoldTo=function(p,g){for(var i,a,u=0;u<this.folds.length;u++){if(i=this.folds[u],a=i.range.compareEnd(p,g),a==-1)return{fold:i,kind:"after"};if(a===0)return{fold:i,kind:"inside"}}return null},w.prototype.addRemoveChars=function(p,g,i){var a=this.getNextFoldTo(p,g),u,c;if(a){if(u=a.fold,a.kind=="inside"&&u.start.column!=g&&u.start.row!=p)window.console&&window.console.log(p,g,u);else if(u.start.row==p){c=this.folds;var o=c.indexOf(u);for(o===0&&(this.start.column+=i),o;o<c.length;o++){if(u=c[o],u.start.column+=i,!u.sameRow)return;u.end.column+=i}this.end.column+=i}}},w.prototype.split=function(p,g){var i=this.getNextFoldTo(p,g);if(!i||i.kind=="inside")return null;var a=i.fold,u=this.folds,c=this.foldData,o=u.indexOf(a),l=u[o-1];this.end.row=l.end.row,this.end.column=l.end.column,u=u.splice(o,u.length-o);var m=new w(c,u);return c.splice(c.indexOf(this)+1,0,m),m},w.prototype.merge=function(p){for(var g=p.folds,i=0;i<g.length;i++)this.addFold(g[i]);var a=this.foldData;a.splice(a.indexOf(p),1)},w.prototype.toString=function(){var p=[this.range.toString()+": ["];return this.folds.forEach(function(g){p.push(" "+g.toString())}),p.push("]"),p.join(`
|
202
|
+
`)},w.prototype.idxToPosition=function(p){for(var g=0,i=0;i<this.folds.length;i++){var a=this.folds[i];if(p-=a.start.column-g,p<0)return{row:a.start.row,column:a.start.column+p};if(p-=a.placeholder.length,p<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+p}},w})();r.FoldLine=f}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,h){var d=n("./range").Range,f=d.comparePoints,w=(function(){function p(){this.ranges=[],this.$bias=1}return p.prototype.pointIndex=function(g,i,a){for(var u=this.ranges,c=a||0;c<u.length;c++){var o=u[c],l=f(g,o.end);if(!(l>0)){var m=f(g,o.start);return l===0?i&&m!==0?-c-2:c:m>0||m===0&&!i?c:-c-1}}return-c-1},p.prototype.add=function(g){var i=!g.isEmpty(),a=this.pointIndex(g.start,i);a<0&&(a=-a-1);var u=this.pointIndex(g.end,i,a);return u<0?u=-u-1:u++,this.ranges.splice(a,u-a,g)},p.prototype.addList=function(g){for(var i=[],a=g.length;a--;)i.push.apply(i,this.add(g[a]));return i},p.prototype.substractPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges.splice(i,1)},p.prototype.merge=function(){var g=[],i=this.ranges;i=i.sort(function(l,m){return f(l.start,m.start)});for(var a=i[0],u,c=1;c<i.length;c++){u=a,a=i[c];var o=f(u.end,a.start);o<0||o==0&&!u.isEmpty()&&!a.isEmpty()||(f(u.end,a.end)<0&&(u.end.row=a.end.row,u.end.column=a.end.column),i.splice(c,1),g.push(a),a=u,c--)}return this.ranges=i,g},p.prototype.contains=function(g,i){return this.pointIndex({row:g,column:i})>=0},p.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},p.prototype.rangeAtPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges[i]},p.prototype.clipRows=function(g,i){var a=this.ranges;if(a[0].start.row>i||a[a.length-1].start.row<g)return[];var u=this.pointIndex({row:g,column:0});u<0&&(u=-u-1);var c=this.pointIndex({row:i,column:0},u);c<0&&(c=-c-1);for(var o=[],l=u;l<c;l++)o.push(a[l]);return o},p.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},p.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},p.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},p.prototype.$onChange=function(g){for(var i=g.start,a=g.end,u=i.row,c=a.row,o=this.ranges,l=0,m=o.length;l<m;l++){var b=o[l];if(b.end.row>=u)break}if(g.action=="insert")for(var S=c-u,E=-i.column+a.column;l<m;l++){var b=o[l];if(b.start.row>u)break;if(b.start.row==u&&b.start.column>=i.column&&(b.start.column==i.column&&this.$bias<=0||(b.start.column+=E,b.start.row+=S)),b.end.row==u&&b.end.column>=i.column){if(b.end.column==i.column&&this.$bias<0)continue;b.end.column==i.column&&E>0&&l<m-1&&b.end.column>b.start.column&&b.end.column==o[l+1].start.column&&(b.end.column-=E),b.end.column+=E,b.end.row+=S}}else for(var S=u-c,E=i.column-a.column;l<m;l++){var b=o[l];if(b.start.row>c)break;b.end.row<c&&(u<b.end.row||u==b.end.row&&i.column<b.end.column)?(b.end.row=u,b.end.column=i.column):b.end.row==c?b.end.column<=a.column?(S||b.end.column>i.column)&&(b.end.column=i.column,b.end.row=i.row):(b.end.column+=E,b.end.row+=S):b.end.row>c&&(b.end.row+=S),b.start.row<c&&(u<b.start.row||u==b.start.row&&i.column<b.start.column)?(b.start.row=u,b.start.column=i.column):b.start.row==c?b.start.column<=a.column?(S||b.start.column>i.column)&&(b.start.column=i.column,b.start.row=i.row):(b.start.column+=E,b.start.row+=S):b.start.row>c&&(b.start.row+=S)}if(S!=0&&l<m)for(;l<m;l++){var b=o[l];b.start.row+=S,b.end.row+=S}},p})();w.prototype.comparePoints=f,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,h){var d=this&&this.__extends||(function(){var u=function(c,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(l[b]=m[b])},u(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),f=n("../range_list").RangeList,w=(function(u){d(c,u);function c(o,l){var m=u.call(this)||this;return m.foldLine=null,m.placeholder=l,m.range=o,m.start=o.start,m.end=o.end,m.sameRow=o.start.row==o.end.row,m.subFolds=m.ranges=[],m}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(o){this.foldLine=o,this.subFolds.forEach(function(l){l.setFoldLine(o)})},c.prototype.clone=function(){var o=this.range.clone(),l=new c(o,this.placeholder);return this.subFolds.forEach(function(m){l.subFolds.push(m.clone())}),l.collapseChildren=this.collapseChildren,l},c.prototype.addSubFold=function(o){if(!this.range.isEqual(o)){g(o,this.start);for(var l=o.start.row,m=o.start.column,b=0,S=-1;b<this.subFolds.length&&(S=this.subFolds[b].range.compare(l,m),S==1);b++);var E=this.subFolds[b],M=0;if(S==0){if(E.range.containsRange(o))return E.addSubFold(o);M=1}for(var l=o.range.end.row,m=o.range.end.column,k=b,S=-1;k<this.subFolds.length&&(S=this.subFolds[k].range.compare(l,m),S==1);k++);S==0&&k++;for(var x=this.subFolds.splice(b,k-b,o),R=S==0?x.length-1:x.length,I=M;I<R;I++)o.addSubFold(x[I]);return o.setFoldLine(this.foldLine),o}},c.prototype.restoreRange=function(o){return a(o,this.start)},c})(f);function p(u,c){u.row-=c.row,u.row==0&&(u.column-=c.column)}function g(u,c){p(u.start,c),p(u.end,c)}function i(u,c){u.row==0&&(u.column+=c.column),u.row+=c.row}function a(u,c){i(u.start,c),i(u.end,c)}r.Fold=w}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,h){var d=n("../range").Range,f=n("./fold_line").FoldLine,w=n("./fold").Fold,p=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(a,u,c){var o=this.getFoldLine(a);if(!o)return null;for(var l=o.folds,m=0;m<l.length;m++){var b=l[m].range;if(b.contains(a,u)){if(c==1&&b.isEnd(a,u)&&!b.isEmpty()||c==-1&&b.isStart(a,u)&&!b.isEmpty())continue;return l[m]}}},this.getFoldsInRange=function(a){var u=a.start,c=a.end,o=this.$foldData,l=[];u.column+=1,c.column-=1;for(var m=0;m<o.length;m++){var b=o[m].range.compareRange(a);if(b!=2){if(b==-2)break;for(var S=o[m].folds,E=0;E<S.length;E++){var M=S[E];if(b=M.range.compareRange(a),b==-2)break;if(b!=2){if(b==42)break;l.push(M)}}}}return u.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var u=[];a.forEach(function(o){u=u.concat(this.getFoldsInRange(o))},this)}else var u=this.getFoldsInRange(a);return u},this.getAllFolds=function(){for(var a=[],u=this.$foldData,c=0;c<u.length;c++)for(var o=0;o<u[c].folds.length;o++)a.push(u[c].folds[o]);return a},this.getFoldStringAt=function(a,u,c,o){if(o=o||this.getFoldLine(a),!o)return null;for(var l={end:{column:0}},m,b,S=0;S<o.folds.length;S++){b=o.folds[S];var E=b.range.compareEnd(a,u);if(E==-1){m=this.getLine(b.start.row).substring(l.end.column,b.start.column);break}else if(E===0)return null;l=b}return m||(m=this.getLine(b.start.row).substring(l.end.column)),c==-1?m.substring(0,u-l.end.column):c==1?m.substring(u-l.end.column):m},this.getFoldLine=function(a,u){var c=this.$foldData,o=0;for(u&&(o=c.indexOf(u)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.start.row<=a&&l.end.row>=a)return l;if(l.end.row>a)return null}return null},this.getNextFoldLine=function(a,u){var c=this.$foldData,o=0;for(u&&(o=c.indexOf(u)),o==-1&&(o=0),o;o<c.length;o++){var l=c[o];if(l.end.row>=a)return l}return null},this.getFoldedRowCount=function(a,u){for(var c=this.$foldData,o=u-a+1,l=0;l<c.length;l++){var m=c[l],b=m.end.row,S=m.start.row;if(b>=u){S<u&&(S>=a?o-=u-S:o=0);break}else b>=a&&(S>=a?o-=b-S:o-=b-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(u,c){return u.start.row-c.start.row}),a},this.addFold=function(a,u){var c=this.$foldData,o=!1,l;a instanceof w?l=a:(l=new w(u,a),l.collapseChildren=u.collapseChildren),this.$clipRangeToDocument(l.range);var m=l.start.row,b=l.start.column,S=l.end.row,E=l.end.column,M=this.getFoldAt(m,b,1),k=this.getFoldAt(S,E,-1);if(M&&k==M)return M.addSubFold(l);M&&!M.range.isStart(m,b)&&this.removeFold(M),k&&!k.range.isEnd(S,E)&&this.removeFold(k);var x=this.getFoldsInRange(l.range);x.length>0&&(this.removeFolds(x),l.collapseChildren||x.forEach(function(L){l.addSubFold(L)}));for(var R=0;R<c.length;R++){var I=c[R];if(S==I.start.row){I.addFold(l),o=!0;break}else if(m==I.end.row){if(I.addFold(l),o=!0,!l.sameRow){var O=c[R+1];if(O&&O.start.row==S){I.merge(O);break}}break}else if(S<=I.start.row)break}return o||(I=this.$addFoldLine(new f(this.$foldData,l))),this.$useWrapMode?this.$updateWrapData(I.start.row,I.start.row):this.$updateRowLengthCache(I.start.row,I.start.row),this.$modified=!0,this._signal("changeFold",{data:l,action:"add"}),l},this.addFolds=function(a){a.forEach(function(u){this.addFold(u)},this)},this.removeFold=function(a){var u=a.foldLine,c=u.start.row,o=u.end.row,l=this.$foldData,m=u.folds;if(m.length==1)l.splice(l.indexOf(u),1);else if(u.range.isEnd(a.end.row,a.end.column))m.pop(),u.end.row=m[m.length-1].end.row,u.end.column=m[m.length-1].end.column;else if(u.range.isStart(a.start.row,a.start.column))m.shift(),u.start.row=m[0].start.row,u.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var b=u.split(a.start.row,a.start.column);m=b.folds,m.shift(),b.start.row=m[0].start.row,b.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,o):this.$updateRowLengthCache(c,o)),this.$modified=!0,this._signal("changeFold",{data:a,action:"remove"})},this.removeFolds=function(a){for(var u=[],c=0;c<a.length;c++)u.push(a[c]);u.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(u){a.restoreRange(u),this.addFold(u)},this),a.collapseChildren>0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(u){this.expandFold(u)},this)},this.unfold=function(a,u){var c,o;if(a==null)c=new d(0,0,this.getLength(),0),u==null&&(u=!0);else if(typeof a=="number")c=new d(a,0,a,this.getLine(a).length);else if("row"in a)c=d.fromPoints(a,a);else{if(Array.isArray(a))return o=[],a.forEach(function(m){o=o.concat(this.unfold(m))},this),o;c=a}o=this.getFoldsInRangeList(c);for(var l=o;o.length==1&&d.comparePoints(o[0].start,c.start)<0&&d.comparePoints(o[0].end,c.end)>0;)this.expandFolds(o),o=this.getFoldsInRangeList(c);if(u!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(a,u){return!!this.getFoldLine(a,u)},this.getRowFoldEnd=function(a,u){var c=this.getFoldLine(a,u);return c?c.end.row:a},this.getRowFoldStart=function(a,u){var c=this.getFoldLine(a,u);return c?c.start.row:a},this.getFoldDisplayLine=function(a,u,c,o,l){o==null&&(o=a.start.row),l==null&&(l=0),u==null&&(u=a.end.row),c==null&&(c=this.getLine(u).length);var m=this.doc,b="";return a.walk(function(S,E,M,k){if(!(E<o)){if(E==o){if(M<l)return;k=Math.max(l,k)}S!=null?b+=S:b+=m.getLine(E).substring(k,M)}},u,c),b},this.getDisplayLine=function(a,u,c,o){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,u,c,o);var m;return m=this.doc.getLine(a),m.substring(o||0,u||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(u){var c=u.folds.map(function(o){return o.clone()});return new f(a,c)}),a},this.toggleFold=function(a){var u=this.selection,c=u.getRange(),o,l;if(c.isEmpty()){var m=c.start;if(o=this.getFoldAt(m.row,m.column),o){this.expandFold(o);return}else if(a){var b=this.getFoldLine(m.row);b&&this.expandFolds(b.folds);return}else(l=this.findMatchingBracket(m))?c.comparePoint(l)==1?c.end=l:(c.start=l,c.start.column++,c.end.column--):(l=this.findMatchingBracket({row:m.row,column:m.column+1}))?(c.comparePoint(l)==1?c.end=l:c.start=l,c.start.column++):c=this.getCommentFoldRange(m.row,m.column)||c}else{var S=this.getFoldsInRange(c);if(a&&S.length){this.expandFolds(S);return}else S.length==1&&(o=S[0])}if(o||(o=this.getFoldAt(c.start.row,c.start.column)),o&&o.range.toString()==c.toString()){this.expandFold(o);return}var E="...";if(!c.isMultiLine()){if(E=this.getTextRange(c),E.length<4)return;E=E.trim().substring(0,2)+".."}this.addFold(E,c)},this.getCommentFoldRange=function(a,u,c){var o=new p(this,a,u),l=o.getCurrentToken(),m=l&&l.type;if(l&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var b=new RegExp(m),S=new d;if(c!=1){do l=o.stepBackward();while(l&&b.test(l.type));l=o.stepForward()}S.start.row=o.getCurrentTokenRow(),S.start.column=o.getCurrentTokenColumn()+l.value.length,o=new p(this,a,u);var E=this.getState(o.$row);if(c!=-1){var M=-1;do if(l=o.stepForward(),M==-1){var k=this.getState(o.$row);E.toString()!==k.toString()&&(M=o.$row)}else if(o.$row>M)break;while(l&&b.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return S.end.row=o.getCurrentTokenRow(),S.end.column=o.getCurrentTokenColumn(),S.start.row==S.end.row&&S.start.column>S.end.column?void 0:S}},this.foldAll=function(a,u,c,o){c==null&&(c=1e5);var l=this.foldWidgets;if(l){u=u||this.getLength(),a=a||0;for(var m=a;m<u;m++)if(l[m]==null&&(l[m]=this.getFoldWidget(m)),l[m]=="start"&&!(o&&!o(m))){var b=this.getFoldWidgetRange(m);b&&b.isMultiLine()&&b.end.row<=u&&b.start.row>=a&&(m=b.end.row,b.collapseChildren=c,this.addFold("...",b))}}},this.foldToLevel=function(a){for(this.foldAll();a-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var a=this;this.foldAll(null,null,null,function(u){for(var c=a.getTokens(u),o=0;o<c.length;o++){var l=c[o];if(!(l.type=="text"&&/^\s+$/.test(l.value)))return!!/comment/.test(l.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,a=="manual"&&this.unfold();var u=this.$foldMode;this.$setFolding(null),this.$setFolding(u)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!a||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(a,u){var c=this.foldWidgets;if(!c||u&&c[a])return{};for(var o=a-1,l;o>=0;){var m=c[o];if(m==null&&(m=c[o]=this.getFoldWidget(o)),m=="start"){var b=this.getFoldWidgetRange(o);if(l||(l=b),b&&b.end.row>=a)break}o--}return{range:o!==-1&&b,firstRange:l}},this.onFoldWidgetClick=function(a,u){u instanceof g&&(u=u.domEvent);var c={children:u.shiftKey,all:u.ctrlKey||u.metaKey,siblings:u.altKey},o=this.$toggleFoldWidget(a,c);if(!o){var l=u.target||u.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,u){if(this.getFoldWidget){var c=this.getFoldWidget(a),o=this.getLine(a),l=c==="end"?-1:1,m=this.getFoldAt(a,l===-1?0:o.length,l);if(m)return u.children||u.all?this.removeFold(m):this.expandFold(m),m;var b=this.getFoldWidgetRange(a,!0);if(b&&!b.isMultiLine()&&(m=this.getFoldAt(b.start.row,b.start.column,1),m&&b.isEqual(m.range)))return this.removeFold(m),m;if(u.siblings){var S=this.getParentFoldRangeData(a);if(S.range)var E=S.range.start.row+1,M=S.range.end.row;this.foldAll(E,M,u.all?1e4:0)}else u.children?(M=b?b.end.row:this.getLength(),this.foldAll(a+1,M,u.all?1e4:0)):b&&(u.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(a){var u=this.selection.getCursor().row;u=this.getRowFoldStart(u);var c=this.$toggleFoldWidget(u,{});if(!c){var o=this.getParentFoldRangeData(u,!0);if(c=o.range||o.firstRange,c){u=c.start.row;var l=this.getFoldAt(u,this.getLine(u).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var u=a.start.row,c=a.end.row-u;if(c===0)this.foldWidgets[u]=null;else if(a.action=="remove")this.foldWidgets.splice(u,c+1,null);else{var o=Array(c+1);o.unshift(u,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var u=a.data;u.first!=u.last&&this.foldWidgets.length>u.first&&this.foldWidgets.splice(u.first,this.foldWidgets.length)}}r.Folding=i}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,h){var d=n("../token_iterator").TokenIterator,f=n("../range").Range;function w(){this.findMatchingBracket=function(p,g){if(p.column==0)return null;var i=g||this.getLine(p.row).charAt(p.column-1);if(i=="")return null;var a=i.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],p):this.$findOpeningBracket(a[2],p):null},this.getBracketRange=function(p){var g=this.getLine(p.row),i=!0,a,u=g.charAt(p.column-1),c=u&&u.match(/([\(\[\{])|([\)\]\}])/);if(c||(u=g.charAt(p.column),p={row:p.row,column:p.column+1},c=u&&u.match(/([\(\[\{])|([\)\]\}])/),i=!1),!c)return null;if(c[1]){var o=this.$findClosingBracket(c[1],p);if(!o)return null;a=f.fromPoints(p,o),i||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(c[2],p);if(!o)return null;a=f.fromPoints(o,p),i||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(p,g){var i=this.getLine(p.row),a=/([\(\[\{])|([\)\]\}])/,u=!g&&i.charAt(p.column-1),c=u&&u.match(a);if(c||(u=(g===void 0||g)&&i.charAt(p.column),p={row:p.row,column:p.column+1},c=u&&u.match(a)),!c)return null;var o=new f(p.row,p.column-1,p.row,p.column),l=c[1]?this.$findClosingBracket(c[1],p):this.$findOpeningBracket(c[2],p);if(!l)return[o];var m=new f(l.row,l.column,l.row,l.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(p,g,i){var a=this.$brackets[p],u=1,c=new d(this,g.row,g.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var l=g.column-c.getCurrentTokenColumn()-2,m=o.value;;){for(;l>=0;){var b=m.charAt(l);if(b==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else b==p&&(u+=1);l-=1}do o=c.stepBackward();while(o&&!i.test(o.type));if(o==null)break;m=o.value,l=m.length-1}return null}},this.$findClosingBracket=function(p,g,i){var a=this.$brackets[p],u=1,c=new d(this,g.row,g.column),o=c.getCurrentToken();if(o||(o=c.stepForward()),!!o){i||(i=new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var l=g.column-c.getCurrentTokenColumn();;){for(var m=o.value,b=m.length;l<b;){var S=m.charAt(l);if(S==a){if(u-=1,u==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else S==p&&(u+=1);l+=1}do o=c.stepForward();while(o&&!i.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(p){var g=new d(this,p.row,p.column),i=this.$findTagName(g);if(i){var a=g.stepBackward();return a.value==="<"?this.$findClosingTag(g,i):this.$findOpeningTag(g,i)}},this.$findTagName=function(p){var g=p.getCurrentToken(),i=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=p.stepBackward():g=p.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(i=!0));while(g&&!i);return g},this.$findClosingTag=function(p,g){var i,a=g.value,u=g.value,c=0,o=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);g=p.stepForward();var l=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length),m=!1;do{if(i=g,i.type.indexOf("tag-close")!==-1&&!m){var b=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);m=!0}if(g=p.stepForward(),g){if(g.value===">"&&!m){var b=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,u===a){if(i.value==="<")c++;else if(i.value==="</"&&(c--,c<0)){p.stepBackward();var S=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2);g=p.stepForward();var E=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),g&&g.value===">")var M=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);else return}}}else if(u===a&&g.value==="/>"&&(c--,c<0))var S=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+2),E=S,M=E,b=new f(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(g&&c>=0);if(o&&b&&S&&M&&l&&E)return{openTag:new f(o.start.row,o.start.column,b.end.row,b.end.column),closeTag:new f(S.start.row,S.start.column,M.end.row,M.end.column),openTagName:l,closeTagName:E}},this.$findOpeningTag=function(p,g){var i=p.getCurrentToken(),a=g.value,u=0,c=p.getCurrentTokenRow(),o=p.getCurrentTokenColumn(),l=o+2,m=new f(c,o,c,l);p.stepForward();var b=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=p.stepForward()),!(!g||g.value!==">")){var S=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);p.stepBackward(),p.stepBackward();do if(g=i,c=p.getCurrentTokenRow(),o=p.getCurrentTokenColumn(),l=o+g.value.length,i=p.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(i.value==="<"){if(u++,u>0){var E=new f(c,o,c,l),M=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1);do g=p.stepForward();while(g&&g.value!==">");var k=new f(p.getCurrentTokenRow(),p.getCurrentTokenColumn(),p.getCurrentTokenRow(),p.getCurrentTokenColumn()+1)}}else i.value==="</"&&u--}else if(g.value==="/>"){for(var x=0,R=i;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){u--;break}else if(R.value==="<")break;R=p.stepBackward(),x++}for(var I=0;I<x;I++)p.stepForward()}}while(i&&u<=0);if(M&&k&&m&&S&&E&&b)return{openTag:new f(M.start.row,M.start.column,k.end.row,k.end.column),closeTag:new f(m.start.row,m.start.column,S.end.row,S.end.column),openTagName:E,closeTagName:b}}}}r.BracketMatch=w}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,h){var d=n("./lib/oop"),f=n("./lib/lang"),w=n("./bidihandler").BidiHandler,p=n("./config"),g=n("./lib/event_emitter").EventEmitter,i=n("./selection").Selection,a=n("./mode/text").Mode,u=n("./range").Range,c=n("./line_widgets").LineWidgets,o=n("./document").Document,l=n("./background_tokenizer").BackgroundTokenizer,m=n("./search_highlight").SearchHighlight,b=n("./undomanager").UndoManager,S=(function(){function F(N,$){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++F.$uid,this.$foldData.toString=function(){return this.join(`
|
203
|
+
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new l(new a().getTokenizer(),this);var _=this;this.bgTokenizer.on("update",function(D){_._signal("tokenizerUpdate",D)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof N!="object"||!N.getLine)&&(N=new o(N)),this.setDocument(N),this.selection=new i(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new w(this),p.resetOptions(this),this.setMode($),p._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return F.prototype.$initOperationListeners=function(){var N=this;this.curOp=null,this.on("change",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.docChanged=!0},!0),this.on("changeSelection",function(){N.curOp||(N.startOperation(),N.curOp.selectionBefore=N.$lastSel),N.curOp.selectionChanged=!0},!0),this.$operationResetTimer=f.delayedCall(this.endOperation.bind(this,!0))},F.prototype.startOperation=function(N){if(this.curOp){if(!N||this.curOp.command)return;this.prevOp=this.curOp}N||(N={}),this.$operationResetTimer.schedule(),this.curOp={command:N.command||{},args:N.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",N)},F.prototype.endOperation=function(N){if(this.curOp){if(N&&N.returnValue===!1){this.curOp=null,this._signal("endOperation",N);return}if(N==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var $=this.selection.toJSON();this.curOp.selectionAfter=$,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection($),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",N)}},F.prototype.setDocument=function(N){this.doc&&this.doc.off("change",this.$onChange),this.doc=N,N.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},F.prototype.getDocument=function(){return this.doc},Object.defineProperty(F.prototype,"widgetManager",{get:function(){var N=new c(this);return this.widgetManager=N,this.$editor&&N.attach(this.$editor),N},set:function(N){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:N})},enumerable:!1,configurable:!0}),F.prototype.$resetRowCache=function(N){if(!N){this.$docRowCache=[],this.$screenRowCache=[];return}var $=this.$docRowCache.length,_=this.$getRowCacheIndex(this.$docRowCache,N)+1;$>_&&(this.$docRowCache.splice(_,$),this.$screenRowCache.splice(_,$))},F.prototype.$getRowCacheIndex=function(N,$){for(var _=0,D=N.length-1;_<=D;){var z=_+D>>1,U=N[z];if($>U)_=z+1;else if($<U)D=z-1;else return z}return _-1},F.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},F.prototype.onChangeFold=function(N){var $=N.data;this.$resetRowCache($.start.row)},F.prototype.onChange=function(N){this.$modified=!0,this.$bidiHandler.onChange(N),this.$resetRowCache(N.start.row);var $=this.$updateInternalDataOnChange(N);!this.$fromUndo&&this.$undoManager&&($&&$.length&&(this.$undoManager.add({action:"removeFolds",folds:$},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(N,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(N),this._signal("change",N)},F.prototype.onSelectionChange=function(){this._signal("changeSelection")},F.prototype.setValue=function(N){this.doc.setValue(N),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},F.fromJSON=function(N){typeof N=="string"&&(N=JSON.parse(N));var $=new b;$.$undoStack=N.history.undo,$.$redoStack=N.history.redo,$.mark=N.history.mark,$.$rev=N.history.rev;var _=new F(N.value);return N.folds.forEach(function(D){_.addFold("...",u.fromPoints(D.start,D.end))}),_.setAnnotations(N.annotations),_.setBreakpoints(N.breakpoints),_.setMode(N.mode),_.setScrollLeft(N.scrollLeft),_.setScrollTop(N.scrollTop),_.setUndoManager($),_.selection.fromJSON(N.selection),_},F.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(N){return N.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},F.prototype.toString=function(){return this.doc.getValue()},F.prototype.getSelection=function(){return this.selection},F.prototype.getState=function(N){return this.bgTokenizer.getState(N)},F.prototype.getTokens=function(N){return this.bgTokenizer.getTokens(N)},F.prototype.getTokenAt=function(N,$){var _=this.bgTokenizer.getTokens(N),D,z=0;if($==null){var U=_.length-1;z=this.getLine(N).length}else for(var U=0;U<_.length&&(z+=_[U].value.length,!(z>=$));U++);return D=_[U],D?(D.index=U,D.start=z-D.value.length,D):null},F.prototype.setUndoManager=function(N){if(this.$undoManager=N,this.$informUndoManager&&this.$informUndoManager.cancel(),N){var $=this;N.addSession(this),this.$syncInformUndoManager=function(){$.$informUndoManager.cancel(),$.mergeUndoDeltas=!1},this.$informUndoManager=f.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},F.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},F.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},F.prototype.getTabString=function(){return this.getUseSoftTabs()?f.stringRepeat(" ",this.getTabSize()):" "},F.prototype.setUseSoftTabs=function(N){this.setOption("useSoftTabs",N)},F.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},F.prototype.setTabSize=function(N){this.setOption("tabSize",N)},F.prototype.getTabSize=function(){return this.$tabSize},F.prototype.isTabStop=function(N){return this.$useSoftTabs&&N.column%this.$tabSize===0},F.prototype.setNavigateWithinSoftTabs=function(N){this.setOption("navigateWithinSoftTabs",N)},F.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},F.prototype.setOverwrite=function(N){this.setOption("overwrite",N)},F.prototype.getOverwrite=function(){return this.$overwrite},F.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},F.prototype.addGutterDecoration=function(N,$){this.$decorations[N]||(this.$decorations[N]=""),this.$decorations[N]+=" "+$,this._signal("changeBreakpoint",{})},F.prototype.removeGutterCustomWidget=function(N){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(N)},F.prototype.addGutterCustomWidget=function(N,$){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(N,$)},F.prototype.removeGutterDecoration=function(N,$){this.$decorations[N]=(this.$decorations[N]||"").replace(" "+$,""),this._signal("changeBreakpoint",{})},F.prototype.getBreakpoints=function(){return this.$breakpoints},F.prototype.setBreakpoints=function(N){this.$breakpoints=[];for(var $=0;$<N.length;$++)this.$breakpoints[N[$]]="ace_breakpoint";this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},F.prototype.setBreakpoint=function(N,$){$===void 0&&($="ace_breakpoint"),$?this.$breakpoints[N]=$:delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.clearBreakpoint=function(N){delete this.$breakpoints[N],this._signal("changeBreakpoint",{})},F.prototype.addMarker=function(N,$,_,D){var z=this.$markerId++,U={range:N,type:_||"line",renderer:typeof _=="function"?_:null,clazz:$,inFront:!!D,id:z};return D?(this.$frontMarkers[z]=U,this._signal("changeFrontMarker")):(this.$backMarkers[z]=U,this._signal("changeBackMarker")),z},F.prototype.addDynamicMarker=function(N,$){if(N.update){var _=this.$markerId++;return N.id=_,N.inFront=!!$,$?(this.$frontMarkers[_]=N,this._signal("changeFrontMarker")):(this.$backMarkers[_]=N,this._signal("changeBackMarker")),N}},F.prototype.removeMarker=function(N){var $=this.$frontMarkers[N]||this.$backMarkers[N];if($){var _=$.inFront?this.$frontMarkers:this.$backMarkers;delete _[N],this._signal($.inFront?"changeFrontMarker":"changeBackMarker")}},F.prototype.getMarkers=function(N){return N?this.$frontMarkers:this.$backMarkers},F.prototype.highlight=function(N){if(!this.$searchHighlight){var $=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker($)}this.$searchHighlight.setRegexp(N)},F.prototype.highlightLines=function(N,$,_,D){typeof $!="number"&&(_=$,$=N),_||(_="ace_step");var z=new u(N,0,$,1/0);return z.id=this.addMarker(z,_,"fullLine",D),z},F.prototype.setAnnotations=function(N){this.$annotations=N,this._signal("changeAnnotation",{})},F.prototype.getAnnotations=function(){return this.$annotations||[]},F.prototype.clearAnnotations=function(){this.setAnnotations([])},F.prototype.$detectNewLine=function(N){var $=N.match(/^.*?(\r?\n)/m);$?this.$autoNewLine=$[1]:this.$autoNewLine=`
|
204
|
+
`},F.prototype.getWordRange=function(N,$){var _=this.getLine(N),D=!1;if($>0&&(D=!!_.charAt($-1).match(this.tokenRe)),D||(D=!!_.charAt($).match(this.tokenRe)),D)var z=this.tokenRe;else if(/^\s+$/.test(_.slice($-1,$+1)))var z=/\s/;else var z=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&_.charAt(U).match(z));U++}for(var G=$;G<_.length&&_.charAt(G).match(z);)G++;return new u(N,U,N,G)},F.prototype.getAWordRange=function(N,$){for(var _=this.getWordRange(N,$),D=this.getLine(_.end.row);D.charAt(_.end.column).match(/[ \t]/);)_.end.column+=1;return _},F.prototype.setNewLineMode=function(N){this.doc.setNewLineMode(N)},F.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},F.prototype.setUseWorker=function(N){this.setOption("useWorker",N)},F.prototype.getUseWorker=function(){return this.$useWorker},F.prototype.onReloadTokenizer=function(N){var $=N.data;this.bgTokenizer.start($.first),this._signal("tokenizerUpdate",N)},F.prototype.setMode=function(N,$){if(N&&typeof N=="object"){if(N.getTokenizer)return this.$onChangeMode(N);var _=N,D=_.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!_){this.$onChangeMode(this.$modes[D]),$&&$();return}this.$modeId=D,p.loadModule(["mode",D],(function(z){if(!this.destroyed){if(this.$modeId!==D)return $&&$();this.$modes[D]&&!_?this.$onChangeMode(this.$modes[D]):z&&z.Mode&&(z=new z.Mode(_),_||(this.$modes[D]=z,z.$id=D),this.$onChangeMode(z)),$&&$()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},F.prototype.$onChangeMode=function(N,$){if($||(this.$modeId=N.$id),this.$mode!==N){var _=this.$mode;this.$mode=N,this.$stopWorker(),this.$useWorker&&this.$startWorker();var D=N.getTokenizer();if(D.on!==void 0){var z=this.onReloadTokenizer.bind(this);D.on("update",z)}this.bgTokenizer.setTokenizer(D),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=N.tokenRe,this.nonTokenRe=N.nonTokenRe,$||(N.attachToSession&&N.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(N.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:_,mode:N}))}},F.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},F.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(N){p.warn("Could not load worker",N),this.$worker=null}},F.prototype.getMode=function(){return this.$mode},F.prototype.setScrollTop=function(N){this.$scrollTop===N||isNaN(N)||(this.$scrollTop=N,this._signal("changeScrollTop",N))},F.prototype.getScrollTop=function(){return this.$scrollTop},F.prototype.setScrollLeft=function(N){this.$scrollLeft===N||isNaN(N)||(this.$scrollLeft=N,this._signal("changeScrollLeft",N))},F.prototype.getScrollLeft=function(){return this.$scrollLeft},F.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},F.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var N=0;return this.lineWidgets.forEach(function($){$&&$.screenWidth>N&&(N=$.screenWidth)}),this.lineWidgetWidth=N},F.prototype.$computeWidth=function(N){if(this.$modified||N){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var $=this.doc.getAllLines(),_=this.$rowLengthCache,D=0,z=0,U=this.$foldData[z],G=U?U.start.row:1/0,Z=$.length,te=0;te<Z;te++){if(te>G){if(te=U.end.row+1,te>=Z)break;U=this.$foldData[z++],G=U?U.start.row:1/0}_[te]==null&&(_[te]=this.$getStringScreenWidth($[te])[0]),_[te]>D&&(D=_[te])}this.screenWidth=D}},F.prototype.getLine=function(N){return this.doc.getLine(N)},F.prototype.getLines=function(N,$){return this.doc.getLines(N,$)},F.prototype.getLength=function(){return this.doc.getLength()},F.prototype.getTextRange=function(N){return this.doc.getTextRange(N||this.selection.getRange())},F.prototype.insert=function(N,$){return this.doc.insert(N,$)},F.prototype.remove=function(N){return this.doc.remove(N)},F.prototype.removeFullLines=function(N,$){return this.doc.removeFullLines(N,$)},F.prototype.undoChanges=function(N,$){if(N.length){this.$fromUndo=!0;for(var _=N.length-1;_!=-1;_--){var D=N[_];D.action=="insert"||D.action=="remove"?this.doc.revertDelta(D):D.folds&&this.addFolds(D.folds)}!$&&this.$undoSelect&&(N.selectionBefore?this.selection.fromJSON(N.selectionBefore):this.selection.setRange(this.$getUndoSelection(N,!0))),this.$fromUndo=!1}},F.prototype.redoChanges=function(N,$){if(N.length){this.$fromUndo=!0;for(var _=0;_<N.length;_++){var D=N[_];(D.action=="insert"||D.action=="remove")&&this.doc.$safeApplyDelta(D)}!$&&this.$undoSelect&&(N.selectionAfter?this.selection.fromJSON(N.selectionAfter):this.selection.setRange(this.$getUndoSelection(N,!1))),this.$fromUndo=!1}},F.prototype.setUndoSelect=function(N){this.$undoSelect=N},F.prototype.$getUndoSelection=function(N,$){function _(Z){return $?Z.action!=="insert":Z.action==="insert"}for(var D,z,U=0;U<N.length;U++){var G=N[U];if(G.start){if(!D){_(G)?D=u.fromPoints(G.start,G.end):D=u.fromPoints(G.start,G.start);continue}_(G)?(z=G.start,D.compare(z.row,z.column)==-1&&D.setStart(z),z=G.end,D.compare(z.row,z.column)==1&&D.setEnd(z)):(z=G.start,D.compare(z.row,z.column)==-1&&(D=u.fromPoints(G.start,G.start)))}}return D},F.prototype.replace=function(N,$){return this.doc.replace(N,$)},F.prototype.moveText=function(N,$,_){var D=this.getTextRange(N),z=this.getFoldsInRange(N),U=u.fromPoints($,$);if(!_){this.remove(N);var G=N.start.row-N.end.row,Z=G?-N.end.column:N.start.column-N.end.column;Z&&(U.start.row==N.end.row&&U.start.column>N.end.column&&(U.start.column+=Z),U.end.row==N.end.row&&U.end.column>N.end.column&&(U.end.column+=Z)),G&&U.start.row>=N.end.row&&(U.start.row+=G,U.end.row+=G)}if(U.end=this.insert(U.start,D),z.length){var te=N.start,he=U.start,G=he.row-te.row,Z=he.column-te.column;this.addFolds(z.map(function(ue){return ue=ue.clone(),ue.start.row==te.row&&(ue.start.column+=Z),ue.end.row==te.row&&(ue.end.column+=Z),ue.start.row+=G,ue.end.row+=G,ue}))}return U},F.prototype.indentRows=function(N,$,_){_=_.replace(/\t/g,this.getTabString());for(var D=N;D<=$;D++)this.doc.insertInLine({row:D,column:0},_)},F.prototype.outdentRows=function(N){for(var $=N.collapseRows(),_=new u(0,0,0,0),D=this.getTabSize(),z=$.start.row;z<=$.end.row;++z){var U=this.getLine(z);_.start.row=z,_.end.row=z;for(var G=0;G<D&&U.charAt(G)==" ";++G);G<D&&U.charAt(G)==" "?(_.start.column=G,_.end.column=G+1):(_.start.column=0,_.end.column=G),this.remove(_)}},F.prototype.$moveLines=function(N,$,_){if(N=this.getRowFoldStart(N),$=this.getRowFoldEnd($),_<0){var D=this.getRowFoldStart(N+_);if(D<0)return 0;var z=D-N}else if(_>0){var D=this.getRowFoldEnd($+_);if(D>this.doc.getLength()-1)return 0;var z=D-$}else{N=this.$clipRowToDocument(N),$=this.$clipRowToDocument($);var z=$-N+1}var U=new u(N,0,$,Number.MAX_VALUE),G=this.getFoldsInRange(U).map(function(te){return te=te.clone(),te.start.row+=z,te.end.row+=z,te}),Z=_==0?this.doc.getLines(N,$):this.doc.removeFullLines(N,$);return this.doc.insertFullLines(N+z,Z),G.length&&this.addFolds(G),z},F.prototype.moveLinesUp=function(N,$){return this.$moveLines(N,$,-1)},F.prototype.moveLinesDown=function(N,$){return this.$moveLines(N,$,1)},F.prototype.duplicateLines=function(N,$){return this.$moveLines(N,$,0)},F.prototype.$clipRowToDocument=function(N){return Math.max(0,Math.min(N,this.doc.getLength()-1))},F.prototype.$clipColumnToRow=function(N,$){return $<0?0:Math.min(this.doc.getLine(N).length,$)},F.prototype.$clipPositionToDocument=function(N,$){if($=Math.max(0,$),N<0)N=0,$=0;else{var _=this.doc.getLength();N>=_?(N=_-1,$=this.doc.getLine(_-1).length):$=Math.min(this.doc.getLine(N).length,$)}return{row:N,column:$}},F.prototype.$clipRangeToDocument=function(N){N.start.row<0?(N.start.row=0,N.start.column=0):N.start.column=this.$clipColumnToRow(N.start.row,N.start.column);var $=this.doc.getLength()-1;return N.end.row>$?(N.end.row=$,N.end.column=this.doc.getLine($).length):N.end.column=this.$clipColumnToRow(N.end.row,N.end.column),N},F.prototype.setUseWrapMode=function(N){if(N!=this.$useWrapMode){if(this.$useWrapMode=N,this.$modified=!0,this.$resetRowCache(0),N){var $=this.getLength();this.$wrapData=Array($),this.$updateWrapData(0,$-1)}this._signal("changeWrapMode")}},F.prototype.getUseWrapMode=function(){return this.$useWrapMode},F.prototype.setWrapLimitRange=function(N,$){(this.$wrapLimitRange.min!==N||this.$wrapLimitRange.max!==$)&&(this.$wrapLimitRange={min:N,max:$},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},F.prototype.adjustWrapLimit=function(N,$){var _=this.$wrapLimitRange;_.max<0&&(_={min:$,max:$});var D=this.$constrainWrapLimit(N,_.min,_.max);return D!=this.$wrapLimit&&D>1?(this.$wrapLimit=D,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},F.prototype.$constrainWrapLimit=function(N,$,_){return $&&(N=Math.max($,N)),_&&(N=Math.min(_,N)),N},F.prototype.getWrapLimit=function(){return this.$wrapLimit},F.prototype.setWrapLimit=function(N){this.setWrapLimitRange(N,N)},F.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},F.prototype.$updateInternalDataOnChange=function(N){var $=this.$useWrapMode,_=N.action,D=N.start,z=N.end,U=D.row,G=z.row,Z=G-U,te=null;if(this.$updating=!0,Z!=0)if(_==="remove"){this[$?"$wrapData":"$rowLengthCache"].splice(U,Z);var he=this.$foldData;te=this.getFoldsInRange(N),this.removeFolds(te);var ne=this.getFoldLine(z.row),le=0;if(ne){ne.addRemoveChars(z.row,z.column,D.column-z.column),ne.shiftRow(-Z);var ue=this.getFoldLine(U);ue&&ue!==ne&&(ue.merge(ne),ne=ue),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=z.row&&ne.shiftRow(-Z)}G=U}else{var ce=Array(Z);ce.unshift(U,0);var ge=$?this.$wrapData:this.$rowLengthCache;ge.splice.apply(ge,ce);var he=this.$foldData,ne=this.getFoldLine(U),le=0;if(ne){var Ae=ne.range.compareInside(D.row,D.column);Ae==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(G,0,z.column-D.column))):Ae==-1&&(ne.addRemoveChars(U,0,z.column-D.column),ne.shiftRow(Z)),le=he.indexOf(ne)+1}for(le;le<he.length;le++){var ne=he[le];ne.start.row>=U&&ne.shiftRow(Z)}}else{Z=Math.abs(N.start.column-N.end.column),_==="remove"&&(te=this.getFoldsInRange(N),this.removeFolds(te),Z=-Z);var ne=this.getFoldLine(U);ne&&ne.addRemoveChars(U,D.column,Z)}return $&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,$?this.$updateWrapData(U,G):this.$updateRowLengthCache(U,G),te},F.prototype.$updateRowLengthCache=function(N,$){this.$rowLengthCache[N]=null,this.$rowLengthCache[$]=null},F.prototype.$updateWrapData=function(N,$){var _=this.doc.getAllLines(),D=this.getTabSize(),z=this.$wrapData,U=this.$wrapLimit,G,Z,te=N;for($=Math.min($,_.length-1);te<=$;)Z=this.getFoldLine(te,Z),Z?(G=[],Z.walk((function(he,ne,le,ue){var ce;if(he!=null){ce=this.$getDisplayTokens(he,G.length),ce[0]=k;for(var ge=1;ge<ce.length;ge++)ce[ge]=x}else ce=this.$getDisplayTokens(_[ne].substring(ue,le),G.length);G=G.concat(ce)}).bind(this),Z.end.row,_[Z.end.row].length+1),z[Z.start.row]=this.$computeWrapSplits(G,U,D),te=Z.end.row+1):(G=this.$getDisplayTokens(_[te]),z[te]=this.$computeWrapSplits(G,U,D),te++)},F.prototype.$computeWrapSplits=function(N,$,_){if(N.length==0)return[];var D=[],z=N.length,U=0,G=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=$<=Math.max(2*_,8)||te===!1?0:Math.floor($/2);function ne(){var Ae=0;if(he===0)return Ae;if(te)for(var Te=0;Te<N.length;Te++){var Re=N[Te];if(Re==I)Ae+=1;else if(Re==O)Ae+=_;else{if(Re==L)continue;break}}return Z&&te!==!1&&(Ae+=_),Math.min(Ae,he)}function le(Ae){for(var Te=Ae-U,Re=U;Re<Ae;Re++){var Xe=N[Re];(Xe===12||Xe===2)&&(Te-=1)}D.length||(ue=ne(),D.indent=ue),G+=Te,D.push(G),U=Ae}for(var ue=0;z-U>$-ue;){var ce=U+$-ue;if(N[ce-1]>=I&&N[ce]>=I){le(ce);continue}if(N[ce]==k||N[ce]==x){for(ce;ce!=U-1&&N[ce]!=k;ce--);if(ce>U){le(ce);continue}for(ce=U+$,ce;ce<N.length&&N[ce]==x;ce++);if(ce==N.length)break;le(ce);continue}for(var ge=Math.max(ce-($-($>>2)),U-1);ce>ge&&N[ce]<k;)ce--;if(Z){for(;ce>ge&&N[ce]<k;)ce--;for(;ce>ge&&N[ce]==R;)ce--}else for(;ce>ge&&N[ce]<I;)ce--;if(ce>ge){le(++ce);continue}ce=U+$,N[ce]==M&&ce--,le(ce-ue)}return D},F.prototype.$getDisplayTokens=function(N,$){var _=[],D;$=$||0;for(var z=0;z<N.length;z++){var U=N.charCodeAt(z);if(U==9){D=this.getScreenTabSize(_.length+$),_.push(O);for(var G=1;G<D;G++)_.push(L)}else U==32?_.push(I):U>39&&U<48||U>57&&U<64?_.push(R):U>=4352&&W(U)?_.push(E,M):_.push(E)}return _},F.prototype.$getStringScreenWidth=function(N,$,_){if($==0)return[0,0];$==null&&($=1/0),_=_||0;var D,z;for(z=0;z<N.length&&(D=N.charCodeAt(z),D==9?_+=this.getScreenTabSize(_):D>=4352&&W(D)?_+=2:_+=1,!(_>$));z++);return[_,z]},F.prototype.getRowLength=function(N){var $=1;return this.lineWidgets&&($+=this.lineWidgets[N]&&this.lineWidgets[N].rowCount||0),!this.$useWrapMode||!this.$wrapData[N]?$:this.$wrapData[N].length+$},F.prototype.getRowLineCount=function(N){return!this.$useWrapMode||!this.$wrapData[N]?1:this.$wrapData[N].length+1},F.prototype.getRowWrapIndent=function(N){if(this.$useWrapMode){var $=this.screenToDocumentPosition(N,Number.MAX_VALUE),_=this.$wrapData[$.row];return _.length&&_[0]<$.column?_.indent:0}else return 0},F.prototype.getScreenLastRowColumn=function(N){var $=this.screenToDocumentPosition(N,Number.MAX_VALUE);return this.documentToScreenColumn($.row,$.column)},F.prototype.getDocumentLastRowColumn=function(N,$){var _=this.documentToScreenRow(N,$);return this.getScreenLastRowColumn(_)},F.prototype.getDocumentLastRowColumnPosition=function(N,$){var _=this.documentToScreenRow(N,$);return this.screenToDocumentPosition(_,Number.MAX_VALUE/10)},F.prototype.getRowSplitData=function(N){if(this.$useWrapMode)return this.$wrapData[N]},F.prototype.getScreenTabSize=function(N){return this.$tabSize-(N%this.$tabSize|0)},F.prototype.screenToDocumentRow=function(N,$){return this.screenToDocumentPosition(N,$).row},F.prototype.screenToDocumentColumn=function(N,$){return this.screenToDocumentPosition(N,$).column},F.prototype.screenToDocumentPosition=function(N,$,_){if(N<0)return{row:0,column:0};var D,le=0,z=0,U,ne=0,G=0,Z=this.$screenRowCache,te=this.$getRowCacheIndex(Z,N),he=Z.length;if(he&&te>=0)var ne=Z[te],le=this.$docRowCache[te],ue=N>Z[he-1];else var ue=!he;for(var ce=this.getLength()-1,ge=this.getNextFoldLine(le),Ae=ge?ge.start.row:1/0;ne<=N&&(G=this.getRowLength(le),!(ne+G>N||le>=ce));)ne+=G,le++,le>Ae&&(le=ge.end.row+1,ge=this.getNextFoldLine(le,ge),Ae=ge?ge.start.row:1/0),ue&&(this.$docRowCache.push(le),this.$screenRowCache.push(ne));if(ge&&ge.start.row<=le)D=this.getFoldDisplayLine(ge),le=ge.start.row;else{if(ne+G<=N||le>ce)return{row:ce,column:this.getLine(ce).length};D=this.getLine(le),ge=null}var Te=0,Re=Math.floor(N-ne);if(this.$useWrapMode){var Xe=this.$wrapData[le];Xe&&(U=Xe[Re],Re>0&&Xe.length&&(Te=Xe.indent,z=Xe[Re-1]||Xe[Xe.length-1],D=D.substring(z)))}return _!==void 0&&this.$bidiHandler.isBidiRow(ne+Re,le,Re)&&($=this.$bidiHandler.offsetToCol(_)),z+=this.$getStringScreenWidth(D,$-Te)[1],this.$useWrapMode&&z>=U&&(z=U-1),ge?ge.idxToPosition(z):{row:le,column:z}},F.prototype.documentToScreenPosition=function(N,$){if(typeof $>"u")var _=this.$clipPositionToDocument(N.row,N.column);else _=this.$clipPositionToDocument(N,$);N=_.row,$=_.column;var ne=0,D=null,z=null;z=this.getFoldAt(N,$,1),z&&(N=z.start.row,$=z.start.column);var U,he=0,G=this.$docRowCache,Z=this.$getRowCacheIndex(G,N),te=G.length;if(te&&Z>=0)var he=G[Z],ne=this.$screenRowCache[Z],le=N>G[te-1];else var le=!te;for(var ue=this.getNextFoldLine(he),ce=ue?ue.start.row:1/0;he<N;){if(he>=ce){if(U=ue.end.row+1,U>N)break;ue=this.getNextFoldLine(U,ue),ce=ue?ue.start.row:1/0}else U=he+1;ne+=this.getRowLength(he),he=U,le&&(this.$docRowCache.push(he),this.$screenRowCache.push(ne))}var ge="";ue&&he>=ce?(ge=this.getFoldDisplayLine(ue,N,$),D=ue.start.row):(ge=this.getLine(N).substring(0,$),D=N);var Ae=0;if(this.$useWrapMode){var Te=this.$wrapData[D];if(Te){for(var Re=0;ge.length>=Te[Re];)ne++,Re++;ge=ge.substring(Te[Re-1]||0,ge.length),Ae=Re>0?Te.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ae+this.$getStringScreenWidth(ge)[0]}},F.prototype.documentToScreenColumn=function(N,$){return this.documentToScreenPosition(N,$).column},F.prototype.documentToScreenRow=function(N,$){return this.documentToScreenPosition(N,$).row},F.prototype.getScreenLength=function(){var N=0,$=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,D=0,z=0,$=this.$foldData[z++],U=$?$.start.row:1/0;D<_;){var G=this.$wrapData[D];N+=G?G.length+1:1,D++,D>U&&(D=$.end.row+1,$=this.$foldData[z++],U=$?$.start.row:1/0)}else{N=this.getLength();for(var Z=this.$foldData,z=0;z<Z.length;z++)$=Z[z],N-=$.end.row-$.start.row}return this.lineWidgets&&(N+=this.$getWidgetScreenLength()),N},F.prototype.$setFontMetrics=function(N){this.$enableVarChar&&(this.$getStringScreenWidth=function($,_,D){if(_===0)return[0,0];_||(_=1/0),D=D||0;var z,U;for(U=0;U<$.length&&(z=$.charAt(U),z===" "?D+=this.getScreenTabSize(D):D+=N.getCharacterWidth(z),!(D>_));U++);return[D,U]})},F.prototype.getPrecedingCharacter=function(){var N=this.selection.getCursor();if(N.column===0)return N.row===0?"":this.doc.getNewLineCharacter();var $=this.getLine(N.row);return $[N.column-1]},F.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},F})();S.$uid=0,S.prototype.$modes=p.$modes,S.prototype.getValue=S.prototype.toString,S.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},S.prototype.$overwrite=!1,S.prototype.$mode=null,S.prototype.$modeId=null,S.prototype.$scrollTop=0,S.prototype.$scrollLeft=0,S.prototype.$wrapLimit=80,S.prototype.$useWrapMode=!1,S.prototype.$wrapLimitRange={min:null,max:null},S.prototype.lineWidgets=null,S.prototype.isFullWidth=W,d.implement(S.prototype,g);var E=1,M=2,k=3,x=4,R=9,I=10,O=11,L=12;function W(F){return F<4352?!1:F>=4352&&F<=4447||F>=4515&&F<=4519||F>=4602&&F<=4607||F>=9001&&F<=9002||F>=11904&&F<=11929||F>=11931&&F<=12019||F>=12032&&F<=12245||F>=12272&&F<=12283||F>=12288&&F<=12350||F>=12353&&F<=12438||F>=12441&&F<=12543||F>=12549&&F<=12589||F>=12593&&F<=12686||F>=12688&&F<=12730||F>=12736&&F<=12771||F>=12784&&F<=12830||F>=12832&&F<=12871||F>=12880&&F<=13054||F>=13056&&F<=19903||F>=19968&&F<=42124||F>=42128&&F<=42182||F>=43360&&F<=43388||F>=44032&&F<=55203||F>=55216&&F<=55238||F>=55243&&F<=55291||F>=63744&&F<=64255||F>=65040&&F<=65049||F>=65072&&F<=65106||F>=65108&&F<=65126||F>=65128&&F<=65131||F>=65281&&F<=65376||F>=65504&&F<=65510}n("./edit_session/folding").Folding.call(S.prototype),n("./edit_session/bracket_match").BracketMatch.call(S.prototype),p.defineOptions(S.prototype,"session",{wrap:{set:function(F){if(!F||F=="off"?F=!1:F=="free"?F=!0:F=="printMargin"?F=-1:typeof F=="string"&&(F=parseInt(F,10)||!1),this.$wrap!=F)if(this.$wrap=F,!F)this.setUseWrapMode(!1);else{var N=typeof F=="number"?F:null;this.setWrapLimitRange(N,N),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(F){F=F=="auto"?this.$mode.type!="text":F!="text",F!=this.$wrapAsCode&&(this.$wrapAsCode=F,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(F){this.$useWorker=F,this.$stopWorker(),F&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(F){F=parseInt(F),F>0&&this.$tabSize!==F&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=F,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(F){this.setFoldStyle(F)},handlesSet:!0},overwrite:{set:function(F){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(F){this.doc.setNewLineMode(F)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(F){this.setMode(F)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=S}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,h){var d=n("./lib/lang"),f=n("./lib/oop"),w=n("./range").Range,p=(function(){function u(){this.$options={}}return u.prototype.set=function(c){return f.mixin(this.$options,c),this},u.prototype.getOptions=function(){return d.copyObject(this.$options)},u.prototype.setOptions=function(c){this.$options=c},u.prototype.find=function(c){var o=this.$options,l=this.$matchIterator(c,o);if(!l)return!1;var m=null;return l.forEach(function(b,S,E,M){return m=new w(b,S,E,M),S==M&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},u.prototype.findAll=function(c){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var l=o.range,m=l?c.getLines(l.start.row,l.end.row):c.doc.getAllLines(),b=[],S=o.re;if(o.$isMultiLine){var E=S.length,M=m.length-E,k;e:for(var x=S.offset||0;x<=M;x++){for(var R=0;R<E;R++)if(m[x+R].search(S[R])==-1)continue e;var I=m[x],O=m[x+E-1],L=I.length-I.match(S[0])[0].length,W=O.match(S[E-1])[0].length;k&&k.end.row===x&&k.end.column>L||(b.push(k=new w(x,L,x+E-1,W)),E>2&&(x=x+E-2))}}else for(var F,N=0;N<m.length;N++)if(this.$isMultilineSearch(o)){var $=m.length-1;if(F=this.$multiLineForward(c,S,N,$),F){var _=F.endRow<=$?F.endRow-1:$;_>N&&(N=_),b.push(new w(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=d.getMatchOffsets(m[N],S);for(var R=0;R<F.length;R++){var D=F[R];b.push(new w(N,D.offset,N,D.offset+D.length))}}if(l){for(var z=l.start.column,U=l.end.column,N=0,R=b.length-1;N<R&&b[N].start.column<z&&b[N].start.row==0;)N++;for(var G=l.end.row-l.start.row;N<R&&b[R].end.column>U&&b[R].end.row==G;)R--;for(b=b.slice(N,R+1),N=0,R=b.length;N<R;N++)b[N].start.row+=l.start.row,b[N].end.row+=l.start.row}return b},u.prototype.parseReplaceString=function(c){for(var o={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},l="",m=0,b=c.length;m<b;m++){var S=c.charCodeAt(m);if(S===o.Backslash){if(m++,m>=b){l+="\\";break}var E=c.charCodeAt(m);switch(E){case o.Backslash:l+="\\";break;case o.n:l+=`
|
205
|
+
`;break;case o.t:l+=" ";break}continue}if(S===o.DollarSign){if(m++,m>=b){l+="$";break}var M=c.charCodeAt(m);if(M===o.DollarSign){l+="$$";continue}if(M===o.Digit0||M===o.Ampersand){l+="$&";continue}if(o.Digit1<=M&&M<=o.Digit9){l+="$"+c[m];continue}}l+=c[m]}return l||c},u.prototype.replace=function(c,o){var l=this.$options,m=this.$assembleRegExp(l);if(l.$isMultiLine)return o;if(m){var b=this.$isMultilineSearch(l);b&&(c=c.replace(/\r\n|\r|\n/g,`
|
206
|
+
`));var S=m.exec(c);if(!S||!b&&S[0].length!=c.length)return null;if(o=l.regExp?this.parseReplaceString(o):o.replace(/\$/g,"$$$$"),o=c.replace(m,o),l.preserveCase){o=o.split("");for(var E=Math.min(c.length,c.length);E--;){var M=c[E];M&&M.toLowerCase()!=M?o[E]=o[E].toUpperCase():o[E]=o[E].toLowerCase()}o=o.join("")}return o}},u.prototype.$assembleRegExp=function(c,o){if(c.needle instanceof RegExp)return c.re=c.needle;var l=c.needle;if(!c.needle)return c.re=!1;c.regExp||(l=d.escapeRegExp(l));var m=c.caseSensitive?"gm":"gmi";try{new RegExp(l,"u"),c.$supportsUnicodeFlag=!0,m+="u"}catch{c.$supportsUnicodeFlag=!1}if(c.wholeWord&&(l=g(l,c)),c.$isMultiLine=!o&&/[\n\r]/.test(l),c.$isMultiLine)return c.re=this.$assembleMultilineRegExp(l,m);try{var b=new RegExp(l,m)}catch{b=!1}return c.re=b},u.prototype.$assembleMultilineRegExp=function(c,o){for(var l=c.replace(/\r\n|\r|\n/g,`$
|
207
|
+
^`).split(`
|
208
|
+
`),m=[],b=0;b<l.length;b++)try{m.push(new RegExp(l[b],o))}catch{return!1}return m},u.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},u.prototype.$multiLineForward=function(c,o,l,m){for(var b,S=a(c,l),E=l;E<=m;){for(var M=0;M<S&&!(E>m);M++){var k=c.getLine(E++);b=b==null?k:b+`
|
209
|
+
`+k}var x=o.exec(b);if(o.lastIndex=0,x){var R=b.slice(0,x.index).split(`
|
210
|
+
`),I=x[0].split(`
|
211
|
+
`),O=l+R.length-1,L=R[R.length-1].length,W=O+I.length-1,F=I.length==1?L+I[0].length:I[I.length-1].length;return{startRow:O,startCol:L,endRow:W,endCol:F}}}return null},u.prototype.$multiLineBackward=function(c,o,l,m,b){for(var S,E=a(c,m),M=c.getLine(m).length-l,k=m;k>=b;){for(var x=0;x<E&&k>=b;x++){var R=c.getLine(k--);S=S==null?R:R+`
|
212
|
+
`+S}var I=i(S,o,M);if(I){var O=S.slice(0,I.index).split(`
|
213
|
+
`),L=I[0].split(`
|
214
|
+
`),W=k+O.length,F=O[O.length-1].length,N=W+L.length-1,$=L.length==1?F+L[0].length:L[L.length-1].length;return{startRow:W,startCol:F,endRow:N,endCol:$}}}return null},u.prototype.$matchIterator=function(c,o){var l=this.$assembleRegExp(o);if(!l)return!1;var m=this.$isMultilineSearch(o),b=this.$multiLineForward,S=this.$multiLineBackward,E=o.backwards==!0,M=o.skipCurrent!=!1,k=l.unicode,x=o.range,R=o.start;R||(R=x?x[E?"end":"start"]:c.selection.getRange()),R.start&&(R=R[M!=E?"end":"start"]);var I=x?x.start.row:0,O=x?x.end.row:c.getLength()-1;if(E)var L=function(N){var $=R.row;if(!F($,R.column,N)){for($--;$>=I;$--)if(F($,Number.MAX_VALUE,N))return;if(o.wrap!=!1){for($=O,I=R.row;$>=I;$--)if(F($,Number.MAX_VALUE,N))return}}};else var L=function(N){var $=R.row;if(!F($,R.column,N)){for($=$+1;$<=O;$++)if(F($,0,N))return;if(o.wrap!=!1){for($=I,O=R.row;$<=O;$++)if(F($,0,N))return}}};if(o.$isMultiLine)var W=l.length,F=function(N,$,_){var D=E?N-W+1:N;if(!(D<0||D+W>c.getLength())){var z=c.getLine(D),U=z.search(l[0]);if(!(!E&&U<$||U===-1)){for(var G=1;G<W;G++)if(z=c.getLine(D+G),z.search(l[G])==-1)return;var Z=z.match(l[W-1])[0].length;if(!(E&&Z>$)&&_(D,U,D+W-1,Z))return!0}}};else if(E)var F=function(N,$,_){if(m){var D=S(c,l,$,N,I);if(!D)return!1;if(_(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else{var z=c.getLine(N),U=[],G,Z=0;for(l.lastIndex=0;G=l.exec(z);){var te=G[0].length;if(Z=G.index,!te){if(Z>=z.length)break;l.lastIndex=Z+=d.skipEmptyMatch(z,Z,k)}if(G.index+te>$)break;U.push(G.index,te)}for(var he=U.length-1;he>=0;he-=2){var ne=U[he-1],te=U[he];if(_(N,ne,N,ne+te))return!0}}};else var F=function(N,$,_){if(l.lastIndex=$,m){var D=b(c,l,N,O);if(D){var z=D.endRow<=O?D.endRow-1:O;z>N&&(N=z)}if(!D)return!1;if(_(D.startRow,D.startCol,D.endRow,D.endCol))return!0}else for(var U=c.getLine(N),G,Z;Z=l.exec(U);){var te=Z[0].length;if(G=Z.index,_(N,G,N,G+te))return!0;if(!te&&(l.lastIndex=G+=d.skipEmptyMatch(U,G,k),G>=U.length))return!1}};return{forEach:L}},u})();function g(u,c){var o=d.supportsLookbehind();function l(E,M){M===void 0&&(M=!0);var k=o&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return k.test(E)||c.regExp?o&&c.$supportsUnicodeFlag?M?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(u),b=m[0],S=m[m.length-1];return l(b)+u+l(S,!1)}function i(u,c,o){for(var l=null,m=0;m<=u.length;){c.lastIndex=m;var b=c.exec(u);if(!b)break;var S=b.index+b[0].length;if(S>u.length-o)break;(!l||S>l.index+l[0].length)&&(l=b),m=b.index+1}return l}function a(u,c){var o=5e3,l={row:c,column:0},m=u.doc.positionToIndex(l),b=m+o,S=u.doc.indexToPosition(b),E=S.row;return E+1}r.Search=p}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,h){var d=this&&this.__extends||(function(){var u=function(c,o){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,m){l.__proto__=m}||function(l,m){for(var b in m)Object.prototype.hasOwnProperty.call(m,b)&&(l[b]=m[b])},u(c,o)};return function(c,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");u(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}})(),f=n("../lib/keys"),w=n("../lib/useragent"),p=f.KEY_MODS,g=(function(){function u(c,o){this.$init(c,o,!1)}return u.prototype.$init=function(c,o,l){this.platform=o||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},u.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},u.prototype.removeCommand=function(c,o){var l=c&&(typeof c=="string"?c:c.name);c=this.commands[l],o||delete this.commands[l];var m=this.commandKeyBinding;for(var b in m){var S=m[b];if(S==c)delete m[b];else if(Array.isArray(S)){var E=S.indexOf(c);E!=-1&&(S.splice(E,1),S.length==1&&(m[b]=S[0]))}}},u.prototype.bindKey=function(c,o,l){if(typeof c=="object"&&c&&(l==null&&(l=c.position),c=c[this.platform]),!!c){if(typeof o=="function")return this.addCommand({exec:o,bindKey:c,name:o.name||c});c.split("|").forEach(function(m){var b="";if(m.indexOf(" ")!=-1){var S=m.split(/\s+/);m=S.pop(),S.forEach(function(k){var x=this.parseKeys(k),R=p[x.hashId]+x.key;b+=(b?" ":"")+R,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var E=this.parseKeys(m),M=p[E.hashId]+E.key;this._addCommandToBinding(b+M,o,l)},this)}},u.prototype._addCommandToBinding=function(c,o,l){var m=this.commandKeyBinding,b;if(!o)delete m[c];else if(!m[c]||this.$singleCommand)m[c]=o;else{Array.isArray(m[c])?(b=m[c].indexOf(o))!=-1&&m[c].splice(b,1):m[c]=[m[c]],typeof l!="number"&&(l=i(o));var S=m[c];for(b=0;b<S.length;b++){var E=S[b],M=i(E);if(M>l)break}S.splice(b,0,o)}},u.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(o){var l=c[o];if(l){if(typeof l=="string")return this.bindKey(l,o);typeof l=="function"&&(l={exec:l}),typeof l=="object"&&(l.name||(l.name=o),this.addCommand(l))}},this)},u.prototype.removeCommands=function(c){Object.keys(c).forEach(function(o){this.removeCommand(c[o])},this)},u.prototype.bindKeys=function(c){Object.keys(c).forEach(function(o){this.bindKey(o,c[o])},this)},u.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},u.prototype.parseKeys=function(c){var o=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(M){return M}),l=o.pop(),m=f[l];if(f.FUNCTION_KEYS[m])l=f.FUNCTION_KEYS[m].toLowerCase();else if(o.length){if(o.length==1&&o[0]=="shift")return{key:l.toUpperCase(),hashId:-1}}else return{key:l,hashId:-1};for(var b=0,S=o.length;S--;){var E=f.KEY_MODS[o[S]];if(E==null)return typeof console<"u"&&console.error("invalid modifier "+o[S]+" in "+c),!1;b|=E}return{key:l,hashId:b}},u.prototype.findKeyCommand=function(c,o){var l=p[c]+o;return this.commandKeyBinding[l]},u.prototype.handleKeyboard=function(c,o,l,m){if(!(m<0)){var b=p[o]+l,S=this.commandKeyBinding[b];return c.$keyChain&&(c.$keyChain+=" "+b,S=this.commandKeyBinding[c.$keyChain]||S),S&&(S=="chainKeys"||S[S.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||b,{command:"null"}):(c.$keyChain&&((!o||o==4)&&l.length==1?c.$keyChain=c.$keyChain.slice(0,-b.length-1):(o==-1||m>0)&&(c.$keyChain="")),{command:S})}},u.prototype.getStatusText=function(c,o){return o.$keyChain||""},u})();function i(u){return typeof u=="object"&&u.bindKey&&u.bindKey.position||(u.isDefault?-100:0)}var a=(function(u){d(c,u);function c(o,l){var m=u.call(this,o,l)||this;return m.$singleCommand=!0,m}return c})(g);a.call=function(u,c,o){g.prototype.$init.call(u,c,o,!0)},g.call=function(u,c,o){g.prototype.$init.call(u,c,o,!1)},r.HashHandler=a,r.MultiHashHandler=g}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,h){var d=this&&this.__extends||(function(){var i=function(a,u){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,o){c.__proto__=o}||function(c,o){for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c[l]=o[l])},i(a,u)};return function(a,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");i(a,u);function c(){this.constructor=a}a.prototype=u===null?Object.create(u):(c.prototype=u.prototype,new c)}})(),f=n("../lib/oop"),w=n("../keyboard/hash_handler").MultiHashHandler,p=n("../lib/event_emitter").EventEmitter,g=(function(i){d(a,i);function a(u,c){var o=i.call(this,c,u)||this;return o.byName=o.commands,o.setDefaultHandler("exec",function(l){return l.args?l.command.exec(l.editor,l.args,l.event,!1):l.command.exec(l.editor,{},l.event,!0)}),o}return a.prototype.exec=function(u,c,o){if(Array.isArray(u)){for(var l=u.length;l--;)if(this.exec(u[l],c,o))return!0;return!1}typeof u=="string"&&(u=this.commands[u]);var m={editor:c,command:u,args:o};return this.canExecute(u,c)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(u,c){return typeof u=="string"&&(u=this.commands[u]),!(!u||c&&c.$readOnly&&!u.readOnly||this.$checkCommandState!=!1&&u.isAvailable&&!u.isAvailable(c))},a.prototype.toggleRecording=function(u){if(!this.$inReplay)return u&&u._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},a.prototype.replay=function(u){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(u);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,u):this.exec(c[0],u,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(u){return u.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},a})(w);f.implement(g.prototype,p),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,h){var d=n("../lib/lang"),f=n("../config"),w=n("../range").Range;function p(i,a){return{win:i,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:p("Ctrl-,","Command-,"),exec:function(i){f.loadModule("ace/ext/settings_menu",function(a){a.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:p("Alt-E","F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:p("Alt-Shift-E","Shift-F4"),exec:function(i){f.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:p("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:p(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:p("Ctrl-L","Command-L"),exec:function(i,a){typeof a=="number"&&!isNaN(a)&&i.gotoLine(a),i.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:p("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(i){i.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:p("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(i){i.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:p("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:p("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:p(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:p("Alt-0","Command-Option-0"),exec:function(i){i.session.foldAll(),i.session.unfold(i.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:p("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:p("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:p("Ctrl-Shift-K","Command-Shift-G"),exec:function(i){i.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:p("Alt-K","Ctrl-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:p("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:p("Ctrl-F","Command-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(i){i.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:p("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(i){i.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:p("Ctrl-Home","Command-Home|Command-Up"),exec:function(i){i.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:p("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(i){i.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:p("Up","Up|Ctrl-P"),exec:function(i,a){i.navigateUp(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:p("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(i){i.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:p("Ctrl-End","Command-End|Command-Down"),exec:function(i){i.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:p("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(i){i.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:p("Down","Down|Ctrl-N"),exec:function(i,a){i.navigateDown(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:p("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(i){i.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:p("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:p("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:p("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(i){i.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:p("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(i){i.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:p("Left","Left|Ctrl-B"),exec:function(i,a){i.navigateLeft(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:p("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(i){i.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:p("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:p("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:p("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(i){i.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:p("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:p("Right","Right|Ctrl-F"),exec:function(i,a){i.navigateRight(a.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(i){i.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:p(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:p("PageDown","PageDown|Ctrl-V"),exec:function(i){i.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(i){i.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:p(null,"Option-PageUp"),exec:function(i){i.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(i){i.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:p("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:p("Ctrl-Down",null),exec:function(i){i.renderer.scrollBy(0,2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(i){i.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(i){i.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:p("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:p("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:p("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:p("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(i){i.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:p("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(i){i.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:p(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(i){},readOnly:!0},{name:"cut",description:"Cut",exec:function(i){var a=i.$copyWithEmptySelection&&i.selection.isEmpty(),u=a?i.selection.getLineRange():i.selection.getRange();i._emit("cut",u),u.isEmpty()||i.session.remove(u),i.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(i,a){i.$handlePaste(a)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:p("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:p("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:p("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:p("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:p("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:p("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:p("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:p("Ctrl-H","Command-Option-F"),exec:function(i){f.loadModule("ace/ext/searchbox",function(a){a.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:p("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:p("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:p("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:p("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:p("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:p("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:p("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:p("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(i){i.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:p("Shift-Delete",null),exec:function(i){if(i.selection.isEmpty())i.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:p("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:p("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:p("Ctrl-Shift-Backspace",null),exec:function(i){var a=i.selection.getRange();a.start.column=0,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:p("Ctrl-Shift-Delete",null),exec:function(i){var a=i.selection.getRange();a.end.column=Number.MAX_VALUE,i.session.remove(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:p("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:p("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:p("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:p("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:p("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:p("Ctrl-]","Ctrl-]"),exec:function(i){i.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(i,a){i.insert(a)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(i,a){i.insert(d.stringRepeat(a.text||"",a.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:p(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:p("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:p("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:p("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:p(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:p("Ctrl-Shift-L","Command-Shift-L"),exec:function(i){var a=i.selection.getRange();a.start.column=a.end.column=0,a.end.row++,i.selection.setRange(a,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:p("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:p(null,null),exec:function(i){for(var a=i.selection.isBackwards(),u=a?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),c=a?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),o=i.session.doc.getLine(u.row).length,l=i.session.doc.getTextRange(i.selection.getRange()),m=l.replace(/\n\s*/," ").length,b=i.session.doc.getLine(u.row),S=u.row+1;S<=c.row+1;S++){var E=d.stringTrimLeft(d.stringTrimRight(i.session.doc.getLine(S)));E.length!==0&&(E=" "+E),b+=E}c.row+1<i.session.doc.getLength()-1&&(b+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new w(u.row,0,c.row+2,0),b),m>0?(i.selection.moveCursorTo(u.row,u.column),i.selection.selectTo(u.row,u.column+m)):(o=i.session.doc.getLine(u.row).length>o?o+1:o,i.selection.moveCursorTo(u.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:p(null,null),exec:function(i){var a=i.session.doc.getLength()-1,u=i.session.doc.getLine(a).length,c=i.selection.rangeList.ranges,o=[];c.length<1&&(c=[i.selection.getRange()]);for(var l=0;l<c.length;l++)l==c.length-1&&(c[l].end.row===a&&c[l].end.column===u||o.push(new w(c[l].end.row,c[l].end.column,a,u))),l===0?c[l].start.row===0&&c[l].start.column===0||o.push(new w(0,0,c[l].start.row,c[l].start.column)):o.push(new w(c[l-1].end.row,c[l-1].end.column,c[l].start.row,c[l].start.column));i.exitMultiSelectMode(),i.clearSelection();for(var l=0;l<o.length;l++)i.selection.addRange(o[l],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(i){i.selection.clearSelection(),i.navigateLineEnd(),i.insert(`
|
215
|
+
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(i){i.selection.clearSelection();var a=i.getCursorPosition();i.selection.moveTo(a.row-1,Number.MAX_VALUE),i.insert(`
|
216
|
+
`),a.row===0&&i.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(i){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),i.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:p("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:p(null,null),exec:function(i){i.prompt({$type:"modes"})},readOnly:!0}];for(var g=1;g<9;g++)r.commands.push({name:"foldToLevel"+g,description:"Fold To Level "+g,level:g,exec:function(i){i.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,h){var d=n("../lib/keys"),f=n("../mouse/default_gutter_handler").GutterTooltip,w=(function(){function g(i){this.editor=i,this.gutterLayer=i.renderer.$gutterLayer,this.element=i.renderer.$gutter,this.lines=i.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new f(this.editor)}return g.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))},g.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))},g.prototype.$onGutterKeyDown=function(i){if(this.annotationTooltip.isOpen){i.preventDefault(),i.keyCode===d.escape&&this.annotationTooltip.hideTooltip();return}if(i.target===this.element){if(i.keyCode!=d.enter)return;i.preventDefault();var a=this.editor.getCursorPosition().row;this.editor.isRowVisible(a)||this.editor.scrollToLine(a,!0,!0),setTimeout((function(){var u=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(u),o=this.$findNearestAnnotation(u);if(!(c===null&&o===null)){var l=this.$findClosestNumber(c,o,u);if(l===c)if(this.activeLane="fold",this.activeRowIndex=c,this.$isCustomWidgetVisible(c)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=o,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(i),setTimeout((function(){this.editor._signal("gutterkeydown",new p(i,this))}).bind(this),10)},g.prototype.$handleGutterKeyboardInteraction=function(i){if(i.keyCode===d.tab){i.preventDefault();return}if(i.keyCode===d.escape){i.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(i.keyCode===d.up){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(i.keyCode===d.down){switch(i.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(i.keyCode===d.left){i.preventDefault(),this.$switchLane("annotation");return}if(i.keyCode===d.right){i.preventDefault(),this.$switchLane("fold");return}if(i.keyCode===d.enter||i.keyCode===d.space){switch(i.preventDefault(),this.activeLane){case"fold":var a=this.$rowIndexToRow(this.activeRowIndex),u=this.editor.session.$gutterCustomWidgets[a];if(u)u.callbacks&&u.callbacks.onClick&&u.callbacks.onClick(i,a);else if(this.gutterLayer.session.foldWidgets[a]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),i),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==a&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(a),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var c=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=c.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=o.right+"px",l.top=o.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},g.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},g.prototype.$isFoldWidgetVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),u=this.$getFoldWidget(i).style.display!=="none";return a&&u},g.prototype.$isCustomWidgetVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),u=!!this.$getCustomWidget(i);return a&&u},g.prototype.$isAnnotationVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),u=this.$getAnnotation(i).style.display!=="none";return a&&u},g.prototype.$getFoldWidget=function(i){var a=this.lines.get(i),u=a.element;return u.childNodes[1]},g.prototype.$getCustomWidget=function(i){var a=this.lines.get(i),u=a.element;return u.childNodes[3]},g.prototype.$getAnnotation=function(i){var a=this.lines.get(i),u=a.element;return u.childNodes[2]},g.prototype.$findNearestFoldLaneWidget=function(i){if(this.$isCustomWidgetVisible(i)||this.$isFoldWidgetVisible(i))return i;for(var a=0;i-a>0||i+a<this.lines.getLength()-1;){if(a++,i-a>=0&&this.$isCustomWidgetVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(i+a))return i+a;if(i-a>=0&&this.$isFoldWidgetVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(i+a))return i+a}return null},g.prototype.$findNearestAnnotation=function(i){if(this.$isAnnotationVisible(i))return i;for(var a=0;i-a>0||i+a<this.lines.getLength()-1;){if(a++,i-a>=0&&this.$isAnnotationVisible(i-a))return i-a;if(i+a<=this.lines.getLength()-1&&this.$isAnnotationVisible(i+a))return i+a}return null},g.prototype.$focusFoldWidget=function(i){if(i!=null){var a=this.$getFoldWidget(i);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$focusCustomWidget=function(i){if(i!=null){var a=this.$getCustomWidget(i);a&&(a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus())}},g.prototype.$focusAnnotation=function(i){if(i!=null){var a=this.$getAnnotation(i);a.classList.add(this.editor.renderer.keyboardFocusClassName),a.focus()}},g.prototype.$blurFoldWidget=function(i){var a=this.$getFoldWidget(i);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$blurCustomWidget=function(i){var a=this.$getCustomWidget(i);a&&(a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur())},g.prototype.$blurAnnotation=function(i){var a=this.$getAnnotation(i);a.classList.remove(this.editor.renderer.keyboardFocusClassName),a.blur()},g.prototype.$moveFoldWidgetUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveFoldWidgetDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isFoldWidgetVisible(i)||this.$isCustomWidgetVisible(i)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=i,this.$isFoldWidgetVisible(i)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},g.prototype.$moveAnnotationUp=function(){for(var i=this.activeRowIndex;i>0;)if(i--,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$moveAnnotationDown=function(){for(var i=this.activeRowIndex;i<this.lines.getLength()-1;)if(i++,this.$isAnnotationVisible(i)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);return}},g.prototype.$findClosestNumber=function(i,a,u){return i===null?a:a===null||Math.abs(u-i)<=Math.abs(u-a)?i:a},g.prototype.$switchLane=function(i){switch(i){case"annotation":if(this.activeLane==="annotation")break;var a=this.$findNearestAnnotation(this.activeRowIndex);if(a==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=a,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var u=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(u===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=u,this.$isCustomWidgetVisible(u)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},g.prototype.$rowIndexToRow=function(i){var a=this.lines.get(i);return a?a.row:null},g.prototype.$rowToRowIndex=function(i){for(var a=0;a<this.lines.getLength();a++){var u=this.lines.get(a);if(u.row==i)return a}return null},g})();r.GutterKeyboardHandler=w;var p=(function(){function g(i,a){this.gutterKeyboardHandler=a,this.domEvent=i}return g.prototype.getKey=function(){return d.keyCodeToString(this.domEvent.keyCode)},g.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},g.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},g.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},g})();r.GutterKeyboardEvent=p}),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(n,r,h){var d=this&&this.__values||function($){var _=typeof Symbol=="function"&&Symbol.iterator,D=_&&$[_],z=0;if(D)return D.call($);if($&&typeof $.length=="number")return{next:function(){return $&&z>=$.length&&($=void 0),{value:$&&$[z++],done:!$}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")},f=n("./lib/oop"),w=n("./lib/dom"),p=n("./lib/lang"),g=n("./lib/useragent"),i=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,u=n("./mouse/fold_handler").FoldHandler,c=n("./keyboard/keybinding").KeyBinding,o=n("./edit_session").EditSession,l=n("./search").Search,m=n("./range").Range,b=n("./lib/event_emitter").EventEmitter,S=n("./commands/command_manager").CommandManager,E=n("./commands/default_commands").commands,M=n("./config"),k=n("./token_iterator").TokenIterator,x=n("./keyboard/gutter_handler").GutterKeyboardHandler,R=n("./config").nls,I=n("./clipboard"),O=n("./lib/keys"),L=n("./lib/event"),W=n("./tooltip").HoverTooltip,F=(function(){function $(_,D,z){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=_.getContainerElement();this.container=U,this.renderer=_,this.commands=new S(g.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new i(_.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new u(this)),this.keyBinding=new c(this),this.$search=new l().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=p.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(G,Z){Z._$emitInputEvent.schedule(31)}),this.setSession(D||z&&z.session||new o("")),M.resetOptions(this),z&&this.setOptions(z),M._signal("editor",this)}return $.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},$.prototype.startOperation=function(_){this.session.startOperation(_)},$.prototype.endOperation=function(_){this.session.endOperation(_)},$.prototype.onStartOperation=function(_){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,_||(this.previousCommand=null)},$.prototype.onEndOperation=function(_){if(this.curOp&&this.session){if(_&&_.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var D=this.curOp.command,z=D&&D.scrollIntoView;if(z){switch(z){case"center-animate":z="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var U=this.selection.getRange(),G=this.renderer.layerConfig;(U.start.row>=G.lastRow||U.end.row<=G.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}z=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},$.prototype.$historyTracker=function(_){if(this.$mergeUndoDeltas){var D=this.prevOp,z=this.$mergeableCommands,U=D.command&&_.command.name==D.command.name;if(_.command.name=="insertstring"){var G=_.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),U=U&&this.mergeNextCommand&&(!/\s/.test(G)||/\s/.test(D.args)),this.mergeNextCommand=!0}else U=U&&z.indexOf(_.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:z.indexOf(_.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(_,D){if(_&&typeof _=="string"&&_!="ace"){this.$keybindingId=_;var z=this;M.loadModule(["keybinding",_],function(U){z.$keybindingId==_&&z.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(_),D&&D()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(_){if(this.session!=_){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var z=this.session.getSelection();z.off("changeCursor",this.$onCursorChange),z.off("changeSelection",this.$onSelectionChange)}this.session=_,_?(this.$onDocumentChange=this.onDocumentChange.bind(this),_.on("change",this.$onDocumentChange),this.renderer.setSession(_),this.$onChangeMode=this.onChangeMode.bind(this),_.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),_.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),_.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),_.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),_.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),_.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=_.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(_)),this._signal("changeSession",{session:_,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),_&&_._signal("changeEditor",{editor:this}),_&&(_.$editor=this),_&&!_.destroyed&&_.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(_,D){return this.session.doc.setValue(_),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),_},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(_){this.renderer.onResize(_)},$.prototype.setTheme=function(_,D){this.renderer.setTheme(_,D)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(_,D){this.renderer.setStyle(_,D)},$.prototype.unsetStyle=function(_){this.renderer.unsetStyle(_)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(_){this.setOption("fontSize",_)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var _=this;this.$highlightPending=!0,setTimeout(function(){_.$highlightPending=!1;var D=_.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var z=_.getCursorPosition(),U=_.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(_),Z=D.getMatchingBracketRanges(z,G);if(!Z){var te=new k(D,z.row,z.column),he=te.getCurrentToken();if(he&&/\b(?:tag-open|tag-name)/.test(he.type)){var ne=D.getMatchingTags(z);ne&&(Z=[ne.openTagName.isEmpty()?ne.openTag:ne.openTagName,ne.closeTagName.isEmpty()?ne.closeTag:ne.closeTagName])}}if(!Z&&D.$mode.getMatching&&(Z=D.$mode.getMatching(_.session)),!Z){_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide();return}var le="ace_bracket";Array.isArray(Z)?Z.length==1&&(le="ace_error_bracket"):Z=[Z],Z.length==2&&(m.comparePoints(Z[0].end,Z[1].start)==0?Z=[m.fromPoints(Z[0].start,Z[1].end)]:m.comparePoints(Z[0].start,Z[1].end)==0&&(Z=[m.fromPoints(Z[1].start,Z[0].end)])),D.$bracketHighlight={ranges:Z,markerIds:Z.map(function(ue){return D.addMarker(ue,le,"text")})},_.getHighlightIndentGuides()&&_.renderer.$textLayer.$highlightIndentGuide()}},50)}},$.prototype.focus=function(){this.textInput.focus()},$.prototype.isFocused=function(){return this.textInput.isFocused()},$.prototype.blur=function(){this.textInput.blur()},$.prototype.onFocus=function(_){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",_))},$.prototype.onBlur=function(_){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",_))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(_){var D=this.session.$useWrapMode,z=_.start.row==_.end.row?_.end.row:1/0;this.renderer.updateLines(_.start.row,z,D),this._signal("change",_),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(_){var D=_.data;this.renderer.updateLines(D.first,D.last)},$.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},$.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},$.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},$.prototype.$updateHighlightActiveLine=function(){var _=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(D=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),_.$highlightLineMarker&&!D)_.removeMarker(_.$highlightLineMarker.id),_.$highlightLineMarker=null;else if(!_.$highlightLineMarker&&D){var z=new m(D.row,D.column,D.row,1/0);z.id=_.addMarker(z,"ace_active-line","screenLine"),_.$highlightLineMarker=z}else D&&(_.$highlightLineMarker.start.row=D.row,_.$highlightLineMarker.end.row=D.row,_.$highlightLineMarker.start.column=D.column,_._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(_){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var z=this.selection.getRange(),U=this.getSelectionStyle();D.$selectionMarker=D.addMarker(z,"ace_selection",U)}var G=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(G),this._signal("changeSelection")},$.prototype.$getSelectionHighLightRegexp=function(){var _=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var z=D.start.column,U=D.end.column,G=_.getLine(D.start.row),Z=G.substring(z,U);if(!(Z.length>5e3||!/[\w\d]/.test(Z))){var te=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:Z}),he=G.substring(z-1,U+1);if(te.test(he))return te}}},$.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},$.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},$.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},$.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},$.prototype.onChangeMode=function(_){this.renderer.updateText(),this._emit("changeMode",_)},$.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},$.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},$.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},$.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},$.prototype.getCopyText=function(){var _=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),z=!1;if(!_&&this.$copyWithEmptySelection){z=!0;for(var U=this.selection.getAllRanges(),G=0;G<U.length;G++){var Z=U[G];G&&U[G-1].start.row==Z.start.row||(_+=this.session.getLine(Z.start.row)+D)}}var te={text:_};return this._signal("copy",te),I.lineMode=z?te.text:!1,te.text},$.prototype.onCopy=function(){this.commands.exec("copy",this)},$.prototype.onCut=function(){this.commands.exec("cut",this)},$.prototype.onPaste=function(_,D){var z={text:_,event:D};this.commands.exec("paste",this,z)},$.prototype.$handlePaste=function(_){typeof _=="string"&&(_={text:_}),this._signal("paste",_);var D=_.text,z=D===I.lineMode,U=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)z?U.insert({row:this.selection.lead.row,column:0},D):this.insert(D);else if(z)this.selection.rangeList.ranges.forEach(function(le){U.insert({row:le.start.row,column:0},D)});else{var G=D.split(/\r\n|\r|\n/),Z=this.selection.rangeList.ranges,te=G.length==2&&(!G[0]||!G[1]);if(G.length!=Z.length||te)return this.commands.exec("insertstring",this,D);for(var he=Z.length;he--;){var ne=Z[he];ne.isEmpty()||U.remove(ne),U.insert(ne.start,G[he])}}},$.prototype.execCommand=function(_,D){return this.commands.exec(_,this,D)},$.prototype.insert=function(_,D){var z=this.session,U=z.getMode(),G=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var Z=U.transformAction(z.getState(G.row),"insertion",this,z,_);Z&&(_!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),_=Z.text)}if(_==" "&&(_=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&_.indexOf(`
|
217
|
+
`)==-1){var te=m.fromPoints(G,G);te.end.column+=_.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(_==`
|
218
|
+
`||_==`\r
|
219
|
+
`){var ue=z.getLine(G.row);if(G.column>ue.search(/\S|$/)){var he=ue.substr(G.column).search(/\S|$/);z.doc.removeInLine(G.row,G.column,G.column+he)}}this.clearSelection();var ne=G.column,le=z.getState(G.row),ue=z.getLine(G.row),ce=U.checkOutdent(le,ue,_);if(z.insert(G,_),Z&&Z.selection&&(Z.selection.length==2?this.selection.setSelectionRange(new m(G.row,ne+Z.selection[0],G.row,ne+Z.selection[1])):this.selection.setSelectionRange(new m(G.row+Z.selection[0],Z.selection[1],G.row+Z.selection[2],Z.selection[3]))),this.$enableAutoIndent){if(z.getDocument().isNewLine(_)){var ge=U.getNextLineIndent(le,ue.slice(0,G.column),z.getTabString());z.insert({row:G.row+1,column:0},ge)}ce&&U.autoOutdent(le,z,G.row)}},$.prototype.autoIndent=function(){for(var _=this.session,D=_.getMode(),z=this.selection.isEmpty()?[new m(0,0,_.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",Z="",te=_.getTabString(),he=0;he<z.length;he++)for(var ne=z[he].start.row,le=z[he].end.row,ue=ne;ue<=le;ue++){ue>0&&(U=_.getState(ue-1),G=_.getLine(ue-1),Z=D.getNextLineIndent(U,G,te));var ce=_.getLine(ue),ge=D.$getIndent(ce);if(Z!==ge){if(ge.length>0){var Ae=new m(ue,0,ue,ge.length);_.remove(Ae)}Z.length>0&&_.insert({row:ue,column:0},Z)}D.autoOutdent(U,_,ue)}},$.prototype.onTextInput=function(_,D){if(!D)return this.keyBinding.onTextInput(_);this.startOperation({command:{name:"insertstring"}});var z=this.applyComposition.bind(this,_,D);this.selection.rangeCount?this.forEachSelection(z):z(),this.endOperation()},$.prototype.applyComposition=function(_,D){if(D.extendLeft||D.extendRight){var z=this.selection.getRange();z.start.column-=D.extendLeft,z.end.column+=D.extendRight,z.start.column<0&&(z.start.row--,z.start.column+=this.session.getLine(z.start.row).length+1),this.selection.setRange(z),!_&&!z.isEmpty()&&this.remove()}if((_||!this.selection.isEmpty())&&this.insert(_,!0),D.restoreStart||D.restoreEnd){var z=this.selection.getRange();z.start.column-=D.restoreStart,z.end.column-=D.restoreEnd,this.selection.setRange(z)}},$.prototype.onCommandKey=function(_,D,z){return this.keyBinding.onCommandKey(_,D,z)},$.prototype.setOverwrite=function(_){this.session.setOverwrite(_)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(_){this.setOption("scrollSpeed",_)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(_){this.setOption("dragDelay",_)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(_){this.setOption("selectionStyle",_)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(_){this.setOption("highlightActiveLine",_)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(_){this.setOption("highlightGutterLine",_)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(_){this.setOption("highlightSelectedWord",_)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(_){this.renderer.setAnimatedScroll(_)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(_){this.renderer.setShowInvisibles(_)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(_){this.renderer.setDisplayIndentGuides(_)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(_){this.renderer.setHighlightIndentGuides(_)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(_){this.renderer.setShowPrintMargin(_)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(_){this.renderer.setPrintMarginColumn(_)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(_){this.setOption("readOnly",_)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(_){this.setOption("behavioursEnabled",_)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(_){this.setOption("wrapBehavioursEnabled",_)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(_){this.setOption("showFoldWidgets",_)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(_){this.setOption("fadeFoldWidgets",_)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(_){this.selection.isEmpty()&&(_=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var z=this.session,U=z.getState(D.start.row),G=z.getMode().transformAction(U,"deletion",this,z,D);if(D.end.column===0){var Z=z.getTextRange(D);if(Z[Z.length-1]==`
|
220
|
+
`){var te=z.getLine(D.end.row);/^\s+$/.test(te)&&(D.end.column=te.length)}}G&&(D=G)}this.session.remove(D),this.clearSelection()},$.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},$.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var _=this.getSelectionRange();_.start.column==_.end.column&&_.start.row==_.end.row&&(_.end.column=0,_.end.row++),this.session.remove(_),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var _=this.getCursorPosition();this.insert(`
|
221
|
+
`),this.moveCursorToPosition(_)},$.prototype.setGhostText=function(_,D){this.renderer.setGhostText(_,D)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var _=this.getCursorPosition(),D=_.column;if(D!==0){var z=this.session.getLine(_.row),U,G;D<z.length?(U=z.charAt(D)+z.charAt(D-1),G=new m(_.row,D-1,_.row,D+1)):(U=z.charAt(D-1)+z.charAt(D-2),G=new m(_.row,D-2,_.row,D)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},$.prototype.toLowerCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),z=this.session.getTextRange(D);this.session.replace(D,z.toLowerCase()),this.selection.setSelectionRange(_)},$.prototype.toUpperCase=function(){var _=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),z=this.session.getTextRange(D);this.session.replace(D,z.toUpperCase()),this.selection.setSelectionRange(_)},$.prototype.indent=function(){var _=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var z=this.$getSelectedRows();_.indentRows(z.first,z.last," ");return}else if(D.start.column<D.end.column){var U=_.getTextRange(D);if(!/^\s+$/.test(U)){var z=this.$getSelectedRows();_.indentRows(z.first,z.last," ");return}}var G=_.getLine(D.start.row),Z=D.start,te=_.getTabSize(),he=_.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,le=p.stringRepeat(" ",ne);else{for(var ne=he%te;G[D.start.column-1]==" "&≠)D.start.column--,ne--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},$.prototype.blockIndent=function(){var _=this.$getSelectedRows();this.session.indentRows(_.first,_.last," ")},$.prototype.blockOutdent=function(){var _=this.session.getSelection();this.session.outdentRows(_.getRange())},$.prototype.sortLines=function(){for(var _=this.$getSelectedRows(),D=this.session,z=[],U=_.first;U<=_.last;U++)z.push(D.getLine(U));z.sort(function(te,he){return te.toLowerCase()<he.toLowerCase()?-1:te.toLowerCase()>he.toLowerCase()?1:0});for(var G=new m(0,0,0,0),U=_.first;U<=_.last;U++){var Z=D.getLine(U);G.start.row=U,G.end.row=U,G.end.column=Z.length,D.replace(G,z[U-_.first])}},$.prototype.toggleCommentLines=function(){var _=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(_,this.session,D.first,D.last)},$.prototype.toggleBlockComment=function(){var _=this.getCursorPosition(),D=this.session.getState(_.row),z=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,z,_)},$.prototype.getNumberAt=function(_,D){var z=/[\-]?[0-9]+(?:\.[0-9]+)?/g;z.lastIndex=0;for(var U=this.session.getLine(_);z.lastIndex<D;){var G=z.exec(U);if(G.index<=D&&G.index+G[0].length>=D){var Z={value:G[0],start:G.index,end:G.index+G[0].length};return Z}}return null},$.prototype.modifyNumber=function(_){var D=this.selection.getCursor().row,z=this.selection.getCursor().column,U=new m(D,z-1,D,z),G=this.session.getTextRange(U);if(!isNaN(parseFloat(G))&&isFinite(G)){var Z=this.getNumberAt(D,z);if(Z){var te=Z.value.indexOf(".")>=0?Z.start+Z.value.indexOf(".")+1:Z.end,he=Z.start+Z.value.length-te,ne=parseFloat(Z.value);ne*=Math.pow(10,he),te!==Z.end&&z<te?_*=Math.pow(10,Z.end-z-1):_*=Math.pow(10,Z.end-z),ne+=_,ne/=Math.pow(10,he);var le=ne.toFixed(he),ue=new m(D,Z.start,D,Z.end);this.session.replace(ue,le),this.moveCursorTo(D,Math.max(Z.start+1,z+le.length-Z.value.length))}}else this.toggleWord()},$.prototype.toggleWord=function(){var _=this.selection.getCursor().row,D=this.selection.getCursor().column;this.selection.selectWord();var z=this.getSelectedText(),U=this.selection.getWordRange().start.column,G=z.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),Z=D-U-1;Z<0&&(Z=0);var te=0,he=0,ne=this;z.match(/[A-Za-z0-9_]+/)&&G.forEach(function(Ke,dt){he=te+Ke.length,Z>=te&&Z<=he&&(z=Ke,ne.selection.clearSelection(),ne.moveCursorTo(_,te+U),ne.selection.selectTo(_,he+U)),te=he});for(var le=this.$toggleWordPairs,ue,ce=0;ce<le.length;ce++)for(var ge=le[ce],Ae=0;Ae<=1;Ae++){var Te=+!Ae,Re=z.match(new RegExp("^\\s?_?("+p.escapeRegExp(ge[Ae])+")\\s?$","i"));if(Re){var Xe=z.match(new RegExp("([_]|^|\\s)("+p.escapeRegExp(Re[1])+")($|\\s)","g"));Xe&&(ue=z.replace(new RegExp(p.escapeRegExp(ge[Ae]),"i"),function(Ke){var dt=ge[Te];return Ke.toUpperCase()==Ke?dt=dt.toUpperCase():Ke.charAt(0).toUpperCase()==Ke.charAt(0)&&(dt=dt.substr(0,0)+ge[Te].charAt(0).toUpperCase()+dt.substr(1)),dt}),this.insert(ue),ue="")}}},$.prototype.findLinkAt=function(_,D){var z,U,G=this.session.getLine(_),Z=G.split(/((?:https?|ftp):\/\/[\S]+)/),te=D;te<0&&(te=0);var he=0,ne=0,le;try{for(var ue=d(Z),ce=ue.next();!ce.done;ce=ue.next()){var ge=ce.value;if(ne=he+ge.length,te>=he&&te<=ne&&ge.match(/((?:https?|ftp):\/\/[\S]+)/)){le=ge.replace(/[\s:.,'";}\]]+$/,"");break}he=ne}}catch(Ae){z={error:Ae}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(z)throw z.error}}return le},$.prototype.openLink=function(){var _=this.selection.getCursor(),D=this.findLinkAt(_.row,_.column);return D&&window.open(D,"_blank"),D!=null},$.prototype.removeLines=function(){var _=this.$getSelectedRows();this.session.removeFullLines(_.first,_.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var _=this.selection,D=this.session,z=_.getRange(),U=_.isBackwards();if(z.isEmpty()){var G=z.start.row;D.duplicateLines(G,G)}else{var Z=U?z.start:z.end,te=D.insert(Z,D.getTextRange(z));z.start=Z,z.end=te,_.setSelectionRange(z,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(_,D,z){return this.session.moveText(_,D,z)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(_,D){var z,U,G=this.selection;if(!G.inMultiSelectMode||this.inVirtualSelectionMode){var Z=G.toOrientedRange();z=this.$getSelectedRows(Z),U=this.session.$moveLines(z.first,z.last,D?0:_),D&&_==-1&&(U=0),Z.moveBy(U,0),G.fromOrientedRange(Z)}else{var te=G.rangeList.ranges;G.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var he=0,ne=0,le=te.length,ue=0;ue<le;ue++){var ce=ue;te[ue].moveBy(he,0),z=this.$getSelectedRows(te[ue]);for(var ge=z.first,Ae=z.last;++ue<le;){ne&&te[ue].moveBy(ne,0);var Te=this.$getSelectedRows(te[ue]);if(D&&Te.first!=Ae||!D&&Te.first>Ae+1)break;Ae=Te.last}for(ue--,he=this.session.$moveLines(ge,Ae,D?0:_),D&&_==-1&&(ce=ue+1);ce<=ue;)te[ce].moveBy(he,0),ce++;D||(he=0),ne+=he}G.fromOrientedRange(G.ranges[0]),G.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},$.prototype.$getSelectedRows=function(_){return _=(_||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(_.start.row),last:this.session.getRowFoldEnd(_.end.row)}},$.prototype.onCompositionStart=function(_){this.renderer.showComposition(_)},$.prototype.onCompositionUpdate=function(_){this.renderer.setCompositionText(_)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(_){return _>=this.getFirstVisibleRow()&&_<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(_){return _>=this.renderer.getFirstFullyVisibleRow()&&_<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(_,D){var z=this.renderer,U=this.renderer.layerConfig,G=_*Math.floor(U.height/U.lineHeight);D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(G,0)}):D===!1&&(this.selection.moveCursorBy(G,0),this.selection.clearSelection());var Z=z.scrollTop;z.scrollBy(0,G*U.lineHeight),D!=null&&z.scrollCursorIntoView(null,.5),z.animateScrolling(Z)},$.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},$.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},$.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},$.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},$.prototype.scrollPageDown=function(){this.$moveByPage(1)},$.prototype.scrollPageUp=function(){this.$moveByPage(-1)},$.prototype.scrollToRow=function(_){this.renderer.scrollToRow(_)},$.prototype.scrollToLine=function(_,D,z,U){this.renderer.scrollToLine(_,D,z,U)},$.prototype.centerSelection=function(){var _=this.getSelectionRange(),D={row:Math.floor(_.start.row+(_.end.row-_.start.row)/2),column:Math.floor(_.start.column+(_.end.column-_.start.column)/2)};this.renderer.alignCursor(D,.5)},$.prototype.getCursorPosition=function(){return this.selection.getCursor()},$.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},$.prototype.getSelectionRange=function(){return this.selection.getRange()},$.prototype.selectAll=function(){this.selection.selectAll()},$.prototype.clearSelection=function(){this.selection.clearSelection()},$.prototype.moveCursorTo=function(_,D){this.selection.moveCursorTo(_,D)},$.prototype.moveCursorToPosition=function(_){this.selection.moveCursorToPosition(_)},$.prototype.jumpToMatching=function(_,D){var z=this.getCursorPosition(),U=new k(this.session,z.row,z.column),G=U.getCurrentToken(),Z=0;G&&G.type.indexOf("tag-name")!==-1&&(G=U.stepBackward());var te=G||U.stepForward();if(te){var he,ne=!1,le={},ue=z.column-te.start,ce,ge={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(te.value.match(/[{}()\[\]]/g)){for(;ue<te.value.length&&!ne;ue++)if(ge[te.value[ue]])switch(ce=ge[te.value[ue]]+"."+te.type.replace("rparen","lparen"),isNaN(le[ce])&&(le[ce]=0),te.value[ue]){case"(":case"[":case"{":le[ce]++;break;case")":case"]":case"}":le[ce]--,le[ce]===-1&&(he="bracket",ne=!0);break}}else te.type.indexOf("tag-name")!==-1&&(isNaN(le[te.value])&&(le[te.value]=0),G.value==="<"&&Z>1?le[te.value]++:G.value==="</"&&le[te.value]--,le[te.value]===-1&&(he="tag",ne=!0));ne||(G=te,Z++,te=U.stepForward(),ue=0)}while(te&&!ne);if(he){var Ae,Te;if(he==="bracket")Ae=this.session.getBracketRange(z),Ae||(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),Te=Ae.start,(D||Te.row===z.row&&Math.abs(Te.column-z.column)<2)&&(Ae=this.session.getBracketRange(Te)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ae=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ae.compare(z.row,z.column)===0){var Re=this.session.getMatchingTags(z);Re&&(Re.openTag.contains(z.row,z.column)?(Ae=Re.closeTag,Te=Ae.start):(Ae=Re.openTag,Re.closeTag.start.row===z.row&&Re.closeTag.start.column===z.column?Te=Ae.end:Te=Ae.start))}Te=Te||Ae.start}Te=Ae&&Ae.cursor||Te,Te&&(_?Ae&&D?this.selection.setRange(Ae):Ae&&Ae.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Te.row,Te.column):this.selection.moveTo(Te.row,Te.column))}}},$.prototype.gotoLine=function(_,D,z){this.selection.clearSelection(),this.session.unfold({row:_-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(_-1,D||0),this.isRowFullyVisible(_-1)||this.scrollToLine(_-1,!0,z)},$.prototype.navigateTo=function(_,D){this.selection.moveTo(_,D)},$.prototype.navigateUp=function(_){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-_||-1,0)},$.prototype.navigateDown=function(_){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(_||1,0)},$.prototype.navigateLeft=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateRight=function(_){if(this.selection.isEmpty())for(_=_||1;_--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},$.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},$.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},$.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},$.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},$.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},$.prototype.replace=function(_,D){D&&this.$search.set(D);var z=this.$search.find(this.session),U=0;return z&&(this.$tryReplace(z,_)&&(U=1),this.selection.setSelectionRange(z),this.renderer.scrollSelectionIntoView(z.start,z.end)),U},$.prototype.replaceAll=function(_,D){D&&this.$search.set(D);var z=this.$search.findAll(this.session),U=0;if(!z.length)return U;var G=this.getSelectionRange();this.selection.moveTo(0,0);for(var Z=z.length-1;Z>=0;--Z)this.$tryReplace(z[Z],_)&&U++;return this.selection.setSelectionRange(G),U},$.prototype.$tryReplace=function(_,D){var z=this.session.getTextRange(_);return D=this.$search.replace(z,D),D!==null?(_.end=this.session.replace(_,D),_):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(_,D,z){D||(D={}),typeof _=="string"||_ instanceof RegExp?D.needle=_:typeof _=="object"&&f.mixin(D,_);var U=this.selection.getRange();D.needle==null&&(_=this.session.getTextRange(U)||this.$search.$options.needle,_||(U=this.session.getWordRange(U.start.row,U.start.column),_=this.session.getTextRange(U)),this.$search.set({needle:_})),this.$search.set(D),D.start||this.$search.set({start:U});var G=this.$search.find(this.session);if(D.preventScroll)return G;if(G)return this.revealRange(G,z),G;D.backwards?U.start=U.end:U.end=U.start,this.selection.setRange(U)},$.prototype.findNext=function(_,D){this.find({skipCurrent:!0,backwards:!1},_,D)},$.prototype.findPrevious=function(_,D){this.find(_,{skipCurrent:!0,backwards:!0},D)},$.prototype.revealRange=function(_,D){this.session.unfold(_),this.selection.setSelectionRange(_);var z=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(_.start,_.end,.5),D!==!1&&this.renderer.animateScrolling(z)},$.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},$.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(_){_.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},$.prototype.setAutoScrollEditorIntoView=function(_){if(_){var D,z=this,U=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var G=this.$scrollAnchor;G.style.cssText="position:absolute",this.container.insertBefore(G,this.container.firstChild);var Z=this.on("changeSelection",function(){U=!0}),te=this.renderer.on("beforeRender",function(){U&&(D=z.renderer.container.getBoundingClientRect())}),he=this.renderer.on("afterRender",function(){if(U&&D&&(z.isFocused()||z.searchBox&&z.searchBox.isFocused())){var ne=z.renderer,le=ne.$cursorLayer.$pixelPos,ue=ne.layerConfig,ce=le.top-ue.offset;le.top>=0&&ce+D.top<0?U=!0:le.top<ue.height&&le.top+D.top+ue.lineHeight>window.innerHeight?U=!1:U=null,U!=null&&(G.style.top=ce+"px",G.style.left=le.left+"px",G.style.height=ue.lineHeight+"px",G.scrollIntoView(U)),U=D=null}});this.setAutoScrollEditorIntoView=function(ne){ne||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",Z),this.renderer.off("afterRender",he),this.renderer.off("beforeRender",te))}}},$.prototype.$resetCursorStyle=function(){var _=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(_)),D.isBlinking=!this.$readOnly&&_!="wide",w.setCssClass(D.element,"ace_slim-cursors",/slim/.test(_)))},$.prototype.prompt=function(_,D,z){var U=this;M.loadModule("ace/ext/prompt",function(G){G.prompt(U,_,D,z)})},$})();F.$uid=0,F.prototype.curOp=null,F.prototype.prevOp={},F.prototype.$mergeableCommands=["backspace","del","insertstring"],F.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],f.implement(F.prototype,b),M.defineOptions(F.prototype,"editor",{selectionStyle:{set:function($){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:$})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function($){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function($){var _=this;if(this.textInput.setReadOnly($),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(z){var U=!1;if(z&&z.type=="keydown"){if(z&&z.key&&!z.ctrlKey&&!z.metaKey&&(z.key==" "&&z.preventDefault(),U=z.key.length==1),!U)return}else z&&z.type!=="exec"&&(U=!0);if(U){_.hoverTooltip||(_.hoverTooltip=new W);var G=w.createElement("div");G.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),_.hoverTooltip.isOpen||_.hoverTooltip.showForRange(_,_.getSelectionRange(),G)}else _.hoverTooltip&&_.hoverTooltip.isOpen&&_.hoverTooltip.hide()});var D=this.textInput.getElement();$?(L.addListener(D,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(L.removeListener(D,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function($){this.textInput.setCopyWithEmptySelection($)},initialValue:!1},cursorStyle:{set:function($){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function($){this.setAutoScrollEditorIntoView($)}},keyboardHandler:{set:function($){this.setKeyboardHandler($)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function($){this.session.setValue($)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function($){this.setSession($)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function($){this.renderer.$gutterLayer.setShowLineNumbers($),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),$&&this.$relativeLineNumbers?N.attach(this):N.detach(this)},initialValue:!0},relativeLineNumbers:{set:function($){this.$showLineNumbers&&$?N.attach(this):N.detach(this)}},placeholder:{set:function($){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var _=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(_&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),w.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!_&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),w.addCssClass(this.container,"ace_hasPlaceholder");var D=w.createElement("div");D.className="ace_placeholder",D.textContent=this.$placeholder||"",this.renderer.placeholderNode=D,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!_&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var _={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(U){U.blur(),U.renderer.scroller.focus()},readOnly:!0},D=function(U){if(U.target==this.renderer.scroller&&U.keyCode===O.enter){U.preventDefault();var G=this.getCursorPosition().row;this.isRowVisible(G)||this.scrollToLine(G,!0,!0),this.focus()}},z;$?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(g.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",R("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",R("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",D.bind(this)),this.commands.addCommand(_),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",R("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",R("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),z||(z=new x(this)),z.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",D.bind(this)),this.commands.removeCommand(_),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),z&&z.removeListener())},initialValue:!1},textInputAriaLabel:{set:function($){this.$textInputAriaLabel=$},initialValue:""},enableMobileMenu:{set:function($){this.$enableMobileMenu=$},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var N={getText:function($,_){return(Math.abs($.selection.lead.row-_)||_+1+(_<9?"·":""))+""},getWidth:function($,_,D){return Math.max(_.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function($,_){_.renderer.$loop.schedule(_.renderer.CHANGE_GUTTER)},attach:function($){$.renderer.$gutterLayer.$renderer=this,$.on("changeSelection",this.update),this.update(null,$)},detach:function($){$.renderer.$gutterLayer.$renderer==this&&($.renderer.$gutterLayer.$renderer=null),$.off("changeSelection",this.update),this.update(null,$)}};r.Editor=F}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,h){var d=n("../lib/dom"),f=(function(){function w(p,g){this.element=p,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(p){d.translate(this.element,0,-(p.firstRowScreen*p.lineHeight%this.canvasHeight)-p.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(p,g){return Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(p,g,i){var a=g.firstRowScreen*g.lineHeight,u=Math.floor(a/this.canvasHeight),c=i.documentToScreenRow(p,0)*g.lineHeight;return c-u*this.canvasHeight},w.prototype.computeLineHeight=function(p,g,i){return g.lineHeight*i.getRowLineCount(p)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(p){return this.cells[p]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(p){if(Array.isArray(p)){this.cells.push.apply(this.cells,p);for(var g=d.createFragment(this.element),i=0;i<p.length;i++)g.appendChild(p[i].element);this.element.appendChild(g)}else this.cells.push(p),this.element.appendChild(p.element)},w.prototype.unshift=function(p){if(Array.isArray(p)){this.cells.unshift.apply(this.cells,p);for(var g=d.createFragment(this.element),i=0;i<p.length;i++)g.appendChild(p[i].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(p),this.element.insertAdjacentElement("afterbegin",p.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(p){p&&(p.element.remove(),this.cellCache.push(p))},w.prototype.createCell=function(p,g,i,a){var u=this.cellCache.pop();if(!u){var c=d.createElement("div");a&&a(c),this.element.appendChild(c),u={element:c,text:"",row:p}}return u.row=p,u},w})();r.Lines=f}),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(n,r,h){var d=n("../lib/dom"),f=n("../lib/oop"),w=n("../lib/lang"),p=n("../lib/event_emitter").EventEmitter,g=n("./lines").Lines,i=n("../config").nls,a=(function(){function c(o){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",o.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new g(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(o){this.session&&this.session.off("change",this.$updateAnnotations),this.session=o,o&&o.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(o,l)},c.prototype.removeGutterDecoration=function(o,l){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(o,l)},c.prototype.setAnnotations=function(o){this.$annotations=[];for(var l=0;l<o.length;l++){var m=o[l],b=m.row,S=this.$annotations[b];S||(S=this.$annotations[b]={text:[],type:[],displayText:[]});var E=m.text,M=m.text,k=m.type;E=E?w.escapeHTML(E):m.html||"",M=M||m.html||"",S.text.indexOf(E)===-1&&(S.text.push(E),S.type.push(k),S.displayText.push(M));var x=m.className;x?S.className=x:k==="error"?S.className=" ace_error":k==="security"&&!/\bace_error\b/.test(S.className)?S.className=" ace_security":k==="warning"&&!/\bace_(error|security)\b/.test(S.className)?S.className=" ace_warning":k==="info"&&!S.className?S.className=" ace_info":k==="hint"&&!S.className&&(S.className=" ace_hint")}},c.prototype.$updateAnnotations=function(o){if(this.$annotations.length){var l=o.start.row,m=o.end.row-l;if(m!==0)if(o.action=="remove")this.$annotations.splice(l,m+1,null);else{var b=new Array(m+1);b.unshift(l,1),this.$annotations.splice.apply(this.$annotations,b)}}},c.prototype.update=function(o){this.config=o;var l=this.session,m=o.firstRow,b=Math.min(o.lastRow+o.gutterOffset,l.getLength()-1);this.oldLastRow=b,this.config=o,this.$lines.moveContainer(o),this.$updateCursorRow();for(var S=l.getNextFoldLine(m),E=S?S.start.row:1/0,M=null,k=-1,x=m;;){if(x>E&&(x=S.end.row+1,S=l.getNextFoldLine(x,S),E=S?S.start.row:1/0),x>b){for(;this.$lines.getLength()>k+1;)this.$lines.pop();break}M=this.$lines.get(++k),M?M.row=x:(M=this.$lines.createCell(x,o,this.session,u),this.$lines.push(M)),this.$renderCell(M,o,S,x),x++}this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$updateGutterWidth=function(o){var l=this.session,m=l.gutterRenderer||this.$renderer,b=l.$firstLineNumber,S=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(S=l.getLength()+b-1);var E=m?m.getWidth(l,S,o):S.toString().length*o.characterWidth,M=this.$padding||this.$computePadding();E+=M.left+M.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var o=this.session.selection.getCursor();this.$cursorRow!==o.row&&(this.$cursorRow=o.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var o=this.session.selection.cursor.row;if(this.$cursorRow=o,!(this.$cursorCell&&this.$cursorCell.row==o)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var l=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<l.length;m++){var b=l[m];if(b.row>=this.$cursorRow){if(b.row>this.$cursorRow){var S=this.session.getFoldLine(this.$cursorRow);if(m>0&&S&&S.start.row==l[m-1].row)b=l[m-1];else break}b.element.className="ace_gutter-active-line "+b.element.className,this.$cursorCell=b;break}}}}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$updateCursorRow(),this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var m=Math.min(o.lastRow+o.gutterOffset,this.session.getLength()-1),b=this.oldLastRow;if(this.oldLastRow=m,!l||b<o.firstRow)return this.update(o);if(m<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var S=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);S>0;S--)this.$lines.shift();if(b>m)for(var S=this.session.getFoldedRowCount(m+1,b);S>0;S--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLines(o,o.firstRow,l.firstRow-1)),m>b&&this.$lines.push(this.$renderLines(o,b+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(o)},c.prototype.$renderLines=function(o,l,m){for(var b=[],S=l,E=this.session.getNextFoldLine(S),M=E?E.start.row:1/0;S>M&&(S=E.end.row+1,E=this.session.getNextFoldLine(S,E),M=E?E.start.row:1/0),!(S>m);){var k=this.$lines.createCell(S,o,this.session,u);this.$renderCell(k,o,E,S),b.push(k),S++}return b},c.prototype.$renderCell=function(o,l,m,b){var S=o.element,E=this.session,M=S.childNodes[0],k=S.childNodes[1],x=S.childNodes[2],R=S.childNodes[3],I=x.firstChild,O=E.$firstLineNumber,L=E.$breakpoints,W=E.$decorations,F=E.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&E.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,_=l.lineHeight+"px",D=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",z=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",U=(F?F.getText(E,b):b+O).toString();if(this.$highlightGutterLine&&(b==this.$cursorRow||m&&b<this.$cursorRow&&b>=$&&this.$cursorRow<=m.end.row)&&(D+="ace_gutter-active-line ",this.$cursorCell!=o&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=o)),L[b]&&(D+=L[b]),W[b]&&(D+=W[b]),this.$annotations[b]&&b!==$&&(D+=this.$annotations[b].className),N){var G=N[b];G==null&&(G=N[b]=E.getFoldWidget(b))}if(G){var Z="ace_fold-widget ace_"+G,te=G=="start"&&b==$&&b<m.end.row;if(te){Z+=" ace_closed";for(var he="",ne=!1,le=b+1;le<=m.end.row;le++)if(this.$annotations[le]){if(this.$annotations[le].className===" ace_error"){ne=!0,he=" ace_error_fold";break}this.$annotations[le].className===" ace_security"?(ne=!0,he=" ace_security_fold"):this.$annotations[le].className===" ace_warning"&&he!==" ace_security_fold"&&(ne=!0,he=" ace_warning_fold")}D+=he}else Z+=" ace_open";k.className!=Z&&(k.className=Z),d.setStyle(k.style,"height",_),d.setStyle(k.style,"display","inline-block"),k.setAttribute("role","button"),k.setAttribute("tabindex","-1");var ue=E.getFoldWidgetRange(b);ue?k.setAttribute("aria-label",i("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[ue.start.row+1,ue.end.row+1])):m?k.setAttribute("aria-label",i("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):k.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),te?(k.setAttribute("aria-expanded","false"),k.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(k.setAttribute("aria-expanded","true"),k.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else k&&(d.setStyle(k.style,"display","none"),k.setAttribute("tabindex","0"),k.removeAttribute("role"),k.removeAttribute("aria-label"));var ce=this.session.$gutterCustomWidgets[b];if(ce?this.$addCustomWidget(b,ce,o):R&&this.$removeCustomWidget(b,o),ne&&this.$showFoldedAnnotations){x.className="ace_gutter_annotation",I.className=z,I.className+=he,d.setStyle(I.style,"height",_),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",_);var ge;switch(he){case" ace_error_fold":ge=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security_fold":ge=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning_fold":ge=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break}x.setAttribute("aria-label",ge),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else if(this.$annotations[b]){x.className="ace_gutter_annotation",I.className=z,this.$useSvgGutterIcons?I.className+=this.$annotations[b].className:S.classList.add(this.$annotations[b].className.replace(" ","")),d.setStyle(I.style,"height",_),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",_);var ge;switch(this.$annotations[b].className){case" ace_error":ge=i("gutter.annotation.aria-label.error","Error, read annotations row $0",[U]);break;case" ace_security":ge=i("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[U]);break;case" ace_warning":ge=i("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[U]);break;case" ace_info":ge=i("gutter.annotation.aria-label.info","Info, read annotations row $0",[U]);break;case" ace_hint":ge=i("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[U]);break}x.setAttribute("aria-label",ge),x.setAttribute("tabindex","-1"),x.setAttribute("role","button")}else d.setStyle(x.style,"display","none"),x.removeAttribute("aria-label"),x.removeAttribute("role"),x.setAttribute("tabindex","0");return U!==M.data&&(M.data=U),S.className!=D&&(S.className=D),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(b,l,E)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(b,l,E)+"px"),o.text=U,x.style.display==="none"&&k.style.display==="none"&&!ce?o.element.setAttribute("aria-hidden",!0):o.element.setAttribute("aria-hidden",!1),o},c.prototype.setHighlightGutterLine=function(o){this.$highlightGutterLine=o},c.prototype.setShowLineNumbers=function(o){this.$renderer=!o&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(o){o?d.addCssClass(this.element,"ace_folding-enabled"):d.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=o,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$hideFoldWidget=function(o,l){var m=l||this.$getGutterCell(o);if(m&&m.element){var b=m.element.childNodes[1];b&&d.setStyle(b.style,"display","none")}},c.prototype.$showFoldWidget=function(o,l){var m=l||this.$getGutterCell(o);if(m&&m.element){var b=m.element.childNodes[1];b&&this.session.foldWidgets&&this.session.foldWidgets[m.row]&&d.setStyle(b.style,"display","inline-block")}},c.prototype.$getGutterCell=function(o){var l=this.$lines.cells,m=this.session.documentToScreenRow(o,0);return l[o-this.config.firstRowScreen-(o-m)]},c.prototype.$addCustomWidget=function(o,l,m){var b=l.className,S=l.label,E=l.title,M=l.callbacks;this.session.$gutterCustomWidgets[o]={className:b,label:S,title:E,callbacks:M},this.$hideFoldWidget(o,m);var k=m||this.$getGutterCell(o);if(k&&k.element){var x=k.element.querySelector(".ace_custom-widget");x&&x.remove(),x=d.createElement("span"),x.className="ace_custom-widget ".concat(b),x.setAttribute("tabindex","-1"),x.setAttribute("role","button"),x.setAttribute("aria-label",S),x.setAttribute("title",E),d.setStyle(x.style,"display","inline-block"),d.setStyle(x.style,"height","inherit"),M&&M.onClick&&x.addEventListener("click",function(R){M.onClick(R,o),R.stopPropagation()}),k.element.appendChild(x)}},c.prototype.$removeCustomWidget=function(o,l){delete this.session.$gutterCustomWidgets[o],this.$showFoldWidget(o,l);var m=l||this.$getGutterCell(o);if(m&&m.element){var b=m.element.querySelector(".ace_custom-widget");b&&m.element.removeChild(b)}},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var o=d.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(o.borderLeftWidth)||0)+(parseInt(o.paddingLeft)||0)+1,this.$padding.right=(parseInt(o.borderRightWidth)||0)+(parseInt(o.paddingRight)||0),this.$padding},c.prototype.getRegion=function(o){var l=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(o.x<l.left+m.left)return"markers";if(this.$showFoldWidgets&&o.x>m.right-l.right)return"foldWidgets"},c})();a.prototype.$fixedWidth=!1,a.prototype.$highlightGutterLine=!0,a.prototype.$renderer="",a.prototype.$showLineNumbers=!0,a.prototype.$showFoldWidgets=!0,f.implement(a.prototype,p);function u(c){var o=document.createTextNode("");c.appendChild(o);var l=d.createElement("span");c.appendChild(l);var m=d.createElement("span");c.appendChild(m);var b=d.createElement("span");return m.appendChild(b),c}r.Gutter=a}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,h){var d=n("../range").Range,f=n("../lib/dom"),w=(function(){function g(i){this.element=f.createElement("div"),this.element.className="ace_layer ace_marker-layer",i.appendChild(this.element)}return g.prototype.setPadding=function(i){this.$padding=i},g.prototype.setSession=function(i){this.session=i},g.prototype.setMarkers=function(i){this.markers=i},g.prototype.elt=function(i,a){var u=this.i!=-1&&this.element.childNodes[this.i];u?this.i++:(u=document.createElement("div"),this.element.appendChild(u),this.i=-1),u.style.cssText=a,u.className=i},g.prototype.update=function(i){if(i){this.config=i,this.i=0;var a;for(var u in this.markers){var c=this.markers[u];if(!c.range){c.update(a,this,this.session,i);continue}var o=c.range.clipRows(i.firstRow,i.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),c.renderer){var l=this.$getTop(o.start.row,i),m=this.$padding+o.start.column*i.characterWidth;c.renderer(a,o,m,l,i)}else c.type=="fullLine"?this.drawFullLineMarker(a,o,c.clazz,i):c.type=="screenLine"?this.drawScreenLineMarker(a,o,c.clazz,i):o.isMultiLine()?c.type=="text"?this.drawTextMarker(a,o,c.clazz,i):this.drawMultiLineMarker(a,o,c.clazz,i):this.drawSingleLineMarker(a,o,c.clazz+" ace_start ace_br15",i)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},g.prototype.$getTop=function(i,a){return(i-a.firstRowScreen)*a.lineHeight},g.prototype.drawTextMarker=function(i,a,u,c,o){for(var l=this.session,m=a.start.row,b=a.end.row,S=m,E=0,M=0,k=l.getScreenLastRowColumn(S),x=new d(S,a.start.column,S,M);S<=b;S++)x.start.row=x.end.row=S,x.start.column=S==m?a.start.column:l.getRowWrapIndent(S),x.end.column=k,E=M,M=k,k=S+1<b?l.getScreenLastRowColumn(S+1):S==b?0:a.end.column,this.drawSingleLineMarker(i,x,u+(S==m?" ace_start":"")+" ace_br"+p(S==m||S==m+1&&a.start.column,E<M,M>k,S==b),c,S==b?0:1,o)},g.prototype.drawMultiLineMarker=function(i,a,u,c,o){var l=this.$padding,m=c.lineHeight,b=this.$getTop(a.start.row,c),S=l+a.start.column*c.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var E=a.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(i,E,u+" ace_br1 ace_start",c,null,o)}else this.elt(u+" ace_br1 ace_start","height:"+m+"px;right:"+l+"px;top:"+b+"px;left:"+S+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var E=a.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(i,E,u+" ace_br12",c,null,o)}else{b=this.$getTop(a.end.row,c);var M=a.end.column*c.characterWidth;this.elt(u+" ace_br12","height:"+m+"px;width:"+M+"px;top:"+b+"px;left:"+l+"px;"+(o||""))}if(m=(a.end.row-a.start.row-1)*c.lineHeight,!(m<=0)){b=this.$getTop(a.start.row+1,c);var k=(a.start.column?1:0)|(a.end.column?0:8);this.elt(u+(k?" ace_br"+k:""),"height:"+m+"px;right:"+l+"px;top:"+b+"px;left:"+l+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(i,a,u,c,o,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(i,a,u,c,o,l);var m=c.lineHeight,b=(a.end.column+(o||0)-a.start.column)*c.characterWidth,S=this.$getTop(a.start.row,c),E=this.$padding+a.start.column*c.characterWidth;this.elt(u,"height:"+m+"px;width:"+b+"px;top:"+S+"px;left:"+E+"px;"+(l||""))},g.prototype.drawBidiSingleLineMarker=function(i,a,u,c,o,l){var m=c.lineHeight,b=this.$getTop(a.start.row,c),S=this.$padding,E=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);E.forEach(function(M){this.elt(u,"height:"+m+"px;width:"+(M.width+(o||0))+"px;top:"+b+"px;left:"+(S+M.left)+"px;"+(l||""))},this)},g.prototype.drawFullLineMarker=function(i,a,u,c,o){var l=this.$getTop(a.start.row,c),m=c.lineHeight;a.start.row!=a.end.row&&(m+=this.$getTop(a.end.row,c)-l),this.elt(u,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(i,a,u,c,o){var l=this.$getTop(a.start.row,c),m=c.lineHeight;this.elt(u,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g})();w.prototype.$padding=0;function p(g,i,a,u){return(g?1:0)|(i?2:0)|(a?4:0)|(u?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,h){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(f){return d.has(f)}}),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(n,r,h){var d=n("../lib/oop"),f=n("../lib/dom"),w=n("../lib/lang"),p=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,i=n("../config").nls,a=n("./text_util").isTextToken,u=(function(){function c(o){this.dom=f,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new p(this.element)}return c.prototype.$updateEolChar=function(){var o=this.session.doc,l=o.getNewLineCharacter()==`
|
222
|
+
`&&o.getNewLineMode()!="windows",m=l?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},c.prototype.setPadding=function(o){this.$padding=o,this.element.style.margin="0 "+o+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(o){this.$fontMetrics=o,this.$fontMetrics.on("changeCharacterSize",(function(l){this._signal("changeCharacterSize",l)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(o){this.session=o,o&&this.$computeTabString()},c.prototype.setShowInvisibles=function(o){return this.showInvisibles==o?!1:(this.showInvisibles=o,typeof o=="string"?(this.showSpaces=/tab/i.test(o),this.showTabs=/space/i.test(o),this.showEOL=/eol/i.test(o)):this.showSpaces=this.showTabs=this.showEOL=o,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(o){return this.displayIndentGuides==o?!1:(this.displayIndentGuides=o,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(o){return this.$highlightIndentGuides===o?!1:(this.$highlightIndentGuides=o,o)},c.prototype.$computeTabString=function(){var o=this.session.getTabSize();this.tabSize=o;for(var l=this.$tabStrings=[0],m=1;m<o+1;m++)if(this.showTabs){var b=this.dom.createElement("span");b.className="ace_invisible ace_invisible_tab",b.textContent=w.stringRepeat(this.TAB_CHAR,m),l.push(b)}else l.push(this.dom.createTextNode(w.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var S="ace_indent-guide",E=this.showSpaces?" ace_invisible ace_invisible_space":"",M=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),k=this.showTabs?" ace_invisible ace_invisible_tab":"",x=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):M,b=this.dom.createElement("span");b.className=S+E,b.textContent=M,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=S+k,b.textContent=x,this.$tabStrings[" "]=b}},c.prototype.updateLines=function(o,l,m){if(this.config.lastRow!=o.lastRow||this.config.firstRow!=o.firstRow)return this.update(o);this.config=o;for(var b=Math.max(l,o.firstRow),S=Math.min(m,o.lastRow),E=this.element.childNodes,M=0,k=o.firstRow;k<b;k++){var x=this.session.getFoldLine(k);if(x)if(x.containsRow(b)){b=x.start.row;break}else k=x.end.row;M++}for(var R=!1,k=b,x=this.session.getNextFoldLine(k),I=x?x.start.row:1/0;k>I&&(k=x.end.row+1,x=this.session.getNextFoldLine(k,x),I=x?x.start.row:1/0),!(k>S);){var O=E[M++];if(O){this.dom.removeChildren(O),this.$renderLine(O,k,k==I?x:!1),R&&(O.style.top=this.$lines.computeLineTop(k,o,this.session)+"px");var L=o.lineHeight*this.session.getRowLength(k)+"px";O.style.height!=L&&(R=!0,O.style.height=L)}k++}if(R)for(;M<this.$lines.cells.length;){var W=this.$lines.cells[M++];W.element.style.top=this.$lines.computeLineTop(W.row,o,this.session)+"px"}},c.prototype.scrollLines=function(o){var l=this.config;if(this.config=o,this.$lines.pageChanged(l,o))return this.update(o);this.$lines.moveContainer(o);var m=o.lastRow,b=l?l.lastRow:-1;if(!l||b<o.firstRow)return this.update(o);if(m<l.firstRow)return this.update(o);if(!l||l.lastRow<o.firstRow)return this.update(o);if(o.lastRow<l.firstRow)return this.update(o);if(l.firstRow<o.firstRow)for(var S=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);S>0;S--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var S=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);S>0;S--)this.$lines.pop();o.firstRow<l.firstRow&&this.$lines.unshift(this.$renderLinesFragment(o,o.firstRow,l.firstRow-1)),o.lastRow>l.lastRow&&this.$lines.push(this.$renderLinesFragment(o,l.lastRow+1,o.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(o,l,m){for(var b=[],S=l,E=this.session.getNextFoldLine(S),M=E?E.start.row:1/0;S>M&&(S=E.end.row+1,E=this.session.getNextFoldLine(S,E),M=E?E.start.row:1/0),!(S>m);){var k=this.$lines.createCell(S,o,this.session),x=k.element;this.dom.removeChildren(x),f.setStyle(x.style,"height",this.$lines.computeLineHeight(S,o,this.session)+"px"),f.setStyle(x.style,"top",this.$lines.computeLineTop(S,o,this.session)+"px"),this.$renderLine(x,S,S==M?E:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",b.push(k),S++}return b},c.prototype.update=function(o){this.$lines.moveContainer(o),this.config=o;for(var l=o.firstRow,m=o.lastRow,b=this.$lines;b.getLength();)b.pop();b.push(this.$renderLinesFragment(o,l,m))},c.prototype.$renderToken=function(o,l,m,b){for(var S=this,E=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,M=this.dom.createFragment(this.element),k,x=0;k=E.exec(b);){var R=k[1],I=k[2],O=k[3],L=k[4],W=k[5];if(!(!S.showSpaces&&I)){var F=x!=k.index?b.slice(x,k.index):"";if(x=k.index+k[0].length,F&&M.appendChild(this.dom.createTextNode(F,this.element)),R){var N=S.session.getScreenTabSize(l+k.index),$=S.$tabStrings[N].cloneNode(!0);$.charCount=1,M.appendChild($),l+=N-1}else if(I)if(S.showSpaces){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space",_.textContent=w.stringRepeat(S.SPACE_CHAR,I.length),M.appendChild(_)}else M.appendChild(this.dom.createTextNode(I,this.element));else if(O){var _=this.dom.createElement("span");_.className="ace_invisible ace_invisible_space ace_invalid",_.textContent=w.stringRepeat(S.SPACE_CHAR,O.length),M.appendChild(_)}else if(L){l+=1;var _=this.dom.createElement("span");_.style.width=S.config.characterWidth*2+"px",_.className=S.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",_.textContent=S.showSpaces?S.SPACE_CHAR:L,M.appendChild(_)}else if(W){l+=1;var _=this.dom.createElement("span");_.style.width=S.config.characterWidth*2+"px",_.className="ace_cjk",_.textContent=W,M.appendChild(_)}}}if(M.appendChild(this.dom.createTextNode(x?b.slice(x):b,this.element)),a(m.type))o.appendChild(M);else{var D="ace_"+m.type.replace(/\./g," ace_"),_=this.dom.createElement("span");m.type=="fold"&&(_.style.width=m.value.length*this.config.characterWidth+"px",_.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),_.className=D,_.appendChild(M),o.appendChild(_)}return l+b.length},c.prototype.renderIndentGuide=function(o,l,m){var b=l.search(this.$indentGuideRe);if(b<=0||b>=m)return l;if(l[0]==" "){b-=b%this.tabSize;for(var S=b/this.tabSize,E=0;E<S;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(b)}else if(l[0]==" "){for(var E=0;E<b;E++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(b)}return this.$highlightIndentGuide(),l},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var o=this.session.doc.$lines;if(o){var l=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(l.row))[0].length,b=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:b,start:l.row};var S=this.session.$bracketHighlight;if(S){for(var E=this.session.$bracketHighlight.ranges,M=0;M<E.length;M++)if(l.row!==E[M].start.row){this.$highlightIndentGuideMarker.end=E[M].start.row+1,l.row>E[M].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var M=l.row+1;M<o.length;M++){var k=o[M],x=/^\s*/.exec(k)[0].length;if(k!==""&&(this.$highlightIndentGuideMarker.end=M,x<=m))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var o=this.element.querySelectorAll(".ace_indent-guide-active"),l=0;l<o.length;l++)o[l].classList.remove("ace_indent-guide-active")},c.prototype.$setIndentGuideActive=function(o,l){var m=this.session.doc.getLine(o.row);if(m!==""){var b=o.element;if(o.element.classList&&o.element.classList.contains("ace_line_group"))if(o.element.childNodes.length>0)b=o.element.childNodes[0];else return;var S=b.childNodes;if(S){var E=S[l-1];E&&E.classList&&E.classList.contains("ace_indent-guide")&&E.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var o=this.$lines.cells;this.$clearActiveIndentGuide();var l=this.$highlightIndentGuideMarker.indentLevel;if(l!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<o.length;m++){var b=o[m];if(this.$highlightIndentGuideMarker.end&&b.row>=this.$highlightIndentGuideMarker.start+1){if(b.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,l)}}else for(var m=o.length-1;m>=0;m--){var b=o[m];if(this.$highlightIndentGuideMarker.end&&b.row<this.$highlightIndentGuideMarker.start){if(b.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(b,l)}}}},c.prototype.$createLineElement=function(o){var l=this.dom.createElement("div");return l.className="ace_line",l.style.height=this.config.lineHeight+"px",l},c.prototype.$renderWrappedLine=function(o,l,m){var b=0,S=0,E=m[0],M=0,k=this.$createLineElement();o.appendChild(k);for(var x=0;x<l.length;x++){var R=l[x],I=R.value;if(x==0&&this.displayIndentGuides){if(b=I.length,I=this.renderIndentGuide(k,I,E),!I)continue;b-=I.length}if(b+I.length<E)M=this.$renderToken(k,M,R,I),b+=I.length;else{for(;b+I.length>=E;){M=this.$renderToken(k,M,R,I.substring(0,E-b)),I=I.substring(E-b),b=E,k=this.$createLineElement(),o.appendChild(k);var O=this.dom.createTextNode(w.stringRepeat(" ",m.indent),this.element);O.charCount=0,k.appendChild(O),S++,M=0,E=m[S]||Number.MAX_VALUE}I.length!=0&&(b+=I.length,M=this.$renderToken(k,M,R,I))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(k,M,null,"",!0)},c.prototype.$renderSimpleLine=function(o,l){for(var m=0,b=0;b<l.length;b++){var S=l[b],E=S.value;if(!(b==0&&this.displayIndentGuides&&(E=this.renderIndentGuide(o,E),!E))){if(m+E.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,S,E);m=this.$renderToken(o,m,S,E)}}},c.prototype.$renderOverflowMessage=function(o,l,m,b,S){m&&this.$renderToken(o,l,m,b.slice(0,this.MAX_LINE_LENGTH-l));var E=this.dom.createElement("span");E.className="ace_inline_button ace_keyword ace_toggle_wrap",E.textContent=S?"<hide>":"<click to see more...>",o.appendChild(E)},c.prototype.$renderLine=function(o,l,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(l)),m)var b=this.$getFoldLineTokens(l,m);else var b=this.session.getTokens(l);var S=o;if(b.length){var E=this.session.getRowSplitData(l);if(E&&E.length){this.$renderWrappedLine(o,b,E);var S=o.lastChild}else{var S=o;this.$useLineGroups()&&(S=this.$createLineElement(),o.appendChild(S)),this.$renderSimpleLine(S,b)}}else this.$useLineGroups()&&(S=this.$createLineElement(),o.appendChild(S));if(this.showEOL&&S){m&&(l=m.end.row);var M=this.dom.createElement("span");M.className="ace_invisible ace_invisible_eol",M.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,S.appendChild(M)}},c.prototype.$getFoldLineTokens=function(o,l){var m=this.session,b=[];function S(M,k,x){for(var R=0,I=0;I+M[R].value.length<k;)if(I+=M[R].value.length,R++,R==M.length)return;if(I!=k){var O=M[R].value.substring(k-I);O.length>x-k&&(O=O.substring(0,x-k)),b.push({type:M[R].type,value:O}),I=k+O.length,R+=1}for(;I<x&&R<M.length;){var O=M[R].value;O.length+I>x?b.push({type:M[R].type,value:O.substring(0,x-I)}):b.push(M[R]),I+=O.length,R+=1}}var E=m.getTokens(o);return l.walk(function(M,k,x,R,I){M!=null?b.push({type:"fold",value:M}):(I&&(E=m.getTokens(k)),E.length&&S(E,R,x))},l.end.row,this.session.getLine(l.end.row).length),b},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c})();u.prototype.EOF_CHAR="¶",u.prototype.EOL_CHAR_LF="¬",u.prototype.EOL_CHAR_CRLF="¤",u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR="—",u.prototype.SPACE_CHAR="·",u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,d.implement(u.prototype,g),r.Text=u}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,h){var d=n("../lib/dom"),f=(function(){function w(p){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",p.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),d.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return w.prototype.$updateOpacity=function(p){for(var g=this.cursors,i=g.length;i--;)d.setStyle(g[i].style,"opacity",p?"":"0")},w.prototype.$startCssAnimation=function(){for(var p=this.cursors,g=p.length;g--;)p[g].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&d.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},w.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,d.removeCssClass(this.element,"ace_animate-blinking")},w.prototype.setPadding=function(p){this.$padding=p},w.prototype.setSession=function(p){this.session=p},w.prototype.setBlinking=function(p){p!=this.isBlinking&&(this.isBlinking=p,this.restartTimer())},w.prototype.setBlinkInterval=function(p){p!=this.blinkInterval&&(this.blinkInterval=p,this.restartTimer())},w.prototype.setSmoothBlinking=function(p){p!=this.smoothBlinking&&(this.smoothBlinking=p,d.setCssClass(this.element,"ace_smooth-blinking",p),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var p=d.createElement("div");return p.className="ace_cursor",this.element.appendChild(p),this.cursors.push(p),p},w.prototype.removeCursor=function(){if(this.cursors.length>1){var p=this.cursors.pop();return p.parentNode.removeChild(p),p}},w.prototype.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},w.prototype.restartTimer=function(){var p=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),p(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&d.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),d.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var g=(function(){this.timeoutId=setTimeout(function(){p(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){p(!0),g()},this.blinkInterval),g()}},w.prototype.getPixelPosition=function(p,g){if(!this.config||!this.session)return{left:0,top:0};p||(p=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(p),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,p.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),u=(i.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:u}},w.prototype.isCursorInView=function(p,g){return p.top>=0&&p.top<g.maxHeight},w.prototype.update=function(p){this.config=p;var g=this.session.$selectionMarkers,i=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var i=0,u=g.length;i<u;i++){var c=this.getPixelPosition(g[i].cursor,!0);if(!((c.top>p.height+p.offset||c.top<0)&&i>1)){var o=this.cursors[a++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,c,p,g[i],this.session):this.isCursorInView(c,p)?(d.setStyle(l,"display","block"),d.translate(o,c.left,c.top),d.setStyle(l,"width",Math.round(p.characterWidth)+"px"),d.setStyle(l,"height",p.lineHeight+"px")):d.setStyle(l,"display","none")}}for(;this.cursors.length>a;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=c,this.restartTimer()},w.prototype.$setOverwrite=function(p){p!=this.overwrite&&(this.overwrite=p,p?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w})();f.prototype.$padding=0,f.prototype.drawCursor=null,r.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,h){var d=this&&this.__extends||(function(){var o=function(l,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,S){b.__proto__=S}||function(b,S){for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(b[E]=S[E])},o(l,m)};return function(l,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");o(l,m);function b(){this.constructor=l}l.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})(),f=n("./lib/oop"),w=n("./lib/dom"),p=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter,i=32768,a=(function(){function o(l,m){this.element=w.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=w.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addListener(this.element,"scroll",this.onScroll.bind(this)),p.addListener(this.element,"mousedown",p.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o})();f.implement(a.prototype,g);var u=(function(o){d(l,o);function l(m,b){var S=o.call(this,m,"-v")||this;return S.scrollTop=0,S.scrollHeight=0,b.$scrollbarWidth=S.width=w.scrollbarWidth(m.ownerDocument),S.inner.style.width=S.element.style.width=(S.width||15)+5+"px",S.$minWidth=0,S}return l.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(m){this.element.style.height=m+"px"},l.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>i?(this.coeff=i/m,m=i):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},l.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},l})(a);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var c=(function(o){d(l,o);function l(m,b){var S=o.call(this,m,"-h")||this;return S.scrollLeft=0,S.height=b.$scrollbarWidth,S.inner.style.height=S.element.style.height=(S.height||15)+5+"px",S}return l.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.setWidth=function(m){this.element.style.width=m+"px"},l.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},l.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},l})(a);r.ScrollBar=u,r.ScrollBarV=u,r.ScrollBarH=c,r.VScrollBar=u,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,h){var d=this&&this.__extends||(function(){var c=function(o,l){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var S in b)Object.prototype.hasOwnProperty.call(b,S)&&(m[S]=b[S])},c(o,l)};return function(o,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");c(o,l);function m(){this.constructor=o}o.prototype=l===null?Object.create(l):(m.prototype=l.prototype,new m)}})(),f=n("./lib/oop"),w=n("./lib/dom"),p=n("./lib/event"),g=n("./lib/event_emitter").EventEmitter;w.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
223
|
+
position: absolute;
|
224
|
+
background: rgba(128, 128, 128, 0.6);
|
225
|
+
-moz-box-sizing: border-box;
|
226
|
+
box-sizing: border-box;
|
227
|
+
border: 1px solid #bbb;
|
228
|
+
border-radius: 2px;
|
229
|
+
z-index: 8;
|
230
|
+
}
|
231
|
+
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
232
|
+
position: absolute;
|
233
|
+
z-index: 6;
|
234
|
+
background: none;
|
235
|
+
overflow: hidden!important;
|
236
|
+
}
|
237
|
+
.ace_editor>.ace_sb-v {
|
238
|
+
z-index: 6;
|
239
|
+
right: 0;
|
240
|
+
top: 0;
|
241
|
+
width: 12px;
|
242
|
+
}
|
243
|
+
.ace_editor>.ace_sb-v div {
|
244
|
+
z-index: 8;
|
245
|
+
right: 0;
|
246
|
+
width: 100%;
|
247
|
+
}
|
248
|
+
.ace_editor>.ace_sb-h {
|
249
|
+
bottom: 0;
|
250
|
+
left: 0;
|
251
|
+
height: 12px;
|
252
|
+
}
|
253
|
+
.ace_editor>.ace_sb-h div {
|
254
|
+
bottom: 0;
|
255
|
+
height: 100%;
|
256
|
+
}
|
257
|
+
.ace_editor>.ace_sb_grabbed {
|
258
|
+
z-index: 8;
|
259
|
+
background: #000;
|
260
|
+
}`,"ace_scrollbar.css",!1);var i=(function(){function c(o,l){this.element=w.createElement("div"),this.element.className="ace_sb"+l,this.inner=w.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,p.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},c})();f.implement(i.prototype,g);var a=(function(c){d(o,c);function o(l,m){var b=c.call(this,l,"-v")||this;return b.scrollTop=0,b.scrollHeight=0,b.parent=l,b.width=b.VScrollWidth,b.renderer=m,b.inner.style.width=b.element.style.width=(b.width||15)+"px",b.$minWidth=0,b}return o.prototype.onMouseDown=function(l,m){if(l==="mousedown"&&!(p.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,S=m.clientY,E=function(L){S=L.clientY},M=function(){clearInterval(I)},k=m.clientY,x=this.thumbTop,R=function(){if(S!==void 0){var L=b.scrollTopFromThumbTop(x+S-k);L!==b.scrollTop&&b._emit("scroll",{data:L})}};p.capture(this.inner,E,M);var I=setInterval(R,20);return p.preventDefault(m)}var O=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),p.preventDefault(m)}},o.prototype.getHeight=function(){return this.height},o.prototype.scrollTopFromThumbTop=function(l){var m=l*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(l){this.height=Math.max(0,l),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},o.prototype.setScrollHeight=function(l,m){this.pageHeight===l&&!m||(this.pageHeight=l,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},o.prototype.setScrollTop=function(l){this.scrollTop=l,l<0&&(l=0),this.thumbTop=l*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},o})(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var u=(function(c){d(o,c);function o(l,m){var b=c.call(this,l,"-h")||this;return b.scrollLeft=0,b.scrollWidth=0,b.height=b.HScrollHeight,b.inner.style.height=b.element.style.height=(b.height||12)+"px",b.renderer=m,b}return o.prototype.onMouseDown=function(l,m){if(l==="mousedown"&&!(p.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,S=m.clientX,E=function(L){S=L.clientX},M=function(){clearInterval(I)},k=m.clientX,x=this.thumbLeft,R=function(){if(S!==void 0){var L=b.scrollLeftFromThumbLeft(x+S-k);L!==b.scrollLeft&&b._emit("scroll",{data:L})}};p.capture(this.inner,E,M);var I=setInterval(R,20);return p.preventDefault(m)}var O=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),p.preventDefault(m)}},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.scrollLeftFromThumbLeft=function(l){var m=l*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},o.prototype.setWidth=function(l){this.width=Math.max(0,l),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},o.prototype.setScrollWidth=function(l,m){this.pageWidth===l&&!m||(this.pageWidth=l,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},o.prototype.setScrollLeft=function(l){this.scrollLeft=l,l<0&&(l=0),this.thumbLeft=l*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},o})(i);u.prototype.setInnerWidth=u.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=u,r.VScrollBar=a,r.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,h){var d=n("./lib/event"),f=(function(){function w(p,g){this.onRender=p,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var i=this;this._flush=function(a){i.pending=!1;var u=i.changes;if(u&&(d.blockIdle(100),i.changes=0,i.onRender(u)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return w.prototype.schedule=function(p){this.changes=this.changes|p,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(p){var g=this.changes;return this.changes=0,g},w})();r.RenderLoop=f}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,h){var d=n("../lib/oop"),f=n("../lib/dom"),w=n("../lib/lang"),p=n("../lib/event"),g=n("../lib/useragent"),i=n("../lib/event_emitter").EventEmitter,a=512,u=typeof ResizeObserver=="function",c=200,o=(function(){function l(m){this.el=f.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=f.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=f.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",a),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return l.prototype.$setMeasureNodeStyles=function(m,b){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",g.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=b?"hidden":"visible"},l.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===m.width&&b.height===m.height,this._emit("changeCharacterSize",{data:m})}},l.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(b){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},l.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=p.onIdle(function b(){m.checkForSizeChanges(),p.onIdle(b,500)},500)},l.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},l.prototype.$measureSizes=function(m){var b={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/a};return b.width===0||b.height===0?null:b},l.prototype.$measureCharWidth=function(m){this.$main.textContent=w.stringRepeat(m,a);var b=this.$main.getBoundingClientRect();return b.width/a},l.prototype.getCharacterWidth=function(m){var b=this.charSizes[m];return b===void 0&&(b=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),b},l.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},l.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(Number(window.getComputedStyle(m).zoom)||1)*this.$getZoom(m.parentElement)},l.prototype.$initTransformMeasureNodes=function(){var m=function(b,S){return["div",{style:"position: absolute;top:"+b+"px;left:"+S+"px;"}]};this.els=f.buildDom([m(0,0),m(c,0),m(0,c),m(c,c)],this.el)},l.prototype.transformCoordinates=function(m,b){if(m){var S=this.$getZoom(this.el);m=x(1/S,m)}function E(Z,te,he){var ne=Z[1]*te[0]-Z[0]*te[1];return[(-te[1]*he[0]+te[0]*he[1])/ne,(+Z[1]*he[0]-Z[0]*he[1])/ne]}function M(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function k(Z,te){return[Z[0]+te[0],Z[1]+te[1]]}function x(Z,te){return[Z*te[0],Z*te[1]]}this.els||this.$initTransformMeasureNodes();function R(Z){var te=Z.getBoundingClientRect();return[te.left,te.top]}var I=R(this.els[0]),O=R(this.els[1]),L=R(this.els[2]),W=R(this.els[3]),F=E(M(W,O),M(W,L),M(k(O,L),k(W,I))),N=x(1+F[0],M(O,I)),$=x(1+F[1],M(L,I));if(b){var _=b,D=F[0]*_[0]/c+F[1]*_[1]/c+1,z=k(x(_[0],N),x(_[1],$));return k(x(1/D/c,z),I)}var U=M(m,I),G=E(M(N,x(F[0],U)),M($,x(F[1],U)),U);return x(c,G)},l})();o.prototype.$characterSize={width:0,height:0},d.implement(o.prototype,i),r.FontMetrics=o}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,h){h.exports=`
|
261
|
+
.ace_br1 {border-top-left-radius : 3px;}
|
262
|
+
.ace_br2 {border-top-right-radius : 3px;}
|
263
|
+
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
264
|
+
.ace_br4 {border-bottom-right-radius: 3px;}
|
265
|
+
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
266
|
+
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
267
|
+
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
268
|
+
.ace_br8 {border-bottom-left-radius : 3px;}
|
269
|
+
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
270
|
+
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
271
|
+
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
272
|
+
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
273
|
+
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
274
|
+
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
275
|
+
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
276
|
+
|
277
|
+
|
278
|
+
.ace_editor {
|
279
|
+
position: relative;
|
280
|
+
overflow: hidden;
|
281
|
+
padding: 0;
|
282
|
+
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
283
|
+
direction: ltr;
|
284
|
+
text-align: left;
|
285
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
286
|
+
forced-color-adjust: none;
|
287
|
+
}
|
288
|
+
|
289
|
+
.ace_scroller {
|
290
|
+
position: absolute;
|
291
|
+
overflow: hidden;
|
292
|
+
top: 0;
|
293
|
+
bottom: 0;
|
294
|
+
background-color: inherit;
|
295
|
+
-ms-user-select: none;
|
296
|
+
-moz-user-select: none;
|
297
|
+
-webkit-user-select: none;
|
298
|
+
user-select: none;
|
299
|
+
cursor: text;
|
300
|
+
}
|
301
|
+
|
302
|
+
.ace_content {
|
303
|
+
position: absolute;
|
304
|
+
box-sizing: border-box;
|
305
|
+
min-width: 100%;
|
306
|
+
contain: style size layout;
|
307
|
+
font-variant-ligatures: no-common-ligatures;
|
308
|
+
}
|
309
|
+
.ace_invisible {
|
310
|
+
font-variant-ligatures: none;
|
311
|
+
}
|
312
|
+
|
313
|
+
.ace_keyboard-focus:focus {
|
314
|
+
box-shadow: inset 0 0 0 2px #5E9ED6;
|
315
|
+
outline: none;
|
316
|
+
}
|
317
|
+
|
318
|
+
.ace_dragging .ace_scroller:before{
|
319
|
+
position: absolute;
|
320
|
+
top: 0;
|
321
|
+
left: 0;
|
322
|
+
right: 0;
|
323
|
+
bottom: 0;
|
324
|
+
content: '';
|
325
|
+
background: rgba(250, 250, 250, 0.01);
|
326
|
+
z-index: 1000;
|
327
|
+
}
|
328
|
+
.ace_dragging.ace_dark .ace_scroller:before{
|
329
|
+
background: rgba(0, 0, 0, 0.01);
|
330
|
+
}
|
331
|
+
|
332
|
+
.ace_gutter {
|
333
|
+
position: absolute;
|
334
|
+
overflow : hidden;
|
335
|
+
width: auto;
|
336
|
+
top: 0;
|
337
|
+
bottom: 0;
|
338
|
+
left: 0;
|
339
|
+
cursor: default;
|
340
|
+
z-index: 4;
|
341
|
+
-ms-user-select: none;
|
342
|
+
-moz-user-select: none;
|
343
|
+
-webkit-user-select: none;
|
344
|
+
user-select: none;
|
345
|
+
contain: style size layout;
|
346
|
+
}
|
347
|
+
|
348
|
+
.ace_gutter-active-line {
|
349
|
+
position: absolute;
|
350
|
+
left: 0;
|
351
|
+
right: 0;
|
352
|
+
}
|
353
|
+
|
354
|
+
.ace_scroller.ace_scroll-left:after {
|
355
|
+
content: "";
|
356
|
+
position: absolute;
|
357
|
+
top: 0;
|
358
|
+
right: 0;
|
359
|
+
bottom: 0;
|
360
|
+
left: 0;
|
361
|
+
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
362
|
+
pointer-events: none;
|
363
|
+
}
|
364
|
+
|
365
|
+
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
366
|
+
position: absolute;
|
367
|
+
top: 0;
|
368
|
+
left: 0;
|
369
|
+
right: 0;
|
370
|
+
padding-left: 19px;
|
371
|
+
padding-right: 6px;
|
372
|
+
background-repeat: no-repeat;
|
373
|
+
}
|
374
|
+
|
375
|
+
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
376
|
+
margin-left: -14px;
|
377
|
+
float: left;
|
378
|
+
}
|
379
|
+
|
380
|
+
.ace_gutter-cell .ace_gutter_annotation {
|
381
|
+
margin-left: -19px;
|
382
|
+
float: left;
|
383
|
+
}
|
384
|
+
|
385
|
+
.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 {
|
386
|
+
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==");
|
387
|
+
background-repeat: no-repeat;
|
388
|
+
background-position: 2px center;
|
389
|
+
}
|
390
|
+
|
391
|
+
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
392
|
+
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==");
|
393
|
+
background-repeat: no-repeat;
|
394
|
+
background-position: 2px center;
|
395
|
+
}
|
396
|
+
|
397
|
+
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
398
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
399
|
+
background-repeat: no-repeat;
|
400
|
+
background-position: 2px center;
|
401
|
+
}
|
402
|
+
|
403
|
+
.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 {
|
404
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
405
|
+
}
|
406
|
+
|
407
|
+
.ace_icon_svg.ace_error {
|
408
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
409
|
+
background-color: crimson;
|
410
|
+
}
|
411
|
+
.ace_icon_svg.ace_security {
|
412
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
413
|
+
background-color: crimson;
|
414
|
+
}
|
415
|
+
.ace_icon_svg.ace_warning {
|
416
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
417
|
+
background-color: darkorange;
|
418
|
+
}
|
419
|
+
.ace_icon_svg.ace_info {
|
420
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
421
|
+
background-color: royalblue;
|
422
|
+
}
|
423
|
+
.ace_icon_svg.ace_hint {
|
424
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
425
|
+
background-color: silver;
|
426
|
+
}
|
427
|
+
|
428
|
+
.ace_icon_svg.ace_error_fold {
|
429
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
430
|
+
background-color: crimson;
|
431
|
+
}
|
432
|
+
.ace_icon_svg.ace_security_fold {
|
433
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
434
|
+
background-color: crimson;
|
435
|
+
}
|
436
|
+
.ace_icon_svg.ace_warning_fold {
|
437
|
+
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
438
|
+
background-color: darkorange;
|
439
|
+
}
|
440
|
+
|
441
|
+
.ace_scrollbar {
|
442
|
+
contain: strict;
|
443
|
+
position: absolute;
|
444
|
+
right: 0;
|
445
|
+
bottom: 0;
|
446
|
+
z-index: 6;
|
447
|
+
}
|
448
|
+
|
449
|
+
.ace_scrollbar-inner {
|
450
|
+
position: absolute;
|
451
|
+
cursor: text;
|
452
|
+
left: 0;
|
453
|
+
top: 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
.ace_scrollbar-v{
|
457
|
+
overflow-x: hidden;
|
458
|
+
overflow-y: scroll;
|
459
|
+
top: 0;
|
460
|
+
}
|
461
|
+
|
462
|
+
.ace_scrollbar-h {
|
463
|
+
overflow-x: scroll;
|
464
|
+
overflow-y: hidden;
|
465
|
+
left: 0;
|
466
|
+
}
|
467
|
+
|
468
|
+
.ace_print-margin {
|
469
|
+
position: absolute;
|
470
|
+
height: 100%;
|
471
|
+
}
|
472
|
+
|
473
|
+
.ace_text-input {
|
474
|
+
position: absolute;
|
475
|
+
z-index: 0;
|
476
|
+
width: 0.5em;
|
477
|
+
height: 1em;
|
478
|
+
opacity: 0;
|
479
|
+
background: transparent;
|
480
|
+
-moz-appearance: none;
|
481
|
+
appearance: none;
|
482
|
+
border: none;
|
483
|
+
resize: none;
|
484
|
+
outline: none;
|
485
|
+
overflow: hidden;
|
486
|
+
font: inherit;
|
487
|
+
padding: 0 1px;
|
488
|
+
margin: 0 -1px;
|
489
|
+
contain: strict;
|
490
|
+
-ms-user-select: text;
|
491
|
+
-moz-user-select: text;
|
492
|
+
-webkit-user-select: text;
|
493
|
+
user-select: text;
|
494
|
+
/*with \`pre-line\` chrome inserts instead of space*/
|
495
|
+
white-space: pre!important;
|
496
|
+
}
|
497
|
+
.ace_text-input.ace_composition {
|
498
|
+
background: transparent;
|
499
|
+
color: inherit;
|
500
|
+
z-index: 1000;
|
501
|
+
opacity: 1;
|
502
|
+
}
|
503
|
+
.ace_composition_placeholder { color: transparent }
|
504
|
+
.ace_composition_marker {
|
505
|
+
border-bottom: 1px solid;
|
506
|
+
position: absolute;
|
507
|
+
border-radius: 0;
|
508
|
+
margin-top: 1px;
|
509
|
+
}
|
510
|
+
|
511
|
+
[ace_nocontext=true] {
|
512
|
+
transform: none!important;
|
513
|
+
filter: none!important;
|
514
|
+
clip-path: none!important;
|
515
|
+
mask : none!important;
|
516
|
+
contain: none!important;
|
517
|
+
perspective: none!important;
|
518
|
+
mix-blend-mode: initial!important;
|
519
|
+
z-index: auto;
|
520
|
+
}
|
521
|
+
|
522
|
+
.ace_layer {
|
523
|
+
z-index: 1;
|
524
|
+
position: absolute;
|
525
|
+
overflow: hidden;
|
526
|
+
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
527
|
+
word-wrap: normal;
|
528
|
+
white-space: pre;
|
529
|
+
height: 100%;
|
530
|
+
width: 100%;
|
531
|
+
box-sizing: border-box;
|
532
|
+
/* setting pointer-events: auto; on node under the mouse, which changes
|
533
|
+
during scroll, will break mouse wheel scrolling in Safari */
|
534
|
+
pointer-events: none;
|
535
|
+
}
|
536
|
+
|
537
|
+
.ace_gutter-layer {
|
538
|
+
position: relative;
|
539
|
+
width: auto;
|
540
|
+
text-align: right;
|
541
|
+
pointer-events: auto;
|
542
|
+
height: 1000000px;
|
543
|
+
contain: style size layout;
|
544
|
+
}
|
545
|
+
|
546
|
+
.ace_text-layer {
|
547
|
+
font: inherit !important;
|
548
|
+
position: absolute;
|
549
|
+
height: 1000000px;
|
550
|
+
width: 1000000px;
|
551
|
+
contain: style size layout;
|
552
|
+
}
|
553
|
+
|
554
|
+
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
555
|
+
contain: style size layout;
|
556
|
+
position: absolute;
|
557
|
+
top: 0;
|
558
|
+
left: 0;
|
559
|
+
right: 0;
|
560
|
+
}
|
561
|
+
|
562
|
+
.ace_hidpi .ace_text-layer,
|
563
|
+
.ace_hidpi .ace_gutter-layer,
|
564
|
+
.ace_hidpi .ace_content,
|
565
|
+
.ace_hidpi .ace_gutter {
|
566
|
+
contain: strict;
|
567
|
+
}
|
568
|
+
.ace_hidpi .ace_text-layer > .ace_line,
|
569
|
+
.ace_hidpi .ace_text-layer > .ace_line_group {
|
570
|
+
contain: strict;
|
571
|
+
}
|
572
|
+
|
573
|
+
.ace_cjk {
|
574
|
+
display: inline-block;
|
575
|
+
text-align: center;
|
576
|
+
}
|
577
|
+
|
578
|
+
.ace_cursor-layer {
|
579
|
+
z-index: 4;
|
580
|
+
}
|
581
|
+
|
582
|
+
.ace_cursor {
|
583
|
+
z-index: 4;
|
584
|
+
position: absolute;
|
585
|
+
box-sizing: border-box;
|
586
|
+
border-left: 2px solid;
|
587
|
+
/* workaround for smooth cursor repaintng whole screen in chrome */
|
588
|
+
transform: translatez(0);
|
589
|
+
}
|
590
|
+
|
591
|
+
.ace_multiselect .ace_cursor {
|
592
|
+
border-left-width: 1px;
|
593
|
+
}
|
594
|
+
|
595
|
+
.ace_slim-cursors .ace_cursor {
|
596
|
+
border-left-width: 1px;
|
597
|
+
}
|
598
|
+
|
599
|
+
.ace_overwrite-cursors .ace_cursor {
|
600
|
+
border-left-width: 0;
|
601
|
+
border-bottom: 1px solid;
|
602
|
+
}
|
603
|
+
|
604
|
+
.ace_hidden-cursors .ace_cursor {
|
605
|
+
opacity: 0.2;
|
606
|
+
}
|
607
|
+
|
608
|
+
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
609
|
+
opacity: 0;
|
610
|
+
}
|
611
|
+
|
612
|
+
.ace_smooth-blinking .ace_cursor {
|
613
|
+
transition: opacity 0.18s;
|
614
|
+
}
|
615
|
+
|
616
|
+
.ace_animate-blinking .ace_cursor {
|
617
|
+
animation-duration: 1000ms;
|
618
|
+
animation-timing-function: step-end;
|
619
|
+
animation-name: blink-ace-animate;
|
620
|
+
animation-iteration-count: infinite;
|
621
|
+
}
|
622
|
+
|
623
|
+
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
624
|
+
animation-duration: 1000ms;
|
625
|
+
animation-timing-function: ease-in-out;
|
626
|
+
animation-name: blink-ace-animate-smooth;
|
627
|
+
}
|
628
|
+
|
629
|
+
@keyframes blink-ace-animate {
|
630
|
+
from, to { opacity: 1; }
|
631
|
+
60% { opacity: 0; }
|
632
|
+
}
|
633
|
+
|
634
|
+
@keyframes blink-ace-animate-smooth {
|
635
|
+
from, to { opacity: 1; }
|
636
|
+
45% { opacity: 1; }
|
637
|
+
60% { opacity: 0; }
|
638
|
+
85% { opacity: 0; }
|
639
|
+
}
|
640
|
+
|
641
|
+
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
642
|
+
position: absolute;
|
643
|
+
z-index: 3;
|
644
|
+
}
|
645
|
+
|
646
|
+
.ace_marker-layer .ace_selection {
|
647
|
+
position: absolute;
|
648
|
+
z-index: 5;
|
649
|
+
}
|
650
|
+
|
651
|
+
.ace_marker-layer .ace_bracket {
|
652
|
+
position: absolute;
|
653
|
+
z-index: 6;
|
654
|
+
}
|
655
|
+
|
656
|
+
.ace_marker-layer .ace_error_bracket {
|
657
|
+
position: absolute;
|
658
|
+
border-bottom: 1px solid #DE5555;
|
659
|
+
border-radius: 0;
|
660
|
+
}
|
661
|
+
|
662
|
+
.ace_marker-layer .ace_active-line {
|
663
|
+
position: absolute;
|
664
|
+
z-index: 2;
|
665
|
+
}
|
666
|
+
|
667
|
+
.ace_marker-layer .ace_selected-word {
|
668
|
+
position: absolute;
|
669
|
+
z-index: 4;
|
670
|
+
box-sizing: border-box;
|
671
|
+
}
|
672
|
+
|
673
|
+
.ace_line .ace_fold {
|
674
|
+
box-sizing: border-box;
|
675
|
+
|
676
|
+
display: inline-block;
|
677
|
+
height: 11px;
|
678
|
+
margin-top: -2px;
|
679
|
+
vertical-align: middle;
|
680
|
+
|
681
|
+
background-image:
|
682
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
683
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
684
|
+
background-repeat: no-repeat, repeat-x;
|
685
|
+
background-position: center center, top left;
|
686
|
+
color: transparent;
|
687
|
+
|
688
|
+
border: 1px solid black;
|
689
|
+
border-radius: 2px;
|
690
|
+
|
691
|
+
cursor: pointer;
|
692
|
+
pointer-events: auto;
|
693
|
+
}
|
694
|
+
|
695
|
+
.ace_dark .ace_fold {
|
696
|
+
}
|
697
|
+
|
698
|
+
.ace_fold:hover{
|
699
|
+
background-image:
|
700
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
701
|
+
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
702
|
+
}
|
703
|
+
|
704
|
+
.ace_tooltip {
|
705
|
+
background-color: #f5f5f5;
|
706
|
+
border: 1px solid gray;
|
707
|
+
border-radius: 1px;
|
708
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
709
|
+
color: black;
|
710
|
+
padding: 3px 4px;
|
711
|
+
position: absolute;
|
712
|
+
z-index: 999999;
|
713
|
+
box-sizing: border-box;
|
714
|
+
cursor: default;
|
715
|
+
white-space: pre-wrap;
|
716
|
+
word-wrap: break-word;
|
717
|
+
line-height: normal;
|
718
|
+
font-style: normal;
|
719
|
+
font-weight: normal;
|
720
|
+
letter-spacing: normal;
|
721
|
+
pointer-events: none;
|
722
|
+
overflow: auto;
|
723
|
+
max-width: min(33em, 66vw);
|
724
|
+
overscroll-behavior: contain;
|
725
|
+
}
|
726
|
+
.ace_tooltip pre {
|
727
|
+
white-space: pre-wrap;
|
728
|
+
}
|
729
|
+
|
730
|
+
.ace_tooltip.ace_dark {
|
731
|
+
background-color: #636363;
|
732
|
+
color: #fff;
|
733
|
+
}
|
734
|
+
|
735
|
+
.ace_tooltip:focus {
|
736
|
+
outline: 1px solid #5E9ED6;
|
737
|
+
}
|
738
|
+
|
739
|
+
.ace_icon {
|
740
|
+
display: inline-block;
|
741
|
+
width: 18px;
|
742
|
+
vertical-align: top;
|
743
|
+
}
|
744
|
+
|
745
|
+
.ace_icon_svg {
|
746
|
+
display: inline-block;
|
747
|
+
width: 12px;
|
748
|
+
vertical-align: top;
|
749
|
+
-webkit-mask-repeat: no-repeat;
|
750
|
+
-webkit-mask-size: 12px;
|
751
|
+
-webkit-mask-position: center;
|
752
|
+
}
|
753
|
+
|
754
|
+
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
755
|
+
padding-right: 13px;
|
756
|
+
}
|
757
|
+
|
758
|
+
.ace_fold-widget, .ace_custom-widget {
|
759
|
+
box-sizing: border-box;
|
760
|
+
|
761
|
+
margin: 0 -12px 0 1px;
|
762
|
+
display: none;
|
763
|
+
width: 11px;
|
764
|
+
vertical-align: top;
|
765
|
+
|
766
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
767
|
+
background-repeat: no-repeat;
|
768
|
+
background-position: center;
|
769
|
+
|
770
|
+
border-radius: 3px;
|
771
|
+
|
772
|
+
border: 1px solid transparent;
|
773
|
+
cursor: pointer;
|
774
|
+
pointer-events: auto;
|
775
|
+
}
|
776
|
+
|
777
|
+
.ace_custom-widget {
|
778
|
+
background: none;
|
779
|
+
}
|
780
|
+
|
781
|
+
.ace_folding-enabled .ace_fold-widget {
|
782
|
+
display: inline-block;
|
783
|
+
}
|
784
|
+
|
785
|
+
.ace_fold-widget.ace_end {
|
786
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
787
|
+
}
|
788
|
+
|
789
|
+
.ace_fold-widget.ace_closed {
|
790
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
791
|
+
}
|
792
|
+
|
793
|
+
.ace_fold-widget:hover {
|
794
|
+
border: 1px solid rgba(0, 0, 0, 0.3);
|
795
|
+
background-color: rgba(255, 255, 255, 0.2);
|
796
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
797
|
+
}
|
798
|
+
|
799
|
+
.ace_fold-widget:active {
|
800
|
+
border: 1px solid rgba(0, 0, 0, 0.4);
|
801
|
+
background-color: rgba(0, 0, 0, 0.05);
|
802
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
803
|
+
}
|
804
|
+
/**
|
805
|
+
* Dark version for fold widgets
|
806
|
+
*/
|
807
|
+
.ace_dark .ace_fold-widget {
|
808
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
809
|
+
}
|
810
|
+
.ace_dark .ace_fold-widget.ace_end {
|
811
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
812
|
+
}
|
813
|
+
.ace_dark .ace_fold-widget.ace_closed {
|
814
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
815
|
+
}
|
816
|
+
.ace_dark .ace_fold-widget:hover {
|
817
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
818
|
+
background-color: rgba(255, 255, 255, 0.1);
|
819
|
+
}
|
820
|
+
.ace_dark .ace_fold-widget:active {
|
821
|
+
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
822
|
+
}
|
823
|
+
|
824
|
+
.ace_inline_button {
|
825
|
+
border: 1px solid lightgray;
|
826
|
+
display: inline-block;
|
827
|
+
margin: -1px 8px;
|
828
|
+
padding: 0 5px;
|
829
|
+
pointer-events: auto;
|
830
|
+
cursor: pointer;
|
831
|
+
}
|
832
|
+
.ace_inline_button:hover {
|
833
|
+
border-color: gray;
|
834
|
+
background: rgba(200,200,200,0.2);
|
835
|
+
display: inline-block;
|
836
|
+
pointer-events: auto;
|
837
|
+
}
|
838
|
+
|
839
|
+
.ace_fold-widget.ace_invalid {
|
840
|
+
background-color: #FFB4B4;
|
841
|
+
border-color: #DE5555;
|
842
|
+
}
|
843
|
+
|
844
|
+
.ace_fade-fold-widgets .ace_fold-widget {
|
845
|
+
transition: opacity 0.4s ease 0.05s;
|
846
|
+
opacity: 0;
|
847
|
+
}
|
848
|
+
|
849
|
+
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
850
|
+
transition: opacity 0.05s ease 0.05s;
|
851
|
+
opacity:1;
|
852
|
+
}
|
853
|
+
|
854
|
+
.ace_underline {
|
855
|
+
text-decoration: underline;
|
856
|
+
}
|
857
|
+
|
858
|
+
.ace_bold {
|
859
|
+
font-weight: bold;
|
860
|
+
}
|
861
|
+
|
862
|
+
.ace_nobold .ace_bold {
|
863
|
+
font-weight: normal;
|
864
|
+
}
|
865
|
+
|
866
|
+
.ace_italic {
|
867
|
+
font-style: italic;
|
868
|
+
}
|
869
|
+
|
870
|
+
|
871
|
+
.ace_error-marker {
|
872
|
+
background-color: rgba(255, 0, 0,0.2);
|
873
|
+
position: absolute;
|
874
|
+
z-index: 9;
|
875
|
+
}
|
876
|
+
|
877
|
+
.ace_highlight-marker {
|
878
|
+
background-color: rgba(255, 255, 0,0.2);
|
879
|
+
position: absolute;
|
880
|
+
z-index: 8;
|
881
|
+
}
|
882
|
+
|
883
|
+
.ace_mobile-menu {
|
884
|
+
position: absolute;
|
885
|
+
line-height: 1.5;
|
886
|
+
border-radius: 4px;
|
887
|
+
-ms-user-select: none;
|
888
|
+
-moz-user-select: none;
|
889
|
+
-webkit-user-select: none;
|
890
|
+
user-select: none;
|
891
|
+
background: white;
|
892
|
+
box-shadow: 1px 3px 2px grey;
|
893
|
+
border: 1px solid #dcdcdc;
|
894
|
+
color: black;
|
895
|
+
}
|
896
|
+
.ace_dark > .ace_mobile-menu {
|
897
|
+
background: #333;
|
898
|
+
color: #ccc;
|
899
|
+
box-shadow: 1px 3px 2px grey;
|
900
|
+
border: 1px solid #444;
|
901
|
+
|
902
|
+
}
|
903
|
+
.ace_mobile-button {
|
904
|
+
padding: 2px;
|
905
|
+
cursor: pointer;
|
906
|
+
overflow: hidden;
|
907
|
+
}
|
908
|
+
.ace_mobile-button:hover {
|
909
|
+
background-color: #eee;
|
910
|
+
opacity:1;
|
911
|
+
}
|
912
|
+
.ace_mobile-button:active {
|
913
|
+
background-color: #ddd;
|
914
|
+
}
|
915
|
+
|
916
|
+
.ace_placeholder {
|
917
|
+
position: relative;
|
918
|
+
font-family: arial;
|
919
|
+
transform: scale(0.9);
|
920
|
+
transform-origin: left;
|
921
|
+
white-space: pre;
|
922
|
+
opacity: 0.7;
|
923
|
+
margin: 0 10px;
|
924
|
+
z-index: 1;
|
925
|
+
}
|
926
|
+
|
927
|
+
.ace_ghost_text {
|
928
|
+
opacity: 0.5;
|
929
|
+
font-style: italic;
|
930
|
+
}
|
931
|
+
|
932
|
+
.ace_ghost_text_container > div {
|
933
|
+
white-space: pre;
|
934
|
+
}
|
935
|
+
|
936
|
+
.ghost_text_line_wrapped::after {
|
937
|
+
content: "↩";
|
938
|
+
position: absolute;
|
939
|
+
}
|
940
|
+
|
941
|
+
.ace_lineWidgetContainer.ace_ghost_text {
|
942
|
+
margin: 0px 4px
|
943
|
+
}
|
944
|
+
|
945
|
+
.ace_screenreader-only {
|
946
|
+
position:absolute;
|
947
|
+
left:-10000px;
|
948
|
+
top:auto;
|
949
|
+
width:1px;
|
950
|
+
height:1px;
|
951
|
+
overflow:hidden;
|
952
|
+
}
|
953
|
+
|
954
|
+
.ace_hidden_token {
|
955
|
+
display: none;
|
956
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,h){var d=n("../lib/dom"),f=n("../lib/oop"),w=n("../lib/event_emitter").EventEmitter,p=(function(){function g(i,a){this.renderer=a,this.pixelRatio=1,this.maxHeight=a.layerConfig.maxHeight,this.lineHeight=a.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(i)}return g.prototype.$createCanvas=function(){this.canvas=d.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},g.prototype.setScrollBarV=function(i){this.$createCanvas(),this.scrollbarV=i,i.element.appendChild(this.canvas),this.setDimensions()},g.prototype.$updateDecorators=function(i){if(typeof this.canvas.getContext!="function")return;var a=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(i);var u=this.canvas.getContext("2d");function c(N,$){return N.priority<$.priority?-1:N.priority>$.priority?1:0}var o=this.renderer.session.$annotations;if(u.clearRect(0,0,this.canvas.width,this.canvas.height),o){var l={info:1,warning:2,error:3};o.forEach(function(N){N.priority=l[N.type]||null}),o=o.sort(c);for(var m=0;m<o.length;m++){var b=o[m].row,S=this.getVerticalOffsetForRow(b),E=S+this.lineHeight,M=Math.round(this.heightRatio*S),k=Math.round(this.heightRatio*E),x=Math.round((M+k)/2),R=k-x;R<this.halfMinDecorationHeight&&(R=this.halfMinDecorationHeight),x-R<0&&(x=R),x+R>this.canvasHeight&&(x=this.canvasHeight-R);var I=x-R,O=x+R,L=O-I;u.fillStyle=a[o[m].type]||null,u.fillRect(0,I,Math.round(this.oneZoneWidth-1),L)}}var W=this.renderer.session.selection.getCursor();if(W){var F=Math.round(this.getVerticalOffsetForRow(W.row)*this.heightRatio);u.fillStyle="rgba(0, 0, 0, 0.5)",u.fillRect(0,F,this.canvasWidth,2)}},g.prototype.getVerticalOffsetForRow=function(i){i=i|0;var a=this.renderer.session.documentToScreenRow(i,0)*this.lineHeight;return a},g.prototype.setDimensions=function(i){i=i||this.renderer.layerConfig,this.maxHeight=i.maxHeight,this.lineHeight=i.lineHeight,this.canvasHeight=i.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},g.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},g.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},g})();f.implement(p.prototype,w),r.Decorator=p}),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(n,r,h){var d=n("./lib/oop"),f=n("./lib/dom"),w=n("./lib/lang"),p=n("./config"),g=n("./layer/gutter").Gutter,i=n("./layer/marker").Marker,a=n("./layer/text").Text,u=n("./layer/cursor").Cursor,c=n("./scrollbar").HScrollBar,o=n("./scrollbar").VScrollBar,l=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,b=n("./renderloop").RenderLoop,S=n("./layer/font_metrics").FontMetrics,E=n("./lib/event_emitter").EventEmitter,M=n("./css/editor-css"),k=n("./layer/decorators").Decorator,x=n("./lib/useragent"),R=n("./layer/text_util").isTextToken;f.importCssString(M,"ace_editor.css",!1);var I=(function(){function O(L,W){var F=this;this.container=L||f.createElement("div"),f.addCssClass(this.container,"ace_editor"),f.HI_DPI&&f.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),p.get("useStrictCSP")==null&&p.set("useStrictCSP",!1),this.$gutter=f.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=f.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=f.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new g(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var N=this.$textLayer=new a(this.content);this.canvas=N.element,this.$markerFront=new i(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function($){F.$scrollAnimation||F.session.setScrollTop($.data-F.scrollMargin.top)}),this.scrollBarH.on("scroll",function($){F.$scrollAnimation||F.session.setScrollLeft($.data-F.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new S(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function($){F.updateCharacterSize(),F.onResize(!0,F.gutterWidth,F.$size.width,F.$size.height),F._signal("changeCharacterSize",$)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!x.isIOS,this.$loop=new b(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),p.resetOptions(this),p._signal("renderer",this)}return O.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(),f.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},O.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(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))},O.prototype.updateLines=function(L,W,F){if(W===void 0&&(W=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRow<W&&(this.$changedLines.lastRow=W)):this.$changedLines={firstRow:L,lastRow:W},this.$changedLines.lastRow<this.layerConfig.firstRow)if(F)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},O.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},O.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},O.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},O.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},O.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},O.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},O.prototype.onResize=function(L,W,F,N){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var $=this.container;N||(N=$.clientHeight||$.scrollHeight),!N&&this.$maxLines&&this.lineHeight>1&&(!$.style.height||$.style.height=="0px")&&($.style.height="1px",N=$.clientHeight||$.scrollHeight),F||(F=$.clientWidth||$.scrollWidth);var _=this.$updateCachedSize(L,W,F,N);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!F&&!N)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(_|this.$changes,!0):this.$loop.schedule(_|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(L,W,F,N){N-=this.$extraHeight||0;var $=0,_=this.$size,D={width:_.width,height:_.height,scrollerHeight:_.scrollerHeight,scrollerWidth:_.scrollerWidth};if(N&&(L||_.height!=N)&&(_.height=N,$|=this.CHANGE_SIZE,_.scrollerHeight=_.height,this.$horizScroll&&(_.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(_.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),F&&(L||_.width!=F)){$|=this.CHANGE_SIZE,_.width=F,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,f.setStyle(this.scrollBarH.element.style,"left",W+"px"),f.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),_.scrollerWidth=Math.max(0,F-W-this.scrollBarV.getWidth()-this.margin.h),f.setStyle(this.$gutter.style,"left",this.margin.left+"px");var z=this.scrollBarV.getWidth()+"px";f.setStyle(this.scrollBarH.element.style,"right",z),f.setStyle(this.scroller.style,"right",z),f.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(_.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&($|=this.CHANGE_FULL)}return _.$dirty=!F||!N,$&&this._signal("resize",D),$},O.prototype.onGutterResize=function(L){var W=this.$showGutter?L:0;W!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,W,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},O.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,W=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(W,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},O.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},O.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=f.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=f.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var W=this.$printMarginEl.style;W.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",W.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},O.prototype.getContainerElement=function(){return this.container},O.prototype.getMouseEventTarget=function(){return this.scroller},O.prototype.getTextAreaContainer=function(){return this.container},O.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,W=this.$composition;if(!this.$keepTextAreaAtCursor&&!W){f.translate(this.textarea,-100,0);return}var F=this.$cursorLayer.$pixelPos;if(F){W&&W.markerRange&&(F=this.$cursorLayer.getPixelPosition(W.markerRange.start,!0));var N=this.layerConfig,$=F.top,_=F.left;$-=N.offset;var D=W&&W.useTextareaForIME||x.isMobile?this.lineHeight:1;if($<0||$>N.height-D){f.translate(this.textarea,0,0);return}var z=1,U=this.$size.height-D;if(!W)$+=this.lineHeight;else if(W.useTextareaForIME){var G=this.textarea.value;z=this.characterWidth*this.session.$getStringScreenWidth(G)[0]}else $+=this.lineHeight+2;_-=this.scrollLeft,_>this.$size.scrollerWidth-z&&(_=this.$size.scrollerWidth-z),_+=this.gutterWidth+this.margin.left,f.setStyle(L,"height",D+"px"),f.setStyle(L,"width",z+"px"),f.translate(this.textarea,Math.min(_,this.$size.scrollerWidth-z),Math.min($,U))}}},O.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},O.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},O.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,W=L.lastRow,F=this.session.documentToScreenRow(W,0)*L.lineHeight;return F-this.session.getScrollTop()>L.height-L.lineHeight?W-1:W},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},O.prototype.setScrollMargin=function(L,W,F,N){var $=this.scrollMargin;$.top=L|0,$.bottom=W|0,$.right=N|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,$.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-$.top),this.updateFull()},O.prototype.setMargin=function(L,W,F,N){var $=this.margin;$.top=L|0,$.bottom=W|0,$.right=N|0,$.left=F|0,$.v=$.top+$.bottom,$.h=$.left+$.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},O.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,W=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(W-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-W&&(L=this.scrollTop+W,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},O.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},O.prototype.freeze=function(){this.$frozen=!0},O.prototype.unfreeze=function(){this.$frozen=!1},O.prototype.$renderChanges=function(L,W){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!W){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var F=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),F.firstRow!=this.layerConfig.firstRow&&F.firstRowScreen==this.layerConfig.firstRowScreen){var N=this.scrollTop+(F.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;N>0&&(this.scrollTop=N,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}F=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),f.translate(this.content,-this.scrollLeft,-F.offset);var $=F.width+2*this.$padding+"px",_=F.minHeight+"px";f.setStyle(this.content.style,"width",$),f.setStyle(this.content.style,"height",_)}if(L&this.CHANGE_H_SCROLL&&(f.translate(this.content,-this.scrollLeft,-F.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(F):this.$textLayer.scrollLines(F),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(F):this.$gutterLayer.scrollLines(F)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F),this.$markerBack.update(F),this.$markerFront.update(F),this.$cursorLayer.update(F),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(F),this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(F),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(F)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(F),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(F),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(F),this._signal("afterRender",L)},O.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,W=this.$maxLines*this.lineHeight,F=Math.min(W,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(F+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&F>this.$maxPixelHeight&&(F=this.$maxPixelHeight);var N=F<=2*this.lineHeight,$=!N&&L>W;if(F!=this.desiredHeight||this.$size.height!=this.desiredHeight||$!=this.$vScroll){$!=this.$vScroll&&(this.$vScroll=$,this.scrollBarV.setVisible($));var _=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,_,F),this.desiredHeight=F,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var L=this.session,W=this.$size,F=W.height<=2*this.lineHeight,N=this.session.getScreenLength(),$=N*this.lineHeight,_=this.$getLongestLine(),D=!F&&(this.$hScrollBarAlwaysVisible||W.scrollerWidth-_-2*this.$padding<0),z=this.$horizScroll!==D;z&&(this.$horizScroll=D,this.scrollBarH.setVisible(D));var U=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),F=W.height<=2*this.lineHeight);var G=W.scrollerHeight+this.lineHeight,Z=!this.$maxLines&&this.$scrollPastEnd?(W.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;$+=Z;var te=this.scrollMargin;this.session.setScrollTop(Math.max(-te.top,Math.min(this.scrollTop,$-W.scrollerHeight+te.bottom))),this.session.setScrollLeft(Math.max(-te.left,Math.min(this.scrollLeft,_+2*this.$padding-W.scrollerWidth+te.right)));var he=!F&&(this.$vScrollBarAlwaysVisible||W.scrollerHeight-$+Z<0||this.scrollTop>te.top),ne=U!==he;ne&&(this.$vScroll=he,this.scrollBarV.setVisible(he));var le=this.scrollTop%this.lineHeight,ue=Math.ceil(G/this.lineHeight)-1,ce=Math.max(0,Math.round((this.scrollTop-le)/this.lineHeight)),ge=ce+ue,Ae,Te,Re=this.lineHeight;ce=L.screenToDocumentRow(ce,0);var Xe=L.getFoldLine(ce);Xe&&(ce=Xe.start.row),Ae=L.documentToScreenRow(ce,0),Te=L.getRowLength(ce)*Re,ge=Math.min(L.screenToDocumentRow(ge,0),L.getLength()-1),G=W.scrollerHeight+L.getRowLength(ge)*Re+Te,le=this.scrollTop-Ae*Re,le<0&&Ae>0&&(Ae=Math.max(0,Ae+Math.floor(le/Re)),le=this.scrollTop-Ae*Re);var Ke=0;return(this.layerConfig.width!=_||z)&&(Ke=this.CHANGE_H_SCROLL),(z||ne)&&(Ke|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),ne&&(_=this.$getLongestLine())),this.layerConfig={width:_,padding:this.$padding,firstRow:ce,firstRowScreen:Ae,lastRow:ge,lineHeight:Re,characterWidth:this.characterWidth,minHeight:G,maxHeight:$,offset:le,gutterOffset:Re?Math.max(0,Math.ceil((le+W.height-W.scrollerHeight)/Re)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(_-this.$padding),Ke},O.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,W=this.$changedLines.lastRow;this.$changedLines=null;var F=this.layerConfig;if(!(L>F.lastRow+1)&&!(W<F.firstRow)){if(W===1/0){this.$showGutter&&this.$gutterLayer.update(F),this.$textLayer.update(F);return}return this.$textLayer.updateLines(F,L,W),!0}}},O.prototype.$getLongestLine=function(){var L=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(L+=1),this.$textLayer&&L>this.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},O.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},O.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},O.prototype.addGutterDecoration=function(L,W){this.$gutterLayer.addGutterDecoration(L,W)},O.prototype.removeGutterDecoration=function(L,W){this.$gutterLayer.removeGutterDecoration(L,W)},O.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},O.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},O.prototype.showCursor=function(){this.$cursorLayer.showCursor()},O.prototype.scrollSelectionIntoView=function(L,W,F){this.scrollCursorIntoView(L,F),this.scrollCursorIntoView(W,F)},O.prototype.scrollCursorIntoView=function(L,W,F){if(this.$size.scrollerHeight!==0){var N=this.$cursorLayer.getPixelPosition(L),$=N.left,_=N.top,D=F&&F.top||0,z=F&&F.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var U=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;U+D>_?(W&&U+D>_+this.lineHeight&&(_-=W*this.$size.scrollerHeight),_===0&&(_=-this.scrollMargin.top),this.session.setScrollTop(_)):U+this.$size.scrollerHeight-z<_+this.lineHeight&&(W&&U+this.$size.scrollerHeight-z<_-this.lineHeight&&(_+=W*this.$size.scrollerHeight),this.session.setScrollTop(_+this.lineHeight+z-this.$size.scrollerHeight));var G=this.scrollLeft,Z=2*this.layerConfig.characterWidth;$-Z<G?($-=Z,$<this.$padding+Z&&($=-this.scrollMargin.left),this.session.setScrollLeft($)):($+=Z,G+this.$size.scrollerWidth<$+this.characterWidth?this.session.setScrollLeft(Math.round($+this.characterWidth-this.$size.scrollerWidth)):G<=this.$padding&&$-G<this.characterWidth&&this.session.setScrollLeft(0))}},O.prototype.getScrollTop=function(){return this.session.getScrollTop()},O.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},O.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},O.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},O.prototype.scrollToRow=function(L){this.session.setScrollTop(L*this.lineHeight)},O.prototype.alignCursor=function(L,W){typeof L=="number"&&(L={row:L,column:0});var F=this.$cursorLayer.getPixelPosition(L),N=this.$size.scrollerHeight-this.lineHeight,$=F.top-N*(W||0);return this.session.setScrollTop($),$},O.prototype.$calcSteps=function(L,W){var F=0,N=this.STEPS,$=[],_=function(D,z,U){return U*(Math.pow(D-1,3)+1)+z};for(F=0;F<N;++F)$.push(_(F/this.STEPS,L,W-L));return $},O.prototype.scrollToLine=function(L,W,F,N){var $=this.$cursorLayer.getPixelPosition({row:L,column:0}),_=$.top;W&&(_-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(_),F!==!1&&this.animateScrolling(D,N)},O.prototype.animateScrolling=function(L,W){var F=this.scrollTop;if(!this.$animatedScroll)return;var N=this;if(L==F)return;if(this.$scrollAnimation){var $=this.$scrollAnimation.steps;if($.length&&(L=$[0],L==F))return}var _=N.$calcSteps(L,F);this.$scrollAnimation={from:L,to:F,steps:_},clearInterval(this.$timer),N.session.setScrollTop(_.shift()),N.session.$scrollTop=F;function D(){N.$timer=clearInterval(N.$timer),N.$scrollAnimation=null,N.$stopAnimation=!1,W&&W()}this.$timer=setInterval(function(){if(N.$stopAnimation){D();return}if(!N.session)return clearInterval(N.$timer);_.length?(N.session.setScrollTop(_.shift()),N.session.$scrollTop=F):F!=null?(N.session.$scrollTop=-1,N.session.setScrollTop(F),F=null):D()},10)},O.prototype.scrollToY=function(L){this.scrollTop!==L&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=L)},O.prototype.scrollToX=function(L){this.scrollLeft!==L&&(this.scrollLeft=L),this.$loop.schedule(this.CHANGE_H_SCROLL)},O.prototype.scrollTo=function(L,W){this.session.setScrollTop(W),this.session.setScrollLeft(L)},O.prototype.scrollBy=function(L,W){W&&this.session.setScrollTop(this.session.getScrollTop()+W),L&&this.session.setScrollLeft(this.session.getScrollLeft()+L)},O.prototype.isScrollableBy=function(L,W){if(W<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||W>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},O.prototype.pixelToScreenCoordinates=function(L,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([L,W]);L=N[1]-this.gutterWidth-this.margin.left,W=N[0]}else F=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,D=Math.floor((W+this.scrollTop-F.top)/this.lineHeight),z=this.$blockCursor?Math.floor(_):Math.round(_);return{row:D,column:z,side:_-z>0?1:-1,offsetX:$}},O.prototype.screenToTextCoordinates=function(L,W){var F;if(this.$hasCssTransforms){F={top:0,left:0};var N=this.$fontMetrics.transformCoordinates([L,W]);L=N[1]-this.gutterWidth-this.margin.left,W=N[0]}else F=this.scroller.getBoundingClientRect();var $=L+this.scrollLeft-F.left-this.$padding,_=$/this.characterWidth,D=this.$blockCursor?Math.floor(_):Math.round(_),z=Math.floor((W+this.scrollTop-F.top)/this.lineHeight);return this.session.screenToDocumentPosition(z,Math.max(D,0),$)},O.prototype.textToScreenCoordinates=function(L,W){var F=this.scroller.getBoundingClientRect(),N=this.session.documentToScreenPosition(L,W),$=this.$padding+(this.session.$bidiHandler.isBidiRow(N.row,L)?this.session.$bidiHandler.getPosLeft(N.column):Math.round(N.column*this.characterWidth)),_=N.row*this.lineHeight;return{pageX:F.left+$-this.scrollLeft,pageY:F.top+_-this.scrollTop}},O.prototype.visualizeFocus=function(){f.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){f.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(f.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},O.prototype.setCompositionText=function(L){var W=this.session.selection.cursor;this.addToken(L,"composition_placeholder",W.row,W.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),f.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},O.prototype.setGhostText=function(L,W){var F=this.session.selection.cursor,N=W||{row:F.row,column:F.column};this.removeGhostText();var $=this.$calculateWrappedTextChunks(L,N);this.addToken($[0].text,"ghost_text",N.row,N.column),this.$ghostText={text:L,position:{row:N.row,column:N.column}};var _=f.createElement("div");if($.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),z;$.slice(1).forEach(function(ne){var le=f.createElement("div"),ue=f.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(f.createTextNode(ne.text)),le.appendChild(ue),_.appendChild(le),z=le}),D.forEach(function(ne){var le=f.createElement("span");R(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(f.createTextNode(ne.value)),z.appendChild(le)}),this.$ghostTextWidget={el:_,row:N.row,column:N.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var U=this.$cursorLayer.getPixelPosition(N,!0),G=this.container,Z=G.getBoundingClientRect().height,te=$.length*this.lineHeight,he=te<Z-U.top;if(he)return;te<Z?this.scrollBy(0,($.length-1)*this.lineHeight):this.scrollToRow(N.row)}},O.prototype.$calculateWrappedTextChunks=function(L,W){var F=this.$size.scrollerWidth-this.$padding*2,N=Math.floor(F/this.characterWidth)-2;N=N<=0?60:N;for(var $=L.split(/\r?\n/),_=[],D=0;D<$.length;D++){var z=this.session.$getDisplayTokens($[D],W.column),U=this.session.$computeWrapSplits(z,N,this.session.$tabSize);if(U.length>0){var G=0;U.push($[D].length);for(var Z=0;Z<U.length;Z++){var te=$[D].slice(G,U[Z]);_.push({text:te,wrapped:!0}),G=U[Z]}}else _.push({text:$[D],wrapped:!1})}return _},O.prototype.removeGhostText=function(){if(this.$ghostText){var L=this.$ghostText.position;this.removeExtraToken(L.row,L.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},O.prototype.addToken=function(L,W,F,N){var $=this.session;$.bgTokenizer.lines[F]=null;var _={type:W,value:L},D=$.getTokens(F);if(N==null||!D.length)D.push(_);else for(var z=0,U=0;U<D.length;U++){var G=D[U];if(z+=G.value.length,N<=z){var Z=G.value.length-(z-N),te=G.value.slice(0,Z),he=G.value.slice(Z);D.splice(U,1,{type:G.type,value:te},_,{type:G.type,value:he});break}}this.updateLines(F,F)},O.prototype.hideTokensAfterPosition=function(L,W){for(var F=this.session.getTokens(L),N=0,$=!1,_=[],D=0;D<F.length;D++){var z=F[D];if(N+=z.value.length,z.type!=="ghost_text"){if($){_.push({type:z.type,value:z.value}),z.type="hidden_token";continue}N===W&&($=!0)}}return this.updateLines(L,L),_},O.prototype.removeExtraToken=function(L,W){this.session.bgTokenizer.lines[L]=null,this.updateLines(L,L)},O.prototype.setTheme=function(L,W){var F=this;if(this.$themeId=L,F._dispatchEvent("themeChange",{theme:L}),!L||typeof L=="string"){var N=L||this.$options.theme.initialValue;p.loadModule(["theme",N],$)}else $(L);function $(_){if(F.$themeId!=L)return W&&W();if(!_||!_.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");_.$id&&(F.$themeId=_.$id),f.importCssString(_.cssText,_.cssClass,F.container),F.theme&&f.removeCssClass(F.container,F.theme.cssClass);var D="padding"in _?_.padding:"padding"in(F.theme||{})?4:F.$padding;F.$padding&&D!=F.$padding&&F.setPadding(D),F.$theme=_.cssClass,F.theme=_,f.addCssClass(F.container,_.cssClass),f.setCssClass(F.container,"ace_dark",_.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:_}),W&&W(),x.isSafari&&F.scroller&&(F.scroller.style.background="red",F.scroller.style.background="")}},O.prototype.getTheme=function(){return this.$themeId},O.prototype.setStyle=function(L,W){f.setCssClass(this.container,L,W!==!1)},O.prototype.unsetStyle=function(L){f.removeCssClass(this.container,L)},O.prototype.setCursorStyle=function(L){f.setStyle(this.scroller.style,"cursor",L)},O.prototype.setMouseCursor=function(L){f.setStyle(this.scroller.style,"cursor",L)},O.prototype.attachToShadowRoot=function(){f.importCssString(M,"ace_editor.css",this.container)},O.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},O.prototype.$updateCustomScrollbar=function(L){var W=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),L===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new k(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new o(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollTop(F.data-W.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(F){W.$scrollAnimation||W.session.setScrollLeft(F.data-W.scrollMargin.left)}))},O.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var L=this;this.$resizeTimer=w.delayedCall(function(){L.destroyed||L.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(W){var F=W[0].contentRect.width,N=W[0].contentRect.height;Math.abs(L.$size.width-F)>1||Math.abs(L.$size.height-N)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O})();I.prototype.CHANGE_CURSOR=1,I.prototype.CHANGE_MARKER=2,I.prototype.CHANGE_GUTTER=4,I.prototype.CHANGE_SCROLL=8,I.prototype.CHANGE_LINES=16,I.prototype.CHANGE_TEXT=32,I.prototype.CHANGE_SIZE=64,I.prototype.CHANGE_MARKER_BACK=128,I.prototype.CHANGE_MARKER_FRONT=256,I.prototype.CHANGE_FULL=512,I.prototype.CHANGE_H_SCROLL=1024,I.prototype.$changes=0,I.prototype.$padding=null,I.prototype.$frozen=!1,I.prototype.STEPS=8,d.implement(I.prototype,E),p.defineOptions(I.prototype,"renderer",{useResizeObserver:{set:function(O){!O&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):O&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(O){this.$textLayer.setShowInvisibles(O)&&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(O){typeof O=="number"&&(this.$printMarginColumn=O),this.$showPrintMargin=!!O,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(O){this.$gutter.style.display=O?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(O){this.$gutterLayer.$useSvgGutterIcons=O},initialValue:!1},showFoldedAnnotations:{set:function(O){this.$gutterLayer.$showFoldedAnnotations=O},initialValue:!1},fadeFoldWidgets:{set:function(O){f.setCssClass(this.$gutter,"ace_fade-fold-widgets",O)},initialValue:!1},showFoldWidgets:{set:function(O){this.$gutterLayer.setShowFoldWidgets(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(O){this.$textLayer.setDisplayIndentGuides(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(O){this.$textLayer.setHighlightIndentGuides(O)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(O){this.$gutterLayer.setHighlightGutterLine(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(O){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(O){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(O){typeof O=="number"&&(O=O+"px"),this.container.style.fontSize=O,this.updateFontSize()},initialValue:12},fontFamily:{set:function(O){this.container.style.fontFamily=O,this.updateFontSize()}},maxLines:{set:function(O){this.updateFull()}},minLines:{set:function(O){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(O){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(O){O=+O||0,this.$scrollPastEnd!=O&&(this.$scrollPastEnd=O,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(O){this.$gutterLayer.$fixedWidth=!!O,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(O){this.$updateCustomScrollbar(O)},initialValue:!1},theme:{set:function(O){this.setTheme(O)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!x.isMobile&&!x.isIE}}),r.VirtualRenderer=I}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,h){var d=n("../lib/oop"),f=n("../lib/net"),w=n("../lib/event_emitter").EventEmitter,p=n("../config");function g(c){var o="importScripts('"+f.qualifyURL(c)+"');";try{return new Blob([o],{type:"application/javascript"})}catch{var l=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new l;return m.append(o),m.getBlob("application/javascript")}}function i(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(p.get("loadWorkerFromBlob")){var o=g(c),l=window.URL||window.webkitURL,m=l.createObjectURL(o);return new Worker(m)}return new Worker(c)}var a=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){d.implement(this,w),this.$createWorkerFromOldConfig=function(c,o,l,m,b){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),p.get("packaged")||!n.toUrl)m=m||p.moduleUrl(o,"worker");else{var S=this.$normalizePath;m=m||S(n.toUrl("ace/worker/worker.js",null,"_"));var E={};c.forEach(function(M){E[M]=S(n.toUrl(M,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:E,module:o,classname:l}),this.$worker},this.onMessage=function(c){var o=c.data;switch(o.type){case"event":this._signal(o.name,{data:o.data});break;case"call":var l=this.callbacks[o.id];l&&(l(o.data),delete this.callbacks[o.id]);break;case"error":this.reportError(o.data);break;case"log":window.console&&console.log&&console.log.apply(console,o.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return f.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,o){this.$worker.postMessage({command:c,args:o})},this.call=function(c,o,l){if(l){var m=this.callbackId++;this.callbacks[m]=l,o.push(m)}this.send(c,o)},this.emit=function(c,o){try{o.data&&o.data.err&&(o.data.err={message:o.data.err.message,stack:o.data.err.stack,code:o.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:o.data}})}catch(l){console.error(l.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(a.prototype);var u=function(c,o,l){var m=null,b=!1,S=Object.create(w),E=[],M=new a({messageBuffer:E,terminate:function(){},postMessage:function(x){E.push(x),m&&(b?setTimeout(k):k())}});M.setEmitSync=function(x){b=x};var k=function(){var x=E.shift();x.command?m[x.command].apply(m,x.args):x.event&&S._signal(x.event,x.data)};return S.postMessage=function(x){M.onMessage({data:x})},S.callback=function(x,R){this.postMessage({type:"call",id:R,data:x})},S.emit=function(x,R){this.postMessage({type:"event",name:x,data:R})},p.loadModule(["worker",o],function(x){for(m=new x[l](S);E.length;)k()}),M};r.UIWorkerClient=u,r.WorkerClient=a,r.createWorker=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,h){var d=n("./range").Range,f=n("./lib/event_emitter").EventEmitter,w=n("./lib/oop"),p=(function(){function g(i,a,u,c,o,l){var m=this;this.length=a,this.session=i,this.doc=i.getDocument(),this.mainClass=o,this.othersClass=l,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=u;var b=i.getUndoManager().$undoStack||i.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=b.length,this.setup(),i.selection.on("changeCursor",this.$onCursorChange)}return g.prototype.setup=function(){var i=this,a=this.doc,u=this.session;this.selectionBefore=u.selection.toJSON(),u.selection.inMultiSelectMode&&u.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=u.addMarker(new d(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(o){var l=a.createAnchor(o.row,o.column);l.$insertRight=!0,l.detach(),i.others.push(l)}),u.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,a=this;this.othersActive=!0,this.others.forEach(function(u){u.markerId=i.addMarker(new d(u.row,u.column,u.row,u.column+a.length),a.othersClass,null,!1)})}},g.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var i=0;i<this.others.length;i++)this.session.removeMarker(this.others[i].markerId)}},g.prototype.onUpdate=function(i){if(this.$updating)return this.updateAnchors(i);var a=i;if(a.start.row===a.end.row&&a.start.row===this.pos.row){this.$updating=!0;var u=i.action==="insert"?a.end.column-a.start.column:a.start.column-a.end.column,c=a.start.column>=this.pos.column&&a.start.column<=this.pos.column+this.length+1,o=a.start.column-this.pos.column;if(this.updateAnchors(i),c&&(this.length+=u),c&&!this.session.$fromUndo){if(i.action==="insert")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],b={row:m.row,column:m.column+o};this.doc.insertMergedLines(b,i.lines)}else if(i.action==="remove")for(var l=this.others.length-1;l>=0;l--){var m=this.others[l],b={row:m.row,column:m.column+o};this.doc.remove(new d(b.row,b.column,b.row,b.column-u))}}this.$updating=!1,this.updateMarkers()}},g.prototype.updateAnchors=function(i){this.pos.onChange(i);for(var a=this.others.length;a--;)this.others[a].onChange(i);this.updateMarkers()},g.prototype.updateMarkers=function(){if(!this.$updating){var i=this,a=this.session,u=function(o,l){a.removeMarker(o.markerId),o.markerId=a.addMarker(new d(o.row,o.column,o.row,o.column+i.length),l,null,!1)};u(this.pos,this.mainClass);for(var c=this.others.length;c--;)u(this.others[c],this.othersClass)}},g.prototype.onCursorChange=function(i){if(!(this.$updating||!this.session)){var a=this.session.selection.getCursor();a.row===this.pos.row&&a.column>=this.pos.column&&a.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",i)):(this.hideOtherMarkers(),this._emit("cursorLeave",i))}},g.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},g.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var i=this.session.getUndoManager(),a=(i.$undoStack||i.$undostack).length-this.$undoStackDepth,u=0;u<a;u++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g})();w.implement(p.prototype,f),r.PlaceHolder=p}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,h){var d=n("../lib/event"),f=n("../lib/useragent");function w(g,i){return g.row==i.row&&g.column==i.column}function p(g){var i=g.domEvent,a=i.altKey,u=i.shiftKey,c=i.ctrlKey,o=g.getAccelKey(),l=g.getButton();if(c&&f.isMac&&(l=i.button),g.editor.inMultiSelectMode&&l==2){g.editor.textInput.onContextMenu(g.domEvent);return}if(!c&&!a&&!o){l===0&&g.editor.inMultiSelectMode&&g.editor.exitMultiSelectMode();return}if(l===0){var m=g.editor,b=m.selection,S=m.inMultiSelectMode,E=g.getDocumentPosition(),M=b.getCursor(),k=g.inSelection()||b.isEmpty()&&w(E,M),x=g.x,R=g.y,I=function(te){x=te.clientX,R=te.clientY},O=m.session,L=m.renderer.pixelToScreenCoordinates(x,R),W=L,F;if(m.$mouseHandler.$enableJumpToDef)c&&a||o&&a?F=u?"block":"add":a&&m.$blockSelectEnabled&&(F="block");else if(o&&!a){if(F="add",!S&&u)return}else a&&m.$blockSelectEnabled&&(F="block");if(F&&f.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!S&&k)return;if(!S){var N=b.toOrientedRange();m.addSelectionMarker(N)}var $=b.rangeList.rangeAtPoint(E);m.inVirtualSelectionMode=!0,u&&($=null,N=b.ranges[0]||N,m.removeSelectionMarker(N)),m.once("mouseup",function(){var te=b.toOrientedRange();$&&te.isEmpty()&&w($.cursor,te.cursor)?b.substractPoint(te.cursor):(u?b.substractPoint(N.cursor):N&&(m.removeSelectionMarker(N),b.addRange(N)),b.addRange(te)),m.inVirtualSelectionMode=!1})}else if(F=="block"){g.stop(),m.inVirtualSelectionMode=!0;var _,D=[],z=function(){var te=m.renderer.pixelToScreenCoordinates(x,R),he=O.screenToDocumentPosition(te.row,te.column,te.offsetX);w(W,te)&&w(he,b.lead)||(W=te,m.selection.moveToPosition(he),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(D),D=b.rectangularRangeBlock(W,L),m.$mouseHandler.$clickSelection&&D.length==1&&D[0].isEmpty()&&(D[0]=m.$mouseHandler.$clickSelection.clone()),D.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};S&&!o?b.toSingleRange():!S&&o&&(_=b.toOrientedRange(),m.addSelectionMarker(_)),u?L=O.documentToScreenPosition(b.lead):b.moveToPosition(E),W={row:-1,column:-1};var U=function(te){z(),clearInterval(Z),m.removeSelectionMarkers(D),D.length||(D=[b.toOrientedRange()]),_&&(m.removeSelectionMarker(_),b.toSingleRange(_));for(var he=0;he<D.length;he++)b.addRange(D[he]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},G=z;d.capture(m.container,I,U);var Z=setInterval(function(){G()},20);return g.preventDefault()}}}r.onMouseDown=p}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,h){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(f){f.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(f){f.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(f){f.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(f){f.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(f){f.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(f){f.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(f){f.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(f){f.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(f){f.multiSelect.rangeCount>1?f.multiSelect.joinSelections():f.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(f){f.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(f){f.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(f){f.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(f){f.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(f){return f&&f.inMultiSelectMode}}];var d=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new d(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,h){var d=n("./range_list").RangeList,f=n("./range").Range,w=n("./selection").Selection,p=n("./mouse/multi_select_handler").onMouseDown,g=n("./lib/event"),i=n("./lib/lang"),a=n("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var u=n("./search").Search,c=new u;function o(M,k,x){return c.$options.wrap=!0,c.$options.needle=k,c.$options.backwards=x==-1,c.find(M)}var l=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(l.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(M,k){if(M){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(M),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(M);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}M.cursor||(M.cursor=M.end);var R=this.rangeList.add(M);return this.$onAddRange(M),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(M)}},this.toSingleRange=function(M){M=M||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),M&&this.fromOrientedRange(M)},this.substractPoint=function(M){var k=this.rangeList.substractPoint(M);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var M=this.rangeList.merge();M.length&&this.$onRemoveRange(M)},this.$onAddRange=function(M){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(M),this._signal("addRange",{range:M})},this.$onRemoveRange=function(M){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();M.push(k),this.rangeCount=0}for(var x=M.length;x--;){var R=this.ranges.indexOf(M[x]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:M}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var M=this.ranges.length?this.ranges:[this.getRange()],k=[],x=0;x<M.length;x++){var R=M[x],I=R.start.row,O=R.end.row;if(I===O)k.push(R.clone());else{for(k.push(new f(I,R.start.column,I,this.session.getLine(I).length));++I<O;)k.push(this.getLineRange(I,!0));k.push(new f(O,0,O,R.end.column))}x==0&&!this.isBackwards()&&(k=k.reverse())}this.toSingleRange();for(var x=k.length;x--;)this.addRange(k[x])},this.joinSelections=function(){var M=this.rangeList.ranges,k=M[M.length-1],x=f.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var M=this.rangeList.ranges,k=M[M.length-1],x=f.fromPoints(M[0].start,k.end);this.toSingleRange(),this.setSelectionRange(x,k.cursor==k.start)}else{var R=this.session.documentToScreenPosition(this.cursor),I=this.session.documentToScreenPosition(this.anchor),O=this.rectangularRangeBlock(R,I);O.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(M,k,x){var R=[],I=M.column<k.column;if(I)var O=M.column,L=k.column,W=M.offsetX,F=k.offsetX;else var O=k.column,L=M.column,W=k.offsetX,F=M.offsetX;var N=M.row<k.row;if(N)var $=M.row,_=k.row;else var $=k.row,_=M.row;O<0&&(O=0),$<0&&($=0),$==_&&(x=!0);for(var D,z=$;z<=_;z++){var U=f.fromPoints(this.session.screenToDocumentPosition(z,O,W),this.session.screenToDocumentPosition(z,L,F));if(U.isEmpty()){if(D&&b(U.end,D))break;D=U.end}U.cursor=I?U.start:U.end,R.push(U)}if(N&&R.reverse(),!x){for(var G=R.length-1;R[G].isEmpty()&&G>0;)G--;if(G>0)for(var Z=0;R[Z].isEmpty();)Z++;for(var te=G;te>=Z;te--)R[te].isEmpty()&&R.splice(te,1)}return R}}).call(w.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(M){M.cursor||(M.cursor=M.end);var k=this.getSelectionStyle();return M.marker=this.session.addMarker(M,"ace_selection",k),this.session.$selectionMarkers.push(M),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,M},this.removeSelectionMarker=function(M){if(M.marker){this.session.removeMarker(M.marker);var k=this.session.$selectionMarkers.indexOf(M);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(M){for(var k=this.session.$selectionMarkers,x=M.length;x--;){var R=M[x];if(R.marker){this.session.removeMarker(R.marker);var I=k.indexOf(R);I!=-1&&k.splice(I,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(M){this.addSelectionMarker(M.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(M){this.removeSelectionMarkers(M.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(M){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(M){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(M){var k=M.command,x=M.editor;if(x.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?R=x.forEachSelection(k,M.args):k.multiSelectAction=="forEachLine"?R=x.forEachSelection(k,M.args,!0):k.multiSelectAction=="single"?(x.exitMultiSelectMode(),R=k.exec(x,M.args||{})):R=k.multiSelectAction(x,M.args||{});else{var R=k.exec(x,M.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(M,k,x){if(!this.inVirtualSelectionMode){var R=x&&x.keepOrder,I=x==!0||x&&x.$byLines,O=this.session,L=this.selection,W=L.rangeList,F=(R?L:W).ranges,N;if(!F.length)return M.exec?M.exec(this,k||{}):M(this,k||{});var $=L._eventRegistry;L._eventRegistry={};var _=new w(O);this.inVirtualSelectionMode=!0;for(var D=F.length;D--;){if(I)for(;D>0&&F[D].start.row==F[D-1].end.row;)D--;_.fromOrientedRange(F[D]),_.index=D,this.selection=O.selection=_;var z=M.exec?M.exec(this,k||{}):M(this,k||{});!N&&z!==void 0&&(N=z),_.toOrientedRange(F[D])}_.detach(),this.selection=O.selection=L,this.inVirtualSelectionMode=!1,L._eventRegistry=$,L.mergeOverlappingRanges(),L.ranges[0]&&L.fromOrientedRange(L.ranges[0]);var U=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),U&&U.from==U.to&&this.renderer.animateScrolling(U.from),N}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var M="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,x=[],R=0;R<k.length;R++)x.push(this.session.getTextRange(k[R]));var I=this.session.getDocument().getNewLineCharacter();M=x.join(I),M.length==(x.length-1)*I.length&&(M="")}else this.selection.isEmpty()||(M=this.session.getTextRange(this.getSelectionRange()));return M},this.$checkMultiselectChange=function(M,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var x=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var R=k==this.multiSelect.anchor?x.cursor==x.start?x.end:x.start:x.cursor;R.row!=k.row||this.session.$clipPositionToDocument(R.row,R.column).column!=k.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(M,k,x){if(k=k||{},k.needle=M||k.needle,k.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(R)}this.$search.set(k);var I=this.$search.findAll(this.session);if(!I.length)return 0;var O=this.multiSelect;x||O.toSingleRange(I[0]);for(var L=I.length;L--;)O.addRange(I[L],!0);return R&&O.rangeList.rangeAtPoint(R.start)&&O.addRange(R,!0),I.length},this.selectMoreLines=function(M,k){var x=this.selection.toOrientedRange(),R=x.cursor==x.end,I=this.session.documentToScreenPosition(x.cursor);this.selection.$desiredColumn&&(I.column=this.selection.$desiredColumn);var O=this.session.screenToDocumentPosition(I.row+M,I.column);if(x.isEmpty())var W=O;else var L=this.session.documentToScreenPosition(R?x.end:x.start),W=this.session.screenToDocumentPosition(L.row+M,L.column);if(R){var F=f.fromPoints(O,W);F.cursor=F.start}else{var F=f.fromPoints(W,O);F.cursor=F.end}if(F.desiredColumn=I.column,!this.selection.inMultiSelectMode)this.selection.addRange(x);else if(k)var N=x.cursor;this.selection.addRange(F),N&&this.selection.substractPoint(N)},this.transposeSelections=function(M){for(var k=this.session,x=k.multiSelect,R=x.ranges,I=R.length;I--;){var O=R[I];if(O.isEmpty()){var L=k.getWordRange(O.start.row,O.start.column);O.start.row=L.start.row,O.start.column=L.start.column,O.end.row=L.end.row,O.end.column=L.end.column}}x.mergeOverlappingRanges();for(var W=[],I=R.length;I--;){var O=R[I];W.unshift(k.getTextRange(O))}M<0?W.unshift(W.pop()):W.push(W.shift());for(var I=R.length;I--;){var O=R[I],F=O.clone();k.replace(O,W[I]),O.start.row=F.start.row,O.start.column=F.start.column}x.fromOrientedRange(x.ranges[0])},this.selectMore=function(M,k,x){var R=this.session,I=R.multiSelect,O=I.toOrientedRange();if(!(O.isEmpty()&&(O=R.getWordRange(O.start.row,O.start.column),O.cursor=M==-1?O.start:O.end,this.multiSelect.addRange(O),x))){var L=R.getTextRange(O),W=o(R,L,M);W&&(W.cursor=M==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(O.cursor)}},this.alignCursors=function(){var M=this.session,k=M.multiSelect,x=k.ranges,R=-1,I=x.filter(function(G){if(G.cursor.row==R)return!0;R=G.cursor.row});if(!x.length||I.length==x.length-1){var O=this.selection.getRange(),L=O.start.row,W=O.end.row,F=L==W;if(F){var N=this.session.getLength(),$;do $=this.session.getLine(W);while(/[=:]/.test($)&&++W<N);do $=this.session.getLine(L);while(/[=:]/.test($)&&--L>0);L<0&&(L=0),W>=N&&(W=N-1)}var _=this.session.removeFullLines(L,W);_=this.$reAlignText(_,F),this.session.insert({row:L,column:0},_.join(`
|
957
|
+
`)+`
|
958
|
+
`),F||(O.start.column=0,O.end.column=_[_.length-1].length),this.selection.setRange(O)}else{I.forEach(function(G){k.substractPoint(G.cursor)});var D=0,z=1/0,U=x.map(function(G){var Z=G.cursor,te=M.getLine(Z.row),he=te.substr(Z.column).search(/\S/g);return he==-1&&(he=0),Z.column>D&&(D=Z.column),he<z&&(z=he),he});x.forEach(function(G,Z){var te=G.cursor,he=D-te.column,ne=U[Z]-z;he>ne?M.insert(te,i.stringRepeat(" ",he-ne)):M.remove(new f(te.row,te.column,te.row,te.column-he+ne)),G.start.column=G.end.column=D,G.start.row=G.end.row=te.row,G.cursor=G.end}),k.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(M,k){var x=!0,R=!0,I,O,L;return M.map(function(_){var D=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return D?I==null?(I=D[1].length,O=D[2].length,L=D[3].length,D):(I+O+L!=D[1].length+D[2].length+D[3].length&&(R=!1),I!=D[1].length&&(x=!1),I>D[1].length&&(I=D[1].length),O<D[2].length&&(O=D[2].length),L>D[3].length&&(L=D[3].length),D):[_]}).map(k?F:x?R?N:F:$);function W(_){return i.stringRepeat(" ",_)}function F(_){return _[2]?W(I)+_[2]+W(O-_[2].length+L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function N(_){return _[2]?W(I+O-_[2].length)+_[2]+W(L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function $(_){return _[2]?W(I)+_[2]+W(L)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(m.prototype);function b(M,k){return M.row==k.row&&M.column==k.column}r.onSessionChange=function(M){var k=M.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var x=M.oldSession;x&&(x.multiSelect.off("addRange",this.$onAddRange),x.multiSelect.off("removeRange",this.$onRemoveRange),x.multiSelect.off("multiSelect",this.$onMultiSelect),x.multiSelect.off("singleSelect",this.$onSingleSelect),x.multiSelect.lead.off("change",this.$checkMultiselectChange),x.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(M){M.$multiselectOnSessionChange||(M.$onAddRange=M.$onAddRange.bind(M),M.$onRemoveRange=M.$onRemoveRange.bind(M),M.$onMultiSelect=M.$onMultiSelect.bind(M),M.$onSingleSelect=M.$onSingleSelect.bind(M),M.$multiselectOnSessionChange=r.onSessionChange.bind(M),M.$checkMultiselectChange=M.$checkMultiselectChange.bind(M),M.$multiselectOnSessionChange(M),M.on("changeSession",M.$multiselectOnSessionChange),M.on("mousedown",p),M.commands.addCommands(a.defaultCommands),E(M))}function E(M){if(!M.textInput)return;var k=M.textInput.getElement(),x=!1;g.addListener(k,"keydown",function(I){var O=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey);M.$blockSelectEnabled&&O?x||(M.renderer.setMouseCursor("crosshair"),x=!0):x&&R()},M),g.addListener(k,"keyup",R,M),g.addListener(k,"blur",R,M);function R(I){x&&(M.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=S,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(M){S(this),M?this.on("mousedown",p):this.off("mousedown",p)},value:!0},enableBlockSelect:{set:function(M){this.$blockSelectEnabled=M},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,h){var d=n("../../range").Range,f=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,p,g){var i=w.getLine(g);return this.foldingStartMarker.test(i)?"start":p=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(w,p,g){return null},this.indentationBlock=function(w,p,g){var i=/\S/,a=w.getLine(p),u=a.search(i);if(u!=-1){for(var c=g||a.length,o=w.getLength(),l=p,m=p;++p<o;){var b=w.getLine(p).search(i);if(b!=-1){if(b<=u){var S=w.getTokenAt(p,0);if(!S||S.type!=="string")break}m=p}}if(m>l){var E=w.getLine(m).length;return new d(l,c,m,E)}}},this.openingBracketBlock=function(w,p,g,i,a){var u={row:g,column:i+1},c=w.$findClosingBracket(p,u,a);if(c){var o=w.foldWidgets[c.row];return o==null&&(o=w.getFoldWidget(c.row)),o=="start"&&c.row>u.row&&(c.row--,c.column=w.getLine(c.row).length),d.fromPoints(u,c)}},this.closingBracketBlock=function(w,p,g,i,a){var u={row:g,column:i},c=w.$findOpeningBracket(p,u);if(c)return c.column++,u.column--,d.fromPoints(c,u)}}).call(f.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,r,h){var d=n("../lib/dom"),f=n("../range").Range,w=n("../config").nls;function p(i,a,u){for(var c=0,o=i.length-1;c<=o;){var l=c+o>>1,m=u(a,i[l]);if(m>0)c=l+1;else if(m<0)o=l-1;else return l}return-(c+1)}function g(i,a,u){var c=i.getAnnotations().sort(f.comparePoints);if(c.length){var o=p(c,{row:a,column:-1},f.comparePoints);o<0&&(o=-o-1),o>=c.length?o=u>0?0:c.length-1:o===0&&u<0&&(o=c.length-1);var l=c[o];if(!(!l||!u)){if(l.row===a){do l=c[o+=u];while(l&&l.row===a);if(!l)return c.slice()}var m=[];a=l.row;do m[u<0?"unshift":"push"](l),l=c[o+=u];while(l&&l.row==a);return m.length&&m}}}r.showErrorMarker=function(i,a){var u=i.session,c=i.getCursorPosition(),o=c.row,l=u.widgetManager.getWidgetsAtRow(o).filter(function(I){return I.type=="errorMarker"})[0];l?l.destroy():o-=a;var m=g(u,o,a),b;if(m){var S=m[0];c.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,c.row=S.row,b=i.renderer.$gutterLayer.$annotations[c.row]}else{if(l)return;b={displayText:[w("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(c.row),i.selection.moveToPosition(c);var E={row:c.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},M=E.el.appendChild(d.createElement("div")),k=E.el.appendChild(d.createElement("div"));k.className="error_widget_arrow "+b.className;var x=i.renderer.$cursorLayer.getPixelPosition(c).left;k.style.left=x+i.renderer.gutterWidth-5+"px",E.el.className="error_widget_wrapper",M.className="error_widget "+b.className,b.displayText.forEach(function(I,O){M.appendChild(d.createTextNode(I)),O<b.displayText.length-1&&M.appendChild(d.createElement("br"))}),M.appendChild(d.createElement("div"));var R=function(I,O,L){if(O===0&&(L==="esc"||L==="return"))return E.destroy(),{command:"null"}};E.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(R),u.widgetManager.removeLineWidget(E),i.off("changeSelection",E.destroy),i.off("changeSession",E.destroy),i.off("mouseup",E.destroy),i.off("change",E.destroy))},i.keyBinding.addKeyboardHandler(R),i.on("changeSelection",E.destroy),i.on("changeSession",E.destroy),i.on("mouseup",E.destroy),i.on("change",E.destroy),i.session.widgetManager.addLineWidget(E),E.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:E.el.offsetHeight})},d.importCssString(`
|
959
|
+
.error_widget_wrapper {
|
960
|
+
background: inherit;
|
961
|
+
color: inherit;
|
962
|
+
border:none
|
963
|
+
}
|
964
|
+
.error_widget {
|
965
|
+
border-top: solid 2px;
|
966
|
+
border-bottom: solid 2px;
|
967
|
+
margin: 5px 0;
|
968
|
+
padding: 10px 40px;
|
969
|
+
white-space: pre-wrap;
|
970
|
+
}
|
971
|
+
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
972
|
+
border-color: #ff5a5a
|
973
|
+
}
|
974
|
+
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
975
|
+
border-color: #F1D817
|
976
|
+
}
|
977
|
+
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
978
|
+
border-color: #5a5a5a
|
979
|
+
}
|
980
|
+
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
981
|
+
border-color: #5aaa5a
|
982
|
+
}
|
983
|
+
.error_widget_arrow {
|
984
|
+
position: absolute;
|
985
|
+
border: solid 5px;
|
986
|
+
border-top-color: transparent!important;
|
987
|
+
border-right-color: transparent!important;
|
988
|
+
border-left-color: transparent!important;
|
989
|
+
top: -5px;
|
990
|
+
}
|
991
|
+
`,"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(n,r,h){n("./loader_build")(r);var d=n("./lib/dom"),f=n("./range").Range,w=n("./editor").Editor,p=n("./edit_session").EditSession,g=n("./undomanager").UndoManager,i=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(u,c){if(typeof u=="string"){var o=u;if(u=document.getElementById(o),!u)throw new Error("ace.edit can't find div #"+o)}if(u&&u.env&&u.env.editor instanceof w)return u.env.editor;var l="";if(u&&/input|textarea/i.test(u.tagName)){var m=u;l=m.value,u=d.createElement("pre"),m.parentNode.replaceChild(u,m)}else u&&(l=u.textContent,u.innerHTML="");var b=r.createEditSession(l),S=new w(new i(u),b,c),E={document:b,editor:S,onResize:S.resize.bind(S,null)};return m&&(E.textarea=m),S.on("destroy",function(){E.editor.container.env=null}),S.container.env=S.env=E,S},r.createEditSession=function(u,c){var o=new p(u,c);return o.setUndoManager(new g),o},r.Range=f,r.Editor=w,r.EditSession=p,r.UndoManager=g,r.VirtualRenderer=i;var a=r.config.version;r.version=a}),(function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var h in n)n.hasOwnProperty(h)&&(r.ace[h]=n[h]);r.ace.default=r.ace,t&&(t.exports=r.ace)})})()})(Rg)),Rg.exports}var Nr=Mk(),Og={exports:{}},Ig;function Ak(){return Ig||(Ig=1,(function(t,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var p=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},i=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},a=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},u=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},c=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},o=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},l=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var b="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",S="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",E="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",M="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",k=this.$keywords=this.createKeywordMapper({keyword:S,"constant.language":E,"variable.language":M,"support.function":b,"invalid.deprecated":"debugger"},"identifier"),x=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,R={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:x},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:x},{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(I,O,L){L.length&&(L=[]);var W=I[I.length-1];return L.unshift(W,O),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(I,O,L){L.length&&(L=[]);var W=I[I.length-1];return L.unshift(W,O),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(I,O,L){L.length&&(L=[]);var W=I[I.length-1];return L.unshift(W,O),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(I,O,L){L.length&&(L=[]);var W=I[I.length-1];return L.unshift(W,O),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(I,O,L){L.length&&(L=[]);var W=I[I.length-1];return L.unshift(W,O),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},l,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+x+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},u,c,w,p,o,g,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:k,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(I,O,L){var W=I[2]=="-"||I[2]=="~"?"indentedHeredoc":"heredoc",F=I.split(this.splitRegex);return L.push(W,F[3]),[{type:"constant",value:F[1]},{type:"string",value:F[2]},{type:"support.class",value:F[3]},{type:"string",value:F[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(I,O,L){return I===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(I,O,L){return I===L[1]?(L.shift(),L.shift(),this.next=L[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(I,O){return O[0]==="heredoc"||O[0]==="indentedHeredoc"?O[0]:I}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(I,O,L){return this.next="",I=="}"&&L.length>1&&L[1]!="start"&&(L.shift(),this.next=L.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(I,O,L){return L.length&&I===L[0]?(L.unshift(I,O),this.token):"string"}},{token:"constant.language.escape",regex:x},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(I,O,L){return L.length&&I===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(I,O,L){return L.length&&I===L[0]?(L.unshift(I,O),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(I,O,L){return L.length&&I===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(I,O,L){return L.length&&I===L[0]?(L.unshift(I,O),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(I,O,L){return L.length&&I===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(I,O,L){return L.length&&I===L[0]?(L.unshift(I,O),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:x},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(I,O,L){return L.length&&I===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(I,O,L){return L.length&&I===L[0]?(L.unshift(I,O),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(I,O,L){return L.length&&I[0]===R[L[0]]?(L.shift(),this.next=L.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};d.inherits(m,f),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,h){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(w,p){return/^\s+$/.test(w)?/^\s*\}/.test(p):!1},this.autoOutdent=function(w,p){var g=w.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=w.findMatchingBracket({row:p,column:a});if(!u||u.row==p)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,r,h){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,w=n("../../range").Range,p=n("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,f),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(i,a,u){var c=i.getLine(u),o=this.foldingStartMarker.test(c),l=this.foldingStopMarker.test(c);if(o&&!l){var m=c.match(this.foldingStartMarker);if(m[1]){if((m[1]=="if"||m[1]=="else"||m[1]=="while"||m[1]=="until"||m[1]=="unless")&&(m[1]=="else"&&/^\s*else\s*$/.test(c)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(c)===!1)||m[1]=="when"&&/\sthen\s/.test(c)===!0)return;if(i.getTokenAt(u,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"start"}if(a!="markbeginend"||!l||o&&l)return"";var m=c.match(this.foldingStopMarker);if(m[3]==="end"){if(i.getTokenAt(u,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(u,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,a,u){var c=i.doc.getLine(u),o=this.foldingStartMarker.exec(c);if(o)return o[1]||o[3]?this.rubyBlock(i,u,o.index+2):this.openingBracketBlock(i,"{",u,o.index);var o=this.foldingStopMarker.exec(c);if(o)return o[3]==="end"&&i.getTokenAt(u,o.index+1).type==="keyword"?this.rubyBlock(i,u,o.index+1):o[1]==="=end"&&i.getTokenAt(u,o.index+1).type==="comment.multiline"?this.rubyBlock(i,u,o.index+1):this.closingBracketBlock(i,"}",u,o.index+o[0].length)},this.rubyBlock=function(i,a,u,c){var o=new p(i,a,u),l=o.getCurrentToken();if(!(!l||l.type!="keyword"&&l.type!="comment.multiline")){var m=l.value,b=i.getLine(a);switch(l.value){case"if":case"unless":case"while":case"until":var S=new RegExp("^\\s*"+l.value);if(!S.test(b))return;var E=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var E=1;break;case"else":var S=new RegExp("^\\s*"+l.value+"\\s*$");if(!S.test(b))return;var E=1;break;default:var E=this.indentKeywords[m]}var M=[m];if(E){var k=E===-1?i.getLine(a-1).length:i.getLine(a).length,x=a,R=[];if(R.push(o.getCurrentTokenRange()),o.step=E===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(E==1){if(k=6,l.value=="=end")break}else if(l.value=="=begin")break}}else for(;l=o.step();){var I=!1;if(l.type==="keyword"){var O=E*this.indentKeywords[l.value];switch(b=i.getLine(o.getCurrentTokenRow()),l.value){case"do":for(var L=o.$tokenIndex-1;L>=0;L--){var W=o.$rowTokens[L];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){O=0;break}}break;case"else":var S=new RegExp("^\\s*"+l.value+"\\s*$");(!S.test(b)||m=="case")&&(O=0,I=!0);break;case"if":case"unless":case"while":case"until":var S=new RegExp("^\\s*"+l.value);S.test(b)||(O=0,I=!0);break;case"when":(/\sthen\s/.test(b)||m=="case")&&(O=0,I=!0)}if(O>0)M.unshift(l.value);else if(O<=0&&I===!1){if(M.shift(),!M.length&&((m=="while"||m=="until"||m=="for")&&l.value!="do"||l.value=="do"&&E==-1&&O!=0||l.value!="do"))break;O===0&&M.unshift(l.value)}}}if(!l)return null;if(c)return R.push(o.getCurrentTokenRange()),R;var a=o.getCurrentTokenRow();if(E===-1){if(l.type==="comment.multiline")var F=6;else var F=i.getLine(a).length;return new w(a,F,x-1,k)}return new w(x,k,a-1,i.getLine(a-1).length)}}}}).call(g.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(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./ruby_highlight_rules").RubyHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,i=n("./folding/ruby").FoldMode,a=function(){this.HighlightRules=w,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(a,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(u=="start"){var S=c.match(/^.*[\{\(\[]\s*$/),E=c.match(/^\s*(class|def|module)\s.*$/),M=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),k=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(S||E||M||k)&&(l+=o)}return l},this.checkOutdent=function(u,c,o){return/^\s+(end|else|rescue|ensure)$/.test(c+o)||this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(u,c,o){var l=c.getLine(o);if(/}/.test(l))return this.$outdent.autoOutdent(c,o);var m=this.$getIndent(l),b=c.getLine(o-1),S=this.$getIndent(b),E=c.getTabString();S.length<=m.length&&m.slice(-E.length)==E&&c.remove(new g(o,m.length-E.length,o,m.length))},this.getMatching=function(u,c,o){if(c==null){var l=u.selection.lead;o=l.column,c=l.row}var m=u.getTokenAt(c,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(u,c,o,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/ruby"],function(n){t&&(t.exports=n)})})()})(Og)),Og.exports}Ak();var Ng={exports:{}},Dg;function Tk(){return Dg||(Dg=1,(function(t,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=function(){var p="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",i="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|apply|delattr|help|next|setattr|set|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|ascii|breakpoint|bytes",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":i,"variable.language":"self|cls","constant.language":g,keyword:p},"identifier"),u="[uU]?",c="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",S="(?:0[xX][\\dA-Fa-f]+)",E="(?:0[bB][01]+)",M="(?:"+m+"|"+b+"|"+S+"|"+E+")",k="(?:[eE][+-]?\\d+)",x="(?:\\.\\d+)",R="(?:\\d+)",I="(?:(?:"+R+"?"+x+")|(?:"+R+"\\.))",O="(?:(?:"+I+"|"+R+")"+k+")",L="(?:"+O+"|"+I+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:u+'"{3}',next:"qqstring3"},{token:"string",regex:u+'"(?=.)',next:"qqstring"},{token:"string",regex:u+"'{3}",next:"qstring3"},{token:"string",regex:u+"'(?=.)",next:"qstring"},{token:"string",regex:c+'"{3}',next:"rawqqstring3"},{token:"string",regex:c+'"(?=.)',next:"rawqqstring"},{token:"string",regex:c+"'{3}",next:"rawqstring3"},{token:"string",regex:c+"'(?=.)",next:"rawqstring"},{token:"string",regex:o+'"{3}',next:"fqqstring3"},{token:"string",regex:o+'"(?=.)',next:"fqqstring"},{token:"string",regex:o+"'{3}",next:"fqstring3"},{token:"string",regex:o+"'(?=.)",next:"fqstring"},{token:"string",regex:l+'"{3}',next:"rfqqstring3"},{token:"string",regex:l+'"(?=.)',next:"rfqqstring"},{token:"string",regex:l+"'{3}",next:"rfqstring3"},{token:"string",regex:l+"'(?=.)",next:"rfqstring"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"punctuation",regex:",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:["keyword","text","entity.name.function"],regex:"(def|class)(\\s+)([\\u00BF-\\u1FFF\\u2C00-\\uD7FF\\w]+)"},{token:"text",regex:"\\s+"},{include:"constants"}],qqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],rawqqstring3:[{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],rawqstring3:[{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],rawqqstring:[{token:"string",regex:"\\\\$",next:"rawqqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],rawqstring:[{token:"string",regex:"\\\\$",next:"rawqstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}],fqqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring3:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"\\\\$",next:"fqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstring:[{token:"constant.language.escape",regex:W},{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring3:[{token:"string",regex:'"{3}',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring3:[{token:"string",regex:"'{3}",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqqstring:[{token:"string",regex:"\\\\$",next:"rfqqstring"},{token:"string",regex:'"|$',next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],rfqstring:[{token:"string",regex:"'|$",next:"start"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"},{defaultToken:"string"}],fqstringParRules:[{token:"paren.lparen",regex:"[\\[\\(]"},{token:"paren.rparen",regex:"[\\]\\)]"},{token:"string",regex:"\\s+"},{token:"string",regex:"'[^']*'"},{token:"string",regex:'"[^"]*"'},{token:"function.support",regex:"(!s|!r|!a)"},{include:"constants"},{token:"paren.rparen",regex:"}",next:"pop"},{token:"paren.lparen",regex:"{",push:"fqstringParRules"}],constants:[{token:"constant.numeric",regex:"(?:"+L+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:L},{token:"constant.numeric",regex:M+"[lL]\\b"},{token:"constant.numeric",regex:M+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(w,f),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,h){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,w=r.FoldMode=function(p){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+p+")(?:\\s*)(?:#.*)?$")};d.inherits(w,f),(function(){this.getFoldWidgetRange=function(p,g,i){var a=p.getLine(i),u=a.match(this.foldingStartMarker);if(u)return u[1]?this.openingBracketBlock(p,u[1],i,u.index):u[2]?this.indentationBlock(p,i,u.index+u[2].length):this.indentationBlock(p,i)}}).call(w.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./python_highlight_rules").PythonHighlightRules,p=n("./folding/pythonic").FoldMode,g=n("../range").Range,i=function(){this.HighlightRules=w,this.foldingRules=new p("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(i,f),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(u=="start"){var S=c.match(/^.*[\{\(\[:]\s*$/);S&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,o){if(o!==`\r
|
992
|
+
`&&o!=="\r"&&o!==`
|
993
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var m=l.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new g(o,l.length-m.length,o,l.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/python"],function(n){t&&(t.exports=n)})})()})(Ng)),Ng.exports}Tk();var Pg={exports:{}},Fg;function Ek(){return Fg||(Fg=1,(function(t,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};d.inherits(w,f),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,h){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(w,p){return/^\s+$/.test(w)?/^\s*\}/.test(p):!1},this.autoOutdent=function(w,p){var g=w.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=w.findMatchingBracket({row:p,column:a});if(!u||u.row==p)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,h){var d=n("../../lib/oop"),f=n("../../range").Range,w=n("./fold_mode").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.inherits(p,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,a){var u=g.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(g,i,a,u){var c=g.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(g,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,l);var m=g.getCommentFoldRange(a,l+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(g,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,l):g.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(g,i){var a=g.getLine(i),u=a.search(/\S/),c=i,o=a.length;i+=1;for(var l=i,m=g.getLength();++i<m;){a=g.getLine(i);var b=a.search(/\S/);if(b!==-1){if(u>b)break;var S=this.getFoldWidgetRange(g,"all",i);if(S){if(S.start.row<=c)break;if(S.isMultiLine())i=S.end.row;else if(u==b)break}l=i}}return new f(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var u=i.search(/\s*$/),c=g.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){i=g.getLine(a);var b=l.exec(i);if(b&&(b[1]?m--:m++,!m))break}var S=a;if(S>o)return new f(o,u,S,i.length)}}).call(p.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./json_highlight_rules").JsonHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,i=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=w,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};d.inherits(a,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c);if(u=="start"){var m=c.match(/^.*[\{\(\[]\s*$/);m&&(l+=o)}return l},this.checkOutdent=function(u,c,o){return this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(u,c,o){this.$outdent.autoOutdent(c,o)},this.createWorker=function(u){var c=new i(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(u.getDocument()),c.on("annotate",function(o){u.setAnnotations(o.data)}),c.on("terminate",function(){u.clearAnnotations()}),c},this.$id="ace/mode/json"}).call(a.prototype),r.Mode=a}),(function(){ace.require(["ace/mode/json"],function(n){t&&(t.exports=n)})})()})(Pg)),Pg.exports}Ek();var Bg={exports:{}},jg;function Rk(){return jg||(jg=1,(function(t,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop");n("../lib/lang");var f=n("./text_highlight_rules").TextHighlightRules,w=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",p=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",i=r.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",a=r.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",c=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",o=r.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",l=function(){var m=this.createKeywordMapper({"support.function":p,"support.constant":g,"support.type":w,"support.constant.color":i,"support.constant.fonts":a},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:u},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:c},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:o},{include:"url"},{token:m,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};d.inherits(l,f),r.CssHighlightRules=l}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=function(){this.$rules={start:[{token:["comment.doc.tag","comment.doc.text","lparen.doc"],regex:"(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:["rparen.doc","text.doc","variable.parameter.doc","lparen.doc","variable.parameter.doc","rparen.doc"],regex:/(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,next:"pop"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","lparen.doc"],regex:"(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|implements|external|exception|throws|enum|define|extends))(\\s*)({)",push:[{token:"lparen.doc",regex:"{",push:[{include:"doc-syntax"},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"}]},{token:"rparen.doc",regex:"}|(?=$)",next:"pop"},{include:"doc-syntax"},{defaultToken:"text.doc"}]},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:'(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|requires|param|implements|function|extends|typedef|mixes|constructor|var|memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#.:/~"\\-]*)?'},{token:["comment.doc.tag","text.doc","variable.parameter.doc"],regex:"(@method)(\\s+)(\\w[\\w.\\(\\)]*)"},{token:"comment.doc.tag",regex:"@access\\s+(?:private|public|protected)"},{token:"comment.doc.tag",regex:"@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"},{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},w.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};d.inherits(w,f),w.getTagRule=function(p){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(p){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:p}},w.getEndRule=function(p){return{token:"comment.doc",regex:"\\*\\/",next:p}},r.JsDocCommentHighlightRules=w}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(n,r,h){function d(){var u=i.replace("\\d","\\d\\-"),c={onMatch:function(l,m,b){var S=l.charAt(1)=="/"?2:1;return S==1?(m!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):S==2&&m==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(S==1?"":"end-")+"tag-open.xml",value:l.slice(0,S)},{type:"meta.tag.tag-name.xml",value:l.substr(S)}]},regex:"</?(?:"+u+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(c);var o={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[o,c,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(l,m,b){return m==b[0]&&b.shift(),l.length==2&&(b[0]==this.nextState&&b[1]--,(!b[1]||b[1]<0)&&b.splice(0,2)),this.next=b[0]||"start",[{type:this.token,value:l}]},nextState:"jsx"},o,f("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:u},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},c],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function f(u){return[{token:"comment",regex:/\/\*/,next:[p.getTagRule(),{token:"comment",regex:"\\*\\/",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[p.getTagRule(),{token:"comment",regex:"$|^",next:u||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=n("../lib/oop"),p=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-][a-zA-Z\\d\\$_¡-]*",a=function(u){var c={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},o=this.createKeywordMapper(c,"identifier"),l="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",b="(function)(\\s*)(\\*?)",S={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[p.getStartRule("doc-start"),f("no_regex"),S,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(=)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+i+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+i+")(\\s*)(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+b+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+l+")\\b",next:"start"},{token:"support.constant",regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/},{token:o,regex:i},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:b+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:i},{regex:"",token:"empty",next:"no_regex"}],start:[p.getStartRule("doc-start"),f("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:"punctuation.operator",regex:",",next:"function_arguments"},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],function_arguments:[f("function_arguments"),{token:"variable.parameter",regex:i},{token:"punctuation.operator",regex:","},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!u||!u.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(E,M,k){if(this.next=E=="{"?this.nextState:"",E=="{"&&k.length)k.unshift("start",M);else if(E=="}"&&k.length&&(k.shift(),this.next=k.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return E=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:m},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]},{token:["variable.parameter","text"],regex:"("+i+")(\\s*)(?=\\=>)"},{token:"paren.lparen",regex:"(\\()(?=[^\\(]+\\s*=>)",next:"function_arguments"},{token:"variable.language",regex:"(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"}),this.$rules.function_arguments.unshift({token:"keyword.operator",regex:"=",next:"default_parameter"},{token:"keyword.operator",regex:"\\.{3}"}),this.$rules.property.unshift({token:"support.function",regex:"(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"},{token:"constant.language",regex:"(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"}),(!u||u.jsx!=0)&&d.call(this)),this.embedRules(p,"doc-",[p.getEndRule("no_regex")]),this.normalizeRules()};w.inherits(a,g),r.JavaScriptHighlightRules=a}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=function(p){var g="[_:a-zA-ZÀ-][-_:.a-zA-Z0-9À-]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===w&&this.normalizeRules()};(function(){this.embedTagRules=function(p,g,i){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(<)("+i+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[i+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(a,u,c){return c.splice(0),this.token}}],this.embedRules(p,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+i+".tag-name.xml"],regex:"(</)("+i+"(?=\\s|>|$))",next:i+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(f.prototype),d.inherits(w,f),r.XmlHighlightRules=w}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("../lib/lang"),w=n("./css_highlight_rules").CssHighlightRules,p=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,i=f.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),a=function(){g.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(u,c){var o=i[c];return["meta.tag.punctuation."+(u=="<"?"":"end-")+"tag-open.xml","meta.tag"+(o?"."+o:"")+".tag-name.xml"]},regex:"(</?)([-_a-zA-Z0-9:.]+)",next:"tag_stuff"}],tag_stuff:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}),this.embedTagRules(w,"css-","style"),this.embedTagRules(new p({jsx:!1}).getRules(),"js-","script"),this.constructor===a&&this.normalizeRules()};d.inherits(a,g),r.HtmlHighlightRules=a}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(n,r,h){var d=n("../config").$modes,f=n("../lib/oop"),w=n("../lib/lang"),p=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,i=function(u){return"(?:[^"+w.escapeRegExp(u)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var u={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,m,b){var S=o.match(/^(\s*)([`~]+)(.*)/),E=/[\w-]+|$/.exec(S[3])[0];return d[E]||(E=""),m.unshift("githubblock",[],[S[1],S[2],E],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(o,l,m,b){var S=m[1],E=m[2][0],M=m[2][1],k=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(o);if(x&&x[1].length<E.length+3&&x[2].length>=M.length&&x[2][0]==M[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",k&&d[k]){var R=d[k].getTokenizer().getLineTokens(o,S.slice(0));return m[1]=R.state,R.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(o){return"markup.heading."+o.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},u,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+i("]")+")(\\]\\s*\\[)("+i("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+i("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+i('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:`(<)((?:https?|ftp|dict):[^'">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)`}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},u,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:c}),this.normalizeRules()};f.inherits(a,p),r.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(n,r,h){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,w=n("../../range").Range,p=r.FoldMode=function(){};d.inherits(p,f),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,i,a){var u=g.getLine(a);return this.foldingStartMarker.test(u)?u[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,i,a){function u(I){return E=g.getTokens(I)[0],E&&E.type.lastIndexOf(M,0)===0}function c(){var I=E.value[0];return I=="="?6:I=="-"?5:7-E.value.search(/[^#]|$/)}var o=g.getLine(a),l=o.length,m=g.getLength(),b=a,S=a;if(o.match(this.foldingStartMarker)){if(o[0]=="`"){if(g.bgTokenizer.getState(a)!=="start"){for(;++a<m&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(b,l,a,0)}for(;a-- >0&&(o=g.getLine(a),!(o[0]=="`"&o.substring(0,3)=="```")););return new w(a,o.length,b,0)}var E,M="markup.heading";if(u(a)){for(var k=c();++a<m;)if(u(a)){var x=c();if(x>=k)break}if(S=a-(!E||["=","-"].indexOf(E.value[0])==-1?1:2),S>b)for(;S>b&&/^\s*$/.test(g.getLine(S));)S--;if(S>b){var R=g.getLine(S).length;return new w(b,l,S,R)}}}}}).call(p.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,h){var d=n("../range").Range,f=function(){};(function(){this.checkOutdent=function(w,p){return/^\s+$/.test(w)?/^\s*\}/.test(p):!1},this.autoOutdent=function(w,p){var g=w.getLine(p),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,u=w.findMatchingBracket({row:p,column:a});if(!u||u.row==p)return 0;var c=this.$getIndent(w.getLine(u.row));w.replace(new d(p,0,p,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(f.prototype),r.MatchingBraceOutdent=f}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,r,h){function d(i,a){return i&&i.type.lastIndexOf(a+".xml")>-1}var f=n("../../lib/oop"),w=n("../behaviour").Behaviour,p=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(i,a,u,c,o){if(o=='"'||o=="'"){var l=o,m=c.doc.getTextRange(u.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&u.getWrapBehavioursEnabled())return{text:l+m+l,selection:!1};var b=u.getCursorPosition(),S=c.doc.getLine(b.row),E=S.substring(b.column,b.column+1),M=new p(c,b.row,b.column),k=M.getCurrentToken();if(E==l&&(d(k,"attribute-value")||d(k,"string")))return{text:"",selection:[1,1]};if(k||(k=M.stepBackward()),!k)return;for(;d(k,"tag-whitespace")||d(k,"whitespace");)k=M.stepBackward();var x=!E||E.match(/\s/);if(d(k,"attribute-equals")&&(x||E==">")||d(k,"decl-attribute-equals")&&(x||E=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,a,u,c,o){var l=c.doc.getTextRange(o);if(!o.isMultiLine()&&(l=='"'||l=="'")){var m=c.doc.getLine(o.start.row),b=m.substring(o.start.column+1,o.start.column+2);if(b==l)return o.end.column++,o}}),this.add("autoclosing","insertion",function(i,a,u,c,o){if(o==">"){var l=u.getSelectionRange().start,m=new p(c,l.row,l.column),b=m.getCurrentToken()||m.stepBackward();if(!b||!(d(b,"tag-name")||d(b,"tag-whitespace")||d(b,"attribute-name")||d(b,"attribute-equals")||d(b,"attribute-value"))||d(b,"reference.attribute-value"))return;if(d(b,"attribute-value")){var S=m.getCurrentTokenColumn()+b.value.length;if(l.column<S)return;if(l.column==S){var E=m.stepForward();if(E&&d(E,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(c.getLine(l.row).slice(l.column)))return;for(;!d(b,"tag-name");)if(b=m.stepBackward(),b.value=="<"){b=m.stepForward();break}var M=m.getCurrentTokenRow(),k=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var x=b.value;return M==l.row&&(x=x.substring(0,l.column-k)),this.voidElements&&this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:"></"+x+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,a,u,c,o){if(o==`
|
994
|
+
`){var l=u.getCursorPosition(),m=c.getLine(l.row),b=new p(c,l.row,l.column),S=b.getCurrentToken();if(d(S,"")&&S.type.indexOf("tag-close")!==-1){if(S.value=="/>")return;for(;S&&S.type.indexOf("tag-name")===-1;)S=b.stepBackward();if(!S)return;var E=S.value,M=b.getCurrentTokenRow();if(S=b.stepBackward(),!S||S.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[E]||!this.voidElements){var k=c.getTokenAt(l.row,l.column+1),m=c.getLine(M),x=this.$getIndent(m),R=x+c.getTabString();return k&&k.value==="</"?{text:`
|
995
|
+
`+R+`
|
996
|
+
`+x,selection:[1,R.length,1,R.length]}:{text:`
|
997
|
+
`+R}}}}})};f.inherits(g,w),r.XmlBehaviour=g}),ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"],function(n,r,h){var d=n("../../lib/oop"),f=n("../../token_iterator").TokenIterator,w=n("../behaviour/cstyle").CstyleBehaviour,p=n("../behaviour/xml").XmlBehaviour,g=function(){var i=new p({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(w),this.add("autoclosing-fragment","insertion",function(a,u,c,o,l){if(l==">"){var m=c.getSelectionRange().start,b=new f(o,m.row,m.column),S=b.getCurrentToken()||b.stepBackward();if(!S)return;if(S.value=="<")return{text:"></>",selection:[1,1]}}})};d.inherits(g,w),r.JavaScriptBehaviour=g}),ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,h){function d(a,u){return a&&a.type&&a.type.lastIndexOf(u+".xml")>-1}var f=n("../../lib/oop"),w=n("../../range").Range,p=n("./fold_mode").FoldMode,g=r.FoldMode=function(a,u){p.call(this),this.voidElements=a||{},this.optionalEndTags=f.mixin({},this.voidElements),u&&f.mixin(this.optionalEndTags,u)};f.inherits(g,p);var i=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(a,u,c){var o=this._getFirstTagInLine(a,c);return o?o.closing||!o.tagName&&o.selfClosing?u==="markbeginend"?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())||this._findEndTagInLine(a,c,o.tagName,o.end.column)?"":"start":this.getCommentFoldWidget(a,c)},this.getCommentFoldWidget=function(a,u){return/comment/.test(a.getState(u))&&/<!-/.test(a.getLine(u))?"start":""},this._getFirstTagInLine=function(a,u){for(var c=a.getTokens(u),o=new i,l=0;l<c.length;l++){var m=c[l];if(d(m,"tag-open")){if(o.end.column=o.start.column+m.value.length,o.closing=d(m,"end-tag-open"),m=c[++l],!m)return null;if(o.tagName=m.value,m.value===""){if(m=c[++l],!m)return null;o.tagName=m.value}for(o.end.column+=m.value.length,l++;l<c.length;l++)if(m=c[l],o.end.column+=m.value.length,d(m,"tag-close")){o.selfClosing=m.value=="/>";break}return o}if(d(m,"tag-close"))return o.selfClosing=m.value=="/>",o;o.start.column+=m.value.length}return null},this._findEndTagInLine=function(a,u,c,o){for(var l=a.getTokens(u),m=0,b=0;b<l.length;b++){var S=l[b];if(m+=S.value.length,!(m<o-1)&&d(S,"end-tag-open")&&(S=l[b+1],d(S,"tag-name")&&S.value===""&&(S=l[b+2]),S&&S.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,u,c){var o=this._getFirstTagInLine(a,c);if(!o)return this.getCommentFoldWidget(a,c)&&a.getCommentFoldRange(c,a.getLine(c).length);var l=a.getMatchingTags({row:c,column:0});if(l)return new w(l.openTag.end.row,l.openTag.end.column,l.closeTag.start.row,l.closeTag.start.column)}}).call(g.prototype)}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,h){var d=n("../../lib/oop"),f=n("../../range").Range,w=n("./fold_mode").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.inherits(p,w),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,a){var u=g.getLine(a);if(this.singleLineBlockCommentRe.test(u)&&!this.startRegionRe.test(u)&&!this.tripleStarBlockCommentRe.test(u))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(u)?"start":c},this.getFoldWidgetRange=function(g,i,a,u){var c=g.getLine(a);if(this.startRegionRe.test(c))return this.getCommentRegionBlock(g,c,a);var o=c.match(this.foldingStartMarker);if(o){var l=o.index;if(o[1])return this.openingBracketBlock(g,o[1],a,l);var m=g.getCommentFoldRange(a,l+o[0].length,1);return m&&!m.isMultiLine()&&(u?m=this.getSectionRange(g,a):i!="all"&&(m=null)),m}if(i!=="markbegin"){var o=c.match(this.foldingStopMarker);if(o){var l=o.index+o[0].length;return o[1]?this.closingBracketBlock(g,o[1],a,l):g.getCommentFoldRange(a,l,-1)}}},this.getSectionRange=function(g,i){var a=g.getLine(i),u=a.search(/\S/),c=i,o=a.length;i+=1;for(var l=i,m=g.getLength();++i<m;){a=g.getLine(i);var b=a.search(/\S/);if(b!==-1){if(u>b)break;var S=this.getFoldWidgetRange(g,"all",i);if(S){if(S.start.row<=c)break;if(S.isMultiLine())i=S.end.row;else if(u==b)break}l=i}}return new f(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var u=i.search(/\s*$/),c=g.getLength(),o=a,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++a<c;){i=g.getLine(a);var b=l.exec(i);if(b&&(b[1]?m--:m++,!m))break}var S=a;if(S>o)return new f(o,u,S,i.length)}}).call(p.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,r,h){var d=n("../../lib/oop"),f=n("./xml").FoldMode,w=n("./cstyle").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end))),this.xmlFoldMode=new f};d.inherits(p,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,a){var u=this.getFoldWidgetBase(g,i,a);return u||this.xmlFoldMode.getFoldWidget(g,i,a)},this.getFoldWidgetRange=function(g,i,a,u){var c=this.getFoldWidgetRangeBase(g,i,a,u);return c||this.xmlFoldMode.getFoldWidgetRange(g,i,a)}}).call(p.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"],function(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./javascript_highlight_rules").JavaScriptHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,u=function(){this.HighlightRules=w,this.$outdent=new p,this.$behaviour=new i,this.foldingRules=new a};d.inherits(u,f),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.$pairQuotesAfter={"`":/\w/},this.getNextLineIndent=function(c,o,l){var m=this.$getIndent(o),b=this.getTokenizer().getLineTokens(o,c),S=b.tokens,E=b.state;if(S.length&&S[S.length-1].type=="comment")return m;if(c=="start"||c=="no_regex"){var M=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);M&&(m+=l)}else if(c=="doc-start"&&(E=="start"||E=="no_regex"))return"";return m},this.checkOutdent=function(c,o,l){return this.$outdent.checkOutdent(o,l)},this.autoOutdent=function(c,o,l){this.$outdent.autoOutdent(o,l)},this.createWorker=function(c){var o=new g(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return o.attachToDocument(c.getDocument()),o.on("annotate",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,h){var d={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},f=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var p in w)if(typeof w[p]=="string"){var g=p.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});d.hasOwnProperty(g)||(d[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,p,g,i){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||p.$mode.$id=="ace/mode/scss"){var a=p.getLine(g.row).substr(0,g.column),u=/\([^)]*$/.test(a);return u&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(w,p,g,i):this.getPropertyCompletions(w,p,g,i,u)}return[]},this.getPropertyCompletions=function(w,p,g,i,a){a=a||!1;var u=Object.keys(d);return u.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,p,g,i){var a=p.getLine(g.row).substr(0,g.column),u=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!u)return[];var c=[];return u in d&&typeof d[u]=="object"&&(c=Object.keys(d[u])),c.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(f.prototype),r.CssCompletions=f}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,h){var d=n("../../lib/oop");n("../behaviour").Behaviour;var f=n("./cstyle").CstyleBehaviour,w=n("../../token_iterator").TokenIterator,p=function(){this.inherit(f),this.add("colon","insertion",function(g,i,a,u,c){if(c===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=new w(u,o.row,o.column),m=l.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=l.stepBackward()),m&&m.type==="support.type"){var b=u.doc.getLine(o.row),S=b.substring(o.column,o.column+1);if(S===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(b.substring(o.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(g,i,a,u,c){var o=u.doc.getTextRange(c);if(!c.isMultiLine()&&o===":"){var l=a.getCursorPosition(),m=new w(u,l.row,l.column),b=m.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=m.stepBackward()),b&&b.type==="support.type"){var S=u.doc.getLine(c.start.row),E=S.substring(c.end.column,c.end.column+1);if(E===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(g,i,a,u,c){if(c===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=u.doc.getLine(o.row),m=l.substring(o.column,o.column+1);if(m===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(g,i,a,u,c){if(c==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=u.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(p,f),r.CssBehaviour=p}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./css_highlight_rules").CssHighlightRules,p=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,u=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new p,this.$behaviour=new a,this.$completer=new i,this.foldingRules=new u};d.inherits(c,f),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,m){var b=this.$getIndent(l),S=this.getTokenizer().getLineTokens(l,o).tokens;if(S.length&&S[S.length-1].type=="comment")return b;var E=l.match(/^.*\{\s*$/);return E&&(b+=m),b},this.checkOutdent=function(o,l,m){return this.$outdent.checkOutdent(l,m)},this.autoOutdent=function(o,l,m){this.$outdent.autoOutdent(l,m)},this.getCompletions=function(o,l,m,b){return this.$completer.getCompletions(o,l,m,b)},this.createWorker=function(o){var l=new g(["ace"],"ace/mode/css_worker","Worker");return l.attachToDocument(o.getDocument()),l.on("annotate",function(m){o.setAnnotations(m.data)}),l.on("terminate",function(){o.clearAnnotations()}),l},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}).call(c.prototype),r.Mode=c}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,h){var d=n("../../lib/oop"),f=n("./fold_mode").FoldMode,w=r.FoldMode=function(p,g){this.defaultMode=p,this.subModes=g};d.inherits(w,f),(function(){this.$getMode=function(p){typeof p!="string"&&(p=p[0]);for(var g in this.subModes)if(p.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(p,g,i,a){var u=this.$getMode(p);return u?u.getFoldWidget(g,i,a):""},this.getFoldWidget=function(p,g,i){return this.$tryMode(p.getState(i-1),p,g,i)||this.$tryMode(p.getState(i),p,g,i)||this.defaultMode.getFoldWidget(p,g,i)},this.getFoldWidgetRange=function(p,g,i){var a=this.$getMode(p.getState(i-1));return(!a||!a.getFoldWidget(p,g,i))&&(a=this.$getMode(p.getState(i))),(!a||!a.getFoldWidget(p,g,i))&&(a=this.defaultMode),a.getFoldWidgetRange(p,g,i)}}).call(w.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,r,h){var d=n("../../lib/oop"),f=n("./mixed").FoldMode,w=n("./xml").FoldMode,p=n("./cstyle").FoldMode,g=r.FoldMode=function(i,a){f.call(this,new w(i,a),{"js-":new p,"css-":new p})};d.inherits(g,f)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,r,h){function d(l,m){return l.type.lastIndexOf(m+".xml")>-1}function f(l,m){for(var b=new p(l,m.row,m.column),S=b.getCurrentToken();S&&!d(S,"tag-name");)S=b.stepBackward();if(S)return S.value}function w(l,m){for(var b=new p(l,m.row,m.column),S=b.getCurrentToken();S&&!d(S,"attribute-name");)S=b.stepBackward();if(S)return S.value}var p=n("../token_iterator").TokenIterator,g=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],i=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=g.concat(i),u={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,for:1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{for:1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,default:1},section:{},summary:{},u:{},ul:{},var:{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(u),o=function(){};(function(){this.getCompletions=function(l,m,b,S){var E=m.getTokenAt(b.row,b.column);if(!E)return[];if(d(E,"tag-name")||d(E,"tag-open")||d(E,"end-tag-open"))return this.getTagCompletions(l,m,b,S);if(d(E,"tag-whitespace")||d(E,"attribute-name"))return this.getAttributeCompletions(l,m,b,S);if(d(E,"attribute-value"))return this.getAttributeValueCompletions(l,m,b,S);var M=m.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(M)?this.getHTMLEntityCompletions(l,m,b,S):[]},this.getTagCompletions=function(l,m,b,S){return c.map(function(E){return{value:E,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,m,b,S){var E=f(m,b);if(!E)return[];var M=a;return E in u&&(M=M.concat(Object.keys(u[E]))),M.map(function(k){return{caption:k,snippet:k+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,m,b,S){var E=f(m,b),M=w(m,b);if(!E)return[];var k=[];return E in u&&M in u[E]&&typeof u[E][M]=="object"&&(k=Object.keys(u[E][M])),k.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,m,b,S){var E=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return E.map(function(M){return{caption:M,snippet:M,meta:"html entity",score:1e6}})}}).call(o.prototype),r.HtmlCompletions=o}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(n,r,h){var d=n("../lib/oop"),f=n("../lib/lang"),w=n("./text").Mode,p=n("./javascript").Mode,g=n("./css").Mode,i=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,u=n("./folding/html").FoldMode,c=n("./html_completions").HtmlCompletions,o=n("../worker/worker_client").WorkerClient,l=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],m=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],b=function(S){this.fragmentContext=S&&S.fragmentContext,this.HighlightRules=i,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":p,"css-":g}),this.foldingRules=new u(this.voidElements,f.arrayToMap(m))};d.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=f.arrayToMap(l),this.getNextLineIndent=function(S,E,M){return this.$getIndent(E)},this.checkOutdent=function(S,E,M){return!1},this.getCompletions=function(S,E,M,k){return this.$completer.getCompletions(S,E,M,k)},this.createWorker=function(S){if(this.constructor==b){var E=new o(["ace"],"ace/mode/html_worker","Worker");return E.attachToDocument(S.getDocument()),this.fragmentContext&&E.call("setOptions",[{context:this.fragmentContext}]),E.on("error",function(M){S.setAnnotations(M.data)}),E.on("terminate",function(){S.clearAnnotations()}),E}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}).call(b.prototype),r.Mode=b}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,h){var d=n("../lib/oop"),f=n("./text_highlight_rules").TextHighlightRules,w=r.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",p=r.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",g=function(){var i=this.createKeywordMapper({keyword:w,"support.function.builtin":p,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",u="(?:\\.\\d+)",c="(?:\\d+)",o="(?:(?:"+c+"?"+u+")|(?:"+c+"\\.))",l="(?:(?:"+o+"|"+c+"))",m="(?:"+l+"|"+o+")",b="(?:&"+c+")",S="[a-zA-Z_][a-zA-Z0-9_]*",E="(?:"+S+"(?==))",M="(?:\\$(?:SHLVL|\\$|\\!|\\?))",k="(?:"+S+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(x,R,I){var O=x[2]=="-"?"indentedHeredoc":"heredoc",L=x.split(this.splitRegex);return I.push(O,L[4]),[{type:"constant",value:L[1]},{type:"text",value:L[2]},{type:"string",value:L[3]},{type:"support.class",value:L[4]},{type:"string",value:L[5]}]},rules:{heredoc:[{onMatch:function(x,R,I){return x===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(x,R,I){return x===I[1]?(I.shift(),I.shift(),this.next=I[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(x,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:x}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:M},{token:"variable",regex:E},{include:"variables"},{token:"support.function",regex:k},{token:"support.function",regex:b},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:a+"\\b"},{token:i,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};d.inherits(g,f),r.ShHighlightRules=g}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle"],function(n,r,h){var d=n("../lib/oop"),f=n("./text").Mode,w=n("./sh_highlight_rules").ShHighlightRules,p=n("../range").Range,g=n("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=w,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};d.inherits(i,f),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(u,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,u),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(u=="start"){var S=c.match(/^.*[\{\(\[:]\s*$/);S&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(u,c,o){if(o!==`\r
|
998
|
+
`&&o!=="\r"&&o!==`
|
999
|
+
`)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),u).tokens;if(!l)return!1;do var m=l.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&a[m.value]:!1},this.autoOutdent=function(u,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new p(o,l.length-m.length,o,l.length))},this.$id="ace/mode/sh",this.snippetFileId="ace/snippets/sh"}).call(i.prototype),r.Mode=i}),ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"],function(n,r,h){var d=n("../lib/oop"),f=n("../lib/lang"),w=n("./text").Mode,p=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,i=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=p,this.$behaviour=new g,this.foldingRules=new i};d.inherits(u,w),(function(){this.voidElements=f.arrayToMap([]),this.blockComment={start:"<!--",end:"-->"},this.createWorker=function(c){var o=new a(["ace"],"ace/mode/xml_worker","Worker");return o.attachToDocument(c.getDocument()),o.on("error",function(l){c.setAnnotations(l.data)}),o.on("terminate",function(){c.clearAnnotations()}),o},this.$id="ace/mode/xml"}).call(u.prototype),r.Mode=u}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/behaviour/cstyle","ace/mode/text","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(n,r,h){var d=n("../lib/oop"),f=n("./behaviour/cstyle").CstyleBehaviour,w=n("./text").Mode,p=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,i=function(){this.HighlightRules=p,this.createModeDelegates({javascript:n("./javascript").Mode,html:n("./html").Mode,bash:n("./sh").Mode,sh:n("./sh").Mode,xml:n("./xml").Mode,css:n("./css").Mode}),this.foldingRules=new g,this.$behaviour=new f({braces:!0})};d.inherits(i,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,u,c){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(u);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(u)},this.$id="ace/mode/markdown",this.snippetFileId="ace/snippets/markdown"}).call(i.prototype),r.Mode=i}),(function(){ace.require(["ace/mode/markdown"],function(n){t&&(t.exports=n)})})()})(Bg)),Bg.exports}Rk();var Wg={exports:{}},zg;function Lk(){return zg||(zg=1,(function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,r,h){h.exports=`.ace-twilight .ace_gutter {
|
1000
|
+
background: #232323;
|
1001
|
+
color: #E2E2E2
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
.ace-twilight .ace_print-margin {
|
1005
|
+
width: 1px;
|
1006
|
+
background: #232323
|
1007
|
+
}
|
1008
|
+
|
1009
|
+
.ace-twilight {
|
1010
|
+
background-color: #141414;
|
1011
|
+
color: #F8F8F8
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
.ace-twilight .ace_cursor {
|
1015
|
+
color: #A7A7A7
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
.ace-twilight .ace_marker-layer .ace_selection {
|
1019
|
+
background: rgba(221, 240, 255, 0.20)
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
.ace-twilight.ace_multiselect .ace_selection.ace_start {
|
1023
|
+
box-shadow: 0 0 3px 0px #141414;
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
.ace-twilight .ace_marker-layer .ace_step {
|
1027
|
+
background: rgb(102, 82, 0)
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
.ace-twilight .ace_marker-layer .ace_bracket {
|
1031
|
+
margin: -1px 0 0 -1px;
|
1032
|
+
border: 1px solid rgba(255, 255, 255, 0.25)
|
1033
|
+
}
|
1034
|
+
|
1035
|
+
.ace-twilight .ace_marker-layer .ace_active-line {
|
1036
|
+
background: rgba(255, 255, 255, 0.031)
|
1037
|
+
}
|
1038
|
+
|
1039
|
+
.ace-twilight .ace_gutter-active-line {
|
1040
|
+
background-color: rgba(255, 255, 255, 0.031)
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
.ace-twilight .ace_marker-layer .ace_selected-word {
|
1044
|
+
border: 1px solid rgba(221, 240, 255, 0.20)
|
1045
|
+
}
|
1046
|
+
|
1047
|
+
.ace-twilight .ace_invisible {
|
1048
|
+
color: rgba(255, 255, 255, 0.25)
|
1049
|
+
}
|
1050
|
+
|
1051
|
+
.ace-twilight .ace_keyword,
|
1052
|
+
.ace-twilight .ace_meta {
|
1053
|
+
color: #CDA869
|
1054
|
+
}
|
1055
|
+
|
1056
|
+
.ace-twilight .ace_constant,
|
1057
|
+
.ace-twilight .ace_constant.ace_character,
|
1058
|
+
.ace-twilight .ace_constant.ace_character.ace_escape,
|
1059
|
+
.ace-twilight .ace_constant.ace_other,
|
1060
|
+
.ace-twilight .ace_heading,
|
1061
|
+
.ace-twilight .ace_markup.ace_heading,
|
1062
|
+
.ace-twilight .ace_support.ace_constant {
|
1063
|
+
color: #CF6A4C
|
1064
|
+
}
|
1065
|
+
|
1066
|
+
.ace-twilight .ace_invalid.ace_illegal {
|
1067
|
+
color: #F8F8F8;
|
1068
|
+
background-color: rgba(86, 45, 86, 0.75)
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
.ace-twilight .ace_invalid.ace_deprecated {
|
1072
|
+
text-decoration: underline;
|
1073
|
+
font-style: italic;
|
1074
|
+
color: #D2A8A1
|
1075
|
+
}
|
1076
|
+
|
1077
|
+
.ace-twilight .ace_support {
|
1078
|
+
color: #9B859D
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
.ace-twilight .ace_fold {
|
1082
|
+
background-color: #AC885B;
|
1083
|
+
border-color: #F8F8F8
|
1084
|
+
}
|
1085
|
+
|
1086
|
+
.ace-twilight .ace_support.ace_function {
|
1087
|
+
color: #DAD085
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
.ace-twilight .ace_list,
|
1091
|
+
.ace-twilight .ace_markup.ace_list,
|
1092
|
+
.ace-twilight .ace_storage {
|
1093
|
+
color: #F9EE98
|
1094
|
+
}
|
1095
|
+
|
1096
|
+
.ace-twilight .ace_entity.ace_name.ace_function,
|
1097
|
+
.ace-twilight .ace_meta.ace_tag {
|
1098
|
+
color: #AC885B
|
1099
|
+
}
|
1100
|
+
|
1101
|
+
.ace-twilight .ace_string {
|
1102
|
+
color: #8F9D6A
|
1103
|
+
}
|
1104
|
+
|
1105
|
+
.ace-twilight .ace_string.ace_regexp {
|
1106
|
+
color: #E9C062
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
.ace-twilight .ace_comment {
|
1110
|
+
font-style: italic;
|
1111
|
+
color: #5F5A60
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
.ace-twilight .ace_variable {
|
1115
|
+
color: #7587A6
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
.ace-twilight .ace_xml-pe {
|
1119
|
+
color: #494949
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
.ace-twilight .ace_indent-guide {
|
1123
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
.ace-twilight .ace_indent-guide-active {
|
1127
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
1128
|
+
}
|
1129
|
+
`}),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],function(n,r,h){r.isDark=!0,r.cssClass="ace-twilight",r.cssText=n("./twilight-css");var d=n("../lib/dom");d.importCssString(r.cssText,r.cssClass,!1)}),(function(){ace.require(["ace/theme/twilight"],function(n){t&&(t.exports=n)})})()})(Wg)),Wg.exports}Lk();var Hg={exports:{}},Ug;function Ok(){return Ug||(Ug=1,(function(t,e){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(n,r,h){function d(x){var R=new Date().toLocaleString("en-us",x);return R.length==1?"0"+R:R}var f=n("./lib/dom"),w=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),i=n("./range").Range,a=n("./range_list").RangeList,u=n("./keyboard/hash_handler").HashHandler,c=n("./tokenizer").Tokenizer,o=n("./clipboard"),l={CURRENT_WORD:function(x){return x.session.getTextRange(x.session.getWordRange())},SELECTION:function(x,R,I){var O=x.session.getTextRange();return I?O.replace(/\n\r?([ \t]*\S)/g,`
|
1130
|
+
`+I+"$1"):O},CURRENT_LINE:function(x){return x.session.getLine(x.getCursorPosition().row)},PREV_LINE:function(x){return x.session.getLine(x.getCursorPosition().row-1)},LINE_INDEX:function(x){return x.getCursorPosition().row},LINE_NUMBER:function(x){return x.getCursorPosition().row+1},SOFT_TABS:function(x){return x.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(x){return x.session.getTabSize()},CLIPBOARD:function(x){return o.getText&&o.getText()},FILENAME:function(x){return/[^/\\]*$/.exec(this.FILEPATH(x))[0]},FILENAME_BASE:function(x){return/[^/\\]*$/.exec(this.FILEPATH(x))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(x){return this.FILEPATH(x).replace(/[^/\\]*$/,"")},FILEPATH:function(x){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(x){var R=x.session.$mode||{};return R.blockComment&&R.blockComment.start||""},BLOCK_COMMENT_END:function(x){var R=x.session.$mode||{};return R.blockComment&&R.blockComment.end||""},LINE_COMMENT:function(x){var R=x.session.$mode||{};return R.lineCommentStart||""},CURRENT_YEAR:d.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:d.bind(null,{year:"2-digit"}),CURRENT_MONTH:d.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:d.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:d.bind(null,{month:"short"}),CURRENT_DATE:d.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:d.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:d.bind(null,{weekday:"short"}),CURRENT_HOUR:d.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:d.bind(null,{minute:"2-digit"}),CURRENT_SECOND:d.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var m=(function(){function x(){this.snippetMap={},this.snippetNameMap={},this.variables=l}return x.prototype.getTokenizer=function(){return x.$tokenizer||this.createTokenizer()},x.prototype.createTokenizer=function(){function R(L){return L=L.substr(1),/^\d+$/.test(L)?[{tabstopId:parseInt(L,10)}]:[{text:L}]}function I(L){return"(?:[^\\\\"+L+"]|\\\\.)"}var O={regex:"/("+I("/")+"+)/",onMatch:function(L,W,F){var N=F[0];return N.fmtString=!0,N.guard=L.slice(1,-1),N.flag="",""},next:"formatString"};return x.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(L,W,F){var N=L[1];return(N=="}"&&F.length||"`$\\".indexOf(N)!=-1)&&(L=N),[L]}},{regex:/}/,onMatch:function(L,W,F){return[F.length?F.shift():L]}},{regex:/\$(?:\d+|\w+)/,onMatch:R},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(L,W,F){var N=R(L.substr(1));return F.unshift(N[0]),N},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+I("\\|")+"*\\|",onMatch:function(L,W,F){var N=L.slice(1,-1).replace(/\\[,|\\]|,/g,function($){return $.length==2?$[1]:"\0"}).split("\0").map(function($){return{value:$}});return F[0].choices=N,[N[0]]},next:"start"},O,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(L,W,F){return F.length&&F[0].expectElse?(F[0].expectElse=!1,F[0].ifEnd={elseEnd:F[0]},[F[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(L,W,F){var N=L[1];return N=="}"&&F.length||"`$\\".indexOf(N)!=-1?L=N:N=="n"?L=`
|
1131
|
+
`:N=="t"?L=" ":"ulULE".indexOf(N)!=-1&&(L={changeCase:N,local:N>"a"}),[L]}},{regex:"/\\w*}",onMatch:function(L,W,F){var N=F.shift();return N&&(N.flag=L.slice(1,-1)),this.next=N&&N.tabstopId?"start":"",[N||L]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(L,W,F){return[{text:L.slice(1)}]}},{regex:/\${\w+/,onMatch:function(L,W,F){var N={text:L.slice(2)};return F.unshift(N),[N]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(L,W,F){var N=F.shift();return this.next=N&&N.tabstopId?"start":"",[N||L]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(L,W,F){var N=F[0];return N.formatFunction=L.slice(2,-1),[F.shift()]},next:"formatString"},O,{regex:/:[\?\-+]?/,onMatch:function(L,W,F){L[1]=="+"&&(F[0].ifEnd=F[0]),L[1]=="?"&&(F[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),x.$tokenizer},x.prototype.tokenizeTmSnippet=function(R,I){return this.getTokenizer().getLineTokens(R,I).tokens.map(function(O){return O.value||O})},x.prototype.getVariableValue=function(R,I,O){if(/^\d+$/.test(I))return(this.variables.__||{})[I]||"";if(/^[A-Z]\d+$/.test(I))return(this.variables[I[0]+"__"]||{})[I.substr(1)]||"";if(I=I.replace(/^TM_/,""),!this.variables.hasOwnProperty(I))return"";var L=this.variables[I];return typeof L=="function"&&(L=this.variables[I](R,I,O)),L??""},x.prototype.tmStrFormat=function(R,I,O){if(!I.fmt)return R;var L=I.flag||"",W=I.guard;W=new RegExp(W,L.replace(/[^gim]/g,""));var F=typeof I.fmt=="string"?this.tokenizeTmSnippet(I.fmt,"formatString"):I.fmt,N=this,$=R.replace(W,function(){var _=N.variables.__;N.variables.__=[].slice.call(arguments);for(var D=N.resolveVariables(F,O),z="E",U=0;U<D.length;U++){var G=D[U];if(typeof G=="object")if(D[U]="",G.changeCase&&G.local){var Z=D[U+1];Z&&typeof Z=="string"&&(G.changeCase=="u"?D[U]=Z[0].toUpperCase():D[U]=Z[0].toLowerCase(),D[U+1]=Z.substr(1))}else G.changeCase&&(z=G.changeCase);else z=="U"?D[U]=G.toUpperCase():z=="L"&&(D[U]=G.toLowerCase())}return N.variables.__=_,D.join("")});return $},x.prototype.tmFormatFunction=function(R,I,O){return I.formatFunction=="upcase"?R.toUpperCase():I.formatFunction=="downcase"?R.toLowerCase():R},x.prototype.resolveVariables=function(R,I){function O(z){var U=R.indexOf(z,N+1);U!=-1&&(N=U)}for(var L=[],W="",F=!0,N=0;N<R.length;N++){var $=R[N];if(typeof $=="string"){L.push($),$==`
|
1132
|
+
`?(F=!0,W=""):F&&(W=/^\t*/.exec($)[0],F=/\S/.test($));continue}if($){if(F=!1,$.fmtString){var _=R.indexOf($,N+1);_==-1&&(_=R.length),$.fmt=R.slice(N+1,_),N=_}if($.text){var D=this.getVariableValue(I,$.text,W)+"";$.fmtString&&(D=this.tmStrFormat(D,$,I)),$.formatFunction&&(D=this.tmFormatFunction(D,$,I)),D&&!$.ifEnd?(L.push(D),O($)):!D&&$.ifEnd&&O($.ifEnd)}else $.elseEnd?O($.elseEnd):($.tabstopId!=null||$.changeCase!=null)&&L.push($)}}return L},x.prototype.getDisplayTextForSnippet=function(R,I){var O=b.call(this,R,I);return O.text},x.prototype.insertSnippetForSelection=function(R,I,O){O===void 0&&(O={});var L=b.call(this,R,I,O),W=R.getSelectionRange(),F=R.session.replace(W,L.text),N=new S(R),$=R.inVirtualSelectionMode&&R.selection.index;N.addTabstops(L.tabstops,W.start,F,$)},x.prototype.insertSnippet=function(R,I,O){O===void 0&&(O={});var L=this;if(R.inVirtualSelectionMode)return L.insertSnippetForSelection(R,I,O);R.forEachSelection(function(){L.insertSnippetForSelection(R,I,O)},null,{keepOrder:!0}),R.tabstopManager&&R.tabstopManager.tabNext()},x.prototype.$getScope=function(R){var I=R.session.$mode.$id||"";if(I=I.split("/").pop(),I==="html"||I==="php"){I==="php"&&!R.session.$mode.inlinePhp&&(I="html");var O=R.getCursorPosition(),L=R.session.getState(O.row);typeof L=="object"&&(L=L[0]),L.substring&&(L.substring(0,3)=="js-"?I="javascript":L.substring(0,4)=="css-"?I="css":L.substring(0,4)=="php-"&&(I="php"))}return I},x.prototype.getActiveScopes=function(R){var I=this.$getScope(R),O=[I],L=this.snippetMap;return L[I]&&L[I].includeScopes&&O.push.apply(O,L[I].includeScopes),O.push("_"),O},x.prototype.expandWithTab=function(R,I){var O=this,L=R.forEachSelection(function(){return O.expandSnippetForSelection(R,I)},null,{keepOrder:!0});return L&&R.tabstopManager&&R.tabstopManager.tabNext(),L},x.prototype.expandSnippetForSelection=function(R,I){var O=R.getCursorPosition(),L=R.session.getLine(O.row),W=L.substring(0,O.column),F=L.substr(O.column),N=this.snippetMap,$;return this.getActiveScopes(R).some(function(_){var D=N[_];return D&&($=this.findMatchingSnippet(D,W,F)),!!$},this),$?(I&&I.dryRun||(R.session.doc.removeInLine(O.row,O.column-$.replaceBefore.length,O.column+$.replaceAfter.length),this.variables.M__=$.matchBefore,this.variables.T__=$.matchAfter,this.insertSnippetForSelection(R,$.content),this.variables.M__=this.variables.T__=null),!0):!1},x.prototype.findMatchingSnippet=function(R,I,O){for(var L=R.length;L--;){var W=R[L];if(!(W.startRe&&!W.startRe.test(I))&&!(W.endRe&&!W.endRe.test(O))&&!(!W.startRe&&!W.endRe))return W.matchBefore=W.startRe?W.startRe.exec(I):[""],W.matchAfter=W.endRe?W.endRe.exec(O):[""],W.replaceBefore=W.triggerRe?W.triggerRe.exec(I)[0]:"",W.replaceAfter=W.endTriggerRe?W.endTriggerRe.exec(O)[0]:"",W}},x.prototype.register=function(R,I){function O(_){return _&&!/^\^?\(.*\)\$?$|^\\b$/.test(_)&&(_="(?:"+_+")"),_||""}function L(_,D,z){return _=O(_),D=O(D),_=D+_,_&&_[_.length-1]!="$"&&(_+="$"),new RegExp(_)}function W(_){_.scope||(_.scope=I||"_"),I=_.scope,F[I]||(F[I]=[],N[I]={});var D=N[I];if(_.name){var z=D[_.name];z&&$.unregister(z),D[_.name]=_}F[I].push(_),_.prefix&&(_.tabTrigger=_.prefix),!_.content&&_.body&&(_.content=Array.isArray(_.body)?_.body.join(`
|
1133
|
+
`):_.body),_.tabTrigger&&!_.trigger&&(!_.guard&&/^\w/.test(_.tabTrigger)&&(_.guard="\\b"),_.trigger=g.escapeRegExp(_.tabTrigger)),!(!_.trigger&&!_.guard&&!_.endTrigger&&!_.endGuard)&&(_.startRe=L(_.trigger,_.guard),_.triggerRe=new RegExp(_.trigger),_.endRe=L(_.endTrigger,_.endGuard),_.endTriggerRe=new RegExp(_.endTrigger))}var F=this.snippetMap,N=this.snippetNameMap,$=this;R||(R=[]),Array.isArray(R)?R.forEach(W):Object.keys(R).forEach(function(_){W(R[_])}),this._signal("registerSnippets",{scope:I})},x.prototype.unregister=function(R,I){function O(F){var N=W[F.scope||I];if(N&&N[F.name]){delete N[F.name];var $=L[F.scope||I],_=$&&$.indexOf(F);_>=0&&$.splice(_,1)}}var L=this.snippetMap,W=this.snippetNameMap;R.content?O(R):Array.isArray(R)&&R.forEach(O)},x.prototype.parseSnippetFile=function(R){R=R.replace(/\r/g,"");for(var I=[],O={},L=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,W;W=L.exec(R);){if(W[1])try{O=JSON.parse(W[1]),I.push(O)}catch{}if(W[4])O.content=W[4].replace(/^\t/gm,""),I.push(O),O={};else{var F=W[2],N=W[3];if(F=="regex"){var $=/\/((?:[^\/\\]|\\.)*)|$/g;O.guard=$.exec(N)[1],O.trigger=$.exec(N)[1],O.endTrigger=$.exec(N)[1],O.endGuard=$.exec(N)[1]}else F=="snippet"?(O.tabTrigger=N.match(/^\S*/)[0],O.name||(O.name=N)):F&&(O[F]=N)}}return I},x.prototype.getSnippetByName=function(R,I){var O=this.snippetNameMap,L;return this.getActiveScopes(I).some(function(W){var F=O[W];return F&&(L=F[R]),!!L},this),L},x})();w.implement(m.prototype,p);var b=function(x,R,I){function O(ce){for(var ge=[],Ae=0;Ae<ce.length;Ae++){var Te=ce[Ae];if(typeof Te=="object"){if(D[Te.tabstopId])continue;var Re=ce.lastIndexOf(Te,Ae-1);Te=ge[Re]||{tabstopId:Te.tabstopId}}ge[Ae]=Te}return ge}I===void 0&&(I={});var L=x.getCursorPosition(),W=x.session.getLine(L.row),F=x.session.getTabString(),N=W.match(/^\s*/)[0];L.column<N.length&&(N=N.slice(0,L.column)),R=R.replace(/\r/g,"");var $=this.tokenizeTmSnippet(R);$=this.resolveVariables($,x),$=$.map(function(ce){return ce==`
|
1134
|
+
`&&!I.excludeExtraIndent?ce+N:typeof ce=="string"?ce.replace(/\t/g,F):ce});var _=[];$.forEach(function(ce,ge){if(typeof ce=="object"){var Ae=ce.tabstopId,Te=_[Ae];if(Te||(Te=_[Ae]=[],Te.index=Ae,Te.value="",Te.parents={}),Te.indexOf(ce)===-1){ce.choices&&!Te.choices&&(Te.choices=ce.choices),Te.push(ce);var Re=$.indexOf(ce,ge+1);if(Re!==-1){var Xe=$.slice(ge+1,Re),Ke=Xe.some(function(dt){return typeof dt=="object"});Ke&&!Te.value?Te.value=Xe:Xe.length&&(!Te.value||typeof Te.value!="string")&&(Te.value=Xe.join(""))}}}}),_.forEach(function(ce){ce.length=0});for(var D={},z=0;z<$.length;z++){var U=$[z];if(typeof U=="object"){var G=U.tabstopId,Z=_[G],te=$.indexOf(U,z+1);if(D[G]){D[G]===U&&(delete D[G],Object.keys(D).forEach(function(ce){Z.parents[ce]=!0}));continue}D[G]=U;var he=Z.value;typeof he!="string"?he=O(he):U.fmt&&(he=this.tmStrFormat(he,U,x)),$.splice.apply($,[z+1,Math.max(0,te-z)].concat(he,U)),Z.indexOf(U)===-1&&Z.push(U)}}var ne=0,le=0,ue="";return $.forEach(function(ce){if(typeof ce=="string"){var ge=ce.split(`
|
1135
|
+
`);ge.length>1?(le=ge[ge.length-1].length,ne+=ge.length-1):le+=ce.length,ue+=ce}else ce&&(ce.start?ce.end={row:ne,column:le}:ce.start={row:ne,column:le})}),{text:ue,tabstops:_,tokens:$}},S=(function(){function x(R){if(this.index=0,this.ranges=[],this.tabstops=[],R.tabstopManager)return R.tabstopManager;R.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=g.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(R)}return x.prototype.attach=function(R){this.$openTabstops=null,this.selectedTabstop=null,this.editor=R,this.session=R.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},x.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},x.prototype.onChange=function(R){for(var I=R.action[0]=="r",O=this.selectedTabstop||{},L=O.parents||{},W=this.tabstops.slice(),F=0;F<W.length;F++){var N=W[F],$=N==O||L[N.index];if(N.rangeList.$bias=$?0:1,R.action=="remove"&&N!==O){var _=N.parents&&N.parents[O.index],D=N.rangeList.pointIndex(R.start,_);D=D<0?-D-1:D+1;var z=N.rangeList.pointIndex(R.end,_);z=z<0?-z-1:z-1;for(var U=N.rangeList.ranges.slice(D,z),G=0;G<U.length;G++)this.removeRange(U[G])}N.rangeList.$onChange(R)}var Z=this.session;!this.$inChange&&I&&Z.getLength()==1&&!Z.getValue()&&this.detach()},x.prototype.updateLinkedFields=function(){var R=this.selectedTabstop;if(!(!R||!R.hasLinkedRanges||!R.firstNonLinked)){this.$inChange=!0;for(var I=this.session,O=I.getTextRange(R.firstNonLinked),L=0;L<R.length;L++){var W=R[L];if(W.linked){var F=W.original,N=r.snippetManager.tmStrFormat(O,F,this.editor);I.replace(W,N)}}this.$inChange=!1}},x.prototype.onAfterExec=function(R){R.command&&!R.command.readOnly&&this.updateLinkedFields()},x.prototype.onChangeSelection=function(){if(this.editor){for(var R=this.editor.selection.lead,I=this.editor.selection.anchor,O=this.editor.selection.isEmpty(),L=0;L<this.ranges.length;L++)if(!this.ranges[L].linked){var W=this.ranges[L].contains(R.row,R.column),F=O||this.ranges[L].contains(I.row,I.column);if(W&&F)return}this.detach()}},x.prototype.onChangeSession=function(){this.detach()},x.prototype.tabNext=function(R){var I=this.tabstops.length,O=this.index+(R||1);O=Math.min(Math.max(O,1),I),O==I&&(O=0),this.selectTabstop(O),this.updateTabstopMarkers(),O===0&&this.detach()},x.prototype.selectTabstop=function(R){this.$openTabstops=null;var I=this.tabstops[this.index];if(I&&this.addTabstopMarkers(I),this.index=R,I=this.tabstops[this.index],!(!I||!I.length)){this.selectedTabstop=I;var O=I.firstNonLinked||I;if(I.choices&&(O.cursor=O.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(O);else{var L=this.editor.multiSelect;L.toSingleRange(O);for(var W=0;W<I.length;W++)I.hasLinkedRanges&&I[W].linked||L.addRange(I[W].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},x.prototype.addTabstops=function(R,I,O){var L=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!R[0]){var W=i.fromPoints(O,O);M(W.start,I),M(W.end,I),R[0]=[W],R[0].index=0}var F=this.index,N=[F+1,0],$=this.ranges,_=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,z){var U=this.$openTabstops[z]||D;U.snippetId=_;for(var G=0;G<D.length;G++){var Z=D[G],te=i.fromPoints(Z.start,Z.end||Z.start);E(te.start,I),E(te.end,I),te.original=Z,te.tabstop=U,$.push(te),U!=D?U.unshift(te):U[G]=te,Z.fmtString||U.firstNonLinked&&L?(te.linked=!0,U.hasLinkedRanges=!0):U.firstNonLinked||(U.firstNonLinked=te)}U.firstNonLinked||(U.hasLinkedRanges=!1),U===D&&(N.push(U),this.$openTabstops[z]=U),this.addTabstopMarkers(U),U.rangeList=U.rangeList||new a,U.rangeList.$bias=0,U.rangeList.addList(U)},this),N.length>2&&(this.tabstops.length&&N.push(N.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,N))},x.prototype.addTabstopMarkers=function(R){var I=this.session;R.forEach(function(O){O.markerId||(O.markerId=I.addMarker(O,"ace_snippet-marker","text"))})},x.prototype.removeTabstopMarkers=function(R){var I=this.session;R.forEach(function(O){I.removeMarker(O.markerId),O.markerId=null})},x.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var R=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&R--,this.tabstops.forEach(function(I){I.snippetId===R?this.addTabstopMarkers(I):this.removeTabstopMarkers(I)},this)}},x.prototype.removeRange=function(R){var I=R.tabstop.indexOf(R);I!=-1&&R.tabstop.splice(I,1),I=this.ranges.indexOf(R),I!=-1&&this.ranges.splice(I,1),I=R.tabstop.rangeList.ranges.indexOf(R),I!=-1&&R.tabstop.splice(I,1),this.session.removeMarker(R.markerId),R.tabstop.length||(I=this.tabstops.indexOf(R.tabstop),I!=-1&&this.tabstops.splice(I,1),this.tabstops.length||this.detach())},x})();S.prototype.keyboardHandler=new u,S.prototype.keyboardHandler.bindKeys({Tab:function(x){r.snippetManager&&r.snippetManager.expandWithTab(x)||(x.tabstopManager.tabNext(1),x.renderer.scrollCursorIntoView())},"Shift-Tab":function(x){x.tabstopManager.tabNext(-1),x.renderer.scrollCursorIntoView()},Esc:function(x){x.tabstopManager.detach()}});var E=function(x,R){x.row==0&&(x.column+=R.column),x.row+=R.row},M=function(x,R){x.row==R.row&&(x.column-=R.column),x.row-=R.row};f.importCssString(`
|
1136
|
+
.ace_snippet-marker {
|
1137
|
+
-moz-box-sizing: border-box;
|
1138
|
+
box-sizing: border-box;
|
1139
|
+
background: rgba(194, 193, 208, 0.09);
|
1140
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);
|
1141
|
+
position: absolute;
|
1142
|
+
}`,"snippets.css",!1),r.snippetManager=new m;var k=n("./editor").Editor;(function(){this.insertSnippet=function(x,R){return r.snippetManager.insertSnippet(this,x,R)},this.expandSnippet=function(x){return r.snippetManager.expandWithTab(this,x)}}).call(k.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(n,r,h){var d=n("../virtual_renderer").VirtualRenderer,f=n("../editor").Editor,w=n("../range").Range,p=n("../lib/event"),g=n("../lib/lang"),i=n("../lib/dom"),a=n("../config").nls,u=n("./../lib/useragent"),c=function(E){return"suggest-aria-id:".concat(E)},o=u.isSafari?"menu":"listbox",l=u.isSafari?"menuitem":"option",m=u.isSafari?"aria-current":"aria-selected",b=function(E){var M=new d(E);M.$maxLines=4;var k=new f(M);return k.setHighlightActiveLine(!1),k.setShowPrintMargin(!1),k.renderer.setShowGutter(!1),k.renderer.setHighlightGutterLine(!1),k.$mouseHandler.$focusTimeout=0,k.$highlightTagPending=!0,k},S=(function(){function E(M){var k=i.createElement("div"),x=b(k);M&&M.appendChild(k),k.style.display="none",x.renderer.content.style.cursor="default",x.renderer.setStyle("ace_autocomplete"),x.renderer.$textLayer.element.setAttribute("role",o),x.renderer.$textLayer.element.setAttribute("aria-roledescription",a("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),x.renderer.$textLayer.element.setAttribute("aria-label",a("autocomplete.popup.aria-label","Autocomplete suggestions")),x.renderer.textarea.setAttribute("aria-hidden","true"),x.setOption("displayIndentGuides",!1),x.setOption("dragDelay",150);var R=function(){};x.focus=R,x.$isFocused=!0,x.renderer.$cursorLayer.restartTimer=R,x.renderer.$cursorLayer.element.style.opacity="0",x.renderer.$maxLines=8,x.renderer.$keepTextAreaAtCursor=!1,x.setHighlightActiveLine(!1),x.session.highlight(""),x.session.$searchHighlight.clazz="ace_highlight-marker",x.on("mousedown",function($){var _=$.getDocumentPosition();x.selection.moveToPosition(_),L.start.row=L.end.row=_.row,$.stop()});var I,O=new w(-1,0,-1,1/0),L=new w(-1,0,-1,1/0);L.id=x.session.addMarker(L,"ace_active-line","fullLine"),x.setSelectOnHover=function($){$?O.id&&(x.session.removeMarker(O.id),O.id=null):O.id=x.session.addMarker(O,"ace_line-hover","fullLine")},x.setSelectOnHover(!1),x.on("mousemove",function($){if(!I){I=$;return}if(!(I.x==$.x&&I.y==$.y)){I=$,I.scrollTop=x.renderer.scrollTop,x.isMouseOver=!0;var _=I.getDocumentPosition().row;O.start.row!=_&&(O.id||x.setRow(_),F(_))}}),x.renderer.on("beforeRender",function(){if(I&&O.start.row!=-1){I.$pos=null;var $=I.getDocumentPosition().row;O.id||x.setRow($),F($,!0)}}),x.renderer.on("afterRender",function(){for(var $=x.renderer.$textLayer,_=$.config.firstRow,D=$.config.lastRow;_<=D;_++){var z=$.element.childNodes[_-$.config.firstRow];z.setAttribute("role",l),z.setAttribute("aria-roledescription",a("autocomplete.popup.item.aria-roledescription","item")),z.setAttribute("aria-setsize",x.data.length),z.setAttribute("aria-describedby","doc-tooltip"),z.setAttribute("aria-posinset",_+1);var U=x.getData(_);if(U){var G="".concat(U.caption||U.value).concat(U.meta?", ".concat(U.meta):"");z.setAttribute("aria-label",G)}var Z=z.querySelectorAll(".ace_completion-highlight");Z.forEach(function(te){te.setAttribute("role","mark")})}}),x.renderer.on("afterRender",function(){var $=x.getRow(),_=x.renderer.$textLayer,D=_.element.childNodes[$-_.config.firstRow],z=document.activeElement;if(D!==x.selectedNode&&x.selectedNode&&(i.removeCssClass(x.selectedNode,"ace_selected"),x.selectedNode.removeAttribute(m),x.selectedNode.removeAttribute("id")),z.removeAttribute("aria-activedescendant"),x.selectedNode=D,D){var U=c($);i.addCssClass(D,"ace_selected"),D.id=U,_.element.setAttribute("aria-activedescendant",U),z.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var W=function(){F(-1)},F=function($,_){$!==O.start.row&&(O.start.row=O.end.row=$,_||x.session._emit("changeBackMarker"),x._emit("changeHoverMarker"))};x.getHoveredRow=function(){return O.start.row},p.addListener(x.container,"mouseout",function(){x.isMouseOver=!1,W()}),x.on("hide",W),x.on("changeSelection",W),x.session.doc.getLength=function(){return x.data.length},x.session.doc.getLine=function($){var _=x.data[$];return typeof _=="string"?_:_&&_.value||""};var N=x.session.bgTokenizer;return N.$tokenizeRow=function($){function _(ce,ge){ce&&z.push({type:(D.className||"")+(ge||""),value:ce})}var D=x.data[$],z=[];if(!D)return z;typeof D=="string"&&(D={value:D});for(var U=D.caption||D.value||D.name,G=U.toLowerCase(),Z=(x.filterText||"").toLowerCase(),te=0,he=0,ne=0;ne<=Z.length;ne++)if(ne!=he&&(D.matchMask&1<<ne||ne==Z.length)){var le=Z.slice(he,ne);he=ne;var ue=G.indexOf(le,te);if(ue==-1)continue;_(U.slice(te,ue),""),te=ue+le.length,_(U.slice(ue,te),"completion-highlight")}return _(U.slice(te,U.length),""),z.push({type:"completion-spacer",value:" "}),D.meta&&z.push({type:"completion-meta",value:D.meta}),D.message&&z.push({type:"completion-message",value:D.message}),z},N.$updateOnChange=R,N.start=R,x.session.$computeWidth=function(){return this.screenWidth=0},x.isOpen=!1,x.isTopdown=!1,x.autoSelect=!0,x.filterText="",x.isMouseOver=!1,x.data=[],x.setData=function($,_){x.filterText=_||"",x.setValue(g.stringRepeat(`
|
1143
|
+
`,$.length),-1),x.data=$||[],x.setRow(0)},x.getData=function($){return x.data[$]},x.getRow=function(){return L.start.row},x.setRow=function($){$=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,$)),L.start.row!=$&&(x.selection.clearSelection(),L.start.row=L.end.row=$||0,x.session._emit("changeBackMarker"),x.moveCursorTo($||0,0),x.isOpen&&x._signal("select"))},x.on("changeSelection",function(){x.isOpen&&x.setRow(x.selection.lead.row),x.renderer.scrollCursorIntoView()}),x.hide=function(){this.container.style.display="none",x.anchorPos=null,x.anchor=null,x.isOpen&&(x.isOpen=!1,this._signal("hide"))},x.tryShow=function($,_,D,z){if(!z&&x.isOpen&&x.anchorPos&&x.anchor&&x.anchorPos.top===$.top&&x.anchorPos.left===$.left&&x.anchor===D)return!0;var U=this.container,G=this.renderer.scrollBar.width||10,Z=window.innerHeight-G,te=window.innerWidth-G,he=this.renderer,ne=he.$maxLines*_*1.4,le={top:0,bottom:0},ue=Z-$.top-3*this.$borderSize-_,ce=$.top-3*this.$borderSize;D||(ce<=ue||ue>=ne?D="bottom":D="top"),D==="top"?(le.bottom=$.top-this.$borderSize,le.top=le.bottom-ne):D==="bottom"&&(le.top=$.top+_+this.$borderSize,le.bottom=le.top+ne);var ge=le.top>=0&&le.bottom<=Z;if(!z&&!ge)return!1;ge?he.$maxPixelHeight=null:D==="top"?he.$maxPixelHeight=ce:he.$maxPixelHeight=ue,U.style.display="";var Ae=U.offsetParent&&U.offsetParent.getBoundingClientRect();D==="top"?(U.style.top="",U.style.bottom=Z+G-le.bottom-(Ae?Z+G-Ae.bottom:0)+"px",x.isTopdown=!1):(U.style.top=le.top-(Ae?Ae.top:0)+"px",U.style.bottom="",x.isTopdown=!0);var Te=$.left;return Te+U.offsetWidth>te&&(Te=te-U.offsetWidth),U.style.left=Te-(Ae?Ae.left:0)+"px",U.style.right="",x.isOpen||(x.isOpen=!0,this._signal("show"),I=null),x.anchorPos=$,x.anchor=D,!0},x.show=function($,_,D){this.tryShow($,_,D?"bottom":void 0,!0)},x.goTo=function($){var _=this.getRow(),D=this.session.getLength()-1;switch($){case"up":_=_<=0?D:_-1;break;case"down":_=_>=D?-1:_+1;break;case"start":_=0;break;case"end":_=D}this.setRow(_)},x.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},x.$imageSize=0,x.$borderSize=1,x}return E})();i.importCssString(`
|
1144
|
+
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1145
|
+
background-color: #CAD6FA;
|
1146
|
+
z-index: 1;
|
1147
|
+
}
|
1148
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
1149
|
+
background-color: #3a674e;
|
1150
|
+
}
|
1151
|
+
.ace_editor.ace_autocomplete .ace_line-hover {
|
1152
|
+
border: 1px solid #abbffe;
|
1153
|
+
margin-top: -1px;
|
1154
|
+
background: rgba(233,233,253,0.4);
|
1155
|
+
position: absolute;
|
1156
|
+
z-index: 2;
|
1157
|
+
}
|
1158
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
1159
|
+
border: 1px solid rgba(109, 150, 13, 0.8);
|
1160
|
+
background: rgba(58, 103, 78, 0.62);
|
1161
|
+
}
|
1162
|
+
.ace_completion-meta {
|
1163
|
+
opacity: 0.5;
|
1164
|
+
margin-left: 0.9em;
|
1165
|
+
}
|
1166
|
+
.ace_completion-message {
|
1167
|
+
margin-left: 0.9em;
|
1168
|
+
color: blue;
|
1169
|
+
}
|
1170
|
+
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1171
|
+
color: #2d69c7;
|
1172
|
+
}
|
1173
|
+
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
1174
|
+
color: #93ca12;
|
1175
|
+
}
|
1176
|
+
.ace_editor.ace_autocomplete {
|
1177
|
+
width: 300px;
|
1178
|
+
z-index: 200000;
|
1179
|
+
border: 1px lightgray solid;
|
1180
|
+
position: absolute;
|
1181
|
+
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
1182
|
+
line-height: 1.4;
|
1183
|
+
background: #fefefe;
|
1184
|
+
color: #111;
|
1185
|
+
}
|
1186
|
+
.ace_dark.ace_editor.ace_autocomplete {
|
1187
|
+
border: 1px #484747 solid;
|
1188
|
+
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
1189
|
+
line-height: 1.4;
|
1190
|
+
background: #25282c;
|
1191
|
+
color: #c1c1c1;
|
1192
|
+
}
|
1193
|
+
.ace_autocomplete .ace_text-layer {
|
1194
|
+
width: calc(100% - 8px);
|
1195
|
+
}
|
1196
|
+
.ace_autocomplete .ace_line {
|
1197
|
+
display: flex;
|
1198
|
+
align-items: center;
|
1199
|
+
}
|
1200
|
+
.ace_autocomplete .ace_line > * {
|
1201
|
+
min-width: 0;
|
1202
|
+
flex: 0 0 auto;
|
1203
|
+
}
|
1204
|
+
.ace_autocomplete .ace_line .ace_ {
|
1205
|
+
flex: 0 1 auto;
|
1206
|
+
overflow: hidden;
|
1207
|
+
text-overflow: ellipsis;
|
1208
|
+
}
|
1209
|
+
.ace_autocomplete .ace_completion-spacer {
|
1210
|
+
flex: 1;
|
1211
|
+
}
|
1212
|
+
.ace_autocomplete.ace_loading:after {
|
1213
|
+
content: "";
|
1214
|
+
position: absolute;
|
1215
|
+
top: 0px;
|
1216
|
+
height: 2px;
|
1217
|
+
width: 8%;
|
1218
|
+
background: blue;
|
1219
|
+
z-index: 100;
|
1220
|
+
animation: ace_progress 3s infinite linear;
|
1221
|
+
animation-delay: 300ms;
|
1222
|
+
transform: translateX(-100%) scaleX(1);
|
1223
|
+
}
|
1224
|
+
@keyframes ace_progress {
|
1225
|
+
0% { transform: translateX(-100%) scaleX(1) }
|
1226
|
+
50% { transform: translateX(625%) scaleX(2) }
|
1227
|
+
100% { transform: translateX(1500%) scaleX(3) }
|
1228
|
+
}
|
1229
|
+
@media (prefers-reduced-motion) {
|
1230
|
+
.ace_autocomplete.ace_loading:after {
|
1231
|
+
transform: translateX(625%) scaleX(2);
|
1232
|
+
animation: none;
|
1233
|
+
}
|
1234
|
+
}
|
1235
|
+
`,"autocompletion.css",!1),r.AcePopup=S,r.$singleLineEditor=b,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,r,h){var d=(function(){function f(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return f.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),i=this.popup.renderer.$textLayer,a=i.element.childNodes[g-i.config.firstRow];if(a){for(var u="doc-tooltip ",c=0;c<this._lines.length;c++)u+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",u)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var p=this.createCodeBlock();this.screenReaderDiv.appendChild(p)},f.prototype.destroy=function(){this.screenReaderDiv.remove()},f.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var p=0;p<this._lines.length;p++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(p));var i=document.createTextNode(this._lines[p]);g.appendChild(i),w.appendChild(g)}return w},f})();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,r,h){var d=n("../snippets").snippetManager,f=n("./inline_screenreader").AceInlineScreenReader,w=(function(){function p(){this.editor=null}return p.prototype.show=function(g,i,a){if(a=a||"",g&&this.editor&&this.editor!==g&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!g||!i)return!1;this.inlineScreenReader||(this.inlineScreenReader=new f(g));var u=i.snippet?d.getDisplayTextForSnippet(g,i.snippet):i.value;return i.hideInlinePreview||!u||!u.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(u),u=u.slice(a.length),u===""?g.removeGhostText():g.setGhostText(u),!0)},p.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},p.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},p.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},p})();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,h){r.parForEach=function(f,w,p){var g=0,i=f.length;i===0&&p();for(var a=0;a<i;a++)w(f[a],function(u,c){g++,g===i&&p(u,c)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(f,w,p){p=p||d;for(var g=[],i=w-1;i>=0&&p.test(f[i]);i--)g.push(f[i]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(f,w,p){p=p||d;for(var g=[],i=w;i<f.length&&p.test(f[i]);i++)g.push(f[i]);return g},r.getCompletionPrefix=function(f){var w=f.getCursorPosition(),p=f.session.getLine(w.row),g;return f.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(p,w.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(p,w.column)},r.triggerAutocomplete=function(f,p){var p=p??f.session.getPrecedingCharacter();return f.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(p)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config","ace/lib/event","ace/lib/scroll"],function(n,r,h){var d=n("./keyboard/hash_handler").HashHandler,f=n("./autocomplete/popup").AcePopup,w=n("./autocomplete/inline").AceInline,p=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),i=n("./lib/lang"),a=n("./lib/dom"),u=n("./snippets").snippetManager,c=n("./config"),o=n("./lib/event"),l=n("./lib/scroll").preventParentScroll,m=function(M,k){k.completer&&k.completer.destroy()},b=(function(){function M(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new d,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=i.delayedCall((function(){this.updateCompletions(!0)}).bind(this)),this.tooltipTimer=i.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=i.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=i.delayedCall((function(){this.stickySelection=!0}).bind(this),this.stickySelectionDelay),this.$firstOpenTimer=i.delayedCall((function(){var k=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!k||this.editor.completers.length===0||(this.completions=new E(M.completionsForLoading),this.openPopup(this.editor,k.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(M,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),M.prototype.$init=function(){return this.popup=new f(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(k){this.insertMatch(),k.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},M.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},M.prototype.getPopup=function(){return this.popup||this.$init()},M.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},M.prototype.$seen=function(k){!this.hasSeen.has(k)&&k&&k.completer&&k.completer.onSeen&&typeof k.completer.onSeen=="function"&&(k.completer.onSeen(this.editor,k),this.hasSeen.add(k))},M.prototype.$onPopupChange=function(k){if(this.inlineRenderer&&this.inlineEnabled){var x=k?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(x),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},M.prototype.$updateGhostText=function(k){var x=this.base.row,R=this.base.column,I=this.editor.getCursorPosition().column,O=this.editor.session.getLine(x).slice(R,I);this.inlineRenderer.show(this.editor,k,O)?this.$seen(k):this.inlineRenderer.hide()},M.prototype.$onPopupRender=function(){var k=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var x=this.popup.getFirstVisibleRow();x<=this.popup.getLastVisibleRow();x++){var R=this.popup.getData(x);R&&(!k||R.hideInlinePreview)&&this.$seen(R)}},M.prototype.$onPopupShow=function(k){this.$onPopupChange(k),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},M.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var k=this.editor.container.parentNode,x=[];k;)x.push(k),k.addEventListener("scroll",this.onLayoutChange,{passive:!0}),k=k.parentNode;this.$elements=x}},M.prototype.unObserveLayoutChanges=function(){var k=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(x){x.removeEventListener("scroll",k.onLayoutChange,{passive:!0})}),this.$elements=null},M.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},M.prototype.$updatePopupPosition=function(){var k=this.editor,x=k.renderer,R=x.layerConfig.lineHeight,I=x.$cursorLayer.getPixelPosition(this.base,!0);I.left-=this.popup.getTextLeftOffset();var O=k.container.getBoundingClientRect();I.top+=O.top-x.layerConfig.offset,I.left+=O.left-k.renderer.scrollLeft,I.left+=x.gutterWidth;var L={top:I.top,left:I.left};x.$ghostText&&x.$ghostTextWidget&&this.base.row===x.$ghostText.position.row&&(L.top+=x.$ghostTextWidget.el.offsetHeight);var W=k.container.getBoundingClientRect().bottom-R,F=W<L.top?{top:W,left:L.left}:L;this.popup.tryShow(F,R,"bottom")||this.popup.tryShow(I,R,"top")||this.popup.show(I,R)},M.prototype.openPopup=function(k,x,R){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var I=this.popup.getRow(),O=this.popup.data[I];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:p(this.popup.getRow()),inline:this.inlineEnabled}),k.keyBinding.addKeyboardHandler(this.keyboardHandler);var L;this.stickySelection&&(L=this.popup.data.indexOf(O)),(!L||L===-1)&&(L=0),this.popup.setRow(this.autoSelect?L:-1),L===I&&O!==this.completions.filtered[L]&&this.$onPopupChange();var W=this.inlineRenderer&&this.inlineEnabled;if(L===I&&W){var F=this.popup.getData(this.popup.getRow());this.$updateGhostText(F)}R||(this.popup.setTheme(k.getTheme()),this.popup.setFontSize(k.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},M.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off("afterRender",this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},M.prototype.changeListener=function(k){var x=this.editor.selection.lead;(x.row!=this.base.row||x.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},M.prototype.blurListener=function(k){var x=document.activeElement,R=this.editor.textInput.getElement(),I=k.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(k.relatedTarget),O=this.popup&&this.popup.container;x!=R&&x.parentNode!=O&&!I&&x!=this.tooltipNode&&k.relatedTarget!=R&&this.detach()},M.prototype.mousedownListener=function(k){this.detach()},M.prototype.mousewheelListener=function(k){this.popup&&!this.popup.isMouseOver&&this.detach()},M.prototype.mouseOutListener=function(k){this.popup.isOpen&&this.$updatePopupPosition()},M.prototype.goTo=function(k){this.popup.goTo(k)},M.prototype.insertMatch=function(k,x){if(k||(k=this.popup.getData(this.popup.getRow())),!k)return!1;if(k.value==="")return this.detach();var R=this.completions,I=this.getCompletionProvider().insertMatch(this.editor,k,R.filterText,x);return this.completions==R&&this.detach(),I},M.prototype.showPopup=function(k,x){this.editor&&this.detach(),this.activated=!0,this.editor=k,k.completer!=this&&(k.completer&&k.completer.detach(),k.completer=this),k.on("changeSelection",this.changeListener),k.on("blur",this.blurListener),k.on("mousedown",this.mousedownListener),k.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,x)},M.prototype.getCompletionProvider=function(k){return this.completionProvider||(this.completionProvider=new S(k)),this.completionProvider},M.prototype.gatherCompletions=function(k,x){return this.getCompletionProvider().gatherCompletions(k,x)},M.prototype.updateCompletions=function(k,x){if(k&&this.base&&this.completions){var I=this.editor.getCursorPosition(),O=this.editor.session.getTextRange({start:this.base,end:I});if(O==this.completions.filterText)return;if(this.completions.setFilter(O),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==O&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,O,k);return}if(x&&x.matches){var I=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(I.row,I.column),this.base.$insertRight=!0,this.completions=new E(x.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",k)}var R=this.editor.getSession(),I=this.editor.getCursorPosition(),O=g.getCompletionPrefix(this.editor);this.base=R.doc.createAnchor(I.row,I.column-O.length),this.base.$insertRight=!0;var L={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:O,pos:I}).provideCompletions(this.editor,L,(function(W,F,N){var $=F.filtered,_=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!$.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(_)),D){var z=[{caption:D,value:""}];this.completions=new E(z),this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==_&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!N&&this.showLoadingState?new E(M.completionsForLoading.concat($),F.filterText):F,this.openPopup(this.editor,_,k),this.popup.renderer.setStyle("ace_empty-message",!1),this.popup.renderer.setStyle("ace_loading",!N)}).bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},M.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},M.prototype.updateDocTooltip=function(){var k=this.popup,x=this.completions&&this.completions.filtered,R=x&&(x[k.getHoveredRow()]||x[k.getRow()]),I=null;if(!R||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var O=this.editor.completers.length,L=0;L<O;L++){var W=this.editor.completers[L];if(W.getDocTooltip&&R.completerId===W.id){I=W.getDocTooltip(R);break}}if(!I&&typeof R!="string"&&(I=R),typeof I=="string"&&(I={docText:I}),!I||!I.docHTML&&!I.docText)return this.hideDocTooltip();this.showDocTooltip(I)},M.prototype.showDocTooltip=function(k){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.style.margin="0",this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.style.overscrollBehavior="contain",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id="doc-tooltip",this.tooltipNode.setAttribute("role","tooltip"),this.tooltipNode.addEventListener("wheel",l));var x=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(x.isDark?"ace_dark ":"")+(x.cssClass||"");var R=this.tooltipNode;k.docHTML?R.innerHTML=k.docHTML:k.docText&&(R.textContent=k.docText),R.parentNode||this.popup.container.appendChild(this.tooltipNode);var I=this.popup,O=I.container.getBoundingClientRect(),L=400,W=300,F=I.renderer.scrollBar.width||10,N=O.left,$=window.innerWidth-O.right-F,_=I.isTopdown?O.top:window.innerHeight-F-O.bottom,D=[Math.min($/L,1),Math.min(N/L,1),Math.min(_/W*.9)],z=Math.max.apply(Math,D),U=R.style;U.display="block",z==D[0]?(U.left=O.right+1+"px",U.right="",U.maxWidth=L*z+"px",U.top=O.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-O.top,W)+"px"):z==D[1]?(U.right=window.innerWidth-O.left+"px",U.left="",U.maxWidth=L*z+"px",U.top=O.top+"px",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-O.top,W)+"px"):z==D[2]&&(U.left=window.innerWidth-O.left+"px",U.maxWidth=Math.min(L,window.innerWidth)+"px",I.isTopdown?(U.top=O.bottom+"px",U.left=O.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(window.innerHeight-F-O.bottom,W)+"px"):(U.top=I.container.offsetTop-R.offsetHeight+"px",U.left=O.left+"px",U.right="",U.bottom="",U.maxHeight=Math.min(I.container.offsetTop,W)+"px"))},M.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var k=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==k&&this.editor.focus(),this.tooltipNode=null,k.parentNode&&k.parentNode.removeChild(k)}},M.prototype.onTooltipClick=function(k){for(var x=k.target;x&&x!=this.tooltipNode;){if(x.nodeName=="A"&&x.href){x.rel="noreferrer",x.target="_blank";break}x=x.parentNode}},M.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var k=this.popup.container;k&&k.parentNode&&k.parentNode.removeChild(k)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},M.for=function(k){return k.completer instanceof M||(k.completer&&(k.completer.destroy(),k.completer=null),c.get("sharedPopups")?(M.$sharedInstance||(M.$sharedInstance=new M),k.completer=M.$sharedInstance):(k.completer=new M,k.once("destroy",m))),k.completer},M})();b.prototype.commands={Up:function(M){M.completer.goTo("up")},Down:function(M){M.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(M){M.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(M){M.completer.goTo("end")},Esc:function(M){M.completer.detach()},Return:function(M){return M.completer.insertMatch()},"Shift-Return":function(M){M.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(M){var k=M.completer.insertMatch();if(k||M.tabstopManager)return k;M.completer.goTo("down")},Backspace:function(M){M.execCommand("backspace");var k=g.getCompletionPrefix(M);!k&&M.completer&&M.completer.detach()},PageUp:function(M){M.completer.popup.gotoPageUp()},PageDown:function(M){M.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function(M,k){var x=b.for(M);x.autoInsert=!1,x.autoSelect=!0,x.autoShown=!1,x.showPopup(M,k),x.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var S=(function(){function M(k){this.initialPosition=k,this.active=!0}return M.prototype.insertByIndex=function(k,x,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(k,this.completions.filtered[x],R)},M.prototype.insertMatch=function(k,x,R){if(!x)return!1;if(k.startOperation({command:{name:"insertMatch"}}),x.completer&&x.completer.insertMatch)x.completer.insertMatch(k,x);else{if(!this.completions)return!1;var I=this.completions.filterText.length,O=0;if(x.range&&x.range.start.row===x.range.end.row&&(I-=this.initialPosition.prefix.length,I+=this.initialPosition.pos.column-x.range.start.column,O+=x.range.end.column-this.initialPosition.pos.column),I||O){var L;k.selection.getAllRanges?L=k.selection.getAllRanges():L=[k.getSelectionRange()];for(var W=0,F;F=L[W];W++)F.start.column-=I,F.end.column+=O,k.session.remove(F)}x.snippet?u.insertSnippet(k,x.snippet):this.$insertString(k,x),x.completer&&x.completer.onInsert&&typeof x.completer.onInsert=="function"&&x.completer.onInsert(k,x),x.command&&x.command==="startAutocomplete"&&k.execCommand(x.command)}return k.endOperation(),!0},M.prototype.$insertString=function(k,x){var R=x.value||x;k.execCommand("insertstring",R)},M.prototype.gatherCompletions=function(k,x){var R=k.getSession(),I=k.getCursorPosition(),O=g.getCompletionPrefix(k),L=[];this.completers=k.completers;var W=k.completers.length;return k.completers.forEach(function(F,N){F.getCompletions(k,R,I,O,function($,_){F.hideInlinePreview&&(_=_.map(function(D){return Object.assign(D,{hideInlinePreview:F.hideInlinePreview})})),!$&&_&&(L=L.concat(_)),x(null,{prefix:g.getCompletionPrefix(k),matches:L,finished:--W===0})})}),!0},M.prototype.provideCompletions=function(k,x,R){var I=(function(F){var N=F.prefix,$=F.matches;this.completions=new E($),x.exactMatch&&(this.completions.exactMatch=!0),x.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(N),(F.finished||this.completions.filtered.length)&&R(null,this.completions,F.finished)}).bind(this),O=!0,L=null;if(this.gatherCompletions(k,(function(F,N){if(this.active){F&&(R(F,[],!0),this.detach());var $=N.prefix;if($.indexOf(N.prefix)===0){if(O){L=N;return}I(N)}}}).bind(this)),O=!1,L){var W=L;L=null,I(W)}},M.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(k){typeof k.cancel=="function"&&k.cancel()})},M})(),E=(function(){function M(k,x){this.all=k,this.filtered=k,this.filterText=x||"",this.exactMatch=!1,this.ignoreCaption=!1}return M.prototype.setFilter=function(k){if(k.length>this.filterText&&k.lastIndexOf(this.filterText,0)===0)var x=this.filtered;else var x=this.all;this.filterText=k,x=this.filterCompletions(x,this.filterText),x=x.sort(function(I,O){return O.exactMatch-I.exactMatch||O.$score-I.$score||(I.caption||I.value).localeCompare(O.caption||O.value)});var R=null;x=x.filter(function(I){var O=I.snippet||I.caption||I.value;return O===R?!1:(R=O,!0)}),this.filtered=x},M.prototype.filterCompletions=function(k,x){var R=[],I=x.toUpperCase(),O=x.toLowerCase();e:for(var L=0,W;W=k[L];L++){if(W.skipFilter){W.$score=W.score,R.push(W);continue}var F=!this.ignoreCaption&&W.caption||W.value||W.snippet;if(F){var N=-1,$=0,_=0,D,z;if(this.exactMatch){if(x!==F.substr(0,x.length))continue e}else{var U=F.toLowerCase().indexOf(O);if(U>-1)_=U;else for(var G=0;G<x.length;G++){var Z=F.indexOf(O[G],N+1),te=F.indexOf(I[G],N+1);if(D=Z>=0&&(te<0||Z<te)?Z:te,D<0)continue e;z=D-N-1,z>0&&(N===-1&&(_+=10),_+=z,$|=1<<G),N=D}}W.matchMask=$,W.exactMatch=_?0:1,W.$score=(W.score||0)-_,R.push(W)}}return R},M})();r.Autocomplete=b,r.CompletionProvider=S,r.FilteredList=E}),ace.define("ace/marker_group",["require","exports","module"],function(n,r,h){var d=(function(){function f(w,p){p&&(this.markerType=p.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return f.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(p){return p.range.contains(w.row,w.column)})},f.prototype.markersComparator=function(w,p){return w.range.start.row-p.range.start.row},f.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},f.prototype.update=function(w,p,g,i){if(!(!this.markers||!this.markers.length))for(var a=i.firstRow,u=i.lastRow,c,o=0,l=0,m=0;m<this.markers.length;m++){var b=this.markers[m];if(!(b.range.end.row<a)&&!(b.range.start.row>u)&&(b.range.start.row===l?o++:(l=b.range.start.row,o=0),!(o>200))){var S=b.range.clipRows(a,u);if(!(S.start.row===S.end.row&&S.start.column===S.end.column)){var E=S.toScreenRange(g);if(E.isEmpty()){c=g.getNextFoldLine(S.end.row,c),c&&c.end.row>S.end.row&&(a=c.end.row);continue}this.markerType==="fullLine"?p.drawFullLineMarker(w,E,b.className,i):E.isMultiLine()?this.markerType==="line"?p.drawMultiLineMarker(w,E,b.className,i):p.drawTextMarker(w,E,b.className,i):p.drawSingleLineMarker(w,E,b.className+" ace_br15",i)}}}},f})();d.prototype.MAX_MARKERS=1e4,r.MarkerGroup=d}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,h){function d(g,i){var a=g.getTextRange(w.fromPoints({row:0,column:0},i));return a.split(p).length-1}function f(g,i){var a=d(g,i),u=g.getValue().split(p),c=Object.create(null),o=u[a];return u.forEach(function(l,m){if(!(!l||l===o)){var b=Math.abs(a-m),S=u.length-b;c[l]?c[l]=Math.max(S,c[l]):c[l]=S}}),c}var w=n("../range").Range,p=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,i,a,u,c){var o=f(i,a),l=Object.keys(o);c(null,l.map(function(m){return{caption:m,value:m,score:o[m],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,h){var d=n("../snippets").snippetManager,f=n("../autocomplete").Autocomplete,w=n("../config"),p=n("../lib/lang"),g=n("../autocomplete/util"),i=n("../marker_group").MarkerGroup,a=n("../autocomplete/text_completer"),u={getCompletions:function(O,L,W,F,N){if(L.$mode.completer)return L.$mode.completer.getCompletions(O,L,W,F,N);var $=O.session.getState(W.row),_=L.$mode.getCompletions($,L,W,F);_=_.map(function(D){return D.completerId=u.id,D}),N(null,_)},id:"keywordCompleter"},c=function(O){var L={};return O.replace(/\${(\d+)(:(.*?))?}/g,function(W,F,N,$){return L[F]=$||""}).replace(/\$(\d+?)/g,function(W,F){return L[F]})},o={getCompletions:function(O,L,W,F,N){var $=[],_=L.getTokenAt(W.row,W.column);_&&_.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?$.push("html-tag"):$=d.getActiveScopes(O);var D=d.snippetMap,z=[];$.forEach(function(U){for(var G=D[U]||[],Z=G.length;Z--;){var te=G[Z],he=te.name||te.tabTrigger;he&&z.push({caption:he,snippet:te.content,meta:te.tabTrigger&&!te.name?te.tabTrigger+"⇥ ":"snippet",completerId:o.id})}},this),N(null,z)},getDocTooltip:function(O){O.snippet&&!O.docHTML&&(O.docHTML=["<b>",p.escapeHTML(O.caption),"</b>","<hr></hr>",p.escapeHTML(c(O.snippet))].join(""))},id:"snippetCompleter"},l=[o,a,u];r.setCompleters=function(O){l.length=0,O&&l.push.apply(l,O)},r.addCompleter=function(O){l.push(O)},r.textCompleter=a,r.keyWordCompleter=u,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(O){return d.expandWithTab(O)},bindKey:"Tab"},b=function(O,L){S(L.session.$mode)},S=function(O){typeof O=="string"&&(O=w.$modes[O]),O&&(d.files||(d.files={}),E(O.$id,O.snippetFileId),O.modes&&O.modes.forEach(S))},E=function(O,L){!L||!O||d.files[O]||(d.files[O]={},w.loadModule(L,function(W){W&&(d.files[O]=W,!W.snippets&&W.snippetText&&(W.snippets=d.parseSnippetFile(W.snippetText)),d.register(W.snippets||[],W.scope),W.includeScopes&&(d.snippetMap[W.scope].includeScopes=W.includeScopes,W.includeScopes.forEach(function(F){S("ace/mode/"+F)})))}))},M=function(O){var L=O.editor,W=L.completer&&L.completer.activated;if(O.command.name==="backspace")W&&!g.getCompletionPrefix(L)&&L.completer.detach();else if(O.command.name==="insertstring"&&!W){k=O;var F=O.editor.$liveAutocompletionDelay;F?x.delay(F):R(O)}},k,x=p.delayedCall(function(){R(k)},0),R=function(O){var L=O.editor,W=g.getCompletionPrefix(L),F=O.args,N=g.triggerAutocomplete(L,F);if(W&&W.length>=L.$liveAutocompletionThreshold||N){var $=f.for(L);$.autoShown=!0,$.showPopup(L)}},I=n("../editor").Editor;n("../config").defineOptions(I.prototype,"editor",{enableBasicAutocompletion:{set:function(O){O?(f.for(this),this.completers||(this.completers=Array.isArray(O)?O:l),this.commands.addCommand(f.startCommand)):this.commands.removeCommand(f.startCommand)},value:!1},enableLiveAutocompletion:{set:function(O){O?(this.completers||(this.completers=Array.isArray(O)?O:l),this.commands.on("afterExec",M)):this.commands.off("afterExec",M)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(O){O?(this.commands.addCommand(m),this.on("changeMode",b),b(null,this)):(this.commands.removeCommand(m),this.off("changeMode",b))},value:!1}}),r.MarkerGroup=i}),(function(){ace.require(["ace/ext/language_tools"],function(n){t&&(t.exports=n)})})()})(Hg)),Hg.exports}Ok();var qg={exports:{}},Vg;function Ik(){return Vg||(Vg=1,(function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,r,h){h.exports=`
|
1236
|
+
|
1237
|
+
/* ------------------------------------------------------------------------------------------
|
1238
|
+
* Editor Search Form
|
1239
|
+
* --------------------------------------------------------------------------------------- */
|
1240
|
+
.ace_search {
|
1241
|
+
background-color: #ddd;
|
1242
|
+
color: #666;
|
1243
|
+
border: 1px solid #cbcbcb;
|
1244
|
+
border-top: 0 none;
|
1245
|
+
overflow: hidden;
|
1246
|
+
margin: 0;
|
1247
|
+
padding: 4px 6px 0 4px;
|
1248
|
+
position: absolute;
|
1249
|
+
top: 0;
|
1250
|
+
z-index: 99;
|
1251
|
+
white-space: normal;
|
1252
|
+
}
|
1253
|
+
.ace_search.left {
|
1254
|
+
border-left: 0 none;
|
1255
|
+
border-radius: 0px 0px 5px 0px;
|
1256
|
+
left: 0;
|
1257
|
+
}
|
1258
|
+
.ace_search.right {
|
1259
|
+
border-radius: 0px 0px 0px 5px;
|
1260
|
+
border-right: 0 none;
|
1261
|
+
right: 0;
|
1262
|
+
}
|
1263
|
+
|
1264
|
+
.ace_search_form, .ace_replace_form {
|
1265
|
+
margin: 0 20px 4px 0;
|
1266
|
+
overflow: hidden;
|
1267
|
+
line-height: 1.9;
|
1268
|
+
}
|
1269
|
+
.ace_replace_form {
|
1270
|
+
margin-right: 0;
|
1271
|
+
}
|
1272
|
+
.ace_search_form.ace_nomatch {
|
1273
|
+
outline: 1px solid red;
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
.ace_search_field {
|
1277
|
+
border-radius: 3px 0 0 3px;
|
1278
|
+
background-color: white;
|
1279
|
+
color: black;
|
1280
|
+
border: 1px solid #cbcbcb;
|
1281
|
+
border-right: 0 none;
|
1282
|
+
outline: 0;
|
1283
|
+
padding: 0;
|
1284
|
+
font-size: inherit;
|
1285
|
+
margin: 0;
|
1286
|
+
line-height: inherit;
|
1287
|
+
padding: 0 6px;
|
1288
|
+
min-width: 17em;
|
1289
|
+
vertical-align: top;
|
1290
|
+
min-height: 1.8em;
|
1291
|
+
box-sizing: content-box;
|
1292
|
+
}
|
1293
|
+
.ace_searchbtn {
|
1294
|
+
border: 1px solid #cbcbcb;
|
1295
|
+
line-height: inherit;
|
1296
|
+
display: inline-block;
|
1297
|
+
padding: 0 6px;
|
1298
|
+
background: #fff;
|
1299
|
+
border-right: 0 none;
|
1300
|
+
border-left: 1px solid #dcdcdc;
|
1301
|
+
cursor: pointer;
|
1302
|
+
margin: 0;
|
1303
|
+
position: relative;
|
1304
|
+
color: #666;
|
1305
|
+
}
|
1306
|
+
.ace_searchbtn:last-child {
|
1307
|
+
border-radius: 0 3px 3px 0;
|
1308
|
+
border-right: 1px solid #cbcbcb;
|
1309
|
+
}
|
1310
|
+
.ace_searchbtn:disabled {
|
1311
|
+
background: none;
|
1312
|
+
cursor: default;
|
1313
|
+
}
|
1314
|
+
.ace_searchbtn:hover {
|
1315
|
+
background-color: #eef1f6;
|
1316
|
+
}
|
1317
|
+
.ace_searchbtn.prev, .ace_searchbtn.next {
|
1318
|
+
padding: 0px 0.7em
|
1319
|
+
}
|
1320
|
+
.ace_searchbtn.prev:after, .ace_searchbtn.next:after {
|
1321
|
+
content: "";
|
1322
|
+
border: solid 2px #888;
|
1323
|
+
width: 0.5em;
|
1324
|
+
height: 0.5em;
|
1325
|
+
border-width: 2px 0 0 2px;
|
1326
|
+
display:inline-block;
|
1327
|
+
transform: rotate(-45deg);
|
1328
|
+
}
|
1329
|
+
.ace_searchbtn.next:after {
|
1330
|
+
border-width: 0 2px 2px 0 ;
|
1331
|
+
}
|
1332
|
+
.ace_searchbtn_close {
|
1333
|
+
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
|
1334
|
+
border-radius: 50%;
|
1335
|
+
border: 0 none;
|
1336
|
+
color: #656565;
|
1337
|
+
cursor: pointer;
|
1338
|
+
font: 16px/16px Arial;
|
1339
|
+
padding: 0;
|
1340
|
+
height: 14px;
|
1341
|
+
width: 14px;
|
1342
|
+
top: 9px;
|
1343
|
+
right: 7px;
|
1344
|
+
position: absolute;
|
1345
|
+
}
|
1346
|
+
.ace_searchbtn_close:hover {
|
1347
|
+
background-color: #656565;
|
1348
|
+
background-position: 50% 100%;
|
1349
|
+
color: white;
|
1350
|
+
}
|
1351
|
+
|
1352
|
+
.ace_button {
|
1353
|
+
margin-left: 2px;
|
1354
|
+
cursor: pointer;
|
1355
|
+
-webkit-user-select: none;
|
1356
|
+
-moz-user-select: none;
|
1357
|
+
-o-user-select: none;
|
1358
|
+
-ms-user-select: none;
|
1359
|
+
user-select: none;
|
1360
|
+
overflow: hidden;
|
1361
|
+
opacity: 0.7;
|
1362
|
+
border: 1px solid rgba(100,100,100,0.23);
|
1363
|
+
padding: 1px;
|
1364
|
+
box-sizing: border-box!important;
|
1365
|
+
color: black;
|
1366
|
+
}
|
1367
|
+
|
1368
|
+
.ace_button:hover {
|
1369
|
+
background-color: #eee;
|
1370
|
+
opacity:1;
|
1371
|
+
}
|
1372
|
+
.ace_button:active {
|
1373
|
+
background-color: #ddd;
|
1374
|
+
}
|
1375
|
+
|
1376
|
+
.ace_button.checked {
|
1377
|
+
border-color: #3399ff;
|
1378
|
+
opacity:1;
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
.ace_search_options{
|
1382
|
+
margin-bottom: 3px;
|
1383
|
+
text-align: right;
|
1384
|
+
-webkit-user-select: none;
|
1385
|
+
-moz-user-select: none;
|
1386
|
+
-o-user-select: none;
|
1387
|
+
-ms-user-select: none;
|
1388
|
+
user-select: none;
|
1389
|
+
clear: both;
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
.ace_search_counter {
|
1393
|
+
float: left;
|
1394
|
+
font-family: arial;
|
1395
|
+
padding: 0 8px;
|
1396
|
+
}`}),ace.define("ace/ext/searchbox",["require","exports","module","ace/ext/searchbox","ace/ext/searchbox","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(n,r,h){var d=n("../lib/dom"),f=n("../lib/lang"),w=n("../lib/event"),p=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,i=n("../lib/keys"),a=n("../config").nls,u=999;d.importCssString(p,"ace_searchbox",!1);var c=(function(){function m(b,S,E){this.activeInput,this.element=d.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:a("search-box.find.placeholder","Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},""],["span",{action:"findNext",class:"ace_searchbtn next"},""],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},a("search-box.find-all.text","All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:a("search-box.replace.placeholder","Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},a("search-box.replace-next.text","Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},a("search-box.replace-all.text","All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:a("search-box.toggle-replace.title","Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:a("search-box.toggle-regexp.title","RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:a("search-box.toggle-case.title","CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:a("search-box.toggle-whole-word.title","Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:a("search-box.toggle-in-selection.title","Search In Selection")},"S"]]]),this.setSession=this.setSession.bind(this),this.$onEditorInput=this.onEditorInput.bind(this),this.$init(),this.setEditor(b),d.importCssString(p,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function(M){M.stopPropagation()},b)}return m.prototype.setEditor=function(b){b.searchBox=this,b.renderer.scroller.appendChild(this.element),this.editor=b},m.prototype.setSession=function(b){this.searchRange=null,this.$syncOptions(!0)},m.prototype.onEditorInput=function(){this.find(!1,!1,!0)},m.prototype.$initElements=function(b){this.searchBox=b.querySelector(".ace_search_form"),this.replaceBox=b.querySelector(".ace_replace_form"),this.searchOption=b.querySelector("[action=searchInSelection]"),this.replaceOption=b.querySelector("[action=toggleReplace]"),this.regExpOption=b.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=b.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=b.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=b.querySelector(".ace_search_counter")},m.prototype.$init=function(){var b=this.element;this.$initElements(b);var S=this;w.addListener(b,"mousedown",function(E){setTimeout(function(){S.activeInput.focus()},0),w.stopPropagation(E)}),w.addListener(b,"click",function(E){var M=E.target||E.srcElement,k=M.getAttribute("action");k&&S[k]?S[k]():S.$searchBarKb.commands[k]&&S.$searchBarKb.commands[k].exec(S),w.stopPropagation(E)}),w.addCommandKeyListener(b,function(E,M,k){var x=i.keyCodeToString(k),R=S.$searchBarKb.findKeyCommand(M,x);R&&R.exec&&(R.exec(S),w.stopEvent(E))}),this.$onChange=f.delayedCall(function(){S.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){S.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){S.activeInput=S.searchInput,S.searchInput.value&&S.highlight()}),w.addListener(this.replaceInput,"focus",function(){S.activeInput=S.replaceInput,S.searchInput.value&&S.highlight()})},m.prototype.setSearchRange=function(b){this.searchRange=b,b?this.searchRangeMarker=this.editor.session.addMarker(b,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},m.prototype.$syncOptions=function(b){d.setCssClass(this.replaceOption,"checked",this.searchRange),d.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var S=this.editor.getReadOnly();this.replaceOption.style.display=S?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!S?"":"none",this.find(!1,!1,b)},m.prototype.highlight=function(b){this.editor.session.highlight(b||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},m.prototype.find=function(b,S,E){if(this.editor.session){var M=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:S,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:E,range:this.searchRange}),k=!M&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var b=this.editor,S=b.$search.$options.re,E=S.unicode,M=0,k=0;if(S){var x=this.searchRange?b.session.getTextRange(this.searchRange):b.getValue();b.$search.$isMultilineSearch(b.getLastSearchOptions())&&(x=x.replace(/\r\n|\r|\n/g,`
|
1397
|
+
`),b.session.doc.$autoNewLine=`
|
1398
|
+
`);var R=b.session.doc.positionToIndex(b.selection.anchor);this.searchRange&&(R-=b.session.doc.positionToIndex(this.searchRange.start));for(var I=S.lastIndex=0,O;(O=S.exec(x))&&(M++,I=O.index,I<=R&&k++,!(M>u||!O[0]&&(S.lastIndex=I+=f.skipEmptyMatch(x,I,E),I>=x.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[k,M>u?u+"+":M])},m.prototype.findNext=function(){this.find(!0,!1)},m.prototype.findPrev=function(){this.find(!0,!0)},m.prototype.findAll=function(){var b=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),S=!b&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",S),this.editor._emit("findSearchBox",{match:!S}),this.highlight(),this.hide()},m.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},m.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},m.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},m.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.editor.off("input",this.$onEditorInput),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},m.prototype.show=function(b,S){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=S,this.editor.$search.$options.regExp&&(b=f.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},m.prototype.isFocused=function(){var b=document.activeElement;return b==this.searchInput||b==this.replaceInput},m})(),o=new g;o.bindKeys({"Ctrl-f|Command-f":function(m){var b=m.isReplace=!m.isReplace;m.replaceBox.style.display=b?"":"none",m.replaceOption.checked=!1,m.$syncOptions(),m.searchInput.focus()},"Ctrl-H|Command-Option-F":function(m){m.editor.getReadOnly()||(m.replaceOption.checked=!0,m.$syncOptions(),m.replaceInput.focus())},"Ctrl-G|Command-G":function(m){m.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(m){m.findPrev()},esc:function(m){setTimeout(function(){m.hide()})},Return:function(m){m.activeInput==m.replaceInput&&m.replace(),m.findNext()},"Shift-Return":function(m){m.activeInput==m.replaceInput&&m.replace(),m.findPrev()},"Alt-Return":function(m){m.activeInput==m.replaceInput&&m.replaceAll(),m.findAll()},Tab:function(m){(m.activeInput==m.replaceInput?m.searchInput:m.replaceInput).focus()}}),o.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(m){m.regExpOption.checked=!m.regExpOption.checked,m.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(m){m.caseSensitiveOption.checked=!m.caseSensitiveOption.checked,m.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(m){m.wholeWordOption.checked=!m.wholeWordOption.checked,m.$syncOptions()}},{name:"toggleReplace",exec:function(m){m.replaceOption.checked=!m.replaceOption.checked,m.$syncOptions()}},{name:"searchInSelection",exec:function(m){m.searchOption.checked=!m.searchRange,m.setSearchRange(m.searchOption.checked&&m.editor.getSelectionRange()),m.$syncOptions()}}]);var l=new g([{bindKey:"Esc",name:"closeSearchBar",exec:function(m){m.searchBox.hide()}}]);c.prototype.$searchBarKb=o,c.prototype.$closeSearchBarKb=l,r.SearchBox=c,r.Search=function(m,b){var S=m.searchBox||new c(m),E=m.session.selection.getRange(),M=E.isMultiLine()?"":m.session.getTextRange(E);S.show(M,b)}}),(function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})})()})(qg)),qg.exports}Ik();var Nk=Object.defineProperty,Dk=(t,e,n)=>e in t?Nk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uc=(t,e,n)=>Dk(t,typeof e!="symbol"?e+"":e,n);function Kg(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pk}=Object.prototype,{getPrototypeOf:bh}=Object,{iterator:hc,toStringTag:Gg}=Symbol,dc=(t=>e=>{const n=Pk.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ji=t=>(t=t.toLowerCase(),e=>dc(e)===t),pc=t=>e=>typeof e===t,{isArray:ha}=Array,Ja=pc("undefined");function el(t){return t!==null&&!Ja(t)&&t.constructor!==null&&!Ja(t.constructor)&&Yr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Yg=ji("ArrayBuffer");function Fk(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Yg(t.buffer),e}const Bk=pc("string"),Yr=pc("function"),Xg=pc("number"),tl=t=>t!==null&&typeof t=="object",jk=t=>t===!0||t===!1,fc=t=>{if(dc(t)!=="object")return!1;const e=bh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Gg in t)&&!(hc in t)},Wk=t=>{if(!tl(t)||el(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},zk=ji("Date"),Hk=ji("File"),Uk=ji("Blob"),qk=ji("FileList"),Vk=t=>tl(t)&&Yr(t.pipe),Kk=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Yr(t.append)&&((e=dc(t))==="formdata"||e==="object"&&Yr(t.toString)&&t.toString()==="[object FormData]"))},Gk=ji("URLSearchParams"),[Yk,Xk,Qk,Zk]=["ReadableStream","Request","Response","Headers"].map(ji),Jk=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function nl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,h;if(typeof t!="object"&&(t=[t]),ha(t))for(r=0,h=t.length;r<h;r++)e.call(null,t[r],r,t);else{if(el(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let w;for(r=0;r<f;r++)w=d[r],e.call(null,t[w],w,t)}}function Qg(t,e){if(el(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,h;for(;r-- >0;)if(h=n[r],e===h.toLowerCase())return h;return null}const Cs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Zg=t=>!Ja(t)&&t!==Cs;function xh(){const{caseless:t}=Zg(this)&&this||{},e={},n=(r,h)=>{const d=t&&Qg(e,h)||h;fc(e[d])&&fc(r)?e[d]=xh(e[d],r):fc(r)?e[d]=xh({},r):ha(r)?e[d]=r.slice():e[d]=r};for(let r=0,h=arguments.length;r<h;r++)arguments[r]&&nl(arguments[r],n);return e}const e_=(t,e,n,{allOwnKeys:r}={})=>(nl(e,(h,d)=>{n&&Yr(h)?t[d]=Kg(h,n):t[d]=h},{allOwnKeys:r}),t),t_=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),n_=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},r_=(t,e,n,r)=>{let h,d,f;const w={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),d=h.length;d-- >0;)f=h[d],(!r||r(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&bh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},i_=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},o_=t=>{if(!t)return null;if(ha(t))return t;let e=t.length;if(!Xg(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},s_=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&bh(Uint8Array)),a_=(t,e)=>{const n=(t&&t[hc]).call(t);let r;for(;(r=n.next())&&!r.done;){const h=r.value;e.call(t,h[0],h[1])}},l_=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},c_=ji("HTMLFormElement"),u_=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Jg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),h_=ji("RegExp"),em=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};nl(n,(h,d)=>{let f;(f=e(h,d,t))!==!1&&(r[d]=f||h)}),Object.defineProperties(t,r)},d_=t=>{em(t,(e,n)=>{if(Yr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Yr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},p_=(t,e)=>{const n={},r=h=>{h.forEach(d=>{n[d]=!0})};return ha(t)?r(t):r(String(t).split(e)),n},f_=()=>{},g_=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function m_(t){return!!(t&&Yr(t.append)&&t[Gg]==="FormData"&&t[hc])}const y_=t=>{const e=new Array(10),n=(r,h)=>{if(tl(r)){if(e.indexOf(r)>=0)return;if(el(r))return r;if(!("toJSON"in r)){e[h]=r;const d=ha(r)?[]:{};return nl(r,(f,w)=>{const p=n(f,h+1);!Ja(p)&&(d[w]=p)}),e[h]=void 0,d}}return r};return n(t,0)},v_=ji("AsyncFunction"),w_=t=>t&&(tl(t)||Yr(t))&&Yr(t.then)&&Yr(t.catch),tm=((t,e)=>t?setImmediate:e?((n,r)=>(Cs.addEventListener("message",({source:h,data:d})=>{h===Cs&&d===n&&r.length&&r.shift()()},!1),h=>{r.push(h),Cs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Yr(Cs.postMessage)),b_=typeof queueMicrotask<"u"?queueMicrotask.bind(Cs):typeof process<"u"&&process.nextTick||tm,x_=t=>t!=null&&Yr(t[hc]),_e={isArray:ha,isArrayBuffer:Yg,isBuffer:el,isFormData:Kk,isArrayBufferView:Fk,isString:Bk,isNumber:Xg,isBoolean:jk,isObject:tl,isPlainObject:fc,isEmptyObject:Wk,isReadableStream:Yk,isRequest:Xk,isResponse:Qk,isHeaders:Zk,isUndefined:Ja,isDate:zk,isFile:Hk,isBlob:Uk,isRegExp:h_,isFunction:Yr,isStream:Vk,isURLSearchParams:Gk,isTypedArray:s_,isFileList:qk,forEach:nl,merge:xh,extend:e_,trim:Jk,stripBOM:t_,inherits:n_,toFlatObject:r_,kindOf:dc,kindOfTest:ji,endsWith:i_,toArray:o_,forEachEntry:a_,matchAll:l_,isHTMLForm:c_,hasOwnProperty:Jg,hasOwnProp:Jg,reduceDescriptors:em,freezeMethods:d_,toObjectSet:p_,toCamelCase:u_,noop:f_,toFiniteNumber:g_,findKey:Qg,global:Cs,isContextDefined:Zg,isSpecCompliantForm:m_,toJSONObject:y_,isAsyncFn:v_,isThenable:w_,setImmediate:tm,asap:b_,isIterable:x_};function kt(t,e,n,r,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),h&&(this.response=h,this.status=h.status?h.status:null)}_e.inherits(kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const nm=kt.prototype,rm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{rm[t]={value:t}}),Object.defineProperties(kt,rm),Object.defineProperty(nm,"isAxiosError",{value:!0}),kt.from=(t,e,n,r,h,d)=>{const f=Object.create(nm);return _e.toFlatObject(t,f,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),kt.call(f,t.message,e,n,r,h),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const S_=null;function Sh(t){return _e.isPlainObject(t)||_e.isArray(t)}function im(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function om(t,e,n){return t?t.concat(e).map(function(r,h){return r=im(r),!n&&h?"["+r+"]":r}).join(n?".":""):e}function k_(t){return _e.isArray(t)&&!t.some(Sh)}const __=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function gc(t,e,n){if(!_e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!_e.isUndefined(o[c])});const r=n.metaTokens,h=n.visitor||g,d=n.dots,f=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(h))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(_e.isDate(c))return c.toISOString();if(_e.isBoolean(c))return c.toString();if(!w&&_e.isBlob(c))throw new kt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(c)||_e.isTypedArray(c)?w&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if(_e.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(_e.isArray(c)&&k_(c)||(_e.isFileList(c)||_e.endsWith(o,"[]"))&&(m=_e.toArray(c)))return o=im(o),m.forEach(function(b,S){!(_e.isUndefined(b)||b===null)&&e.append(f===!0?om([o],S,d):f===null?o:o+"[]",p(b))}),!1}return Sh(c)?!0:(e.append(om(l,o,d),p(c)),!1)}const i=[],a=Object.assign(__,{defaultVisitor:g,convertValue:p,isVisitable:Sh});function u(c,o){if(!_e.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),_e.forEach(c,function(l,m){(!(_e.isUndefined(l)||l===null)&&h.call(e,l,_e.isString(m)?m.trim():m,o,a))===!0&&u(l,o?o.concat(m):[m])}),i.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return u(t),e}function sm(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function kh(t,e){this._pairs=[],t&&gc(t,this,e)}const am=kh.prototype;am.append=function(t,e){this._pairs.push([t,e])},am.toString=function(t){const e=t?function(n){return t.call(this,n,sm)}:sm;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function C_(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function lm(t,e,n){if(!e)return t;const r=n&&n.encode||C_;_e.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let d;if(h?d=h(e,n):d=_e.isURLSearchParams(e)?e.toString():new kh(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class cm{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_e.forEach(this.handlers,function(n){n!==null&&e(n)})}}const um={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},$_=typeof URLSearchParams<"u"?URLSearchParams:kh,M_=typeof FormData<"u"?FormData:null,A_=typeof Blob<"u"?Blob:null,T_={isBrowser:!0,classes:{URLSearchParams:$_,FormData:M_,Blob:A_},protocols:["http","https","file","blob","url","data"]},_h=typeof window<"u"&&typeof document<"u",Ch=typeof navigator=="object"&&navigator||void 0,E_=_h&&(!Ch||["ReactNative","NativeScript","NS"].indexOf(Ch.product)<0),R_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",L_=_h&&window.location.href||"http://localhost",O_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_h,hasStandardBrowserEnv:E_,hasStandardBrowserWebWorkerEnv:R_,navigator:Ch,origin:L_},Symbol.toStringTag,{value:"Module"})),Sr={...O_,...T_};function I_(t,e){return gc(t,new Sr.classes.URLSearchParams,{visitor:function(n,r,h,d){return Sr.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function N_(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function D_(t){const e={},n=Object.keys(t);let r;const h=n.length;let d;for(r=0;r<h;r++)d=n[r],e[d]=t[d];return e}function hm(t){function e(n,r,h,d){let f=n[d++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=d>=n.length;return f=!f&&_e.isArray(h)?h.length:f,p?(_e.hasOwnProp(h,f)?h[f]=[h[f],r]:h[f]=r,!w):((!h[f]||!_e.isObject(h[f]))&&(h[f]=[]),e(n,r,h[f],d)&&_e.isArray(h[f])&&(h[f]=D_(h[f])),!w)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,h)=>{e(N_(r),h,n,0)}),n}return null}function P_(t,e,n){if(_e.isString(t))try{return(e||JSON.parse)(t),_e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const rl={transitional:um,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,h=_e.isObject(t);if(h&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return r?JSON.stringify(hm(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(h){if(n.indexOf("application/x-www-form-urlencoded")>-1)return I_(t,this.formSerializer).toString();if((d=_e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return gc(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return h||r?(e.setContentType("application/json",!1),P_(t)):t}],transformResponse:[function(t){const e=this.transitional||rl.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(n&&!this.responseType||r)){const h=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(h)throw d.name==="SyntaxError"?kt.from(d,kt.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sr.classes.FormData,Blob:Sr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{rl.headers[t]={}});const F_=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),B_=t=>{const e={};let n,r,h;return t&&t.split(`
|
1399
|
+
`).forEach(function(d){h=d.indexOf(":"),n=d.substring(0,h).trim().toLowerCase(),r=d.substring(h+1).trim(),!(!n||e[n]&&F_[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},dm=Symbol("internals");function il(t){return t&&String(t).trim().toLowerCase()}function mc(t){return t===!1||t==null?t:_e.isArray(t)?t.map(mc):String(t)}function j_(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const W_=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $h(t,e,n,r,h){if(_e.isFunction(r))return r.call(this,e,n);if(h&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function z_(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function H_(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(h,d,f){return this[r].call(this,e,h,d,f)},configurable:!0})})}let Xr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function h(f,w,p){const g=il(w);if(!g)throw new Error("header name must be a non-empty string");const i=_e.findKey(r,g);(!i||r[i]===void 0||p===!0||p===void 0&&r[i]!==!1)&&(r[i||w]=mc(f))}const d=(f,w)=>_e.forEach(f,(p,g)=>h(p,g,w));if(_e.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(_e.isString(t)&&(t=t.trim())&&!W_(t))d(B_(t),e);else if(_e.isObject(t)&&_e.isIterable(t)){let f={},w,p;for(const g of t){if(!_e.isArray(g))throw TypeError("Object iterator must return a key-value pair");f[p=g[0]]=(w=f[p])?_e.isArray(w)?[...w,g[1]]:[w,g[1]]:g[1]}d(f,e)}else t!=null&&h(e,t,n);return this}get(t,e){if(t=il(t),t){const n=_e.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return j_(r);if(_e.isFunction(e))return e.call(this,r,n);if(_e.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=il(t),t){const n=_e.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||$h(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function h(d){if(d=il(d),d){const f=_e.findKey(n,d);f&&(!e||$h(n,n[f],f,e))&&(delete n[f],r=!0)}}return _e.isArray(t)?t.forEach(h):h(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const h=e[n];(!t||$h(this,this[h],h,t,!0))&&(delete this[h],r=!0)}return r}normalize(t){const e=this,n={};return _e.forEach(this,(r,h)=>{const d=_e.findKey(n,h);if(d){e[d]=mc(r),delete e[h];return}const f=t?z_(h):String(h).trim();f!==h&&delete e[h],e[f]=mc(r),n[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _e.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&_e.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
1400
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[dm]=this[dm]={accessors:{}}).accessors,n=this.prototype;function r(h){const d=il(h);e[d]||(H_(n,h),e[d]=!0)}return _e.isArray(t)?t.forEach(r):r(t),this}};Xr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Xr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),_e.freezeMethods(Xr);function Mh(t,e){const n=this||rl,r=e||n,h=Xr.from(r.headers);let d=r.data;return _e.forEach(t,function(f){d=f.call(n,d,h.normalize(),e?e.status:void 0)}),h.normalize(),d}function pm(t){return!!(t&&t.__CANCEL__)}function da(t,e,n){kt.call(this,t??"canceled",kt.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(da,kt,{__CANCEL__:!0});function fm(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new kt("Request failed with status code "+n.status,[kt.ERR_BAD_REQUEST,kt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function U_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function q_(t,e){t=t||10;const n=new Array(t),r=new Array(t);let h=0,d=0,f;return e=e!==void 0?e:1e3,function(w){const p=Date.now(),g=r[d];f||(f=p),n[h]=w,r[h]=p;let i=d,a=0;for(;i!==h;)a+=n[i++],i=i%t;if(h=(h+1)%t,h===d&&(d=(d+1)%t),p-f<e)return;const u=g&&p-g;return u?Math.round(a*1e3/u):void 0}}function V_(t,e){let n=0,r=1e3/e,h,d;const f=(w,p=Date.now())=>{n=p,h=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const p=Date.now(),g=p-n;g>=r?f(w,p):(h=w,d||(d=setTimeout(()=>{d=null,f(h)},r-g)))},()=>h&&f(h)]}const yc=(t,e,n=3)=>{let r=0;const h=q_(50,250);return V_(d=>{const f=d.loaded,w=d.lengthComputable?d.total:void 0,p=f-r,g=h(p),i=f<=w;r=f;const a={loaded:f,total:w,progress:w?f/w:void 0,bytes:p,rate:g||void 0,estimated:g&&w&&i?(w-f)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},gm=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},mm=t=>(...e)=>_e.asap(()=>t(...e)),K_=Sr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Sr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,G_=Sr.hasStandardBrowserEnv?{write(t,e,n,r,h,d){const f=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&f.push("path="+r),_e.isString(h)&&f.push("domain="+h),d===!0&&f.push("secure"),document.cookie=f.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Y_(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function X_(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ym(t,e,n){let r=!Y_(e);return t&&(r||n==!1)?X_(t,e):e}const vm=t=>t instanceof Xr?{...t}:t;function $s(t,e){e=e||{};const n={};function r(g,i,a,u){return _e.isPlainObject(g)&&_e.isPlainObject(i)?_e.merge.call({caseless:u},g,i):_e.isPlainObject(i)?_e.merge({},i):_e.isArray(i)?i.slice():i}function h(g,i,a,u){if(_e.isUndefined(i)){if(!_e.isUndefined(g))return r(void 0,g,a,u)}else return r(g,i,a,u)}function d(g,i){if(!_e.isUndefined(i))return r(void 0,i)}function f(g,i){if(_e.isUndefined(i)){if(!_e.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function w(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:w,headers:(g,i,a)=>h(vm(g),vm(i),a,!0)};return _e.forEach(Object.keys({...t,...e}),function(g){const i=p[g]||h,a=i(t[g],e[g],g);_e.isUndefined(a)&&i!==w||(n[g]=a)}),n}const wm=t=>{const e=$s({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:h,xsrfCookieName:d,headers:f,auth:w}=e;e.headers=f=Xr.from(f),e.url=lm(ym(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&f.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let p;if(_e.isFormData(n)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Sr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&K_(e.url))){const g=h&&d&&G_.read(d);g&&f.set(h,g)}return e},Q_=typeof XMLHttpRequest<"u",Z_=Q_&&function(t){return new Promise(function(e,n){const r=wm(t);let h=r.data;const d=Xr.from(r.headers).normalize();let{responseType:f,onUploadProgress:w,onDownloadProgress:p}=r,g,i,a,u,c;function o(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const S=Xr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:S,config:t,request:l};fm(function(M){e(M),o()},function(M){n(M),o()},E),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new kt("Request aborted",kt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new kt("Network Error",kt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let S=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||um;r.timeoutErrorMessage&&(S=r.timeoutErrorMessage),n(new kt(S,E.clarifyTimeoutError?kt.ETIMEDOUT:kt.ECONNABORTED,t,l)),l=null},h===void 0&&d.setContentType(null),"setRequestHeader"in l&&_e.forEach(d.toJSON(),function(S,E){l.setRequestHeader(E,S)}),_e.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=yc(p,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,u]=yc(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(g=S=>{l&&(n(!S||S.type?new da(null,t,l):S),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=U_(r.url);if(b&&Sr.protocols.indexOf(b)===-1){n(new kt("Unsupported protocol "+b+":",kt.ERR_BAD_REQUEST,t));return}l.send(h||null)})},J_=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,h;const d=function(g){if(!h){h=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof kt?i:new da(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new kt(`timeout ${e} of ms exceeded`,kt.ETIMEDOUT))},e);const w=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>_e.asap(w),p}},eC=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,h;for(;r<n;)h=r+e,yield t.slice(r,h),r=h},tC=async function*(t,e){for await(const n of nC(t))yield*eC(n,e)},nC=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},bm=(t,e,n,r)=>{const h=tC(t,e);let d=0,f,w=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await h.next();if(g){w(),p.close();return}let a=i.byteLength;if(n){let u=d+=a;n(u)}p.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(p){return w(p),h.return()}},{highWaterMark:2})},vc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",xm=vc&&typeof ReadableStream=="function",rC=vc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sm=(t,...e)=>{try{return!!t(...e)}catch{return!1}},iC=xm&&Sm(()=>{let t=!1;const e=new Request(Sr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),km=64*1024,Ah=xm&&Sm(()=>_e.isReadableStream(new Response("").body)),wc={stream:Ah&&(t=>t.body)};vc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!wc[e]&&(wc[e]=_e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new kt(`Response type '${e}' is not supported`,kt.ERR_NOT_SUPPORT,r)})})})(new Response);const oC=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(Sr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(t)||_e.isArrayBuffer(t))return t.byteLength;if(_e.isURLSearchParams(t)&&(t=t+""),_e.isString(t))return(await rC(t)).byteLength},sC=async(t,e)=>_e.toFiniteNumber(t.getContentLength())??oC(e),aC=vc&&(async t=>{let{url:e,method:n,data:r,signal:h,cancelToken:d,timeout:f,onDownloadProgress:w,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:u}=wm(t);g=g?(g+"").toLowerCase():"text";let c=J_([h,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&iC&&n!=="get"&&n!=="head"&&(m=await sC(i,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(_e.isFormData(r)&&(x=k.headers.get("content-type"))&&i.setContentType(x),k.body){const[R,I]=gm(m,yc(mm(p)));r=bm(k.body,km,R,I)}}_e.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...u,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let S=await fetch(o,u);const E=Ah&&(g==="stream"||g==="response");if(Ah&&(w||E&&l)){const k={};["status","statusText","headers"].forEach(O=>{k[O]=S[O]});const x=_e.toFiniteNumber(S.headers.get("content-length")),[R,I]=w&&gm(x,yc(mm(w),!0))||[];S=new Response(bm(S.body,km,R,()=>{I&&I(),l&&l()}),k)}g=g||"text";let M=await wc[_e.findKey(wc,g)||"text"](S,t);return!E&&l&&l(),await new Promise((k,x)=>{fm(k,x,{data:M,headers:Xr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:o})})}catch(b){throw l&&l(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new kt("Network Error",kt.ERR_NETWORK,t,o),{cause:b.cause||b}):kt.from(b,b&&b.code,t,o)}}),Th={http:S_,xhr:Z_,fetch:aC};_e.forEach(Th,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const _m=t=>`- ${t}`,lC=t=>_e.isFunction(t)||t===null||t===!1,Cm={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const h={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!lC(n)&&(r=Th[(f=String(n)).toLowerCase()],r===void 0))throw new kt(`Unknown adapter '${f}'`);if(r)break;h[f||"#"+d]=r}if(!r){const d=Object.entries(h).map(([w,p])=>`adapter ${w} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
|
1401
|
+
`+d.map(_m).join(`
|
1402
|
+
`):" "+_m(d[0]):"as no adapter specified";throw new kt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:Th};function Eh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new da(null,t)}function $m(t){return Eh(t),t.headers=Xr.from(t.headers),t.data=Mh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Cm.getAdapter(t.adapter||rl.adapter)(t).then(function(e){return Eh(t),e.data=Mh.call(t,t.transformResponse,e),e.headers=Xr.from(e.headers),e},function(e){return pm(e)||(Eh(t),e&&e.response&&(e.response.data=Mh.call(t,t.transformResponse,e.response),e.response.headers=Xr.from(e.response.headers))),Promise.reject(e)})}const Mm="1.11.0",bc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{bc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Am={};bc.transitional=function(t,e,n){function r(h,d){return"[Axios v"+Mm+"] Transitional option '"+h+"'"+d+(n?". "+n:"")}return(h,d,f)=>{if(t===!1)throw new kt(r(d," has been removed"+(e?" in "+e:"")),kt.ERR_DEPRECATED);return e&&!Am[d]&&(Am[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(h,d,f):!0}},bc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function cC(t,e,n){if(typeof t!="object")throw new kt("options must be an object",kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let h=r.length;for(;h-- >0;){const d=r[h],f=e[d];if(f){const w=t[d],p=w===void 0||f(w,d,t);if(p!==!0)throw new kt("option "+d+" must be "+p,kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new kt("Unknown option "+d,kt.ERR_BAD_OPTION)}}const xc={assertOptions:cC,validators:bc},ao=xc.validators;let Ms=class{constructor(t){this.defaults=t||{},this.interceptors={request:new cm,response:new cm}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const h=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?h&&!String(n.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
1403
|
+
`+h):n.stack=h}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=$s(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:h}=e;n!==void 0&&xc.assertOptions(n,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),r!=null&&(_e.isFunction(r)?e.paramsSerializer={serialize:r}:xc.assertOptions(r,{encode:ao.function,serialize:ao.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),xc.assertOptions(e,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=h&&_e.merge(h.common,h[e.method]);h&&_e.forEach(["delete","get","head","post","put","patch","common"],c=>{delete h[c]}),e.headers=Xr.concat(d,h);const f=[];let w=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(w=w&&c.synchronous,f.unshift(c.fulfilled,c.rejected))});const p=[];this.interceptors.response.forEach(function(c){p.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!w){const c=[$m.bind(this),void 0];for(c.unshift(...f),c.push(...p),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=f.length;let u=e;for(i=0;i<a;){const c=f[i++],o=f[i++];try{u=c(u)}catch(l){o.call(this,l);break}}try{g=$m.call(this,u)}catch(c){return Promise.reject(c)}for(i=0,a=p.length;i<a;)g=g.then(p[i++],p[i++]);return g}getUri(t){t=$s(this.defaults,t);const e=ym(t.baseURL,t.url,t.allowAbsoluteUrls);return lm(e,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(t){Ms.prototype[t]=function(e,n){return this.request($s(n||{},{method:t,url:e,data:(n||{}).data}))}}),_e.forEach(["post","put","patch"],function(t){function e(n){return function(r,h,d){return this.request($s(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}Ms.prototype[t]=e(),Ms.prototype[t+"Form"]=e(!0)});let uC=class Ux{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(h){n=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const f=new Promise(w=>{r.subscribe(w),d=w}).then(h);return f.cancel=function(){r.unsubscribe(d)},f},e(function(h,d,f){r.reason||(r.reason=new da(h,d,f),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Ux(function(n){e=n}),cancel:e}}};function hC(t){return function(e){return t.apply(null,e)}}function dC(t){return _e.isObject(t)&&t.isAxiosError===!0}const Rh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rh).forEach(([t,e])=>{Rh[e]=t});function Tm(t){const e=new Ms(t),n=Kg(Ms.prototype.request,e);return _e.extend(n,Ms.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Tm($s(t,r))},n}const Nn=Tm(rl);Nn.Axios=Ms,Nn.CanceledError=da,Nn.CancelToken=uC,Nn.isCancel=pm,Nn.VERSION=Mm,Nn.toFormData=gc,Nn.AxiosError=kt,Nn.Cancel=Nn.CanceledError,Nn.all=function(t){return Promise.all(t)},Nn.spread=hC,Nn.isAxiosError=dC,Nn.mergeConfig=$s,Nn.AxiosHeaders=Xr,Nn.formToJSON=t=>hm(_e.isHTMLForm(t)?new FormData(t):t),Nn.getAdapter=Cm.getAdapter,Nn.HttpStatusCode=Rh,Nn.default=Nn;const{Axios:UB,AxiosError:qB,CanceledError:VB,isCancel:KB,CancelToken:GB,VERSION:YB,all:XB,Cancel:QB,isAxiosError:ZB,spread:JB,toFormData:ej,AxiosHeaders:tj,HttpStatusCode:nj,formToJSON:rj,getAdapter:ij,mergeConfig:oj}=Nn,Lh=Nn.create({baseURL:location.origin,timeout:6e4,params:{}});Lh.interceptors.response.use(t=>t,t=>{var e,n,r,h,d,f,w,p,g,i,a;if(t.response){if(t.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),t.response.config.headers["Ignore-Errors"]&&t.response.config.headers["Ignore-Errors"].includes(t.response.status.toString()))return Promise.reject(t);let u=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(u+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(u+=`${t.response.config.data} `),(d=(h=t.response)==null?void 0:h.data)!=null&&d.message?u+=`${t.response.data.message}`:(w=(f=t.response)==null?void 0:f.data)!=null&&w.exception?u+=`${t.response.data.exception}`:(i=(g=(p=t.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(u+=`${t.response.data.error.class} `),u+=`${t.response.data.error.message}`):u+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:u}),t}else throw t});const Sc=async function(t,e,{data:n,params:r={},headers:h,noAuth:d=!1,noScope:f=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}h.Authorization=localStorage.openc3Token}return h.manual=!0,!f&&!r.scope&&(r.scope=window.openc3Scope),Lh({method:t,url:e,data:n,params:r,headers:h,onUploadProgress:w})},Oh={Accept:"application/json"},Em={...Oh,"Content-Type":"application/json"},sj=Fi("P",{get:function(t,{params:e,headers:n=Oh,noScope:r,noAuth:h,onUploadProgress:d}={}){return Sc("get",t,{params:e,headers:n,noScope:r,noAuth:h,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Em,noScope:h,noAuth:d,onUploadProgress:f}={}){return Sc("put",t,{data:e,params:n,headers:r,noScope:h,noAuth:d,onUploadProgress:f})},post:function(t,{data:e,params:n,headers:r=Em,noScope:h,noAuth:d,onUploadProgress:f}={}){return Sc("post",t,{data:e,params:n,headers:r,noScope:h,noAuth:d,onUploadProgress:f})},delete:function(t,{params:e,headers:n=Oh,noScope:r,noAuth:h,onUploadProgress:d}={}){return Sc("delete",t,{params:e,headers:n,noScope:r,noAuth:h,onUploadProgress:d})}});let kc=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,h=n.length;r<h;r++)n[r](...e)},events:{},on(t,e){var n;return((n=this.events)[t]||(n[t]=[])).push(e),()=>{var r;this.events[t]=(r=this.events[t])==null?void 0:r.filter(h=>e!==h)}}});class ol extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}}class Ih extends ol{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class pC extends ol{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Wi extends ol{constructor(e,n){n?super(e,n):super("Disconnected",e),this.name="DisconnectedError"}}class fC extends Wi{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Rm(t){return t?`{${Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>{let n=JSON.stringify(t[e]);return`${JSON.stringify(e)}:${n}`}).join(",")}}`:""}class gC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,n){if(!this._info)return this._info={id:e,info:n},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let e=await this.channel.perform("$presence:leave");return delete this._info,e}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let e=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(e),this._state}finally{delete this._promise}}stateFromInfo(e){return e.records.reduce((n,{id:r,info:h})=>(n[r]=h,n),{})}}const As=Symbol("state");class Lm{constructor(e={}){this.emitter=kc(),this.params=Object.freeze(e),this.presence=new gC(this),this.initialConnect=!0,this[As]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Rm({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[As]}attached(e){if(this.receiver){if(this.receiver!==e)throw Error("Already connected to a different receiver");return!1}return this.receiver=e,!0}connecting(){this[As]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[As]="connected";let e=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:e})):this.emit("connect",{reconnect:!0,restored:e})}restored(){if(this.state==="connected")throw Error("Already connected");this[As]="connected";let e=!0,n=!0;this.initialConnect=!1,this.emit("connect",{reconnect:n,restored:e})}disconnected(e){this.state==="disconnected"||this.state==="closed"||(this[As]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[As]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",e))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(e,n){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,n)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(n){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",n)}}receive(e,n){this.emit("message",e,n)}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...h)=>{r(),n(...h)});return r}emit(e,...n){return this.emitter.emit(e,...n)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((e,n)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(h=>h()),e()})),r.push(this.on("close",h=>{r.forEach(d=>d()),n(h||new ol("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class mC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let n=this.channels.indexOf(e);n>-1&&this.channels.splice(n,1)}notify(e,...n){this.state=e==="restored"?"connected":e,n.length===1?this.channels.forEach(r=>r[e](n[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let n=this._pendings[0];return!n||n.intent!==e?Promise.resolve():n.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(e){this._checkIntent(e);let n,r={promise:new Promise(d=>{n=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),n(r)},canceled:!1,acquired:!1},h=this._pendingTop;return this._pendings.push(r),h&&await h.promise,this.gvl&&await this.gvl.acquire(r,e),r.acquired=!0,r}close(e){this.disposed=!0,this.intent=void 0,this.notify("closed",e)}_checkIntent(e){if(!(e==="unsubscribed"||e==="subscribed"))throw Error(`Unknown subscription intent: ${e}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(e){let n=this._pendingTop;return!n||n.acquired||n.intent!==e?!1:(this._pendings.pop(),n.canceled=!0,!0)}}class yC{constructor(){this.queue=[]}async acquire(e,n){n==="subscribed"&&(this.queue.push(e.promise.then(()=>{this.queue.splice(this.queue.indexOf(e),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class vC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new yC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let h=this._subscriptions[e]=new mC(e);return h.remoteId=this._localToRemote[e],h.subscriber=n,h.unsubscriber=r,h.gvl=this.glv,h}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,n){this._localToRemote[e]=n;let r=this.get(e);r&&(r.remoteId=n)}}class wC{constructor(e={}){this.subscriptions=new vC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,n){this._remoteToLocal[n]=e,this.subscriptions.storeRemoteId(e,n),this.flush(n)}unsubscribe(e){let n=this.subscriptions.get(e);if(!n)return;let r=n.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,n,r){let h=this._remoteToLocal[e];if(!h){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(h);d&&d.channels.forEach(f=>{f.receive(n,r)})}notify(e,n,r){let h=this._remoteToLocal[e];if(!h)return;let d=this.subscriptions.get(h);d&&d.channels.forEach(f=>f.emit(n,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(e=>e.channels)}flush(e){let n=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):n.push(r);this._pendingMessages=n}}const Om={debug:0,info:1,warn:2,error:3};class Im{constructor(e){this.level=e||"warn"}log(e,n,r){Om[e]<Om[this.level]||this.writeLogEntry(e,n,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,n){this.log("debug",e,n)}info(e,n){this.log("info",e,n)}warn(e,n){this.log("warn",e,n)}error(e,n){this.log("error",e,n)}}class sl extends Im{writeLogEntry(){}}class bC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let xC=0;class Nm{constructor(e={}){let{logger:n}=e;this.logger=n||new sl,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,n){let r={channel:e};n&&Object.assign(r,n);let h=Rm(r);if(this.pendingUnsubscriptions[h]){let f=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${f}`,h),new Promise(w=>{setTimeout(()=>{w(this.subscribe(e,n))},f)})}if(this.pendingSubscriptions[h])return this.logger.warn("subscription is already pending, skipping",h),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((f,w)=>{let p=++xC;this.pendingSubscriptions[h]={resolve:f,reject:w,id:p},this.cable.send(this.buildSubscribeRequest(h)),this.maybeRetrySubscribe(p,h,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let h=this.pendingSubscriptions[n];h&&h.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,n),this.cable.send(this.buildSubscribeRequest(n)),this.maybeExpireSubscribe(e,n,r))},r)}maybeExpireSubscribe(e,n,r){setTimeout(()=>{let h=this.pendingSubscriptions[n];h&&h.id===e&&(delete this.pendingSubscriptions[n],h.reject(new pC(`Haven't received subscription ack in ${r*2}ms for ${n}`)))},r)}unsubscribe(e){return this.cable.send({command:"unsubscribe",identifier:e}),this.pendingUnsubscriptions[e]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[e]},this.subscribeCooldownInterval),Promise.resolve()}perform(e,n,r){return n==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=n,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,n){return this.cable.send({command:"whisper",identifier:e,data:n}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:h,reason:d,reconnect:f}=e;if(n==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="welcome"){let w=e.sid;return w&&this.cable.setSessionId(w),this.cable.connected()}if(n==="disconnect"){let w=new Wi(d);this.reset(w),f===!1?this.cable.closed(w):this.cable.disconnected(w);return}if(n==="confirm_subscription"){let w=this.pendingSubscriptions[r];if(!w){this.logger.error("subscription not found, unsubscribing",{type:n,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],w.resolve(r)}if(n==="reject_subscription"){let w=this.pendingSubscriptions[r];return w?(delete this.pendingSubscriptions[r],w.reject(new Ih)):this.logger.error("subscription not found",{type:n,identifier:r})}if(h)return{identifier:r,message:h};this.logger.warn(`unknown message type: ${n}`,{message:e})}reset(e){for(let n in this.pendingSubscriptions)this.pendingSubscriptions[n].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Dm=()=>Date.now()/1e3|0;class SC extends Nm{constructor(e={}){super(e),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=e.historyTimestamp,this.disableSessionRecovery=e.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Dm()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let n in this.pendingPresence)this.pendingPresence[n].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:n,identifier:r,message:h}=e;if(n==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(n==="reject_subscription")return super.receive(e);if(n==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(n==="ping")return this.restoreSince&&(this.restoreSince=Dm()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),n==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(n==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(n==="welcome"){if(this.disableSessionRecovery||(this.sessionId=e.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),e.restored){let d=e.restored_ids||Object.keys(this.subscriptionStreams);for(let f of d)this.cable.send({identifier:f,command:"history",history:this.historyRequestFor(f)}),this.presenceInfo[f]&&this.cable.send({identifier:f,command:"join",presence:this.presenceInfo[f]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=h.type;if(d==="info"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.resolve(h))}else if(d==="error"){let f=this.pendingPresence[r];f&&(delete this.pendingPresence[r],f.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:h}}if(h){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:h,meta:d}}this.logger.warn(`unknown message type: ${n}`,{message:e})}perform(e,n,r){switch(n){case"$presence:join":return this.join(e,r);case"$presence:leave":return this.leave(e,r);case"$presence:info":return this.presence(e,r)}return super.perform(e,n,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let n=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(n.history=r,this.pendingHistory[e]=!0);let h=this.presenceInfo[e];return h&&(n.presence=h),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let h of this.subscriptionStreams[e]){let d=this.streamsPositions[h];d&&(r=!0,n[h]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,h){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:h},{stream:n,epoch:r,offset:h}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,n){return this.presenceInfo[e]=n,this.cable.send({command:"join",identifier:e,presence:n}),Promise.resolve()}async leave(e,n){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:n}),Promise.resolve()}presence(e,n){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,h)=>{this.pendingPresence[e]={resolve:r,reject:h},this.cable.send({command:"presence",identifier:e,data:n})})}}class kC extends ol{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Nh extends Lm{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}uc(Nh,"identifier","__ghost__");const _C="$pubsub";class Dh extends Lm{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}uc(Dh,"identifier",_C);const Ts=Symbol("state");let CC=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:h,hubOptions:d,performFailures:f,transportConfigurator:w}){this.emitter=kc(),this.transport=t,this.encoder=n,this.logger=r||new sl,this.protocol=e,this.performFailures=f||"throw",this.protocol.attached(this),this.hub=new wC(d||{}),this[Ts]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=w,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,h===!1&&this.connect().catch(()=>{})}get state(){return this[Ts]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[Ts]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:t}),await this.transport.open()}catch(n){this.handleClose(n)}return e}setSessionId(t){this.sessionId=t,this.transport.setParam("sid",t)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Ts]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new Wi("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let t=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(t){this.logger.info("connection recovered",{remoteIds:t}),this[Ts]="connected",this.hub.subscriptions.all().forEach(r=>{t&&r.remoteId&&t.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Wi("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,n=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:n})}notify(t,e,n){e&&typeof e!="string"&&(n=e,e=void 0),e?this.hub.notify(e,"info",{type:t,data:n}):this.emit("info",{type:t,data:n})}handleClose(t){this.logger.debug("transport closed",{error:t}),this.disconnected(new Wi(t,"transport_closed"))}disconnected(t){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:t}),this[Ts]="disconnected",this.recovering=this.protocol.recoverableClosure(t),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",t)}),this.protocol.reset(t),this.hub.close(),this.transport.close(),this.emit("disconnect",t))}closed(t){if(this.state==="closed"||this.state==="idle")return;let e;t&&(e=t instanceof Wi?t:new Wi(t,void 0)),this.logger.info("closed",{reason:t||"user"}),this[Ts]="closed";let n=e||new Wi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",n)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(t){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(t);if(e===void 0){this.logger.error("failed to decode message",{message:t});return}this.logger.debug("incoming data",e);let n=this.protocol.receive(e);if(n){this.logger.debug("processed incoming message",n);let{type:r,identifier:h,message:d,meta:f}=n;r?this.hub.notify(h,r,d):this.hub.transmit(h,d,f)}}send(t){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(t);if(e===void 0){this.logger.error("failed to encode message",{message:t});return}this.logger.debug("outgoing message",t),this.transport.send(e)}keepalive(t){this.emit("keepalive",t)}streamFrom(t){let e=new Dh({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Dh({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Nh),n=r?new t(r,e):new t(e),this.subscribe(n)}subscribe(t){if(!t.attached(this))return t;let e=t.identifier;t.connecting();let n=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,t.channelId,t.params),unsubscribe:r=>this._unsubscribe(r)});return n.add(t),n.intent==="subscribed"&&n.state==="connected"&&t.connected(),n.ensureSubscribed(),t}async _resubscribe(t){t.intent!=="subscribed"||!t.channels[0]||(t.notify("connecting"),t.ensureResubscribed())}async _subscribe(t,e,n){let r=t.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let h=await t.acquire("subscribed");if(h.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),h.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),h.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),h.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),h.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let f=await this.protocol.subscribe(e,n);this.hub.subscribe(r,f),this.logger.debug("subscribed",{...d,remoteId:f}),t.notify("connected")}catch(f){if(f){if(f instanceof Ih&&this.logger.warn("rejected",d),f instanceof Wi){this.logger.debug("disconnected during subscription; will retry on connect",d),h.release();return}this.logger.error("failed to subscribe",{error:f,...d})}t.close(f),this.hub.unsubscribe(r)}h.release()}unsubscribe(t){let e=t.identifier,n=this.hub.subscriptions.get(e);if(!n)throw Error(`Subscription not found: ${e}`);n.remove(t),t.closed(),n.maybeUnsubscribe()}async _unsubscribe(t){let e=t.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let n=await t.acquire("unsubscribed");if(n.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),n.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),t.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:t.intent}),n.release();return}if(t.state==="disconnected"||t.state==="closed"){this.logger.debug(`already ${t.state} connected, skip unsubscribe command`,{identifier:e}),n.release();return}let r=t.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),t.close(),this.hub.unsubscribe(e),n.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(h){h&&(h instanceof Wi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:h}):this.logger.error("unsubscribe failed",{id:e,error:h}))}t.intent==="unsubscribed"?(t.close(),this.hub.unsubscribe(e)):t.state="closed",n.release()}async perform(t,e,n){if(this.performFailures==="throw")return this._perform(t,e,n);try{return await this._perform(t,e,n)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(t,e,n){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new kC;let r=this.hub.subscriptions.get(t);if(!r)throw Error(`Subscription not found: ${t}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${t}`);let h=r.remoteId,d={id:h,action:e,payload:n};this.logger.debug("perform",d);try{let f=await this.protocol.perform(h,e,n);return f&&this.logger.debug("perform result",{message:f,request:d}),f}catch(f){throw this.logger.error("perform failed",{error:f,request:d}),f}}on(t,e){return this.emitter.on(t,e)}once(t,e){let n=this.emitter.on(t,(...r)=>{n(),e(...r)});return n}emit(t,...e){return this.emitter.emit(t,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((t,e)=>{let n=[()=>delete this._pendingConnect];n.push(this.on("connect",()=>{n.forEach(r=>r()),t()})),n.push(this.on("close",r=>{n.forEach(h=>h()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(h=>h()),e(r)}))}),this._pendingConnect)}};const $C={maxMissingPings:2,maxReconnectAttempts:1/0},pa=()=>Date.now(),Pm=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:h}=e;return n=n||2,r===void 0&&(r=.5),d=>{let f=t*n**d,w=f*n,p=f+(w-f)*Math.random(),g=2*(Math.random()-.5)*r;return p=p*(1+g),h&&h<p&&(p=h),p}};let Fm=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},$C,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new sl,this.state="pending_connect",this.attempts=0,this.disconnectedAt=pa()}watch(t){this.target=t,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(t=>{this.logger.info("Failed at reconnecting: "+t)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=pa(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=pa(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=pa(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=pa()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(t=>t()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let t=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},t)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let t=pa()-this.pingedAt;t>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${t}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new fC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let t=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${t}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),t)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class MC{constructor(e,n={}){this.transports=e,this.transport=null,this.emitter=kc(),this.unbind=[],this.logger=n.logger||new sl}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let n=this.transports[e];try{this.transport=n,this.resetListeners(),this.logger.debug(`Trying to connect via ${n.displayName()}`),await n.open(),this.logger.debug(`Connected via ${n.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${n.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(e){if(!this.transport)throw new Error("No transport is open");this.transport.send(e)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(e,n){this.transports.forEach(r=>{r.setParam(e,n)})}setToken(e,n){this.transports.forEach(r=>{r.setToken(e,n)})}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...h)=>{r(),n(...h)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(e=>e()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",e=>{this.emitter.emit("data",e)}),this.transport.on("close",e=>{this.emitter.emit("close",e)}),this.transport.on("error",e=>{this.emitter.emit("error",e)}))}}class AC{constructor(e,n={}){this.url=e;let r=n.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=kc();let{format:h,subprotocol:d,authStrategy:f}=n;this.format=h||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=f||"param",this.authProtocol="",this.subprotocol=d}displayName(){return"WebSocket("+this.url+")"}open(){let e=this.subprotocol;return this.authStrategy==="sub-protocol"&&(e=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,e,this.connectionOptions):this.ws=new this.Impl(this.url,e),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((n,r)=>{let h=[];h.push(this.once("open",()=>{h.forEach(d=>d()),n()})),h.push(this.once("close",()=>{h.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,n){let r=new URL(this.url);r.searchParams.set(e,n);let h=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(h)}setToken(e,n="jid"){if(this.authStrategy==="param")this.setParam(n,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${n}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(h=>h.toLowerCase()===r)||r,this.connectionOptions.headers[r]=e}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${e}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(e){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(e)}close(){this.ws?this.onclose():this.connected=!1}on(e,n){return this.emitter.on(e,n)}once(e,n){let r=this.emitter.on(e,(...h)=>{r(),n(...h)});return r}initListeners(){this.ws.onerror=e=>{this.connected&&this.emitter.emit("error",e.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=e=>{let n=e.data;this.format==="binary"&&(n=new Uint8Array(n)),this.emitter.emit("data",n)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Bm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function TC(t,e){if(typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),e=e||{},!t&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Bm,e);let{protocol:n,websocketImplementation:r,websocketFormat:h,websocketOptions:d,websocketAuthStrategy:f,fallbacks:w,logLevel:p,logger:g,transport:i,encoder:a,lazy:u,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:b,subprotocol:S,tokenRefresher:E,historyTimestamp:M,protocolOptions:k,concurrentSubscribes:x,performFailures:R,transportConfigurator:I,auth:O}=e;if(g=g||new sl(p),typeof n=="string"){S=S||n;let F=n.substring(0,n.lastIndexOf("-")),N=n.substring(n.lastIndexOf("-")+1);if(k=k||{},F==="actioncable-v1")n=new Nm({logger:g,...k});else if(F==="actioncable-v1-ext")n=new SC({logger:g,historyTimestamp:M,...k});else throw Error(`Protocol is not supported yet: ${n}`);if(N==="json")a=a||new bC,h=h||"text";else if(N==="msgpack"){if(h="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(h=h||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${n}`)}if(!n)throw Error("Protocol must be specified");i=i||new AC(t,{websocketImplementation:r,websocketOptions:d,subprotocol:S,authStrategy:f,format:h}),w&&(i=new MC([i,...w],{logger:g})),O&&O.token&&i.setToken(O.token,O.param||"jid"),l=l||Pm(o),c!==!1&&(c=c||new Fm({pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:b,logger:g}));let L={concurrentSubscribes:x},W=new CC({protocol:n,transport:i,encoder:a,logger:g,lazy:u,hubOptions:L,performFailures:R,transportConfigurator:I});return c&&(c.watch(W),W.monitor=c),E&&EC(W,async()=>{try{await E(i)}catch(F){return g.error("Failed to refresh authentication token: "+F),!1}return W.connect().catch(()=>{}),!0}),W}function EC(t,e){let n=!1;t.on("connect",()=>n=!1),t.on("close",async r=>{if(r){if(n){t.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(n=!0,await e())}})}class RC{constructor(e){this.channel=e}notify(e,...n){typeof this[e]=="function"&&this[e](...n)}perform(e,n={}){this.channel.perform(e,n)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class LC extends Nh{constructor(e,n,r){super(e,n),this.subscription=new RC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:h})=>this.subscription.notify("connected",{reconnected:h})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",h=>this.subscription.notify("received",h)),this.on("close",h=>{h&&h instanceof Ih?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class OC{constructor(e){this.cable=e}create(e,n){let r,h;typeof e=="object"?(r=e.channel,delete e.channel,h=e):(r=e,h={});let d=new LC(r,h,n);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(n=>n.identifier===e).map(n=>n.subscription)}}class IC{constructor(e){this.cable=e,this.subscriptions=new OC(e)}}class NC extends Im{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class DC extends Fm{watch(e){super.watch(e),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let e=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},n=h=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:h})},r=()=>this.disconnect(new Wi("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",n,!1),window.addEventListener("online",n,!1),window.addEventListener("resume",n,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",n,!1),window.removeEventListener("online",n,!1),window.removeEventListener("resume",n,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(e){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:e.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(e))}}const PC=["cable","action-cable"],FC="/cable",_c=(t,e)=>{for(let n of PC){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},jm=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,BC=()=>{if(typeof document<"u"&&document.head){let t=_c(document,"url");if(t)return jm(t)}return jm(FC)},jC=()=>{if(typeof document<"u"&&document.head){let t=_c(document,"history-timestamp");if(t)return t|0}},WC=()=>{if(typeof document<"u"&&document.head)return _c(document,"token")},zC=()=>{if(typeof document<"u"&&document.head)return _c(document,"token-param")};function HC(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||BC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=jC());let n=WC();if(n){let g=zC();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},Bm,e);let{logLevel:r,logger:h,pingInterval:d,reconnectStrategy:f,maxMissingPings:w,maxReconnectAttempts:p}=e;return h=e.logger=e.logger||new NC(r),f=e.reconnectStrategy=e.reconnectStrategy||Pm(d),e.monitor!==!1&&(e.monitor=e.monitor||new DC({pingInterval:d,reconnectStrategy:f,maxMissingPings:w,maxReconnectAttempts:p,logger:h})),TC(t,e)}function UC(t,e){let n=HC(t,e);return new IC(n)}class qC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,n,r={},h={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let f=this._url+"?scope="+encodeURIComponent(n)+"&authorization="+encodeURIComponent(localStorage.openc3Token);f=new URL(f,document.baseURI).href,this._cable=UC(f)}return this._cable.subscriptions.create({channel:e,...h},r)})}recordPing(){}}Fi("W",qC);class VC{constructor(e,n,r="",h=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=n,this.usage=r,this.url=h}}Fi("S",VC);function al(t){return KC.test(t)}const KC=/^-?[0-9]+$/;function Wm(t){return GC.test(t)}const GC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function zm(t,e){if(al(t))return Number.isSafeInteger(Number.parseInt(t,10));const n=Number.parseFloat(t),r=String(n);if(t===r)return!0;const h=Hm(t),d=Hm(r);return!!(h===d||(e==null?void 0:e.approx)===!0&&!al(t)&&d.length>=14&&h.startsWith(d.substring(0,14)))}let ll=(function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t})({});function YC(t){if(zm(t,{approx:!1}))return;if(al(t))return ll.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?ll.underflow:ll.truncate_float:ll.overflow}function Hm(t){const{start:e,end:n}=XC(t),r=t.substring(e,n),h=r.indexOf(".");return h===-1?r:r.substring(0,h)+r.substring(h+1)}function XC(t){let e=0;for(t[0]==="-"&&e++;t[e]==="0"||t[e]===".";)e++;let n=t.lastIndexOf("e");for(n===-1&&(n=t.lastIndexOf("E")),n===-1&&(n=t.length);(t[n-1]==="0"||t[n-1]===".")&&n>e;)n--;return{start:e,end:n}}class QC{constructor(e){if(uc(this,"isLosslessNumber",!0),!Wm(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=YC(this.value);if(e===void 0||e===ll.truncate_float)return Number.parseFloat(this.value);if(al(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function ZC(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function JC(t){return new QC(t)}function e$(t,e){return Ph({"":t},"",t,e)}function Ph(t,e,n,r){return Array.isArray(n)?r.call(t,e,n$(n,r)):n&&typeof n=="object"&&!ZC(n)?r.call(t,e,t$(n,r)):r.call(t,e,n)}function t$(t,e){for(const n of Object.keys(t)){const r=Ph(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function n$(t,e){for(let n=0;n<t.length;n++)t[n]=Ph(t,String(n),t[n],e);return t}function r$(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:JC,r=0;const h=w();return o(h),m(),e?e$(h,e):h;function d(){if(t.charCodeAt(r)===c$){r++,g();const $={};let _=!0;for(;r<t.length&&t.charCodeAt(r)!==qm;){_?_=!1:(u(),g());const D=r,z=i();if(z===void 0){E();return}g(),c();const U=w();if(U===void 0){O();return}Object.prototype.hasOwnProperty.call($,z)&&!Fh(U,$[z])&&M(z,D+1),$[z]=U}return t.charCodeAt(r)!==qm&&k(),r++,$}}function f(){if(t.charCodeAt(r)===u$){r++,g();const $=[];let _=!0;for(;r<t.length&&t.charCodeAt(r)!==Vm;){_?_=!1:u();const D=w();l(D),$.push(D)}return t.charCodeAt(r)!==Vm&&x(),r++,$}}function w(){g();const $=i()??a()??d()??f()??p("true",!0)??p("false",!1)??p("null",null);return g(),$}function p($,_){if(t.slice(r,r+$.length)===$)return r+=$.length,_}function g(){for(;i$(t.charCodeAt(r));)r++}function i(){if(t.charCodeAt(r)===Bh){r++;let $="";for(;r<t.length&&t.charCodeAt(r)!==Bh;){if(t.charCodeAt(r)===l$){const _=t[r+1],D=a$[_];D!==void 0?($+=D,r++):_==="u"?Cc(t.charCodeAt(r+2))&&Cc(t.charCodeAt(r+3))&&Cc(t.charCodeAt(r+4))&&Cc(t.charCodeAt(r+5))?($+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):L(r):I(r)}else s$(t.charCodeAt(r))?$+=t[r]:R(t[r]);r++}return S(),r++,$}}function a(){const $=r;if(t.charCodeAt(r)===Km&&(r++,b($)),t.charCodeAt(r)===jh)r++;else if(o$(t.charCodeAt(r)))for(r++;$c(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===v$)for(r++,b($);$c(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===k$||t.charCodeAt(r)===S$)for(r++,(t.charCodeAt(r)===Km||t.charCodeAt(r)===g$)&&r++,b($);$c(t.charCodeAt(r));)r++;if(r>$)return n(t.slice($,r))}function u(){if(t.charCodeAt(r)!==y$)throw new SyntaxError(`Comma ',' expected after value ${N()}`);r++}function c(){if(t.charCodeAt(r)!==w$)throw new SyntaxError(`Colon ':' expected after property name ${N()}`);r++}function o($){if($===void 0)throw new SyntaxError(`JSON value expected ${N()}`)}function l($){if($===void 0)throw new SyntaxError(`Array item expected ${N()}`)}function m(){if(r<t.length)throw new SyntaxError(`Expected end of input ${N()}`)}function b($){if(!$c(t.charCodeAt(r))){const _=t.slice($,r);throw new SyntaxError(`Invalid number '${_}', expecting a digit ${N()}`)}}function S(){if(t.charCodeAt(r)!==Bh)throw new SyntaxError(`End of string '"' expected ${N()}`)}function E(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function M($,_){throw new SyntaxError(`Duplicate key '${$}' encountered at position ${_}`)}function k(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${N()}`)}function x(){throw new SyntaxError(`Array item or end of array ']' expected ${N()}`)}function R($){throw new SyntaxError(`Invalid character '${$}' ${W()}`)}function I($){const _=t.slice($,$+2);throw new SyntaxError(`Invalid escape character '${_}' ${W()}`)}function O(){throw new SyntaxError(`Object value expected after ':' ${W()}`)}function L($){const _=t.slice($,$+6);throw new SyntaxError(`Invalid unicode character '${_}' ${W()}`)}function W(){return`at position ${r}`}function F(){return r<t.length?`but got '${t[r]}'`:"but reached end of input"}function N(){return`${F()} ${W()}`}}function i$(t){return t===h$||t===d$||t===p$||t===f$}function Cc(t){return t>=jh&&t<=Wh||t>=b$&&t<=_$||t>=x$&&t<=C$}function $c(t){return t>=jh&&t<=Wh}function o$(t){return t>=m$&&t<=Wh}function s$(t){return t>=32&&t<=1114111}function Fh(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Fh(n,e[r])):Um(t)&&Um(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Fh(t[n],e[n])):!1}function Um(t){return typeof t=="object"&&t!==null}const a$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
1404
|
+
`,r:"\r",t:" "},l$=92,c$=123,qm=125,u$=91,Vm=93,h$=32,d$=10,p$=9,f$=13,Bh=34,g$=43,Km=45,jh=48,m$=49,Wh=57,y$=44,v$=46,w$=58,b$=65,x$=97,S$=69,k$=101,_$=70,C$=102;function Gm(t,e,n,r){return h(t);function h(p,g){if(Array.isArray(r)){const i=r.find(a=>a.test(p));if(i){const a=i.stringify(p);if(typeof a!="string"||!Wm(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof p=="boolean"||typeof p=="number"||typeof p=="string"||p===null||p instanceof Date||p instanceof Boolean||p instanceof Number||p instanceof String)return JSON.stringify(p);if(p!=null&&p.isLosslessNumber||typeof p=="bigint")return p.toString();if(Array.isArray(p))return d(p);if(p&&typeof p=="object")return f(p)}function d(p,g){if(p.length===0)return"[]";let i="[";for(let a=0;a<p.length;a++){const u=p[a];typeof u<"u"&&typeof u!="function"?i+=h(u):i+="null",a<p.length-1&&(i+=",")}return i+="]",i}function f(p,g){if(typeof p.toJSON=="function")return Gm(p.toJSON(),e,n,void 0);const i=Array.isArray(e)?e.map(String):Object.keys(p);if(i.length===0)return"{}";let a=!0,u="{";for(const c of i){const o=p[c];if(w(c,o)){a?a=!1:u+=",";const l=JSON.stringify(c);u+=`${l}:`,u+=h(o)}}return u+="}",u}function w(p,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function $$(t){return al(t)&&!zm(t)?BigInt(t):parseFloat(t)}class Ym{constructor(){uc(this,"id",1)}async exec(e,n,r={},h={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,h.manual=!0,(await Lh.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:n,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...h},timeout:d,transformRequest:[(f,w)=>Gm(f)],transformResponse:[f=>r$(f,void 0,$$)]})).data.result}catch(f){let w=new Error;throw f.response?(w.name=f.response.data.error.data.class,w.message=f.response.data.error.data.message,w.object=f.response.data.error):f.request?(w.name="Request error",w.message="Request error, no response received"):w=f,w}}decode_openc3_type(e){if(e!==null&&typeof e=="object"&&e.json_class=="Float"&&e.raw){if(e.raw=="NaN")return NaN;if(e.raw=="Infinity")return 1/0;if(e.raw=="-Infinity")return-1/0}return null}encode_openc3_type(e){return Number.isNaN(e)?{json_class:"Float",raw:"NaN"}:e==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:e==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(e=>{e&&(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(e){return this.exec("set_offline_access",[e])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(e,n){return this.exec("map_target_to_interface",[e,n])}connect_interface(e,...n){return n.length>0?this.exec("connect_interface",[e,...n]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,n,...r){return this.exec("interface_cmd",[e,n,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,n,r){return this.exec("get_item",[e,n,r])}get_param(e,n,r){return this.exec("get_param",[e,n,r])}get_parameter(e,n,r){return this.exec("get_param",[e,n,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(e){return this.exec("set_limits_set",[e])}get_target(e){return this.exec("get_target",[e])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(e,n){return this.exec("get_tlm",[e,n])}get_telemetry(e,n){return this.exec("get_tlm",[e,n])}get_all_tlm(e){return this.exec("get_all_tlm",[e])}get_all_telemetry(e){return this.exec("get_all_tlm",[e])}get_all_tlm_names(e,n=!1){return this.exec("get_all_tlm_names",[e],{hidden:n})}get_all_telemetry_names(e){return this.exec("get_all_tlm_names",[e])}get_all_tlm_item_names(e){return this.exec("get_all_tlm_item_names",[e])}async get_tlm_packet(e,n,r,h=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:h});if(d!=null){let f=d.length,w=null;for(let p=0;p<f;p++)w=this.decode_openc3_type(d[p][1]),w!==null&&(d[p][1]=w)}return d}get_packet_derived_items(e,n){return this.exec("get_packet_derived_items",[e,n])}get_tlm_buffer(e,n){return this.exec("get_tlm_buffer",[e,n])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,n=30,r=null,h=null,d=null){let f={stale_time:n};r!==null&&(f.cache_timeout=r),h!==null&&(f.start_time=h.toISOString()),d!==null&&(f.end_time=d.toISOString());const w=await this.exec("get_tlm_values",[e],f,{},1e4);if(w&&w.length>0){let p=w[0].length,g=null;for(let i=0;i<p;i++)g=this.decode_openc3_type(w[0][i]),g!==null&&(w[0][i]=g)}return w}get_limits(e,n,r){return this.exec("get_limits",[e,n,r])}async tlm(e,n,r,h="CONVERTED"){let d=null;if(n===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(n))d=await this.exec("tlm",[e],{type:n});else{let w=new Error;throw w.name="TypeError",w.message=`Invalid data type ${n}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,w}else d=await this.exec("tlm",[e,n,r],{type:h});let f=this.decode_openc3_type(d);return f!==null&&(d=f),d}async inject_tlm(e,n,r=null,h="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:h})}set_tlm(e,n,r,h){return this.exec("set_tlm",[e,n,r],{type:h})}override_tlm(e,n,r,h){return this.exec("override_tlm",[e,n,r],{type:h})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,h){return this.exec("normalize_tlm",[e,n,r],{type:h})}get_all_cmds(e){return this.exec("get_all_cmds",[e])}get_all_commands(e){return this.exec("get_all_cmds",[e])}get_all_cmd_names(e,n=!1){return this.exec("get_all_cmd_names",[e],{hidden:n})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,n){return this.exec("get_cmd",[e,n])}get_command(e,n){return this.exec("get_cmd",[e,n])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,n,r,h="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,h])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,h,d,f={}){let w=null;for(let p in h)Object.prototype.hasOwnProperty.call(h,p)&&(w=this.encode_openc3_type(h[p]),w!==null&&(h[p]=w));return this.exec(e,[n,r,h],f,d)}get_cmd_hazardous(e,n,r,h={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},h):this._cmd("get_cmd_hazardous",e,n,r,h)}cmd(e,n,r,h={},d={}){return n===void 0?this.exec("cmd",e,{},h):this._cmd("cmd",e,n,r,h,d)}cmd_no_range_check(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_no_range_check",e,{},h,d):this._cmd("cmd_no_range_check",e,n,r,h,d)}cmd_raw(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_raw",e,{},h,d):this._cmd("cmd_raw",e,n,r,h,d)}cmd_raw_no_range_check(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},h,d):this._cmd("cmd_raw_no_range_check",e,n,r,h,d)}cmd_no_hazardous_check(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},h,d):this._cmd("cmd_no_hazardous_check",e,n,r,h,d)}cmd_no_checks(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_no_checks",e,{},h,d):this._cmd("cmd_no_checks",e,n,r,h,d)}cmd_raw_no_hazardous_check(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},h,d):this._cmd("cmd_raw_no_hazardous_check",e,n,r,h,d)}cmd_raw_no_checks(e,n,r,h={},d={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},h,d):this._cmd("cmd_raw_no_checks",e,n,r,h,d)}build_cmd(e,n,r,h={},d={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,h,d)}build_command(e,n,r,h={},d={}){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r,h,d)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(e,n){return this.exec("send_raw",[e,n])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,n){return this.exec("load_config",[e,n])}save_config(e,n,r){return this.exec("save_config",[e,n,r])}delete_config(e,n){return this.exec("delete_config",[e,n])}enable_limits(e,n,r){return this.exec("enable_limits",[e,n,r])}disable_limits(e,n,r){return this.exec("disable_limits",[e,n,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(e){return this.exec("get_overall_limits_state",[e])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(e,n){return this.exec("get_setting",[e],n)}get_settings(e,n){return this.exec("get_settings",e,n)}set_setting(e,n){return this.exec("set_setting",[e,n])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,n){return this.exec("set_setting",[e,n])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),h=new Uint8Array(r);return Array.from(h).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Fi("H",Ym);var Xm={exports:{}},Qm;function M$(){return Qm||(Qm=1,(function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,h){function d(g,i){function a(O,L,W){if(!(O.length<L)){var F=O.slice(0,L),N=O.slice(L),$=/^(?:(\s+)|(\S+)(\s+))/.exec(N),_=/(?:(\s+)|(\s+)(\S+))$/.exec(F),D=0,z=0;if(_&&!_[2]&&(D=L-_[1].length,z=L),$&&!$[2]&&(D||(D=L),z=L+$[1].length),D)return{start:D,end:z};if(_&&_[2]&&_.index>W)return{start:_.index,end:_.index+_[2].length};if($&&$[2])return D=L+$[2].length,{start:D,end:D+$[3].length}}}for(var u=i.column||g.getOption("printMarginColumn"),c=i.allowMerge!=0,o=Math.min(i.startRow,i.endRow),l=Math.max(i.startRow,i.endRow),m=g.session;o<=l;){var b=m.getLine(o);if(b.length>u){var S=a(b,u,5);if(S){var E=/^\s*/.exec(b)[0];m.replace(new w(o,S.start,o,S.end),`
|
1405
|
+
`+E)}l++}else if(c&&/\S/.test(b)&&o!=l){var M=m.getLine(o+1);if(M&&/\S/.test(M)){var k=b.replace(/\s+$/,""),x=M.replace(/^\s+/,""),R=k+" "+x,S=a(R,u,5);if(S&&S.start>k.length||R.length<u){var I=new w(o,k.length,o+1,M.length-x.length);m.replace(I," "),o--,l--}else k.length<b.length&&m.remove(new w(o,k.length,o,b.length))}}o++}}function f(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var i=g.editor,a=i.selection.cursor;if(a.column<=i.renderer.$printMarginColumn)return;var u=i.session.$undoManager.$lastDelta;d(i,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var w=n("../range").Range,p=n("../editor").Editor;n("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",f):this.commands.off("afterExec",f)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(n,r,h){function d(v){return{row:v.line,column:v.ch}}function f(v){return new De(v.row,v.column)}function w(v,A,C){if(A.line===C.line&&A.ch>=C.ch-1){var P=v.getLine(A.line),B=P.charCodeAt(A.ch);55296<=B&&B<=55551&&(C.ch+=1)}return{start:A,end:C}}function p(v){v.setOption("disableInput",!0),v.setOption("showCursorWhenSelecting",!1),Be.signal(v,"vim-mode-change",{mode:"normal"}),v.on("cursorActivity",is),R(v),Be.on(v.getInputField(),"paste",i(v))}function g(v){v.setOption("disableInput",!1),v.off("cursorActivity",is),Be.off(v.getInputField(),"paste",i(v)),v.state.vim=null,pr&&clearTimeout(pr)}function i(v){var A=v.state.vim;return A.onPasteFn||(A.onPasteFn=function(){A.insertMode||(v.setCursor(ge(v.getCursor(),0,1)),Rn.enterInsertMode(v,{},A))}),A.onPasteFn}function a(v,A){return A>=v.firstLine()&&A<=v.lastLine()}function u(v){return/^[a-z]$/.test(v)}function c(v){return"()[]{}".indexOf(v)!=-1}function o(v){return Da.test(v)}function l(v){return Xt.test(v)}function m(v){return/^\s*$/.test(v)}function b(v){return".?!".indexOf(v)!=-1}function S(v,A){for(var C=0;C<A.length;C++)if(A[C]==v)return!0;return!1}function E(v,A,C,P,B){if(A===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(C||(C="string"),Ft[v]={type:C,defaultValue:A,callback:B},P)for(var j=0;j<P.length;j++)Ft[P[j]]=Ft[v];A&&M(v,A)}function M(v,A,C,P){var B=Ft[v];P=P||{};var j=P.scope;if(!B)return new Error("Unknown option: "+v);if(B.type=="boolean"){if(A&&A!==!0)return new Error("Invalid argument: "+v+"="+A);A!==!1&&(A=!0)}B.callback?(j!=="local"&&B.callback(A,void 0),j!=="global"&&C&&B.callback(A,C)):(j!=="local"&&(B.value=B.type=="boolean"?!!A:A),j!=="global"&&C&&(C.state.vim.options[v]={value:A}))}function k(v,A,C){var P=Ft[v];C=C||{};var B=C.scope;if(!P)return new Error("Unknown option: "+v);if(P.callback){var j=A&&P.callback(void 0,A);return B!=="global"&&j!==void 0?j:B!=="local"?P.callback():void 0}var j=B!=="global"&&A&&A.state.vim.options[v];return(j||B!=="local"&&P||{}).value}function x(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Tn()}function R(v){return v.state.vim||(v.state.vim={inputState:new $,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),v.state.vim}function I(){We={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ti(),macroModeState:new x,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Ft){var A=Ft[v];A.value=A.defaultValue}}function O(v){function A(Y){typeof Y=="string"?mn.value=Y:mn=null}if(v[0]=="<"){var C=v.toLowerCase().slice(1,-1),P=C.split("-");if(C=P.pop()||"",C=="lt")v="<";else if(C=="space")v=" ";else if(C=="cr")v=`
|
1406
|
+
`;else if(Ei[C]){var B=mn.value,j={key:Ei[C],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};mn.onKeyDown&&mn.onKeyDown(j,mn.value,A),mn&&mn.onKeyUp&&mn.onKeyUp(j,mn.value,A);return}}if(v==`
|
1407
|
+
`){var V=mn;mn=null,V.onClose&&V.onClose(V.value)}else mn.value=(mn.value||"")+v}function L(v,A,C){var P=on;if(C){if(jr.indexOf(C)!=-1)return;jr.push(C),on=C.noremap!=0}try{for(var B=R(v),j=/<(?:[CSMA]-)*\w+>|./gi,V;V=j.exec(A);){var Y=V[0],Q=B.insertMode;if(mn){O(Y);continue}var re=mt.handleKey(v,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ve=se.split("-");if(se=ve.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
|
1408
|
+
`;else{if(Ei.hasOwnProperty(se)){Y=Ei[se],ss(v,Y);continue}Y=Y[0],j.lastIndex=V.index+1}}v.replaceSelection(Y)}}}finally{if(jr.pop(),on=jr.length?P:!1,!jr.length&&mn){var Se=mn;mn=null,Tr(v,Se)}}}function W(v,A){var C=v.key;if(!Wr[C]){C.length>1&&C[0]=="n"&&(C=C.replace("Numpad","")),C=Zn[C]||C;var P="";if(v.ctrlKey&&(P+="C-"),v.altKey&&(P+="A-"),v.metaKey&&(P+="M-"),Be.isMac&&v.altKey&&!v.metaKey&&!v.ctrlKey&&(P=P.slice(2)),(P||C.length>1)&&v.shiftKey&&(P+="S-"),A&&!A.expectLiteralNext&&C.length==1){if(zn.keymap&&C in zn.keymap)(zn.remapCtrl!=0||!P)&&(C=zn.keymap[C]);else if(C.charCodeAt(0)>255){var B=v.code&&v.code.slice(-1)||"";v.shiftKey||(B=B.toLowerCase()),B&&(C=B)}}return P+=C,P.length>1&&(P="<"+P+">"),P}}function F(v,A){zn.string!==v&&(zn=N(v)),zn.remapCtrl=A}function N(v){function A(P){return P.split(/\\?(.)/).filter(Boolean)}var C={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var B=P.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var j=A(B[1]),V=A(B[2]);if(j.length!==V.length)return;for(var Y=0;Y<j.length;++Y)C[j[Y]]=V[Y]}else if(B.length==1){var Q=A(P);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)C[Q[Y]]=Q[Y+1]}}}),{keymap:C,string:v}):{keymap:C,string:""}}function $(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(v,A){v.state.vim.inputState=new $,v.state.vim.expectLiteralNext=!1,Be.signal(v,"vim-command-done",A)}function D(){this.removed=[],this.inserted=""}function z(v,A,C){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!A,this.blockwise=!!C}function U(v,A){var C=We.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");C[v]=A,Yt.push(v)}function G(v){this.registers=v,this.unnamedRegister=v['"']=new z,v["."]=new z,v[":"]=new z,v["/"]=new z,v["+"]=new z}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(v,A){ri[v]=A}function he(v,A){for(var C=[],P=0;P<A;P++)C.push(v);return C}function ne(v,A){us[v]=A}function le(v,A){Rn[v]=A}function ue(v,A,C){var P=v.state.vim,B=P.insertMode||P.visualMode,j=Math.min(Math.max(v.firstLine(),A.line),v.lastLine()),V=v.getLine(j),Y=V.length-1+ +!!B,Q=Math.min(Math.max(0,A.ch),Y),re=V.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;C&&C.line==j&&C.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new De(j,Q)}function ce(v){var A={};for(var C in v)v.hasOwnProperty(C)&&(A[C]=v[C]);return A}function ge(v,A,C){return typeof A=="object"&&(C=A.ch,A=A.line),new De(v.line+A,v.ch+C)}function Ae(v,A,C,P){P.operator&&(C="operatorPending");for(var B,j=[],V=[],Y=on?A.length-No:0,Q=Y;Q<A.length;Q++){var re=A[Q];C=="insert"&&re.context!="insert"||re.context&&re.context!=C||P.operator&&re.type=="action"||!(B=Te(v,re.keys))||(B=="partial"&&j.push(re),B=="full"&&V.push(re))}return{partial:j.length&&j,full:V.length&&V}}function Te(v,A){var C=A.slice(-11)=="<character>",P=A.slice(-10)=="<register>";if(C||P){var B=A.length-(C?11:10),j=v.slice(0,B),V=A.slice(0,B);return j==V&&v.length>B?"full":V.indexOf(j)==0?"partial":!1}return v==A?"full":A.indexOf(v)==0?"partial":!1}function Re(v){var A=/^.*(<[^>]+>)$/.exec(v),C=A?A[1]:v.slice(-1);if(C.length>1)switch(C){case"<CR>":C=`
|
1409
|
+
`;break;case"<Space>":C=" ";break;default:C=""}return C}function Xe(v,A,C){return function(){for(var P=0;P<C;P++)A(v)}}function Ke(v){return new De(v.line,v.ch)}function dt(v,A){return v.ch==A.ch&&v.line==A.line}function rt(v,A){return v.line<A.line?!0:v.line==A.line&&v.ch<A.ch}function gt(v,A){return arguments.length>2&&(A=gt.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,A)?v:A}function tn(v,A){return arguments.length>2&&(A=tn.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,A)?A:v}function Bn(v,A,C){var P=rt(v,A),B=rt(A,C);return P&&B}function Zt(v,A){return v.getLine(A).length}function hi(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function Sn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xn(v,A,C){var P=Zt(v,A),B=new Array(C-P+1).join(" ");v.setCursor(new De(A,P)),v.replaceRange(B,v.getCursor())}function ur(v,A){var C=[],P=v.listSelections(),B=Ke(v.clipPos(A)),j=!dt(A,B),V=v.getCursor("head"),Y=vt(P,V),Q=dt(P[Y].head,P[Y].anchor),re=P.length-1,se=re-Y>Y?re:0,ve=P[se].anchor,Se=Math.min(ve.line,B.line),me=Math.max(ve.line,B.line),we=ve.ch,Ne=B.ch,Ie=P[se].head.ch-we,He=Ne-we;Ie>0&&He<=0?(we++,j||Ne--):Ie<0&&He>=0?(we--,Q||Ne++):Ie<0&&He==-1&&(we--,Ne++);for(var st=Se;st<=me;st++){var Ye={anchor:new De(st,we),head:new De(st,Ne)};C.push(Ye)}return v.setSelections(C),A.ch=Ne,ve.ch=we,ve}function Fr(v,A,C){for(var P=[],B=0;B<C;B++){var j=ge(A,B,0);P.push({anchor:j,head:j})}v.setSelections(P,0)}function vt(v,A,C){for(var P=0;P<v.length;P++){var B=dt(v[P].anchor,A),j=dt(v[P].head,A);if(B||j)return P}return-1}function qe(v,A){var C=A.lastSelection,P=function(){var j=v.listSelections(),V=j[0],Y=j[j.length-1],Q=rt(V.anchor,V.head)?V.anchor:V.head,re=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var j=v.getCursor(),V=v.getCursor(),Y=C.visualBlock;if(Y){var Q=Y.width,re=Y.height;V=new De(j.line+re,j.ch+Q);for(var se=[],ve=j.line;ve<V.line;ve++){var Se=new De(ve,j.ch),me=new De(ve,V.ch),we={anchor:Se,head:me};se.push(we)}v.setSelections(se)}else{var Ne=C.anchorMark.find(),Ie=C.headMark.find(),He=Ie.line-Ne.line,st=Ie.ch-Ne.ch;V={line:V.line+He,ch:He?V.ch:st+V.ch},C.visualLine&&(j=new De(j.line,0),V=new De(V.line,Zt(v,V.line))),v.setSelection(j,V)}return[j,V]};return A.visualMode?P():B()}function qt(v,A){var C=A.sel.anchor,P=A.sel.head;A.lastPastedText&&(P=v.posFromIndex(v.indexFromPos(C)+A.lastPastedText.length),A.lastPastedText=null),A.lastSelection={anchorMark:v.setBookmark(C),headMark:v.setBookmark(P),anchor:Ke(C),head:Ke(P),visualMode:A.visualMode,visualLine:A.visualLine,visualBlock:A.visualBlock}}function gn(v,A,C,P){var B=v.state.vim.sel,j=P?A:B.head,V=P?A:B.anchor,Y;return rt(C,A)&&(Y=C,C=A,A=Y),rt(j,V)?(j=gt(A,j),V=tn(V,C)):(V=gt(A,V),j=tn(j,C),j=ge(j,0,-1),j.ch==-1&&j.line!=v.firstLine()&&(j=new De(j.line-1,Zt(v,j.line-1)))),[V,j]}function Qn(v,A,B){var P=v.state.vim;A=A||P.sel;var B=B||P.visualLine?"line":P.visualBlock?"block":"char",j=Br(v,A,B);v.setSelections(j.ranges,j.primary)}function Br(v,A,C,P){var B=Ke(A.head),j=Ke(A.anchor);if(C=="char"){var V=!P&&!rt(A.head,A.anchor)?1:0,Y=rt(A.head,A.anchor)?1:0;return B=ge(A.head,0,V),j=ge(A.anchor,0,Y),{ranges:[{anchor:j,head:B}],primary:0}}if(C=="line"){if(rt(A.head,A.anchor))B.ch=0,j.ch=Zt(v,j.line);else{j.ch=0;var Q=v.lastLine();B.line>Q&&(B.line=Q),B.ch=Zt(v,B.line)}return{ranges:[{anchor:j,head:B}],primary:0}}if(C=="block"){var re=Math.min(j.line,B.line),se=j.ch,ve=Math.max(j.line,B.line),Se=B.ch;se<Se?Se+=1:se+=1;for(var me=ve-re+1,we=B.line==re?0:me-1,Ne=[],Ie=0;Ie<me;Ie++)Ne.push({anchor:new De(re+Ie,se),head:new De(re+Ie,Se)});return{ranges:Ne,primary:we}}}function $r(v){var A=v.getCursor("head");return v.getSelection().length==1&&(A=gt(A,v.getCursor("anchor"))),A}function kn(v,A){var C=v.state.vim;A!==!1&&v.setCursor(ue(v,C.sel.head)),qt(v,C),C.visualMode=!1,C.visualLine=!1,C.visualBlock=!1,C.insertMode||Be.signal(v,"vim-mode-change",{mode:"normal"})}function ir(v,A,C){var P=v.getRange(A,C);if(/\n\s*$/.test(P)){var B=P.split(`
|
1410
|
+
`);B.pop();for(var j,j=B.pop();B.length>0&&j&&m(j);j=B.pop())C.line--,C.ch=0;j?(C.line--,C.ch=Zt(v,C.line)):C.ch=0}}function hr(v,A,C){A.ch=0,C.ch=0,C.line++}function nn(v){if(!v)return 0;var A=v.search(/\S/);return A==-1?v.length:A}function or(v,A,C){var P=A.inclusive,B=A.innerWord,j=A.bigWord,V=A.noSymbol,Y=A.multiline,Q=C||$r(v),re=v.getLine(Q.line),se=re,ve=Q.line,Se=ve,me=Q.ch,we,Ne=V?Do[0]:Ai[0];if(B&&/\s/.test(re.charAt(me)))Ne=function(pn){return/\s/.test(pn)};else{for(;!Ne(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=Mo(v,Q,!0,j,!0);break}j?Ne=Ai[0]:(Ne=Do[0],Ne(re.charAt(me))||(Ne=Do[1]))}for(var Ie=me,He=me;Ne(re.charAt(He))&&He>=0;)He--;if(He++,we)Ie=we.to,Se=we.line,se=v.getLine(Se),!se&&Ie==0&&Ie++;else for(;Ne(re.charAt(Ie))&&Ie<re.length;)Ie++;if(P){var st=Ie,Ye=Q.ch<=He&&/\s/.test(re.charAt(Q.ch));if(!Ye)for(;/\s/.test(se.charAt(Ie))&&Ie<se.length;)Ie++;if(st==Ie||Ye){for(var Je=He;/\s/.test(re.charAt(He-1))&&He>0;)He--;!He&&!Ye&&(He=Je)}}return{start:new De(ve,He),end:new De(Se,Ie)}}function $o(v,A,C){var P=A;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:P,end:P};var B=Be.findMatchingTag(v,A)||Be.findEnclosingTag(v,A);return!B||!B.open||!B.close?{start:P,end:P}:C?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Ki(v,A,C){dt(A,C)||We.jumpList.add(v,A,C)}function Gi(v,A){We.lastCharacterSearch.increment=v,We.lastCharacterSearch.forward=A.forward,We.lastCharacterSearch.selectedCharacter=A.selectedCharacter}function Yi(v,A,C,P){var B=Ke(v.getCursor()),j=C?1:-1,V=C?v.lineCount():-1,Y=B.ch,Q=B.line,re=v.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:P,reverseSymb:(C?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:C,depth:0,curMoveThrough:!1},ve=gi[P];if(!ve)return B;var Se=mi[ve].init,me=mi[ve].isComplete;for(Se&&Se(se);Q!==V&&A;){if(se.index+=j,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=j,se.lineText=v.getLine(Q)||"",j>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(B.line=Q,B.ch=se.index,A--)}return se.nextCh||se.curMoveThrough?new De(Q,se.index):B}function Mo(v,A,C,P,B){var j=A.line,V=A.ch,Y=v.getLine(j),Q=C?1:-1,re=P?Ai:Do;if(B&&Y==""){if(j+=Q,Y=v.getLine(j),!a(v,j))return null;V=C?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ve=se,Se=se;V!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(V))){for(ve=V;V!=se&&re[we](Y.charAt(V));)V+=Q;if(Se=V,me=ve!=Se,ve==A.ch&&j==A.line&&Se==ve+Q)continue;return{from:Math.min(ve,Se+1),to:Math.max(ve,Se),line:j}}me||(V+=Q)}if(j+=Q,!a(v,j))return null;Y=v.getLine(j),V=Q>0?0:Y.length}}function yr(v,A,C,P,B,j){var V=Ke(A),Y=[];(P&&!B||!P&&B)&&C++;for(var Q=!P||!B,re=0;re<C;re++){var se=Mo(v,A,P,j,Q);if(!se){var ve=Zt(v,v.lastLine());Y.push(P?{line:v.lastLine(),from:ve,to:ve}:{line:0,from:0,to:0});break}Y.push(se),A=new De(se.line,P?se.to-1:se.from)}var Se=Y.length!=C,me=Y[0],we=Y.pop();return P&&!B?(!Se&&(me.from!=V.ch||me.line!=V.line)&&(we=Y.pop()),new De(we.line,we.from)):P&&B?new De(we.line,we.to-1):!P&&B?(!Se&&(me.to!=V.ch||me.line!=V.line)&&(we=Y.pop()),new De(we.line,we.to)):new De(we.line,we.from)}function Ao(v,A,C,P,B){var j=A,V=new De(j.line+C.repeat-1,1/0),Y=v.clipPos(V);return Y.ch--,B||(P.lastHPos=1/0,P.lastHSPos=v.charCoords(Y,"div").left),V}function Jo(v,A,C,P,B){for(var j=B||v.getCursor(),V=j.ch,Y,Q=0;Q<A;Q++){var re=v.getLine(j.line);if(Y=Rl(V,re,P,C),Y==-1)return null;V=Y}return new De(v.getCursor().line,Y)}function El(v,A){var C=v.getCursor().line;return ue(v,new De(C,A-1))}function di(v,A,C,P){!S(C,wo)&&!Vt.test(C)||(A.marks[C]&&A.marks[C].clear(),A.marks[C]=v.setBookmark(P))}function Rl(v,A,C,P,B){var j;return P?(j=A.indexOf(C,v+1),j!=-1):(j=A.lastIndexOf(C,v-1),j!=-1),j}function zs(v,A,C,P,B){function j(He){return!/\S/.test(v.getLine(He))}function V(He,st,Ye){return Ye?j(He)!=j(He+st):!j(He)&&j(He+st)}function Y(He){P=P>0?1:-1;var st=v.ace.session.getFoldLine(He);st&&He+P>st.start.row&&He+P<st.end.row&&(P=(P>0?st.end.row:st.start.row)-He)}var Q=A.line,re=v.firstLine(),se=v.lastLine(),ve,Se,me=Q;if(P){for(;re<=me&&me<=se&&C>0;)Y(me),V(me,P)&&C--,me+=P;return new De(me,0)}var we=v.state.vim;if(we.visualLine&&V(Q,1,!0)){var Ne=we.sel.anchor;V(Ne.line,-1,!0)&&(!B||Ne.line!=Q)&&(Q+=1)}var Ie=j(Q);for(me=Q;me<=se&&C;me++)V(me,1,!0)&&(!B||j(me)!=Ie)&&C--;for(Se=new De(me,0),me>se&&!Ie?Ie=!0:B=!1,me=Q;me>re&&!((!B||j(me)==Ie||me==Q)&&V(me,-1,!0));me--);return ve=new De(me,0),{start:ve,end:Se}}function Ta(v,A,C,P,B){function j(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function V(re,se,ve,Se){var me=re.getLine(se),we={line:me,ln:se,pos:ve,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Ne=we.pos;for(j(we);we.line!==null;){if(Ne=we.pos,b(we.line[we.pos])){if(!B)return{ln:we.ln,pos:we.pos+1};for(j(we);we.line!==null&&m(we.line[we.pos]);)Ne=we.pos,j(we);return{ln:we.ln,pos:Ne+1}}j(we)}return{ln:we.ln,pos:Ne+1}}function Y(re,se,ve,Se){var me=re.getLine(se),we={line:me,ln:se,pos:ve,dir:Se};if(we.line==="")return{ln:we.ln,pos:we.pos};var Ne=we.pos;for(j(we);we.line!==null;){if(!m(we.line[we.pos])&&!b(we.line[we.pos]))Ne=we.pos;else if(b(we.line[we.pos]))return B?m(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Ne}:{ln:we.ln,pos:Ne};j(we)}return we.line=me,B&&m(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Ne}}for(var Q={ln:A.line,pos:A.ch};C>0;)P<0?Q=Y(v,Q.ln,Q.pos,P):Q=V(v,Q.ln,Q.pos,P),C--;return new De(Q.ln,Q.pos)}function Xi(v,A,C,P){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function j(Q,re,se,ve){var Ie=Q.getLine(re),Se=Ie==="",me={line:Ie,ln:re,pos:se,dir:ve},we={ln:me.ln,pos:me.pos},Ne=me.line==="";for(B(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Ne)return{ln:me.ln,pos:me.pos};if(Se&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};b(me.line[me.pos])&&!Se&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(Se=!0),B(Q,me)}var Ie=Q.getLine(we.ln);we.pos=0;for(var He=Ie.length-1;He>=0;--He)if(!m(Ie[He])){we.pos=He;break}return we}function V(Q,re,se,ve){var Ne=Q.getLine(re),Se={line:Ne,ln:re,pos:se,dir:ve},me={ln:Se.ln,pos:null},we=Se.line==="";for(B(Q,Se);Se.line!==null;){if(Se.line===""&&!we)return me.pos!==null?me:{ln:Se.ln,pos:Se.pos};if(!(!b(Se.line[Se.pos])||me.pos===null||Se.ln===me.ln&&Se.pos+1===me.pos))return me;Se.line!==""&&!m(Se.line[Se.pos])&&(we=!1,me={ln:Se.ln,pos:Se.pos}),B(Q,Se)}var Ne=Q.getLine(me.ln);me.pos=0;for(var Ie=0;Ie<Ne.length;++Ie)if(!m(Ne[Ie])){me.pos=Ie;break}return me}for(var Y={ln:A.line,pos:A.ch};C>0;)P<0?Y=V(v,Y.ln,Y.pos,P):Y=j(v,Y.ln,Y.pos,P),C--;return new De(Y.ln,Y.pos)}function jn(v,A,C,P){var B=A,j,V,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[C],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[C],re=v.getLine(B.line).charAt(B.ch),se=re===Q?1:0;if(j=v.scanForBracket(new De(B.line,B.ch+se),-1,void 0,{bracketRegex:Y}),V=v.scanForBracket(new De(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!j||!V)return null;if(j=j.pos,V=V.pos,j.line==V.line&&j.ch>V.ch||j.line>V.line){var ve=j;j=V,V=ve}return P?V.ch+=1:j.ch+=1,{start:j,end:V}}function Mr(v,A,C,P){var B=Ke(A),j=v.getLine(B.line),V=j.split(""),Y,Q,re,se,ve=V.indexOf(C);if(B.ch<ve)B.ch=ve;else if(ve<B.ch&&V[B.ch]==C){var Se=/string/.test(v.getTokenTypeAt(ge(A,0,1))),me=/string/.test(v.getTokenTypeAt(A)),we=Se&&!me;we||(Q=B.ch,--B.ch)}if(V[B.ch]==C&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)V[re]==C&&(Y=re+1);if(Y&&!Q)for(re=Y,se=V.length;re<se&&!Q;re++)V[re]==C&&(Q=re);return!Y||!Q?{start:B,end:B}:(P&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function Qi(){}function _n(v){var A=v.state.vim;return A.searchState_||(A.searchState_=new Qi)}function Ar(v){return Zi(v,"/")}function fo(v){return Hs(v,"/")}function Zi(v,A){var C=Hs(v,A)||[];if(!C.length)return[];var P=[];if(C[0]===0){for(var B=0;B<C.length;B++)typeof C[B]=="number"&&P.push(v.substring(C[B]+1,C[B+1]));return P}}function Hs(v,A){A||(A="/");for(var C=!1,P=[],B=0;B<v.length;B++){var j=v.charAt(B);!C&&j==A&&P.push(B),C=!C&&j=="\\"}return P}function Ea(v){for(var A="|(){",C="}",P=!1,B=[],j=-1;j<v.length;j++){var V=v.charAt(j)||"",Y=v.charAt(j+1)||"",Q=Y&&A.indexOf(Y)!=-1;P?((V!=="\\"||!Q)&&B.push(V),P=!1):V==="\\"?(P=!0,Y&&C.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(V)):(B.push(V),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Ll(v){for(var A=!1,C=[],P=-1;P<v.length;P++){var B=v.charAt(P)||"",j=v.charAt(P+1)||"";Ri[B+j]?(C.push(Ri[B+j]),P++):A?(C.push(B),A=!1):B==="\\"?(A=!0,o(j)||j==="$"?C.push("$"):j!=="/"&&j!=="\\"&&C.push("\\")):(B==="$"&&C.push("$"),C.push(B),j==="/"&&C.push("\\"))}return C.join("")}function Ol(v){for(var A=new Be.StringStream(v),C=[];!A.eol();){for(;A.peek()&&A.peek()!="\\";)C.push(A.next());var P=!1;for(var B in dr)if(A.match(B,!0)){P=!0,C.push(dr[B]);break}P||C.push(A.next())}return C.join("")}function Ji(v,A,C){var P=We.registerController.getRegister("/");if(P.setText(v),v instanceof RegExp)return v;var B=fo(v),j,V;if(!B.length)j=v;else{j=v.substring(0,B[0]);var Y=v.substring(B[0]);V=Y.indexOf("i")!=-1}if(!j)return null;k("pcre")||(j=Ea(j)),C&&(A=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,A||V?"im":"m");return Q}function pi(v){typeof v=="string"&&(v=document.createElement(v));for(var A,C=1;C<arguments.length;C++)if(A=arguments[C])if(typeof A!="object"&&(A=document.createTextNode(A)),A.nodeType)v.appendChild(A);else for(var P in A)Object.prototype.hasOwnProperty.call(A,P)&&(P[0]==="$"?v.style[P.slice(1)]=A[P]:v.setAttribute(P,A[P]));return v}function Pt(v,A){var C=pi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},A);v.openNotification?v.openNotification(C,{bottom:!0,duration:5e3}):alert(C.innerText)}function Ra(v,A){return pi("div",{$display:"flex"},pi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},v,pi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),A&&pi("span",{$color:"#888"},A))}function Tr(v,A){if(jr.length){A.value||(A.value=""),mn=A;return}var C=Ra(A.prefix,A.desc);if(v.openDialog)v.openDialog(C,A.onClose,{onKeyDown:A.onKeyDown,onKeyUp:A.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:A.value});else{var P="";typeof A.prefix!="string"&&A.prefix&&(P+=A.prefix.textContent),A.desc&&(P+=" "+A.desc),A.onClose(prompt(P,""))}}function Wn(v,A){if(v instanceof RegExp&&A instanceof RegExp){for(var C=["global","multiline","ignoreCase","source"],P=0;P<C.length;P++){var B=C[P];if(v[B]!==A[B])return!1}return!0}return!1}function hn(v,A,C,P){if(A){var B=_n(v),j=Ji(A,!!C,!!P);if(j)return Ci(v,j),Wn(j,B.getQuery())||B.setQuery(j),j}}function An(v){if(v.source.charAt(0)=="^")var A=!0;return{token:function(C){if(A&&!C.sol()){C.skipToEnd();return}var P=C.match(v,!1);if(P)return P[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!v.exec(C.next()+P[0]))?(C.next(),null):(C.match(v),"searching");for(;!C.eol()&&(C.next(),!C.match(v,!1)););},query:v}}function Ci(v,A){clearTimeout(pr);var C=_n(v);C.highlightTimeout=pr,pr=setTimeout(function(){if(v.state.vim){var P=_n(v);P.highlightTimeout=null;var B=P.getOverlay();(!B||A!=B.query)&&(B&&v.removeOverlay(B),B=An(A),v.addOverlay(B),v.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(v.showMatchesOnScrollbar(A))),P.setOverlay(B))}},50)}function Er(v,A,C,P){return P===void 0&&(P=1),v.operation(function(){for(var B=v.getCursor(),j=v.getSearchCursor(C,B),V=0;V<P;V++){var Y=j.find(A);if(V==0&&Y&&dt(j.from(),B)){var Q=A?j.from():j.to();Y=j.find(A),Y&&!Y[0]&&dt(j.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=j.find(A))}if(!Y&&(j=v.getSearchCursor(C,A?new De(v.lastLine()):new De(v.firstLine(),0)),!j.find(A)))return}return j.from()})}function $i(v,A,C,P,B){return P===void 0&&(P=1),v.operation(function(){var j=v.getCursor(),V=v.getSearchCursor(C,j),Y=V.find(!A);!B.visualMode&&Y&&dt(V.from(),j)&&V.find(!A);for(var Q=0;Q<P;Q++)if(Y=V.find(A),!Y&&(V=v.getSearchCursor(C,A?new De(v.lastLine()):new De(v.firstLine(),0)),!V.find(A)))return;return[V.from(),V.to()]})}function es(v){var A=_n(v);A.highlightTimeout&&(clearTimeout(A.highlightTimeout),A.highlightTimeout=null),v.removeOverlay(_n(v).getOverlay()),A.setOverlay(null),A.getScrollbarAnnotate()&&(A.getScrollbarAnnotate().clear(),A.setScrollbarAnnotate(null))}function Us(v,A,C){return typeof v!="number"&&(v=v.line),A instanceof Array?S(v,A):typeof C=="number"?v>=A&&v<=C:v==A}function go(v){var A=v.ace.renderer;return{top:A.getFirstFullyVisibleRow(),bottom:A.getLastFullyVisibleRow()}}function ti(v,A,C){if(C=="'"||C=="`")return We.jumpList.find(v,-1)||new De(0,0);if(C==".")return To(v);var P=A.marks[C];return P&&P.find()}function To(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var A=v.doc.history.done,C=A.length;C--;)if(A[C].changes)return Ke(A[C].changes[0].to)}function ts(v,A,C,P,B,j,V,Y,Q){function re(){v.operation(function(){for(;!Ne;)se(),Se();me()})}function se(){var Ye=v.getRange(j.from(),j.to()),Je=Ye.replace(V,Y),pn=j.to().line;j.replace(Je),He=j.to().line,B+=He-pn,st=He<pn}function ve(){var Ye=Ie&&Ke(j.to()),Je=j.findNext();return Je&&!Je[0]&&Ye&&dt(j.from(),Ye)&&(Je=j.findNext()),Je}function Se(){for(;ve()&&Us(j.from(),P,B);)if(!(!C&&j.from().line==He&&!st)){v.scrollIntoView(j.from(),30),v.setSelection(j.from(),j.to()),Ie=j.from(),Ne=!1;return}Ne=!0}function me(Ye){if(Ye&&Ye(),v.focus(),Ie){v.setCursor(Ie);var Je=v.state.vim;Je.exMode=!1,Je.lastHPos=Je.lastHSPos=Ie.ch}Q&&Q()}function we(Ye,Je,pn){Be.e_stop(Ye);var lt=W(Ye);switch(lt){case"y":se(),Se();break;case"n":Se();break;case"a":var vn=Q;Q=void 0,v.operation(re),Q=vn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(pn)}return Ne&&me(pn),!0}v.state.vim.exMode=!0;var Ne=!1,Ie,He,st;if(Se(),Ne){Pt(v,"No matches for "+V.source);return}if(!A){re(),Q&&Q();return}Tr(v,{prefix:pi("span","replace with ",pi("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function ni(v,A){var C=v.state.vim,P=We.macroModeState,B=We.registerController.getRegister("."),j=P.isPlaying,V=P.lastInsertModeChanges;j||(v.off("change",Eo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=null,Be.off(v.getInputField(),"keydown",Gs)),!j&&C.insertModeRepeat>1&&(La(v,C,C.insertModeRepeat-1,!0),C.lastEditInputState.repeatOverride=C.insertModeRepeat),delete C.insertModeRepeat,C.insertMode=!1,A||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),B.setText(V.changes.join("")),Be.signal(v,"vim-mode-change",{mode:"normal"}),P.isRecording&&sr(P)}function ns(v){Cn.unshift(v)}function qs(v,A,C,P,B){var j={keys:v,type:A};j[A]=C,j[A+"Args"]=P;for(var V in B)j[V]=B[V];ns(j)}function Vs(v,A,C,P){var B=We.registerController.getRegister(P);if(P==":"){B.keyBuffer[0]&&wr.processCommand(v,B.keyBuffer[0]),C.isPlaying=!1;return}var j=B.keyBuffer,V=0;C.isPlaying=!0,C.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<j.length;Y++)for(var Q=j[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),mt.handleKey(v,se,"macro"),A.insertMode){var ve=B.insertModeChanges[V++].changes;We.macroModeState.lastInsertModeChanges.changes=ve,as(v,ve,1),ni(v)}C.isPlaying=!1}function rs(v,A){if(!v.isPlaying){var C=v.latestRegister,P=We.registerController.getRegister(C);P&&P.pushText(A)}}function sr(v){if(!v.isPlaying){var A=v.latestRegister,C=We.registerController.getRegister(A);C&&C.pushInsertModeChanges&&C.pushInsertModeChanges(v.lastInsertModeChanges)}}function Ks(v,A){if(!v.isPlaying){var C=v.latestRegister,P=We.registerController.getRegister(C);P&&P.pushSearchQuery&&P.pushSearchQuery(A)}}function Eo(v,A){var C=We.macroModeState,P=C.lastInsertModeChanges;if(!C.isPlaying)for(var B=v.state.vim;A;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(A.origin=="+input"||A.origin=="paste"||A.origin===void 0){var j=v.listSelections().length;j>1&&(P.ignoreCount=j);var V=A.text.join(`
|
1411
|
+
`);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),V)if(v.state.overwrite&&!/\n/.test(V))P.changes.push([V]);else{if(V.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=v.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<V.length&&(P.changes.push([V,re]),V="")}}V&&P.changes.push(V)}}A=A.next}}function is(v){var A=v.state.vim;if(A.insertMode){var C=We.macroModeState;if(C.isPlaying)return;var P=C.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,A.insertEnd&&A.insertEnd.clear(),A.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||os(v,A)}function os(v,A,C){var P=v.getCursor("anchor"),B=v.getCursor("head");if(A.visualMode&&!v.somethingSelected()?kn(v,!1):!A.visualMode&&!A.insertMode&&v.somethingSelected()&&(A.visualMode=!0,A.visualLine=!1,Be.signal(v,"vim-mode-change",{mode:"visual"})),A.visualMode){var j=rt(B,P)?0:-1,V=rt(B,P)?-1:0;B=ge(B,0,j),P=ge(P,0,V),A.sel={anchor:P,head:B},di(v,A,"<",gt(B,P)),di(v,A,">",tn(B,P))}else!A.insertMode&&!C&&(A.lastHPos=v.getCursor().ch)}function mo(v,A){this.keyName=v,this.key=A.key,this.ctrlKey=A.ctrlKey,this.altKey=A.altKey,this.metaKey=A.metaKey,this.shiftKey=A.shiftKey}function Gs(v){var A=We.macroModeState,C=A.lastInsertModeChanges,P=Be.keyName?Be.keyName(v):v.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(C.maybeReset&&(C.changes=[],C.maybeReset=!1),C.changes.push(new mo(P,v)))}function La(v,A,C,P){function B(){Y?En.processAction(v,A,A.lastEditActionCommand):En.evalInput(v,A)}function j(se){if(V.lastInsertModeChanges.changes.length>0){se=A.lastEditActionCommand?se:1;var ve=V.lastInsertModeChanges;as(v,ve.changes,se)}}var V=We.macroModeState;V.isPlaying=!0;var Y=!!A.lastEditActionCommand,Q=A.inputState;if(A.inputState=A.lastEditInputState,Y&&A.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<C;re++)B(),j(1);else P||B(),j(C);A.inputState=Q,A.insertMode&&!P&&ni(v),V.isPlaying=!1}function ss(v,A){Be.lookupKey(A,"vim-insert",function(C){return typeof C=="string"?Be.commands[C](v):C(v),!0})}function as(v,A,C){var P=v.getCursor("head"),B=We.macroModeState.lastInsertModeChanges.visualBlock;B&&(Fr(v,P,B+1),C=v.listSelections().length,v.setCursor(P));for(var j=0;j<C;j++){B&&v.setCursor(ge(P,j,0));for(var V=0;V<A.length;V++){var Y=A[V];if(Y instanceof mo)ss(v,Y.keyName);else if(typeof Y=="string")v.replaceSelection(Y);else{var Q=v.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));v.replaceRange(Y[0],Q,Y[1]?Q:re),v.setCursor(re)}}}B&&v.setCursor(ge(P,0,1))}function Ys(v,A,C,P){A.length>1&&A[0]=="n"&&(A=A.replace("numpad","")),A=Rr[A]||A;var B="";if(C.ctrlKey&&(B+="C-"),C.altKey&&(B+="A-"),(B||A.length>1)&&C.shiftKey&&(B+="S-"),P&&!P.expectLiteralNext&&A.length==1){if(zn.keymap&&A in zn.keymap)(zn.remapCtrl!==!1||!B)&&(A=zn.keymap[A]);else if(A.charCodeAt(0)>255){var j=C.code&&C.code.slice(-1)||"";C.shiftKey||(j=j.toLowerCase()),j&&(A=j)}}return B+=A,B.length>1&&(B="<"+B+">"),B}function ls(v){var A=new v.constructor;return Object.keys(v).forEach(function(C){if(C!="insertEnd"){var P=v[C];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ls(P)),A[C]=P}}),v.sel&&(A.sel={head:v.sel.head&&Ke(v.sel.head),anchor:v.sel.anchor&&Ke(v.sel.anchor)}),A}function Ro(v,A,C){var P=!1,B=mt.maybeInitVimState_(v),j=B.visualBlock||B.wasInVisualBlock,V=v.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!V?B.wasInVisualBlock=!1:V&&B.visualBlock&&(B.wasInVisualBlock=!0),A=="<Esc>"&&!B.insertMode&&!B.visualMode&&V)v.ace.exitMultiSelectMode();else if(j||!V||v.ace.inVirtualSelectionMode)P=mt.handleKey(v,A,C);else{var Y=ls(B),Q=B.inputState.changeQueueList||[];v.operation(function(){v.curOp.isVimOp=!0;var re=0;v.ace.forEachSelection(function(){var se=v.ace.selection;v.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,v.state.vim.inputState.changeQueue=Q[re];var ve=v.getCursor("head"),Se=v.getCursor("anchor"),me=rt(ve,Se)?0:-1,we=rt(ve,Se)?-1:0;ve=ge(ve,0,me),Se=ge(Se,0,we),v.state.vim.sel.head=ve,v.state.vim.sel.anchor=Se,P=yi(v,A,C),se.$desiredColumn=v.state.vim.lastHPos==-1?null:v.state.vim.lastHPos,v.ace.inVirtualSelectionMode&&(Q[re]=v.state.vim.inputState.changeQueue),v.virtualSelectionMode()&&(v.state.vim=ls(Y)),re++}),v.curOp.cursorActivity&&!P&&(v.curOp.cursorActivity=!1),B.status=v.state.vim.status,v.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return P&&!B.visualMode&&!B.insert&&B.visualMode!=v.somethingSelected()&&os(v,B,!0),P}function Mi(v,A){A.off("beforeEndOperation",Mi);var C=A.state.cm.vimCmd;C&&A.execCommand(C.exec?C:C.name,C.args),A.curOp=A.prevOp}var ar=n("../range").Range,yo=n("../lib/event_emitter").EventEmitter,eo=n("../lib/dom"),Oa=n("../lib/oop"),Il=n("../lib/keys"),Lo=n("../lib/event"),to=n("../search").Search,Oo=n("../lib/useragent"),cs=n("../search_highlight").SearchHighlight,Io=n("../commands/multi_select_commands"),Ia=n("../mode/text").Mode.prototype.tokenRe,vo=n("../ext/hardwrap").hardWrap;n("../multi_select");var Be=function(v){this.ace=v,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(v,A){if(!(this instanceof De))return new De(v,A);this.line=v,this.ch=A},Be.defineOption=function(v,A,C){},Be.commands={redo:function(v){v.ace.redo()},undo:function(v){v.ace.undo()},newlineAndIndent:function(v){v.ace.insert(`
|
1412
|
+
`)},goLineLeft:function(v){v.ace.selection.moveCursorLineStart()},goLineRight:function(v){v.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=Lo.stopEvent,Be.keyName=function(v){var A=Il[v.keyCode]||v.key||"";return A.length==1&&(A=A.toUpperCase()),A=Lo.getModifierString(v).replace(/(^|-)\w/g,function(C){return C.toUpperCase()})+A,A},Be.keyMap.default=function(v){return function(A){var C=A.ace.commands.commandKeyBinding[v.toLowerCase()];return C&&A.ace.execCommand(C)!==!1}},Be.lookupKey=function v(A,C,P){C||(C="default"),typeof C=="string"&&(C=Be.keyMap[C]||Be.keyMap.default);var B=typeof C=="function"?C(A):C[A];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&P(B))return"handled";if(C.fallthrough){if(!Array.isArray(C.fallthrough))return v(A,C.fallthrough,P);for(var j=0;j<C.fallthrough.length;j++){var V=v(A,C.fallthrough[j],P);if(V)return V}}},Be.findMatchingTag=function(v,A){return v.findMatchingTag(A)},Be.findEnclosingTag=function(v,A){},Be.signal=function(v,A,C){return v._signal(A,C)},Be.on=Lo.addListener,Be.off=Lo.removeListener,Be.isWordChar=function(v){return v<""?/^\w$/.test(v):(Ia.lastIndex=0,Ia.test(v))},(function(){Oa.implement(Be.prototype,yo),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(C){this.$lineHandleChanges&&this.$lineHandleChanges.push(C);var P={text:C.action[0]=="i"?C.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=P:B.lastChange=B.change=P,this.$updateMarkers(C)},this.onSelectionChange=function(){var C=this.curOp=this.curOp||{};C.cursorActivityHandlers||(C.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Io.keyboardHandler)},this.operation=function(C,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return C();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var V=C();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&B&&(this.ace.prevOp=B)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),V},this.onBeforeEndOperation=function(){var C=this.curOp;C&&(C.change&&this.signal("change",C.change,C),C&&C.cursorActivity&&this.signal("cursorActivity",null,C),this.curOp=null)},this.signal=function(C,P,B){var j=B?B[C+"Handlers"]:(this._eventRegistry||{})[C];if(j){j=j.slice();for(var V=0;V<j.length;V++)j[V](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(C,P){typeof C=="object"&&(P=C.ch,C=C.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:C,column:P}),this.ace.selection.moveTo(C,P),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(C){var P=this.ace.selection,B=C=="anchor"?P.isEmpty()?P.lead:P.anchor:C=="head"||!C?P.lead:P.getRange()[C];return f(B)},this.listSelections=function(C){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(B){return{anchor:this.clipPos(f(B.cursor==B.end?B.start:B.end)),head:this.clipPos(f(B.cursor))}},this)},this.setSelections=function(C,P){var B=this.ace.multiSelect,j=C.map(function(re){var se=d(re.anchor),ve=d(re.head),Se=ar.comparePoints(se,ve)<0?new ar.fromPoints(se,ve):new ar.fromPoints(ve,se);return Se.cursor=ar.comparePoints(Se.start,ve)?Se.end:Se.start,Se});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(j[0]);return}P?j[P]&&j.push(j.splice(P,1)[0]):j=j.reverse(),B.toSingleRange(j[0].clone());for(var V=this.ace.session,Y=0;Y<j.length;Y++){var Q=V.$clipRangeToDocument(j[Y]);B.addRange(Q)}},this.setSelection=function(C,P,B){var j=this.ace.selection;j.moveTo(C.line,C.ch),j.selectTo(P.line,P.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(C){return!this.ace.selection.isEmpty()},this.clipPos=function(C){var P=this.ace.session.$clipPositionToDocument(C.line,C.ch);return f(P)},this.foldCode=function(C){this.ace.session.$toggleFoldWidget(C.line,{})},this.markText=function(C){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(C){var P=C.action=="insert",B=C.start,j=C.end,V=(j.row-B.row)*(P?1:-1),Y=(j.column-B.column)*(P?1:-1);P&&(j=B);for(var Q in this.marks){var re=this.marks[Q],se=ar.comparePoints(re,B);if(!(se<0)){if(se===0&&P)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ve=P?se:ar.comparePoints(re,j);if(ve>0){re.row+=V,re.column+=re.row==j.row?Y:0;continue}!P&&ve<=0&&(re.row=B.row,re.column=B.column,ve===0&&(re.bias=1))}}};var v=function(C,P,B,j){this.cm=C,this.id=P,this.row=B,this.column=j,C.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return f(this)},this.setBookmark=function(C,P){var B=new v(this,this.$uid++,C.line,C.ch);return(!P||!P.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(C,P){if(P=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,C)}},this.findPosV=function(C,P,B,j){if(B=="page"){var V=this.ace.renderer,Y=V.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(C.line,C.ch);j!=null&&(Q.column=j),Q.row+=P,Q.row=Math.min(Math.max(0,Q.row),this.ace.session.getScreenLength()-1);var re=this.ace.session.screenToDocumentPosition(Q.row,Q.column);return f(re)}debugger},this.charCoords=function(C,P){if(P=="div"||!P){var B=this.ace.session.documentToScreenPosition(C.line,C.ch);return{left:B.column,top:B.row}}if(P=="local"){var j=this.ace.renderer,B=this.ace.session.documentToScreenPosition(C.line,C.ch),V=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,Q=V*B.row;return{left:B.column*Y,top:Q,bottom:Q+V}}},this.coordsChar=function(C,P){var B=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(C.top/B.lineHeight)),V=Math.max(0,Math.floor(C.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(j,V);return f(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(C,P,B){var j=!1,V=!1;C instanceof RegExp&&!C.global&&(j=!C.ignoreCase,C=C.source,V=!0),C=="\\n"&&(C=`
|
1413
|
+
`,V=!1);var Y=new to;P.ch==null&&(P.ch=Number.MAX_VALUE);var Q={row:P.line,column:P.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ve){Y.setOptions({needle:C,caseSensitive:j,wrap:!1,backwards:ve,regExp:V,start:se||Q});var Se=Y.find(re.ace.session);return se=Se,se&&[!se.isEmpty()]},from:function(){return se&&f(se.start)},to:function(){return se&&f(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(C,P){var B=this.ace.renderer,j=B.layerConfig,V=j.maxHeight;V-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,V))),C!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(C,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(C,P){if(C){var B=this.ace.renderer,j={top:0,bottom:P};B.scrollCursorIntoView(d(C),B.lineHeight*2/B.$size.scrollerHeight,j)}},this.getLine=function(C){return this.ace.session.getLine(C)},this.getRange=function(C,P){return this.ace.session.getTextRange(new ar(C.line,C.ch,P.line,P.ch))},this.replaceRange=function(C,P,B){B||(B=P);var j=new ar(P.line,P.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(j),this.ace.session.replace(j,C)},this.replaceSelection=this.replaceSelections=function(C){var P=Array.isArray(C)&&C,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),P?C[0]||"":C);return}B.inVirtualSelectionMode=!0;var j=B.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var V=j.length;V--;)this.ace.session.replace(j[V],P?C[V]||"":C);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(C){return this.getRange(C.anchor,C.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var A={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(C,P){switch(this.state[C]=P,C){case"indentWithTabs":C=A[C],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:C=A[C]}C&&this.ace.setOption(C,P)},this.getOption=function(C){var P,B=A[C];switch(B&&(P=this.ace.getOption(B)),C){case"indentWithTabs":return C=A[C],!P;case"keyMap":return this.state.$keyMap||"vim"}return B?P:this.state[C]},this.toggleOverwrite=function(C){return this.state.overwrite=C,this.ace.setOverwrite(C)},this.addOverlay=function(C){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new cs(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(P);P.id=B.id,P.session=this.ace.session,P.destroy=function(V){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(V){var Y=V.start.row;Y==V.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(C.query.source,"gmi");this.$searchHighlight=C.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(C){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var C=this.ace.renderer,P=C.layerConfig;return{left:C.scrollLeft,top:C.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(C){return this.ace.setValue(C,-1)},this.getTokenTypeAt=function(C){var P=this.ace.session.getTokenAt(C.line,C.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(C){var P=this.ace.session.findMatchingBracket(d(C));return{to:P&&f(P)}},this.findMatchingTag=function(C){var P=this.ace.session.getMatchingTags(d(C));if(P)return{open:{from:f(P.openTag.start),to:f(P.openTag.end)},close:{from:f(P.closeTag.start),to:f(P.closeTag.end)}}},this.indentLine=function(C,P){P===!0?this.ace.session.indentRows(C,C," "):P===!1&&this.ace.session.outdentRows(new ar(C,0,C,0))},this.indexFromPos=function(C){return this.ace.session.doc.positionToIndex(d(C))},this.posFromIndex=function(C){return f(this.ace.session.doc.indexToPosition(C))},this.focus=function(C){return this.ace.textInput.focus()},this.blur=function(C){return this.ace.blur()},this.defaultTextHeight=function(C){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(C,P,B,j){var V=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var Q=this.ace.session.$findClosingBracket(V.slice(1,2),d(C),Y);else{var Q=this.ace.session.$findOpeningBracket(V.slice(-2,-1),{row:C.line,column:C.ch+1},Y);!Q&&j.bracketRegex&&j.bracketRegex.test(this.getLine(C.line)[C.ch-1])&&(Q={row:C.line,column:C.ch-1})}return Q&&{pos:f(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(C){if(Be.commands.hasOwnProperty(C))return Be.commands[C](this);if(C=="indentAuto")return this.ace.execCommand("autoindent");console.log(C+" is not implemented")},this.getLineNumber=function(C){var P=this.$lineHandleChanges;if(!P)return null;for(var B=C.row,j=0;j<P.length;j++){var V=P[j];if(V.start.row!=V.end.row){if(V.action[0]=="i")V.start.row<B&&(B+=V.end.row-V.start.row);else if(V.start.row<B){if(B<V.end.row||B==V.end.row&&V.start.column>0)return null;B-=V.end.row-V.start.row}}}return B},this.getLineHandle=function(C){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(C),row:C}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var C=this.ace.session.$undoManager;if(C&&C.$lastDelta)return f(C.$lastDelta.end)}}).call(Be.prototype);var Na=Be.StringStream=function(v,A){this.pos=this.start=0,this.string=v,this.tabSize=A||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Na.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(v){var A=this.string.charAt(this.pos);if(typeof v=="string")var C=A==v;else var C=A&&(v.test?v.test(A):v(A));if(C)return++this.pos,A},eatWhile:function(v){for(var A=this.pos;this.eat(v););return this.pos>A},eatSpace:function(){for(var v=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>v},skipToEnd:function(){this.pos=this.string.length},skipTo:function(v){var A=this.string.indexOf(v,this.pos);if(A>-1)return this.pos=A,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,A,C){if(typeof v!="string"){var P=this.string.slice(this.pos).match(v);return P&&P.index>0?null:(P&&A!==!1&&(this.pos+=P[0].length),P)}var B=function(V){return C?V.toLowerCase():V},j=this.string.substr(this.pos,v.length);if(B(j)==B(v))return A!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,A){this.lineStart+=v;try{return A()}finally{this.lineStart-=v}}},Be.defineExtension=function(v,A){Be.prototype[v]=A},eo.importCssString(`.normal-mode .ace_cursor{
|
1414
|
+
border: none;
|
1415
|
+
background-color: rgba(255,0,0,0.5);
|
1416
|
+
}
|
1417
|
+
.normal-mode .ace_hidden-cursors .ace_cursor{
|
1418
|
+
background-color: transparent;
|
1419
|
+
border: 1px solid red;
|
1420
|
+
opacity: 0.7
|
1421
|
+
}
|
1422
|
+
.ace_dialog {
|
1423
|
+
position: absolute;
|
1424
|
+
left: 0; right: 0;
|
1425
|
+
background: inherit;
|
1426
|
+
z-index: 15;
|
1427
|
+
padding: .1em .8em;
|
1428
|
+
overflow: hidden;
|
1429
|
+
color: inherit;
|
1430
|
+
}
|
1431
|
+
.ace_dialog-top {
|
1432
|
+
border-bottom: 1px solid #444;
|
1433
|
+
top: 0;
|
1434
|
+
}
|
1435
|
+
.ace_dialog-bottom {
|
1436
|
+
border-top: 1px solid #444;
|
1437
|
+
bottom: 0;
|
1438
|
+
}
|
1439
|
+
.ace_dialog input {
|
1440
|
+
border: none;
|
1441
|
+
outline: none;
|
1442
|
+
background: transparent;
|
1443
|
+
width: 20em;
|
1444
|
+
color: inherit;
|
1445
|
+
font-family: monospace;
|
1446
|
+
}`,"vimMode",!1),(function(){function v(C,P,B){var j=C.ace.container,V;return V=j.appendChild(document.createElement("div")),B?V.className="ace_dialog ace_dialog-bottom":V.className="ace_dialog ace_dialog-top",typeof P=="string"?V.innerHTML=P:V.appendChild(P),V}function A(C,P){C.state.currentNotificationClose&&C.state.currentNotificationClose(),C.state.currentNotificationClose=P}Be.defineExtension("openDialog",function(C,P,B){function j(ve){if(typeof ve=="string")re.value=ve;else{if(Y||ve&&ve.type=="blur"&&document.activeElement===re)return;Q.state.dialog==V&&(Q.state.dialog=null,Q.focus()),Y=!0,V.remove(),B.onClose&&B.onClose(V);var Se=Q;Se.state.vim&&(Se.state.vim.status=null,Se.ace._signal("changeStatus"),Se.ace.renderer.$loop.schedule(Se.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),A(this,null);var V=v(this,C,B.bottom),Y=!1,Q=this;this.state.dialog=V;var re=V.getElementsByTagName("input")[0],se;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&Be.on(re,"input",function(ve){B.onInput(ve,re.value,j)}),B.onKeyUp&&Be.on(re,"keyup",function(ve){B.onKeyUp(ve,re.value,j)}),Be.on(re,"keydown",function(ve){B&&B.onKeyDown&&B.onKeyDown(ve,re.value,j)||(ve.keyCode==13&&P(re.value),(ve.keyCode==27||B.closeOnEnter!==!1&&ve.keyCode==13)&&(Be.e_stop(ve),j()))}),B.closeOnBlur!==!1&&Be.on(re,"blur",j),re.focus()):(se=V.getElementsByTagName("button")[0])&&(Be.on(se,"click",function(){j(),Q.focus()}),B.closeOnBlur!==!1&&Be.on(se,"blur",j),se.focus()),j}}),Be.defineExtension("openNotification",function(C,P){function B(){V||(V=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){A(this,B);var j=v(this,C,P&&P.bottom),V=!1,Y,Q=P&&typeof P.duration<"u"?P.duration:5e3;return Be.on(j,"click",function(re){Be.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})})();var De=Be.Pos,Cn=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"g<Up>",type:"keyToKey",toKeys:"gk"},{keys:"g<Down>",type:"keyToKey",toKeys:"gj"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h"},{keys:"<Del>",type:"keyToKey",toKeys:"x"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<register>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"gq",type:"operator",operator:"hardWrap"},{keys:"gw",type:"operator",operator:"hardWrap",operatorArgs:{keepCursor:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-u>",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<register>",type:"action",action:"replayMacro"},{keys:"q<register>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<register>",type:"action",action:"setMark"},{keys:'"<register>',type:"action",action:"setRegister"},{keys:"<C-r><register>",type:"action",action:"insertRegister",context:"insert",isEdit:!0},{keys:"<C-o>",type:"action",action:"oneNormalCommand",context:"insert"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<register>",type:"motion",motion:"textObjectManipulation"},{keys:"i<register>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],No=Cn.length,fi=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"omap",shortName:"om"},{name:"noremap",shortName:"no"},{name:"nnoremap",shortName:"nn"},{name:"vnoremap",shortName:"vn"},{name:"inoremap",shortName:"ino"},{name:"onoremap",shortName:"ono"},{name:"unmap"},{name:"mapclear",shortName:"mapc"},{name:"nmapclear",shortName:"nmapc"},{name:"vmapclear",shortName:"vmapc"},{name:"imapclear",shortName:"imapc"},{name:"omapclear",shortName:"omapc"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"startinsert",shortName:"start"},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"delete",shortName:"d"},{name:"join",shortName:"j"},{name:"normal",shortName:"norm"},{name:"global",shortName:"g"}],zn=N(""),Da=/[\d]/,Do=[Be.isWordChar,function(v){return v&&!Be.isWordChar(v)&&!/\s/.test(v)}],Ai=[function(v){return/\S/.test(v)}],wo=["<",">"],Yt=["-",'"',".",":","_","/","+"],Vt=/^\w$/,Xt;try{Xt=new RegExp("^[\\p{Lu}]$","u")}catch{Xt=/^[A-Z]$/}var Ft={};E("filetype",void 0,"string",["ft"],function(v,A){if(A!==void 0){if(v===void 0){var C=A.getOption("mode");return C=="null"?"":C}var C=v==""?"null":v;A.setOption("mode",C)}}),E("textwidth",80,"number",["tw"],function(v,A){if(A!==void 0){if(v===void 0){var C=A.getOption("textwidth");return C}var P=Math.round(v);P>1&&A.setOption("textwidth",P)}});var Ti=function(){function v(Q,re,se){function ve(Ne){var Ie=++B%P,He=Y[Ie];He&&He.clear(),Y[Ie]=Q.setBookmark(Ne)}var Se=B%P,me=Y[Se];if(me){var we=me.find();we&&!dt(we,re)&&ve(re)}else ve(re);ve(se),j=B,V=B-P+1,V<0&&(V=0)}function A(Q,re){B+=re,B>j?B=j:B<V&&(B=V);var se=Y[(P+B)%P];if(se&&!se.find()){var ve=re>0?1:-1,Se,me=Q.getCursor();do if(B+=ve,se=Y[(P+B)%P],se&&(Se=se.find())&&!dt(me,Se))break;while(B<j&&B>V)}return se}function C(Q,re){var se=B,ve=A(Q,re);return B=se,ve&&ve.find()}var P=100,B=-1,j=0,V=0,Y=new Array(P);return{cachedCursor:void 0,add:v,find:C,move:A}},Tn=function(v){return v?{changes:v.changes,expectCursorActivityForChange:v.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};x.prototype={exitMacroRecordMode:function(){var v=We.macroModeState;v.onRecordingDone&&v.onRecordingDone(),v.onRecordingDone=void 0,v.isRecording=!1},enterMacroRecordMode:function(v,A){var C=We.registerController.getRegister(A);if(C){if(C.clear(),this.latestRegister=A,v.openDialog){var P=pi("span",{class:"cm-vim-message"},"recording @"+A);this.onRecordingDone=v.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var We,dn,mt={enterVimMode:p,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:I,getVimGlobalState_:function(){return We},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:mo,map:function(v,A,C){wr.map(v,A,C)},unmap:function(v,A){return wr.unmap(v,A)},noremap:function(v,A,C){wr.map(v,A,C,!0)},mapclear:function(v){var A=Cn.length,C=No,P=Cn.slice(0,A-C);if(Cn=Cn.slice(A-C),v)for(var B=P.length-1;B>=0;B--){var j=P[B];if(v!==j.context)if(j.context)this._mapCommand(j);else{var V=["normal","insert","visual"];for(var Y in V)if(V[Y]!==v){var Q={};for(var re in j)Q[re]=j[re];Q.context=V[Y],this._mapCommand(Q)}}}},langmap:F,vimKeyFromEvent:W,setOption:M,getOption:k,defineOption:E,defineEx:function(v,A,C){if(!A)A=v;else if(v.indexOf(A)!==0)throw new Error('(Vim.defineEx) "'+A+'" is not a prefix of "'+v+'", command not registered');Xs[v]=C,wr.commandMap_[A]={name:v,shortName:A,type:"api"}},handleKey:function(v,A,C){var P=this.findKey(v,A,C);if(typeof P=="function")return P()},multiSelectHandleKey:Ro,findKey:function(v,A,C){function P(){var re=We.macroModeState;if(re.isRecording){if(A=="q")return re.exitMacroRecordMode(),_(v),!0;C!="mapping"&&rs(re,A)}}function B(){if(A=="<Esc>"){if(Y.visualMode)kn(v);else{if(!Y.insertMode)return;ni(v)}return _(v),!0}}function j(){if(B())return!0;Y.inputState.keyBuffer.push(A);var re=Y.inputState.keyBuffer.join(""),se=A.length==1,ve=En.matchCommand(re,Cn,Y.inputState,"insert"),Se=Y.inputState.changeQueue;if(ve.type=="none")return _(v),!1;if(ve.type=="partial"){if(ve.expectLiteralNext&&(Y.expectLiteralNext=!0),dn&&window.clearTimeout(dn),dn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&_(v)},k("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!Se||Se.removed.length!=me.length)&&(Se=Y.inputState.changeQueue=new D),Se.inserted+=A;for(var we=0;we<me.length;we++){var Ne=gt(me[we].anchor,me[we].head),Ie=tn(me[we].anchor,me[we].head),He=v.getRange(Ne,v.state.overwrite?ge(Ie,0,1):Ie);Se.removed[we]=(Se.removed[we]||"")+He}}return!se}if(Y.expectLiteralNext=!1,dn&&window.clearTimeout(dn),ve.command&&Se){for(var me=v.listSelections(),we=0;we<me.length;we++){var st=me[we].head;v.replaceRange(Se.removed[we]||"",ge(st,0,-Se.inserted.length),st,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||_(v),ve.command}function V(){if(P()||B())return!0;Y.inputState.keyBuffer.push(A);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return _(v),!1;var ve=Y.visualMode?"visual":"normal",Se=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Se&&(Se=Y.inputState.operatorShortcut);var me=En.matchCommand(Se,Cn,Y.inputState,ve);return me.type=="none"?(_(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(_(v),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=R(v),Q;return Y.insertMode?Q=j():Q=V(),Q===!1?!Y.insertMode&&A.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&v.getOption("readOnly")))return v.operation(function(){v.curOp.isVimOp=!0;try{Q.type=="keyToKey"?L(v,Q.toKeys,Q):En.processCommand(v,Y,Q)}catch(re){throw v.state.vim=void 0,R(v),mt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(v,A){wr.processCommand(v,A)},defineMotion:te,defineAction:le,defineOperator:ne,mapCommand:qs,_mapCommand:ns,defineRegister:U,exitVisualMode:kn,exitInsertMode:ni},jr=[],on=!1,mn,Zn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Wr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},Ei={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Zn)).forEach(function(v){Ei[(Zn[v]||"").toLowerCase()]=Ei[v.toLowerCase()]=v}),E("langmap",void 0,"string",["lmap"],function(v,A){if(v===void 0)return zn.string;F(v)}),$.prototype.pushRepeatDigit=function(v){this.operator?this.motionRepeat=this.motionRepeat.concat(v):this.prefixRepeat=this.prefixRepeat.concat(v)},$.prototype.getRepeat=function(){var v=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(v=1,this.prefixRepeat.length>0&&(v*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(v*=parseInt(this.motionRepeat.join(""),10))),v},z.prototype={setText:function(v,A,C){this.keyBuffer=[v||""],this.linewise=!!A,this.blockwise=!!C},pushText:function(v,A){A&&(this.linewise||this.keyBuffer.push(`
|
1447
|
+
`),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(Tn(v))},pushSearchQuery:function(v){this.searchQueries.push(v)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},G.prototype={pushText:function(v,A,C,P,B){if(v!=="_"){P&&C.charAt(C.length-1)!==`
|
1448
|
+
`&&(C+=`
|
1449
|
+
`);var j=this.isValidRegister(v)?this.getRegister(v):null;if(!j){switch(A){case"yank":this.registers[0]=new z(C,P,B);break;case"delete":case"change":C.indexOf(`
|
1450
|
+
`)==-1?this.registers["-"]=new z(C,P):(this.shiftNumericRegisters_(),this.registers[1]=new z(C,P))}this.unnamedRegister.setText(C,P,B);return}var V=l(v);V?j.pushText(C,P):j.setText(C,P,B),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(C),this.unnamedRegister.setText(j.toString(),P)}},getRegister:function(v){return this.isValidRegister(v)?(v=v.toLowerCase(),this.registers[v]||(this.registers[v]=new z),this.registers[v]):this.unnamedRegister},isValidRegister:function(v){return v&&(S(v,Yt)||Vt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,A){var C=this.historyBuffer,P=A?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var B=this.iterator+P;A?B>=0:B<C.length;B+=P)for(var j=C[B],V=0;V<=j.length;V++)if(this.initialPrefix==j.substring(0,V))return this.iterator=B,j;if(B>=C.length)return this.iterator=C.length,this.initialPrefix;if(B<0)return v},pushInput:function(v){var A=this.historyBuffer.indexOf(v);A>-1&&this.historyBuffer.splice(A,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var En={matchCommand:function(v,A,C,P){var B=Ae(v,A,P,C);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var j,V=0;V<B.full.length;V++){var Y=B.full[V];j||(j=Y)}if(j.keys.slice(-11)=="<character>"||j.keys.slice(-10)=="<register>"){var Q=Re(v);if(!Q||Q.length>1)return{type:"clear"};C.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(v,A,C){switch(A.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(v,A,C);break;case"operator":this.processOperator(v,A,C);break;case"operatorMotion":this.processOperatorMotion(v,A,C);break;case"action":this.processAction(v,A,C);break;case"search":this.processSearch(v,A,C);break;case"ex":case"keyToEx":this.processEx(v,A,C);break}},processMotion:function(v,A,C){A.inputState.motion=C.motion,A.inputState.motionArgs=ce(C.motionArgs),this.evalInput(v,A)},processOperator:function(v,A,C){var P=A.inputState;if(P.operator){if(P.operator==C.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(v,A);return}_(v)}P.operator=C.operator,P.operatorArgs=ce(C.operatorArgs),C.keys.length>1&&(P.operatorShortcut=C.keys),C.exitVisualBlock&&(A.visualBlock=!1,Qn(v)),A.visualMode&&this.evalInput(v,A)},processOperatorMotion:function(v,A,C){var P=A.visualMode,B=ce(C.operatorMotionArgs);B&&P&&B.visualLine&&(A.visualLine=!0),this.processOperator(v,A,C),P||this.processMotion(v,A,C)},processAction:function(v,A,C){var P=A.inputState,B=P.getRepeat(),j=!!B,V=ce(C.actionArgs)||{};P.selectedCharacter&&(V.selectedCharacter=P.selectedCharacter),C.operator&&this.processOperator(v,A,C),C.motion&&this.processMotion(v,A,C),(C.motion||C.operator)&&this.evalInput(v,A),V.repeat=B||1,V.repeatIsExplicit=j,V.registerName=P.registerName,_(v),A.lastMotion=null,C.isEdit&&this.recordLastEdit(A,P,C),Rn[C.action](v,V,A)},processSearch:function(v,A,C){function P(Ie,He,st){We.searchHistoryController.pushInput(Ie),We.searchHistoryController.reset();try{hn(v,Ie,He,st)}catch{Pt(v,"Invalid regex: "+Ie),_(v);return}En.processMotion(v,A,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function B(Ie){P(Ie,!0,!0);var He=We.macroModeState;He.isRecording&&Ks(He,Ie)}function j(Ie,He,st){var Ye=W(Ie),Je,pn;Ye=="<Up>"||Ye=="<Down>"?(Je=Ye=="<Up>",pn=Ie.target?Ie.target.selectionEnd:0,He=We.searchHistoryController.nextMatch(He,Je)||"",st(He),pn&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(pn,Ie.target.value.length))):Ye&&Ye!="<Left>"&&Ye!="<Right>"&&We.searchHistoryController.reset();var lt;try{lt=hn(v,He,!0,!0)}catch{}lt?v.scrollIntoView(Er(v,!Y,lt),30):(es(v),v.scrollTo(ve.left,ve.top))}function V(Ie,He,st){var Ye=W(Ie);Ye=="<Esc>"||Ye=="<C-c>"||Ye=="<C-[>"||Ye=="<BS>"&&He==""?(We.searchHistoryController.pushInput(He),We.searchHistoryController.reset(),hn(v,se),es(v),v.scrollTo(ve.left,ve.top),Be.e_stop(Ie),_(v),st(),v.focus()):Ye=="<Up>"||Ye=="<Down>"?Be.e_stop(Ie):Ye=="<C-u>"&&(Be.e_stop(Ie),st(""))}if(v.getSearchCursor){var Y=C.searchArgs.forward,Q=C.searchArgs.wholeWordOnly;_n(v).setReversed(!Y);var re=Y?"/":"?",se=_n(v).getQuery(),ve=v.getScrollInfo();switch(C.searchArgs.querySrc){case"prompt":var Se=We.macroModeState;if(Se.isPlaying){var Ne=Se.replaySearchQueries.shift();P(Ne,!0,!1)}else Tr(v,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:V});break;case"wordUnderCursor":var me=or(v,{noSymbol:!0}),we=!0;if(me||(me=or(v,{noSymbol:!1}),we=!1),!me){Pt(v,"No word under cursor"),_(v);return}var Ne=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Ne="\\b"+Ne+"\\b":Ne=Sn(Ne),We.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),P(Ne,!0,!1)}}},processEx:function(v,A,C){function P(j){We.exCommandHistoryController.pushInput(j),We.exCommandHistoryController.reset(),wr.processCommand(v,j),v.state.vim&&_(v)}function B(j,V,Y){var Q=W(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&V=="")&&(We.exCommandHistoryController.pushInput(V),We.exCommandHistoryController.reset(),Be.e_stop(j),_(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,V=We.exCommandHistoryController.nextMatch(V,re)||"",Y(V),se&&j.target&&(j.target.selectionEnd=j.target.selectionStart=Math.min(se,j.target.value.length))):Q=="<C-u>"?(Be.e_stop(j),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&We.exCommandHistoryController.reset()}C.type=="keyToEx"?wr.processCommand(v,C.exArgs.input):A.visualMode?Tr(v,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Tr(v,{onClose:P,prefix:":",onKeyDown:B})},evalInput:function(v,A){var C=A.inputState,P=C.motion,B=C.motionArgs||{},j=C.operator,V=C.operatorArgs||{},Y=C.registerName,Q=A.sel,re=Ke(A.visualMode?ue(v,Q.head):v.getCursor("head")),se=Ke(A.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ve=Ke(re),Se=Ke(se),me,we,Ne;if(j&&this.recordLastEdit(A,C),C.repeatOverride!==void 0?Ne=C.repeatOverride:Ne=C.getRepeat(),Ne>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Ne===0)&&(Ne=1,B.repeatIsExplicit=!1),C.selectedCharacter&&(B.selectedCharacter=V.selectedCharacter=C.selectedCharacter),B.repeat=Ne,_(v),P){var Ie=ri[P](v,re,B,A,C);if(A.lastMotion=ri[P],!Ie)return;if(B.toJumplist){!j&&v.ace.curOp!=null&&(v.ace.curOp.command.scrollIntoView="center-animate");var He=We.jumpList,st=He.cachedCursor;st?(Ki(v,st,Ie),delete He.cachedCursor):Ki(v,re,Ie)}Ie instanceof Array?(we=Ie[0],me=Ie[1]):me=Ie,me||(me=Ke(re)),A.visualMode?((!A.visualBlock||me.ch!==1/0)&&(me=ue(v,me,ve)),we&&(we=ue(v,we)),we=we||Se,Q.anchor=we,Q.head=me,Qn(v),di(v,A,"<",rt(we,me)?we:me),di(v,A,">",rt(we,me)?me:we)):j||(v.ace.curOp&&(v.ace.curOp.vimDialogScroll="center-animate"),me=ue(v,me,ve),v.setCursor(me.line,me.ch))}if(j){if(V.lastSel){we=Se;var Ye=V.lastSel,Je=Math.abs(Ye.head.line-Ye.anchor.line),pn=Math.abs(Ye.head.ch-Ye.anchor.ch);Ye.visualLine?me=new De(Se.line+Je,Se.ch):Ye.visualBlock?me=new De(Se.line+Je,Se.ch+pn):Ye.head.line==Ye.anchor.line?me=new De(Se.line,Se.ch+pn):me=new De(Se.line+Je,Se.ch),A.visualMode=!0,A.visualLine=Ye.visualLine,A.visualBlock=Ye.visualBlock,Q=A.sel={anchor:we,head:me},Qn(v)}else A.visualMode&&(V.lastSel={anchor:Ke(Q.anchor),head:Ke(Q.head),visualBlock:A.visualBlock,visualLine:A.visualLine});var lt,vn,wt,$t,Jn;if(A.visualMode){lt=gt(Q.head,Q.anchor),vn=tn(Q.head,Q.anchor),wt=A.visualLine||V.linewise,$t=A.visualBlock?"block":wt?"line":"char";var fr=w(v,lt,vn);if(Jn=Br(v,{anchor:fr.start,head:fr.end},$t),wt){var wn=Jn.ranges;if($t=="block")for(var q=0;q<wn.length;q++)wn[q].head.ch=Zt(v,wn[q].head.line);else $t=="line"&&(wn[0].head=new De(wn[0].head.line+1,0))}}else{if(lt=Ke(we||Se),vn=Ke(me||ve),rt(vn,lt)){var X=lt;lt=vn,vn=X}wt=B.linewise||V.linewise,wt?hr(v,lt,vn):B.forward&&ir(v,lt,vn),$t="char";var ie=!B.inclusive||wt,fr=w(v,lt,vn);Jn=Br(v,{anchor:fr.start,head:fr.end},$t,ie)}v.setSelections(Jn.ranges,Jn.primary),A.lastMotion=null,V.repeat=Ne,V.registerName=Y,V.linewise=wt;var oe=us[j](v,V,Jn.ranges,Se,me);A.visualMode&&kn(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,A,C){var P=We.macroModeState;P.isPlaying||(v.lastEditInputState=A,v.lastEditActionCommand=C,P.lastInsertModeChanges.changes=[],P.lastInsertModeChanges.expectCursorActivityForChange=!1,P.lastInsertModeChanges.visualBlock=v.visualBlock?v.sel.head.line-v.sel.anchor.line:0)}},ri={moveToTopLine:function(v,A,C){var P=go(v).top+C.repeat-1;return new De(P,nn(v.getLine(P)))},moveToMiddleLine:function(v){var A=go(v),C=Math.floor((A.top+A.bottom)*.5);return new De(C,nn(v.getLine(C)))},moveToBottomLine:function(v,A,C){var P=go(v).bottom-C.repeat+1;return new De(P,nn(v.getLine(P)))},expandToLine:function(v,A,C){var P=A;return new De(P.line+C.repeat-1,1/0)},findNext:function(v,A,C){var P=_n(v),B=P.getQuery();if(B){var j=!C.forward;return j=P.isReversed()?!j:j,Ci(v,B),Er(v,j,B,C.repeat)}},findAndSelectNextInclusive:function(v,A,C,P,B){var j=_n(v),V=j.getQuery();if(V){var Y=!C.forward;Y=j.isReversed()?!Y:Y;var Q=$i(v,Y,V,C.repeat,P);if(Q){if(B.operator)return Q;var re=Q[0],se=new De(Q[1].line,Q[1].ch-1);if(P.visualMode){(P.visualLine||P.visualBlock)&&(P.visualLine=!1,P.visualBlock=!1,Be.signal(v,"vim-mode-change",{mode:"visual",subMode:""}));var ve=P.sel.anchor;if(ve)return j.isReversed()?C.forward?[ve,re]:[ve,se]:C.forward?[ve,se]:[ve,re]}else P.visualMode=!0,P.visualLine=!1,P.visualBlock=!1,Be.signal(v,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(v,A,C,P){var B=ti(v,P,C.selectedCharacter);return B?C.linewise?{line:B.line,ch:nn(v.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(v,A,C,P){if(P.visualBlock&&C.sameLine){var B=P.sel;return[ue(v,new De(B.anchor.line,B.head.ch)),ue(v,new De(B.head.line,B.anchor.ch))]}return[P.sel.head,P.sel.anchor]},jumpToMark:function(v,A,C,P){for(var B=A,j=0;j<C.repeat;j++){var V=B;for(var Y in P.marks)if(u(Y)){var Q=P.marks[Y].find(),re=C.forward?rt(Q,V):rt(V,Q);if(!re&&!(C.linewise&&Q.line==V.line)){var se=dt(V,B),ve=C.forward?Bn(V,Q,B):Bn(B,Q,V);(se||ve)&&(B=Q)}}}return C.linewise&&(B=new De(B.line,nn(v.getLine(B.line)))),B},moveByCharacters:function(v,A,C){var P=A,B=C.repeat,j=C.forward?P.ch+B:P.ch-B;return new De(P.line,j)},moveByLines:function(v,A,C,P){var B=A,j=B.ch;switch(P.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:j=P.lastHPos;break;default:P.lastHPos=j}var V=C.repeat+(C.repeatOffset||0),Y=C.forward?B.line+V:B.line-V,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(v,A,C,P);if(Y>re&&B.line==re)return Ao(v,A,C,P,!0);var se=v.ace.session.getFoldLine(Y);return se&&(C.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),C.toFirstChar&&(j=nn(v.getLine(Y)),P.lastHPos=j),P.lastHSPos=v.charCoords(new De(Y,j),"div").left,new De(Y,j)},moveByDisplayLines:function(v,A,C,P){var B=A;switch(P.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:P.lastHSPos=v.charCoords(B,"div").left}var j=C.repeat,Q=v.findPosV(B,C.forward?j:-j,"line",P.lastHSPos);if(Q.hitSide)if(C.forward)var V=v.charCoords(Q,"div"),Y={top:V.top+8,left:P.lastHSPos},Q=v.coordsChar(Y,"div");else{var re=v.charCoords(new De(v.firstLine(),0),"div");re.left=P.lastHSPos,Q=v.coordsChar(re,"div")}return P.lastHPos=Q.ch,Q},moveByPage:function(v,A,C){var P=A,B=C.repeat;return v.findPosV(P,C.forward?B:-B,"page")},moveByParagraph:function(v,A,C){var P=C.forward?1:-1;return zs(v,A,C.repeat,P)},moveBySentence:function(v,A,C){var P=C.forward?1:-1;return Xi(v,A,C.repeat,P)},moveByScroll:function(v,A,C,P){var B=v.getScrollInfo(),j=null,V=C.repeat;V||(V=B.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords(A,"local");if(C.repeat=V,j=ri.moveByDisplayLines(v,A,C,P),!j)return null;var Q=v.charCoords(j,"local");return v.scrollTo(null,B.top+Q.top-Y.top),j},moveByWords:function(v,A,C){return yr(v,A,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(v,A,C){var P=C.repeat,B=Jo(v,P,C.forward,C.selectedCharacter,A),j=C.forward?-1:1;return Gi(j,C),B?(B.ch+=j,B):null},moveToCharacter:function(v,A,C){var P=C.repeat;return Gi(0,C),Jo(v,P,C.forward,C.selectedCharacter,A)||A},moveToSymbol:function(v,A,C){var P=C.repeat;return Yi(v,P,C.forward,C.selectedCharacter)||A},moveToColumn:function(v,A,C,P){var B=C.repeat;return P.lastHPos=B-1,P.lastHSPos=v.charCoords(A,"div").left,El(v,B)},moveToEol:function(v,A,C,P){return Ao(v,A,C,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,A){var C=A;return new De(C.line,nn(v.getLine(C.line)))},moveToMatchedSymbol:function(v,A){for(var C=A,P=C.line,B=C.ch,j=v.getLine(P),V;B<j.length;B++)if(V=j.charAt(B),V&&c(V)){var Y=v.getTokenTypeAt(new De(P,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<j.length){var Q=/[<>]/.test(j[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=v.findMatchingBracket(new De(P,B+1),{bracketRegex:Q});return re.to}return C},moveToStartOfLine:function(v,A){return new De(A.line,0)},moveToLineOrEdgeOfDocument:function(v,A,C){var P=C.forward?v.lastLine():v.firstLine();return C.repeatIsExplicit&&(P=C.repeat-v.getOption("firstLineNumber")),new De(P,nn(v.getLine(P)))},moveToStartOfDisplayLine:function(v){return v.execCommand("goLineLeft"),v.getCursor()},moveToEndOfDisplayLine:function(v){v.execCommand("goLineRight");var A=v.getCursor();return A.sticky=="before"&&A.ch--,A},textObjectManipulation:function(v,A,C,P){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},V=C.selectedCharacter;V=="b"?V="(":V=="B"&&(V="{");var Y=!C.textObjectInner,Q,re;if(B[V]){if(re=!0,Q=jn(v,A,V,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+V,"g"),A);se.find()&&(Q=jn(v,se.from(),V,Y))}}else if(j[V])re=!0,Q=Mr(v,A,V,Y);else if(V==="W"||V==="w")for(var ve=C.repeat||1;ve-- >0;){var Se=or(v,{inclusive:Y,innerWord:!Y,bigWord:V==="W",noSymbol:V==="W",multiline:!0},Q&&Q.end);Se&&(Q||(Q=Se),Q.end=Se.end)}else if(V==="p")if(Q=zs(v,A,C.repeat,0,Y),C.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var me=P.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(V==="t")Q=$o(v,A,Y);else if(V==="s"){var we=v.getLine(A.line);A.ch>0&&b(we[A.ch])&&(A.ch-=1);var Ne=Ta(v,A,C.repeat,1,Y),Ie=Ta(v,A,C.repeat,-1,Y);m(v.getLine(Ie.line)[Ie.ch])&&m(v.getLine(Ne.line)[Ne.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),Q={start:Ie,end:Ne}}return Q?v.state.vim.visualMode?gn(v,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(v,A,C){var P=We.lastCharacterSearch,B=C.repeat,j=C.forward===P.forward,V=(P.increment?1:0)*(j?-1:1);v.moveH(-V,"char"),C.inclusive=!!j;var Y=Jo(v,B,j,P.selectedCharacter);return Y?(Y.ch+=V,Y):(v.moveH(V,"char"),A)}},us={change:function(v,A,C){var P,B,j=v.state.vim,V=C[0].anchor,Y=C[0].head;if(j.visualMode)if(A.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(V,Y),B=v.getSelection(),v.replaceSelection(""),P=V;else{B=v.getSelection();var Q=he("",C.length);v.replaceSelections(Q),P=gt(C[0].head,C[0].anchor)}else{B=v.getRange(V,Y);var re=j.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var se=/\s+$/.exec(B);se&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-se[0].length),B=B.slice(0,-se[0].length))}A.linewise&&(V=new De(V.line,nn(v.getLine(V.line))),Y.line>V.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",V,Y),P=V}We.registerController.pushText(A.registerName,"change",B,A.linewise,C.length>1),Rn.enterInsertMode(v,{head:P},v.state.vim)},delete:function(v,A,C){var P,B,j=v.state.vim;if(j.visualBlock){B=v.getSelection();var V=he("",C.length);v.replaceSelections(V),P=gt(C[0].head,C[0].anchor)}else{var Y=C[0].anchor,Q=C[0].head;A.linewise&&Q.line!=v.firstLine()&&Y.line==v.lastLine()&&Y.line==Q.line-1&&(Y.line==v.firstLine()?Y.ch=0:Y=new De(Y.line-1,Zt(v,Y.line-1))),B=v.getRange(Y,Q),v.replaceRange("",Y,Q),P=Y,A.linewise&&(P=ri.moveToFirstNonWhiteSpaceCharacter(v,Y))}return We.registerController.pushText(A.registerName,"delete",B,A.linewise,j.visualBlock),ue(v,P)},indent:function(v,A,C){var P=v.state.vim,B=P.visualMode?A.repeat:1;if(P.visualBlock){for(var j=v.getOption("tabSize"),V=v.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=C.length-1;Q>=0;Q--)if(Y=gt(C[Q].anchor,C[Q].head),A.indentRight)v.replaceRange(V.repeat(B),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ve=0;ve<B;ve++){var Se=re[Y.ch+se];if(Se==" ")se++;else{if(Se!=" ")break;se++;for(var me=1;me<V.length&&(Se=re[Y.ch+se],Se===" ");me++)se++}}v.replaceRange("",Y,ge(Y,0,se))}return Y}if(v.indentMore)for(var ve=0;ve<B;ve++)A.indentRight?v.indentMore():v.indentLess();else{var we=C[0].anchor.line,Ne=P.visualBlock?C[C.length-1].anchor.line:C[0].head.line;A.linewise&&Ne--;for(var Q=we;Q<=Ne;Q++)for(var ve=0;ve<B;ve++)v.indentLine(Q,A.indentRight)}return ri.moveToFirstNonWhiteSpaceCharacter(v,C[0].anchor)},indentAuto:function(v,A,C){return v.execCommand("indentAuto"),ri.moveToFirstNonWhiteSpaceCharacter(v,C[0].anchor)},hardWrap:function(v,A,C,P,B){if(v.hardWrap){var j=C[0].anchor.line,V=C[0].head.line;A.linewise&&V--;var Y=v.hardWrap({from:j,to:V});return Y>j&&A.linewise&&Y--,A.keepCursor?P:new De(Y,0)}},changeCase:function(v,A,C,P,B){for(var j=v.getSelections(),V=[],Y=A.toLower,Q=0;Q<j.length;Q++){var re=j[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ve=0;ve<re.length;ve++){var Se=re.charAt(ve);se+=l(Se)?Se.toLowerCase():Se.toUpperCase()}V.push(se)}return v.replaceSelections(V),A.shouldMoveCursor?B:!v.state.vim.visualMode&&A.linewise&&C[0].anchor.line+1==C[0].head.line?ri.moveToFirstNonWhiteSpaceCharacter(v,P):A.linewise?P:gt(C[0].anchor,C[0].head)},yank:function(v,A,C,P){var B=v.state.vim,j=v.getSelection(),V=B.visualMode?gt(B.sel.anchor,B.sel.head,C[0].head,C[0].anchor):P;return We.registerController.pushText(A.registerName,"yank",j,A.linewise,B.visualBlock),V}},Rn={jumpListWalk:function(v,A,C){if(!C.visualMode){var P=A.repeat,B=A.forward,j=We.jumpList,V=j.move(v,B?P:-P),Y=V?V.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,A,C){if(!C.visualMode){var P=A.repeat||1,B=v.defaultTextHeight(),j=v.getScrollInfo().top,V=B*P,Y=A.forward?j+V:j-V,Q=Ke(v.getCursor()),re=v.charCoords(Q,"local");if(A.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.top)):v.scrollTo(null,Y);else{var se=Y+v.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/B,Q.line=Math.floor(Q.line),v.setCursor(Q),re=v.charCoords(Q,"local"),v.scrollTo(null,re.bottom-v.getScrollInfo().clientHeight)):v.scrollTo(null,Y)}}},scrollToCursor:function(v,A){var C=v.getCursor().line,P=v.charCoords(new De(C,0),"local"),B=v.getScrollInfo().clientHeight,j=P.top;switch(A.position){case"center":j=P.bottom-B/2;break;case"bottom":var V=new De(C,v.getLine(C).length-1),Y=v.charCoords(V,"local"),Q=Y.bottom-j;j=j-B+Q}v.scrollTo(null,j)},replayMacro:function(v,A,C){var P=A.selectedCharacter,B=A.repeat,j=We.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;B--;)Vs(v,C,j,P)},enterMacroRecordMode:function(v,A){var C=We.macroModeState,P=A.selectedCharacter;We.registerController.isValidRegister(P)&&C.enterMacroRecordMode(v,P)},toggleOverwrite:function(v){v.state.overwrite?(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Be.signal(v,"vim-mode-change",{mode:"insert"})):(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Be.signal(v,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(v,A,C){if(!v.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=A&&A.repeat||1;var P=A?A.insertAt:null,B=C.sel,j=A.head||v.getCursor("head"),V=v.listSelections().length;if(P=="eol")j=new De(j.line,Zt(v,j.line));else if(P=="bol")j=new De(j.line,0);else if(P=="charAfter"){var Y=w(v,j,ge(j,0,1));j=Y.end}else if(P=="firstNonBlank"){var Y=w(v,j,ri.moveToFirstNonWhiteSpaceCharacter(v,j));j=Y.end}else if(P=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?j=B.head:j=new De(B.anchor.line,0)}else if(P=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?j=ge(B.head,0,1):j=new De(B.anchor.line,0)}else if(P=="inplace"){if(C.visualMode)return}else P=="lastEdit"&&(j=To(v)||j);v.setOption("disableInput",!1),A&&A.replace?(v.toggleOverwrite(!0),v.setOption("keyMap","vim-replace"),Be.signal(v,"vim-mode-change",{mode:"replace"})):(v.toggleOverwrite(!1),v.setOption("keyMap","vim-insert"),Be.signal(v,"vim-mode-change",{mode:"insert"})),We.macroModeState.isPlaying||(v.on("change",Eo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=v.setBookmark(j,{insertLeft:!0}),Be.on(v.getInputField(),"keydown",Gs)),C.visualMode&&kn(v),Fr(v,j,V)}},toggleVisualMode:function(v,A,C){var P=A.repeat,B=v.getCursor(),j;if(C.visualMode)C.visualLine^A.linewise||C.visualBlock^A.blockwise?(C.visualLine=!!A.linewise,C.visualBlock=!!A.blockwise,Be.signal(v,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(v)):kn(v);else{C.visualMode=!0,C.visualLine=!!A.linewise,C.visualBlock=!!A.blockwise,j=ue(v,new De(B.line,B.ch+P-1));var V=w(v,B,j);C.sel={anchor:V.start,head:V.end},Be.signal(v,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(v),di(v,C,"<",gt(B,j)),di(v,C,">",tn(B,j))}},reselectLastSelection:function(v,A,C){var P=C.lastSelection;if(C.visualMode&&qt(v,C),P){var B=P.anchorMark.find(),j=P.headMark.find();if(!B||!j)return;C.sel={anchor:B,head:j},C.visualMode=!0,C.visualLine=P.visualLine,C.visualBlock=P.visualBlock,Qn(v),di(v,C,"<",gt(B,j)),di(v,C,">",tn(B,j)),Be.signal(v,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(v,A,C){var P,B;if(C.visualMode){if(P=v.getCursor("anchor"),B=v.getCursor("head"),rt(B,P)){var j=B;B=P,P=j}B.ch=Zt(v,B.line)-1}else{var V=Math.max(A.repeat,2);P=v.getCursor(),B=ue(v,new De(P.line+V-1,1/0))}for(var Y=0,Q=P.line;Q<B.line;Q++){Y=Zt(v,P.line);var re="",se=0;if(!A.keepSpaces){var ve=v.getLine(P.line+1);se=ve.search(/\S/),se==-1?se=ve.length:re=" "}v.replaceRange(re,new De(P.line,Y),new De(P.line+1,se))}var Se=ue(v,new De(P.line,Y));C.visualMode&&kn(v,!1),v.setCursor(Se)},newLineAndEnterInsertMode:function(v,A,C){C.insertMode=!0;var P=Ke(v.getCursor());if(P.line===v.firstLine()&&!A.after)v.replaceRange(`
|
1451
|
+
`,new De(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{P.line=A.after?P.line:P.line-1,P.ch=Zt(v,P.line),v.setCursor(P);var B=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;B(v)}this.enterInsertMode(v,{repeat:A.repeat},C)},paste:function(v,A,C){var P=this,B=We.registerController.getRegister(A.registerName),j=function(){var V=B.toString();P.continuePaste(v,A,C,V,B)};A.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(V){P.continuePaste(v,A,C,V,B)},function(){j()}):j()},continuePaste:function(v,A,C,P,B){var j=Ke(v.getCursor());if(P){if(A.matchIndent){var V=v.getOption("tabSize"),Y=function(wn){var q=wn.split(" ").length-1,X=wn.split(" ").length-1;return q*V+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=P.replace(/\n$/,""),ve=P!==se,Se=Y(P.match(/^\s*/)[0]),P=se.replace(/^\s*/gm,function(wn){var q=re+(Y(wn)-Se);if(q<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(q/V);return Array(X+1).join(" ")}return Array(q+1).join(" ")});P+=ve?`
|
1452
|
+
`:""}if(A.repeat>1)var P=Array(A.repeat+1).join(P);var me=B.linewise,we=B.blockwise;if(we){P=P.split(`
|
1453
|
+
`),me&&P.pop();for(var Ne=0;Ne<P.length;Ne++)P[Ne]=P[Ne]==""?" ":P[Ne];j.ch+=A.after?1:0,j.ch=Math.min(Zt(v,j.line),j.ch)}else me?C.visualMode?P=C.visualLine?P.slice(0,-1):`
|
1454
|
+
`+P.slice(0,P.length-1)+`
|
1455
|
+
`:A.after?(P=`
|
1456
|
+
`+P.slice(0,P.length-1),j.ch=Zt(v,j.line)):j.ch=0:j.ch+=A.after?1:0;var Ie;if(C.visualMode){C.lastPastedText=P;var He,st=qe(v,C),Ye=st[0],Je=st[1],pn=v.getSelection(),lt=v.listSelections(),vn=new Array(lt.length).join("1").split("1");C.lastSelection&&(He=C.lastSelection.headMark.find()),We.registerController.unnamedRegister.setText(pn),we?(v.replaceSelections(vn),Je=new De(Ye.line+P.length-1,Ye.ch),v.setCursor(Ye),ur(v,Je),v.replaceSelections(P),Ie=Ye):C.visualBlock?(v.replaceSelections(vn),v.setCursor(Ye),v.replaceRange(P,Ye,Ye),Ie=Ye):(v.replaceRange(P,Ye,Je),Ie=v.posFromIndex(v.indexFromPos(Ye)+P.length-1)),He&&(C.lastSelection.headMark=v.setBookmark(He)),me&&(Ie.ch=0)}else if(we){v.setCursor(j);for(var Ne=0;Ne<P.length;Ne++){var wt=j.line+Ne;wt>v.lastLine()&&v.replaceRange(`
|
1457
|
+
`,new De(wt,0));var $t=Zt(v,wt);$t<j.ch&&Xn(v,wt,j.ch)}v.setCursor(j),ur(v,new De(j.line+P.length-1,j.ch)),v.replaceSelections(P),Ie=j}else if(v.replaceRange(P,j),me){var wt=A.after?j.line+1:j.line;Ie=new De(wt,nn(v.getLine(wt)))}else Ie=Ke(j),/\n/.test(P)||(Ie.ch+=P.length-(A.after?1:0));C.visualMode&&kn(v,!1),v.setCursor(Ie)}},undo:function(v,A){v.operation(function(){Xe(v,Be.commands.undo,A.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,A){Xe(v,Be.commands.redo,A.repeat)()},setRegister:function(v,A,C){C.inputState.registerName=A.selectedCharacter},insertRegister:function(v,A,C){var P=A.selectedCharacter,B=We.registerController.getRegister(P),j=B&&B.toString();j&&v.replaceSelection(j)},oneNormalCommand:function(v,A,C){ni(v,!0),C.insertModeReturn=!0,Be.on(v,"vim-command-done",function P(){C.visualMode||(C.insertModeReturn&&(C.insertModeReturn=!1,C.insertMode||Rn.enterInsertMode(v,{},C)),Be.off(v,"vim-command-done",P))})},setMark:function(v,A,C){var P=A.selectedCharacter;di(v,C,P,v.getCursor())},replace:function(v,A,C){var P=A.selectedCharacter,B=v.getCursor(),j,V,Y=v.listSelections();if(C.visualMode)B=v.getCursor("start"),V=v.getCursor("end");else{var Q=v.getLine(B.line);j=B.ch+A.repeat,j>Q.length&&(j=Q.length),V=new De(B.line,j)}var re=w(v,B,V);if(B=re.start,V=re.end,P==`
|
1458
|
+
`)C.visualMode||v.replaceRange("",B,V),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(v);else{var se=v.getRange(B,V);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/[^\n]/g,P),C.visualBlock){var ve=new Array(v.getOption("tabSize")+1).join(" ");se=v.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/\t/g,ve).replace(/[^\n]/g,P).split(`
|
1459
|
+
`),v.replaceSelections(se)}else v.replaceRange(se,B,V);C.visualMode?(B=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(B),kn(v,!1)):v.setCursor(ge(V,0,-1))}},incrementNumberToken:function(v,A){for(var C=v.getCursor(),P=v.getLine(C.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,V,Y,Q;(j=B.exec(P))!==null&&(V=j.index,Y=V+j[0].length,!(C.ch<Y)););if(!(!A.backtrack&&Y<=C.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ve=A.increase?1:-1,Se={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(j[1]+se,Se)+ve*A.repeat;Q=me.toString(Se);var we=re?new Array(se.length-Q.length+1+j[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Ne=new De(C.line,V),Ie=new De(C.line,Y);v.replaceRange(Q,Ne,Ie),v.setCursor(new De(C.line,V+Q.length-1))}},repeatLastEdit:function(v,A,C){var P=C.lastEditInputState;if(P){var B=A.repeat;B&&A.repeatIsExplicit?C.lastEditInputState.repeatOverride=B:B=C.lastEditInputState.repeatOverride||B,La(v,C,B,!1)}},indent:function(v,A){v.indentLine(v.getCursor().line,A.indentRight)},exitInsertMode:ni},gi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},mi={bracket:{isComplete:function(v){if(v.nextCh===v.symb){if(v.depth++,v.depth>=1)return!0}else v.nextCh===v.reverseSymb&&v.depth--;return!1}},section:{init:function(v){v.curMoveThrough=!0,v.symb=(v.forward?"]":"[")===v.symb?"{":"}"},isComplete:function(v){return v.index===0&&v.nextCh===v.symb}},comment:{isComplete:function(v){var A=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,A}},method:{init:function(v){v.symb=v.symb==="m"?"{":"}",v.reverseSymb=v.symb==="{"?"}":"{"},isComplete:function(v){return v.nextCh===v.symb}},preprocess:{init:function(v){v.index=0},isComplete:function(v){if(v.nextCh==="#"){var A=v.lineText.match(/^#(\w+)/)[1];if(A==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if(A==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if(A==="else"&&v.depth===0)return!0}return!1}}};E("pcre",!0,"boolean"),Qi.prototype={getQuery:function(){return We.query},setQuery:function(v){We.query=v},getOverlay:function(){return this.searchOverlay},setOverlay:function(v){this.searchOverlay=v},isReversed:function(){return We.isReversed},setReversed:function(v){We.isReversed=v},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(v){this.annotate=v}};var Ri={"\\n":`
|
1460
|
+
`,"\\r":"\r","\\t":" "},dr={"\\/":"/","\\\\":"\\","\\n":`
|
1461
|
+
`,"\\r":"\r","\\t":" ","\\&":"&"},pr=0,vr=function(){this.buildCommandMap_()};vr.prototype={processCommand:function(v,A,C){var P=this;v.operation(function(){v.curOp.isVimOp=!0,P._processCommand(v,A,C)})},_processCommand:function(v,A,C){var P=v.state.vim,B=We.registerController.getRegister(":"),j=B.toString(),V=new Be.StringStream(A);B.setText(A);var Y=C||{};Y.input=A;try{this.parseInput_(v,V,Y)}catch(se){throw Pt(v,se.toString()),se}P.visualMode&&kn(v);var Q,re;if(!Y.commandName)Y.line!==void 0&&(re="move");else if(Q=this.matchCommand_(Y.commandName),Q){if(re=Q.name,Q.excludeFromCommandHistory&&B.setText(j),this.parseCommandArgs_(V,Y,Q),Q.type=="exToKey"){L(v,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(v,Q.toInput);return}}if(!re){Pt(v,'Not an editor command ":'+A+'"');return}try{Xs[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Pt(v,se.toString()),se}},parseInput_:function(v,A,C){if(A.eatWhile(":"),A.eat("%")?(C.line=v.firstLine(),C.lineEnd=v.lastLine()):(C.line=this.parseLineSpec_(v,A),C.line!==void 0&&A.eat(",")&&(C.lineEnd=this.parseLineSpec_(v,A))),C.line==null)if(v.state.vim.visualMode){var P=ti(v,v.state.vim,"<");C.selectionLine=P&&P.line,P=ti(v,v.state.vim,">"),C.selectionLineEnd=P&&P.line}else C.selectionLine=v.getCursor().line;else C.selectionLine=C.line,C.selectionLineEnd=C.lineEnd;var B=A.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?C.commandName=B[1]:C.commandName=A.match(/.*/)[0],C},parseLineSpec_:function(v,A){var C=A.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(A.next()){case".":return this.parseLineSpecOffset_(A,v.getCursor().line);case"$":return this.parseLineSpecOffset_(A,v.lastLine());case"'":var P=A.next(),B=ti(v,v.state.vim,P);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(A,B.line);case"-":case"+":return A.backUp(1),this.parseLineSpecOffset_(A,v.getCursor().line);default:return A.backUp(1),void 0}},parseLineSpecOffset_:function(v,A){var C=v.match(/^([+-])?(\d+)/);if(C){var P=parseInt(C[2],10);C[1]=="-"?A-=P:A+=P}return A},parseCommandArgs_:function(v,A,C){if(!v.eol()){A.argString=v.match(/.*/)[0];var P=C.argDelimiter||/\s+/,B=hi(A.argString).split(P);B.length&&B[0]&&(A.args=B)}},matchCommand_:function(v){for(var A=v.length;A>0;A--){var C=v.substring(0,A);if(this.commandMap_[C]){var P=this.commandMap_[C];if(P.name.indexOf(v)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<fi.length;v++){var A=fi[v],C=A.shortName||A.name;this.commandMap_[C]=A}},map:function(v,A,C,P){if(v!=":"&&v.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var B=v.substring(1);A!=":"&&A.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:A.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:A,user:!0}}else{var j={keys:v,type:"keyToKey",toKeys:A,noremap:!!P};C&&(j.context=C),Cn.unshift(j)}},unmap:function(v,A){if(v!=":"&&v.charAt(0)==":"){if(A)throw Error("Mode not supported for ex mappings");var C=v.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var P=v,B=0;B<Cn.length;B++)if(P==Cn[B].keys&&Cn[B].context===A)return Cn.splice(B,1),!0}};var Xs={colorscheme:function(v,A){if(!A.args||A.args.length<1){Pt(v,v.getOption("theme"));return}v.setOption("theme",A.args[0])},map:function(v,A,C,P){var B=A.args;if(!B||B.length<2){v&&Pt(v,"Invalid mapping: "+A.input);return}wr.map(B[0],B[1],C,P)},imap:function(v,A){this.map(v,A,"insert")},nmap:function(v,A){this.map(v,A,"normal")},vmap:function(v,A){this.map(v,A,"visual")},omap:function(v,A){this.map(v,A,"operatorPending")},noremap:function(v,A){this.map(v,A,void 0,!0)},inoremap:function(v,A){this.map(v,A,"insert",!0)},nnoremap:function(v,A){this.map(v,A,"normal",!0)},vnoremap:function(v,A){this.map(v,A,"visual",!0)},onoremap:function(v,A){this.map(v,A,"operatorPending",!0)},unmap:function(v,A,C){var P=A.args;(!P||P.length<1||!wr.unmap(P[0],C))&&v&&Pt(v,"No such mapping: "+A.input)},mapclear:function(v,A){mt.mapclear()},imapclear:function(v,A){mt.mapclear("insert")},nmapclear:function(v,A){mt.mapclear("normal")},vmapclear:function(v,A){mt.mapclear("visual")},omapclear:function(v,A){mt.mapclear("operatorPending")},move:function(v,A){En.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:A.line+1})},set:function(v,A){var C=A.args,P=A.setCfg||{};if(!C||C.length<1){v&&Pt(v,"Invalid mapping: "+A.input);return}var B=C[0].split("="),j=B[0],V=B[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(V)throw Error("Trailing characters: "+A.argString);j=j.substring(0,j.length-1),Y=!0}else j.charAt(j.length-1)=="!"&&(j=j.substring(0,j.length-1),Q=!0);V===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),V=!1);var re=Ft[j]&&Ft[j].type=="boolean";if(re&&(Q?V=!k(j,v,P):V==null&&(V=!0)),!re&&V===void 0||Y){var se=k(j,v,P);se instanceof Error?Pt(v,se.message):se===!0||se===!1?Pt(v," "+(se?"":"no")+j):Pt(v," "+j+"="+se)}else{var ve=M(j,V,v,P);ve instanceof Error&&Pt(v,ve.message)}},setlocal:function(v,A){A.setCfg={scope:"local"},this.set(v,A)},setglobal:function(v,A){A.setCfg={scope:"global"},this.set(v,A)},registers:function(v,A){var C=A.args,P=We.registerController.registers,B=`----------Registers----------
|
1462
|
+
|
1463
|
+
`;if(C){var j;C=C.join("");for(var V=0;V<C.length;V++)if(j=C.charAt(V),!!We.registerController.isValidRegister(j)){var Y=P[j]||new z;B+='"'+j+" "+Y.toString()+`
|
1464
|
+
`}}else for(var j in P){var Q=P[j].toString();Q.length&&(B+='"'+j+" "+Q+`
|
1465
|
+
`)}Pt(v,B)},sort:function(v,A){function C(){if(A.argString){var wt=new Be.StringStream(A.argString);if(wt.eat("!")&&(j=!0),wt.eol())return;if(!wt.eatSpace())return"Invalid arguments";var $t=wt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!wt.eol())return"Invalid arguments";if($t[1]){V=$t[1].indexOf("i")!=-1,Y=$t[1].indexOf("u")!=-1;var Jn=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,fr=$t[1].indexOf("x")!=-1&&1,wn=$t[1].indexOf("o")!=-1&&1;if(Jn+fr+wn>1)return"Invalid arguments";Q=Jn&&"decimal"||fr&&"hex"||wn&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),V?"i":""))}}function P(wt,$t){if(j){var Jn;Jn=wt,wt=$t,$t=Jn}V&&(wt=wt.toLowerCase(),$t=$t.toLowerCase());var fr=Q&&Ie.exec(wt),wn=Q&&Ie.exec($t);return fr?(fr=parseInt((fr[1]+fr[2]).toLowerCase(),He),wn=parseInt((wn[1]+wn[2]).toLowerCase(),He),fr-wn):wt<$t?-1:1}function B(wt,$t){if(j){var Jn;Jn=wt,wt=$t,$t=Jn}return V&&(wt[0]=wt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),wt[0]<$t[0]?-1:1}var j,V,Y,Q,re,se=C();if(se){Pt(v,se+": "+A.argString);return}var ve=A.line||v.firstLine(),Se=A.lineEnd||A.line||v.lastLine();if(ve!=Se){var me=new De(ve,0),we=new De(Se,Zt(v,Se)),Ne=v.getRange(me,we).split(`
|
1466
|
+
`),Ie=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),He=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Ye=[];if(Q||re)for(var Je=0;Je<Ne.length;Je++){var pn=re?Ne[Je].match(re):null;pn&&pn[0]!=""?st.push(pn):!re&&Ie.exec(Ne[Je])?st.push(Ne[Je]):Ye.push(Ne[Je])}else Ye=Ne;if(st.sort(re?B:P),re)for(var Je=0;Je<st.length;Je++)st[Je]=st[Je].input;else Q||Ye.sort(P);if(Ne=j?st.concat(Ye):Ye.concat(st),Y){var lt=Ne,vn;Ne=[];for(var Je=0;Je<lt.length;Je++)lt[Je]!=vn&&Ne.push(lt[Je]),vn=lt[Je]}v.replaceRange(Ne.join(`
|
1467
|
+
`),me,we)}},vglobal:function(v,A){this.global(v,A)},normal:function(v,A){var C=A.argString;if(C&&C[0]=="!"&&(C=C.slice(1),on=!0),C=C.trimStart(),!C){Pt(v,"Argument is required.");return}var P=A.line;if(typeof P=="number")for(var B=isNaN(A.lineEnd)?P:A.lineEnd,j=P;j<=B;j++)v.setCursor(j,0),L(v,A.argString.trimStart()),v.state.vim.insertMode&&ni(v,!0);else L(v,A.argString.trimStart()),v.state.vim.insertMode&&ni(v,!0)},global:function(v,A){var C=A.argString;if(!C){Pt(v,"Regular Expression missing from global");return}var P=A.commandName[0]==="v";C[0]==="!"&&A.commandName[0]==="g"&&(P=!0,C=C.slice(1));var B=A.line!==void 0?A.line:v.firstLine(),j=A.lineEnd||A.line||v.lastLine(),V=Ar(C),Y=C,Q;if(V.length&&(Y=V[0],Q=V.slice(1,V.length).join("/")),Y)try{hn(v,Y,!0,!0)}catch{Pt(v,"Invalid regex: "+Y);return}for(var re=_n(v).getQuery(),se=[],ve=B;ve<=j;ve++){var Se=v.getLine(ve),me=re.test(Se);me!==P&&se.push(Q?v.getLineHandle(ve):Se)}if(!Q){Pt(v,se.join(`
|
1468
|
+
`));return}var we=0,Ne=function(){if(we<se.length){var Ie=se[we++],He=v.getLineNumber(Ie);if(He==null){Ne();return}var st=He+1+Q;wr.processCommand(v,st,{callback:Ne})}else v.releaseLineHandles&&v.releaseLineHandles()};Ne()},substitute:function(v,A){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=A.argString,P=C?Zi(C,C[0]):[],B,j="",V,Y,Q,re=!1,se=!1;if(P.length)B=P[0],k("pcre")&&B!==""&&(B=new RegExp(B).source),j=P[1],j!==void 0&&(k("pcre")?j=Ol(j.replace(/([^\\])&/g,"$1$$&")):j=Ll(j),We.lastSubstituteReplacePart=j),V=P[2]?P[2].split(" "):[];else if(C&&C.length){Pt(v,"Substitutions should be of the form :s/pattern/replace/");return}if(V&&(Y=V[0],Q=parseInt(V[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),k("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{hn(v,B,!0,!0)}catch{Pt(v,"Invalid regex: "+B);return}if(j=j||We.lastSubstituteReplacePart,j===void 0){Pt(v,"No previous substitute regular expression");return}var ve=_n(v),Se=ve.getQuery(),me=A.line!==void 0?A.line:v.getCursor().line,we=A.lineEnd||me;me==v.firstLine()&&we==v.lastLine()&&(we=1/0),Q&&(me=we,we=me+Q-1);var Ne=ue(v,new De(me,0)),Ie=v.getSearchCursor(Se,Ne);ts(v,re,se,me,we,Ie,Se,j,A.callback)},startinsert:function(v,A){L(v,A.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(v){Be.commands.save?Be.commands.save(v):v.save&&v.save()},nohlsearch:function(v){es(v)},yank:function(v){var A=Ke(v.getCursor()),C=A.line,P=v.getLine(C);We.registerController.pushText("0","yank",P,!0,!0)},delete:function(v,A){var C=A.selectionLine,P=isNaN(A.selectionLineEnd)?C:A.selectionLineEnd;us.delete(v,{linewise:!0},[{anchor:new De(C,0),head:new De(P+1,0)}])},join:function(v,A){var C=A.selectionLine,P=isNaN(A.selectionLineEnd)?C:A.selectionLineEnd;v.setCursor(new De(C,0)),Rn.joinLines(v,{repeat:P-C},v.state.vim)},delmarks:function(v,A){if(!A.argString||!hi(A.argString)){Pt(v,"Argument required");return}for(var C=v.state.vim,P=new Be.StringStream(hi(A.argString));!P.eol();){P.eatSpace();var B=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Pt(v,"Invalid argument: "+A.argString.substring(B));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Pt(v,"Invalid argument: "+A.argString.substring(B));return}var V=j,Y=P.next();if(!(u(V)&&u(Y)||l(V)&&l(Y))){Pt(v,"Invalid argument: "+V+"-");return}var Q=V.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Pt(v,"Invalid argument: "+A.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete C.marks[ve]}}else delete C.marks[j]}}},wr=new vr;E("insertModeEscKeysTimeout",200,"number"),Be.Vim=mt;var Rr={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",insert:"Ins",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},yi=mt.handleKey.bind(mt);mt.handleKey=function(v,A,C){return v.operation(function(){return yi(v,A,C)},!0)},I(),r.CodeMirror=Be;var vi=mt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,A,C,P,B){var j=this.state.vim||{},V=C.characterWidth,Y=C.lineHeight,Q=A.top,re=A.left;if(!j.insertMode){var se=P.cursor?ar.comparePoints(P.cursor,P.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>V&&(re-=V)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),eo.translate(v,re,Q),eo.setStyle(v.style,"width",V+"px"),eo.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var A=v.state.cm,C=vi(A);if(!C.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,A,C,P,B){var j=v.editor,V=j.state.cm,Y=vi(V);if(P!=-1){if(Y.insertMode||(A==-1?(C.charCodeAt(0)>255&&v.inputKey&&(C=v.inputKey,C&&v.inputHash==4&&(C=C.toUpperCase())),v.inputChar=C):A==4||A==0?v.inputKey==C&&v.inputHash==A&&v.inputChar?(C=v.inputChar,A=-1):(v.inputChar=null,v.inputKey=C,v.inputHash=A):v.inputChar=v.inputKey=null),V.state.overwrite&&Y.insertMode&&C=="backspace"&&A==0)return{command:"gotoleft"};if(C=="c"&&A==1&&!Oo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():V.operation(function(){kn(V)})}),{command:"null",passEvent:!0};if(C=="esc"&&!Y.insertMode&&!Y.visualMode&&!V.ace.inMultiSelectMode){var Q=_n(V),re=Q.getOverlay();re&&V.removeOverlay(re)}if(A==-1||A&1||A===0&&C.length>1){var se=Y.insertMode,ve=Ys(A,C,B||{},Y);Y.status==null&&(Y.status="");var Se=Ro(V,ve,"user");return Y=vi(V),Se&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),V._signal("changeStatus"),!Se&&(A!=-1||se)?void 0:{command:"null",passEvent:!Se}}}},attach:function(v){function A(){var P=vi(C).insertMode;C.ace.renderer.setStyle("normal-mode",!P),v.textInput.setCommandMode(!P),v.renderer.$keepTextAreaAtCursor=P,v.renderer.$blockCursor=!P}v.state||(v.state={});var C=new Be(v);v.state.cm=C,v.$vimModeHandler=this,p(C),vi(C).status=null,C.on("vim-command-done",function(){C.virtualSelectionMode()||(vi(C).status=null,C.ace._signal("changeStatus"),C.ace.session.markUndoGroup())}),C.on("changeStatus",function(){C.ace.renderer.updateCursor(),C.ace._signal("changeStatus")}),C.on("vim-mode-change",function(){C.virtualSelectionMode()||(A(),C._signal("changeStatus"))}),A(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(C)},detach:function(v){var A=v.state.cm;g(A),A.destroy(),v.state.cm=null,v.$vimModeHandler=null,v.renderer.$cursorLayer.drawCursor=null,v.renderer.setStyle("normal-mode",!1),v.textInput.setCommandMode(!1),v.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(v){var A=v.state.cm,C=vi(A);if(C.insertMode)return"INSERT";var P="";return C.visualMode&&(P+="VISUAL",C.visualLine&&(P+=" LINE"),C.visualBlock&&(P+=" BLOCK")),C.status&&(P+=(P?" ":"")+C.status),P}},mt.defineOption({name:"wrap",set:function(v,A){A&&A.ace.setOption("wrap",v)},type:"boolean"},!1),mt.defineEx("write","w",function(){console.log(":write is not implemented")}),Cn.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Cn.push({keys:"gq",type:"operator",operator:"hardWrap"}),mt.defineOperator("hardWrap",function(v,A,C,P,B){var j=C[0].anchor.line,V=C[0].head.line;return A.linewise&&V--,vo(v.ace,{startRow:j,endRow:V}),De(V,0)}),E("textwidth",void 0,"number",["tw"],function(v,A){if(A!==void 0){if(v===void 0){var C=A.ace.getOption("printMarginColumn");return C}var P=Math.round(v);P>1&&A.ace.setOption("printMarginColumn",P)}}),Rn.aceCommand=function(v,A,C){v.vimCmd=A,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",Mi):Mi(null,v.ace)},Rn.fold=function(v,A,C){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(A.all?2:0)+(A.open?1:0)])},No=Cn.length,r.handler.defaultKeymap=Cn,r.handler.actions=Rn,r.Vim=mt}),(function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})})()})(Xm)),Xm.exports}M$();var Zm={},Jm;function A$(){return Jm||(Jm=1,(function(t){(function(){var e={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(w){return h(f(w),arguments)}function r(w,p){return n.apply(null,[w].concat(p||[]))}function h(w,p){var g=1,i=w.length,a,u="",c,o,l,m,b,S,E,M;for(c=0;c<i;c++)if(typeof w[c]=="string")u+=w[c];else if(typeof w[c]=="object"){if(l=w[c],l.keys)for(a=p[g],o=0;o<l.keys.length;o++){if(a==null)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[o],l.keys[o-1]));a=a[l.keys[o]]}else l.param_no?a=p[l.param_no]:a=p[g++];if(e.not_type.test(l.type)&&e.not_primitive.test(l.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(l.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(n("[sprintf] expecting number but found %T",a));switch(e.number.test(l.type)&&(E=a>=0),l.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,l.width?parseInt(l.width):0);break;case"e":a=l.precision?parseFloat(a).toExponential(l.precision):parseFloat(a).toExponential();break;case"f":a=l.precision?parseFloat(a).toFixed(l.precision):parseFloat(a);break;case"g":a=l.precision?String(Number(a.toPrecision(l.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=l.precision?a.substring(0,l.precision):a;break;case"t":a=String(!!a),a=l.precision?a.substring(0,l.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=l.precision?a.substring(0,l.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=l.precision?a.substring(0,l.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}e.json.test(l.type)?u+=a:(e.number.test(l.type)&&(!E||l.sign)?(M=E?"+":"-",a=a.toString().replace(e.sign,"")):M="",b=l.pad_char?l.pad_char==="0"?"0":l.pad_char.charAt(1):" ",S=l.width-(M+a).length,m=l.width&&S>0?b.repeat(S):"",u+=l.align?M+a+m:b==="0"?M+m+a:m+M+a)}return u}var d=Object.create(null);function f(w){if(d[w])return d[w];for(var p=w,g,i=[],a=0;p;){if((g=e.text.exec(p))!==null)i.push(g[0]);else if((g=e.modulo.exec(p))!==null)i.push("%");else if((g=e.placeholder.exec(p))!==null){if(g[2]){a|=1;var u=[],c=g[2],o=[];if((o=e.key.exec(c))!==null)for(u.push(o[1]);(c=c.substring(o[0].length))!=="";)if((o=e.key_access.exec(c))!==null)u.push(o[1]);else if((o=e.index_access.exec(c))!==null)u.push(o[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=u}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(g[0].length)}return d[w]=i}t.sprintf=n,t.vsprintf=r,typeof window<"u"&&(window.sprintf=n,window.vsprintf=r)})()})(Zm)),Zm}A$();var Mc={exports:{}};/**
|
1469
|
+
* @license
|
1470
|
+
* Lodash <https://lodash.com/>
|
1471
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1472
|
+
* Released under MIT license <https://lodash.com/license>
|
1473
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
1474
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
1475
|
+
*/var T$=Mc.exports,ey;function E$(){return ey||(ey=1,(function(t,e){(function(){var n,r="4.17.21",h=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",w="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,i="__lodash_placeholder__",a=1,u=2,c=4,o=1,l=2,m=1,b=2,S=4,E=8,M=16,k=32,x=64,R=128,I=256,O=512,L=30,W="...",F=800,N=16,$=1,_=2,D=3,z=1/0,U=9007199254740991,G=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,le=[["ary",R],["bind",m],["bindKey",b],["curry",E],["curryRight",M],["flip",O],["partial",k],["partialRight",x],["rearg",I]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Ae="[object Boolean]",Te="[object Date]",Re="[object DOMException]",Xe="[object Error]",Ke="[object Function]",dt="[object GeneratorFunction]",rt="[object Map]",gt="[object Number]",tn="[object Null]",Bn="[object Object]",Zt="[object Promise]",hi="[object Proxy]",Sn="[object RegExp]",Xn="[object Set]",ur="[object String]",Fr="[object Symbol]",vt="[object Undefined]",qe="[object WeakMap]",qt="[object WeakSet]",gn="[object ArrayBuffer]",Qn="[object DataView]",Br="[object Float32Array]",$r="[object Float64Array]",kn="[object Int8Array]",ir="[object Int16Array]",hr="[object Int32Array]",nn="[object Uint8Array]",or="[object Uint8ClampedArray]",$o="[object Uint16Array]",Ki="[object Uint32Array]",Gi=/\b__p \+= '';/g,Yi=/\b(__p \+=) '' \+/g,Mo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yr=/&(?:amp|lt|gt|quot|#39);/g,Ao=/[&<>"']/g,Jo=RegExp(yr.source),El=RegExp(Ao.source),di=/<%-([\s\S]+?)%>/g,Rl=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Ta=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xi=/^\w*$/,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,Qi=RegExp(Mr.source),_n=/^\s+/,Ar=/\s/,fo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zi=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ea=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ll=/[()=,{}\[\]\/\s]/,Ol=/\\(\\)?/g,Ji=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pi=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,Tr=/^\[object .+?Constructor\]$/,Wn=/^0o[0-7]+$/i,hn=/^(?:0|[1-9]\d*)$/,An=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ci=/($^)/,Er=/['\n\r\u2028\u2029\\]/g,$i="\\ud800-\\udfff",es="\\u0300-\\u036f",Us="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",ti=es+Us+go,To="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",ni="\\xac\\xb1\\xd7\\xf7",ns="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Vs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",Ks=ni+ns+qs+Vs,Eo="['’]",is="["+$i+"]",os="["+Ks+"]",mo="["+ti+"]",Gs="\\d+",La="["+To+"]",ss="["+ts+"]",as="[^"+$i+Ks+Gs+To+ts+rs+"]",Ys="\\ud83c[\\udffb-\\udfff]",ls="(?:"+mo+"|"+Ys+")",Ro="[^"+$i+"]",Mi="(?:\\ud83c[\\udde6-\\uddff]){2}",ar="[\\ud800-\\udbff][\\udc00-\\udfff]",yo="["+rs+"]",eo="\\u200d",Oa="(?:"+ss+"|"+as+")",Il="(?:"+yo+"|"+as+")",Lo="(?:"+Eo+"(?:d|ll|m|re|s|t|ve))?",to="(?:"+Eo+"(?:D|LL|M|RE|S|T|VE))?",Oo=ls+"?",cs="["+sr+"]?",Io="(?:"+eo+"(?:"+[Ro,Mi,ar].join("|")+")"+cs+Oo+")*",Ia="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=cs+Oo+Io,Na="(?:"+[La,Mi,ar].join("|")+")"+Be,De="(?:"+[Ro+mo+"?",mo,Mi,ar,is].join("|")+")",Cn=RegExp(Eo,"g"),No=RegExp(mo,"g"),fi=RegExp(Ys+"(?="+Ys+")|"+De+Be,"g"),zn=RegExp([yo+"?"+ss+"+"+Lo+"(?="+[os,yo,"$"].join("|")+")",Il+"+"+to+"(?="+[os,yo+Oa,"$"].join("|")+")",yo+"?"+Oa+"+"+Lo,yo+"+"+to,vo,Ia,Gs,Na].join("|"),"g"),Da=RegExp("["+eo+$i+ti+sr+"]"),Do=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ai=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],wo=-1,Yt={};Yt[Br]=Yt[$r]=Yt[kn]=Yt[ir]=Yt[hr]=Yt[nn]=Yt[or]=Yt[$o]=Yt[Ki]=!0,Yt[ue]=Yt[ce]=Yt[gn]=Yt[Ae]=Yt[Qn]=Yt[Te]=Yt[Xe]=Yt[Ke]=Yt[rt]=Yt[gt]=Yt[Bn]=Yt[Sn]=Yt[Xn]=Yt[ur]=Yt[qe]=!1;var Vt={};Vt[ue]=Vt[ce]=Vt[gn]=Vt[Qn]=Vt[Ae]=Vt[Te]=Vt[Br]=Vt[$r]=Vt[kn]=Vt[ir]=Vt[hr]=Vt[rt]=Vt[gt]=Vt[Bn]=Vt[Sn]=Vt[Xn]=Vt[ur]=Vt[Fr]=Vt[nn]=Vt[or]=Vt[$o]=Vt[Ki]=!0,Vt[Xe]=Vt[Ke]=Vt[qe]=!1;var Xt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ft={"&":"&","<":"<",">":">",'"':""","'":"'"},Ti={"&":"&","<":"<",">":">",""":'"',"'":"'"},Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,dn=parseInt,mt=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo,jr=typeof self=="object"&&self&&self.Object===Object&&self,on=mt||jr||Function("return this")(),mn=e&&!e.nodeType&&e,Zn=mn&&!0&&t&&!t.nodeType&&t,Wr=Zn&&Zn.exports===mn,Ei=Wr&&mt.process,En=(function(){try{var pe=Zn&&Zn.require&&Zn.require("util").types;return pe||Ei&&Ei.binding&&Ei.binding("util")}catch{}})(),ri=En&&En.isArrayBuffer,us=En&&En.isDate,Rn=En&&En.isMap,gi=En&&En.isRegExp,mi=En&&En.isSet,Ri=En&&En.isTypedArray;function dr(pe,Me,xe){switch(xe.length){case 0:return pe.call(Me);case 1:return pe.call(Me,xe[0]);case 2:return pe.call(Me,xe[0],xe[1]);case 3:return pe.call(Me,xe[0],xe[1],xe[2])}return pe.apply(Me,xe)}function pr(pe,Me,xe,ze){for(var ct=-1,Mt=pe==null?0:pe.length;++ct<Mt;){var Ht=pe[ct];Me(ze,Ht,xe(Ht),pe)}return ze}function vr(pe,Me){for(var xe=-1,ze=pe==null?0:pe.length;++xe<ze&&Me(pe[xe],xe,pe)!==!1;);return pe}function Xs(pe,Me){for(var xe=pe==null?0:pe.length;xe--&&Me(pe[xe],xe,pe)!==!1;);return pe}function wr(pe,Me){for(var xe=-1,ze=pe==null?0:pe.length;++xe<ze;)if(!Me(pe[xe],xe,pe))return!1;return!0}function Rr(pe,Me){for(var xe=-1,ze=pe==null?0:pe.length,ct=0,Mt=[];++xe<ze;){var Ht=pe[xe];Me(Ht,xe,pe)&&(Mt[ct++]=Ht)}return Mt}function yi(pe,Me){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Me,0)>-1}function vi(pe,Me,xe){for(var ze=-1,ct=pe==null?0:pe.length;++ze<ct;)if(xe(Me,pe[ze]))return!0;return!1}function v(pe,Me){for(var xe=-1,ze=pe==null?0:pe.length,ct=Array(ze);++xe<ze;)ct[xe]=Me(pe[xe],xe,pe);return ct}function A(pe,Me){for(var xe=-1,ze=Me.length,ct=pe.length;++xe<ze;)pe[ct+xe]=Me[xe];return pe}function C(pe,Me,xe,ze){var ct=-1,Mt=pe==null?0:pe.length;for(ze&&Mt&&(xe=pe[++ct]);++ct<Mt;)xe=Me(xe,pe[ct],ct,pe);return xe}function P(pe,Me,xe,ze){var ct=pe==null?0:pe.length;for(ze&&ct&&(xe=pe[--ct]);ct--;)xe=Me(xe,pe[ct],ct,pe);return xe}function B(pe,Me){for(var xe=-1,ze=pe==null?0:pe.length;++xe<ze;)if(Me(pe[xe],xe,pe))return!0;return!1}var j=we("length");function V(pe){return pe.split("")}function Y(pe){return pe.match(Ea)||[]}function Q(pe,Me,xe){var ze;return xe(pe,function(ct,Mt,Ht){if(Me(ct,Mt,Ht))return ze=Mt,!1}),ze}function re(pe,Me,xe,ze){for(var ct=pe.length,Mt=xe+(ze?1:-1);ze?Mt--:++Mt<ct;)if(Me(pe[Mt],Mt,pe))return Mt;return-1}function se(pe,Me,xe){return Me===Me?Qe(pe,Me,xe):re(pe,Se,xe)}function ve(pe,Me,xe,ze){for(var ct=xe-1,Mt=pe.length;++ct<Mt;)if(ze(pe[ct],Me))return ct;return-1}function Se(pe){return pe!==pe}function me(pe,Me){var xe=pe==null?0:pe.length;return xe?st(pe,Me)/xe:Z}function we(pe){return function(Me){return Me==null?n:Me[pe]}}function Ne(pe){return function(Me){return pe==null?n:pe[Me]}}function Ie(pe,Me,xe,ze,ct){return ct(pe,function(Mt,Ht,Tt){xe=ze?(ze=!1,Mt):Me(xe,Mt,Ht,Tt)}),xe}function He(pe,Me){var xe=pe.length;for(pe.sort(Me);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,Me){for(var xe,ze=-1,ct=pe.length;++ze<ct;){var Mt=Me(pe[ze]);Mt!==n&&(xe=xe===n?Mt:xe+Mt)}return xe}function Ye(pe,Me){for(var xe=-1,ze=Array(pe);++xe<pe;)ze[xe]=Me(xe);return ze}function Je(pe,Me){return v(Me,function(xe){return[xe,pe[xe]]})}function pn(pe){return pe&&pe.slice(0,Rt(pe)+1).replace(_n,"")}function lt(pe){return function(Me){return pe(Me)}}function vn(pe,Me){return v(Me,function(xe){return pe[xe]})}function wt(pe,Me){return pe.has(Me)}function $t(pe,Me){for(var xe=-1,ze=pe.length;++xe<ze&&se(Me,pe[xe],0)>-1;);return xe}function Jn(pe,Me){for(var xe=pe.length;xe--&&se(Me,pe[xe],0)>-1;);return xe}function fr(pe,Me){for(var xe=pe.length,ze=0;xe--;)pe[xe]===Me&&++ze;return ze}var wn=Ne(Xt),q=Ne(Ft);function X(pe){return"\\"+Tn[pe]}function ie(pe,Me){return pe==null?n:pe[Me]}function oe(pe){return Da.test(pe)}function fe(pe){return Do.test(pe)}function be(pe){for(var Me,xe=[];!(Me=pe.next()).done;)xe.push(Me.value);return xe}function Ee(pe){var Me=-1,xe=Array(pe.size);return pe.forEach(function(ze,ct){xe[++Me]=[ct,ze]}),xe}function Fe(pe,Me){return function(xe){return pe(Me(xe))}}function je(pe,Me){for(var xe=-1,ze=pe.length,ct=0,Mt=[];++xe<ze;){var Ht=pe[xe];(Ht===Me||Ht===i)&&(pe[xe]=i,Mt[ct++]=xe)}return Mt}function Ue(pe){var Me=-1,xe=Array(pe.size);return pe.forEach(function(ze){xe[++Me]=ze}),xe}function Ge(pe){var Me=-1,xe=Array(pe.size);return pe.forEach(function(ze){xe[++Me]=[ze,ze]}),xe}function Qe(pe,Me,xe){for(var ze=xe-1,ct=pe.length;++ze<ct;)if(pe[ze]===Me)return ze;return-1}function yt(pe,Me,xe){for(var ze=xe+1;ze--;)if(pe[ze]===Me)return ze;return ze}function Ot(pe){return oe(pe)?it(pe):j(pe)}function bt(pe){return oe(pe)?un(pe):V(pe)}function Rt(pe){for(var Me=pe.length;Me--&&Ar.test(pe.charAt(Me)););return Me}var ut=Ne(Ti);function it(pe){for(var Me=fi.lastIndex=0;fi.test(pe);)++Me;return Me}function un(pe){return pe.match(fi)||[]}function bn(pe){return pe.match(zn)||[]}var er=(function pe(Me){Me=Me==null?on:jt.defaults(on.Object(),Me,jt.pick(on,Ai));var xe=Me.Array,ze=Me.Date,ct=Me.Error,Mt=Me.Function,Ht=Me.Math,Tt=Me.Object,zr=Me.RegExp,Li=Me.String,sn=Me.TypeError,gr=xe.prototype,Po=Mt.prototype,Ln=Tt.prototype,Qs=Me["__core-js_shared__"],yu=Po.toString,rn=Ln.hasOwnProperty,b2=0,e0=(function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),vu=Ln.toString,x2=yu.call(Tt),S2=on._,k2=zr("^"+yu.call(rn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wu=Wr?Me.Buffer:n,hs=Me.Symbol,bu=Me.Uint8Array,t0=wu?wu.allocUnsafe:n,xu=Fe(Tt.getPrototypeOf,Tt),n0=Tt.create,r0=Ln.propertyIsEnumerable,Su=gr.splice,i0=hs?hs.isConcatSpreadable:n,Nl=hs?hs.iterator:n,Zs=hs?hs.toStringTag:n,ku=(function(){try{var s=ra(Tt,"defineProperty");return s({},"",{}),s}catch{}})(),_2=Me.clearTimeout!==on.clearTimeout&&Me.clearTimeout,C2=ze&&ze.now!==on.Date.now&&ze.now,$2=Me.setTimeout!==on.setTimeout&&Me.setTimeout,_u=Ht.ceil,Cu=Ht.floor,Lp=Tt.getOwnPropertySymbols,M2=wu?wu.isBuffer:n,o0=Me.isFinite,A2=gr.join,T2=Fe(Tt.keys,Tt),lr=Ht.max,Lr=Ht.min,E2=ze.now,R2=Me.parseInt,s0=Ht.random,L2=gr.reverse,Op=ra(Me,"DataView"),Dl=ra(Me,"Map"),Ip=ra(Me,"Promise"),Pa=ra(Me,"Set"),Pl=ra(Me,"WeakMap"),Fl=ra(Tt,"create"),$u=Pl&&new Pl,Fa={},O2=ia(Op),I2=ia(Dl),N2=ia(Ip),D2=ia(Pa),P2=ia(Pl),Mu=hs?hs.prototype:n,Bl=Mu?Mu.valueOf:n,a0=Mu?Mu.toString:n;function J(s){if(On(s)&&!xt(s)&&!(s instanceof Bt)){if(s instanceof Oi)return s;if(rn.call(s,"__wrapped__"))return lx(s)}return new Oi(s)}var Ba=(function(){function s(){}return function(y){if(!$n(y))return{};if(n0)return n0(y);s.prototype=y;var T=new s;return s.prototype=n,T}})();function Au(){}function Oi(s,y){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=n}J.templateSettings={escape:di,evaluate:Rl,interpolate:zs,variable:"",imports:{_:J}},J.prototype=Au.prototype,J.prototype.constructor=J,Oi.prototype=Ba(Au.prototype),Oi.prototype.constructor=Oi;function Bt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function F2(){var s=new Bt(this.__wrapped__);return s.__actions__=ii(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=ii(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=ii(this.__views__),s}function B2(){if(this.__filtered__){var s=new Bt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function j2(){var s=this.__wrapped__.value(),y=this.__dir__,T=xt(s),H=y<0,K=T?s.length:0,ee=ZI(0,K,this.__views__),ae=ee.start,de=ee.end,ye=de-ae,Le=H?de:ae-1,Oe=this.__iteratees__,Pe=Oe.length,Ve=0,nt=Lr(ye,this.__takeCount__);if(!T||!H&&K==ye&&nt==ye)return R0(s,this.__actions__);var pt=[];e:for(;ye--&&Ve<nt;){Le+=y;for(var Et=-1,ft=s[Le];++Et<Pe;){var Nt=Oe[Et],Wt=Nt.iteratee,xi=Nt.type,qr=Wt(ft);if(xi==_)ft=qr;else if(!qr){if(xi==$)continue e;break e}}pt[Ve++]=ft}return pt}Bt.prototype=Ba(Au.prototype),Bt.prototype.constructor=Bt;function Js(s){var y=-1,T=s==null?0:s.length;for(this.clear();++y<T;){var H=s[y];this.set(H[0],H[1])}}function W2(){this.__data__=Fl?Fl(null):{},this.size=0}function z2(s){var y=this.has(s)&&delete this.__data__[s];return this.size-=y?1:0,y}function H2(s){var y=this.__data__;if(Fl){var T=y[s];return T===p?n:T}return rn.call(y,s)?y[s]:n}function U2(s){var y=this.__data__;return Fl?y[s]!==n:rn.call(y,s)}function q2(s,y){var T=this.__data__;return this.size+=this.has(s)?0:1,T[s]=Fl&&y===n?p:y,this}Js.prototype.clear=W2,Js.prototype.delete=z2,Js.prototype.get=H2,Js.prototype.has=U2,Js.prototype.set=q2;function Fo(s){var y=-1,T=s==null?0:s.length;for(this.clear();++y<T;){var H=s[y];this.set(H[0],H[1])}}function V2(){this.__data__=[],this.size=0}function K2(s){var y=this.__data__,T=Tu(y,s);if(T<0)return!1;var H=y.length-1;return T==H?y.pop():Su.call(y,T,1),--this.size,!0}function G2(s){var y=this.__data__,T=Tu(y,s);return T<0?n:y[T][1]}function Y2(s){return Tu(this.__data__,s)>-1}function X2(s,y){var T=this.__data__,H=Tu(T,s);return H<0?(++this.size,T.push([s,y])):T[H][1]=y,this}Fo.prototype.clear=V2,Fo.prototype.delete=K2,Fo.prototype.get=G2,Fo.prototype.has=Y2,Fo.prototype.set=X2;function Bo(s){var y=-1,T=s==null?0:s.length;for(this.clear();++y<T;){var H=s[y];this.set(H[0],H[1])}}function Q2(){this.size=0,this.__data__={hash:new Js,map:new(Dl||Fo),string:new Js}}function Z2(s){var y=Wu(this,s).delete(s);return this.size-=y?1:0,y}function J2(s){return Wu(this,s).get(s)}function eI(s){return Wu(this,s).has(s)}function tI(s,y){var T=Wu(this,s),H=T.size;return T.set(s,y),this.size+=T.size==H?0:1,this}Bo.prototype.clear=Q2,Bo.prototype.delete=Z2,Bo.prototype.get=J2,Bo.prototype.has=eI,Bo.prototype.set=tI;function ea(s){var y=-1,T=s==null?0:s.length;for(this.__data__=new Bo;++y<T;)this.add(s[y])}function nI(s){return this.__data__.set(s,p),this}function rI(s){return this.__data__.has(s)}ea.prototype.add=ea.prototype.push=nI,ea.prototype.has=rI;function no(s){var y=this.__data__=new Fo(s);this.size=y.size}function iI(){this.__data__=new Fo,this.size=0}function oI(s){var y=this.__data__,T=y.delete(s);return this.size=y.size,T}function sI(s){return this.__data__.get(s)}function aI(s){return this.__data__.has(s)}function lI(s,y){var T=this.__data__;if(T instanceof Fo){var H=T.__data__;if(!Dl||H.length<h-1)return H.push([s,y]),this.size=++T.size,this;T=this.__data__=new Bo(H)}return T.set(s,y),this.size=T.size,this}no.prototype.clear=iI,no.prototype.delete=oI,no.prototype.get=sI,no.prototype.has=aI,no.prototype.set=lI;function l0(s,y){var T=xt(s),H=!T&&oa(s),K=!T&&!H&&ms(s),ee=!T&&!H&&!K&&Ha(s),ae=T||H||K||ee,de=ae?Ye(s.length,Li):[],ye=de.length;for(var Le in s)(y||rn.call(s,Le))&&!(ae&&(Le=="length"||K&&(Le=="offset"||Le=="parent")||ee&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Ho(Le,ye)))&&de.push(Le);return de}function c0(s){var y=s.length;return y?s[qp(0,y-1)]:n}function cI(s,y){return zu(ii(s),ta(y,0,s.length))}function uI(s){return zu(ii(s))}function Np(s,y,T){(T!==n&&!ro(s[y],T)||T===n&&!(y in s))&&jo(s,y,T)}function jl(s,y,T){var H=s[y];(!(rn.call(s,y)&&ro(H,T))||T===n&&!(y in s))&&jo(s,y,T)}function Tu(s,y){for(var T=s.length;T--;)if(ro(s[T][0],y))return T;return-1}function hI(s,y,T,H){return ds(s,function(K,ee,ae){y(H,K,T(K),ae)}),H}function u0(s,y){return s&&xo(y,mr(y),s)}function dI(s,y){return s&&xo(y,si(y),s)}function jo(s,y,T){y=="__proto__"&&ku?ku(s,y,{configurable:!0,enumerable:!0,value:T,writable:!0}):s[y]=T}function Dp(s,y){for(var T=-1,H=y.length,K=xe(H),ee=s==null;++T<H;)K[T]=ee?n:yf(s,y[T]);return K}function ta(s,y,T){return s===s&&(T!==n&&(s=s<=T?s:T),y!==n&&(s=s>=y?s:y)),s}function Ii(s,y,T,H,K,ee){var ae,de=y&a,ye=y&u,Le=y&c;if(T&&(ae=K?T(s,H,K,ee):T(s)),ae!==n)return ae;if(!$n(s))return s;var Oe=xt(s);if(Oe){if(ae=eN(s),!de)return ii(s,ae)}else{var Pe=Or(s),Ve=Pe==Ke||Pe==dt;if(ms(s))return I0(s,de);if(Pe==Bn||Pe==ue||Ve&&!K){if(ae=ye||Ve?{}:J0(s),!de)return ye?HI(s,dI(ae,s)):zI(s,u0(ae,s))}else{if(!Vt[Pe])return K?s:{};ae=tN(s,Pe,de)}}ee||(ee=new no);var nt=ee.get(s);if(nt)return nt;ee.set(s,ae),Ax(s)?s.forEach(function(ft){ae.add(Ii(ft,y,T,ft,s,ee))}):$x(s)&&s.forEach(function(ft,Nt){ae.set(Nt,Ii(ft,y,T,Nt,s,ee))});var pt=Le?ye?nf:tf:ye?si:mr,Et=Oe?n:pt(s);return vr(Et||s,function(ft,Nt){Et&&(Nt=ft,ft=s[Nt]),jl(ae,Nt,Ii(ft,y,T,Nt,s,ee))}),ae}function pI(s){var y=mr(s);return function(T){return h0(T,s,y)}}function h0(s,y,T){var H=T.length;if(s==null)return!H;for(s=Tt(s);H--;){var K=T[H],ee=y[K],ae=s[K];if(ae===n&&!(K in s)||!ee(ae))return!1}return!0}function d0(s,y,T){if(typeof s!="function")throw new sn(f);return Kl(function(){s.apply(n,T)},y)}function Wl(s,y,T,H){var K=-1,ee=yi,ae=!0,de=s.length,ye=[],Le=y.length;if(!de)return ye;T&&(y=v(y,lt(T))),H?(ee=vi,ae=!1):y.length>=h&&(ee=wt,ae=!1,y=new ea(y));e:for(;++K<de;){var Oe=s[K],Pe=T==null?Oe:T(Oe);if(Oe=H||Oe!==0?Oe:0,ae&&Pe===Pe){for(var Ve=Le;Ve--;)if(y[Ve]===Pe)continue e;ye.push(Oe)}else ee(y,Pe,H)||ye.push(Oe)}return ye}var ds=B0(bo),p0=B0(Fp,!0);function fI(s,y){var T=!0;return ds(s,function(H,K,ee){return T=!!y(H,K,ee),T}),T}function Eu(s,y,T){for(var H=-1,K=s.length;++H<K;){var ee=s[H],ae=y(ee);if(ae!=null&&(de===n?ae===ae&&!bi(ae):T(ae,de)))var de=ae,ye=ee}return ye}function gI(s,y,T,H){var K=s.length;for(T=At(T),T<0&&(T=-T>K?0:K+T),H=H===n||H>K?K:At(H),H<0&&(H+=K),H=T>H?0:Ex(H);T<H;)s[T++]=y;return s}function f0(s,y){var T=[];return ds(s,function(H,K,ee){y(H,K,ee)&&T.push(H)}),T}function br(s,y,T,H,K){var ee=-1,ae=s.length;for(T||(T=rN),K||(K=[]);++ee<ae;){var de=s[ee];y>0&&T(de)?y>1?br(de,y-1,T,H,K):A(K,de):H||(K[K.length]=de)}return K}var Pp=j0(),g0=j0(!0);function bo(s,y){return s&&Pp(s,y,mr)}function Fp(s,y){return s&&g0(s,y,mr)}function Ru(s,y){return Rr(y,function(T){return Uo(s[T])})}function na(s,y){y=fs(y,s);for(var T=0,H=y.length;s!=null&&T<H;)s=s[So(y[T++])];return T&&T==H?s:n}function m0(s,y,T){var H=y(s);return xt(s)?H:A(H,T(s))}function Hr(s){return s==null?s===n?vt:tn:Zs&&Zs in Tt(s)?QI(s):uN(s)}function Bp(s,y){return s>y}function mI(s,y){return s!=null&&rn.call(s,y)}function yI(s,y){return s!=null&&y in Tt(s)}function vI(s,y,T){return s>=Lr(y,T)&&s<lr(y,T)}function jp(s,y,T){for(var H=T?vi:yi,K=s[0].length,ee=s.length,ae=ee,de=xe(ee),ye=1/0,Le=[];ae--;){var Oe=s[ae];ae&&y&&(Oe=v(Oe,lt(y))),ye=Lr(Oe.length,ye),de[ae]=!T&&(y||K>=120&&Oe.length>=120)?new ea(ae&&Oe):n}Oe=s[0];var Pe=-1,Ve=de[0];e:for(;++Pe<K&&Le.length<ye;){var nt=Oe[Pe],pt=y?y(nt):nt;if(nt=T||nt!==0?nt:0,!(Ve?wt(Ve,pt):H(Le,pt,T))){for(ae=ee;--ae;){var Et=de[ae];if(!(Et?wt(Et,pt):H(s[ae],pt,T)))continue e}Ve&&Ve.push(pt),Le.push(nt)}}return Le}function wI(s,y,T,H){return bo(s,function(K,ee,ae){y(H,T(K),ee,ae)}),H}function zl(s,y,T){y=fs(y,s),s=rx(s,y);var H=s==null?s:s[So(Di(y))];return H==null?n:dr(H,s,T)}function y0(s){return On(s)&&Hr(s)==ue}function bI(s){return On(s)&&Hr(s)==gn}function xI(s){return On(s)&&Hr(s)==Te}function Hl(s,y,T,H,K){return s===y?!0:s==null||y==null||!On(s)&&!On(y)?s!==s&&y!==y:SI(s,y,T,H,Hl,K)}function SI(s,y,T,H,K,ee){var ae=xt(s),de=xt(y),ye=ae?ce:Or(s),Le=de?ce:Or(y);ye=ye==ue?Bn:ye,Le=Le==ue?Bn:Le;var Oe=ye==Bn,Pe=Le==Bn,Ve=ye==Le;if(Ve&&ms(s)){if(!ms(y))return!1;ae=!0,Oe=!1}if(Ve&&!Oe)return ee||(ee=new no),ae||Ha(s)?X0(s,y,T,H,K,ee):YI(s,y,ye,T,H,K,ee);if(!(T&o)){var nt=Oe&&rn.call(s,"__wrapped__"),pt=Pe&&rn.call(y,"__wrapped__");if(nt||pt){var Et=nt?s.value():s,ft=pt?y.value():y;return ee||(ee=new no),K(Et,ft,T,H,ee)}}return Ve?(ee||(ee=new no),XI(s,y,T,H,K,ee)):!1}function kI(s){return On(s)&&Or(s)==rt}function Wp(s,y,T,H){var K=T.length,ee=K,ae=!H;if(s==null)return!ee;for(s=Tt(s);K--;){var de=T[K];if(ae&&de[2]?de[1]!==s[de[0]]:!(de[0]in s))return!1}for(;++K<ee;){de=T[K];var ye=de[0],Le=s[ye],Oe=de[1];if(ae&&de[2]){if(Le===n&&!(ye in s))return!1}else{var Pe=new no;if(H)var Ve=H(Le,Oe,ye,s,y,Pe);if(!(Ve===n?Hl(Oe,Le,o|l,H,Pe):Ve))return!1}}return!0}function v0(s){if(!$n(s)||oN(s))return!1;var y=Uo(s)?k2:Tr;return y.test(ia(s))}function _I(s){return On(s)&&Hr(s)==Sn}function CI(s){return On(s)&&Or(s)==Xn}function $I(s){return On(s)&&Gu(s.length)&&!!Yt[Hr(s)]}function w0(s){return typeof s=="function"?s:s==null?ai:typeof s=="object"?xt(s)?S0(s[0],s[1]):x0(s):Wx(s)}function zp(s){if(!Vl(s))return T2(s);var y=[];for(var T in Tt(s))rn.call(s,T)&&T!="constructor"&&y.push(T);return y}function MI(s){if(!$n(s))return cN(s);var y=Vl(s),T=[];for(var H in s)H=="constructor"&&(y||!rn.call(s,H))||T.push(H);return T}function Hp(s,y){return s<y}function b0(s,y){var T=-1,H=oi(s)?xe(s.length):[];return ds(s,function(K,ee,ae){H[++T]=y(K,ee,ae)}),H}function x0(s){var y=of(s);return y.length==1&&y[0][2]?tx(y[0][0],y[0][1]):function(T){return T===s||Wp(T,s,y)}}function S0(s,y){return af(s)&&ex(y)?tx(So(s),y):function(T){var H=yf(T,s);return H===n&&H===y?vf(T,s):Hl(y,H,o|l)}}function Lu(s,y,T,H,K){s!==y&&Pp(y,function(ee,ae){if(K||(K=new no),$n(ee))AI(s,y,ae,T,Lu,H,K);else{var de=H?H(cf(s,ae),ee,ae+"",s,y,K):n;de===n&&(de=ee),Np(s,ae,de)}},si)}function AI(s,y,T,H,K,ee,ae){var de=cf(s,T),ye=cf(y,T),Le=ae.get(ye);if(Le){Np(s,T,Le);return}var Oe=ee?ee(de,ye,T+"",s,y,ae):n,Pe=Oe===n;if(Pe){var Ve=xt(ye),nt=!Ve&&ms(ye),pt=!Ve&&!nt&&Ha(ye);Oe=ye,Ve||nt||pt?xt(de)?Oe=de:Hn(de)?Oe=ii(de):nt?(Pe=!1,Oe=I0(ye,!0)):pt?(Pe=!1,Oe=N0(ye,!0)):Oe=[]:Gl(ye)||oa(ye)?(Oe=de,oa(de)?Oe=Rx(de):(!$n(de)||Uo(de))&&(Oe=J0(ye))):Pe=!1}Pe&&(ae.set(ye,Oe),K(Oe,ye,H,ee,ae),ae.delete(ye)),Np(s,T,Oe)}function k0(s,y){var T=s.length;if(T)return y+=y<0?T:0,Ho(y,T)?s[y]:n}function _0(s,y,T){y.length?y=v(y,function(ee){return xt(ee)?function(ae){return na(ae,ee.length===1?ee[0]:ee)}:ee}):y=[ai];var H=-1;y=v(y,lt(ht()));var K=b0(s,function(ee,ae,de){var ye=v(y,function(Le){return Le(ee)});return{criteria:ye,index:++H,value:ee}});return He(K,function(ee,ae){return WI(ee,ae,T)})}function TI(s,y){return C0(s,y,function(T,H){return vf(s,H)})}function C0(s,y,T){for(var H=-1,K=y.length,ee={};++H<K;){var ae=y[H],de=na(s,ae);T(de,ae)&&Ul(ee,fs(ae,s),de)}return ee}function EI(s){return function(y){return na(y,s)}}function Up(s,y,T,H){var K=H?ve:se,ee=-1,ae=y.length,de=s;for(s===y&&(y=ii(y)),T&&(de=v(s,lt(T)));++ee<ae;)for(var ye=0,Le=y[ee],Oe=T?T(Le):Le;(ye=K(de,Oe,ye,H))>-1;)de!==s&&Su.call(de,ye,1),Su.call(s,ye,1);return s}function $0(s,y){for(var T=s?y.length:0,H=T-1;T--;){var K=y[T];if(T==H||K!==ee){var ee=K;Ho(K)?Su.call(s,K,1):Gp(s,K)}}return s}function qp(s,y){return s+Cu(s0()*(y-s+1))}function RI(s,y,T,H){for(var K=-1,ee=lr(_u((y-s)/(T||1)),0),ae=xe(ee);ee--;)ae[H?ee:++K]=s,s+=T;return ae}function Vp(s,y){var T="";if(!s||y<1||y>U)return T;do y%2&&(T+=s),y=Cu(y/2),y&&(s+=s);while(y);return T}function Lt(s,y){return uf(nx(s,y,ai),s+"")}function LI(s){return c0(Ua(s))}function OI(s,y){var T=Ua(s);return zu(T,ta(y,0,T.length))}function Ul(s,y,T,H){if(!$n(s))return s;y=fs(y,s);for(var K=-1,ee=y.length,ae=ee-1,de=s;de!=null&&++K<ee;){var ye=So(y[K]),Le=T;if(ye==="__proto__"||ye==="constructor"||ye==="prototype")return s;if(K!=ae){var Oe=de[ye];Le=H?H(Oe,ye,de):n,Le===n&&(Le=$n(Oe)?Oe:Ho(y[K+1])?[]:{})}jl(de,ye,Le),de=de[ye]}return s}var M0=$u?function(s,y){return $u.set(s,y),s}:ai,II=ku?function(s,y){return ku(s,"toString",{configurable:!0,enumerable:!1,value:bf(y),writable:!0})}:ai;function NI(s){return zu(Ua(s))}function Ni(s,y,T){var H=-1,K=s.length;y<0&&(y=-y>K?0:K+y),T=T>K?K:T,T<0&&(T+=K),K=y>T?0:T-y>>>0,y>>>=0;for(var ee=xe(K);++H<K;)ee[H]=s[H+y];return ee}function DI(s,y){var T;return ds(s,function(H,K,ee){return T=y(H,K,ee),!T}),!!T}function Ou(s,y,T){var H=0,K=s==null?H:s.length;if(typeof y=="number"&&y===y&&K<=ne){for(;H<K;){var ee=H+K>>>1,ae=s[ee];ae!==null&&!bi(ae)&&(T?ae<=y:ae<y)?H=ee+1:K=ee}return K}return Kp(s,y,ai,T)}function Kp(s,y,T,H){var K=0,ee=s==null?0:s.length;if(ee===0)return 0;y=T(y);for(var ae=y!==y,de=y===null,ye=bi(y),Le=y===n;K<ee;){var Oe=Cu((K+ee)/2),Pe=T(s[Oe]),Ve=Pe!==n,nt=Pe===null,pt=Pe===Pe,Et=bi(Pe);if(ae)var ft=H||pt;else Le?ft=pt&&(H||Ve):de?ft=pt&&Ve&&(H||!nt):ye?ft=pt&&Ve&&!nt&&(H||!Et):nt||Et?ft=!1:ft=H?Pe<=y:Pe<y;ft?K=Oe+1:ee=Oe}return Lr(ee,he)}function A0(s,y){for(var T=-1,H=s.length,K=0,ee=[];++T<H;){var ae=s[T],de=y?y(ae):ae;if(!T||!ro(de,ye)){var ye=de;ee[K++]=ae===0?0:ae}}return ee}function T0(s){return typeof s=="number"?s:bi(s)?Z:+s}function wi(s){if(typeof s=="string")return s;if(xt(s))return v(s,wi)+"";if(bi(s))return a0?a0.call(s):"";var y=s+"";return y=="0"&&1/s==-z?"-0":y}function ps(s,y,T){var H=-1,K=yi,ee=s.length,ae=!0,de=[],ye=de;if(T)ae=!1,K=vi;else if(ee>=h){var Le=y?null:KI(s);if(Le)return Ue(Le);ae=!1,K=wt,ye=new ea}else ye=y?[]:de;e:for(;++H<ee;){var Oe=s[H],Pe=y?y(Oe):Oe;if(Oe=T||Oe!==0?Oe:0,ae&&Pe===Pe){for(var Ve=ye.length;Ve--;)if(ye[Ve]===Pe)continue e;y&&ye.push(Pe),de.push(Oe)}else K(ye,Pe,T)||(ye!==de&&ye.push(Pe),de.push(Oe))}return de}function Gp(s,y){return y=fs(y,s),s=rx(s,y),s==null||delete s[So(Di(y))]}function E0(s,y,T,H){return Ul(s,y,T(na(s,y)),H)}function Iu(s,y,T,H){for(var K=s.length,ee=H?K:-1;(H?ee--:++ee<K)&&y(s[ee],ee,s););return T?Ni(s,H?0:ee,H?ee+1:K):Ni(s,H?ee+1:0,H?K:ee)}function R0(s,y){var T=s;return T instanceof Bt&&(T=T.value()),C(y,function(H,K){return K.func.apply(K.thisArg,A([H],K.args))},T)}function Yp(s,y,T){var H=s.length;if(H<2)return H?ps(s[0]):[];for(var K=-1,ee=xe(H);++K<H;)for(var ae=s[K],de=-1;++de<H;)de!=K&&(ee[K]=Wl(ee[K]||ae,s[de],y,T));return ps(br(ee,1),y,T)}function L0(s,y,T){for(var H=-1,K=s.length,ee=y.length,ae={};++H<K;){var de=H<ee?y[H]:n;T(ae,s[H],de)}return ae}function Xp(s){return Hn(s)?s:[]}function Qp(s){return typeof s=="function"?s:ai}function fs(s,y){return xt(s)?s:af(s,y)?[s]:ax(Jt(s))}var PI=Lt;function gs(s,y,T){var H=s.length;return T=T===n?H:T,!y&&T>=H?s:Ni(s,y,T)}var O0=_2||function(s){return on.clearTimeout(s)};function I0(s,y){if(y)return s.slice();var T=s.length,H=t0?t0(T):new s.constructor(T);return s.copy(H),H}function Zp(s){var y=new s.constructor(s.byteLength);return new bu(y).set(new bu(s)),y}function FI(s,y){var T=y?Zp(s.buffer):s.buffer;return new s.constructor(T,s.byteOffset,s.byteLength)}function BI(s){var y=new s.constructor(s.source,pi.exec(s));return y.lastIndex=s.lastIndex,y}function jI(s){return Bl?Tt(Bl.call(s)):{}}function N0(s,y){var T=y?Zp(s.buffer):s.buffer;return new s.constructor(T,s.byteOffset,s.length)}function D0(s,y){if(s!==y){var T=s!==n,H=s===null,K=s===s,ee=bi(s),ae=y!==n,de=y===null,ye=y===y,Le=bi(y);if(!de&&!Le&&!ee&&s>y||ee&&ae&&ye&&!de&&!Le||H&&ae&&ye||!T&&ye||!K)return 1;if(!H&&!ee&&!Le&&s<y||Le&&T&&K&&!H&&!ee||de&&T&&K||!ae&&K||!ye)return-1}return 0}function WI(s,y,T){for(var H=-1,K=s.criteria,ee=y.criteria,ae=K.length,de=T.length;++H<ae;){var ye=D0(K[H],ee[H]);if(ye){if(H>=de)return ye;var Le=T[H];return ye*(Le=="desc"?-1:1)}}return s.index-y.index}function P0(s,y,T,H){for(var K=-1,ee=s.length,ae=T.length,de=-1,ye=y.length,Le=lr(ee-ae,0),Oe=xe(ye+Le),Pe=!H;++de<ye;)Oe[de]=y[de];for(;++K<ae;)(Pe||K<ee)&&(Oe[T[K]]=s[K]);for(;Le--;)Oe[de++]=s[K++];return Oe}function F0(s,y,T,H){for(var K=-1,ee=s.length,ae=-1,de=T.length,ye=-1,Le=y.length,Oe=lr(ee-de,0),Pe=xe(Oe+Le),Ve=!H;++K<Oe;)Pe[K]=s[K];for(var nt=K;++ye<Le;)Pe[nt+ye]=y[ye];for(;++ae<de;)(Ve||K<ee)&&(Pe[nt+T[ae]]=s[K++]);return Pe}function ii(s,y){var T=-1,H=s.length;for(y||(y=xe(H));++T<H;)y[T]=s[T];return y}function xo(s,y,T,H){var K=!T;T||(T={});for(var ee=-1,ae=y.length;++ee<ae;){var de=y[ee],ye=H?H(T[de],s[de],de,T,s):n;ye===n&&(ye=s[de]),K?jo(T,de,ye):jl(T,de,ye)}return T}function zI(s,y){return xo(s,sf(s),y)}function HI(s,y){return xo(s,Q0(s),y)}function Nu(s,y){return function(T,H){var K=xt(T)?pr:hI,ee=y?y():{};return K(T,s,ht(H,2),ee)}}function ja(s){return Lt(function(y,T){var H=-1,K=T.length,ee=K>1?T[K-1]:n,ae=K>2?T[2]:n;for(ee=s.length>3&&typeof ee=="function"?(K--,ee):n,ae&&Ur(T[0],T[1],ae)&&(ee=K<3?n:ee,K=1),y=Tt(y);++H<K;){var de=T[H];de&&s(y,de,H,ee)}return y})}function B0(s,y){return function(T,H){if(T==null)return T;if(!oi(T))return s(T,H);for(var K=T.length,ee=y?K:-1,ae=Tt(T);(y?ee--:++ee<K)&&H(ae[ee],ee,ae)!==!1;);return T}}function j0(s){return function(y,T,H){for(var K=-1,ee=Tt(y),ae=H(y),de=ae.length;de--;){var ye=ae[s?de:++K];if(T(ee[ye],ye,ee)===!1)break}return y}}function UI(s,y,T){var H=y&m,K=ql(s);function ee(){var ae=this&&this!==on&&this instanceof ee?K:s;return ae.apply(H?T:this,arguments)}return ee}function W0(s){return function(y){y=Jt(y);var T=oe(y)?bt(y):n,H=T?T[0]:y.charAt(0),K=T?gs(T,1).join(""):y.slice(1);return H[s]()+K}}function Wa(s){return function(y){return C(Bx(Fx(y).replace(Cn,"")),s,"")}}function ql(s){return function(){var y=arguments;switch(y.length){case 0:return new s;case 1:return new s(y[0]);case 2:return new s(y[0],y[1]);case 3:return new s(y[0],y[1],y[2]);case 4:return new s(y[0],y[1],y[2],y[3]);case 5:return new s(y[0],y[1],y[2],y[3],y[4]);case 6:return new s(y[0],y[1],y[2],y[3],y[4],y[5]);case 7:return new s(y[0],y[1],y[2],y[3],y[4],y[5],y[6])}var T=Ba(s.prototype),H=s.apply(T,y);return $n(H)?H:T}}function qI(s,y,T){var H=ql(s);function K(){for(var ee=arguments.length,ae=xe(ee),de=ee,ye=za(K);de--;)ae[de]=arguments[de];var Le=ee<3&&ae[0]!==ye&&ae[ee-1]!==ye?[]:je(ae,ye);if(ee-=Le.length,ee<T)return V0(s,y,Du,K.placeholder,n,ae,Le,n,n,T-ee);var Oe=this&&this!==on&&this instanceof K?H:s;return dr(Oe,this,ae)}return K}function z0(s){return function(y,T,H){var K=Tt(y);if(!oi(y)){var ee=ht(T,3);y=mr(y),T=function(de){return ee(K[de],de,K)}}var ae=s(y,T,H);return ae>-1?K[ee?y[ae]:ae]:n}}function H0(s){return zo(function(y){var T=y.length,H=T,K=Oi.prototype.thru;for(s&&y.reverse();H--;){var ee=y[H];if(typeof ee!="function")throw new sn(f);if(K&&!ae&&ju(ee)=="wrapper")var ae=new Oi([],!0)}for(H=ae?H:T;++H<T;){ee=y[H];var de=ju(ee),ye=de=="wrapper"?rf(ee):n;ye&&lf(ye[0])&&ye[1]==(R|E|k|I)&&!ye[4].length&&ye[9]==1?ae=ae[ju(ye[0])].apply(ae,ye[3]):ae=ee.length==1&&lf(ee)?ae[de]():ae.thru(ee)}return function(){var Le=arguments,Oe=Le[0];if(ae&&Le.length==1&&xt(Oe))return ae.plant(Oe).value();for(var Pe=0,Ve=T?y[Pe].apply(this,Le):Oe;++Pe<T;)Ve=y[Pe].call(this,Ve);return Ve}})}function Du(s,y,T,H,K,ee,ae,de,ye,Le){var Oe=y&R,Pe=y&m,Ve=y&b,nt=y&(E|M),pt=y&O,Et=Ve?n:ql(s);function ft(){for(var Nt=arguments.length,Wt=xe(Nt),xi=Nt;xi--;)Wt[xi]=arguments[xi];if(nt)var qr=za(ft),Si=fr(Wt,qr);if(H&&(Wt=P0(Wt,H,K,nt)),ee&&(Wt=F0(Wt,ee,ae,nt)),Nt-=Si,nt&&Nt<Le){var Un=je(Wt,qr);return V0(s,y,Du,ft.placeholder,T,Wt,Un,de,ye,Le-Nt)}var io=Pe?T:this,Vo=Ve?io[s]:s;return Nt=Wt.length,de?Wt=hN(Wt,de):pt&&Nt>1&&Wt.reverse(),Oe&&ye<Nt&&(Wt.length=ye),this&&this!==on&&this instanceof ft&&(Vo=Et||ql(Vo)),Vo.apply(io,Wt)}return ft}function U0(s,y){return function(T,H){return wI(T,s,y(H),{})}}function Pu(s,y){return function(T,H){var K;if(T===n&&H===n)return y;if(T!==n&&(K=T),H!==n){if(K===n)return H;typeof T=="string"||typeof H=="string"?(T=wi(T),H=wi(H)):(T=T0(T),H=T0(H)),K=s(T,H)}return K}}function Jp(s){return zo(function(y){return y=v(y,lt(ht())),Lt(function(T){var H=this;return s(y,function(K){return dr(K,H,T)})})})}function Fu(s,y){y=y===n?" ":wi(y);var T=y.length;if(T<2)return T?Vp(y,s):y;var H=Vp(y,_u(s/Ot(y)));return oe(y)?gs(bt(H),0,s).join(""):H.slice(0,s)}function VI(s,y,T,H){var K=y&m,ee=ql(s);function ae(){for(var de=-1,ye=arguments.length,Le=-1,Oe=H.length,Pe=xe(Oe+ye),Ve=this&&this!==on&&this instanceof ae?ee:s;++Le<Oe;)Pe[Le]=H[Le];for(;ye--;)Pe[Le++]=arguments[++de];return dr(Ve,K?T:this,Pe)}return ae}function q0(s){return function(y,T,H){return H&&typeof H!="number"&&Ur(y,T,H)&&(T=H=n),y=qo(y),T===n?(T=y,y=0):T=qo(T),H=H===n?y<T?1:-1:qo(H),RI(y,T,H,s)}}function Bu(s){return function(y,T){return typeof y=="string"&&typeof T=="string"||(y=Pi(y),T=Pi(T)),s(y,T)}}function V0(s,y,T,H,K,ee,ae,de,ye,Le){var Oe=y&E,Pe=Oe?ae:n,Ve=Oe?n:ae,nt=Oe?ee:n,pt=Oe?n:ee;y|=Oe?k:x,y&=~(Oe?x:k),y&S||(y&=-4);var Et=[s,y,K,nt,Pe,pt,Ve,de,ye,Le],ft=T.apply(n,Et);return lf(s)&&ix(ft,Et),ft.placeholder=H,ox(ft,s,y)}function ef(s){var y=Ht[s];return function(T,H){if(T=Pi(T),H=H==null?0:Lr(At(H),292),H&&o0(T)){var K=(Jt(T)+"e").split("e"),ee=y(K[0]+"e"+(+K[1]+H));return K=(Jt(ee)+"e").split("e"),+(K[0]+"e"+(+K[1]-H))}return y(T)}}var KI=Pa&&1/Ue(new Pa([,-0]))[1]==z?function(s){return new Pa(s)}:kf;function K0(s){return function(y){var T=Or(y);return T==rt?Ee(y):T==Xn?Ge(y):Je(y,s(y))}}function Wo(s,y,T,H,K,ee,ae,de){var ye=y&b;if(!ye&&typeof s!="function")throw new sn(f);var Le=H?H.length:0;if(Le||(y&=-97,H=K=n),ae=ae===n?ae:lr(At(ae),0),de=de===n?de:At(de),Le-=K?K.length:0,y&x){var Oe=H,Pe=K;H=K=n}var Ve=ye?n:rf(s),nt=[s,y,T,H,K,Oe,Pe,ee,ae,de];if(Ve&&lN(nt,Ve),s=nt[0],y=nt[1],T=nt[2],H=nt[3],K=nt[4],de=nt[9]=nt[9]===n?ye?0:s.length:lr(nt[9]-Le,0),!de&&y&(E|M)&&(y&=-25),!y||y==m)var pt=UI(s,y,T);else y==E||y==M?pt=qI(s,y,de):(y==k||y==(m|k))&&!K.length?pt=VI(s,y,T,H):pt=Du.apply(n,nt);var Et=Ve?M0:ix;return ox(Et(pt,nt),s,y)}function G0(s,y,T,H){return s===n||ro(s,Ln[T])&&!rn.call(H,T)?y:s}function Y0(s,y,T,H,K,ee){return $n(s)&&$n(y)&&(ee.set(y,s),Lu(s,y,n,Y0,ee),ee.delete(y)),s}function GI(s){return Gl(s)?n:s}function X0(s,y,T,H,K,ee){var ae=T&o,de=s.length,ye=y.length;if(de!=ye&&!(ae&&ye>de))return!1;var Le=ee.get(s),Oe=ee.get(y);if(Le&&Oe)return Le==y&&Oe==s;var Pe=-1,Ve=!0,nt=T&l?new ea:n;for(ee.set(s,y),ee.set(y,s);++Pe<de;){var pt=s[Pe],Et=y[Pe];if(H)var ft=ae?H(Et,pt,Pe,y,s,ee):H(pt,Et,Pe,s,y,ee);if(ft!==n){if(ft)continue;Ve=!1;break}if(nt){if(!B(y,function(Nt,Wt){if(!wt(nt,Wt)&&(pt===Nt||K(pt,Nt,T,H,ee)))return nt.push(Wt)})){Ve=!1;break}}else if(!(pt===Et||K(pt,Et,T,H,ee))){Ve=!1;break}}return ee.delete(s),ee.delete(y),Ve}function YI(s,y,T,H,K,ee,ae){switch(T){case Qn:if(s.byteLength!=y.byteLength||s.byteOffset!=y.byteOffset)return!1;s=s.buffer,y=y.buffer;case gn:return!(s.byteLength!=y.byteLength||!ee(new bu(s),new bu(y)));case Ae:case Te:case gt:return ro(+s,+y);case Xe:return s.name==y.name&&s.message==y.message;case Sn:case ur:return s==y+"";case rt:var de=Ee;case Xn:var ye=H&o;if(de||(de=Ue),s.size!=y.size&&!ye)return!1;var Le=ae.get(s);if(Le)return Le==y;H|=l,ae.set(s,y);var Oe=X0(de(s),de(y),H,K,ee,ae);return ae.delete(s),Oe;case Fr:if(Bl)return Bl.call(s)==Bl.call(y)}return!1}function XI(s,y,T,H,K,ee){var ae=T&o,de=tf(s),ye=de.length,Le=tf(y),Oe=Le.length;if(ye!=Oe&&!ae)return!1;for(var Pe=ye;Pe--;){var Ve=de[Pe];if(!(ae?Ve in y:rn.call(y,Ve)))return!1}var nt=ee.get(s),pt=ee.get(y);if(nt&&pt)return nt==y&&pt==s;var Et=!0;ee.set(s,y),ee.set(y,s);for(var ft=ae;++Pe<ye;){Ve=de[Pe];var Nt=s[Ve],Wt=y[Ve];if(H)var xi=ae?H(Wt,Nt,Ve,y,s,ee):H(Nt,Wt,Ve,s,y,ee);if(!(xi===n?Nt===Wt||K(Nt,Wt,T,H,ee):xi)){Et=!1;break}ft||(ft=Ve=="constructor")}if(Et&&!ft){var qr=s.constructor,Si=y.constructor;qr!=Si&&"constructor"in s&&"constructor"in y&&!(typeof qr=="function"&&qr instanceof qr&&typeof Si=="function"&&Si instanceof Si)&&(Et=!1)}return ee.delete(s),ee.delete(y),Et}function zo(s){return uf(nx(s,n,hx),s+"")}function tf(s){return m0(s,mr,sf)}function nf(s){return m0(s,si,Q0)}var rf=$u?function(s){return $u.get(s)}:kf;function ju(s){for(var y=s.name+"",T=Fa[y],H=rn.call(Fa,y)?T.length:0;H--;){var K=T[H],ee=K.func;if(ee==null||ee==s)return K.name}return y}function za(s){var y=rn.call(J,"placeholder")?J:s;return y.placeholder}function ht(){var s=J.iteratee||xf;return s=s===xf?w0:s,arguments.length?s(arguments[0],arguments[1]):s}function Wu(s,y){var T=s.__data__;return iN(y)?T[typeof y=="string"?"string":"hash"]:T.map}function of(s){for(var y=mr(s),T=y.length;T--;){var H=y[T],K=s[H];y[T]=[H,K,ex(K)]}return y}function ra(s,y){var T=ie(s,y);return v0(T)?T:n}function QI(s){var y=rn.call(s,Zs),T=s[Zs];try{s[Zs]=n;var H=!0}catch{}var K=vu.call(s);return H&&(y?s[Zs]=T:delete s[Zs]),K}var sf=Lp?function(s){return s==null?[]:(s=Tt(s),Rr(Lp(s),function(y){return r0.call(s,y)}))}:_f,Q0=Lp?function(s){for(var y=[];s;)A(y,sf(s)),s=xu(s);return y}:_f,Or=Hr;(Op&&Or(new Op(new ArrayBuffer(1)))!=Qn||Dl&&Or(new Dl)!=rt||Ip&&Or(Ip.resolve())!=Zt||Pa&&Or(new Pa)!=Xn||Pl&&Or(new Pl)!=qe)&&(Or=function(s){var y=Hr(s),T=y==Bn?s.constructor:n,H=T?ia(T):"";if(H)switch(H){case O2:return Qn;case I2:return rt;case N2:return Zt;case D2:return Xn;case P2:return qe}return y});function ZI(s,y,T){for(var H=-1,K=T.length;++H<K;){var ee=T[H],ae=ee.size;switch(ee.type){case"drop":s+=ae;break;case"dropRight":y-=ae;break;case"take":y=Lr(y,s+ae);break;case"takeRight":s=lr(s,y-ae);break}}return{start:s,end:y}}function JI(s){var y=s.match(Zi);return y?y[1].split(Hs):[]}function Z0(s,y,T){y=fs(y,s);for(var H=-1,K=y.length,ee=!1;++H<K;){var ae=So(y[H]);if(!(ee=s!=null&&T(s,ae)))break;s=s[ae]}return ee||++H!=K?ee:(K=s==null?0:s.length,!!K&&Gu(K)&&Ho(ae,K)&&(xt(s)||oa(s)))}function eN(s){var y=s.length,T=new s.constructor(y);return y&&typeof s[0]=="string"&&rn.call(s,"index")&&(T.index=s.index,T.input=s.input),T}function J0(s){return typeof s.constructor=="function"&&!Vl(s)?Ba(xu(s)):{}}function tN(s,y,T){var H=s.constructor;switch(y){case gn:return Zp(s);case Ae:case Te:return new H(+s);case Qn:return FI(s,T);case Br:case $r:case kn:case ir:case hr:case nn:case or:case $o:case Ki:return N0(s,T);case rt:return new H;case gt:case ur:return new H(s);case Sn:return BI(s);case Xn:return new H;case Fr:return jI(s)}}function nN(s,y){var T=y.length;if(!T)return s;var H=T-1;return y[H]=(T>1?"& ":"")+y[H],y=y.join(T>2?", ":" "),s.replace(fo,`{
|
1476
|
+
/* [wrapped with `+y+`] */
|
1477
|
+
`)}function rN(s){return xt(s)||oa(s)||!!(i0&&s&&s[i0])}function Ho(s,y){var T=typeof s;return y=y??U,!!y&&(T=="number"||T!="symbol"&&hn.test(s))&&s>-1&&s%1==0&&s<y}function Ur(s,y,T){if(!$n(T))return!1;var H=typeof y;return(H=="number"?oi(T)&&Ho(y,T.length):H=="string"&&y in T)?ro(T[y],s):!1}function af(s,y){if(xt(s))return!1;var T=typeof s;return T=="number"||T=="symbol"||T=="boolean"||s==null||bi(s)?!0:Xi.test(s)||!Ta.test(s)||y!=null&&s in Tt(y)}function iN(s){var y=typeof s;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?s!=="__proto__":s===null}function lf(s){var y=ju(s),T=J[y];if(typeof T!="function"||!(y in Bt.prototype))return!1;if(s===T)return!0;var H=rf(T);return!!H&&s===H[0]}function oN(s){return!!e0&&e0 in s}var sN=Qs?Uo:Cf;function Vl(s){var y=s&&s.constructor,T=typeof y=="function"&&y.prototype||Ln;return s===T}function ex(s){return s===s&&!$n(s)}function tx(s,y){return function(T){return T==null?!1:T[s]===y&&(y!==n||s in Tt(T))}}function aN(s){var y=Vu(s,function(H){return T.size===g&&T.clear(),H}),T=y.cache;return y}function lN(s,y){var T=s[1],H=y[1],K=T|H,ee=K<(m|b|R),ae=H==R&&T==E||H==R&&T==I&&s[7].length<=y[8]||H==(R|I)&&y[7].length<=y[8]&&T==E;if(!(ee||ae))return s;H&m&&(s[2]=y[2],K|=T&m?0:S);var de=y[3];if(de){var ye=s[3];s[3]=ye?P0(ye,de,y[4]):de,s[4]=ye?je(s[3],i):y[4]}return de=y[5],de&&(ye=s[5],s[5]=ye?F0(ye,de,y[6]):de,s[6]=ye?je(s[5],i):y[6]),de=y[7],de&&(s[7]=de),H&R&&(s[8]=s[8]==null?y[8]:Lr(s[8],y[8])),s[9]==null&&(s[9]=y[9]),s[0]=y[0],s[1]=K,s}function cN(s){var y=[];if(s!=null)for(var T in Tt(s))y.push(T);return y}function uN(s){return vu.call(s)}function nx(s,y,T){return y=lr(y===n?s.length-1:y,0),function(){for(var H=arguments,K=-1,ee=lr(H.length-y,0),ae=xe(ee);++K<ee;)ae[K]=H[y+K];K=-1;for(var de=xe(y+1);++K<y;)de[K]=H[K];return de[y]=T(ae),dr(s,this,de)}}function rx(s,y){return y.length<2?s:na(s,Ni(y,0,-1))}function hN(s,y){for(var T=s.length,H=Lr(y.length,T),K=ii(s);H--;){var ee=y[H];s[H]=Ho(ee,T)?K[ee]:n}return s}function cf(s,y){if(!(y==="constructor"&&typeof s[y]=="function")&&y!="__proto__")return s[y]}var ix=sx(M0),Kl=$2||function(s,y){return on.setTimeout(s,y)},uf=sx(II);function ox(s,y,T){var H=y+"";return uf(s,nN(H,dN(JI(H),T)))}function sx(s){var y=0,T=0;return function(){var H=E2(),K=N-(H-T);if(T=H,K>0){if(++y>=F)return arguments[0]}else y=0;return s.apply(n,arguments)}}function zu(s,y){var T=-1,H=s.length,K=H-1;for(y=y===n?H:y;++T<y;){var ee=qp(T,K),ae=s[ee];s[ee]=s[T],s[T]=ae}return s.length=y,s}var ax=aN(function(s){var y=[];return s.charCodeAt(0)===46&&y.push(""),s.replace(jn,function(T,H,K,ee){y.push(K?ee.replace(Ol,"$1"):H||T)}),y});function So(s){if(typeof s=="string"||bi(s))return s;var y=s+"";return y=="0"&&1/s==-z?"-0":y}function ia(s){if(s!=null){try{return yu.call(s)}catch{}try{return s+""}catch{}}return""}function dN(s,y){return vr(le,function(T){var H="_."+T[0];y&T[1]&&!yi(s,H)&&s.push(H)}),s.sort()}function lx(s){if(s instanceof Bt)return s.clone();var y=new Oi(s.__wrapped__,s.__chain__);return y.__actions__=ii(s.__actions__),y.__index__=s.__index__,y.__values__=s.__values__,y}function pN(s,y,T){(T?Ur(s,y,T):y===n)?y=1:y=lr(At(y),0);var H=s==null?0:s.length;if(!H||y<1)return[];for(var K=0,ee=0,ae=xe(_u(H/y));K<H;)ae[ee++]=Ni(s,K,K+=y);return ae}function fN(s){for(var y=-1,T=s==null?0:s.length,H=0,K=[];++y<T;){var ee=s[y];ee&&(K[H++]=ee)}return K}function gN(){var s=arguments.length;if(!s)return[];for(var y=xe(s-1),T=arguments[0],H=s;H--;)y[H-1]=arguments[H];return A(xt(T)?ii(T):[T],br(y,1))}var mN=Lt(function(s,y){return Hn(s)?Wl(s,br(y,1,Hn,!0)):[]}),yN=Lt(function(s,y){var T=Di(y);return Hn(T)&&(T=n),Hn(s)?Wl(s,br(y,1,Hn,!0),ht(T,2)):[]}),vN=Lt(function(s,y){var T=Di(y);return Hn(T)&&(T=n),Hn(s)?Wl(s,br(y,1,Hn,!0),n,T):[]});function wN(s,y,T){var H=s==null?0:s.length;return H?(y=T||y===n?1:At(y),Ni(s,y<0?0:y,H)):[]}function bN(s,y,T){var H=s==null?0:s.length;return H?(y=T||y===n?1:At(y),y=H-y,Ni(s,0,y<0?0:y)):[]}function xN(s,y){return s&&s.length?Iu(s,ht(y,3),!0,!0):[]}function SN(s,y){return s&&s.length?Iu(s,ht(y,3),!0):[]}function kN(s,y,T,H){var K=s==null?0:s.length;return K?(T&&typeof T!="number"&&Ur(s,y,T)&&(T=0,H=K),gI(s,y,T,H)):[]}function cx(s,y,T){var H=s==null?0:s.length;if(!H)return-1;var K=T==null?0:At(T);return K<0&&(K=lr(H+K,0)),re(s,ht(y,3),K)}function ux(s,y,T){var H=s==null?0:s.length;if(!H)return-1;var K=H-1;return T!==n&&(K=At(T),K=T<0?lr(H+K,0):Lr(K,H-1)),re(s,ht(y,3),K,!0)}function hx(s){var y=s==null?0:s.length;return y?br(s,1):[]}function _N(s){var y=s==null?0:s.length;return y?br(s,z):[]}function CN(s,y){var T=s==null?0:s.length;return T?(y=y===n?1:At(y),br(s,y)):[]}function $N(s){for(var y=-1,T=s==null?0:s.length,H={};++y<T;){var K=s[y];H[K[0]]=K[1]}return H}function dx(s){return s&&s.length?s[0]:n}function MN(s,y,T){var H=s==null?0:s.length;if(!H)return-1;var K=T==null?0:At(T);return K<0&&(K=lr(H+K,0)),se(s,y,K)}function AN(s){var y=s==null?0:s.length;return y?Ni(s,0,-1):[]}var TN=Lt(function(s){var y=v(s,Xp);return y.length&&y[0]===s[0]?jp(y):[]}),EN=Lt(function(s){var y=Di(s),T=v(s,Xp);return y===Di(T)?y=n:T.pop(),T.length&&T[0]===s[0]?jp(T,ht(y,2)):[]}),RN=Lt(function(s){var y=Di(s),T=v(s,Xp);return y=typeof y=="function"?y:n,y&&T.pop(),T.length&&T[0]===s[0]?jp(T,n,y):[]});function LN(s,y){return s==null?"":A2.call(s,y)}function Di(s){var y=s==null?0:s.length;return y?s[y-1]:n}function ON(s,y,T){var H=s==null?0:s.length;if(!H)return-1;var K=H;return T!==n&&(K=At(T),K=K<0?lr(H+K,0):Lr(K,H-1)),y===y?yt(s,y,K):re(s,Se,K,!0)}function IN(s,y){return s&&s.length?k0(s,At(y)):n}var NN=Lt(px);function px(s,y){return s&&s.length&&y&&y.length?Up(s,y):s}function DN(s,y,T){return s&&s.length&&y&&y.length?Up(s,y,ht(T,2)):s}function PN(s,y,T){return s&&s.length&&y&&y.length?Up(s,y,n,T):s}var FN=zo(function(s,y){var T=s==null?0:s.length,H=Dp(s,y);return $0(s,v(y,function(K){return Ho(K,T)?+K:K}).sort(D0)),H});function BN(s,y){var T=[];if(!(s&&s.length))return T;var H=-1,K=[],ee=s.length;for(y=ht(y,3);++H<ee;){var ae=s[H];y(ae,H,s)&&(T.push(ae),K.push(H))}return $0(s,K),T}function hf(s){return s==null?s:L2.call(s)}function jN(s,y,T){var H=s==null?0:s.length;return H?(T&&typeof T!="number"&&Ur(s,y,T)?(y=0,T=H):(y=y==null?0:At(y),T=T===n?H:At(T)),Ni(s,y,T)):[]}function WN(s,y){return Ou(s,y)}function zN(s,y,T){return Kp(s,y,ht(T,2))}function HN(s,y){var T=s==null?0:s.length;if(T){var H=Ou(s,y);if(H<T&&ro(s[H],y))return H}return-1}function UN(s,y){return Ou(s,y,!0)}function qN(s,y,T){return Kp(s,y,ht(T,2),!0)}function VN(s,y){var T=s==null?0:s.length;if(T){var H=Ou(s,y,!0)-1;if(ro(s[H],y))return H}return-1}function KN(s){return s&&s.length?A0(s):[]}function GN(s,y){return s&&s.length?A0(s,ht(y,2)):[]}function YN(s){var y=s==null?0:s.length;return y?Ni(s,1,y):[]}function XN(s,y,T){return s&&s.length?(y=T||y===n?1:At(y),Ni(s,0,y<0?0:y)):[]}function QN(s,y,T){var H=s==null?0:s.length;return H?(y=T||y===n?1:At(y),y=H-y,Ni(s,y<0?0:y,H)):[]}function ZN(s,y){return s&&s.length?Iu(s,ht(y,3),!1,!0):[]}function JN(s,y){return s&&s.length?Iu(s,ht(y,3)):[]}var eD=Lt(function(s){return ps(br(s,1,Hn,!0))}),tD=Lt(function(s){var y=Di(s);return Hn(y)&&(y=n),ps(br(s,1,Hn,!0),ht(y,2))}),nD=Lt(function(s){var y=Di(s);return y=typeof y=="function"?y:n,ps(br(s,1,Hn,!0),n,y)});function rD(s){return s&&s.length?ps(s):[]}function iD(s,y){return s&&s.length?ps(s,ht(y,2)):[]}function oD(s,y){return y=typeof y=="function"?y:n,s&&s.length?ps(s,n,y):[]}function df(s){if(!(s&&s.length))return[];var y=0;return s=Rr(s,function(T){if(Hn(T))return y=lr(T.length,y),!0}),Ye(y,function(T){return v(s,we(T))})}function fx(s,y){if(!(s&&s.length))return[];var T=df(s);return y==null?T:v(T,function(H){return dr(y,n,H)})}var sD=Lt(function(s,y){return Hn(s)?Wl(s,y):[]}),aD=Lt(function(s){return Yp(Rr(s,Hn))}),lD=Lt(function(s){var y=Di(s);return Hn(y)&&(y=n),Yp(Rr(s,Hn),ht(y,2))}),cD=Lt(function(s){var y=Di(s);return y=typeof y=="function"?y:n,Yp(Rr(s,Hn),n,y)}),uD=Lt(df);function hD(s,y){return L0(s||[],y||[],jl)}function dD(s,y){return L0(s||[],y||[],Ul)}var pD=Lt(function(s){var y=s.length,T=y>1?s[y-1]:n;return T=typeof T=="function"?(s.pop(),T):n,fx(s,T)});function gx(s){var y=J(s);return y.__chain__=!0,y}function fD(s,y){return y(s),s}function Hu(s,y){return y(s)}var gD=zo(function(s){var y=s.length,T=y?s[0]:0,H=this.__wrapped__,K=function(ee){return Dp(ee,s)};return y>1||this.__actions__.length||!(H instanceof Bt)||!Ho(T)?this.thru(K):(H=H.slice(T,+T+(y?1:0)),H.__actions__.push({func:Hu,args:[K],thisArg:n}),new Oi(H,this.__chain__).thru(function(ee){return y&&!ee.length&&ee.push(n),ee}))});function mD(){return gx(this)}function yD(){return new Oi(this.value(),this.__chain__)}function vD(){this.__values__===n&&(this.__values__=Tx(this.value()));var s=this.__index__>=this.__values__.length,y=s?n:this.__values__[this.__index__++];return{done:s,value:y}}function wD(){return this}function bD(s){for(var y,T=this;T instanceof Au;){var H=lx(T);H.__index__=0,H.__values__=n,y?K.__wrapped__=H:y=H;var K=H;T=T.__wrapped__}return K.__wrapped__=s,y}function xD(){var s=this.__wrapped__;if(s instanceof Bt){var y=s;return this.__actions__.length&&(y=new Bt(this)),y=y.reverse(),y.__actions__.push({func:Hu,args:[hf],thisArg:n}),new Oi(y,this.__chain__)}return this.thru(hf)}function SD(){return R0(this.__wrapped__,this.__actions__)}var kD=Nu(function(s,y,T){rn.call(s,T)?++s[T]:jo(s,T,1)});function _D(s,y,T){var H=xt(s)?wr:fI;return T&&Ur(s,y,T)&&(y=n),H(s,ht(y,3))}function CD(s,y){var T=xt(s)?Rr:f0;return T(s,ht(y,3))}var $D=z0(cx),MD=z0(ux);function AD(s,y){return br(Uu(s,y),1)}function TD(s,y){return br(Uu(s,y),z)}function ED(s,y,T){return T=T===n?1:At(T),br(Uu(s,y),T)}function mx(s,y){var T=xt(s)?vr:ds;return T(s,ht(y,3))}function yx(s,y){var T=xt(s)?Xs:p0;return T(s,ht(y,3))}var RD=Nu(function(s,y,T){rn.call(s,T)?s[T].push(y):jo(s,T,[y])});function LD(s,y,T,H){s=oi(s)?s:Ua(s),T=T&&!H?At(T):0;var K=s.length;return T<0&&(T=lr(K+T,0)),Yu(s)?T<=K&&s.indexOf(y,T)>-1:!!K&&se(s,y,T)>-1}var OD=Lt(function(s,y,T){var H=-1,K=typeof y=="function",ee=oi(s)?xe(s.length):[];return ds(s,function(ae){ee[++H]=K?dr(y,ae,T):zl(ae,y,T)}),ee}),ID=Nu(function(s,y,T){jo(s,T,y)});function Uu(s,y){var T=xt(s)?v:b0;return T(s,ht(y,3))}function ND(s,y,T,H){return s==null?[]:(xt(y)||(y=y==null?[]:[y]),T=H?n:T,xt(T)||(T=T==null?[]:[T]),_0(s,y,T))}var DD=Nu(function(s,y,T){s[T?0:1].push(y)},function(){return[[],[]]});function PD(s,y,T){var H=xt(s)?C:Ie,K=arguments.length<3;return H(s,ht(y,4),T,K,ds)}function FD(s,y,T){var H=xt(s)?P:Ie,K=arguments.length<3;return H(s,ht(y,4),T,K,p0)}function BD(s,y){var T=xt(s)?Rr:f0;return T(s,Ku(ht(y,3)))}function jD(s){var y=xt(s)?c0:LI;return y(s)}function WD(s,y,T){(T?Ur(s,y,T):y===n)?y=1:y=At(y);var H=xt(s)?cI:OI;return H(s,y)}function zD(s){var y=xt(s)?uI:NI;return y(s)}function HD(s){if(s==null)return 0;if(oi(s))return Yu(s)?Ot(s):s.length;var y=Or(s);return y==rt||y==Xn?s.size:zp(s).length}function UD(s,y,T){var H=xt(s)?B:DI;return T&&Ur(s,y,T)&&(y=n),H(s,ht(y,3))}var qD=Lt(function(s,y){if(s==null)return[];var T=y.length;return T>1&&Ur(s,y[0],y[1])?y=[]:T>2&&Ur(y[0],y[1],y[2])&&(y=[y[0]]),_0(s,br(y,1),[])}),qu=C2||function(){return on.Date.now()};function VD(s,y){if(typeof y!="function")throw new sn(f);return s=At(s),function(){if(--s<1)return y.apply(this,arguments)}}function vx(s,y,T){return y=T?n:y,y=s&&y==null?s.length:y,Wo(s,R,n,n,n,n,y)}function wx(s,y){var T;if(typeof y!="function")throw new sn(f);return s=At(s),function(){return--s>0&&(T=y.apply(this,arguments)),s<=1&&(y=n),T}}var pf=Lt(function(s,y,T){var H=m;if(T.length){var K=je(T,za(pf));H|=k}return Wo(s,H,y,T,K)}),bx=Lt(function(s,y,T){var H=m|b;if(T.length){var K=je(T,za(bx));H|=k}return Wo(y,H,s,T,K)});function xx(s,y,T){y=T?n:y;var H=Wo(s,E,n,n,n,n,n,y);return H.placeholder=xx.placeholder,H}function Sx(s,y,T){y=T?n:y;var H=Wo(s,M,n,n,n,n,n,y);return H.placeholder=Sx.placeholder,H}function kx(s,y,T){var H,K,ee,ae,de,ye,Le=0,Oe=!1,Pe=!1,Ve=!0;if(typeof s!="function")throw new sn(f);y=Pi(y)||0,$n(T)&&(Oe=!!T.leading,Pe="maxWait"in T,ee=Pe?lr(Pi(T.maxWait)||0,y):ee,Ve="trailing"in T?!!T.trailing:Ve);function nt(Un){var io=H,Vo=K;return H=K=n,Le=Un,ae=s.apply(Vo,io),ae}function pt(Un){return Le=Un,de=Kl(Nt,y),Oe?nt(Un):ae}function Et(Un){var io=Un-ye,Vo=Un-Le,zx=y-io;return Pe?Lr(zx,ee-Vo):zx}function ft(Un){var io=Un-ye,Vo=Un-Le;return ye===n||io>=y||io<0||Pe&&Vo>=ee}function Nt(){var Un=qu();if(ft(Un))return Wt(Un);de=Kl(Nt,Et(Un))}function Wt(Un){return de=n,Ve&&H?nt(Un):(H=K=n,ae)}function xi(){de!==n&&O0(de),Le=0,H=ye=K=de=n}function qr(){return de===n?ae:Wt(qu())}function Si(){var Un=qu(),io=ft(Un);if(H=arguments,K=this,ye=Un,io){if(de===n)return pt(ye);if(Pe)return O0(de),de=Kl(Nt,y),nt(ye)}return de===n&&(de=Kl(Nt,y)),ae}return Si.cancel=xi,Si.flush=qr,Si}var KD=Lt(function(s,y){return d0(s,1,y)}),GD=Lt(function(s,y,T){return d0(s,Pi(y)||0,T)});function YD(s){return Wo(s,O)}function Vu(s,y){if(typeof s!="function"||y!=null&&typeof y!="function")throw new sn(f);var T=function(){var H=arguments,K=y?y.apply(this,H):H[0],ee=T.cache;if(ee.has(K))return ee.get(K);var ae=s.apply(this,H);return T.cache=ee.set(K,ae)||ee,ae};return T.cache=new(Vu.Cache||Bo),T}Vu.Cache=Bo;function Ku(s){if(typeof s!="function")throw new sn(f);return function(){var y=arguments;switch(y.length){case 0:return!s.call(this);case 1:return!s.call(this,y[0]);case 2:return!s.call(this,y[0],y[1]);case 3:return!s.call(this,y[0],y[1],y[2])}return!s.apply(this,y)}}function XD(s){return wx(2,s)}var QD=PI(function(s,y){y=y.length==1&&xt(y[0])?v(y[0],lt(ht())):v(br(y,1),lt(ht()));var T=y.length;return Lt(function(H){for(var K=-1,ee=Lr(H.length,T);++K<ee;)H[K]=y[K].call(this,H[K]);return dr(s,this,H)})}),ff=Lt(function(s,y){var T=je(y,za(ff));return Wo(s,k,n,y,T)}),_x=Lt(function(s,y){var T=je(y,za(_x));return Wo(s,x,n,y,T)}),ZD=zo(function(s,y){return Wo(s,I,n,n,n,y)});function JD(s,y){if(typeof s!="function")throw new sn(f);return y=y===n?y:At(y),Lt(s,y)}function eP(s,y){if(typeof s!="function")throw new sn(f);return y=y==null?0:lr(At(y),0),Lt(function(T){var H=T[y],K=gs(T,0,y);return H&&A(K,H),dr(s,this,K)})}function tP(s,y,T){var H=!0,K=!0;if(typeof s!="function")throw new sn(f);return $n(T)&&(H="leading"in T?!!T.leading:H,K="trailing"in T?!!T.trailing:K),kx(s,y,{leading:H,maxWait:y,trailing:K})}function nP(s){return vx(s,1)}function rP(s,y){return ff(Qp(y),s)}function iP(){if(!arguments.length)return[];var s=arguments[0];return xt(s)?s:[s]}function oP(s){return Ii(s,c)}function sP(s,y){return y=typeof y=="function"?y:n,Ii(s,c,y)}function aP(s){return Ii(s,a|c)}function lP(s,y){return y=typeof y=="function"?y:n,Ii(s,a|c,y)}function cP(s,y){return y==null||h0(s,y,mr(y))}function ro(s,y){return s===y||s!==s&&y!==y}var uP=Bu(Bp),hP=Bu(function(s,y){return s>=y}),oa=y0((function(){return arguments})())?y0:function(s){return On(s)&&rn.call(s,"callee")&&!r0.call(s,"callee")},xt=xe.isArray,dP=ri?lt(ri):bI;function oi(s){return s!=null&&Gu(s.length)&&!Uo(s)}function Hn(s){return On(s)&&oi(s)}function pP(s){return s===!0||s===!1||On(s)&&Hr(s)==Ae}var ms=M2||Cf,fP=us?lt(us):xI;function gP(s){return On(s)&&s.nodeType===1&&!Gl(s)}function mP(s){if(s==null)return!0;if(oi(s)&&(xt(s)||typeof s=="string"||typeof s.splice=="function"||ms(s)||Ha(s)||oa(s)))return!s.length;var y=Or(s);if(y==rt||y==Xn)return!s.size;if(Vl(s))return!zp(s).length;for(var T in s)if(rn.call(s,T))return!1;return!0}function yP(s,y){return Hl(s,y)}function vP(s,y,T){T=typeof T=="function"?T:n;var H=T?T(s,y):n;return H===n?Hl(s,y,n,T):!!H}function gf(s){if(!On(s))return!1;var y=Hr(s);return y==Xe||y==Re||typeof s.message=="string"&&typeof s.name=="string"&&!Gl(s)}function wP(s){return typeof s=="number"&&o0(s)}function Uo(s){if(!$n(s))return!1;var y=Hr(s);return y==Ke||y==dt||y==ge||y==hi}function Cx(s){return typeof s=="number"&&s==At(s)}function Gu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function $n(s){var y=typeof s;return s!=null&&(y=="object"||y=="function")}function On(s){return s!=null&&typeof s=="object"}var $x=Rn?lt(Rn):kI;function bP(s,y){return s===y||Wp(s,y,of(y))}function xP(s,y,T){return T=typeof T=="function"?T:n,Wp(s,y,of(y),T)}function SP(s){return Mx(s)&&s!=+s}function kP(s){if(sN(s))throw new ct(d);return v0(s)}function _P(s){return s===null}function CP(s){return s==null}function Mx(s){return typeof s=="number"||On(s)&&Hr(s)==gt}function Gl(s){if(!On(s)||Hr(s)!=Bn)return!1;var y=xu(s);if(y===null)return!0;var T=rn.call(y,"constructor")&&y.constructor;return typeof T=="function"&&T instanceof T&&yu.call(T)==x2}var mf=gi?lt(gi):_I;function $P(s){return Cx(s)&&s>=-U&&s<=U}var Ax=mi?lt(mi):CI;function Yu(s){return typeof s=="string"||!xt(s)&&On(s)&&Hr(s)==ur}function bi(s){return typeof s=="symbol"||On(s)&&Hr(s)==Fr}var Ha=Ri?lt(Ri):$I;function MP(s){return s===n}function AP(s){return On(s)&&Or(s)==qe}function TP(s){return On(s)&&Hr(s)==qt}var EP=Bu(Hp),RP=Bu(function(s,y){return s<=y});function Tx(s){if(!s)return[];if(oi(s))return Yu(s)?bt(s):ii(s);if(Nl&&s[Nl])return be(s[Nl]());var y=Or(s),T=y==rt?Ee:y==Xn?Ue:Ua;return T(s)}function qo(s){if(!s)return s===0?s:0;if(s=Pi(s),s===z||s===-z){var y=s<0?-1:1;return y*G}return s===s?s:0}function At(s){var y=qo(s),T=y%1;return y===y?T?y-T:y:0}function Ex(s){return s?ta(At(s),0,te):0}function Pi(s){if(typeof s=="number")return s;if(bi(s))return Z;if($n(s)){var y=typeof s.valueOf=="function"?s.valueOf():s;s=$n(y)?y+"":y}if(typeof s!="string")return s===0?s:+s;s=pn(s);var T=Ra.test(s);return T||Wn.test(s)?dn(s.slice(2),T?2:8):Pt.test(s)?Z:+s}function Rx(s){return xo(s,si(s))}function LP(s){return s?ta(At(s),-U,U):s===0?s:0}function Jt(s){return s==null?"":wi(s)}var OP=ja(function(s,y){if(Vl(y)||oi(y)){xo(y,mr(y),s);return}for(var T in y)rn.call(y,T)&&jl(s,T,y[T])}),Lx=ja(function(s,y){xo(y,si(y),s)}),Xu=ja(function(s,y,T,H){xo(y,si(y),s,H)}),IP=ja(function(s,y,T,H){xo(y,mr(y),s,H)}),NP=zo(Dp);function DP(s,y){var T=Ba(s);return y==null?T:u0(T,y)}var PP=Lt(function(s,y){s=Tt(s);var T=-1,H=y.length,K=H>2?y[2]:n;for(K&&Ur(y[0],y[1],K)&&(H=1);++T<H;)for(var ee=y[T],ae=si(ee),de=-1,ye=ae.length;++de<ye;){var Le=ae[de],Oe=s[Le];(Oe===n||ro(Oe,Ln[Le])&&!rn.call(s,Le))&&(s[Le]=ee[Le])}return s}),FP=Lt(function(s){return s.push(n,Y0),dr(Ox,n,s)});function BP(s,y){return Q(s,ht(y,3),bo)}function jP(s,y){return Q(s,ht(y,3),Fp)}function WP(s,y){return s==null?s:Pp(s,ht(y,3),si)}function zP(s,y){return s==null?s:g0(s,ht(y,3),si)}function HP(s,y){return s&&bo(s,ht(y,3))}function UP(s,y){return s&&Fp(s,ht(y,3))}function qP(s){return s==null?[]:Ru(s,mr(s))}function VP(s){return s==null?[]:Ru(s,si(s))}function yf(s,y,T){var H=s==null?n:na(s,y);return H===n?T:H}function KP(s,y){return s!=null&&Z0(s,y,mI)}function vf(s,y){return s!=null&&Z0(s,y,yI)}var GP=U0(function(s,y,T){y!=null&&typeof y.toString!="function"&&(y=vu.call(y)),s[y]=T},bf(ai)),YP=U0(function(s,y,T){y!=null&&typeof y.toString!="function"&&(y=vu.call(y)),rn.call(s,y)?s[y].push(T):s[y]=[T]},ht),XP=Lt(zl);function mr(s){return oi(s)?l0(s):zp(s)}function si(s){return oi(s)?l0(s,!0):MI(s)}function QP(s,y){var T={};return y=ht(y,3),bo(s,function(H,K,ee){jo(T,y(H,K,ee),H)}),T}function ZP(s,y){var T={};return y=ht(y,3),bo(s,function(H,K,ee){jo(T,K,y(H,K,ee))}),T}var JP=ja(function(s,y,T){Lu(s,y,T)}),Ox=ja(function(s,y,T,H){Lu(s,y,T,H)}),eF=zo(function(s,y){var T={};if(s==null)return T;var H=!1;y=v(y,function(ee){return ee=fs(ee,s),H||(H=ee.length>1),ee}),xo(s,nf(s),T),H&&(T=Ii(T,a|u|c,GI));for(var K=y.length;K--;)Gp(T,y[K]);return T});function tF(s,y){return Ix(s,Ku(ht(y)))}var nF=zo(function(s,y){return s==null?{}:TI(s,y)});function Ix(s,y){if(s==null)return{};var T=v(nf(s),function(H){return[H]});return y=ht(y),C0(s,T,function(H,K){return y(H,K[0])})}function rF(s,y,T){y=fs(y,s);var H=-1,K=y.length;for(K||(K=1,s=n);++H<K;){var ee=s==null?n:s[So(y[H])];ee===n&&(H=K,ee=T),s=Uo(ee)?ee.call(s):ee}return s}function iF(s,y,T){return s==null?s:Ul(s,y,T)}function oF(s,y,T,H){return H=typeof H=="function"?H:n,s==null?s:Ul(s,y,T,H)}var Nx=K0(mr),Dx=K0(si);function sF(s,y,T){var H=xt(s),K=H||ms(s)||Ha(s);if(y=ht(y,4),T==null){var ee=s&&s.constructor;K?T=H?new ee:[]:$n(s)?T=Uo(ee)?Ba(xu(s)):{}:T={}}return(K?vr:bo)(s,function(ae,de,ye){return y(T,ae,de,ye)}),T}function aF(s,y){return s==null?!0:Gp(s,y)}function lF(s,y,T){return s==null?s:E0(s,y,Qp(T))}function cF(s,y,T,H){return H=typeof H=="function"?H:n,s==null?s:E0(s,y,Qp(T),H)}function Ua(s){return s==null?[]:vn(s,mr(s))}function uF(s){return s==null?[]:vn(s,si(s))}function hF(s,y,T){return T===n&&(T=y,y=n),T!==n&&(T=Pi(T),T=T===T?T:0),y!==n&&(y=Pi(y),y=y===y?y:0),ta(Pi(s),y,T)}function dF(s,y,T){return y=qo(y),T===n?(T=y,y=0):T=qo(T),s=Pi(s),vI(s,y,T)}function pF(s,y,T){if(T&&typeof T!="boolean"&&Ur(s,y,T)&&(y=T=n),T===n&&(typeof y=="boolean"?(T=y,y=n):typeof s=="boolean"&&(T=s,s=n)),s===n&&y===n?(s=0,y=1):(s=qo(s),y===n?(y=s,s=0):y=qo(y)),s>y){var H=s;s=y,y=H}if(T||s%1||y%1){var K=s0();return Lr(s+K*(y-s+We("1e-"+((K+"").length-1))),y)}return qp(s,y)}var fF=Wa(function(s,y,T){return y=y.toLowerCase(),s+(T?Px(y):y)});function Px(s){return wf(Jt(s).toLowerCase())}function Fx(s){return s=Jt(s),s&&s.replace(An,wn).replace(No,"")}function gF(s,y,T){s=Jt(s),y=wi(y);var H=s.length;T=T===n?H:ta(At(T),0,H);var K=T;return T-=y.length,T>=0&&s.slice(T,K)==y}function mF(s){return s=Jt(s),s&&El.test(s)?s.replace(Ao,q):s}function yF(s){return s=Jt(s),s&&Qi.test(s)?s.replace(Mr,"\\$&"):s}var vF=Wa(function(s,y,T){return s+(T?"-":"")+y.toLowerCase()}),wF=Wa(function(s,y,T){return s+(T?" ":"")+y.toLowerCase()}),bF=W0("toLowerCase");function xF(s,y,T){s=Jt(s),y=At(y);var H=y?Ot(s):0;if(!y||H>=y)return s;var K=(y-H)/2;return Fu(Cu(K),T)+s+Fu(_u(K),T)}function SF(s,y,T){s=Jt(s),y=At(y);var H=y?Ot(s):0;return y&&H<y?s+Fu(y-H,T):s}function kF(s,y,T){s=Jt(s),y=At(y);var H=y?Ot(s):0;return y&&H<y?Fu(y-H,T)+s:s}function _F(s,y,T){return T||y==null?y=0:y&&(y=+y),R2(Jt(s).replace(_n,""),y||0)}function CF(s,y,T){return(T?Ur(s,y,T):y===n)?y=1:y=At(y),Vp(Jt(s),y)}function $F(){var s=arguments,y=Jt(s[0]);return s.length<3?y:y.replace(s[1],s[2])}var MF=Wa(function(s,y,T){return s+(T?"_":"")+y.toLowerCase()});function AF(s,y,T){return T&&typeof T!="number"&&Ur(s,y,T)&&(y=T=n),T=T===n?te:T>>>0,T?(s=Jt(s),s&&(typeof y=="string"||y!=null&&!mf(y))&&(y=wi(y),!y&&oe(s))?gs(bt(s),0,T):s.split(y,T)):[]}var TF=Wa(function(s,y,T){return s+(T?" ":"")+wf(y)});function EF(s,y,T){return s=Jt(s),T=T==null?0:ta(At(T),0,s.length),y=wi(y),s.slice(T,T+y.length)==y}function RF(s,y,T){var H=J.templateSettings;T&&Ur(s,y,T)&&(y=n),s=Jt(s),y=Xu({},y,H,G0);var K=Xu({},y.imports,H.imports,G0),ee=mr(K),ae=vn(K,ee),de,ye,Le=0,Oe=y.interpolate||Ci,Pe="__p += '",Ve=zr((y.escape||Ci).source+"|"+Oe.source+"|"+(Oe===zs?Ji:Ci).source+"|"+(y.evaluate||Ci).source+"|$","g"),nt="//# sourceURL="+(rn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wo+"]")+`
|
1478
|
+
`;s.replace(Ve,function(ft,Nt,Wt,xi,qr,Si){return Wt||(Wt=xi),Pe+=s.slice(Le,Si).replace(Er,X),Nt&&(de=!0,Pe+=`' +
|
1479
|
+
__e(`+Nt+`) +
|
1480
|
+
'`),qr&&(ye=!0,Pe+=`';
|
1481
|
+
`+qr+`;
|
1482
|
+
__p += '`),Wt&&(Pe+=`' +
|
1483
|
+
((__t = (`+Wt+`)) == null ? '' : __t) +
|
1484
|
+
'`),Le=Si+ft.length,ft}),Pe+=`';
|
1485
|
+
`;var pt=rn.call(y,"variable")&&y.variable;if(!pt)Pe=`with (obj) {
|
1486
|
+
`+Pe+`
|
1487
|
+
}
|
1488
|
+
`;else if(Ll.test(pt))throw new ct(w);Pe=(ye?Pe.replace(Gi,""):Pe).replace(Yi,"$1").replace(Mo,"$1;"),Pe="function("+(pt||"obj")+`) {
|
1489
|
+
`+(pt?"":`obj || (obj = {});
|
1490
|
+
`)+"var __t, __p = ''"+(de?", __e = _.escape":"")+(ye?`, __j = Array.prototype.join;
|
1491
|
+
function print() { __p += __j.call(arguments, '') }
|
1492
|
+
`:`;
|
1493
|
+
`)+Pe+`return __p
|
1494
|
+
}`;var Et=jx(function(){return Mt(ee,nt+"return "+Pe).apply(n,ae)});if(Et.source=Pe,gf(Et))throw Et;return Et}function LF(s){return Jt(s).toLowerCase()}function OF(s){return Jt(s).toUpperCase()}function IF(s,y,T){if(s=Jt(s),s&&(T||y===n))return pn(s);if(!s||!(y=wi(y)))return s;var H=bt(s),K=bt(y),ee=$t(H,K),ae=Jn(H,K)+1;return gs(H,ee,ae).join("")}function NF(s,y,T){if(s=Jt(s),s&&(T||y===n))return s.slice(0,Rt(s)+1);if(!s||!(y=wi(y)))return s;var H=bt(s),K=Jn(H,bt(y))+1;return gs(H,0,K).join("")}function DF(s,y,T){if(s=Jt(s),s&&(T||y===n))return s.replace(_n,"");if(!s||!(y=wi(y)))return s;var H=bt(s),K=$t(H,bt(y));return gs(H,K).join("")}function PF(s,y){var T=L,H=W;if($n(y)){var K="separator"in y?y.separator:K;T="length"in y?At(y.length):T,H="omission"in y?wi(y.omission):H}s=Jt(s);var ee=s.length;if(oe(s)){var ae=bt(s);ee=ae.length}if(T>=ee)return s;var de=T-Ot(H);if(de<1)return H;var ye=ae?gs(ae,0,de).join(""):s.slice(0,de);if(K===n)return ye+H;if(ae&&(de+=ye.length-de),mf(K)){if(s.slice(de).search(K)){var Le,Oe=ye;for(K.global||(K=zr(K.source,Jt(pi.exec(K))+"g")),K.lastIndex=0;Le=K.exec(Oe);)var Pe=Le.index;ye=ye.slice(0,Pe===n?de:Pe)}}else if(s.indexOf(wi(K),de)!=de){var Ve=ye.lastIndexOf(K);Ve>-1&&(ye=ye.slice(0,Ve))}return ye+H}function FF(s){return s=Jt(s),s&&Jo.test(s)?s.replace(yr,ut):s}var BF=Wa(function(s,y,T){return s+(T?" ":"")+y.toUpperCase()}),wf=W0("toUpperCase");function Bx(s,y,T){return s=Jt(s),y=T?n:y,y===n?fe(s)?bn(s):Y(s):s.match(y)||[]}var jx=Lt(function(s,y){try{return dr(s,n,y)}catch(T){return gf(T)?T:new ct(T)}}),jF=zo(function(s,y){return vr(y,function(T){T=So(T),jo(s,T,pf(s[T],s))}),s});function WF(s){var y=s==null?0:s.length,T=ht();return s=y?v(s,function(H){if(typeof H[1]!="function")throw new sn(f);return[T(H[0]),H[1]]}):[],Lt(function(H){for(var K=-1;++K<y;){var ee=s[K];if(dr(ee[0],this,H))return dr(ee[1],this,H)}})}function zF(s){return pI(Ii(s,a))}function bf(s){return function(){return s}}function HF(s,y){return s==null||s!==s?y:s}var UF=H0(),qF=H0(!0);function ai(s){return s}function xf(s){return w0(typeof s=="function"?s:Ii(s,a))}function VF(s){return x0(Ii(s,a))}function KF(s,y){return S0(s,Ii(y,a))}var GF=Lt(function(s,y){return function(T){return zl(T,s,y)}}),YF=Lt(function(s,y){return function(T){return zl(s,T,y)}});function Sf(s,y,T){var H=mr(y),K=Ru(y,H);T==null&&!($n(y)&&(K.length||!H.length))&&(T=y,y=s,s=this,K=Ru(y,mr(y)));var ee=!($n(T)&&"chain"in T)||!!T.chain,ae=Uo(s);return vr(K,function(de){var ye=y[de];s[de]=ye,ae&&(s.prototype[de]=function(){var Le=this.__chain__;if(ee||Le){var Oe=s(this.__wrapped__),Pe=Oe.__actions__=ii(this.__actions__);return Pe.push({func:ye,args:arguments,thisArg:s}),Oe.__chain__=Le,Oe}return ye.apply(s,A([this.value()],arguments))})}),s}function XF(){return on._===this&&(on._=S2),this}function kf(){}function QF(s){return s=At(s),Lt(function(y){return k0(y,s)})}var ZF=Jp(v),JF=Jp(wr),eB=Jp(B);function Wx(s){return af(s)?we(So(s)):EI(s)}function tB(s){return function(y){return s==null?n:na(s,y)}}var nB=q0(),rB=q0(!0);function _f(){return[]}function Cf(){return!1}function iB(){return{}}function oB(){return""}function sB(){return!0}function aB(s,y){if(s=At(s),s<1||s>U)return[];var T=te,H=Lr(s,te);y=ht(y),s-=te;for(var K=Ye(H,y);++T<s;)y(T);return K}function lB(s){return xt(s)?v(s,So):bi(s)?[s]:ii(ax(Jt(s)))}function cB(s){var y=++b2;return Jt(s)+y}var uB=Pu(function(s,y){return s+y},0),hB=ef("ceil"),dB=Pu(function(s,y){return s/y},1),pB=ef("floor");function fB(s){return s&&s.length?Eu(s,ai,Bp):n}function gB(s,y){return s&&s.length?Eu(s,ht(y,2),Bp):n}function mB(s){return me(s,ai)}function yB(s,y){return me(s,ht(y,2))}function vB(s){return s&&s.length?Eu(s,ai,Hp):n}function wB(s,y){return s&&s.length?Eu(s,ht(y,2),Hp):n}var bB=Pu(function(s,y){return s*y},1),xB=ef("round"),SB=Pu(function(s,y){return s-y},0);function kB(s){return s&&s.length?st(s,ai):0}function _B(s,y){return s&&s.length?st(s,ht(y,2)):0}return J.after=VD,J.ary=vx,J.assign=OP,J.assignIn=Lx,J.assignInWith=Xu,J.assignWith=IP,J.at=NP,J.before=wx,J.bind=pf,J.bindAll=jF,J.bindKey=bx,J.castArray=iP,J.chain=gx,J.chunk=pN,J.compact=fN,J.concat=gN,J.cond=WF,J.conforms=zF,J.constant=bf,J.countBy=kD,J.create=DP,J.curry=xx,J.curryRight=Sx,J.debounce=kx,J.defaults=PP,J.defaultsDeep=FP,J.defer=KD,J.delay=GD,J.difference=mN,J.differenceBy=yN,J.differenceWith=vN,J.drop=wN,J.dropRight=bN,J.dropRightWhile=xN,J.dropWhile=SN,J.fill=kN,J.filter=CD,J.flatMap=AD,J.flatMapDeep=TD,J.flatMapDepth=ED,J.flatten=hx,J.flattenDeep=_N,J.flattenDepth=CN,J.flip=YD,J.flow=UF,J.flowRight=qF,J.fromPairs=$N,J.functions=qP,J.functionsIn=VP,J.groupBy=RD,J.initial=AN,J.intersection=TN,J.intersectionBy=EN,J.intersectionWith=RN,J.invert=GP,J.invertBy=YP,J.invokeMap=OD,J.iteratee=xf,J.keyBy=ID,J.keys=mr,J.keysIn=si,J.map=Uu,J.mapKeys=QP,J.mapValues=ZP,J.matches=VF,J.matchesProperty=KF,J.memoize=Vu,J.merge=JP,J.mergeWith=Ox,J.method=GF,J.methodOf=YF,J.mixin=Sf,J.negate=Ku,J.nthArg=QF,J.omit=eF,J.omitBy=tF,J.once=XD,J.orderBy=ND,J.over=ZF,J.overArgs=QD,J.overEvery=JF,J.overSome=eB,J.partial=ff,J.partialRight=_x,J.partition=DD,J.pick=nF,J.pickBy=Ix,J.property=Wx,J.propertyOf=tB,J.pull=NN,J.pullAll=px,J.pullAllBy=DN,J.pullAllWith=PN,J.pullAt=FN,J.range=nB,J.rangeRight=rB,J.rearg=ZD,J.reject=BD,J.remove=BN,J.rest=JD,J.reverse=hf,J.sampleSize=WD,J.set=iF,J.setWith=oF,J.shuffle=zD,J.slice=jN,J.sortBy=qD,J.sortedUniq=KN,J.sortedUniqBy=GN,J.split=AF,J.spread=eP,J.tail=YN,J.take=XN,J.takeRight=QN,J.takeRightWhile=ZN,J.takeWhile=JN,J.tap=fD,J.throttle=tP,J.thru=Hu,J.toArray=Tx,J.toPairs=Nx,J.toPairsIn=Dx,J.toPath=lB,J.toPlainObject=Rx,J.transform=sF,J.unary=nP,J.union=eD,J.unionBy=tD,J.unionWith=nD,J.uniq=rD,J.uniqBy=iD,J.uniqWith=oD,J.unset=aF,J.unzip=df,J.unzipWith=fx,J.update=lF,J.updateWith=cF,J.values=Ua,J.valuesIn=uF,J.without=sD,J.words=Bx,J.wrap=rP,J.xor=aD,J.xorBy=lD,J.xorWith=cD,J.zip=uD,J.zipObject=hD,J.zipObjectDeep=dD,J.zipWith=pD,J.entries=Nx,J.entriesIn=Dx,J.extend=Lx,J.extendWith=Xu,Sf(J,J),J.add=uB,J.attempt=jx,J.camelCase=fF,J.capitalize=Px,J.ceil=hB,J.clamp=hF,J.clone=oP,J.cloneDeep=aP,J.cloneDeepWith=lP,J.cloneWith=sP,J.conformsTo=cP,J.deburr=Fx,J.defaultTo=HF,J.divide=dB,J.endsWith=gF,J.eq=ro,J.escape=mF,J.escapeRegExp=yF,J.every=_D,J.find=$D,J.findIndex=cx,J.findKey=BP,J.findLast=MD,J.findLastIndex=ux,J.findLastKey=jP,J.floor=pB,J.forEach=mx,J.forEachRight=yx,J.forIn=WP,J.forInRight=zP,J.forOwn=HP,J.forOwnRight=UP,J.get=yf,J.gt=uP,J.gte=hP,J.has=KP,J.hasIn=vf,J.head=dx,J.identity=ai,J.includes=LD,J.indexOf=MN,J.inRange=dF,J.invoke=XP,J.isArguments=oa,J.isArray=xt,J.isArrayBuffer=dP,J.isArrayLike=oi,J.isArrayLikeObject=Hn,J.isBoolean=pP,J.isBuffer=ms,J.isDate=fP,J.isElement=gP,J.isEmpty=mP,J.isEqual=yP,J.isEqualWith=vP,J.isError=gf,J.isFinite=wP,J.isFunction=Uo,J.isInteger=Cx,J.isLength=Gu,J.isMap=$x,J.isMatch=bP,J.isMatchWith=xP,J.isNaN=SP,J.isNative=kP,J.isNil=CP,J.isNull=_P,J.isNumber=Mx,J.isObject=$n,J.isObjectLike=On,J.isPlainObject=Gl,J.isRegExp=mf,J.isSafeInteger=$P,J.isSet=Ax,J.isString=Yu,J.isSymbol=bi,J.isTypedArray=Ha,J.isUndefined=MP,J.isWeakMap=AP,J.isWeakSet=TP,J.join=LN,J.kebabCase=vF,J.last=Di,J.lastIndexOf=ON,J.lowerCase=wF,J.lowerFirst=bF,J.lt=EP,J.lte=RP,J.max=fB,J.maxBy=gB,J.mean=mB,J.meanBy=yB,J.min=vB,J.minBy=wB,J.stubArray=_f,J.stubFalse=Cf,J.stubObject=iB,J.stubString=oB,J.stubTrue=sB,J.multiply=bB,J.nth=IN,J.noConflict=XF,J.noop=kf,J.now=qu,J.pad=xF,J.padEnd=SF,J.padStart=kF,J.parseInt=_F,J.random=pF,J.reduce=PD,J.reduceRight=FD,J.repeat=CF,J.replace=$F,J.result=rF,J.round=xB,J.runInContext=pe,J.sample=jD,J.size=HD,J.snakeCase=MF,J.some=UD,J.sortedIndex=WN,J.sortedIndexBy=zN,J.sortedIndexOf=HN,J.sortedLastIndex=UN,J.sortedLastIndexBy=qN,J.sortedLastIndexOf=VN,J.startCase=TF,J.startsWith=EF,J.subtract=SB,J.sum=kB,J.sumBy=_B,J.template=RF,J.times=aB,J.toFinite=qo,J.toInteger=At,J.toLength=Ex,J.toLower=LF,J.toNumber=Pi,J.toSafeInteger=LP,J.toString=Jt,J.toUpper=OF,J.trim=IF,J.trimEnd=NF,J.trimStart=DF,J.truncate=PF,J.unescape=FF,J.uniqueId=cB,J.upperCase=BF,J.upperFirst=wf,J.each=mx,J.eachRight=yx,J.first=dx,Sf(J,(function(){var s={};return bo(J,function(y,T){rn.call(J.prototype,T)||(s[T]=y)}),s})(),{chain:!1}),J.VERSION=r,vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){J[s].placeholder=J}),vr(["drop","take"],function(s,y){Bt.prototype[s]=function(T){T=T===n?1:lr(At(T),0);var H=this.__filtered__&&!y?new Bt(this):this.clone();return H.__filtered__?H.__takeCount__=Lr(T,H.__takeCount__):H.__views__.push({size:Lr(T,te),type:s+(H.__dir__<0?"Right":"")}),H},Bt.prototype[s+"Right"]=function(T){return this.reverse()[s](T).reverse()}}),vr(["filter","map","takeWhile"],function(s,y){var T=y+1,H=T==$||T==D;Bt.prototype[s]=function(K){var ee=this.clone();return ee.__iteratees__.push({iteratee:ht(K,3),type:T}),ee.__filtered__=ee.__filtered__||H,ee}}),vr(["head","last"],function(s,y){var T="take"+(y?"Right":"");Bt.prototype[s]=function(){return this[T](1).value()[0]}}),vr(["initial","tail"],function(s,y){var T="drop"+(y?"":"Right");Bt.prototype[s]=function(){return this.__filtered__?new Bt(this):this[T](1)}}),Bt.prototype.compact=function(){return this.filter(ai)},Bt.prototype.find=function(s){return this.filter(s).head()},Bt.prototype.findLast=function(s){return this.reverse().find(s)},Bt.prototype.invokeMap=Lt(function(s,y){return typeof s=="function"?new Bt(this):this.map(function(T){return zl(T,s,y)})}),Bt.prototype.reject=function(s){return this.filter(Ku(ht(s)))},Bt.prototype.slice=function(s,y){s=At(s);var T=this;return T.__filtered__&&(s>0||y<0)?new Bt(T):(s<0?T=T.takeRight(-s):s&&(T=T.drop(s)),y!==n&&(y=At(y),T=y<0?T.dropRight(-y):T.take(y-s)),T)},Bt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Bt.prototype.toArray=function(){return this.take(te)},bo(Bt.prototype,function(s,y){var T=/^(?:filter|find|map|reject)|While$/.test(y),H=/^(?:head|last)$/.test(y),K=J[H?"take"+(y=="last"?"Right":""):y],ee=H||/^find/.test(y);K&&(J.prototype[y]=function(){var ae=this.__wrapped__,de=H?[1]:arguments,ye=ae instanceof Bt,Le=de[0],Oe=ye||xt(ae),Pe=function(Nt){var Wt=K.apply(J,A([Nt],de));return H&&Ve?Wt[0]:Wt};Oe&&T&&typeof Le=="function"&&Le.length!=1&&(ye=Oe=!1);var Ve=this.__chain__,nt=!!this.__actions__.length,pt=ee&&!Ve,Et=ye&&!nt;if(!ee&&Oe){ae=Et?ae:new Bt(this);var ft=s.apply(ae,de);return ft.__actions__.push({func:Hu,args:[Pe],thisArg:n}),new Oi(ft,Ve)}return pt&&Et?s.apply(this,de):(ft=this.thru(Pe),pt?H?ft.value()[0]:ft.value():ft)})}),vr(["pop","push","shift","sort","splice","unshift"],function(s){var y=gr[s],T=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",H=/^(?:pop|shift)$/.test(s);J.prototype[s]=function(){var K=arguments;if(H&&!this.__chain__){var ee=this.value();return y.apply(xt(ee)?ee:[],K)}return this[T](function(ae){return y.apply(xt(ae)?ae:[],K)})}}),bo(Bt.prototype,function(s,y){var T=J[y];if(T){var H=T.name+"";rn.call(Fa,H)||(Fa[H]=[]),Fa[H].push({name:y,func:T})}}),Fa[Du(n,b).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=F2,Bt.prototype.reverse=B2,Bt.prototype.value=j2,J.prototype.at=gD,J.prototype.chain=mD,J.prototype.commit=yD,J.prototype.next=vD,J.prototype.plant=bD,J.prototype.reverse=xD,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=SD,J.prototype.first=J.prototype.head,Nl&&(J.prototype[Nl]=wD),J}),jt=er();Zn?((Zn.exports=jt)._=jt,mn._=jt):on._=jt}).call(T$)})(Mc,Mc.exports)),Mc.exports}var R$=E$();Fi("D",cc(R$)).debounce(function(){this.rebuildDisplayText()},300);var ty={exports:{}},ny;function L$(){return ny||(ny=1,(function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()})(ty)),ty.exports}L$();const O$=!0,tr="u-",I$="uplot",N$=tr+"hz",D$=tr+"vt",P$=tr+"title",F$=tr+"wrap",B$=tr+"under",j$=tr+"over",W$=tr+"axis",Es=tr+"off",z$=tr+"select",H$=tr+"cursor-x",U$=tr+"cursor-y",q$=tr+"cursor-pt",V$=tr+"legend",K$=tr+"live",G$=tr+"inline",Y$=tr+"series",X$=tr+"marker",ry=tr+"label",Q$=tr+"value",cl="width",ul="height",hl="top",iy="bottom",fa="left",zh="right",Hh="#000",oy=Hh+"0",Uh="mousemove",sy="mousedown",qh="mouseup",ay="mouseenter",ly="mouseleave",cy="dblclick",Z$="resize",J$="scroll",uy="change",Ac="dppxchange",Vh="--",ga=typeof window<"u",Kh=ga?document:null,ma=ga?window:null,eM=ga?navigator:null;let Kt,Tc;function Gh(){let t=devicePixelRatio;Kt!=t&&(Kt=t,Tc&&Qh(uy,Tc,Gh),Tc=matchMedia(`(min-resolution: ${Kt-.001}dppx) and (max-resolution: ${Kt+.001}dppx)`),Rs(uy,Tc,Gh),ma.dispatchEvent(new CustomEvent(Ac)))}function li(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Yh(t,e){let n=t.classList;n.contains(e)&&n.remove(e)}function fn(t,e,n){t.style[e]=n+"px"}function zi(t,e,n,r){let h=Kh.createElement(t);return e!=null&&li(h,e),n!=null&&n.insertBefore(h,r),h}function ki(t,e){return zi("div",t,e)}const hy=new WeakMap;function lo(t,e,n,r,h){let d="translate("+e+"px,"+n+"px)",f=hy.get(t);d!=f&&(t.style.transform=d,hy.set(t,d),e<0||n<0||e>r||n>h?li(t,Es):Yh(t,Es))}const dy=new WeakMap;function py(t,e,n){let r=e+n,h=dy.get(t);r!=h&&(dy.set(t,r),t.style.background=e,t.style.borderColor=n)}const fy=new WeakMap;function gy(t,e,n,r){let h=e+""+n,d=fy.get(t);h!=d&&(fy.set(t,h),t.style.height=n+"px",t.style.width=e+"px",t.style.marginLeft=r?-e/2+"px":0,t.style.marginTop=r?-n/2+"px":0)}const Xh={passive:!0},tM={...Xh,capture:!0};function Rs(t,e,n,r){e.addEventListener(t,n,r?tM:Xh)}function Qh(t,e,n,r){e.removeEventListener(t,n,Xh)}ga&&Gh();function Hi(t,e,n,r){let h;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)h=d?n+r>>1:ui((n+r)/2),e[h]<t?n=h:r=h;return t-e[n]<=e[r]-t?n:r}function my(t){return(e,n,r)=>{let h=-1,d=-1;for(let f=n;f<=r;f++)if(t(e[f])){h=f;break}for(let f=r;f>=n;f--)if(t(e[f])){d=f;break}return[h,d]}}const yy=t=>t!=null,vy=t=>t!=null&&t>0,Ec=my(yy),nM=my(vy);function rM(t,e,n,r=0,h=!1){let d=h?nM:Ec,f=h?vy:yy;[e,n]=d(t,e,n);let w=t[e],p=t[e];if(e>-1)if(r==1)w=t[e],p=t[n];else if(r==-1)w=t[n],p=t[e];else for(let g=e;g<=n;g++){let i=t[g];f(i)&&(i<w?w=i:i>p&&(p=i))}return[w??ln,p??-ln]}function Rc(t,e,n,r){let h=xy(t),d=xy(e);t==e&&(h==-1?(t*=n,e/=n):(t/=n,e*=n));let f=n==10?_o:Sy,w=h==1?ui:_i,p=d==1?_i:ui,g=w(f(nr(t))),i=p(f(nr(e))),a=ya(n,g),u=ya(n,i);return n==10&&(g<0&&(a=cn(a,-g)),i<0&&(u=cn(u,-i))),r||n==2?(t=a*h,e=u*d):(t=Ty(t,a),e=Ic(e,u)),[t,e]}function Zh(t,e,n,r){let h=Rc(t,e,n,r);return t==0&&(h[0]=0),e==0&&(h[1]=0),h}const Jh=.1,wy={mode:3,pad:Jh},dl={pad:0,soft:null,mode:0},iM={min:dl,max:dl};function Lc(t,e,n,r){return Nc(n)?by(t,e,n):(dl.pad=n,dl.soft=r?0:null,dl.mode=r?3:0,by(t,e,iM))}function Ut(t,e){return t??e}function oM(t,e,n){for(e=Ut(e,0),n=Ut(n,t.length-1);e<=n;){if(t[e]!=null)return!0;e++}return!1}function by(t,e,n){let r=n.min,h=n.max,d=Ut(r.pad,0),f=Ut(h.pad,0),w=Ut(r.hard,-ln),p=Ut(h.hard,ln),g=Ut(r.soft,ln),i=Ut(h.soft,-ln),a=Ut(r.mode,0),u=Ut(h.mode,0),c=e-t,o=_o(c),l=Dr(nr(t),nr(e)),m=_o(l),b=nr(m-o);(c<1e-24||b>10)&&(c=0,(t==0||e==0)&&(c=1e-24,a==2&&g!=ln&&(d=0),u==2&&i!=-ln&&(f=0)));let S=c||l||1e3,E=_o(S),M=ya(10,ui(E)),k=S*(c==0?t==0?.1:1:d),x=cn(Ty(t-k,M/10),24),R=t>=g&&(a==1||a==3&&x<=g||a==2&&x>=g)?g:ln,I=Dr(w,x<R&&t>=R?R:Ui(R,x)),O=S*(c==0?e==0?.1:1:f),L=cn(Ic(e+O,M/10),24),W=e<=i&&(u==1||u==3&&L>=i||u==2&&L<=i)?i:-ln,F=Ui(p,L>W&&e<=W?W:Dr(W,L));return I==F&&I==0&&(F=100),[I,F]}const sM=new Intl.NumberFormat(ga?eM.language:"en-US"),ed=t=>sM.format(t),ci=Math,Oc=ci.PI,nr=ci.abs,ui=ci.floor,rr=ci.round,_i=ci.ceil,Ui=ci.min,Dr=ci.max,ya=ci.pow,xy=ci.sign,_o=ci.log10,Sy=ci.log2,aM=(t,e=1)=>ci.sinh(t)*e,td=(t,e=1)=>ci.asinh(t/e),ln=1/0;function ky(t){return(_o((t^t>>31)-(t>>31))|0)+1}function nd(t,e,n){return Ui(Dr(t,e),n)}function _y(t){return typeof t=="function"}function Dt(t){return _y(t)?t:()=>t}const lM=()=>{},Cy=t=>t,$y=(t,e)=>e,cM=t=>null,My=t=>!0,Ay=(t,e)=>t==e,uM=/\.\d*?(?=9{6,}|0{6,})/gm,Ls=t=>{if(Ry(t)||Qo.has(t))return t;const e=`${t}`,n=e.match(uM);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[h,d]=e.split("e");return+`${Ls(h)}e${d}`}return cn(t,r)};function Os(t,e){return Ls(cn(Ls(t/e))*e)}function Ic(t,e){return Ls(_i(Ls(t/e))*e)}function Ty(t,e){return Ls(ui(Ls(t/e))*e)}function cn(t,e=0){if(Ry(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return rr(r)/n}const Qo=new Map;function Ey(t){return((""+t).split(".")[1]||"").length}function pl(t,e,n,r){let h=[],d=r.map(Ey);for(let f=e;f<n;f++){let w=nr(f),p=cn(ya(t,f),w);for(let g=0;g<r.length;g++){let i=t==10?+`${r[g]}e${f}`:r[g]*p,a=(f>=0?0:w)+(f>=d[g]?0:d[g]),u=t==10?i:cn(i,a);h.push(u),Qo.set(u,a)}}return h}const fl={},rd=[],va=[null,null],Zo=Array.isArray,Ry=Number.isInteger,hM=t=>t===void 0;function Ly(t){return typeof t=="string"}function Nc(t){let e=!1;if(t!=null){let n=t.constructor;e=n==null||n==Object}return e}function dM(t){return t!=null&&typeof t=="object"}const pM=Object.getPrototypeOf(Uint8Array),Oy="__proto__";function wa(t,e=Nc){let n;if(Zo(t)){let r=t.find(h=>h!=null);if(Zo(r)||e(r)){n=Array(t.length);for(let h=0;h<t.length;h++)n[h]=wa(t[h],e)}else n=t.slice()}else if(t instanceof pM)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Oy&&(n[r]=wa(t[r],e))}else n=t;return n}function Gn(t){let e=arguments;for(let n=1;n<e.length;n++){let r=e[n];for(let h in r)h!=Oy&&(Nc(t[h])?Gn(t[h],wa(r[h])):t[h]=wa(r[h]))}return t}const fM=0,gM=1,mM=2;function yM(t,e,n){for(let r=0,h,d=-1;r<e.length;r++){let f=e[r];if(f>d){for(h=f-1;h>=0&&t[h]==null;)t[h--]=null;for(h=f+1;h<n&&t[h]==null;)t[d=h++]=null}}}function vM(t,e){if(xM(t)){let f=t[0].slice();for(let w=1;w<t.length;w++)f.push(...t[w].slice(1));return SM(f[0])||(f=bM(f)),f}let n=new Set;for(let f=0;f<t.length;f++){let w=t[f][0],p=w.length;for(let g=0;g<p;g++)n.add(w[g])}let r=[Array.from(n).sort((f,w)=>f-w)],h=r[0].length,d=new Map;for(let f=0;f<h;f++)d.set(r[0][f],f);for(let f=0;f<t.length;f++){let w=t[f],p=w[0];for(let g=1;g<w.length;g++){let i=w[g],a=Array(h).fill(void 0),u=e?e[f][g]:gM,c=[];for(let o=0;o<i.length;o++){let l=i[o],m=d.get(p[o]);l===null?u!=fM&&(a[m]=l,u==mM&&c.push(m)):a[m]=l}yM(a,c,h),r.push(a)}}return r}const wM=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function bM(t){let e=t[0],n=e.length,r=Array(n);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,f)=>e[d]-e[f]);let h=[];for(let d=0;d<t.length;d++){let f=t[d],w=Array(n);for(let p=0;p<n;p++)w[p]=f[r[p]];h.push(w)}return h}function xM(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let h=t[r][0];if(h.length!=n)return!1;if(h!=e){for(let d=0;d<n;d++)if(h[d]!=e[d])return!1}}return!0}function SM(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,h=n-1;for(;r<=h&&t[r]==null;)r++;for(;h>=r&&t[h]==null;)h--;if(h<=r)return!0;const d=Dr(1,ui((h-r+1)/e));for(let f=t[r],w=r+d;w<=h;w+=d){const p=t[w];if(p!=null){if(p<=f)return!1;f=p}}return!0}const Iy=["January","February","March","April","May","June","July","August","September","October","November","December"],Ny=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Dy(t){return t.slice(0,3)}const kM=Ny.map(Dy),_M=Iy.map(Dy),CM={MMMM:Iy,MMM:_M,WWWW:Ny,WWW:kM};function gl(t){return(t<10?"0":"")+t}function $M(t){return(t<10?"00":t<100?"0":"")+t}const MM={YYYY:t=>t.getFullYear(),YY:t=>(t.getFullYear()+"").slice(2),MMMM:(t,e)=>e.MMMM[t.getMonth()],MMM:(t,e)=>e.MMM[t.getMonth()],MM:t=>gl(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>gl(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>gl(t.getHours()),H:t=>t.getHours(),h:t=>{let e=t.getHours();return e==0?12:e>12?e-12:e},AA:t=>t.getHours()>=12?"PM":"AM",aa:t=>t.getHours()>=12?"pm":"am",a:t=>t.getHours()>=12?"p":"a",mm:t=>gl(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>gl(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>$M(t.getMilliseconds())};function id(t,e){e=e||CM;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,h;for(;h=r.exec(t);)n.push(h[0][0]=="{"?MM[h[1]]:h[0]);return d=>{let f="";for(let w=0;w<n.length;w++)f+=typeof n[w]=="string"?n[w]:n[w](d,e);return f}}const AM=new Intl.DateTimeFormat().resolvedOptions().timeZone;function TM(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==AM?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Py=t=>t%1==0,Dc=[1,2,2.5,5],EM=pl(10,-32,0,Dc),Fy=pl(10,0,32,Dc),RM=Fy.filter(Py),Is=EM.concat(Fy),od=`
|
1495
|
+
`,By="{YYYY}",jy=od+By,Wy="{M}/{D}",ml=od+Wy,Pc=ml+"/{YY}",zy="{aa}",LM="{h}:{mm}",ba=LM+zy,Hy=od+ba,Uy=":{ss}",Qt=null;function qy(t){let e=t*1e3,n=e*60,r=n*60,h=r*24,d=h*30,f=h*365,w=(t==1?pl(10,0,3,Dc).filter(Py):pl(10,-3,0,Dc)).concat([e,e*5,e*10,e*15,e*30,n,n*5,n*10,n*15,n*30,r,r*2,r*3,r*4,r*6,r*8,r*12,h,h*2,h*3,h*4,h*5,h*6,h*7,h*8,h*9,h*10,h*15,d,d*2,d*3,d*4,d*6,f,f*2,f*5,f*10,f*25,f*50,f*100]);const p=[[f,By,Qt,Qt,Qt,Qt,Qt,Qt,1],[h*28,"{MMM}",jy,Qt,Qt,Qt,Qt,Qt,1],[h,Wy,jy,Qt,Qt,Qt,Qt,Qt,1],[r,"{h}"+zy,Pc,Qt,ml,Qt,Qt,Qt,1],[n,ba,Pc,Qt,ml,Qt,Qt,Qt,1],[e,Uy,Pc+" "+ba,Qt,ml+" "+ba,Qt,Hy,Qt,1],[t,Uy+".{fff}",Pc+" "+ba,Qt,ml+" "+ba,Qt,Hy,Qt,1]];function g(i){return(a,u,c,o,l,m)=>{let b=[],S=l>=f,E=l>=d&&l<f,M=i(c),k=cn(M*t,3),x=sd(M.getFullYear(),S?0:M.getMonth(),E||S?1:M.getDate()),R=cn(x*t,3);if(E||S){let I=E?l/d:0,O=S?l/f:0,L=k==R?k:cn(sd(x.getFullYear()+O,x.getMonth()+I,1)*t,3),W=new Date(rr(L/t)),F=W.getFullYear(),N=W.getMonth();for(let $=0;L<=o;$++){let _=sd(F+O*$,N+I*$,1),D=_-i(cn(_*t,3));L=cn((+_+D)*t,3),L<=o&&b.push(L)}}else{let I=l>=h?h:l,O=ui(c)-ui(k),L=R+O+Ic(k-R,I);b.push(L);let W=i(L),F=W.getHours()+W.getMinutes()/n+W.getSeconds()/r,N=l/r,$=a.axes[u]._space,_=m/$;for(;L=cn(L+l,t==1?0:3),!(L>o);)if(N>1){let D=ui(cn(F+N,6))%24,z=i(L).getHours()-D;z>1&&(z=-1),L-=z*r,F=(F+N)%24;let U=b[b.length-1];cn((L-U)/l,3)*_>=.7&&b.push(L)}else b.push(L)}return b}}return[w,p,g]}const[OM,IM,NM]=qy(1),[DM,PM,FM]=qy(.001);pl(2,-53,53,[1]);function Vy(t,e){return t.map(n=>n.map((r,h)=>h==0||h==8||r==null?r:e(h==1||n[8]==0?r:n[1]+r)))}function Ky(t,e){return(n,r,h,d,f)=>{let w=e.find(o=>f>=o[0])||e[e.length-1],p,g,i,a,u,c;return r.map(o=>{let l=t(o),m=l.getFullYear(),b=l.getMonth(),S=l.getDate(),E=l.getHours(),M=l.getMinutes(),k=l.getSeconds(),x=m!=p&&w[2]||b!=g&&w[3]||S!=i&&w[4]||E!=a&&w[5]||M!=u&&w[6]||k!=c&&w[7]||w[1];return p=m,g=b,i=S,a=E,u=M,c=k,x(l)})}}function BM(t,e){let n=id(e);return(r,h,d,f,w)=>h.map(p=>n(t(p)))}function sd(t,e,n){return new Date(t,e,n)}function Gy(t,e){return e(t)}const jM="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Yy(t,e){return(n,r,h,d)=>d==null?Vh:e(t(r))}function WM(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function zM(t,e){return t.series[e].fill(t,e)}const HM={show:!0,live:!0,isolate:!1,mount:lM,markers:{show:!0,width:2,stroke:WM,fill:zM,dash:"solid"},idx:null,idxs:null,values:[]};function UM(t,e){let n=t.cursor.points,r=ki(),h=n.size(t,e);fn(r,cl,h),fn(r,ul,h);let d=h/-2;fn(r,"marginLeft",d),fn(r,"marginTop",d);let f=n.width(t,e,h);return f&&fn(r,"borderWidth",f),r}function qM(t,e){let n=t.series[e].points;return n._fill||n._stroke}function VM(t,e){let n=t.series[e].points;return n._stroke||n._fill}function KM(t,e){return t.series[e].points.size}const ad=[0,0];function GM(t,e,n){return ad[0]=e,ad[1]=n,ad}function Fc(t,e,n,r=!0){return h=>{h.button==0&&(!r||h.target==e)&&n(h)}}function ld(t,e,n,r=!0){return h=>{(!r||h.target==e)&&n(h)}}const YM={show:!0,x:!0,y:!0,lock:!1,move:GM,points:{one:!1,show:UM,size:KM,width:0,stroke:VM,fill:qM},bind:{mousedown:Fc,mouseup:Fc,click:Fc,dblclick:Fc,mousemove:ld,mouseleave:ld,mouseenter:ld},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(t,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(t,e,n,r,h)=>r-h,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Xy={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},cd=Gn({},Xy,{filter:$y}),Qy=Gn({},cd,{size:10}),Zy=Gn({},Xy,{show:!1}),ud='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',Jy="bold "+ud,ev=1.5,tv={show:!0,scale:"x",stroke:Hh,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Jy,side:2,grid:cd,ticks:Qy,border:Zy,font:ud,lineGap:ev,rotate:0},XM="Value",QM="Time",nv={show:!0,scale:"x",auto:!1,sorted:1,min:ln,max:-ln,idxs:[]};function ZM(t,e,n,r,h){return e.map(d=>d==null?"":ed(d))}function JM(t,e,n,r,h,d,f){let w=[],p=Qo.get(h)||0;n=f?n:cn(Ic(n,h),p);for(let g=n;g<=r;g=cn(g+h,p))w.push(Object.is(g,-0)?0:g);return w}function hd(t,e,n,r,h,d,f){const w=[],p=t.scales[t.axes[e].scale].log,g=p==10?_o:Sy,i=ui(g(n));h=ya(p,i),p==10&&(h=Is[Hi(h,Is)]);let a=n,u=h*p;p==10&&(u=Is[Hi(u,Is)]);do w.push(a),a=a+h,p==10&&!Qo.has(a)&&(a=cn(a,Qo.get(h))),a>=u&&(h=a,u=h*p,p==10&&(u=Is[Hi(u,Is)]));while(a<=r);return w}function eA(t,e,n,r,h,d,f){let w=t.scales[t.axes[e].scale].asinh,p=r>w?hd(t,e,Dr(w,n),r,h):[w],g=r>=0&&n<=0?[0]:[];return(n<-w?hd(t,e,Dr(w,-r),-n,h):[w]).reverse().map(i=>-i).concat(g,p)}const rv=/./,tA=/[12357]/,nA=/[125]/,iv=/1/,dd=(t,e,n,r)=>t.map((h,d)=>e==4&&h==0||d%r==0&&n.test(h.toExponential()[h<0?1:0])?h:null);function rA(t,e,n,r,h){let d=t.axes[n],f=d.scale,w=t.scales[f],p=t.valToPos,g=d._space,i=p(10,f),a=p(9,f)-i>=g?rv:p(7,f)-i>=g?tA:p(5,f)-i>=g?nA:iv;if(a==iv){let u=nr(p(1,f)-i);if(u<g)return dd(e.slice().reverse(),w.distr,a,_i(g/u)).reverse()}return dd(e,w.distr,a,1)}function iA(t,e,n,r,h){let d=t.axes[n],f=d.scale,w=d._space,p=t.valToPos,g=nr(p(1,f)-p(2,f));return g<w?dd(e.slice().reverse(),3,rv,_i(w/g)).reverse():e}function oA(t,e,n,r){return r==null?Vh:e==null?"":ed(e)}const ov={show:!0,scale:"y",stroke:Hh,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Jy,side:3,grid:cd,ticks:Qy,border:Zy,font:ud,lineGap:ev,rotate:0};function sA(t,e){let n=3+(t||1)*2;return cn(n*e,3)}function aA(t,e){let{scale:n,idxs:r}=t.series[0],h=t._data[0],d=t.valToPos(h[r[0]],n,!0),f=t.valToPos(h[r[1]],n,!0),w=nr(f-d),p=t.series[e],g=w/(p.points.space*Kt);return r[1]-r[0]<=g}const sv={scale:null,auto:!0,sorted:0,min:ln,max:-ln},av=(t,e,n,r,h)=>h,lv={show:!0,auto:!0,sorted:0,gaps:av,alpha:1,facets:[Gn({},sv,{scale:"x"}),Gn({},sv,{scale:"y"})]},cv={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:av,alpha:1,points:{show:aA,filter:null},values:null,min:ln,max:-ln,idxs:[],path:null,clip:null};function lA(t,e,n,r,h){return n/10}const uv={time:O$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},cA=Gn({},uv,{time:!1,ori:1}),hv={};function dv(t,e){let n=hv[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(h=>h!=r)},pub(r,h,d,f,w,p,g){for(let i=0;i<n.plots.length;i++)n.plots[i]!=h&&n.plots[i].pub(r,h,d,f,w,p,g)}},t!=null&&(hv[t]=n)),n}const xa=1,pd=2;function Ns(t,e,n){const r=t.mode,h=t.series[e],d=r==2?t._data[e]:t._data,f=t.scales,w=t.bbox;let p=d[0],g=r==2?d[1]:d[e],i=r==2?f[h.facets[0].scale]:f[t.series[0].scale],a=r==2?f[h.facets[1].scale]:f[h.scale],u=w.left,c=w.top,o=w.width,l=w.height,m=t.valToPosH,b=t.valToPosV;return i.ori==0?n(h,p,g,i,a,m,b,u,c,o,l,jc,Sa,zc,gv,yv):n(h,p,g,i,a,b,m,c,u,l,o,Wc,ka,md,mv,vv)}function fd(t,e){let n=0,r=0,h=Ut(t.bands,rd);for(let d=0;d<h.length;d++){let f=h[d];f.series[0]==e?n=f.dir:f.series[1]==e&&(f.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function uA(t,e,n,r,h){let d=t.mode,f=t.series[e],w=d==2?f.facets[1].scale:f.scale,p=t.scales[w];return h==-1?p.min:h==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Co(t,e,n,r,h,d){return Ns(t,e,(f,w,p,g,i,a,u,c,o,l,m)=>{let b=f.pxRound;const S=g.dir*(g.ori==0?1:-1),E=g.ori==0?Sa:ka;let M,k;S==1?(M=n,k=r):(M=r,k=n);let x=b(a(w[M],g,l,c)),R=b(u(p[M],i,m,o)),I=b(a(w[k],g,l,c)),O=b(u(d==1?i.max:i.min,i,m,o)),L=new Path2D(h);return E(L,I,O),E(L,x,O),E(L,x,R),L})}function Bc(t,e,n,r,h,d){let f=null;if(t.length>0){f=new Path2D;const w=e==0?zc:md;let p=n;for(let a=0;a<t.length;a++){let u=t[a];if(u[1]>u[0]){let c=u[0]-p;c>0&&w(f,p,r,c,r+d),p=u[1]}}let g=n+h-p,i=10;g>0&&w(f,p,r-i/2,g,r+d+i)}return f}function hA(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function gd(t,e,n,r,h,d,f){let w=[],p=t.length;for(let g=h==1?n:r;g>=n&&g<=r;g+=h)if(e[g]===null){let i=g,a=g;if(h==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let u=d(t[i]),c=a==i?u:d(t[a]),o=i-h;u=f<=0&&o>=0&&o<p?d(t[o]):u;let l=a+h;c=f>=0&&l>=0&&l<p?d(t[l]):c,c>=u&&w.push([u,c])}return w}function pv(t){return t==0?Cy:t==1?rr:e=>Os(e,t)}function fv(t){let e=t==0?jc:Wc,n=t==0?(h,d,f,w,p,g)=>{h.arcTo(d,f,w,p,g)}:(h,d,f,w,p,g)=>{h.arcTo(f,d,p,w,g)},r=t==0?(h,d,f,w,p)=>{h.rect(d,f,w,p)}:(h,d,f,w,p)=>{h.rect(f,d,p,w)};return(h,d,f,w,p,g=0,i=0)=>{g==0&&i==0?r(h,d,f,w,p):(g=Ui(g,w/2,p/2),i=Ui(i,w/2,p/2),e(h,d+g,f),n(h,d+w,f,d+w,f+p,g),n(h,d+w,f+p,d,f+p,i),n(h,d,f+p,d,f,i),n(h,d,f,d+w,f,g),h.closePath())}}const jc=(t,e,n)=>{t.moveTo(e,n)},Wc=(t,e,n)=>{t.moveTo(n,e)},Sa=(t,e,n)=>{t.lineTo(e,n)},ka=(t,e,n)=>{t.lineTo(n,e)},zc=fv(0),md=fv(1),gv=(t,e,n,r,h,d)=>{t.arc(e,n,r,h,d)},mv=(t,e,n,r,h,d)=>{t.arc(n,e,r,h,d)},yv=(t,e,n,r,h,d,f)=>{t.bezierCurveTo(e,n,r,h,d,f)},vv=(t,e,n,r,h,d,f)=>{t.bezierCurveTo(n,e,h,r,f,d)};function wv(t){return(e,n,r,h,d)=>Ns(e,n,(f,w,p,g,i,a,u,c,o,l,m)=>{let{pxRound:b,points:S}=f,E,M;g.ori==0?(E=jc,M=gv):(E=Wc,M=mv);const k=cn(S.width*Kt,3);let x=(S.size-S.width)/2*Kt,R=cn(x*2,3),I=new Path2D,O=new Path2D,{left:L,top:W,width:F,height:N}=e.bbox;zc(O,L-R,W-R,F+R*2,N+R*2);const $=_=>{if(p[_]!=null){let D=b(a(w[_],g,l,c)),z=b(u(p[_],i,m,o));E(I,D+x,z),M(I,D,z,x,0,Oc*2)}};if(d)d.forEach($);else for(let _=r;_<=h;_++)$(_);return{stroke:k>0?I:null,fill:I,clip:O,flags:xa|pd}})}function bv(t){return(e,n,r,h,d,f)=>{r!=h&&(d!=r&&f!=r&&t(e,n,r),d!=h&&f!=h&&t(e,n,h),t(e,n,f))}}const dA=bv(Sa),pA=bv(ka);function xv(t){const e=Ut(t==null?void 0:t.alignGaps,0);return(n,r,h,d)=>Ns(n,r,(f,w,p,g,i,a,u,c,o,l,m)=>{[h,d]=Ec(p,h,d);let b=f.pxRound,S=F=>b(a(F,g,l,c)),E=F=>b(u(F,i,m,o)),M,k;g.ori==0?(M=Sa,k=dA):(M=ka,k=pA);const x=g.dir*(g.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},I=R.stroke;let O=!1;if(d-h>=l*4){let F=he=>n.posToVal(he,g.key,!0),N=null,$=null,_,D,z,U=S(w[x==1?h:d]),G=S(w[h]),Z=S(w[d]),te=F(x==1?G+1:Z-1);for(let he=x==1?h:d;he>=h&&he<=d;he+=x){let ne=w[he],le=(x==1?ne<te:ne>te)?U:S(ne),ue=p[he];le==U?ue!=null?(D=ue,N==null?(M(I,le,E(D)),_=N=$=D):D<N?N=D:D>$&&($=D)):ue===null&&(O=!0):(N!=null&&k(I,U,E(N),E($),E(_),E(D)),ue!=null?(D=ue,M(I,le,E(D)),N=$=_=D):(N=$=null,ue===null&&(O=!0)),U=le,te=F(U+x))}N!=null&&N!=$&&z!=U&&k(I,U,E(N),E($),E(_),E(D))}else for(let F=x==1?h:d;F>=h&&F<=d;F+=x){let N=p[F];N===null?O=!0:N!=null&&M(I,S(w[F]),E(N))}let[L,W]=fd(n,r);if(f.fill!=null||L!=0){let F=R.fill=new Path2D(I),N=f.fillTo(n,r,f.min,f.max,L),$=E(N),_=S(w[h]),D=S(w[d]);x==-1&&([D,_]=[_,D]),M(F,D,$),M(F,_,$)}if(!f.spanGaps){let F=[];O&&F.push(...gd(w,p,h,d,x,S,e)),R.gaps=F=f.gaps(n,r,h,d,F),R.clip=Bc(F,g.ori,c,o,l,m)}return W!=0&&(R.band=W==2?[Co(n,r,h,d,I,-1),Co(n,r,h,d,I,1)]:Co(n,r,h,d,I,W)),R})}function fA(t){const e=Ut(t.align,1),n=Ut(t.ascDesc,!1),r=Ut(t.alignGaps,0),h=Ut(t.extend,!1);return(d,f,w,p)=>Ns(d,f,(g,i,a,u,c,o,l,m,b,S,E)=>{[w,p]=Ec(a,w,p);let M=g.pxRound,{left:k,width:x}=d.bbox,R=Z=>M(o(Z,u,S,m)),I=Z=>M(l(Z,c,E,b)),O=u.ori==0?Sa:ka;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},W=L.stroke,F=u.dir*(u.ori==0?1:-1);let N=I(a[F==1?w:p]),$=R(i[F==1?w:p]),_=$,D=$;h&&e==-1&&(D=k,O(W,D,N)),O(W,$,N);for(let Z=F==1?w:p;Z>=w&&Z<=p;Z+=F){let te=a[Z];if(te==null)continue;let he=R(i[Z]),ne=I(te);e==1?O(W,he,N):O(W,_,ne),O(W,he,ne),N=ne,_=he}let z=_;h&&e==1&&(z=k+x,O(W,z,N));let[U,G]=fd(d,f);if(g.fill!=null||U!=0){let Z=L.fill=new Path2D(W),te=g.fillTo(d,f,g.min,g.max,U),he=I(te);O(Z,z,he),O(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...gd(i,a,w,p,F,R,r));let te=g.width*Kt/2,he=n||e==1?te:-te,ne=n||e==-1?-te:te;Z.forEach(le=>{le[0]+=he,le[1]+=ne}),L.gaps=Z=g.gaps(d,f,w,p,Z),L.clip=Bc(Z,u.ori,m,b,S,E)}return G!=0&&(L.band=G==2?[Co(d,f,w,p,W,-1),Co(d,f,w,p,W,1)]:Co(d,f,w,p,W,G)),L})}function Sv(t,e,n,r,h,d,f=ln){if(t.length>1){let w=null;for(let p=0,g=1/0;p<t.length;p++)if(e[p]!==void 0){if(w!=null){let i=nr(t[p]-t[w]);i<g&&(g=i,f=nr(n(t[p],r,h,d)-n(t[w],r,h,d)))}w=p}}return f}function gA(t){t=t||fl;const e=Ut(t.size,[.6,ln,1]),n=t.align||0,r=t.gap||0;let h=t.radius;h=h==null?[0,0]:typeof h=="number"?[h,0]:h;const d=Dt(h),f=1-e[0],w=Ut(e[1],ln),p=Ut(e[2],1),g=Ut(t.disp,fl),i=Ut(t.each,c=>{}),{fill:a,stroke:u}=g;return(c,o,l,m)=>Ns(c,o,(b,S,E,M,k,x,R,I,O,L,W)=>{let F=b.pxRound,N=n,$=r*Kt,_=w*Kt,D=p*Kt,z,U;M.ori==0?[z,U]=d(c,o):[U,z]=d(c,o);const G=M.dir*(M.ori==0?1:-1);let Z=M.ori==0?zc:md,te=M.ori==0?i:(qe,qt,gn,Qn,Br,$r,kn)=>{i(qe,qt,gn,Br,Qn,kn,$r)},he=Ut(c.bands,rd).find(qe=>qe.series[0]==o),ne=he!=null?he.dir:0,le=b.fillTo(c,o,b.min,b.max,ne),ue=F(R(le,k,W,O)),ce,ge,Ae,Te=L,Re=F(b.width*Kt),Xe=!1,Ke=null,dt=null,rt=null,gt=null;a!=null&&(Re==0||u!=null)&&(Xe=!0,Ke=a.values(c,o,l,m),dt=new Map,new Set(Ke).forEach(qe=>{qe!=null&&dt.set(qe,new Path2D)}),Re>0&&(rt=u.values(c,o,l,m),gt=new Map,new Set(rt).forEach(qe=>{qe!=null&>.set(qe,new Path2D)})));let{x0:tn,size:Bn}=g;if(tn!=null&&Bn!=null){N=1,S=tn.values(c,o,l,m),tn.unit==2&&(S=S.map(qt=>c.posToVal(I+qt*L,M.key,!0)));let qe=Bn.values(c,o,l,m);Bn.unit==2?ge=qe[0]*L:ge=x(qe[0],M,L,I)-x(0,M,L,I),Te=Sv(S,E,x,M,L,I,Te),Ae=Te-ge+$}else Te=Sv(S,E,x,M,L,I,Te),Ae=Te*f+$,ge=Te-Ae;Ae<1&&(Ae=0),Re>=ge/2&&(Re=0),Ae<5&&(F=Cy);let Zt=Ae>0,hi=Te-Ae-(Zt?Re:0);ge=F(nd(hi,D,_)),ce=(N==0?ge/2:N==G?0:ge)-N*G*((N==0?$/2:0)+(Zt?Re/2:0));const Sn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Xn=Xe?null:new Path2D;let ur=null;if(he!=null)ur=c.data[he.series[1]];else{let{y0:qe,y1:qt}=g;qe!=null&&qt!=null&&(E=qt.values(c,o,l,m),ur=qe.values(c,o,l,m))}let Fr=z*ge,vt=U*ge;for(let qe=G==1?l:m;qe>=l&&qe<=m;qe+=G){let qt=E[qe];if(qt==null)continue;if(ur!=null){let nn=ur[qe]??0;if(qt-nn==0)continue;ue=R(nn,k,W,O)}let gn=M.distr!=2||g!=null?S[qe]:qe,Qn=x(gn,M,L,I),Br=R(Ut(qt,le),k,W,O),$r=F(Qn-ce),kn=F(Dr(Br,ue)),ir=F(Ui(Br,ue)),hr=kn-ir;if(qt!=null){let nn=qt<0?vt:Fr,or=qt<0?Fr:vt;Xe?(Re>0&&rt[qe]!=null&&Z(gt.get(rt[qe]),$r,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),Ke[qe]!=null&&Z(dt.get(Ke[qe]),$r,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or)):Z(Xn,$r,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),te(c,o,qe,$r-Re/2,ir,ge+Re,hr)}}return Re>0?Sn.stroke=Xe?gt:Xn:Xe||(Sn._fill=b.width==0?b._fill:b._stroke??b._fill,Sn.width=0),Sn.fill=Xe?dt:Xn,Sn})}function mA(t,e){const n=Ut(e==null?void 0:e.alignGaps,0);return(r,h,d,f)=>Ns(r,h,(w,p,g,i,a,u,c,o,l,m,b)=>{[d,f]=Ec(g,d,f);let S=w.pxRound,E=z=>S(u(z,i,m,o)),M=z=>S(c(z,a,b,l)),k,x,R;i.ori==0?(k=jc,R=Sa,x=yv):(k=Wc,R=ka,x=vv);const I=i.dir*(i.ori==0?1:-1);let O=E(p[I==1?d:f]),L=O,W=[],F=[];for(let z=I==1?d:f;z>=d&&z<=f;z+=I)if(g[z]!=null){let U=p[z],G=E(U);W.push(L=G),F.push(M(g[z]))}const N={stroke:t(W,F,k,R,x,S),fill:null,clip:null,band:null,gaps:null,flags:xa},$=N.stroke;let[_,D]=fd(r,h);if(w.fill!=null||_!=0){let z=N.fill=new Path2D($),U=w.fillTo(r,h,w.min,w.max,_),G=M(U);R(z,L,G),R(z,O,G)}if(!w.spanGaps){let z=[];z.push(...gd(p,g,d,f,I,E,n)),N.gaps=z=w.gaps(r,h,d,f,z),N.clip=Bc(z,i.ori,o,l,m,b)}return D!=0&&(N.band=D==2?[Co(r,h,d,f,$,-1),Co(r,h,d,f,$,1)]:Co(r,h,d,f,$,D)),N})}function yA(t){return mA(vA,t)}function vA(t,e,n,r,h,d){const f=t.length;if(f<2)return null;const w=new Path2D;if(n(w,t[0],e[0]),f==2)r(w,t[1],e[1]);else{let p=Array(f),g=Array(f-1),i=Array(f-1),a=Array(f-1);for(let u=0;u<f-1;u++)i[u]=e[u+1]-e[u],a[u]=t[u+1]-t[u],g[u]=i[u]/a[u];p[0]=g[0];for(let u=1;u<f-1;u++)g[u]===0||g[u-1]===0||g[u-1]>0!=g[u]>0?p[u]=0:(p[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/g[u-1]+(a[u]+2*a[u-1])/g[u]),isFinite(p[u])||(p[u]=0));p[f-1]=g[f-2];for(let u=0;u<f-1;u++)h(w,t[u]+a[u]/3,e[u]+p[u]*a[u]/3,t[u+1]-a[u]/3,e[u+1]-p[u+1]*a[u]/3,t[u+1],e[u+1])}return w}const yd=new Set;function kv(){for(let t of yd)t.syncRect(!0)}ga&&(Rs(Z$,ma,kv),Rs(J$,ma,kv,!0),Rs(Ac,ma,()=>{kr.pxRatio=Kt}));const wA=xv(),bA=wv();function _v(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((h,d)=>vd(h,d,e,n))}function xA(t,e){return t.map((n,r)=>r==0?{}:Gn({},e,n))}function vd(t,e,n,r){return Gn({},e==0?n:r,t)}function Cv(t,e,n){return e==null?va:[e,n]}const SA=Cv;function kA(t,e,n){return e==null?va:Lc(e,n,Jh,!0)}function $v(t,e,n,r){return e==null?va:Rc(e,n,t.scales[r].log,!1)}const _A=$v;function Mv(t,e,n,r){return e==null?va:Zh(e,n,t.scales[r].log,!1)}const CA=Mv;function $A(t,e,n,r,h){let d=Dr(ky(t),ky(e)),f=e-t,w=Hi(h/r*f,n);do{let p=n[w],g=r*p/f;if(g>=h&&d+(p<5?Qo.get(p):0)<=17)return[p,g]}while(++w<n.length);return[0,0]}function Av(t){let e,n;return t=t.replace(/(\d+)px/,(r,h)=>(e=rr((n=+h)*Kt))+"px"),[t,e,n]}function MA(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=cn(e[2]*Kt,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function kr(t,e,n){const r={mode:Ut(t.mode,1)},h=r.mode;function d(q,X,ie,oe){let fe=X.valToPct(q);return oe+ie*(X.dir==-1?1-fe:fe)}function f(q,X,ie,oe){let fe=X.valToPct(q);return oe+ie*(X.dir==-1?fe:1-fe)}function w(q,X,ie,oe){return X.ori==0?d(q,X,ie,oe):f(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=f;let p=!1;r.status=0;const g=r.root=ki(I$);if(t.id!=null&&(g.id=t.id),li(g,t.class),t.title){let q=ki(P$,g);q.textContent=t.title}const i=zi("canvas"),a=r.ctx=i.getContext("2d"),u=ki(F$,g);Rs("click",u,q=>{q.target===o&&(Xt!=Ai||Ft!=wo)&&Tn.click(r,q)},!0);const c=r.under=ki(B$,u);u.appendChild(i);const o=r.over=ki(j$,u);t=wa(t);const l=+Ut(t.pxAlign,1),m=pv(l);(t.plugins||[]).forEach(q=>{q.opts&&(t=q.opts(r,t)||t)});const b=t.ms||.001,S=r.series=h==1?_v(t.series||[],nv,cv,!1):xA(t.series||[null],lv),E=r.axes=_v(t.axes||[],tv,ov,!0),M=r.scales={},k=r.bands=t.bands||[];k.forEach(q=>{q.fill=Dt(q.fill||null),q.dir=Ut(q.dir,-1)});const x=h==2?S[1].facets[0].scale:S[0].scale,R={axes:Lo,series:La},I=(t.drawOrder||["axes","series"]).map(q=>R[q]);function O(q){const X=q.distr==3?ie=>_o(ie>0?ie:q.clamp(r,ie,q.min,q.max,q.key)):q.distr==4?ie=>td(ie,q.asinh):q.distr==100?ie=>q.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:fe,_max:be}=q,Ee=be-fe;return(oe-fe)/Ee}}function L(q){let X=M[q];if(X==null){let ie=(t.scales||fl)[q]||fl;if(ie.from!=null){L(ie.from);let oe=Gn({},M[ie.from],ie,{key:q});oe.valToPct=O(oe),M[q]=oe}else{X=M[q]=Gn({},q==x?uv:cA,ie),X.key=q;let oe=X.time,fe=X.range,be=Zo(fe);if((q!=x||h==2&&!oe)&&(be&&(fe[0]==null||fe[1]==null)&&(fe={min:fe[0]==null?wy:{mode:1,hard:fe[0],soft:fe[0]},max:fe[1]==null?wy:{mode:1,hard:fe[1],soft:fe[1]}},be=!1),!be&&Nc(fe))){let Ee=fe;fe=(Fe,je,Ue)=>je==null?va:Lc(je,Ue,Ee)}X.range=Dt(fe||(oe?SA:q==x?X.distr==3?_A:X.distr==4?CA:Cv:X.distr==3?$v:X.distr==4?Mv:kA)),X.auto=Dt(be?!1:X.auto),X.clamp=Dt(X.clamp||lA),X._min=X._max=null,X.valToPct=O(X)}}}L("x"),L("y"),h==1&&S.forEach(q=>{L(q.scale)}),E.forEach(q=>{L(q.scale)});for(let q in t.scales)L(q);const W=M[x],F=W.distr;let N,$;W.ori==0?(li(g,N$),N=d,$=f):(li(g,D$),N=f,$=d);const _={};for(let q in M){let X=M[q];(X.min!=null||X.max!=null)&&(_[q]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(q=>new Date(rr(q/b))),z=t.fmtDate||id,U=b==1?NM(D):FM(D),G=Ky(D,Vy(b==1?IM:PM,z)),Z=Yy(D,Gy(jM,z)),te=[],he=r.legend=Gn({},HM,t.legend),ne=r.cursor=Gn({},YM,{drag:{y:h==2}},t.cursor),le=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Dt(ce.width),ce.dash=Dt(ce.dash),ce.stroke=Dt(ce.stroke),ce.fill=Dt(ce.fill);let ge,Ae,Te,Re=[],Xe=[],Ke,dt=!1,rt={};if(he.live){const q=S[1]?S[1].values:null;dt=q!=null,Ke=dt?q(r,1,0):{_:0};for(let X in Ke)rt[X]=Vh}if(le)if(ge=zi("table",V$,g),Te=zi("tbody",null,ge),he.mount(r,ge),dt){Ae=zi("thead",null,ge,Te);let q=zi("tr",null,Ae);zi("th",null,q);for(var gt in Ke)zi("th",ry,q).textContent=gt}else li(ge,G$),he.live&&li(ge,K$);const tn={show:!0},Bn={show:!1};function Zt(q,X){if(X==0&&(dt||!he.live||h==2))return va;let ie=[],oe=zi("tr",Y$,Te,Te.childNodes[X]);li(oe,q.class),q.show||li(oe,Es);let fe=zi("th",null,oe);if(ce.show){let Fe=ki(X$,fe);if(X>0){let je=ce.width(r,X);je&&(Fe.style.border=je+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Fe.style.background=ce.fill(r,X)}}let be=ki(ry,fe);q.label instanceof HTMLElement?be.appendChild(q.label):be.textContent=q.label,X>0&&(ce.show||(be.style.color=q.width>0?ce.stroke(r,X):ce.fill(r,X)),Sn("click",fe,Fe=>{if(ne._lock)return;Xi(Fe);let je=S.indexOf(q);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ue=S.some((Ge,Qe)=>Qe>0&&Qe!=je&&Ge.show);S.forEach((Ge,Qe)=>{Qe>0&&Wr(Qe,Ue?Qe==je?tn:Bn:tn,!0,lt.setSeries)})}else Wr(je,{show:!q.show},!0,lt.setSeries)},!1),Qi&&Sn(ay,fe,Fe=>{ne._lock||(Xi(Fe),Wr(S.indexOf(q),Ri,!0,lt.setSeries))},!1));for(var Ee in Ke){let Fe=zi("td",Q$,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const hi=new Map;function Sn(q,X,ie,oe=!0){const fe=hi.get(X)||{},be=ne.bind[q](r,X,ie,oe);be&&(Rs(q,X,fe[q]=be),hi.set(X,fe))}function Xn(q,X,ie){const oe=hi.get(X)||{};for(let fe in oe)(q==null||fe==q)&&(Qh(fe,X,oe[fe]),delete oe[fe]);q==null&&hi.delete(X)}let ur=0,Fr=0,vt=0,qe=0,qt=0,gn=0,Qn=qt,Br=gn,$r=vt,kn=qe,ir=0,hr=0,nn=0,or=0;r.bbox={};let $o=!1,Ki=!1,Gi=!1,Yi=!1,Mo=!1,yr=!1;function Ao(q,X,ie){(ie||q!=r.width||X!=r.height)&&Jo(q,X),to(!1),Gi=!0,Ki=!0,vo()}function Jo(q,X){r.width=ur=vt=q,r.height=Fr=qe=X,qt=gn=0,zs(),Ta();let ie=r.bbox;ir=ie.left=Os(qt*Kt,.5),hr=ie.top=Os(gn*Kt,.5),nn=ie.width=Os(vt*Kt,.5),or=ie.height=Os(qe*Kt,.5)}const El=3;function di(){let q=!1,X=0;for(;!q;){X++;let ie=Oa(X),oe=Il(X);q=X==El||ie&&oe,q||(Jo(r.width,r.height),Ki=!0)}}function Rl({width:q,height:X}){Ao(q,X)}r.setSize=Rl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;E.forEach((fe,be)=>{if(fe.show&&fe._show){let{side:Ee,_size:Fe}=fe,je=Ee%2,Ue=fe.label!=null?fe.labelSize:0,Ge=Fe+Ue;Ge>0&&(je?(vt-=Ge,Ee==3?(qt+=Ge,oe=!0):ie=!0):(qe-=Ge,Ee==0?(gn+=Ge,q=!0):X=!0))}}),Ji[0]=q,Ji[1]=ie,Ji[2]=X,Ji[3]=oe,vt-=Tr[1]+Tr[3],qt+=Tr[3],qe-=Tr[2]+Tr[0],gn+=Tr[0]}function Ta(){let q=qt+vt,X=gn+qe,ie=qt,oe=gn;function fe(be,Ee){switch(be){case 1:return q+=Ee,q-Ee;case 2:return X+=Ee,X-Ee;case 3:return ie-=Ee,ie+Ee;case 0:return oe-=Ee,oe+Ee}}E.forEach((be,Ee)=>{if(be.show&&be._show){let Fe=be.side;be._pos=fe(Fe,be._size),be.label!=null&&(be._lpos=fe(Fe,be.labelSize))}})}if(ne.dataIdx==null){let q=ne.hover,X=q.skip=new Set(q.skip??[]);X.add(void 0);let ie=q.prox=Dt(q.prox),oe=q.bias??(q.bias=0);ne.dataIdx=(fe,be,Ee,Fe)=>{if(be==0)return Ee;let je=Ee,Ue=ie(fe,be,Ee,Fe)??ln,Ge=Ue>=0&&Ue<ln,Qe=W.ori==0?vt:qe,yt=ne.left,Ot=e[0],bt=e[be];if(X.has(bt[Ee])){je=null;let Rt=null,ut=null,it;if(oe==0||oe==-1)for(it=Ee;Rt==null&&it-- >0;)X.has(bt[it])||(Rt=it);if(oe==0||oe==1)for(it=Ee;ut==null&&it++<bt.length;)X.has(bt[it])||(ut=it);if(Rt!=null||ut!=null)if(Ge){let un=Rt==null?-1/0:N(Ot[Rt],W,Qe,0),bn=ut==null?1/0:N(Ot[ut],W,Qe,0),er=yt-un,jt=bn-yt;er<=jt?er<=Ue&&(je=Rt):jt<=Ue&&(je=ut)}else je=ut==null?Rt:Rt==null?ut:Ee-Rt<=ut-Ee?Rt:ut}else Ge&&nr(yt-N(Ot[Ee],W,Qe,0))>Ue&&(je=null);return je}}const Xi=q=>{ne.event=q};ne.idxs=te,ne._lock=!1;let jn=ne.points;jn.show=Dt(jn.show),jn.size=Dt(jn.size),jn.stroke=Dt(jn.stroke),jn.width=Dt(jn.width),jn.fill=Dt(jn.fill);const Mr=r.focus=Gn({},t.focus||{alpha:.3},ne.focus),Qi=Mr.prox>=0,_n=Qi&&jn.one;let Ar=[],fo=[],Zi=[];function Hs(q,X){let ie=jn.show(r,X);if(ie instanceof HTMLElement)return li(ie,q$),li(ie,q.class),lo(ie,-10,-10,vt,qe),o.insertBefore(ie,Ar[X]),ie}function Ea(q,X){if(h==1||X>0){let ie=h==1&&M[q.scale].time,oe=q.value;q.value=ie?Ly(oe)?Yy(D,Gy(oe,z)):oe||Z:oe||oA,q.label=q.label||(ie?QM:XM)}if(_n||X>0){q.width=q.width==null?1:q.width,q.paths=q.paths||wA||cM,q.fillTo=Dt(q.fillTo||uA),q.pxAlign=+Ut(q.pxAlign,l),q.pxRound=pv(q.pxAlign),q.stroke=Dt(q.stroke||null),q.fill=Dt(q.fill||null),q._stroke=q._fill=q._paths=q._focus=null;let ie=sA(Dr(1,q.width),1),oe=q.points=Gn({},{size:ie,width:Dr(1,ie*.2),stroke:q.stroke,space:ie*2,paths:bA,_stroke:null,_fill:null},q.points);oe.show=Dt(oe.show),oe.filter=Dt(oe.filter),oe.fill=Dt(oe.fill),oe.stroke=Dt(oe.stroke),oe.paths=Dt(oe.paths),oe.pxAlign=q.pxAlign}if(le){let ie=Zt(q,X);Re.splice(X,0,ie[0]),Xe.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;_n?X==0&&(ie=Hs(q,X)):X>0&&(ie=Hs(q,X)),Ar.splice(X,0,ie),fo.splice(X,0,0),Zi.splice(X,0,0)}Je("addSeries",X)}function Ll(q,X){X=X??S.length,q=h==1?vd(q,X,nv,cv):vd(q,X,{},lv),S.splice(X,0,q),Ea(S[X],X)}r.addSeries=Ll;function Ol(q){if(S.splice(q,1),le){he.values.splice(q,1),Xe.splice(q,1);let X=Re.splice(q,1)[0];Xn(null,X.firstChild),X.remove()}ue&&(te.splice(q,1),Ar.splice(q,1)[0].remove(),fo.splice(q,1),Zi.splice(q,1)),Je("delSeries",q)}r.delSeries=Ol;const Ji=[!1,!1,!1,!1];function pi(q,X){if(q._show=q.show,q.show){let ie=q.side%2,oe=M[q.scale];oe==null&&(q.scale=ie?S[1].scale:x,oe=M[q.scale]);let fe=oe.time;q.size=Dt(q.size),q.space=Dt(q.space),q.rotate=Dt(q.rotate),Zo(q.incrs)&&q.incrs.forEach(Ee=>{!Qo.has(Ee)&&Qo.set(Ee,Ey(Ee))}),q.incrs=Dt(q.incrs||(oe.distr==2?RM:fe?b==1?OM:DM:Is)),q.splits=Dt(q.splits||(fe&&oe.distr==1?U:oe.distr==3?hd:oe.distr==4?eA:JM)),q.stroke=Dt(q.stroke),q.grid.stroke=Dt(q.grid.stroke),q.ticks.stroke=Dt(q.ticks.stroke),q.border.stroke=Dt(q.border.stroke);let be=q.values;q.values=Zo(be)&&!Zo(be[0])?Dt(be):fe?Zo(be)?Ky(D,Vy(be,z)):Ly(be)?BM(D,be):be||G:be||ZM,q.filter=Dt(q.filter||(oe.distr>=3&&oe.log==10?rA:oe.distr==3&&oe.log==2?iA:$y)),q.font=Av(q.font),q.labelFont=Av(q.labelFont),q._size=q.size(r,null,X,0),q._space=q._rotate=q._incrs=q._found=q._splits=q._values=null,q._size>0&&(Ji[X]=!0,q._el=ki(W$,u))}}function Pt(q,X,ie,oe){let[fe,be,Ee,Fe]=ie,je=X%2,Ue=0;return je==0&&(Fe||be)&&(Ue=X==0&&!fe||X==2&&!Ee?rr(tv.size/3):0),je==1&&(fe||Ee)&&(Ue=X==1&&!be||X==3&&!Fe?rr(ov.size/2):0),Ue}const Ra=r.padding=(t.padding||[Pt,Pt,Pt,Pt]).map(q=>Dt(Ut(q,Pt))),Tr=r._padding=Ra.map((q,X)=>q(r,X,Ji,0));let Wn,hn=null,An=null;const Ci=h==1?S[0].idxs:null;let Er=null,$i=!1;function es(q,X){if(e=q??[],r.data=r._data=e,h==2){Wn=0;for(let ie=1;ie<S.length;ie++)Wn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Er=e[0],Wn=Er.length;let ie=e;if(F==2){ie=e.slice();let oe=ie[0]=Array(Wn);for(let fe=0;fe<Wn;fe++)oe[fe]=fe}r._data=e=ie}if(to(!0),Je("setData"),F==2&&(Gi=!0),X!==!1){let ie=W;ie.auto(r,$i)?Us():Zn(x,ie.min,ie.max),Yi=Yi||ne.left>=0,yr=!0,vo()}}r.setData=es;function Us(){$i=!0;let q,X;h==1&&(Wn>0?(hn=Ci[0]=0,An=Ci[1]=Wn-1,q=e[0][hn],X=e[0][An],F==2?(q=hn,X=An):q==X&&(F==3?[q,X]=Rc(q,q,W.log,!1):F==4?[q,X]=Zh(q,q,W.log,!1):W.time?X=q+rr(86400/b):[q,X]=Lc(q,X,Jh,!0))):(hn=Ci[0]=q=null,An=Ci[1]=X=null)),Zn(x,q,X)}let go,ti,To,ts,ni,ns,qs,Vs,rs,sr;function Ks(q,X,ie,oe,fe,be){q??(q=oy),ie??(ie=rd),oe??(oe="butt"),fe??(fe=oy),be??(be="round"),q!=go&&(a.strokeStyle=go=q),fe!=ti&&(a.fillStyle=ti=fe),X!=To&&(a.lineWidth=To=X),be!=ni&&(a.lineJoin=ni=be),oe!=ns&&(a.lineCap=ns=oe),ie!=ts&&a.setLineDash(ts=ie)}function Eo(q,X,ie,oe){X!=ti&&(a.fillStyle=ti=X),q!=qs&&(a.font=qs=q),ie!=Vs&&(a.textAlign=Vs=ie),oe!=rs&&(a.textBaseline=rs=oe)}function is(q,X,ie,oe,fe=0){if(oe.length>0&&q.auto(r,$i)&&(X==null||X.min==null)){let be=Ut(hn,0),Ee=Ut(An,oe.length-1),Fe=ie.min==null?rM(oe,be,Ee,fe,q.distr==3):[ie.min,ie.max];q.min=Ui(q.min,ie.min=Fe[0]),q.max=Dr(q.max,ie.max=Fe[1])}}const os={min:null,max:null};function mo(){for(let oe in M){let fe=M[oe];_[oe]==null&&(fe.min==null||_[x]!=null&&fe.auto(r,$i))&&(_[oe]=os)}for(let oe in M){let fe=M[oe];_[oe]==null&&fe.from!=null&&_[fe.from]!=null&&(_[oe]=os)}_[x]!=null&&to(!0);let q={};for(let oe in _){let fe=_[oe];if(fe!=null){let be=q[oe]=wa(M[oe],dM);if(fe.min!=null)Gn(be,fe);else if(oe!=x||h==2)if(Wn==0&&be.from==null){let Ee=be.range(r,null,null,oe);be.min=Ee[0],be.max=Ee[1]}else be.min=ln,be.max=-ln}}if(Wn>0){S.forEach((oe,fe)=>{if(h==1){let be=oe.scale,Ee=_[be];if(Ee==null)return;let Fe=q[be];if(fe==0){let je=Fe.range(r,Fe.min,Fe.max,be);Fe.min=je[0],Fe.max=je[1],hn=Hi(Fe.min,e[0]),An=Hi(Fe.max,e[0]),An-hn>1&&(e[0][hn]<Fe.min&&hn++,e[0][An]>Fe.max&&An--),oe.min=Er[hn],oe.max=Er[An]}else oe.show&&oe.auto&&is(Fe,Ee,oe,e[fe],oe.sorted);oe.idxs[0]=hn,oe.idxs[1]=An}else if(fe>0&&oe.show&&oe.auto){let[be,Ee]=oe.facets,Fe=be.scale,je=Ee.scale,[Ue,Ge]=e[fe],Qe=q[Fe],yt=q[je];Qe!=null&&is(Qe,_[Fe],be,Ue,be.sorted),yt!=null&&is(yt,_[je],Ee,Ge,Ee.sorted),oe.min=Ee.min,oe.max=Ee.max}});for(let oe in q){let fe=q[oe],be=_[oe];if(fe.from==null&&(be==null||be.min==null)){let Ee=fe.range(r,fe.min==ln?null:fe.min,fe.max==-ln?null:fe.max,oe);fe.min=Ee[0],fe.max=Ee[1]}}}for(let oe in q){let fe=q[oe];if(fe.from!=null){let be=q[fe.from];if(be.min==null)fe.min=fe.max=null;else{let Ee=fe.range(r,be.min,be.max,oe);fe.min=Ee[0],fe.max=Ee[1]}}}let X={},ie=!1;for(let oe in q){let fe=q[oe],be=M[oe];if(be.min!=fe.min||be.max!=fe.max){be.min=fe.min,be.max=fe.max;let Ee=be.distr;be._min=Ee==3?_o(be.min):Ee==4?td(be.min,be.asinh):Ee==100?be.fwd(be.min):be.min,be._max=Ee==3?_o(be.max):Ee==4?td(be.max,be.asinh):Ee==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){S.forEach((oe,fe)=>{h==2?fe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Gi=!0,Je("setScale",oe);ue&&ne.left>=0&&(Yi=yr=!0)}for(let oe in _)_[oe]=null}function Gs(q){let X=nd(hn-1,0,Wn-1),ie=nd(An+1,0,Wn-1);for(;q[X]==null&&X>0;)X--;for(;q[ie]==null&&ie<Wn-1;)ie++;return[X,ie]}function La(){if(Wn>0){let q=S.some(X=>X._focus)&&sr!=Mr.alpha;q&&(a.globalAlpha=sr=Mr.alpha),S.forEach((X,ie)=>{if(ie>0&&X.show&&(ss(ie,!1),ss(ie,!0),X._paths==null)){let oe=sr;sr!=X.alpha&&(a.globalAlpha=sr=X.alpha);let fe=h==2?[0,e[ie][0].length-1]:Gs(e[ie]);X._paths=X.paths(r,ie,fe[0],fe[1]),sr!=oe&&(a.globalAlpha=sr=oe)}}),S.forEach((X,ie)=>{if(ie>0&&X.show){let oe=sr;sr!=X.alpha&&(a.globalAlpha=sr=X.alpha),X._paths!=null&&as(ie,!1);{let fe=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,hn,An,fe),Ee=X.points.filter(r,ie,be,fe);(be||Ee)&&(X.points._paths=X.points.paths(r,ie,hn,An,Ee),as(ie,!0))}sr!=oe&&(a.globalAlpha=sr=oe),Je("drawSeries",ie)}}),q&&(a.globalAlpha=sr=1)}}function ss(q,X){let ie=X?S[q].points:S[q];ie._stroke=ie.stroke(r,q),ie._fill=ie.fill(r,q)}function as(q,X){let ie=X?S[q].points:S[q],{stroke:oe,fill:fe,clip:be,flags:Ee,_stroke:Fe=ie._stroke,_fill:je=ie._fill,_width:Ue=ie.width}=ie._paths;Ue=cn(Ue*Kt,3);let Ge=null,Qe=Ue%2/2;X&&je==null&&(je=Ue>0?"#fff":Fe);let yt=ie.pxAlign==1&&Qe>0;if(yt&&a.translate(Qe,Qe),!X){let Ot=ir-Ue/2,bt=hr-Ue/2,Rt=nn+Ue,ut=or+Ue;Ge=new Path2D,Ge.rect(Ot,bt,Rt,ut)}X?Ro(Fe,Ue,ie.dash,ie.cap,je,oe,fe,Ee,be):Ys(q,Fe,Ue,ie.dash,ie.cap,je,oe,fe,Ee,Ge,be),yt&&a.translate(-Qe,-Qe)}function Ys(q,X,ie,oe,fe,be,Ee,Fe,je,Ue,Ge){let Qe=!1;je!=0&&k.forEach((yt,Ot)=>{if(yt.series[0]==q){let bt=S[yt.series[1]],Rt=e[yt.series[1]],ut=(bt._paths||fl).band;Zo(ut)&&(ut=yt.dir==1?ut[0]:ut[1]);let it,un=null;bt.show&&ut&&oM(Rt,hn,An)?(un=yt.fill(r,Ot)||be,it=bt._paths.clip):ut=null,Ro(X,ie,oe,fe,un,Ee,Fe,je,Ue,Ge,it,ut),Qe=!0}}),Qe||Ro(X,ie,oe,fe,be,Ee,Fe,je,Ue,Ge)}const ls=xa|pd;function Ro(q,X,ie,oe,fe,be,Ee,Fe,je,Ue,Ge,Qe){Ks(q,X,ie,oe,fe),(je||Ue||Qe)&&(a.save(),je&&a.clip(je),Ue&&a.clip(Ue)),Qe?(Fe&ls)==ls?(a.clip(Qe),Ge&&a.clip(Ge),ar(fe,Ee),Mi(q,be,X)):Fe&pd?(ar(fe,Ee),a.clip(Qe),Mi(q,be,X)):Fe&xa&&(a.save(),a.clip(Qe),Ge&&a.clip(Ge),ar(fe,Ee),a.restore(),Mi(q,be,X)):(ar(fe,Ee),Mi(q,be,X)),(je||Ue||Qe)&&a.restore()}function Mi(q,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,fe)=>{a.strokeStyle=go=fe,a.stroke(oe)}):X!=null&&q&&a.stroke(X))}function ar(q,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=ti=oe,a.fill(ie)}):X!=null&&q&&a.fill(X)}function yo(q,X,ie,oe){let fe=E[q],be;if(oe<=0)be=[0,0];else{let Ee=fe._space=fe.space(r,q,X,ie,oe),Fe=fe._incrs=fe.incrs(r,q,X,ie,oe,Ee);be=$A(X,ie,Fe,oe,Ee)}return fe._found=be}function eo(q,X,ie,oe,fe,be,Ee,Fe,je,Ue){let Ge=Ee%2/2;l==1&&a.translate(Ge,Ge),Ks(Fe,Ee,je,Ue,Fe),a.beginPath();let Qe,yt,Ot,bt,Rt=fe+(oe==0||oe==3?-be:be);ie==0?(yt=fe,bt=Rt):(Qe=fe,Ot=Rt);for(let ut=0;ut<q.length;ut++)X[ut]!=null&&(ie==0?Qe=Ot=q[ut]:yt=bt=q[ut],a.moveTo(Qe,yt),a.lineTo(Ot,bt));a.stroke(),l==1&&a.translate(-Ge,-Ge)}function Oa(q){let X=!0;return E.forEach((ie,oe)=>{if(!ie.show)return;let fe=M[ie.scale];if(fe.min==null){ie._show&&(X=!1,ie._show=!1,to(!1));return}else ie._show||(X=!1,ie._show=!0,to(!1));let be=ie.side,Ee=be%2,{min:Fe,max:je}=fe,[Ue,Ge]=yo(oe,Fe,je,Ee==0?vt:qe);if(Ge==0)return;let Qe=fe.distr==2,yt=ie._splits=ie.splits(r,oe,Fe,je,Ue,Ge,Qe),Ot=fe.distr==2?yt.map(it=>Er[it]):yt,bt=fe.distr==2?Er[yt[1]]-Er[yt[0]]:Ue,Rt=ie._values=ie.values(r,ie.filter(r,Ot,oe,Ge,bt),oe,Ge,bt);ie._rotate=be==2?ie.rotate(r,Rt,oe,Ge):0;let ut=ie._size;ie._size=_i(ie.size(r,Rt,oe,q)),ut!=null&&ie._size!=ut&&(X=!1)}),X}function Il(q){let X=!0;return Ra.forEach((ie,oe)=>{let fe=ie(r,oe,Ji,q);fe!=Tr[oe]&&(X=!1),Tr[oe]=fe}),X}function Lo(){for(let q=0;q<E.length;q++){let X=E[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,fe,be,Ee=X.stroke(r,q),Fe=ie==0||ie==3?-1:1,[je,Ue]=X._found;if(X.label!=null){let sn=X.labelGap*Fe,gr=rr((X._lpos+sn)*Kt);Eo(X.labelFont[0],Ee,"center",ie==2?hl:iy),a.save(),oe==1?(fe=be=0,a.translate(gr,rr(hr+or/2)),a.rotate((ie==3?-Oc:Oc)/2)):(fe=rr(ir+nn/2),be=gr);let Po=_y(X.label)?X.label(r,q,je,Ue):X.label;a.fillText(Po,fe,be),a.restore()}if(Ue==0)continue;let Ge=M[X.scale],Qe=oe==0?nn:or,yt=oe==0?ir:hr,Ot=X._splits,bt=Ge.distr==2?Ot.map(sn=>Er[sn]):Ot,Rt=Ge.distr==2?Er[Ot[1]]-Er[Ot[0]]:je,ut=X.ticks,it=X.border,un=ut.show?ut.size:0,bn=rr(un*Kt),er=rr((X.alignTo==2?X._size-un-X.gap:X.gap)*Kt),jt=X._rotate*-Oc/180,pe=m(X._pos*Kt),Me=(bn+er)*Fe,xe=pe+Me;be=oe==0?xe:0,fe=oe==1?xe:0;let ze=X.font[0],ct=X.align==1?fa:X.align==2?zh:jt>0?fa:jt<0?zh:oe==0?"center":ie==3?zh:fa,Mt=jt||oe==1?"middle":ie==2?hl:iy;Eo(ze,Ee,ct,Mt);let Ht=X.font[1]*X.lineGap,Tt=Ot.map(sn=>m(w(sn,Ge,Qe,yt))),zr=X._values;for(let sn=0;sn<zr.length;sn++){let gr=zr[sn];if(gr!=null){oe==0?fe=Tt[sn]:be=Tt[sn],gr=""+gr;let Po=gr.indexOf(`
|
1496
|
+
`)==-1?[gr]:gr.split(/\n/gm);for(let Ln=0;Ln<Po.length;Ln++){let Qs=Po[Ln];jt?(a.save(),a.translate(fe,be+Ln*Ht),a.rotate(jt),a.fillText(Qs,0,0),a.restore()):a.fillText(Qs,fe,be+Ln*Ht)}}}ut.show&&eo(Tt,ut.filter(r,bt,q,Ue,Rt),oe,ie,pe,bn,cn(ut.width*Kt,3),ut.stroke(r,q),ut.dash,ut.cap);let Li=X.grid;Li.show&&eo(Tt,Li.filter(r,bt,q,Ue,Rt),oe,oe==0?2:1,oe==0?hr:ir,oe==0?or:nn,cn(Li.width*Kt,3),Li.stroke(r,q),Li.dash,Li.cap),it.show&&eo([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?hr:ir,oe==1?or:nn,cn(it.width*Kt,3),it.stroke(r,q),it.dash,it.cap)}Je("drawAxes")}function to(q){S.forEach((X,ie)=>{ie>0&&(X._paths=null,q&&(h==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Oo=!1,cs=!1,Io=[];function Ia(){cs=!1;for(let q=0;q<Io.length;q++)Je(...Io[q]);Io.length=0}function vo(){Oo||(wM(Na),Oo=!0)}function Be(q,X=!1){Oo=!0,cs=X,q(r),Na(),X&&Io.length>0&&queueMicrotask(Ia)}r.batch=Be;function Na(){if($o&&(mo(),$o=!1),Gi&&(di(),Gi=!1),Ki){if(fn(c,fa,qt),fn(c,hl,gn),fn(c,cl,vt),fn(c,ul,qe),fn(o,fa,qt),fn(o,hl,gn),fn(o,cl,vt),fn(o,ul,qe),fn(u,cl,ur),fn(u,ul,Fr),i.width=rr(ur*Kt),i.height=rr(Fr*Kt),E.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:fe})=>{if(q!=null)if(X){let be=fe===3||fe===0?ie:0,Ee=fe%2==1;fn(q,Ee?"left":"top",oe-be),fn(q,Ee?"width":"height",ie),fn(q,Ee?"top":"left",Ee?gn:qt),fn(q,Ee?"height":"width",Ee?qe:vt),Yh(q,Es)}else li(q,Es)}),go=ti=To=ni=ns=qs=Vs=rs=ts=null,sr=1,B(!0),qt!=Qn||gn!=Br||vt!=$r||qe!=kn){to(!1);let q=vt/$r,X=qe/kn;if(ue&&!Yi&&ne.left>=0){ne.left*=q,ne.top*=X,fi&&lo(fi,rr(ne.left),0,vt,qe),zn&&lo(zn,0,rr(ne.top),vt,qe);for(let ie=0;ie<Ar.length;ie++){let oe=Ar[ie];oe!=null&&(fo[ie]*=q,Zi[ie]*=X,lo(oe,_i(fo[ie]),_i(Zi[ie]),vt,qe))}}if(mt.show&&!Mo&&mt.left>=0&&mt.width>0){mt.left*=q,mt.width*=q,mt.top*=X,mt.height*=X;for(let ie in Y)fn(jr,ie,mt[ie])}Qn=qt,Br=gn,$r=vt,kn=qe}Je("setSize"),Ki=!1}ur>0&&Fr>0&&(a.clearRect(0,0,i.width,i.height),Je("drawClear"),I.forEach(q=>q()),Je("draw")),mt.show&&Mo&&(on(mt),Mo=!1),ue&&Yi&&(C(null,!0,!1),Yi=!1),he.show&&he.live&&yr&&(v(),yr=!1),p||(p=!0,r.status=1,Je("ready")),$i=!1,Oo=!1}r.redraw=(q,X)=>{Gi=X||!1,q!==!1?Zn(x,W.min,W.max):vo()};function De(q,X){let ie=M[q];if(ie.from==null){if(Wn==0){let oe=ie.range(r,X.min,X.max,q);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Wn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;q==x&&ie.distr==2&&Wn>0&&(X.min=Hi(X.min,e[0]),X.max=Hi(X.max,e[0]),X.min==X.max&&X.max++),_[q]=X,$o=!0,vo()}}r.setScale=De;let Cn,No,fi,zn,Da,Do,Ai,wo,Yt,Vt,Xt,Ft,Ti=!1;const Tn=ne.drag;let We=Tn.x,dn=Tn.y;ue&&(ne.x&&(Cn=ki(H$,o)),ne.y&&(No=ki(U$,o)),W.ori==0?(fi=Cn,zn=No):(fi=No,zn=Cn),Xt=ne.left,Ft=ne.top);const mt=r.select=Gn({show:!0,over:!0,left:0,width:0,top:0,height:0},t.select),jr=mt.show?ki(z$,mt.over?o:c):null;function on(q,X){if(mt.show){for(let ie in q)mt[ie]=q[ie],ie in Y&&fn(jr,ie,q[ie]);X!==!1&&Je("setSelect")}}r.setSelect=on;function mn(q){if(S[q].show)le&&Yh(Re[q],Es);else if(le&&li(Re[q],Es),ue){let X=_n?Ar[0]:Ar[q];X!=null&&lo(X,-10,-10,vt,qe)}}function Zn(q,X,ie){De(q,{min:X,max:ie})}function Wr(q,X,ie,oe){X.focus!=null&&dr(q),X.show!=null&&S.forEach((fe,be)=>{be>0&&(q==be||q==null)&&(fe.show=X.show,mn(be),h==2?(Zn(fe.facets[0].scale,null,null),Zn(fe.facets[1].scale,null,null)):Zn(fe.scale,null,null),vo())}),ie!==!1&&Je("setSeries",q,X),oe&&$t("setSeries",r,q,X)}r.setSeries=Wr;function Ei(q,X){Gn(k[q],X)}function En(q,X){q.fill=Dt(q.fill||null),q.dir=Ut(q.dir,-1),X=X??k.length,k.splice(X,0,q)}function ri(q){q==null?k.length=0:k.splice(q,1)}r.addBand=En,r.setBand=Ei,r.delBand=ri;function us(q,X){S[q].alpha=X,ue&&Ar[q]!=null&&(Ar[q].style.opacity=X),le&&Re[q]&&(Re[q].style.opacity=X)}let Rn,gi,mi;const Ri={focus:!0};function dr(q){if(q!=mi){let X=q==null,ie=Mr.alpha!=1;S.forEach((oe,fe)=>{if(h==1||fe>0){let be=X||fe==0||fe==q;oe._focus=X?null:be,ie&&us(fe,be?1:Mr.alpha)}}),mi=q,ie&&vo()}}le&&Qi&&Sn(ly,ge,q=>{ne._lock||(Xi(q),mi!=null&&Wr(null,Ri,!0,lt.setSeries))});function pr(q,X,ie){let oe=M[X];ie&&(q=q/Kt-(oe.ori==1?gn:qt));let fe=vt;oe.ori==1&&(fe=qe,q=fe-q),oe.dir==-1&&(q=fe-q);let be=oe._min,Ee=oe._max,Fe=q/fe,je=be+(Ee-be)*Fe,Ue=oe.distr;return Ue==3?ya(10,je):Ue==4?aM(je,oe.asinh):Ue==100?oe.bwd(je):je}function vr(q,X){let ie=pr(q,x,X);return Hi(ie,e[0],hn,An)}r.valToIdx=q=>Hi(q,e[0]),r.posToIdx=vr,r.posToVal=pr,r.valToPos=(q,X,ie)=>M[X].ori==0?d(q,M[X],ie?nn:vt,ie?ir:0):f(q,M[X],ie?or:qe,ie?hr:0),r.setCursor=(q,X,ie)=>{Xt=q.left,Ft=q.top,C(null,X,ie)};function Xs(q,X){fn(jr,fa,mt.left=q),fn(jr,cl,mt.width=X)}function wr(q,X){fn(jr,hl,mt.top=q),fn(jr,ul,mt.height=X)}let Rr=W.ori==0?Xs:wr,yi=W.ori==1?Xs:wr;function vi(){if(le&&he.live)for(let q=h==2?1:0;q<S.length;q++){if(q==0&&dt)continue;let X=he.values[q],ie=0;for(let oe in X)Xe[q][ie++].firstChild.nodeValue=X[oe]}}function v(q,X){if(q!=null&&(q.idxs?q.idxs.forEach((ie,oe)=>{te[oe]=ie}):hM(q.idx)||te.fill(q.idx),he.idx=te[0]),le&&he.live){for(let ie=0;ie<S.length;ie++)(ie>0||h==1&&!dt)&&A(ie,te[ie]);vi()}yr=!1,X!==!1&&Je("setLegend")}r.setLegend=v;function A(q,X){let ie=S[q],oe=q==0&&F==2?Er:e[q],fe;dt?fe=ie.values(r,q,X)??rt:(fe=ie.value(r,X==null?null:oe[X],q,X),fe=fe==null?rt:{_:fe}),he.values[q]=fe}function C(q,X,ie){Yt=Xt,Vt=Ft,[Xt,Ft]=ne.move(r,Xt,Ft),ne.left=Xt,ne.top=Ft,ue&&(fi&&lo(fi,rr(Xt),0,vt,qe),zn&&lo(zn,0,rr(Ft),vt,qe));let oe,fe=hn>An;Rn=ln,gi=null;let be=W.ori==0?vt:qe,Ee=W.ori==1?vt:qe;if(Xt<0||Wn==0||fe){oe=ne.idx=null;for(let Fe=0;Fe<S.length;Fe++){let je=Ar[Fe];je!=null&&lo(je,-10,-10,vt,qe)}Qi&&Wr(null,Ri,!0,q==null&<.setSeries),he.live&&(te.fill(oe),yr=!0)}else{let Fe,je,Ue;h==1&&(Fe=W.ori==0?Xt:Ft,je=pr(Fe,x),oe=ne.idx=Hi(je,e[0],hn,An),Ue=N(e[0][oe],W,be,0));let Ge=-10,Qe=-10,yt=0,Ot=0,bt=!0,Rt="",ut="";for(let it=h==2?1:0;it<S.length;it++){let un=S[it],bn=te[it],er=bn==null?null:h==1?e[it][bn]:e[it][1][bn],jt=ne.dataIdx(r,it,oe,je),pe=jt==null?null:h==1?e[it][jt]:e[it][1][jt];if(yr=yr||pe!=er||jt!=bn,te[it]=jt,it>0&&un.show){let Me=jt==null?-10:jt==oe?Ue:N(h==1?e[0][jt]:e[it][0][jt],W,be,0),xe=pe==null?-10:$(pe,h==1?M[un.scale]:M[un.facets[1].scale],Ee,0);if(Qi&&pe!=null){let ze=W.ori==1?Xt:Ft,ct=nr(Mr.dist(r,it,jt,xe,ze));if(ct<Rn){let Mt=Mr.bias;if(Mt!=0){let Ht=pr(ze,un.scale),Tt=pe>=0?1:-1,zr=Ht>=0?1:-1;zr==Tt&&(zr==1?Mt==1?pe>=Ht:pe<=Ht:Mt==1?pe<=Ht:pe>=Ht)&&(Rn=ct,gi=it)}else Rn=ct,gi=it}}if(yr||_n){let ze,ct;W.ori==0?(ze=Me,ct=xe):(ze=xe,ct=Me);let Mt,Ht,Tt,zr,Li,sn,gr=!0,Po=jn.bbox;if(Po!=null){gr=!1;let Ln=Po(r,it);Tt=Ln.left,zr=Ln.top,Mt=Ln.width,Ht=Ln.height}else Tt=ze,zr=ct,Mt=Ht=jn.size(r,it);if(sn=jn.fill(r,it),Li=jn.stroke(r,it),_n)it==gi&&Rn<=Mr.prox&&(Ge=Tt,Qe=zr,yt=Mt,Ot=Ht,bt=gr,Rt=sn,ut=Li);else{let Ln=Ar[it];Ln!=null&&(fo[it]=Tt,Zi[it]=zr,gy(Ln,Mt,Ht,gr),py(Ln,sn,Li),lo(Ln,_i(Tt),_i(zr),vt,qe))}}}}if(_n){let it=Mr.prox,un=mi==null?Rn<=it:Rn>it||gi!=mi;if(yr||un){let bn=Ar[0];bn!=null&&(fo[0]=Ge,Zi[0]=Qe,gy(bn,yt,Ot,bt),py(bn,Rt,ut),lo(bn,_i(Ge),_i(Qe),vt,qe))}}}if(mt.show&&Ti)if(q!=null){let[Fe,je]=lt.scales,[Ue,Ge]=lt.match,[Qe,yt]=q.cursor.sync.scales,Ot=q.cursor.drag;if(We=Ot._x,dn=Ot._y,We||dn){let{left:bt,top:Rt,width:ut,height:it}=q.select,un=q.scales[Qe].ori,bn=q.posToVal,er,jt,pe,Me,xe,ze=Fe!=null&&Ue(Fe,Qe),ct=je!=null&&Ge(je,yt);ze&&We?(un==0?(er=bt,jt=ut):(er=Rt,jt=it),pe=M[Fe],Me=N(bn(er,Qe),pe,be,0),xe=N(bn(er+jt,Qe),pe,be,0),Rr(Ui(Me,xe),nr(xe-Me))):Rr(0,be),ct&&dn?(un==1?(er=bt,jt=ut):(er=Rt,jt=it),pe=M[je],Me=$(bn(er,yt),pe,Ee,0),xe=$(bn(er+jt,yt),pe,Ee,0),yi(Ui(Me,xe),nr(xe-Me))):yi(0,Ee)}else Q()}else{let Fe=nr(Yt-Da),je=nr(Vt-Do);if(W.ori==1){let yt=Fe;Fe=je,je=yt}We=Tn.x&&Fe>=Tn.dist,dn=Tn.y&&je>=Tn.dist;let Ue=Tn.uni;Ue!=null?We&&dn&&(We=Fe>=Ue,dn=je>=Ue,!We&&!dn&&(je>Fe?dn=!0:We=!0)):Tn.x&&Tn.y&&(We||dn)&&(We=dn=!0);let Ge,Qe;We&&(W.ori==0?(Ge=Ai,Qe=Xt):(Ge=wo,Qe=Ft),Rr(Ui(Ge,Qe),nr(Qe-Ge)),dn||yi(0,Ee)),dn&&(W.ori==1?(Ge=Ai,Qe=Xt):(Ge=wo,Qe=Ft),yi(Ui(Ge,Qe),nr(Qe-Ge)),We||Rr(0,be)),!We&&!dn&&(Rr(0,0),yi(0,0))}if(Tn._x=We,Tn._y=dn,q==null){if(ie){if(vn!=null){let[Fe,je]=lt.scales;lt.values[0]=Fe!=null?pr(W.ori==0?Xt:Ft,Fe):null,lt.values[1]=je!=null?pr(W.ori==1?Xt:Ft,je):null}$t(Uh,r,Xt,Ft,vt,qe,oe)}if(Qi){let Fe=ie&<.setSeries,je=Mr.prox;mi==null?Rn<=je&&Wr(gi,Ri,!0,Fe):Rn>je?Wr(null,Ri,!0,Fe):gi!=mi&&Wr(gi,Ri,!0,Fe)}}yr&&(he.idx=oe,v()),X!==!1&&Je("setCursor")}let P=null;Object.defineProperty(r,"rect",{get(){return P==null&&B(!1),P}});function B(q=!1){q?P=null:(P=o.getBoundingClientRect(),Je("syncRect",P))}function j(q,X,ie,oe,fe,be,Ee){ne._lock||Ti&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,fe,be,Ee,!1,q!=null),q!=null?C(null,!0,!0):C(X,!0,!1))}function V(q,X,ie,oe,fe,be,Ee,Fe,je){if(P==null&&B(!1),Xi(q),q!=null)ie=q.clientX-P.left,oe=q.clientY-P.top;else{if(ie<0||oe<0){Xt=-10,Ft=-10;return}let[Ue,Ge]=lt.scales,Qe=X.cursor.sync,[yt,Ot]=Qe.values,[bt,Rt]=Qe.scales,[ut,it]=lt.match,un=X.axes[0].side%2==1,bn=W.ori==0?vt:qe,er=W.ori==1?vt:qe,jt=un?be:fe,pe=un?fe:be,Me=un?oe:ie,xe=un?ie:oe;if(bt!=null?ie=ut(Ue,bt)?w(yt,M[Ue],bn,0):-10:ie=bn*(Me/jt),Rt!=null?oe=it(Ge,Rt)?w(Ot,M[Ge],er,0):-10:oe=er*(xe/pe),W.ori==1){let ze=ie;ie=oe,oe=ze}}je&&(X==null||X.cursor.event.type==Uh)&&((ie<=1||ie>=vt-1)&&(ie=Os(ie,vt)),(oe<=1||oe>=qe-1)&&(oe=Os(oe,qe))),Fe?(Da=ie,Do=oe,[Ai,wo]=ne.move(r,ie,oe)):(Xt=ie,Ft=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){on(Y,!1)}let re,se,ve,Se;function me(q,X,ie,oe,fe,be,Ee){Ti=!0,We=dn=Tn._x=Tn._y=!1,V(q,X,ie,oe,fe,be,Ee,!0,!1),q!=null&&(Sn(qh,Kh,we,!1),$t(sy,r,Ai,wo,vt,qe,null));let{left:Fe,top:je,width:Ue,height:Ge}=mt;re=Fe,se=je,ve=Ue,Se=Ge}function we(q,X,ie,oe,fe,be,Ee){Ti=Tn._x=Tn._y=!1,V(q,X,ie,oe,fe,be,Ee,!1,!0);let{left:Fe,top:je,width:Ue,height:Ge}=mt,Qe=Ue>0||Ge>0,yt=re!=Fe||se!=je||ve!=Ue||Se!=Ge;if(Qe&&yt&&on(mt),Tn.setScale&&Qe&&yt){let Ot=Fe,bt=Ue,Rt=je,ut=Ge;if(W.ori==1&&(Ot=je,bt=Ge,Rt=Fe,ut=Ue),We&&Zn(x,pr(Ot,x),pr(Ot+bt,x)),dn)for(let it in M){let un=M[it];it!=x&&un.from==null&&un.min!=ln&&Zn(it,pr(Rt+ut,it),pr(Rt,it))}Q()}else ne.lock&&(ne._lock=!ne._lock,C(X,!0,q!=null));q!=null&&(Xn(qh,Kh),$t(qh,r,Xt,Ft,vt,qe,null))}function Ne(q,X,ie,oe,fe,be,Ee){if(ne._lock)return;Xi(q);let Fe=Ti;if(Ti){let je=!0,Ue=!0,Ge=10,Qe,yt;W.ori==0?(Qe=We,yt=dn):(Qe=dn,yt=We),Qe&&yt&&(je=Xt<=Ge||Xt>=vt-Ge,Ue=Ft<=Ge||Ft>=qe-Ge),Qe&&je&&(Xt=Xt<Ai?0:vt),yt&&Ue&&(Ft=Ft<wo?0:qe),C(null,!0,!0),Ti=!1}Xt=-10,Ft=-10,te.fill(null),C(null,!0,!0),Fe&&(Ti=Fe)}function Ie(q,X,ie,oe,fe,be,Ee){ne._lock||(Xi(q),Us(),Q(),q!=null&&$t(cy,r,Xt,Ft,vt,qe,null))}function He(){E.forEach(MA),Ao(r.width,r.height,!0)}Rs(Ac,ma,He);const st={};st.mousedown=me,st.mousemove=j,st.mouseup=we,st.dblclick=Ie,st.setSeries=(q,X,ie,oe)=>{let fe=lt.match[2];ie=fe(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ue&&(Sn(sy,o,me),Sn(Uh,o,j),Sn(ay,o,q=>{Xi(q),B(!1)}),Sn(ly,o,Ne),Sn(cy,o,Ie),yd.add(r),r.syncRect=B);const Ye=r.hooks=t.hooks||{};function Je(q,X,ie){cs?Io.push([q,X,ie]):q in Ye&&Ye[q].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(q=>{for(let X in q.hooks)Ye[X]=(Ye[X]||[]).concat(q.hooks[X])});const pn=(q,X,ie)=>ie,lt=Gn({key:null,setSeries:!1,filters:{pub:My,sub:My},scales:[x,S[1]?S[1].scale:null],match:[Ay,Ay,pn],values:[null,null]},ne.sync);lt.match.length==2&<.match.push(pn),ne.sync=lt;const vn=lt.key,wt=dv(vn);function $t(q,X,ie,oe,fe,be,Ee){lt.filters.pub(q,X,ie,oe,fe,be,Ee)&&wt.pub(q,X,ie,oe,fe,be,Ee)}wt.sub(r);function Jn(q,X,ie,oe,fe,be,Ee){lt.filters.sub(q,X,ie,oe,fe,be,Ee)&&st[q](null,X,ie,oe,fe,be,Ee)}r.pub=Jn;function fr(){wt.unsub(r),yd.delete(r),hi.clear(),Qh(Ac,ma,He),g.remove(),ge==null||ge.remove(),Je("destroy")}r.destroy=fr;function wn(){Je("init",t,e),es(e||t.data,!1),_[x]?De(x,_[x]):Us(),Mo=mt.show&&(mt.width>0||mt.height>0),Yi=yr=!0,Ao(t.width,t.height)}return S.forEach(Ea),E.forEach(pi),n?n instanceof HTMLElement?(n.appendChild(g),wn()):n(r,wn):wn(),r}kr.assign=Gn,kr.fmtNum=ed,kr.rangeNum=Lc,kr.rangeLog=Rc,kr.rangeAsinh=Zh,kr.orient=Ns,kr.pxRatio=Kt,kr.join=vM,kr.fmtDate=id,kr.tzDate=TM,kr.sync=dv;{kr.addGap=hA,kr.clipGaps=Bc;let t=kr.paths={points:wv};t.linear=xv,t.stepped=fA,t.bars=gA,t.spline=yA}var Tv,Ev;function AA(){return Ev||(Ev=1,Tv=function(t,e,n,r,h){var d,f;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(h===void 0)h=t.length-1;else if(h=h|0,h<r||h>=t.length)throw new RangeError("invalid upper bound");for(;r<=h;)if(d=r+(h-r>>>1),f=+n(t[d],e,d,t),f<0)r=d+1;else if(f>0)h=d-1;else return d;return~r}),Tv}var TA=AA();const lj=Fi("U",cc(TA));var wd,Rv;function EA(){if(Rv)return wd;Rv=1;function t(e,n,r){var h=-1,d=e.length;n<0&&(n=-n>d?0:d+n),r=r>d?d:r,r<0&&(r+=d),d=n>r?0:r-n>>>0,n>>>=0;for(var f=Array(d);++h<d;)f[h]=e[h+n];return f}return wd=t,wd}var bd,Lv;function RA(){if(Lv)return bd;Lv=1;var t=EA();function e(n,r,h){var d=n.length;return h=h===void 0?d:h,!r&&h>=d?n:t(n,r,h)}return bd=e,bd}var xd,Ov;function Iv(){if(Ov)return xd;Ov=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=e+n+r,d="\\ufe0e\\ufe0f",f="\\u200d",w=RegExp("["+f+t+h+d+"]");function p(g){return w.test(g)}return xd=p,xd}var Sd,Nv;function LA(){if(Nv)return Sd;Nv=1;function t(e){return e.split("")}return Sd=t,Sd}var kd,Dv;function OA(){if(Dv)return kd;Dv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=e+n+r,d="\\ufe0e\\ufe0f",f="["+t+"]",w="["+h+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+w+"|"+p+")",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",o=g+"?",l="["+d+"]?",m="(?:"+c+"(?:"+[i,a,u].join("|")+")"+l+o+")*",b=l+o+m,S="(?:"+[i+w+"?",w,a,u,f].join("|")+")",E=RegExp(p+"(?="+p+")|"+S+b,"g");function M(k){return k.match(E)||[]}return kd=M,kd}var _d,Pv;function IA(){if(Pv)return _d;Pv=1;var t=LA(),e=Iv(),n=OA();function r(h){return e(h)?n(h):t(h)}return _d=r,_d}var Cd,Fv;function NA(){if(Fv)return Cd;Fv=1;var t=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo;return Cd=t,Cd}var $d,Bv;function DA(){if(Bv)return $d;Bv=1;var t=NA(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return $d=n,$d}var Md,jv;function Ad(){if(jv)return Md;jv=1;var t=DA(),e=t.Symbol;return Md=e,Md}var Td,Wv;function PA(){if(Wv)return Td;Wv=1;function t(e,n){for(var r=-1,h=e==null?0:e.length,d=Array(h);++r<h;)d[r]=n(e[r],r,e);return d}return Td=t,Td}var Ed,zv;function FA(){if(zv)return Ed;zv=1;var t=Array.isArray;return Ed=t,Ed}var Rd,Hv;function BA(){if(Hv)return Rd;Hv=1;var t=Ad(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,h=t?t.toStringTag:void 0;function d(f){var w=n.call(f,h),p=f[h];try{f[h]=void 0;var g=!0}catch{}var i=r.call(f);return g&&(w?f[h]=p:delete f[h]),i}return Rd=d,Rd}var Ld,Uv;function jA(){if(Uv)return Ld;Uv=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Ld=n,Ld}var Od,qv;function WA(){if(qv)return Od;qv=1;var t=Ad(),e=BA(),n=jA(),r="[object Null]",h="[object Undefined]",d=t?t.toStringTag:void 0;function f(w){return w==null?w===void 0?h:r:d&&d in Object(w)?e(w):n(w)}return Od=f,Od}var Id,Vv;function zA(){if(Vv)return Id;Vv=1;function t(e){return e!=null&&typeof e=="object"}return Id=t,Id}var Nd,Kv;function HA(){if(Kv)return Nd;Kv=1;var t=WA(),e=zA(),n="[object Symbol]";function r(h){return typeof h=="symbol"||e(h)&&t(h)==n}return Nd=r,Nd}var Dd,Gv;function UA(){if(Gv)return Dd;Gv=1;var t=Ad(),e=PA(),n=FA(),r=HA(),h=t?t.prototype:void 0,d=h?h.toString:void 0;function f(w){if(typeof w=="string")return w;if(n(w))return e(w,f)+"";if(r(w))return d?d.call(w):"";var p=w+"";return p=="0"&&1/w==-1/0?"-0":p}return Dd=f,Dd}var Pd,Yv;function Hc(){if(Yv)return Pd;Yv=1;var t=UA();function e(n){return n==null?"":t(n)}return Pd=e,Pd}var Fd,Xv;function qA(){if(Xv)return Fd;Xv=1;var t=RA(),e=Iv(),n=IA(),r=Hc();function h(d){return function(f){f=r(f);var w=e(f)?n(f):void 0,p=w?w[0]:f.charAt(0),g=w?t(w,1).join(""):f.slice(1);return p[d]()+g}}return Fd=h,Fd}var Bd,Qv;function Zv(){if(Qv)return Bd;Qv=1;var t=qA(),e=t("toUpperCase");return Bd=e,Bd}var VA=Zv();const KA=cc(VA);var jd,Jv;function GA(){if(Jv)return jd;Jv=1;var t=Hc(),e=Zv();function n(r){return e(t(r).toLowerCase())}return jd=n,jd}var Wd,ew;function YA(){if(ew)return Wd;ew=1;function t(e,n,r,h){var d=-1,f=e==null?0:e.length;for(h&&f&&(r=e[++d]);++d<f;)r=n(r,e[d],d,e);return r}return Wd=t,Wd}var zd,tw;function XA(){if(tw)return zd;tw=1;function t(e){return function(n){return e==null?void 0:e[n]}}return zd=t,zd}var Hd,nw;function QA(){if(nw)return Hd;nw=1;var t=XA(),e={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=t(e);return Hd=n,Hd}var Ud,rw;function ZA(){if(rw)return Ud;rw=1;var t=QA(),e=Hc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",h="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",f=r+h+d,w="["+f+"]",p=RegExp(w,"g");function g(i){return i=e(i),i&&i.replace(n,t).replace(p,"")}return Ud=g,Ud}var qd,iw;function JA(){if(iw)return qd;iw=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return qd=e,qd}var Vd,ow;function eT(){if(ow)return Vd;ow=1;var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(n){return t.test(n)}return Vd=e,Vd}var Kd,sw;function tT(){if(sw)return Kd;sw=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",h=e+n+r,d="\\u2700-\\u27bf",f="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",i=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",c=w+p+g+i,o="['’]",l="["+c+"]",m="["+h+"]",b="\\d+",S="["+d+"]",E="["+f+"]",M="[^"+t+c+b+d+f+a+"]",k="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+k+")",R="[^"+t+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",O="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",W="\\u200d",F="(?:"+E+"|"+M+")",N="(?:"+L+"|"+M+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=x+"?",z="["+u+"]?",U="(?:"+W+"(?:"+[R,I,O].join("|")+")"+z+D+")*",G="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=z+D+U,he="(?:"+[S,I,O].join("|")+")"+te,ne=RegExp([L+"?"+E+"+"+$+"(?="+[l,L,"$"].join("|")+")",N+"+"+_+"(?="+[l,L+F,"$"].join("|")+")",L+"?"+F+"+"+$,L+"+"+_,Z,G,b,he].join("|"),"g");function le(ue){return ue.match(ne)||[]}return Kd=le,Kd}var Gd,aw;function nT(){if(aw)return Gd;aw=1;var t=JA(),e=eT(),n=Hc(),r=tT();function h(d,f,w){return d=n(d),f=w?void 0:f,f===void 0?e(d)?r(d):t(d):d.match(f)||[]}return Gd=h,Gd}var Yd,lw;function rT(){if(lw)return Yd;lw=1;var t=YA(),e=ZA(),n=nT(),r="['’]",h=RegExp(r,"g");function d(f){return function(w){return t(n(e(w).replace(h,"")),f,"")}}return Yd=d,Yd}var Xd,cw;function iT(){if(cw)return Xd;cw=1;var t=GA(),e=rT(),n=e(function(r,h,d){return h=h.toLowerCase(),r+(d?t(h):h)});return Xd=n,Xd}var oT=iT();const sT=cc(oT),aT=Object.assign({"./ArrayWidget.vue":()=>ot(()=>at.import("./ArrayWidget-j3ncPuPx-da5985883a34c0d972ea.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>at.import("./ArrayplotWidget-DuLaiGa9-9281e1674fb8412b20fd.js"),void 0),"./BlockWidget.vue":()=>ot(()=>at.import("./BlockWidget-Bf5Dd6Cr-6a43592f7c4d34c82922.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>at.import("./ButtonWidget-bl_mGFYh-b9e2750374f4cdc1cab9.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>at.import("./CanvasWidget-boDemgx1-23367a9d812da4de1cc5.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>at.import("./CanvasdotWidget-BZBbJcER-dc74284ce2d69b9330a7.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>at.import("./CanvasimageWidget-6ywvT5jd-91d72e97c7e1c8b70c03.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>at.import("./CanvasimagevalueWidget-DjWrA3gX-e117912ff1f7cbb72c36.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>at.import("./CanvaslabelWidget-Bq4V2BQh-73922eea6e87d17b4530.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>at.import("./CanvaslabelvalueWidget-C8oNcFLi-e15a34adfbae05efaf7f.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>at.import("./CanvaslineWidget-nvbL2GoL-3b11e59f1652c97ce7e8.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>at.import("./CanvaslinevalueWidget-ZACQedKx-6c04ae957afa8e40f07a.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>at.import("./CheckbuttonWidget-B82UE8AB-bb172fab2561aa844e4b.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>at.import("./ComboboxWidget-4OFiSkI6-fdb8a17551208781b92e.js"),void 0),"./DateWidget.vue":()=>ot(()=>at.import("./DateWidget-BmwtdirF-d9f441f3a9601081d425.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>at.import("./DynamicWidget-CfMtj7H8-61c87513a545424da716.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>at.import("./FormatvalueWidget-C8exC3bj-ff440d82b88447956f5e.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>at.import("./HorizontalWidget-Ck151zVw-8945a581dbb8ab20a795.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>at.import("./HorizontalboxWidget-D3P-cl9V-bfd3b0f3794fd3f5872b.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>at.import("./HorizontallineWidget-BE1TjPU8-55eec81e6defca3792ed.js"),void 0),"./IframeWidget.vue":()=>ot(()=>at.import("./IframeWidget-BgJCgues-44e46793e1766771bec5.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>at.import("./ImageviewerWidget-BlhFZD2f-f7f0f36dd3eaf495d1f4.js"),void 0),"./LabelWidget.vue":()=>ot(()=>at.import("./LabelWidget-Cwosk4x2-701fa0e87df7d5027069.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>at.import("./LabelledWidget-Dl6rAFTQ-66132cb2f81c6abfc282.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>at.import("./LabelprogressbarWidget-MuAKesOz-b6da3062cb38dead58b5.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>at.import("./LabelsparklineWidget-6LA6Ox3d-5b060ec1b0d7d91b6fe3.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>at.import("./LabelvalueWidget-BxAXx-Tf-96bf8575052dd81cb32d.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>at.import("./LabelvaluedescWidget-Dwwlnd1g-251d34b241e8c9bdf629.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitsbarWidget-Dv8Qk8kK-6996b80d8ad2cd915574.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitscolumnWidget-D-_gl6fq-213fb47dc57155d4d97f.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>at.import("./LabelvaluerangebarWidget-B3MKT-3Y-3bda2f57a1634da36add.js"),void 0),"./LedWidget.vue":()=>ot(()=>at.import("./LedWidget-DOuDD8LI-fb5000760a2482bca972.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>at.import("./LimitsbarWidget-D1U6SvVL-50bdb2765fd146a1f145.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>at.import("./LimitscolorWidget-iSMGusqt-3d744d496f962997f15f.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>at.import("./LimitscolumnWidget-DjxZTt_r-4df27ed5fd612ba6e8ca.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>at.import("./LinegraphWidget-BHKU6zlT-30dab2b7f4512e017bc5.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>at.import("./MatrixbycolumnsWidget-BKO-A2QD-751a7cf61b7bfbd80f04.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>at.import("./ProgressbarWidget-fbr2qu_N-2ba2e3df5600064627f3.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>at.import("./RadiobuttonWidget-DL08zcQT-dcb10451dfd8b33afca1.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>at.import("./RadiogroupWidget-DW9Xpj3c-ff779f948f547f5121b5.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>at.import("./RangebarWidget-o9q55kjc-f31bf18c07714e4de09f.js"),void 0),"./RollupWidget.vue":()=>ot(()=>at.import("./RollupWidget-BHnjj-DF-361afcfe8999a46671c5.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>at.import("./ScrollwindowWidget-D-QVwztC-b548230e817571eeda23.js"),void 0),"./SignalWidget.vue":()=>ot(()=>at.import("./SignalWidget-CsWuufdx-7e3e4d2ef801a375e33d.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>at.import("./SpacerWidget-Di9-qunj-7af4824b3f2581f3ec50.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>at.import("./SparklineWidget-B6-zhdPW-4574b3edc9c842cacc67.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>at.import("./TabbookWidget-B1E1_mzA-4432d3a1c56f1fb31f14.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>at.import("./TextboxWidget-CBVEXPw_-eafdeaac29bac9de454e.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>at.import("./TextfieldWidget-DZMHrtQa-34afc66f6de03da98660.js"),void 0),"./TimeWidget.vue":()=>ot(()=>at.import("./TimeWidget-K4MNmJ7J-e5d126c2dfc721447a5f.js"),void 0),"./TitleWidget.vue":()=>ot(()=>at.import("./TitleWidget-8IcwweFE-917a3736a4cb7bcb0da6.js"),void 0),"./ValueWidget.vue":()=>ot(()=>at.import("./ValueWidget-BvT1ASar-6e16aaa5c695b3c2c654.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>at.import("./ValuelimitsbarWidget-C5lBnUmB-7d4e5dc70d58bccbba82.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>at.import("./ValuelimitscolumnWidget-DHYI0WBL-b0323ba6b831e9fa59c2.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>at.import("./ValuerangebarWidget-BSszZhlE-b47792ca68105d09e2a1.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>at.import("./VerticalWidget-1GhgYrC3-371ad0e2e9ad43b19d10.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>at.import("./VerticalboxWidget-DYHJqEzd-e43509011849bcf5a06c.js"),void 0)}),lT=Object.entries(aT).reduce((t,[e,n])=>{e=e.split("/").pop();const r=KA(sT(e.replace(/\.\w+$/,"")));return{...t,[r]:Mf(n)}},{}),cj=Fi("j",{components:lT}),cT={methods:{buildLanguageMode(t,e){let n=Nr.require("ace/lib/oop"),r=Object.getOwnPropertyNames(Ym.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),h=new RegExp(`(\\b${r.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:h,token:"support.function"})};n.inherits(d,t);let f=Nr.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,w=Nr.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[n,function(){this.HighlightRules=d,this.$outdent=new f,this.$behaviour=new w,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[t,e]=this.buildLanguageMode(Nr.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let n=Nr.require("ace/mode/ruby").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[t,e]=this.buildLanguageMode(Nr.require("ace/mode/python_highlight_rules").PythonHighlightRules,Nr.require("ace/mode/folding/pythonic").FoldMode);let n=Nr.require("ace/mode/python").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[t,e]=this.buildLanguageMode(Nr.require("ace/mode/json_highlight_rules").JsonHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let n=Nr.require("ace/mode/json").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[t,e]=this.buildLanguageMode(Nr.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,Nr.require("ace/mode/folding/markdown").FoldMode);let n=Nr.require("ace/mode/markdown").Mode;return t.inherits(e,n),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},uT={mixins:[cT],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let t=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();t=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const n=this.buildPythonMode();t=new n;break;case"md":const r=this.buildMarkdownMode();t=new r;break;default:const h=this.buildRubyMode();t=new h;break}this.editor.session.setMode(t),this.editor.session.setUseWrapMode(!0),this.editor.$blockScrolling=1/0,this.editor.setHighlightActiveLine(!1),this.editor.setValue(this.content),this.editor.clearSelection(),this.editor.focus(),this.editor.setReadOnly(!0)},beforeUnmount(){this.editor&&this.editor.destroy()},methods:{close:function(){this.show=!this.show},download:function(){const t=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const n=document.createElement("a");n.href=URL.createObjectURL(t),n.setAttribute("download",e),n.click()}}},hT=["textContent"],dT={class:"mx-2"},pT={ref:"editor",class:"editor"};function fT(t,e,n,r,h,d){const f=It("v-spacer"),w=It("v-btn"),p=It("v-toolbar"),g=It("v-card-text"),i=It("v-card-actions"),a=It("v-card"),u=It("v-dialog");return zt(),qn(u,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=c=>d.show=c),width:"85vw"},{default:et(()=>[tt(a,null,{default:et(()=>[tt(p,{height:"24"},{default:et(()=>[tt(f),cr("span",{textContent:Ir(d.title)},null,8,hT),tt(f),cr("div",dT,[tt(w,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:d.download},null,8,["onClick"])])]),_:1}),tt(g,null,{default:et(()=>[cr("pre",pT,null,512)]),_:1}),tt(i,{class:"pr-6 pb-4 pt-0"},{default:et(()=>[tt(f),tt(w,{variant:"flat",onClick:e[0]||(e[0]=c=>d.show=!d.show)},{default:et(()=>[...e[2]||(e[2]=[Vn(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const gT=Qu(uT,[["render",fT],["__scopeId","data-v-69e71dd8"]]),mT={props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},methods:{formatDT:function(t){return t.replaceAll(" ","-").toLowerCase()},subMenuClick(t){t.command(t),this.$refs.topmenu[0].isActive=!1}},mounted(){document.title=this.title}},yT={class:"app-title mr-2"};function vT(t,e,n,r,h,d){const f=It("v-col"),w=It("v-row"),p=It("v-icon"),g=It("v-btn"),i=It("v-divider"),a=It("v-list-item-title"),u=It("v-list-item"),c=It("v-list"),o=It("v-menu"),l=It("v-radio"),m=It("v-list-item-action"),b=It("v-radio-group"),S=It("v-checkbox");return zt(),qn(Af,{to:"#openc3-menu"},[tt(w,{"no-gutters":""},{default:et(()=>[tt(f,{"align-self":"end"},{default:et(()=>[cr("span",yT,Ir(n.title),1)]),_:1})]),_:1}),tt(w,{dense:"",class:"flex-nowrap"},{default:et(()=>[(zt(!0),Vr(ko,null,Ko(n.menus,(E,M)=>(zt(),qn(o,{ref_for:!0,ref:"topmenu",key:M},{activator:et(({props:k})=>[tt(g,Ju({ref_for:!0},k,{variant:"outlined",class:"mx-1 menu-button",text:E.label,"data-test":d.formatDT(`${n.title} ${E.label}`)}),{append:et(()=>[tt(p,{class:"menu-button-icon"},{default:et(()=>[...e[0]||(e[0]=[Vn(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:et(()=>[tt(c,null,{default:et(()=>[(zt(!0),Vr(ko,null,Ko(E.items,(k,x)=>(zt(),Vr(ko,null,[k.divider?(zt(),qn(i,{key:x+"-divider"})):k.subMenu&&k.subMenu.length>0?(zt(),Vr("div",{key:x+"-submenu"},[(zt(),qn(o,{"open-on-hover":"",location:"right",key:x},{activator:et(({props:R})=>[(zt(),qn(u,Ju({ref_for:!0},R,{disabled:k.disabled,key:x}),eh({append:et(()=>[tt(p,null,{default:et(()=>[...e[1]||(e[1]=[Vn(" mdi-chevron-right ",-1)])]),_:1})]),default:et(()=>[!k.radio&&!k.checkbox?(zt(),qn(a,{key:0,style:th("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:et(()=>[Vn(Ir(k.label),1)]),_:2},1032,["style"])):oo("",!0)]),_:2},[k.icon?{name:"prepend",fn:et(()=>[tt(p,{disabled:k.disabled},{default:et(()=>[Vn(Ir(k.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:et(()=>[tt(c,null,{default:et(()=>[(zt(!0),Vr(ko,null,Ko(k.subMenu,(R,I)=>(zt(),qn(u,{key:I,"prepend-icon":R.icon,onClick:O=>d.subMenuClick(R)},{default:et(()=>[tt(a,null,{default:et(()=>[Vn(Ir(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):k.radioGroup?(zt(),qn(b,{"model-value":k.value,"onUpdate:modelValue":k.command,key:x+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:et(()=>[(zt(!0),Vr(ko,null,Ko(k.choices,(R,I)=>(zt(),qn(u,{key:I+"-choice"},{default:et(()=>[tt(m,{class:"list-action"},{default:et(()=>[tt(l,{color:"secondary",label:R.label,value:R.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(zt(),qn(u,{onClick:R=>k.command(k),disabled:k.disabled,"data-test":d.formatDT(`${n.title} ${E.label} ${k.label}`),key:x+"-list"},eh({default:et(()=>[k.checkbox?(zt(),qn(m,{key:0,class:"list-action"},{default:et(()=>[tt(S,{modelValue:k.checked,"onUpdate:modelValue":R=>k.checked=R,label:k.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):oo("",!0),!k.radio&&!k.checkbox?(zt(),qn(a,{key:1,style:th("cursor: pointer;"+(k.disabled?"opacity: 0.2":""))},{default:et(()=>[Vn(Ir(k.label),1)]),_:2},1032,["style"])):oo("",!0)]),_:2},[k.icon?{name:"prepend",fn:et(()=>[tt(p,{icon:k.icon,disabled:k.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const wT=Qu(mT,[["render",vT],["__scopeId","data-v-4d454b93"]]);function uw(){return Object.assign({},la())}function bT(t,e,n){const r=yn(t,void 0);return r.setTime(r.getTime()+e*ac),r}function xT(t,e){const n=()=>Kn(void 0,NaN),r=CT(t);let h;if(r.date){const p=$T(r.date,2);h=MT(p.restDateString,p.year)}if(!h||isNaN(+h))return n();const d=+h;let f=0,w;if(r.time&&(f=AT(r.time),isNaN(f)))return n();if(r.timezone){if(w=TT(r.timezone),isNaN(w))return n()}else{const p=new Date(d+f),g=yn(0,void 0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}return yn(d+f+w,void 0)}const Uc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ST=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,kT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,_T=/^([+-])(\d{2})(?::?(\d{2}))?$/;function CT(t){const e={},n=t.split(Uc.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Uc.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Uc.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const h=Uc.timezone.exec(r);h?(e.time=r.replace(h[1],""),e.timezone=h[1]):e.time=r}return e}function $T(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const h=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?h:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function MT(t,e){if(e===null)return new Date(NaN);const n=t.match(ST);if(!n)return new Date(NaN);const r=!!n[4],h=yl(n[1]),d=yl(n[2])-1,f=yl(n[3]),w=yl(n[4]),p=yl(n[5])-1;if(r)return IT(e,w,p)?ET(e,w,p):new Date(NaN);{const g=new Date(0);return!LT(e,d,f)||!OT(e,h)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(h,f)),g)}}function yl(t){return t?parseInt(t):1}function AT(t){const e=t.match(kT);if(!e)return NaN;const n=Qd(e[1]),r=Qd(e[2]),h=Qd(e[3]);return NT(n,r,h)?n*gh+r*ac+h*1e3:NaN}function Qd(t){return t&&parseFloat(t.replace(",","."))||0}function TT(t){if(t==="Z")return 0;const e=t.match(_T);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),h=e[3]&&parseInt(e[3])||0;return DT(r,h)?n*(r*gh+h*ac):NaN}function ET(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const h=r.getUTCDay()||7,d=(e-1)*7+n+1-h;return r.setUTCDate(r.getUTCDate()+d),r}const RT=[31,null,31,30,31,30,31,31,30,31,30,31];function hw(t){return t%400===0||t%4===0&&t%100!==0}function LT(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(RT[e]||(hw(t)?29:28))}function OT(t,e){return e>=1&&e<=(hw(t)?366:365)}function IT(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function NT(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function DT(t,e){return e>=0&&e<=59}function PT(t,e,n){return bT(t,-e)}function dw(t,e,n){const r=uw(),h=jT(t,n.timeZone,n.locale??r.locale);return"formatToParts"in h?FT(h,e):BT(h,e)}function FT(t,e){const n=t.formatToParts(e);for(let r=n.length-1;r>=0;--r)if(n[r].type==="timeZoneName")return n[r].value}function BT(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function jT(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function WT(t,e){const n=VT(e);return"formatToParts"in n?HT(n,t):UT(n,t)}const zT={year:0,month:1,day:2,hour:3,minute:4,second:5};function HT(t,e){try{const n=t.formatToParts(e),r=[];for(let h=0;h<n.length;h++){const d=zT[n[h].type];d!==void 0&&(r[d]=parseInt(n[h].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function UT(t,e){const n=t.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Zd={},pw=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),qT=pw==="06/25/2014, 00:00:00"||pw==="06/25/2014 00:00:00";function VT(t){return Zd[t]||(Zd[t]=qT?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Zd[t]}function fw(t,e,n,r,h,d,f){const w=new Date(0);return w.setUTCFullYear(t,e,n),w.setUTCHours(r,h,d,f),w}const gw=36e5,KT=6e4,Jd={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function ep(t,e,n){if(!t)return 0;let r=Jd.timezoneZ.exec(t);if(r)return 0;let h,d;if(r=Jd.timezoneHH.exec(t),r)return h=parseInt(r[1],10),mw(h)?-(h*gw):NaN;if(r=Jd.timezoneHHMM.exec(t),r){h=parseInt(r[2],10);const f=parseInt(r[3],10);return mw(h,f)?(d=Math.abs(h)*gw+f*KT,r[1]==="+"?-d:d):NaN}if(XT(t)){e=new Date(e||Date.now());const f=n?e:GT(e),w=tp(f,t);return-(n?w:YT(e,w,t))}return NaN}function GT(t){return fw(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function tp(t,e){const n=WT(t,e),r=fw(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let h=t.getTime();const d=h%1e3;return h-=d>=0?d:1e3+d,r-h}function YT(t,e,n){let r=t.getTime()-e;const h=tp(new Date(r),n);if(e===h)return e;r-=h-e;const d=tp(new Date(r),n);return h===d?h:Math.max(h,d)}function mw(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const yw={};function XT(t){if(yw[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),yw[t]=!0,!0}catch{return!1}}const QT=60*1e3,ZT={X:function(t,e,n){const r=np(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return vw(r);case"XXXX":case"XX":return _a(r);case"XXXXX":case"XXX":default:return _a(r,":")}},x:function(t,e,n){const r=np(n.timeZone,t);switch(e){case"x":return vw(r);case"xxxx":case"xx":return _a(r);case"xxxxx":case"xxx":default:return _a(r,":")}},O:function(t,e,n){const r=np(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+JT(r,":");case"OOOO":default:return"GMT"+_a(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return dw("short",t,n);case"zzzz":default:return dw("long",t,n)}}};function np(t,e){const n=t?ep(t,e,!0)/QT:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function qc(t,e){const n=t<0?"-":"";let r=Math.abs(t).toString();for(;r.length<e;)r="0"+r;return n+r}function _a(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),h=qc(Math.floor(r/60),2),d=qc(Math.floor(r%60),2);return n+h+e+d}function vw(t,e){return t%60===0?(t>0?"-":"+")+qc(Math.abs(t)/60,2):_a(t,e)}function JT(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),h=Math.floor(r/60),d=r%60;return d===0?n+String(h):n+String(h)+e+qc(d,2)}function ww(t){const e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+t-+e}const eE=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,rp=36e5,bw=6e4,tE=2,Pr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:eE};function xw(t,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(t===null)return new Date(NaN);const n=e.additionalDigits==null?tE:Number(e.additionalDigits);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]")return new Date(t.getTime());if(typeof t=="number"||Object.prototype.toString.call(t)==="[object Number]")return new Date(t);if(Object.prototype.toString.call(t)!=="[object String]")return new Date(NaN);const r=nE(t),{year:h,restDateString:d}=rE(r.date,n),f=iE(d,h);if(f===null||isNaN(f.getTime()))return new Date(NaN);if(f){const w=f.getTime();let p=0,g;if(r.time&&(p=oE(r.time),p===null||isNaN(p)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=ep(r.timeZone||e.timeZone,new Date(w+p)),isNaN(g))return new Date(NaN)}else g=ww(new Date(w+p)),g=ww(new Date(w+p+g));return new Date(w+p+g)}else return new Date(NaN)}function nE(t){const e={};let n=Pr.dateTimePattern.exec(t),r;if(n?(e.date=n[1],r=n[3]):(n=Pr.datePattern.exec(t),n?(e.date=n[1],r=n[2]):(e.date=null,r=t)),r){const h=Pr.timeZone.exec(r);h?(e.time=r.replace(h[1],""),e.timeZone=h[1].trim()):e.time=r}return e}function rE(t,e){if(t){const n=Pr.YYY[e],r=Pr.YYYYY[e];let h=Pr.YYYY.exec(t)||r.exec(t);if(h){const d=h[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(h=Pr.YY.exec(t)||n.exec(t),h){const d=h[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function iE(t,e){if(e===null)return null;let n,r,h;if(!t||!t.length)return n=new Date(0),n.setUTCFullYear(e),n;let d=Pr.MM.exec(t);if(d)return n=new Date(0),r=parseInt(d[1],10)-1,_w(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=Pr.DDD.exec(t),d){n=new Date(0);const f=parseInt(d[1],10);return lE(e,f)?(n.setUTCFullYear(e,0,f),n):new Date(NaN)}if(d=Pr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const f=parseInt(d[2],10);return _w(e,r,f)?(n.setUTCFullYear(e,r,f),n):new Date(NaN)}if(d=Pr.Www.exec(t),d)return h=parseInt(d[1],10)-1,Cw(h)?Sw(e,h):new Date(NaN);if(d=Pr.WwwD.exec(t),d){h=parseInt(d[1],10)-1;const f=parseInt(d[2],10)-1;return Cw(h,f)?Sw(e,h,f):new Date(NaN)}return null}function oE(t){let e,n,r=Pr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),ip(e)?e%24*rp:NaN;if(r=Pr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),ip(e,n)?e%24*rp+n*bw:NaN;if(r=Pr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const h=parseFloat(r[3].replace(",","."));return ip(e,n,h)?e%24*rp+n*bw+h*1e3:NaN}return null}function Sw(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const h=r.getUTCDay()||7,d=e*7+n+1-h;return r.setUTCDate(r.getUTCDate()+d),r}const sE=[31,28,31,30,31,30,31,31,30,31,30,31],aE=[31,29,31,30,31,30,31,31,30,31,30,31];function kw(t){return t%400===0||t%4===0&&t%100!==0}function _w(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=kw(t);if(r&&n>aE[e]||!r&&n>sE[e])return!1}return!0}function lE(t,e){if(e<1)return!1;const n=kw(t);return!(n&&e>366||!n&&e>365)}function Cw(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function ip(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const cE=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function uE(t,e,n={}){e=String(e);const r=e.match(cE);if(r){const h=xw(n.originalDate||t,n);e=r.reduce(function(d,f){if(f[0]==="'")return d;const w=d.indexOf(f),p=d[w-1]==="'",g=d.replace(f,"'"+ZT[f[0]](h,f,n)+"'");return p?g.substring(0,w-1)+g.substring(w+1):g},e)}return _s(t,e,n)}function hE(t,e,n){t=xw(t,n);const r=ep(e,t,!0),h=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),d.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),d}function Vc(t,e,n,r){return r={...r,timeZone:e,originalDate:t},uE(hE(t,e,{timeZone:r.timeZone}),n,r)}const Kc="yyyy-MM-dd",$w="HH:mm:ss.SSS",Mw="HH:mm:ss",Gc=`${Kc} ${$w}`,Aw=`${Kc} ${Mw}`,uj=Fi("R",{methods:{parseDateTime(t,e){return t.includes(" ")&&(t=t.replace(" ","T")),e&&e==="UTC"&&(t+="Z"),Date.parse(t)},formatUtcToLocal(t,e){return _s(!e||e==="local"?PT(t,t.getTimezoneOffset()):t,Gc)},formatDateTime(t,e){return!e||e==="local"?_s(t,Gc):Vc(t,e,Gc)},formatDateTimeHMS(t,e){return!e||e==="local"?_s(t,Aw):Vc(t,e,Aw)},formatDate:function(t,e){return!e||e==="local"?_s(t,Kc):Vc(t,this.timeZone,Kc)},formatTime:function(t,e,n=$w){return!e||e==="local"?_s(t,n):Vc(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,Mw)},formatTimestamp(t,e){return this.formatDateTime(xT(t),e)},formatSeconds(t,e){return this.formatDateTime(new Date(t*1e3),e)},formatNanoseconds(t,e){return this.formatDateTime(new Date(parseInt(t)/1e6),e)}}});var dE=Object.defineProperty,pE=(t,e,n)=>e in t?dE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e,n)=>pE(t,typeof e!="symbol"?e+"":e,n);function op(t,e,n){const r=yn(t,n==null?void 0:n.in);return isNaN(e)?Kn((n==null?void 0:n.in)||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function fE(t,e){const n=yn(t,void 0).getDay();return n===0?7:n}function gE(t,e){const n=mE(e)?new e(0):Kn(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function mE(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const yE=10;let Tw=class{constructor(){Ze(this,"subPriority",0)}validate(e,n){return!0}},vE=class extends Tw{constructor(e,n,r,h,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=h,d&&(this.subPriority=d)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}},wE=class extends Tw{constructor(e,n){super(),Ze(this,"priority",yE),Ze(this,"subPriority",-1),this.context=e||(r=>Kn(n,r))}set(e,n){return n.timestampIsSet?e:Kn(e,gE(e,this.context))}};class Gt{run(e,n,r,h){const d=this.parse(e,n,r,h);return d?{setter:new vE(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}let bE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",140),Ze(this,"incompatibleTokens",["R","u","t","T"])}parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});case"GGGG":default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}};const Dn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},co={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Pn(t,e){return t&&{value:e(t.value),rest:t.rest}}function xn(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function uo(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,h=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,f=n[5]?parseInt(n[5],10):0;return{value:r*(h*gh+d*ac+f*TS),rest:e.slice(n[0].length)}}function Ew(t){return xn(Dn.anyDigitsSigned,t)}function Mn(t,e){switch(t){case 1:return xn(Dn.singleDigit,e);case 2:return xn(Dn.twoDigits,e);case 3:return xn(Dn.threeDigits,e);case 4:return xn(Dn.fourDigits,e);default:return xn(new RegExp("^\\d{1,"+t+"}"),e)}}function Rw(t,e){switch(t){case 1:return xn(Dn.singleDigitSigned,e);case 2:return xn(Dn.twoDigitsSigned,e);case 3:return xn(Dn.threeDigitsSigned,e);case 4:return xn(Dn.fourDigitsSigned,e);default:return xn(new RegExp("^-?\\d{1,"+t+"}"),e)}}function sp(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Lw(t,e){const n=e>0,r=n?e:1-e;let h;if(r<=50)h=t||100;else{const d=r+50,f=Math.trunc(d/100)*100,w=t>=d%100;h=t+f-(w?100:0)}return n?h:1-h}function Ow(t){return t%400===0||t%4===0&&t%100!==0}let xE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,n,r){const h=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Pn(Mn(4,e),h);case"yo":return Pn(r.ordinalNumber(e,{unit:"year"}),h);default:return Pn(Mn(n.length,e),h)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const h=e.getFullYear();if(r.isTwoDigitYear){const f=Lw(r.year,h);return e.setFullYear(f,0,1),e.setHours(0,0,0,0),e}const d=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}},SE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,n,r){const h=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Pn(Mn(4,e),h);case"Yo":return Pn(r.ordinalNumber(e,{unit:"year"}),h);default:return Pn(Mn(n.length,e),h)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,h){const d=yh(e,h);if(r.isTwoDigitYear){const w=Lw(r.year,d);return e.setFullYear(w,0,h.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,h)}const f=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(f,0,h.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,h)}},kE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,n){return Rw(n==="R"?4:n.length,e)}set(e,n,r){const h=Kn(e,0);return h.setFullYear(r,0,4),h.setHours(0,0,0,0),ca(h)}};class _E extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,n){return Rw(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}let CE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",120),Ze(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"Q":case"QQ":return Mn(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},$E=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",120),Ze(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"q":case"qq":return Mn(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}},ME=class extends Gt{constructor(){super(...arguments),Ze(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ze(this,"priority",110)}parse(e,n,r){const h=d=>d-1;switch(n){case"M":return Pn(xn(Dn.month,e),h);case"MM":return Pn(Mn(2,e),h);case"Mo":return Pn(r.ordinalNumber(e,{unit:"month"}),h);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}},AE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",110),Ze(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,n,r){const h=d=>d-1;switch(n){case"L":return Pn(xn(Dn.month,e),h);case"LL":return Pn(Mn(2,e),h);case"Lo":return Pn(r.ordinalNumber(e,{unit:"month"}),h);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}};function TE(t,e,n){const r=yn(t,n==null?void 0:n.in),h=kg(r,n)-e;return r.setDate(r.getDate()-h*7),yn(r,n==null?void 0:n.in)}let EE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",100),Ze(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,n,r){switch(n){case"w":return xn(Dn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Mn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,h){return Go(TE(e,r,h),h)}};function RE(t,e,n){const r=yn(t,void 0),h=Sg(r)-e;return r.setDate(r.getDate()-h*7),r}let LE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",100),Ze(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,n,r){switch(n){case"I":return xn(Dn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Mn(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return ca(RE(e,r))}};const OE=[31,28,31,30,31,30,31,31,30,31,30,31],IE=[31,29,31,30,31,30,31,31,30,31,30,31];let NE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"subPriority",1),Ze(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"d":return xn(Dn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Mn(n.length,e)}}validate(e,n){const r=e.getFullYear(),h=Ow(r),d=e.getMonth();return h?n>=1&&n<=IE[d]:n>=1&&n<=OE[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}},DE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"subpriority",1),Ze(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,n,r){switch(n){case"D":case"DD":return xn(Dn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Mn(n.length,e)}}validate(e,n){const r=e.getFullYear();return Ow(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}};function ap(t,e,n){var r,h,d,f;const w=la(),p=(n==null?void 0:n.weekStartsOn)??((h=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:h.weekStartsOn)??w.weekStartsOn??((f=(d=w.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,g=yn(t,n==null?void 0:n.in),i=g.getDay(),a=(e%7+7)%7,u=7-p,c=e<0||e>6?e-(i+u)%7:(a+u)%7-(i+u)%7;return op(g,c,n)}let PE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,h){return e=ap(e,r,h),e.setHours(0,0,0,0),e}},FE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,n,r,h){const d=f=>{const w=Math.floor((f-1)/7)*7;return(f+h.weekStartsOn+6)%7+w};switch(n){case"e":case"ee":return Pn(Mn(n.length,e),d);case"eo":return Pn(r.ordinalNumber(e,{unit:"day"}),d);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,h){return e=ap(e,r,h),e.setHours(0,0,0,0),e}},BE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,n,r,h){const d=f=>{const w=Math.floor((f-1)/7)*7;return(f+h.weekStartsOn+6)%7+w};switch(n){case"c":case"cc":return Pn(Mn(n.length,e),d);case"co":return Pn(r.ordinalNumber(e,{unit:"day"}),d);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,h){return e=ap(e,r,h),e.setHours(0,0,0,0),e}};function jE(t,e,n){const r=yn(t,void 0),h=fE(r),d=e-h;return op(r,d,n)}let WE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,n,r){const h=d=>d===0?7:d;switch(n){case"i":case"ii":return Mn(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Pn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),h);case"iiiii":return Pn(r.day(e,{width:"narrow",context:"formatting"}),h);case"iiiiii":return Pn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),h);case"iiii":default:return Pn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),h)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=jE(e,r),e.setHours(0,0,0,0),e}},zE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(sp(r),0,0,0),e}},HE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(sp(r),0,0,0),e}},UE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","b","t","T"])}parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(sp(r),0,0,0),e}},qE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,n,r){switch(n){case"h":return xn(Dn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Mn(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const h=e.getHours()>=12;return h&&r<12?e.setHours(r+12,0,0,0):!h&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}};class VE extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,n,r){switch(n){case"H":return xn(Dn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Mn(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}}let KE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,n,r){switch(n){case"K":return xn(Dn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Mn(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}},GE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,n,r){switch(n){case"k":return xn(Dn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Mn(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const h=r<=24?r%24:r;return e.setHours(h,0,0,0),e}},YE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",60),Ze(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"m":return xn(Dn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Mn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}},XE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",50),Ze(this,"incompatibleTokens",["t","T"])}parse(e,n,r){switch(n){case"s":return xn(Dn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Mn(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}},QE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",30),Ze(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=h=>Math.trunc(h*Math.pow(10,-n.length+3));return Pn(Mn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}},ZE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return uo(co.basicOptionalMinutes,e);case"XX":return uo(co.basic,e);case"XXXX":return uo(co.basicOptionalSeconds,e);case"XXXXX":return uo(co.extendedOptionalSeconds,e);case"XXX":default:return uo(co.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Kn(e,e.getTime()-lc(e)-r)}},JE=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return uo(co.basicOptionalMinutes,e);case"xx":return uo(co.basic,e);case"xxxx":return uo(co.basicOptionalSeconds,e);case"xxxxx":return uo(co.extendedOptionalSeconds,e);case"xxx":default:return uo(co.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Kn(e,e.getTime()-lc(e)-r)}},eR=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",40),Ze(this,"incompatibleTokens","*")}parse(e){return Ew(e)}set(e,n,r){return[Kn(e,r*1e3),{timestampIsSet:!0}]}},tR=class extends Gt{constructor(){super(...arguments),Ze(this,"priority",20),Ze(this,"incompatibleTokens","*")}parse(e){return Ew(e)}set(e,n,r){return[Kn(e,r),{timestampIsSet:!0}]}};const nR={G:new bE,y:new xE,Y:new SE,R:new kE,u:new _E,Q:new CE,q:new $E,M:new ME,L:new AE,w:new EE,I:new LE,d:new NE,D:new DE,E:new PE,e:new FE,c:new BE,i:new WE,a:new zE,b:new HE,B:new UE,h:new qE,H:new VE,K:new KE,k:new GE,m:new YE,s:new XE,S:new QE,X:new ZE,x:new JE,t:new eR,T:new tR},rR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,oR=/^'([^]*?)'?$/,sR=/''/g,aR=/\S/,lR=/[a-zA-Z]/;function cR(t,e,n,r){var h,d,f,w;const p=()=>Kn(n,NaN),g=uw(),i=g.locale??xg,a=g.firstWeekContainsDate??((d=(h=g.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,u=g.weekStartsOn??((w=(f=g.locale)==null?void 0:f.options)==null?void 0:w.weekStartsOn)??0;if(!e)return t?p():yn(n,void 0);const c={firstWeekContainsDate:a,weekStartsOn:u,locale:i},o=[new wE(void 0,n)],l=e.match(iR).map(M=>{const k=M[0];if(k in vh){const x=vh[k];return x(M,i.formatLong)}return M}).join("").match(rR),m=[];for(let M of l){Eg(M)&&wh(M,e,t),Tg(M)&&wh(M,e,t);const k=M[0],x=nR[k];if(x){const{incompatibleTokens:R}=x;if(Array.isArray(R)){const O=m.find(L=>R.includes(L.token)||L.token===k);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${M}\` at the same time`)}else if(x.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${M}\` and any other token at the same time`);m.push({token:k,fullToken:M});const I=x.run(t,M,i.match,c);if(!I)return p();o.push(I.setter),t=I.rest}else{if(k.match(lR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");if(M==="''"?M="'":k==="'"&&(M=uR(M)),t.indexOf(M)===0)t=t.slice(M.length);else return p()}}if(t.length>0&&aR.test(t))return p();const b=o.map(M=>M.priority).sort((M,k)=>k-M).filter((M,k,x)=>x.indexOf(M)===k).map(M=>o.filter(k=>k.priority===M).sort((k,x)=>x.subPriority-k.subPriority)).map(M=>M[0]);let S=yn(n,void 0);if(isNaN(+S))return p();const E={};for(const M of b){if(!M.validate(S,c))return p();const k=M.set(S,E,c);Array.isArray(k)?(S=k[0],Object.assign(E,k[1])):S=k}return S}function uR(t){return t.match(oR)[1].replace(sR,"'")}function Iw(t,e){return function(){return t.apply(e,arguments)}}const{toString:hR}=Object.prototype,{getPrototypeOf:lp}=Object,{iterator:Yc,toStringTag:Nw}=Symbol,Xc=(t=>e=>{const n=hR.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qi=t=>(t=t.toLowerCase(),e=>Xc(e)===t),Qc=t=>e=>typeof e===t,{isArray:Ca}=Array,vl=Qc("undefined");function wl(t){return t!==null&&!vl(t)&&t.constructor!==null&&!vl(t.constructor)&&Qr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Dw=qi("ArrayBuffer");function dR(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Dw(t.buffer),e}const pR=Qc("string"),Qr=Qc("function"),Pw=Qc("number"),bl=t=>t!==null&&typeof t=="object",fR=t=>t===!0||t===!1,Zc=t=>{if(Xc(t)!=="object")return!1;const e=lp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Nw in t)&&!(Yc in t)},gR=t=>{if(!bl(t)||wl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},mR=qi("Date"),yR=qi("File"),vR=qi("Blob"),wR=qi("FileList"),bR=t=>bl(t)&&Qr(t.pipe),xR=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Qr(t.append)&&((e=Xc(t))==="formdata"||e==="object"&&Qr(t.toString)&&t.toString()==="[object FormData]"))},SR=qi("URLSearchParams"),[kR,_R,CR,$R]=["ReadableStream","Request","Response","Headers"].map(qi),MR=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,h;if(typeof t!="object"&&(t=[t]),Ca(t))for(r=0,h=t.length;r<h;r++)e.call(null,t[r],r,t);else{if(wl(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let w;for(r=0;r<f;r++)w=d[r],e.call(null,t[w],w,t)}}function Fw(t,e){if(wl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,h;for(;r-- >0;)if(h=n[r],e===h.toLowerCase())return h;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bw=t=>!vl(t)&&t!==Ds;function cp(){const{caseless:t}=Bw(this)&&this||{},e={},n=(r,h)=>{const d=t&&Fw(e,h)||h;Zc(e[d])&&Zc(r)?e[d]=cp(e[d],r):Zc(r)?e[d]=cp({},r):Ca(r)?e[d]=r.slice():e[d]=r};for(let r=0,h=arguments.length;r<h;r++)arguments[r]&&xl(arguments[r],n);return e}const AR=(t,e,n,{allOwnKeys:r}={})=>(xl(e,(h,d)=>{n&&Qr(h)?t[d]=Iw(h,n):t[d]=h},{allOwnKeys:r}),t),TR=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ER=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},RR=(t,e,n,r)=>{let h,d,f;const w={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),d=h.length;d-- >0;)f=h[d],(!r||r(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&lp(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},LR=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},OR=t=>{if(!t)return null;if(Ca(t))return t;let e=t.length;if(!Pw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},IR=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&lp(Uint8Array)),NR=(t,e)=>{const n=(t&&t[Yc]).call(t);let r;for(;(r=n.next())&&!r.done;){const h=r.value;e.call(t,h[0],h[1])}},DR=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},PR=qi("HTMLFormElement"),FR=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),jw=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),BR=qi("RegExp"),Ww=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};xl(n,(h,d)=>{let f;(f=e(h,d,t))!==!1&&(r[d]=f||h)}),Object.defineProperties(t,r)},jR=t=>{Ww(t,(e,n)=>{if(Qr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Qr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},WR=(t,e)=>{const n={},r=h=>{h.forEach(d=>{n[d]=!0})};return Ca(t)?r(t):r(String(t).split(e)),n},zR=()=>{},HR=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function UR(t){return!!(t&&Qr(t.append)&&t[Nw]==="FormData"&&t[Yc])}const qR=t=>{const e=new Array(10),n=(r,h)=>{if(bl(r)){if(e.indexOf(r)>=0)return;if(wl(r))return r;if(!("toJSON"in r)){e[h]=r;const d=Ca(r)?[]:{};return xl(r,(f,w)=>{const p=n(f,h+1);!vl(p)&&(d[w]=p)}),e[h]=void 0,d}}return r};return n(t,0)},VR=qi("AsyncFunction"),KR=t=>t&&(bl(t)||Qr(t))&&Qr(t.then)&&Qr(t.catch),zw=((t,e)=>t?setImmediate:e?((n,r)=>(Ds.addEventListener("message",({source:h,data:d})=>{h===Ds&&d===n&&r.length&&r.shift()()},!1),h=>{r.push(h),Ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qr(Ds.postMessage)),GR=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||zw,YR=t=>t!=null&&Qr(t[Yc]),Ce={isArray:Ca,isArrayBuffer:Dw,isBuffer:wl,isFormData:xR,isArrayBufferView:dR,isString:pR,isNumber:Pw,isBoolean:fR,isObject:bl,isPlainObject:Zc,isEmptyObject:gR,isReadableStream:kR,isRequest:_R,isResponse:CR,isHeaders:$R,isUndefined:vl,isDate:mR,isFile:yR,isBlob:vR,isRegExp:BR,isFunction:Qr,isStream:bR,isURLSearchParams:SR,isTypedArray:IR,isFileList:wR,forEach:xl,merge:cp,extend:AR,trim:MR,stripBOM:TR,inherits:ER,toFlatObject:RR,kindOf:Xc,kindOfTest:qi,endsWith:LR,toArray:OR,forEachEntry:NR,matchAll:DR,isHTMLForm:PR,hasOwnProperty:jw,hasOwnProp:jw,reduceDescriptors:Ww,freezeMethods:jR,toObjectSet:WR,toCamelCase:FR,noop:zR,toFiniteNumber:HR,findKey:Fw,global:Ds,isContextDefined:Bw,isSpecCompliantForm:UR,toJSONObject:qR,isAsyncFn:VR,isThenable:KR,setImmediate:zw,asap:GR,isIterable:YR};function _t(t,e,n,r,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),h&&(this.response=h,this.status=h.status?h.status:null)}Ce.inherits(_t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ce.toJSONObject(this.config),code:this.code,status:this.status}}});const Hw=_t.prototype,Uw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Uw[t]={value:t}}),Object.defineProperties(_t,Uw),Object.defineProperty(Hw,"isAxiosError",{value:!0}),_t.from=(t,e,n,r,h,d)=>{const f=Object.create(Hw);return Ce.toFlatObject(t,f,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),_t.call(f,t.message,e,n,r,h),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const XR=null;function up(t){return Ce.isPlainObject(t)||Ce.isArray(t)}function qw(t){return Ce.endsWith(t,"[]")?t.slice(0,-2):t}function Vw(t,e,n){return t?t.concat(e).map(function(r,h){return r=qw(r),!n&&h?"["+r+"]":r}).join(n?".":""):e}function QR(t){return Ce.isArray(t)&&!t.some(up)}const ZR=Ce.toFlatObject(Ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Jc(t,e,n){if(!Ce.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!Ce.isUndefined(o[c])});const r=n.metaTokens,h=n.visitor||g,d=n.dots,f=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(e);if(!Ce.isFunction(h))throw new TypeError("visitor must be a function");function p(c){if(c===null)return"";if(Ce.isDate(c))return c.toISOString();if(Ce.isBoolean(c))return c.toString();if(!w&&Ce.isBlob(c))throw new _t("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(c)||Ce.isTypedArray(c)?w&&typeof Blob=="function"?new Blob([c]):Buffer.from(c):c}function g(c,o,l){let m=c;if(c&&!l&&typeof c=="object"){if(Ce.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(Ce.isArray(c)&&QR(c)||(Ce.isFileList(c)||Ce.endsWith(o,"[]"))&&(m=Ce.toArray(c)))return o=qw(o),m.forEach(function(b,S){!(Ce.isUndefined(b)||b===null)&&e.append(f===!0?Vw([o],S,d):f===null?o:o+"[]",p(b))}),!1}return up(c)?!0:(e.append(Vw(l,o,d),p(c)),!1)}const i=[],a=Object.assign(ZR,{defaultVisitor:g,convertValue:p,isVisitable:up});function u(c,o){if(!Ce.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),Ce.forEach(c,function(l,m){(!(Ce.isUndefined(l)||l===null)&&h.call(e,l,Ce.isString(m)?m.trim():m,o,a))===!0&&u(l,o?o.concat(m):[m])}),i.pop()}}if(!Ce.isObject(t))throw new TypeError("data must be an object");return u(t),e}function Kw(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function hp(t,e){this._pairs=[],t&&Jc(t,this,e)}const Gw=hp.prototype;Gw.append=function(t,e){this._pairs.push([t,e])},Gw.toString=function(t){const e=t?function(n){return t.call(this,n,Kw)}:Kw;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function JR(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yw(t,e,n){if(!e)return t;const r=n&&n.encode||JR;Ce.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let d;if(h?d=h(e,n):d=Ce.isURLSearchParams(e)?e.toString():new hp(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Xw{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ce.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Qw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eL=typeof URLSearchParams<"u"?URLSearchParams:hp,tL=typeof FormData<"u"?FormData:null,nL=typeof Blob<"u"?Blob:null,rL={isBrowser:!0,classes:{URLSearchParams:eL,FormData:tL,Blob:nL},protocols:["http","https","file","blob","url","data"]},dp=typeof window<"u"&&typeof document<"u",pp=typeof navigator=="object"&&navigator||void 0,iL=dp&&(!pp||["ReactNative","NativeScript","NS"].indexOf(pp.product)<0),oL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",sL=dp&&window.location.href||"http://localhost",aL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dp,hasStandardBrowserEnv:iL,hasStandardBrowserWebWorkerEnv:oL,navigator:pp,origin:sL},Symbol.toStringTag,{value:"Module"})),_r={...aL,...rL};function lL(t,e){return Jc(t,new _r.classes.URLSearchParams,{visitor:function(n,r,h,d){return _r.isNode&&Ce.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function cL(t){return Ce.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function uL(t){const e={},n=Object.keys(t);let r;const h=n.length;let d;for(r=0;r<h;r++)d=n[r],e[d]=t[d];return e}function Zw(t){function e(n,r,h,d){let f=n[d++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=d>=n.length;return f=!f&&Ce.isArray(h)?h.length:f,p?(Ce.hasOwnProp(h,f)?h[f]=[h[f],r]:h[f]=r,!w):((!h[f]||!Ce.isObject(h[f]))&&(h[f]=[]),e(n,r,h[f],d)&&Ce.isArray(h[f])&&(h[f]=uL(h[f])),!w)}if(Ce.isFormData(t)&&Ce.isFunction(t.entries)){const n={};return Ce.forEachEntry(t,(r,h)=>{e(cL(r),h,n,0)}),n}return null}function hL(t,e,n){if(Ce.isString(t))try{return(e||JSON.parse)(t),Ce.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Sl={transitional:Qw,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,h=Ce.isObject(t);if(h&&Ce.isHTMLForm(t)&&(t=new FormData(t)),Ce.isFormData(t))return r?JSON.stringify(Zw(t)):t;if(Ce.isArrayBuffer(t)||Ce.isBuffer(t)||Ce.isStream(t)||Ce.isFile(t)||Ce.isBlob(t)||Ce.isReadableStream(t))return t;if(Ce.isArrayBufferView(t))return t.buffer;if(Ce.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(h){if(n.indexOf("application/x-www-form-urlencoded")>-1)return lL(t,this.formSerializer).toString();if((d=Ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Jc(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return h||r?(e.setContentType("application/json",!1),hL(t)):t}],transformResponse:[function(t){const e=this.transitional||Sl.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ce.isResponse(t)||Ce.isReadableStream(t))return t;if(t&&Ce.isString(t)&&(n&&!this.responseType||r)){const h=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(h)throw d.name==="SyntaxError"?_t.from(d,_t.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_r.classes.FormData,Blob:_r.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],t=>{Sl.headers[t]={}});const dL=Ce.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"]),pL=t=>{const e={};let n,r,h;return t&&t.split(`
|
1497
|
+
`).forEach(function(d){h=d.indexOf(":"),n=d.substring(0,h).trim().toLowerCase(),r=d.substring(h+1).trim(),!(!n||e[n]&&dL[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Jw=Symbol("internals");function kl(t){return t&&String(t).trim().toLowerCase()}function eu(t){return t===!1||t==null?t:Ce.isArray(t)?t.map(eu):String(t)}function fL(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const gL=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function fp(t,e,n,r,h){if(Ce.isFunction(r))return r.call(this,e,n);if(h&&(e=n),!!Ce.isString(e)){if(Ce.isString(r))return e.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(e)}}function mL(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function yL(t,e){const n=Ce.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(h,d,f){return this[r].call(this,e,h,d,f)},configurable:!0})})}let Zr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function h(f,w,p){const g=kl(w);if(!g)throw new Error("header name must be a non-empty string");const i=Ce.findKey(r,g);(!i||r[i]===void 0||p===!0||p===void 0&&r[i]!==!1)&&(r[i||w]=eu(f))}const d=(f,w)=>Ce.forEach(f,(p,g)=>h(p,g,w));if(Ce.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(Ce.isString(t)&&(t=t.trim())&&!gL(t))d(pL(t),e);else if(Ce.isObject(t)&&Ce.isIterable(t)){let f={},w,p;for(const g of t){if(!Ce.isArray(g))throw TypeError("Object iterator must return a key-value pair");f[p=g[0]]=(w=f[p])?Ce.isArray(w)?[...w,g[1]]:[w,g[1]]:g[1]}d(f,e)}else t!=null&&h(e,t,n);return this}get(t,e){if(t=kl(t),t){const n=Ce.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return fL(r);if(Ce.isFunction(e))return e.call(this,r,n);if(Ce.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=kl(t),t){const n=Ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||fp(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function h(d){if(d=kl(d),d){const f=Ce.findKey(n,d);f&&(!e||fp(n,n[f],f,e))&&(delete n[f],r=!0)}}return Ce.isArray(t)?t.forEach(h):h(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const h=e[n];(!t||fp(this,this[h],h,t,!0))&&(delete this[h],r=!0)}return r}normalize(t){const e=this,n={};return Ce.forEach(this,(r,h)=>{const d=Ce.findKey(n,h);if(d){e[d]=eu(r),delete e[h];return}const f=t?mL(h):String(h).trim();f!==h&&delete e[h],e[f]=eu(r),n[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ce.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&Ce.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
|
1498
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[Jw]=this[Jw]={accessors:{}}).accessors,n=this.prototype;function r(h){const d=kl(h);e[d]||(yL(n,h),e[d]=!0)}return Ce.isArray(t)?t.forEach(r):r(t),this}};Zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Zr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ce.freezeMethods(Zr);function gp(t,e){const n=this||Sl,r=e||n,h=Zr.from(r.headers);let d=r.data;return Ce.forEach(t,function(f){d=f.call(n,d,h.normalize(),e?e.status:void 0)}),h.normalize(),d}function eb(t){return!!(t&&t.__CANCEL__)}function $a(t,e,n){_t.call(this,t??"canceled",_t.ERR_CANCELED,e,n),this.name="CanceledError"}Ce.inherits($a,_t,{__CANCEL__:!0});function tb(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new _t("Request failed with status code "+n.status,[_t.ERR_BAD_REQUEST,_t.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vL(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function wL(t,e){t=t||10;const n=new Array(t),r=new Array(t);let h=0,d=0,f;return e=e!==void 0?e:1e3,function(w){const p=Date.now(),g=r[d];f||(f=p),n[h]=w,r[h]=p;let i=d,a=0;for(;i!==h;)a+=n[i++],i=i%t;if(h=(h+1)%t,h===d&&(d=(d+1)%t),p-f<e)return;const u=g&&p-g;return u?Math.round(a*1e3/u):void 0}}function bL(t,e){let n=0,r=1e3/e,h,d;const f=(w,p=Date.now())=>{n=p,h=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const p=Date.now(),g=p-n;g>=r?f(w,p):(h=w,d||(d=setTimeout(()=>{d=null,f(h)},r-g)))},()=>h&&f(h)]}const tu=(t,e,n=3)=>{let r=0;const h=wL(50,250);return bL(d=>{const f=d.loaded,w=d.lengthComputable?d.total:void 0,p=f-r,g=h(p),i=f<=w;r=f;const a={loaded:f,total:w,progress:w?f/w:void 0,bytes:p,rate:g||void 0,estimated:g&&w&&i?(w-f)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},nb=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},rb=t=>(...e)=>Ce.asap(()=>t(...e)),xL=_r.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,_r.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(_r.origin),_r.navigator&&/(msie|trident)/i.test(_r.navigator.userAgent)):()=>!0,SL=_r.hasStandardBrowserEnv?{write(t,e,n,r,h,d){const f=[t+"="+encodeURIComponent(e)];Ce.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),Ce.isString(r)&&f.push("path="+r),Ce.isString(h)&&f.push("domain="+h),d===!0&&f.push("secure"),document.cookie=f.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kL(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function _L(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ib(t,e,n){let r=!kL(e);return t&&(r||n==!1)?_L(t,e):e}const ob=t=>t instanceof Zr?{...t}:t;function Ps(t,e){e=e||{};const n={};function r(g,i,a,u){return Ce.isPlainObject(g)&&Ce.isPlainObject(i)?Ce.merge.call({caseless:u},g,i):Ce.isPlainObject(i)?Ce.merge({},i):Ce.isArray(i)?i.slice():i}function h(g,i,a,u){if(Ce.isUndefined(i)){if(!Ce.isUndefined(g))return r(void 0,g,a,u)}else return r(g,i,a,u)}function d(g,i){if(!Ce.isUndefined(i))return r(void 0,i)}function f(g,i){if(Ce.isUndefined(i)){if(!Ce.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function w(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:w,headers:(g,i,a)=>h(ob(g),ob(i),a,!0)};return Ce.forEach(Object.keys({...t,...e}),function(g){const i=p[g]||h,a=i(t[g],e[g],g);Ce.isUndefined(a)&&i!==w||(n[g]=a)}),n}const sb=t=>{const e=Ps({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:h,xsrfCookieName:d,headers:f,auth:w}=e;e.headers=f=Zr.from(f),e.url=Yw(ib(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&f.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let p;if(Ce.isFormData(n)){if(_r.hasStandardBrowserEnv||_r.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(_r.hasStandardBrowserEnv&&(r&&Ce.isFunction(r)&&(r=r(e)),r||r!==!1&&xL(e.url))){const g=h&&d&&SL.read(d);g&&f.set(h,g)}return e},CL=typeof XMLHttpRequest<"u",$L=CL&&function(t){return new Promise(function(e,n){const r=sb(t);let h=r.data;const d=Zr.from(r.headers).normalize();let{responseType:f,onUploadProgress:w,onDownloadProgress:p}=r,g,i,a,u,c;function o(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let l=new XMLHttpRequest;l.open(r.method.toUpperCase(),r.url,!0),l.timeout=r.timeout;function m(){if(!l)return;const S=Zr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!f||f==="text"||f==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:S,config:t,request:l};tb(function(M){e(M),o()},function(M){n(M),o()},E),l=null}"onloadend"in l?l.onloadend=m:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(m)},l.onabort=function(){l&&(n(new _t("Request aborted",_t.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new _t("Network Error",_t.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let S=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||Qw;r.timeoutErrorMessage&&(S=r.timeoutErrorMessage),n(new _t(S,E.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,t,l)),l=null},h===void 0&&d.setContentType(null),"setRequestHeader"in l&&Ce.forEach(d.toJSON(),function(S,E){l.setRequestHeader(E,S)}),Ce.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),f&&f!=="json"&&(l.responseType=r.responseType),p&&([a,c]=tu(p,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,u]=tu(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(g=S=>{l&&(n(!S||S.type?new $a(null,t,l):S),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=vL(r.url);if(b&&_r.protocols.indexOf(b)===-1){n(new _t("Unsupported protocol "+b+":",_t.ERR_BAD_REQUEST,t));return}l.send(h||null)})},ML=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,h;const d=function(g){if(!h){h=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof _t?i:new $a(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new _t(`timeout ${e} of ms exceeded`,_t.ETIMEDOUT))},e);const w=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Ce.asap(w),p}},AL=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,h;for(;r<n;)h=r+e,yield t.slice(r,h),r=h},TL=async function*(t,e){for await(const n of EL(t))yield*AL(n,e)},EL=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},ab=(t,e,n,r)=>{const h=TL(t,e);let d=0,f,w=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await h.next();if(g){w(),p.close();return}let a=i.byteLength;if(n){let u=d+=a;n(u)}p.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(p){return w(p),h.return()}},{highWaterMark:2})},nu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",lb=nu&&typeof ReadableStream=="function",RL=nu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),cb=(t,...e)=>{try{return!!t(...e)}catch{return!1}},LL=lb&&cb(()=>{let t=!1;const e=new Request(_r.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),ub=64*1024,mp=lb&&cb(()=>Ce.isReadableStream(new Response("").body)),ru={stream:mp&&(t=>t.body)};nu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ru[e]&&(ru[e]=Ce.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new _t(`Response type '${e}' is not supported`,_t.ERR_NOT_SUPPORT,r)})})})(new Response);const OL=async t=>{if(t==null)return 0;if(Ce.isBlob(t))return t.size;if(Ce.isSpecCompliantForm(t))return(await new Request(_r.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(t)||Ce.isArrayBuffer(t))return t.byteLength;if(Ce.isURLSearchParams(t)&&(t=t+""),Ce.isString(t))return(await RL(t)).byteLength},IL=async(t,e)=>Ce.toFiniteNumber(t.getContentLength())??OL(e),NL=nu&&(async t=>{let{url:e,method:n,data:r,signal:h,cancelToken:d,timeout:f,onDownloadProgress:w,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:u}=sb(t);g=g?(g+"").toLowerCase():"text";let c=ML([h,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&LL&&n!=="get"&&n!=="head"&&(m=await IL(i,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Ce.isFormData(r)&&(x=k.headers.get("content-type"))&&i.setContentType(x),k.body){const[R,I]=nb(m,tu(rb(p)));r=ab(k.body,ub,R,I)}}Ce.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...u,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let S=await fetch(o,u);const E=mp&&(g==="stream"||g==="response");if(mp&&(w||E&&l)){const k={};["status","statusText","headers"].forEach(O=>{k[O]=S[O]});const x=Ce.toFiniteNumber(S.headers.get("content-length")),[R,I]=w&&nb(x,tu(rb(w),!0))||[];S=new Response(ab(S.body,ub,R,()=>{I&&I(),l&&l()}),k)}g=g||"text";let M=await ru[Ce.findKey(ru,g)||"text"](S,t);return!E&&l&&l(),await new Promise((k,x)=>{tb(k,x,{data:M,headers:Zr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:o})})}catch(b){throw l&&l(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new _t("Network Error",_t.ERR_NETWORK,t,o),{cause:b.cause||b}):_t.from(b,b&&b.code,t,o)}}),yp={http:XR,xhr:$L,fetch:NL};Ce.forEach(yp,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const hb=t=>`- ${t}`,DL=t=>Ce.isFunction(t)||t===null||t===!1,db={getAdapter:t=>{t=Ce.isArray(t)?t:[t];const{length:e}=t;let n,r;const h={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!DL(n)&&(r=yp[(f=String(n)).toLowerCase()],r===void 0))throw new _t(`Unknown adapter '${f}'`);if(r)break;h[f||"#"+d]=r}if(!r){const d=Object.entries(h).map(([w,p])=>`adapter ${w} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
|
1499
|
+
`+d.map(hb).join(`
|
1500
|
+
`):" "+hb(d[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:yp};function vp(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new $a(null,t)}function pb(t){return vp(t),t.headers=Zr.from(t.headers),t.data=gp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),db.getAdapter(t.adapter||Sl.adapter)(t).then(function(e){return vp(t),e.data=gp.call(t,t.transformResponse,e),e.headers=Zr.from(e.headers),e},function(e){return eb(e)||(vp(t),e&&e.response&&(e.response.data=gp.call(t,t.transformResponse,e.response),e.response.headers=Zr.from(e.response.headers))),Promise.reject(e)})}const fb="1.11.0",iu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{iu[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const gb={};iu.transitional=function(t,e,n){function r(h,d){return"[Axios v"+fb+"] Transitional option '"+h+"'"+d+(n?". "+n:"")}return(h,d,f)=>{if(t===!1)throw new _t(r(d," has been removed"+(e?" in "+e:"")),_t.ERR_DEPRECATED);return e&&!gb[d]&&(gb[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(h,d,f):!0}},iu.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function PL(t,e,n){if(typeof t!="object")throw new _t("options must be an object",_t.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let h=r.length;for(;h-- >0;){const d=r[h],f=e[d];if(f){const w=t[d],p=w===void 0||f(w,d,t);if(p!==!0)throw new _t("option "+d+" must be "+p,_t.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _t("Unknown option "+d,_t.ERR_BAD_OPTION)}}const ou={assertOptions:PL,validators:iu},ho=ou.validators;let Fs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Xw,response:new Xw}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const h=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?h&&!String(n.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
1501
|
+
`+h):n.stack=h}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Ps(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:h}=e;n!==void 0&&ou.assertOptions(n,{silentJSONParsing:ho.transitional(ho.boolean),forcedJSONParsing:ho.transitional(ho.boolean),clarifyTimeoutError:ho.transitional(ho.boolean)},!1),r!=null&&(Ce.isFunction(r)?e.paramsSerializer={serialize:r}:ou.assertOptions(r,{encode:ho.function,serialize:ho.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ou.assertOptions(e,{baseUrl:ho.spelling("baseURL"),withXsrfToken:ho.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=h&&Ce.merge(h.common,h[e.method]);h&&Ce.forEach(["delete","get","head","post","put","patch","common"],c=>{delete h[c]}),e.headers=Zr.concat(d,h);const f=[];let w=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(w=w&&c.synchronous,f.unshift(c.fulfilled,c.rejected))});const p=[];this.interceptors.response.forEach(function(c){p.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!w){const c=[pb.bind(this),void 0];for(c.unshift(...f),c.push(...p),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=f.length;let u=e;for(i=0;i<a;){const c=f[i++],o=f[i++];try{u=c(u)}catch(l){o.call(this,l);break}}try{g=pb.call(this,u)}catch(c){return Promise.reject(c)}for(i=0,a=p.length;i<a;)g=g.then(p[i++],p[i++]);return g}getUri(t){t=Ps(this.defaults,t);const e=ib(t.baseURL,t.url,t.allowAbsoluteUrls);return Yw(e,t.params,t.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(t){Fs.prototype[t]=function(e,n){return this.request(Ps(n||{},{method:t,url:e,data:(n||{}).data}))}}),Ce.forEach(["post","put","patch"],function(t){function e(n){return function(r,h,d){return this.request(Ps(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:h}))}}Fs.prototype[t]=e(),Fs.prototype[t+"Form"]=e(!0)});let FL=class qx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(h){n=h});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const f=new Promise(w=>{r.subscribe(w),d=w}).then(h);return f.cancel=function(){r.unsubscribe(d)},f},e(function(h,d,f){r.reason||(r.reason=new $a(h,d,f),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new qx(function(n){e=n}),cancel:e}}};function BL(t){return function(e){return t.apply(null,e)}}function jL(t){return Ce.isObject(t)&&t.isAxiosError===!0}const wp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wp).forEach(([t,e])=>{wp[e]=t});function mb(t){const e=new Fs(t),n=Iw(Fs.prototype.request,e);return Ce.extend(n,Fs.prototype,e,{allOwnKeys:!0}),Ce.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return mb(Ps(t,r))},n}const Yn=Fi("E",mb(Sl));Yn.Axios=Fs,Yn.CanceledError=$a,Yn.CancelToken=FL,Yn.isCancel=eb,Yn.VERSION=fb,Yn.toFormData=Jc,Yn.AxiosError=_t,Yn.Cancel=Yn.CanceledError,Yn.all=function(t){return Promise.all(t)},Yn.spread=BL,Yn.isAxiosError=jL,Yn.mergeConfig=Ps,Yn.AxiosHeaders=Zr,Yn.formToJSON=t=>Zw(Ce.isHTMLForm(t)?new FormData(t):t),Yn.getAdapter=db.getAdapter,Yn.HttpStatusCode=wp,Yn.default=Yn;const{Axios:hj,AxiosError:dj,CanceledError:pj,isCancel:fj,CancelToken:gj,VERSION:mj,all:yj,Cancel:vj,isAxiosError:wj,spread:bj,toFormData:xj,AxiosHeaders:Sj,HttpStatusCode:kj,formToJSON:_j,getAdapter:Cj,mergeConfig:$j}=Yn;function yb(t,e){return function(){return t.apply(e,arguments)}}const{toString:WL}=Object.prototype,{getPrototypeOf:bp}=Object,{iterator:su,toStringTag:vb}=Symbol,au=(t=>e=>{const n=WL.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vi=t=>(t=t.toLowerCase(),e=>au(e)===t),lu=t=>e=>typeof e===t,{isArray:Ma}=Array,_l=lu("undefined");function Cl(t){return t!==null&&!_l(t)&&t.constructor!==null&&!_l(t.constructor)&&Jr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wb=Vi("ArrayBuffer");function zL(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&wb(t.buffer),e}const HL=lu("string"),Jr=lu("function"),bb=lu("number"),$l=t=>t!==null&&typeof t=="object",UL=t=>t===!0||t===!1,cu=t=>{if(au(t)!=="object")return!1;const e=bp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(vb in t)&&!(su in t)},qL=t=>{if(!$l(t)||Cl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},VL=Vi("Date"),KL=Vi("File"),GL=Vi("Blob"),YL=Vi("FileList"),XL=t=>$l(t)&&Jr(t.pipe),QL=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Jr(t.append)&&((e=au(t))==="formdata"||e==="object"&&Jr(t.toString)&&t.toString()==="[object FormData]"))},ZL=Vi("URLSearchParams"),[JL,eO,tO,nO]=["ReadableStream","Request","Response","Headers"].map(Vi),rO=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ml(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,h;if(typeof t!="object"&&(t=[t]),Ma(t))for(r=0,h=t.length;r<h;r++)e.call(null,t[r],r,t);else{if(Cl(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),f=d.length;let w;for(r=0;r<f;r++)w=d[r],e.call(null,t[w],w,t)}}function xb(t,e){if(Cl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,h;for(;r-- >0;)if(h=n[r],e===h.toLowerCase())return h;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sb=t=>!_l(t)&&t!==Bs;function xp(){const{caseless:t}=Sb(this)&&this||{},e={},n=(r,h)=>{const d=t&&xb(e,h)||h;cu(e[d])&&cu(r)?e[d]=xp(e[d],r):cu(r)?e[d]=xp({},r):Ma(r)?e[d]=r.slice():e[d]=r};for(let r=0,h=arguments.length;r<h;r++)arguments[r]&&Ml(arguments[r],n);return e}const iO=(t,e,n,{allOwnKeys:r}={})=>(Ml(e,(h,d)=>{n&&Jr(h)?t[d]=yb(h,n):t[d]=h},{allOwnKeys:r}),t),oO=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),sO=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},aO=(t,e,n,r)=>{let h,d,f;const w={};if(e=e||{},t==null)return e;do{for(h=Object.getOwnPropertyNames(t),d=h.length;d-- >0;)f=h[d],(!r||r(f,t,e))&&!w[f]&&(e[f]=t[f],w[f]=!0);t=n!==!1&&bp(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},lO=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},cO=t=>{if(!t)return null;if(Ma(t))return t;let e=t.length;if(!bb(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},uO=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&bp(Uint8Array)),hO=(t,e)=>{const r=(t&&t[su]).call(t);let h;for(;(h=r.next())&&!h.done;){const d=h.value;e.call(t,d[0],d[1])}},dO=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pO=Vi("HTMLFormElement"),fO=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,h){return r.toUpperCase()+h}),kb=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),gO=Vi("RegExp"),_b=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ml(n,(h,d)=>{let f;(f=e(h,d,t))!==!1&&(r[d]=f||h)}),Object.defineProperties(t,r)},mO=t=>{_b(t,(e,n)=>{if(Jr(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Jr(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yO=(t,e)=>{const n={},r=h=>{h.forEach(d=>{n[d]=!0})};return Ma(t)?r(t):r(String(t).split(e)),n},vO=()=>{},wO=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function bO(t){return!!(t&&Jr(t.append)&&t[vb]==="FormData"&&t[su])}const xO=t=>{const e=new Array(10),n=(r,h)=>{if($l(r)){if(e.indexOf(r)>=0)return;if(Cl(r))return r;if(!("toJSON"in r)){e[h]=r;const d=Ma(r)?[]:{};return Ml(r,(f,w)=>{const p=n(f,h+1);!_l(p)&&(d[w]=p)}),e[h]=void 0,d}}return r};return n(t,0)},SO=Vi("AsyncFunction"),kO=t=>t&&($l(t)||Jr(t))&&Jr(t.then)&&Jr(t.catch),Cb=((t,e)=>t?setImmediate:e?((n,r)=>(Bs.addEventListener("message",({source:h,data:d})=>{h===Bs&&d===n&&r.length&&r.shift()()},!1),h=>{r.push(h),Bs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jr(Bs.postMessage)),_O=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||Cb,$e={isArray:Ma,isArrayBuffer:wb,isBuffer:Cl,isFormData:QL,isArrayBufferView:zL,isString:HL,isNumber:bb,isBoolean:UL,isObject:$l,isPlainObject:cu,isEmptyObject:qL,isReadableStream:JL,isRequest:eO,isResponse:tO,isHeaders:nO,isUndefined:_l,isDate:VL,isFile:KL,isBlob:GL,isRegExp:gO,isFunction:Jr,isStream:XL,isURLSearchParams:ZL,isTypedArray:uO,isFileList:YL,forEach:Ml,merge:xp,extend:iO,trim:rO,stripBOM:oO,inherits:sO,toFlatObject:aO,kindOf:au,kindOfTest:Vi,endsWith:lO,toArray:cO,forEachEntry:hO,matchAll:dO,isHTMLForm:pO,hasOwnProperty:kb,hasOwnProp:kb,reduceDescriptors:_b,freezeMethods:mO,toObjectSet:yO,toCamelCase:fO,noop:vO,toFiniteNumber:wO,findKey:xb,global:Bs,isContextDefined:Sb,isSpecCompliantForm:bO,toJSONObject:xO,isAsyncFn:SO,isThenable:kO,setImmediate:Cb,asap:_O,isIterable:t=>t!=null&&Jr(t[su])};function Ct(t,e,n,r,h){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),h&&(this.response=h,this.status=h.status?h.status:null)}$e.inherits(Ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const $b=Ct.prototype,Mb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Mb[t]={value:t}}),Object.defineProperties(Ct,Mb),Object.defineProperty($b,"isAxiosError",{value:!0}),Ct.from=(t,e,n,r,h,d)=>{const f=Object.create($b);return $e.toFlatObject(t,f,function(p){return p!==Error.prototype},w=>w!=="isAxiosError"),Ct.call(f,t.message,e,n,r,h),f.cause=t,f.name=t.name,d&&Object.assign(f,d),f};const CO=null;function Sp(t){return $e.isPlainObject(t)||$e.isArray(t)}function Ab(t){return $e.endsWith(t,"[]")?t.slice(0,-2):t}function Tb(t,e,n){return t?t.concat(e).map(function(h,d){return h=Ab(h),!n&&d?"["+h+"]":h}).join(n?".":""):e}function $O(t){return $e.isArray(t)&&!t.some(Sp)}const MO=$e.toFlatObject($e,{},null,function(e){return/^is[A-Z]/.test(e)});function uu(t,e,n){if(!$e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=$e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,m){return!$e.isUndefined(m[l])});const r=n.metaTokens,h=n.visitor||i,d=n.dots,f=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(h))throw new TypeError("visitor must be a function");function g(o){if(o===null)return"";if($e.isDate(o))return o.toISOString();if($e.isBoolean(o))return o.toString();if(!p&&$e.isBlob(o))throw new Ct("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(o)||$e.isTypedArray(o)?p&&typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function i(o,l,m){let b=o;if(o&&!m&&typeof o=="object"){if($e.endsWith(l,"{}"))l=r?l:l.slice(0,-2),o=JSON.stringify(o);else if($e.isArray(o)&&$O(o)||($e.isFileList(o)||$e.endsWith(l,"[]"))&&(b=$e.toArray(o)))return l=Ab(l),b.forEach(function(E,M){!($e.isUndefined(E)||E===null)&&e.append(f===!0?Tb([l],M,d):f===null?l:l+"[]",g(E))}),!1}return Sp(o)?!0:(e.append(Tb(m,l,d),g(o)),!1)}const a=[],u=Object.assign(MO,{defaultVisitor:i,convertValue:g,isVisitable:Sp});function c(o,l){if(!$e.isUndefined(o)){if(a.indexOf(o)!==-1)throw Error("Circular reference detected in "+l.join("."));a.push(o),$e.forEach(o,function(b,S){(!($e.isUndefined(b)||b===null)&&h.call(e,b,$e.isString(S)?S.trim():S,l,u))===!0&&c(b,l?l.concat(S):[S])}),a.pop()}}if(!$e.isObject(t))throw new TypeError("data must be an object");return c(t),e}function Eb(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function kp(t,e){this._pairs=[],t&&uu(t,this,e)}const Rb=kp.prototype;Rb.append=function(e,n){this._pairs.push([e,n])},Rb.toString=function(e){const n=e?function(r){return e.call(this,r,Eb)}:Eb;return this._pairs.map(function(h){return n(h[0])+"="+n(h[1])},"").join("&")};function AO(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lb(t,e,n){if(!e)return t;const r=n&&n.encode||AO;$e.isFunction(n)&&(n={serialize:n});const h=n&&n.serialize;let d;if(h?d=h(e,n):d=$e.isURLSearchParams(e)?e.toString():new kp(e,n).toString(r),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Ob{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){$e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ib={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TO={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:kp,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},_p=typeof window<"u"&&typeof document<"u",Cp=typeof navigator=="object"&&navigator||void 0,EO=_p&&(!Cp||["ReactNative","NativeScript","NS"].indexOf(Cp.product)<0),RO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LO=_p&&window.location.href||"http://localhost",Cr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_p,hasStandardBrowserEnv:EO,hasStandardBrowserWebWorkerEnv:RO,navigator:Cp,origin:LO},Symbol.toStringTag,{value:"Module"})),...TO};function OO(t,e){return uu(t,new Cr.classes.URLSearchParams,{visitor:function(n,r,h,d){return Cr.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function IO(t){return $e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function NO(t){const e={},n=Object.keys(t);let r;const h=n.length;let d;for(r=0;r<h;r++)d=n[r],e[d]=t[d];return e}function Nb(t){function e(n,r,h,d){let f=n[d++];if(f==="__proto__")return!0;const w=Number.isFinite(+f),p=d>=n.length;return f=!f&&$e.isArray(h)?h.length:f,p?($e.hasOwnProp(h,f)?h[f]=[h[f],r]:h[f]=r,!w):((!h[f]||!$e.isObject(h[f]))&&(h[f]=[]),e(n,r,h[f],d)&&$e.isArray(h[f])&&(h[f]=NO(h[f])),!w)}if($e.isFormData(t)&&$e.isFunction(t.entries)){const n={};return $e.forEachEntry(t,(r,h)=>{e(IO(r),h,n,0)}),n}return null}function DO(t,e,n){if($e.isString(t))try{return(e||JSON.parse)(t),$e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Al={transitional:Ib,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",h=r.indexOf("application/json")>-1,d=$e.isObject(e);if(d&&$e.isHTMLForm(e)&&(e=new FormData(e)),$e.isFormData(e))return h?JSON.stringify(Nb(e)):e;if($e.isArrayBuffer(e)||$e.isBuffer(e)||$e.isStream(e)||$e.isFile(e)||$e.isBlob(e)||$e.isReadableStream(e))return e;if($e.isArrayBufferView(e))return e.buffer;if($e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let w;if(d){if(r.indexOf("application/x-www-form-urlencoded")>-1)return OO(e,this.formSerializer).toString();if((w=$e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return uu(w?{"files[]":e}:e,p&&new p,this.formSerializer)}}return d||h?(n.setContentType("application/json",!1),DO(e)):e}],transformResponse:[function(e){const n=this.transitional||Al.transitional,r=n&&n.forcedJSONParsing,h=this.responseType==="json";if($e.isResponse(e)||$e.isReadableStream(e))return e;if(e&&$e.isString(e)&&(r&&!this.responseType||h)){const f=!(n&&n.silentJSONParsing)&&h;try{return JSON.parse(e)}catch(w){if(f)throw w.name==="SyntaxError"?Ct.from(w,Ct.ERR_BAD_RESPONSE,this,null,this.response):w}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Cr.classes.FormData,Blob:Cr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$e.forEach(["delete","get","head","post","put","patch"],t=>{Al.headers[t]={}});const PO=$e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),FO=t=>{const e={};let n,r,h;return t&&t.split(`
|
1502
|
+
`).forEach(function(f){h=f.indexOf(":"),n=f.substring(0,h).trim().toLowerCase(),r=f.substring(h+1).trim(),!(!n||e[n]&&PO[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Db=Symbol("internals");function Tl(t){return t&&String(t).trim().toLowerCase()}function hu(t){return t===!1||t==null?t:$e.isArray(t)?t.map(hu):String(t)}function BO(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const jO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function $p(t,e,n,r,h){if($e.isFunction(r))return r.call(this,e,n);if(h&&(e=n),!!$e.isString(e)){if($e.isString(r))return e.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(e)}}function WO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function zO(t,e){const n=$e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(h,d,f){return this[r].call(this,e,h,d,f)},configurable:!0})})}let ei=class{constructor(e){e&&this.set(e)}set(e,n,r){const h=this;function d(w,p,g){const i=Tl(p);if(!i)throw new Error("header name must be a non-empty string");const a=$e.findKey(h,i);(!a||h[a]===void 0||g===!0||g===void 0&&h[a]!==!1)&&(h[a||p]=hu(w))}const f=(w,p)=>$e.forEach(w,(g,i)=>d(g,i,p));if($e.isPlainObject(e)||e instanceof this.constructor)f(e,n);else if($e.isString(e)&&(e=e.trim())&&!jO(e))f(FO(e),n);else if($e.isObject(e)&&$e.isIterable(e)){let w={},p,g;for(const i of e){if(!$e.isArray(i))throw TypeError("Object iterator must return a key-value pair");w[g=i[0]]=(p=w[g])?$e.isArray(p)?[...p,i[1]]:[p,i[1]]:i[1]}f(w,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Tl(e),e){const r=$e.findKey(this,e);if(r){const h=this[r];if(!n)return h;if(n===!0)return BO(h);if($e.isFunction(n))return n.call(this,h,r);if($e.isRegExp(n))return n.exec(h);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Tl(e),e){const r=$e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||$p(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let h=!1;function d(f){if(f=Tl(f),f){const w=$e.findKey(r,f);w&&(!n||$p(r,r[w],w,n))&&(delete r[w],h=!0)}}return $e.isArray(e)?e.forEach(d):d(e),h}clear(e){const n=Object.keys(this);let r=n.length,h=!1;for(;r--;){const d=n[r];(!e||$p(this,this[d],d,e,!0))&&(delete this[d],h=!0)}return h}normalize(e){const n=this,r={};return $e.forEach(this,(h,d)=>{const f=$e.findKey(r,d);if(f){n[f]=hu(h),delete n[d];return}const w=e?WO(d):String(d).trim();w!==d&&delete n[d],n[w]=hu(h),r[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return $e.forEach(this,(r,h)=>{r!=null&&r!==!1&&(n[h]=e&&$e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
1503
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(h=>r.set(h)),r}static accessor(e){const r=(this[Db]=this[Db]={accessors:{}}).accessors,h=this.prototype;function d(f){const w=Tl(f);r[w]||(zO(h,f),r[w]=!0)}return $e.isArray(e)?e.forEach(d):d(e),this}};ei.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$e.reduceDescriptors(ei.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),$e.freezeMethods(ei);function Mp(t,e){const n=this||Al,r=e||n,h=ei.from(r.headers);let d=r.data;return $e.forEach(t,function(w){d=w.call(n,d,h.normalize(),e?e.status:void 0)}),h.normalize(),d}function Pb(t){return!!(t&&t.__CANCEL__)}function Aa(t,e,n){Ct.call(this,t??"canceled",Ct.ERR_CANCELED,e,n),this.name="CanceledError"}$e.inherits(Aa,Ct,{__CANCEL__:!0});function Fb(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ct("Request failed with status code "+n.status,[Ct.ERR_BAD_REQUEST,Ct.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function HO(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function UO(t,e){t=t||10;const n=new Array(t),r=new Array(t);let h=0,d=0,f;return e=e!==void 0?e:1e3,function(p){const g=Date.now(),i=r[d];f||(f=g),n[h]=p,r[h]=g;let a=d,u=0;for(;a!==h;)u+=n[a++],a=a%t;if(h=(h+1)%t,h===d&&(d=(d+1)%t),g-f<e)return;const c=i&&g-i;return c?Math.round(u*1e3/c):void 0}}function qO(t,e){let n=0,r=1e3/e,h,d;const f=(g,i=Date.now())=>{n=i,h=null,d&&(clearTimeout(d),d=null),t(...g)};return[(...g)=>{const i=Date.now(),a=i-n;a>=r?f(g,i):(h=g,d||(d=setTimeout(()=>{d=null,f(h)},r-a)))},()=>h&&f(h)]}const du=(t,e,n=3)=>{let r=0;const h=UO(50,250);return qO(d=>{const f=d.loaded,w=d.lengthComputable?d.total:void 0,p=f-r,g=h(p),i=f<=w;r=f;const a={loaded:f,total:w,progress:w?f/w:void 0,bytes:p,rate:g||void 0,estimated:g&&w&&i?(w-f)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},Bb=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},jb=t=>(...e)=>$e.asap(()=>t(...e)),VO=Cr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Cr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Cr.origin),Cr.navigator&&/(msie|trident)/i.test(Cr.navigator.userAgent)):()=>!0,KO=Cr.hasStandardBrowserEnv?{write(t,e,n,r,h,d){const f=[t+"="+encodeURIComponent(e)];$e.isNumber(n)&&f.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&f.push("path="+r),$e.isString(h)&&f.push("domain="+h),d===!0&&f.push("secure"),document.cookie=f.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function GO(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function YO(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Wb(t,e,n){let r=!GO(e);return t&&(r||n==!1)?YO(t,e):e}const zb=t=>t instanceof ei?{...t}:t;function js(t,e){e=e||{};const n={};function r(g,i,a,u){return $e.isPlainObject(g)&&$e.isPlainObject(i)?$e.merge.call({caseless:u},g,i):$e.isPlainObject(i)?$e.merge({},i):$e.isArray(i)?i.slice():i}function h(g,i,a,u){if($e.isUndefined(i)){if(!$e.isUndefined(g))return r(void 0,g,a,u)}else return r(g,i,a,u)}function d(g,i){if(!$e.isUndefined(i))return r(void 0,i)}function f(g,i){if($e.isUndefined(i)){if(!$e.isUndefined(g))return r(void 0,g)}else return r(void 0,i)}function w(g,i,a){if(a in e)return r(g,i);if(a in t)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:w,headers:(g,i,a)=>h(zb(g),zb(i),a,!0)};return $e.forEach(Object.keys({...t,...e}),function(i){const a=p[i]||h,u=a(t[i],e[i],i);$e.isUndefined(u)&&a!==w||(n[i]=u)}),n}const Hb=t=>{const e=js({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:h,xsrfCookieName:d,headers:f,auth:w}=e;e.headers=f=ei.from(f),e.url=Lb(Wb(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&f.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let p;if($e.isFormData(n)){if(Cr.hasStandardBrowserEnv||Cr.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((p=f.getContentType())!==!1){const[g,...i]=p?p.split(";").map(a=>a.trim()).filter(Boolean):[];f.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Cr.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(e)),r||r!==!1&&VO(e.url))){const g=h&&d&&KO.read(d);g&&f.set(h,g)}return e},XO=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const h=Hb(t);let d=h.data;const f=ei.from(h.headers).normalize();let{responseType:w,onUploadProgress:p,onDownloadProgress:g}=h,i,a,u,c,o;function l(){c&&c(),o&&o(),h.cancelToken&&h.cancelToken.unsubscribe(i),h.signal&&h.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(h.method.toUpperCase(),h.url,!0),m.timeout=h.timeout;function b(){if(!m)return;const E=ei.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!w||w==="text"||w==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:E,config:t,request:m};Fb(function(R){n(R),l()},function(R){r(R),l()},k),m=null}"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(b)},m.onabort=function(){m&&(r(new Ct("Request aborted",Ct.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new Ct("Network Error",Ct.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let M=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded";const k=h.transitional||Ib;h.timeoutErrorMessage&&(M=h.timeoutErrorMessage),r(new Ct(M,k.clarifyTimeoutError?Ct.ETIMEDOUT:Ct.ECONNABORTED,t,m)),m=null},d===void 0&&f.setContentType(null),"setRequestHeader"in m&&$e.forEach(f.toJSON(),function(M,k){m.setRequestHeader(k,M)}),$e.isUndefined(h.withCredentials)||(m.withCredentials=!!h.withCredentials),w&&w!=="json"&&(m.responseType=h.responseType),g&&([u,o]=du(g,!0),m.addEventListener("progress",u)),p&&m.upload&&([a,c]=du(p),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(h.cancelToken||h.signal)&&(i=E=>{m&&(r(!E||E.type?new Aa(null,t,m):E),m.abort(),m=null)},h.cancelToken&&h.cancelToken.subscribe(i),h.signal&&(h.signal.aborted?i():h.signal.addEventListener("abort",i)));const S=HO(h.url);if(S&&Cr.protocols.indexOf(S)===-1){r(new Ct("Unsupported protocol "+S+":",Ct.ERR_BAD_REQUEST,t));return}m.send(d||null)})},QO=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,h;const d=function(g){if(!h){h=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Ct?i:new Aa(i instanceof Error?i.message:i))}};let f=e&&setTimeout(()=>{f=null,d(new Ct(`timeout ${e} of ms exceeded`,Ct.ETIMEDOUT))},e);const w=()=>{t&&(f&&clearTimeout(f),f=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>$e.asap(w),p}},ZO=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,h;for(;r<n;)h=r+e,yield t.slice(r,h),r=h},JO=async function*(t,e){for await(const n of e2(t))yield*ZO(n,e)},e2=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Ub=(t,e,n,r)=>{const h=JO(t,e);let d=0,f,w=p=>{f||(f=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:i}=await h.next();if(g){w(),p.close();return}let a=i.byteLength;if(n){let u=d+=a;n(u)}p.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(p){return w(p),h.return()}},{highWaterMark:2})},pu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",qb=pu&&typeof ReadableStream=="function",t2=pu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Vb=(t,...e)=>{try{return!!t(...e)}catch{return!1}},n2=qb&&Vb(()=>{let t=!1;const e=new Request(Cr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Kb=64*1024,Ap=qb&&Vb(()=>$e.isReadableStream(new Response("").body)),fu={stream:Ap&&(t=>t.body)};pu&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!fu[e]&&(fu[e]=$e.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Ct(`Response type '${e}' is not supported`,Ct.ERR_NOT_SUPPORT,r)})})})(new Response);const r2=async t=>{if(t==null)return 0;if($e.isBlob(t))return t.size;if($e.isSpecCompliantForm(t))return(await new Request(Cr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if($e.isArrayBufferView(t)||$e.isArrayBuffer(t))return t.byteLength;if($e.isURLSearchParams(t)&&(t=t+""),$e.isString(t))return(await t2(t)).byteLength},i2=async(t,e)=>{const n=$e.toFiniteNumber(t.getContentLength());return n??r2(e)},Tp={http:CO,xhr:XO,fetch:pu&&(async t=>{let{url:e,method:n,data:r,signal:h,cancelToken:d,timeout:f,onDownloadProgress:w,onUploadProgress:p,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:u}=Hb(t);g=g?(g+"").toLowerCase():"text";let c=QO([h,d&&d.toAbortSignal()],f),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(p&&n2&&n!=="get"&&n!=="head"&&(m=await i2(i,r))!==0){let k=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if($e.isFormData(r)&&(x=k.headers.get("content-type"))&&i.setContentType(x),k.body){const[R,I]=Bb(m,du(jb(p)));r=Ub(k.body,Kb,R,I)}}$e.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...u,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let S=await fetch(o,u);const E=Ap&&(g==="stream"||g==="response");if(Ap&&(w||E&&l)){const k={};["status","statusText","headers"].forEach(O=>{k[O]=S[O]});const x=$e.toFiniteNumber(S.headers.get("content-length")),[R,I]=w&&Bb(x,du(jb(w),!0))||[];S=new Response(Ub(S.body,Kb,R,()=>{I&&I(),l&&l()}),k)}g=g||"text";let M=await fu[$e.findKey(fu,g)||"text"](S,t);return!E&&l&&l(),await new Promise((k,x)=>{Fb(k,x,{data:M,headers:ei.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:o})})}catch(b){throw l&&l(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new Ct("Network Error",Ct.ERR_NETWORK,t,o),{cause:b.cause||b}):Ct.from(b,b&&b.code,t,o)}})};$e.forEach(Tp,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Gb=t=>`- ${t}`,o2=t=>$e.isFunction(t)||t===null||t===!1,Yb={getAdapter:t=>{t=$e.isArray(t)?t:[t];const{length:e}=t;let n,r;const h={};for(let d=0;d<e;d++){n=t[d];let f;if(r=n,!o2(n)&&(r=Tp[(f=String(n)).toLowerCase()],r===void 0))throw new Ct(`Unknown adapter '${f}'`);if(r)break;h[f||"#"+d]=r}if(!r){const d=Object.entries(h).map(([w,p])=>`adapter ${w} `+(p===!1?"is not supported by the environment":"is not available in the build"));let f=e?d.length>1?`since :
|
1504
|
+
`+d.map(Gb).join(`
|
1505
|
+
`):" "+Gb(d[0]):"as no adapter specified";throw new Ct("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return r},adapters:Tp};function Ep(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Aa(null,t)}function Xb(t){return Ep(t),t.headers=ei.from(t.headers),t.data=Mp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yb.getAdapter(t.adapter||Al.adapter)(t).then(function(r){return Ep(t),r.data=Mp.call(t,t.transformResponse,r),r.headers=ei.from(r.headers),r},function(r){return Pb(r)||(Ep(t),r&&r.response&&(r.response.data=Mp.call(t,t.transformResponse,r.response),r.response.headers=ei.from(r.response.headers))),Promise.reject(r)})}const Qb="1.11.0",gu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{gu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Zb={};gu.transitional=function(e,n,r){function h(d,f){return"[Axios v"+Qb+"] Transitional option '"+d+"'"+f+(r?". "+r:"")}return(d,f,w)=>{if(e===!1)throw new Ct(h(f," has been removed"+(n?" in "+n:"")),Ct.ERR_DEPRECATED);return n&&!Zb[f]&&(Zb[f]=!0,console.warn(h(f," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(d,f,w):!0}},gu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function s2(t,e,n){if(typeof t!="object")throw new Ct("options must be an object",Ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let h=r.length;for(;h-- >0;){const d=r[h],f=e[d];if(f){const w=t[d],p=w===void 0||f(w,d,t);if(p!==!0)throw new Ct("option "+d+" must be "+p,Ct.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ct("Unknown option "+d,Ct.ERR_BAD_OPTION)}}const mu={assertOptions:s2,validators:gu},po=mu.validators;let Ws=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ob,response:new Ob}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let h={};Error.captureStackTrace?Error.captureStackTrace(h):h=new Error;const d=h.stack?h.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
1506
|
+
`+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=js(this.defaults,n);const{transitional:r,paramsSerializer:h,headers:d}=n;r!==void 0&&mu.assertOptions(r,{silentJSONParsing:po.transitional(po.boolean),forcedJSONParsing:po.transitional(po.boolean),clarifyTimeoutError:po.transitional(po.boolean)},!1),h!=null&&($e.isFunction(h)?n.paramsSerializer={serialize:h}:mu.assertOptions(h,{encode:po.function,serialize:po.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),mu.assertOptions(n,{baseUrl:po.spelling("baseURL"),withXsrfToken:po.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let f=d&&$e.merge(d.common,d[n.method]);d&&$e.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=ei.concat(f,d);const w=[];let p=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(p=p&&l.synchronous,w.unshift(l.fulfilled,l.rejected))});const g=[];this.interceptors.response.forEach(function(l){g.push(l.fulfilled,l.rejected)});let i,a=0,u;if(!p){const o=[Xb.bind(this),void 0];for(o.unshift(...w),o.push(...g),u=o.length,i=Promise.resolve(n);a<u;)i=i.then(o[a++],o[a++]);return i}u=w.length;let c=n;for(a=0;a<u;){const o=w[a++],l=w[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=Xb.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,u=g.length;a<u;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=js(this.defaults,e);const n=Wb(e.baseURL,e.url,e.allowAbsoluteUrls);return Lb(n,e.params,e.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(n,r){return this.request(js(r||{},{method:e,url:n,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(e){function n(r){return function(d,f,w){return this.request(js(w||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:f}))}}Ws.prototype[e]=n(),Ws.prototype[e+"Form"]=n(!0)});let a2=class Vx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(d){n=d});const r=this;this.promise.then(h=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](h);r._listeners=null}),this.promise.then=h=>{let d;const f=new Promise(w=>{r.subscribe(w),d=w}).then(h);return f.cancel=function(){r.unsubscribe(d)},f},e(function(d,f,w){r.reason||(r.reason=new Aa(d,f,w),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Vx(function(h){e=h}),cancel:e}}};function l2(t){return function(n){return t.apply(null,n)}}function c2(t){return $e.isObject(t)&&t.isAxiosError===!0}const Rp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rp).forEach(([t,e])=>{Rp[e]=t});function Jb(t){const e=new Ws(t),n=yb(Ws.prototype.request,e);return $e.extend(n,Ws.prototype,e,{allOwnKeys:!0}),$e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(h){return Jb(js(t,h))},n}const Fn=Jb(Al);Fn.Axios=Ws,Fn.CanceledError=Aa,Fn.CancelToken=a2,Fn.isCancel=Pb,Fn.VERSION=Qb,Fn.toFormData=uu,Fn.AxiosError=Ct,Fn.Cancel=Fn.CanceledError,Fn.all=function(e){return Promise.all(e)},Fn.spread=l2,Fn.isAxiosError=c2,Fn.mergeConfig=js,Fn.AxiosHeaders=ei,Fn.formToJSON=t=>Nb($e.isHTMLForm(t)?new FormData(t):t),Fn.getAdapter=Yb.getAdapter,Fn.HttpStatusCode=Rp,Fn.default=Fn;const{Axios:Ij,AxiosError:Nj,CanceledError:Dj,isCancel:Pj,CancelToken:Fj,VERSION:Bj,all:jj,Cancel:Wj,isAxiosError:zj,spread:Hj,toFormData:Uj,AxiosHeaders:qj,HttpStatusCode:Vj,formToJSON:Kj,getAdapter:Gj,mergeConfig:Yj}=Fn,u2={components:{TopBar:wT,OutputDialog:gT},data(){return{title:"Bucket Explorer",search:"",root:"",mode:"bucket",buckets:[],volumes:[],uploadPathDialog:!1,optionsDialog:!1,refreshInterval:60,updater:null,updating:!1,path:"",file:null,files:[],showDialog:!1,dialogName:"",dialogContent:"",dialogFilename:"",sortBy:[{key:"modified",order:"desc"}],headers:[{title:"Name",value:"name",sortable:!0,nowrap:!0},{title:"Size",value:"size",sortable:!0},{title:"ModifiedDate",value:"modified",sortable:!0},{title:"Action",value:"action",align:"end",nowrap:!0}],menus:[{label:"File",items:[{label:"Options",icon:"mdi-cog",command:()=>{this.optionsDialog=!0}}]}]}},computed:{folderTotal(){return Zu(this.files.reduce((t,e)=>t+(e.size?e.size:0),0))},breadcrumbPath(){const t=this.path.split("/");return t.map((e,n)=>({name:e,path:t.slice(0,n+1).join("/")+"/"}))}},watch:{file:async function(){this.file!==null&&(this.uploadFilePath=`${this.path}${this.file.name}`,this.uploadPathDialog=!0)},refreshInterval(){this.changeUpdater()}},created(){var t;if(xs.get("/openc3-api/storage/buckets").then(e=>{this.buckets=e.data}),xs.get("/openc3-api/storage/volumes").then(e=>{this.volumes=e.data}),(t=this.$route.params.path)!=null&&t.length){this.updating=!0;let e=this.$route.params.path[0].split("/");e[0]===""?(this.mode="volume",this.root=`/${e[1]}`,this.path=e.slice(2).join("/")):(this.mode="bucket",this.root=e[0],this.path=e.slice(1).join("/")),this.updateFiles()}this.changeUpdater()},beforeUnmount(){this.clearUpdater()},methods:{isText(t){if(["Rakefile","Dockerfile"].includes(t))return!0;let e=t.split(".").pop();return["txt","md","rb","py","pyi","cfg","html","js","json","info","vue","sh","bat","csv"].includes(e)},gotoPath(t){this.updating||(this.updating=!0,this.path=t,this.update())},update(){this.updating=!0,this.$router.push({name:"Bucket Explorer",params:{path:`${this.root}/${this.path}`}}),this.updateFiles()},changeUpdater(){this.clearUpdater(),this.updater=setInterval(()=>{this.root&&this.updateFiles()},this.refreshInterval*1e3)},clearUpdater(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},selectBucket(t){this.updating||(this.updating=!0,this.mode="bucket",this.root=t,this.path="",this.update())},selectVolume(t){this.updating||(this.updating=!0,this.mode="volume",this.root=t,this.path="",this.update())},backArrow(){if(this.path!==""&&!this.updating){this.updating=!0;let t=this.path.split("/");this.path=t.slice(0,t.length-2).join("/"),t.length>2&&(this.path+="/"),this.update()}},fileClick(t,{item:e}){e.icon==="mdi-folder"&&(this.updating||(this.updating=!0,this.root===""?this.root=e.name:this.path+=`${e.name}/`,this.update()))},viewFile(t){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),xs.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(n=>{this.dialogName=t,this.dialogFilename=t,this.dialogContent=window.atob(n.data.contents),this.showDialog=!0})},downloadFile(t){let e=this.root.toUpperCase(),n="download";this.mode==="volume"&&(n="download_file",e=e.slice(1)),xs.get(`/openc3-api/storage/${n}/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(r=>{let h=null;if(this.mode==="bucket")h=r.data.url;else{const f=window.atob(r.data.contents),w=new Uint8Array(f.length);for(let g=0;g<f.length;++g)w[g]=f.charCodeAt(g);const p=new Blob([w]);h=URL.createObjectURL(p)}const d=document.createElement("a");d.href=h,d.setAttribute("download",t),d.click()}).catch(r=>{this.$notify.caution({title:`Unable to download file ${this.path}${t} from bucket ${this.root}`})})},async uploadFile(){this.uploadPathDialog=!1,this.uploadFilePath.startsWith("/")&&(this.uploadFilePath=this.uploadFilePath.slice(1));const{data:t}=await xs.get(`/openc3-api/storage/upload/${encodeURIComponent(this.uploadFilePath)}?bucket=OPENC3_${this.root.toUpperCase()}_BUCKET`);await Fn({...t,data:this.file}),this.file=null;let e=this.uploadFilePath.split("/");e.length>1?this.path=e.slice(0,-1).join("/")+"/":this.path="",this.updateFiles()},deleteFile(t){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),this.$dialog.confirm(`Are you sure you want to delete: ${t}`,{okText:"Delete",cancelText:"Cancel"}).then(n=>xs.delete(`/openc3-api/storage/delete/${encodeURIComponent(this.path)}${t}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`)).then(n=>{this.updateFiles()}).catch(n=>{})},updateFiles(){let t=this.root.toUpperCase();this.mode==="volume"&&(t=t.slice(1)),xs.get(`/openc3-api/storage/files/OPENC3_${t}_${this.mode.toUpperCase()}/${this.path}`).then(e=>{this.files=e.data[0].map(n=>({name:n,icon:"mdi-folder"})),this.files=this.files.concat(e.data[1].map(n=>({name:n.name,icon:"mdi-file",size:n.size,modified:n.modified}))),this.updating=!1}).catch(({response:e})=>{var n;this.files=[],(n=e.data)!=null&&n.message?this.$notify.caution({title:e.data.message}):this.$notify.caution({title:e.message}),this.updating=!1})},formatBytesToString:Zu}},h2={style:{"padding-left":"5px","padding-top":"5px"}},d2={key:0,style:{"padding-left":"5px"}},p2={class:".text-body-1 ma-2 font-size","data-test":"file-path"},f2=["onClick"],g2={class:"ma-2 font-size"},m2={key:0,class:"ma-2",style:{display:"flex"}},y2={class:"mx-1"},v2={class:"pa-3"};function w2(t,e,n,r,h,d){const f=It("top-bar"),w=It("v-icon"),p=It("v-avatar"),g=It("v-chip"),i=It("v-spacer"),a=It("v-text-field"),u=It("v-card-title"),c=It("v-btn"),o=It("v-file-input"),l=It("v-row"),m=It("v-data-table"),b=It("v-card"),S=It("v-toolbar"),E=It("v-card-text"),M=It("v-dialog"),k=It("output-dialog");return zt(),Vr("div",null,[tt(f,{title:h.title,menus:h.menus},null,8,["title","menus"]),tt(b,{width:"100%"},{default:et(()=>[cr("div",h2,[e[12]||(e[12]=cr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(zt(!0),Vr(ko,null,Ko(h.buckets,(x,R)=>(zt(),qn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(I=>d.selectBucket(x),["stop"])},{default:et(()=>[tt(p,{start:""},{default:et(()=>[tt(w,null,{default:et(()=>[...e[11]||(e[11]=[Vn("mdi-bucket",-1)])]),_:1})]),_:1}),Vn(" "+Ir(x),1)]),_:2},1032,["onClick"]))),128))]),h.volumes.length!==0?(zt(),Vr("div",d2,[e[14]||(e[14]=cr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(zt(!0),Vr(ko,null,Ko(h.volumes,(x,R)=>(zt(),qn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(I=>d.selectVolume(x),["stop"])},{default:et(()=>[tt(p,{start:""},{default:et(()=>[tt(w,null,{default:et(()=>[...e[13]||(e[13]=[Vn("mdi-folder",-1)])]),_:1})]),_:1}),Vn(" "+Ir(x),1)]),_:2},1032,["onClick"]))),128))])):oo("",!0),tt(u,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:et(()=>[Vn(Ir(h.root)+" Files ",1),tt(i),tt(a,{modelValue:h.search,"onUpdate:modelValue":e[0]||(e[0]=x=>h.search=x),label:"Search","prepend-inner-icon":"mdi-magnify",clearable:"",variant:"outlined",density:"compact","single-line":"","hide-details":"",class:"search","data-test":"search-input"},null,8,["modelValue"])]),_:1}),tt(m,{"sort-by":h.sortBy,"onUpdate:sortBy":e[2]||(e[2]=x=>h.sortBy=x),headers:h.headers,items:h.files,search:h.search,"items-per-page":-1,"items-per-page-options":[10,20,50,100,-1],"multi-sort":"",density:"compact",hover:"","onClick:row":ys(d.fileClick,["stop"])},{top:et(()=>[tt(l,{class:"ma-0",style:{"background-color":"var(--color-background-surface-header)"}},{default:et(()=>[tt(c,{icon:"mdi-chevron-left-box-outline",variant:"text",density:"compact",class:"ml-3 mt-1","data-test":"be-nav-back","aria-label":"Navigate Back",onClick:ys(d.backArrow,["stop"])},null,8,["onClick"]),cr("div",p2,[(zt(!0),Vr(ko,null,Ko(d.breadcrumbPath,(x,R)=>(zt(),Vr("span",{key:R},[e[15]||(e[15]=Vn(" / ",-1)),cr("a",{style:{cursor:"pointer"},onClick:ys(I=>d.gotoPath(x.path),["prevent"])},Ir(x.name),9,f2)]))),128))]),tt(i),cr("div",g2,[Vn(" Folder Size: "+Ir(d.folderTotal)+" ",1),e[16]||(e[16]=cr("span",{class:"small-font-size"},"(not recursive)",-1))]),tt(i),h.mode==="bucket"?(zt(),Vr("div",m2,[e[17]||(e[17]=cr("span",{class:"font-size"},"Upload File",-1)),tt(o,{modelValue:h.file,"onUpdate:modelValue":e[1]||(e[1]=x=>h.file=x),"hide-input":"","hide-details":"",class:"mr-1 file-input","prepend-icon":"mdi-upload","data-test":"upload-file"},null,8,["modelValue"])])):oo("",!0)]),_:1})]),"item.name":et(({item:x})=>[tt(w,{class:"mr-2"},{default:et(()=>[Vn(Ir(x.icon),1)]),_:2},1024),Vn(" "+Ir(x.name),1)]),"item.size":et(({item:x})=>[Vn(Ir(x.size?d.formatBytesToString(x.size):""),1)]),"item.action":et(({item:x})=>[x.icon==="mdi-file"&&d.isText(x.name)?(zt(),qn(c,{key:0,icon:"mdi-eye",variant:"text",density:"compact",class:"mr-3","data-test":"view-file","aria-label":"View File",onClick:R=>d.viewFile(x.name)},null,8,["onClick"])):oo("",!0),x.icon==="mdi-file"?(zt(),qn(c,{key:1,icon:"mdi-download-box",variant:"text",density:"compact",class:"mr-3","data-test":"download-file","aria-label":"Download File",onClick:R=>d.downloadFile(x.name)},null,8,["onClick"])):oo("",!0),x.icon==="mdi-file"?(zt(),qn(c,{key:2,icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-file","aria-label":"Delete File",onClick:R=>d.deleteFile(x.name)},null,8,["onClick"])):oo("",!0)]),_:1},8,["sort-by","headers","items","search","onClick:row"])]),_:1}),tt(M,{modelValue:h.uploadPathDialog,"onUpdate:modelValue":e[5]||(e[5]=x=>h.uploadPathDialog=x),"max-width":"600"},{default:et(()=>[tt(b,null,{default:et(()=>[tt(S,{height:"24"},{default:et(()=>[tt(i),e[18]||(e[18]=cr("span",null," Upload Path ",-1)),tt(i)]),_:1}),tt(E,null,{default:et(()=>[cr("div",y2,[tt(l,{class:"my-2"},{default:et(()=>[...e[19]||(e[19]=[cr("span",null," This file path can be modified. New directories will be automatically created. ",-1)])]),_:1}),tt(l,null,{default:et(()=>[tt(a,{modelValue:t.uploadFilePath,"onUpdate:modelValue":e[3]||(e[3]=x=>t.uploadFilePath=x),"hide-details":"",label:"File Path","data-test":"upload-file-path"},null,8,["modelValue"])]),_:1}),tt(l,{class:"mt-6"},{default:et(()=>[tt(i),tt(c,{variant:"outlined",class:"mx-2","data-test":"upload-file-cancel-btn",onClick:e[4]||(e[4]=x=>h.uploadPathDialog=!1)},{default:et(()=>[...e[20]||(e[20]=[Vn(" Cancel ",-1)])]),_:1}),tt(c,{class:"mx-2",color:"primary",type:"submit","data-test":"upload-file-submit-btn",onClick:ys(d.uploadFile,["prevent"])},{default:et(()=>[...e[21]||(e[21]=[Vn(" Upload ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),tt(M,{modelValue:h.optionsDialog,"onUpdate:modelValue":e[7]||(e[7]=x=>h.optionsDialog=x),"max-width":"300",onKeydown:e[8]||(e[8]=Tf(x=>h.optionsDialog=!1,["esc"]))},{default:et(()=>[tt(b,null,{default:et(()=>[tt(S,{height:"24"},{default:et(()=>[tt(i),e[22]||(e[22]=cr("span",null,"Options",-1)),tt(i)]),_:1}),tt(E,null,{default:et(()=>[cr("div",v2,[tt(a,{modelValue:h.refreshInterval,"onUpdate:modelValue":e[6]||(e[6]=x=>h.refreshInterval=x),min:"1",max:"3600",step:"100",type:"number",label:"Refresh Interval (s)","data-test":"refresh-interval"},null,8,["modelValue"])])]),_:1})]),_:1})]),_:1},8,["modelValue"]),h.showDialog?(zt(),qn(k,{key:0,modelValue:h.showDialog,"onUpdate:modelValue":e[9]||(e[9]=x=>h.showDialog=x),type:"File",content:h.dialogContent,name:h.dialogName,filename:h.dialogFilename,onSubmit:e[10]||(e[10]=x=>h.showDialog=!1)},null,8,["modelValue","content","name","filename"])):oo("",!0)])}Fi("B",Object.freeze(Object.defineProperty({__proto__:null,default:$f(u2,[["render",w2],["__scopeId","data-v-c0c99680"]])},Symbol.toStringTag,{value:"Module"})))})}}));
|