openc3-cosmos-tool-bucketexplorer 6.6.0 → 6.7.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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/tools/bucketexplorer/{ArrayWidget-Ck6pzAyW-248c868dafa81b4771a3.js → ArrayWidget-BSG8KEtf-625e298b76ab5a393561.js} +2 -2
  3. data/tools/bucketexplorer/ArrayplotWidget-WVu76Kqn-3b08fd32eb23dde3112e.js +1 -0
  4. data/tools/bucketexplorer/{BarColumn-Bgz2YJ59-158d2ff2aba1195f6e35.js → BarColumn-Cflh9pUz-43934f33a835e829be2f.js} +1 -1
  5. data/tools/bucketexplorer/{BlockWidget-DGH3Zz5p-f928de15696285952cc6.js → BlockWidget-B7ryWGCq-9d40634097b25adf42e1.js} +2 -2
  6. data/tools/bucketexplorer/BucketExplorer-10deec82177fc719fd74.js +1506 -0
  7. data/tools/bucketexplorer/{ButtonWidget-D_tupiPB-491c342ab9d236879940.js → ButtonWidget-BKih3ix9-a5442c244a53b1952c50.js} +2 -2
  8. data/tools/bucketexplorer/{CanvasWidget-CzG2jYQb-75d42817d89e4a627bc2.js → CanvasWidget-DT9xMSfb-300c54f7e5c6f3f07b25.js} +1 -1
  9. data/tools/bucketexplorer/CanvasdotWidget-7H5Hvcn--c3618cb51458194d0d6f.js +1 -0
  10. data/tools/bucketexplorer/{CanvasimageWidget-CNJlzLqo-6363392e532f208b6040.js → CanvasimageWidget-BbWYx6Gj-43a99e46bb8b7ca6284f.js} +1 -1
  11. data/tools/bucketexplorer/{CanvasimagevalueWidget-DudwwOD6-60c8e96fd2423e57b4f7.js → CanvasimagevalueWidget-Blvoe2X4-7cff2c4b41ca2f97b5d1.js} +1 -1
  12. data/tools/bucketexplorer/CanvaslabelWidget-BPx_Rm4o-73f7d4f33556706e4aaa.js +1 -0
  13. data/tools/bucketexplorer/{CanvaslabelvalueWidget-CHS36Te9-6b4e4f79db23fc5209ad.js → CanvaslabelvalueWidget-DzdWvL0W-565b2993a3a636c78083.js} +1 -1
  14. data/tools/bucketexplorer/CanvaslineWidget-CqskilGk-5d3500584f9f36f70bab.js +1 -0
  15. data/tools/bucketexplorer/{CanvaslinevalueWidget-DsyIDkJy-599d9c7fbef7b8e6cc7e.js → CanvaslinevalueWidget-C0JIKdvZ-d0374f7c7a981b09ff0b.js} +1 -1
  16. data/tools/bucketexplorer/{CheckbuttonWidget-DCam7Jd0-d2b768c497f938efa928.js → CheckbuttonWidget-C9FbJx2v-34dfd9c16c465fa40436.js} +1 -1
  17. data/tools/bucketexplorer/ComboboxWidget-BbNKT0s8-945ef2250c8eb563d3f7.js +1 -0
  18. data/tools/bucketexplorer/DateWidget-CBMsdRUE-7580447a212be724388a.js +1 -0
  19. data/tools/bucketexplorer/DetailsDialog-DRVahE5z-846de0dbdc0f590429e7.js +1 -0
  20. data/tools/bucketexplorer/{DynamicWidget-CfMtj7H8-8427a75b34ada8b43cd7.js → DynamicWidget-CfMtj7H8-15ce5daec63461ef1c69.js} +1 -1
  21. data/tools/bucketexplorer/{FormatvalueWidget-DYICPNcx-9e9050d5d6bfe40ae2ac.js → FormatvalueWidget-BLWsqhIZ-87c7ee6ef666607dfd71.js} +1 -1
  22. data/tools/bucketexplorer/Graph-BiU56Qj2-db0074827e9f66a75459.js +1 -0
  23. data/tools/bucketexplorer/GraphWidget-Ga0AEfrJ-7b8cebe1200c61c83a17.js +1 -0
  24. data/tools/bucketexplorer/HorizontalWidget-CsVhLwZO-edf26d27dc73f37bee3b.js +1 -0
  25. data/tools/bucketexplorer/HorizontalboxWidget-xC6PADl3-f5f50842985dc51cea77.js +1 -0
  26. data/tools/bucketexplorer/{HorizontallineWidget-DEODVJCk-f359db5fac63cdba8670.js → HorizontallineWidget-NZIxmRVN-cd05834d5d286ccae2e8.js} +1 -1
  27. data/tools/bucketexplorer/{IframeWidget-n8lNXrpt-25beb324d7c94fcb2587.js → IframeWidget-BgzjSfag-1c6b3db4fc4097fe66db.js} +1 -1
  28. data/tools/bucketexplorer/{ImageLoader-CfcErydq-b34075b82a3ca52e6cb4.js → ImageLoader-DbFVK1Ui-34d544c5cad02f48acad.js} +1 -1
  29. data/tools/bucketexplorer/ImageviewerWidget-BnT5m-nw-f051ad1e725bcdcc4aa6.js +1 -0
  30. data/tools/bucketexplorer/{LabelWidget-iUIJLhdA-31a53ff04c781779b7dd.js → LabelWidget-DSDYmz6X-4cfd026fc6fb355f4009.js} +1 -1
  31. data/tools/bucketexplorer/LabelledWidget-DMb-myxs-44b1113de24dbb0be12b.js +1 -0
  32. data/tools/bucketexplorer/{LabelprogressbarWidget-C2lzmqBH-dd6b995f8ae6c670062a.js → LabelprogressbarWidget-CkjDJBao-12681d2e81f95ba3f9c6.js} +1 -1
  33. data/tools/bucketexplorer/{LabelsparklineWidget-Ci6GGm29-cddcaaaf6038f1f6a069.js → LabelsparklineWidget-DBYPFz3Y-8400ce2949167c445fc8.js} +1 -1
  34. data/tools/bucketexplorer/LabelvalueWidget-DlTkJC4i-fa385cba56df8d367001.js +1 -0
  35. data/tools/bucketexplorer/{LabelvaluedescWidget-Ck0AJ9g0-b23e94daacc2094d2c6b.js → LabelvaluedescWidget-dRqnGZub-be793c6b242f459781c5.js} +1 -1
  36. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-CS4NAPJ1-77001f867d0d4ba168f3.js +1 -0
  37. data/tools/bucketexplorer/{LabelvaluelimitscolumnWidget-Uur6aqOg-bf5fd048ead1265047e7.js → LabelvaluelimitscolumnWidget-D9x4Ppv8-2fff2e51510e538ef92b.js} +1 -1
  38. data/tools/bucketexplorer/LabelvaluerangebarWidget-Dhyng4-n-b7bf680a389925234568.js +1 -0
  39. data/tools/bucketexplorer/{Layout-1z8iJV5--e2149a421f5f94cf2ab1.js → Layout-mWR35VAD-e33625a3d8ff6ce94c97.js} +1 -1
  40. data/tools/bucketexplorer/LedWidget-D8cq4pUv-b75079f3005e09a45a7f.js +1 -0
  41. data/tools/bucketexplorer/{LimitsbarWidget-BxxoKTjp-d5e39f0a3e3c8f007c8a.js → LimitsbarWidget-VGJnDuVM-60a42afd635786e20b4e.js} +1 -1
  42. data/tools/bucketexplorer/{LimitscolorWidget-DFDwf4In-b428434ede1d27ec4e85.js → LimitscolorWidget-CG6Pqi12-5258d28d0611c02f074d.js} +1 -1
  43. data/tools/bucketexplorer/{LimitscolumnWidget-CdBh2mJu-3f9df3a2736bdf91a181.js → LimitscolumnWidget-DjovQdiT-ec4c95521601c9ec47e7.js} +1 -1
  44. data/tools/bucketexplorer/LinegraphWidget-DSWAhXgZ-d797fdf756af69c64f53.js +1 -0
  45. data/tools/bucketexplorer/MatrixbycolumnsWidget-C3cuhRxz-dd2bee0ea6b2072f2775.js +1 -0
  46. data/tools/bucketexplorer/{ProgressbarWidget-Cdu5nJC3-23275a043cd333b54152.js → ProgressbarWidget-oCgAEFBO-79e56fb819db5f3a7534.js} +1 -1
  47. data/tools/bucketexplorer/RadiobuttonWidget-D4Dak3lc-42694b030a2a182184b9.js +1 -0
  48. data/tools/bucketexplorer/RadiogroupWidget-Dbe9T4fp-2139af3c3e4eb1f18244.js +1 -0
  49. data/tools/bucketexplorer/{RangebarWidget-dZN9WjoZ-b5480e12a25f605b5c4b.js → RangebarWidget-CIVrgqrW-f577bef2396ed802dff1.js} +1 -1
  50. data/tools/bucketexplorer/{RollupWidget-i9DnNJl6-709fe0ecaaa86f58ead2.js → RollupWidget-CH1-XNLV-b1e85a107dfcad6a1309.js} +1 -1
  51. data/tools/bucketexplorer/ScrollwindowWidget-BwFG6Wn8-a49de26a6ae5796f2c34.js +1 -0
  52. data/tools/bucketexplorer/{SignalWidget-B_kA9eCJ-5216f78da1ea6a7e129a.js → SignalWidget-Gz2gHrUm-28f5b06a6cfbdbf4441e.js} +1 -1
  53. data/tools/bucketexplorer/{SpacerWidget-XoMPHak8-945a5e140370e15d839f.js → SpacerWidget-Bg7VDB0k-4fdc6d1a58a866a2d5fc.js} +1 -1
  54. data/tools/bucketexplorer/{SparklineWidget-DQNsvEj9-5fd4b63fc301802d3711.js → SparklineWidget-D_b5rfJv-7e34d3ea6146846384bc.js} +1 -1
  55. data/tools/bucketexplorer/{TabbookWidget-_HVA72t5-d44283b14e4553c272d3.js → TabbookWidget-C30f9B6z-81df828957d13db6a3dc.js} +1 -1
  56. data/tools/bucketexplorer/TextboxWidget-CDqxsgys-c36cc30d99b99d89dd54.js +1 -0
  57. data/tools/bucketexplorer/TextfieldWidget-CAyjKJs6-4763a5783ac6676b261d.js +1 -0
  58. data/tools/bucketexplorer/{TimeWidget-C67uwMGH-48d02c03a45270d9f994.js → TimeWidget-BQsP0G2X-6874c2688011d1ad4ee4.js} +1 -1
  59. data/tools/bucketexplorer/{TitleWidget-t_YLgUMB-0be28905410f921687d1.js → TitleWidget-DXVba53S-eb6bf3561921d8585524.js} +1 -1
  60. data/tools/bucketexplorer/{VWidget-j2GIGGSX-4dee999bd181ee784af4.js → VWidget-CFTCukCL-7b2d9a6ba2b32c75d914.js} +1 -1
  61. data/tools/bucketexplorer/ValueWidget-B-TWLPdM-8a1ed563df428d950123.js +1 -0
  62. data/tools/bucketexplorer/ValuelimitsbarWidget-jsDXdPdC-36c47ebec784602888fe.js +1 -0
  63. data/tools/bucketexplorer/{ValuelimitscolumnWidget-HR1TNHwQ-acb0a1165f6004748cff.js → ValuelimitscolumnWidget-I-uwnXM2-eb33c6a7fc61e076cc83.js} +1 -1
  64. data/tools/bucketexplorer/{ValuerangebarWidget-DnZrho8S-a488c07d5bb3870d3e6a.js → ValuerangebarWidget-OyhSTScu-ecc2fd62fd691ed72402.js} +1 -1
  65. data/tools/bucketexplorer/VerticalWidget-CkFbX1Gq-eb15cf848e39c878b000.js +1 -0
  66. data/tools/bucketexplorer/VerticalboxWidget-FEQgPM9r-7516a8162755c0e4bd0b.js +1 -0
  67. data/tools/bucketexplorer/{Widget-Bn_S-zBo-f98bfe1e65b14d185a6d.js → Widget-C3-TBgP7-cf329d32355627404906.js} +1 -1
  68. data/tools/bucketexplorer/main-f3848f445156b037aa79.js +8 -0
  69. data/tools/bucketexplorer/main.js +1 -1
  70. metadata +69 -69
  71. data/tools/bucketexplorer/ArrayplotWidget-ntRLh6-B-ce89330ee04833dc8b9c.js +0 -1
  72. data/tools/bucketexplorer/BucketExplorer-4e6950ca8f998237d2da.js +0 -1505
  73. data/tools/bucketexplorer/CanvasdotWidget-0FAaw4G2-9d5d94c492cf26e6cfcd.js +0 -1
  74. data/tools/bucketexplorer/CanvaslabelWidget-BZQp16dH-73c941b54c1fa9050433.js +0 -1
  75. data/tools/bucketexplorer/CanvaslineWidget-nhKEAGhs-8a69d1b2234d8cf221ac.js +0 -1
  76. data/tools/bucketexplorer/ComboboxWidget-ZX-k-_aK-d7e4f2c1a1a4f14cb067.js +0 -1
  77. data/tools/bucketexplorer/DateWidget-DuJ5uC2t-689ae8489194fd5a23eb.js +0 -1
  78. data/tools/bucketexplorer/DetailsDialog-BQE0TraI-6c3e51b00d8cd8220f20.js +0 -1
  79. data/tools/bucketexplorer/Graph-DCihpnT0-d8ec98a052f33e209631.js +0 -1
  80. data/tools/bucketexplorer/GraphWidget-cTVq29cY-e7df9a189a1a87602faf.js +0 -1
  81. data/tools/bucketexplorer/HorizontalWidget-v1pfd94Z-e2fcd38de2aee0d7e705.js +0 -1
  82. data/tools/bucketexplorer/HorizontalboxWidget-B06-c_n4-1ccee4d45000db461f97.js +0 -1
  83. data/tools/bucketexplorer/ImageviewerWidget-DE8fj06Z-c597f57f8771f2a316f3.js +0 -1
  84. data/tools/bucketexplorer/LabelledWidget-KI6fMlsr-89015a7708d97367a699.js +0 -1
  85. data/tools/bucketexplorer/LabelvalueWidget-oiW-JDw6-71c580546745185a134a.js +0 -1
  86. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-aaVLaejn-5618332877b352aae488.js +0 -1
  87. data/tools/bucketexplorer/LabelvaluerangebarWidget-Bs9locqu-7e8a41e0a5cb676e9725.js +0 -1
  88. data/tools/bucketexplorer/LedWidget-BN8IgAxJ-72070d388f1f98d34aed.js +0 -1
  89. data/tools/bucketexplorer/LinegraphWidget-jXksfbPb-2532e808b50c6d20b2b5.js +0 -1
  90. data/tools/bucketexplorer/MatrixbycolumnsWidget-DCwxPjwS-997e5f2c7bfa58d5735d.js +0 -1
  91. data/tools/bucketexplorer/RadiobuttonWidget-CZZGbvdG-3f88dffdb407e7058527.js +0 -1
  92. data/tools/bucketexplorer/RadiogroupWidget-CQN3v8Ip-9ff3dd0e0e9318097e0d.js +0 -1
  93. data/tools/bucketexplorer/ScrollwindowWidget-54GU96Ve-f88cb05ec99e8258eb71.js +0 -1
  94. data/tools/bucketexplorer/TextboxWidget-0JXn4bMH-fb960f5997bec13f12ef.js +0 -1
  95. data/tools/bucketexplorer/TextfieldWidget-BXr9MkVW-b49ae39fbad61d8f5216.js +0 -1
  96. data/tools/bucketexplorer/ValueWidget-3jNtnh5i-810c3eee894ee83c85d3.js +0 -1
  97. data/tools/bucketexplorer/ValuelimitsbarWidget-JSceOzGS-06b9243d5d7eff116ffb.js +0 -1
  98. data/tools/bucketexplorer/VerticalWidget-DJvoxqLE-72131832452e09d61990.js +0 -1
  99. data/tools/bucketexplorer/VerticalboxWidget-CYYyLBoO-2b31707b9f1cb7d47bd0.js +0 -1
  100. data/tools/bucketexplorer/main-758334bf1197ec2fdd55.js +0 -8
@@ -0,0 +1,1506 @@
1
+ System.register(["./main-f3848f445156b037aa79.js","vue","single-spa"],function(Fi,at){"use strict";var ot,Qu,Sf,$f,It,Vn,zt,et,tt,cr,Ir,qn,Mf,qr,_o,Ko,Zu,Ju,oo,eh,ys,Ef;return{setters:[un=>{ot=un._,Qu=un.d,Sf=un.a},un=>{$f=un.defineAsyncComponent,It=un.resolveComponent,Vn=un.createBlock,zt=un.openBlock,et=un.withCtx,tt=un.createVNode,cr=un.createElementVNode,Ir=un.toDisplayString,qn=un.createTextVNode,Mf=un.Teleport,qr=un.createElementBlock,_o=un.Fragment,Ko=un.renderList,Zu=un.mergeProps,Ju=un.createSlots,oo=un.createCommentVNode,eh=un.normalizeStyle,ys=un.withModifiers,Ef=un.withKeys},null],execute:function(){var un=document.createElement("style");un.textContent=`.font-size[data-v-5d442166]{font-size:1rem}.small-font-size[data-v-5d442166]{font-size:.8rem}.file-input[data-v-5d442166]{padding-top:0;margin-top:0}
2
+ /*$vite$:1*/`,document.head.appendChild(un),Fi({$:wg,c:NL,f:_r,l:yn,y:Kn,z:mp});var Ux=Object.defineProperty,Vx=(t,e,n)=>e in t?Ux(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Af=(t,e,n)=>Vx(t,e+"",n);function Tf(t,e){return function(){return t.apply(e,arguments)}}const{toString:qx}=Object.prototype,{getPrototypeOf:th}=Object,{iterator:Gl,toStringTag:Rf}=Symbol,Yl=(t=>e=>{const n=qx.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bi=t=>(t=t.toLowerCase(),e=>Yl(e)===t),Xl=t=>e=>typeof e===t,{isArray:sa}=Array,Va=Xl("undefined");function qa(t){return t!==null&&!Va(t)&&t.constructor!==null&&!Va(t.constructor)&&Kr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Lf=Bi("ArrayBuffer");function Kx(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Lf(t.buffer),e}const Gx=Xl("string"),Kr=Xl("function"),Of=Xl("number"),Ka=t=>t!==null&&typeof t=="object",Yx=t=>t===!0||t===!1,Ql=t=>{if(Yl(t)!=="object")return!1;const e=th(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Rf in t)&&!(Gl in t)},Xx=t=>{if(!Ka(t)||qa(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Qx=Bi("Date"),Zx=Bi("File"),Jx=Bi("Blob"),e1=Bi("FileList"),t1=t=>Ka(t)&&Kr(t.pipe),n1=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Kr(t.append)&&((e=Yl(t))==="formdata"||e==="object"&&Kr(t.toString)&&t.toString()==="[object FormData]"))},r1=Bi("URLSearchParams"),[i1,o1,s1,a1]=["ReadableStream","Request","Response","Headers"].map(Bi),l1=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,u;if(typeof t!="object"&&(t=[t]),sa(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{if(qa(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],e.call(null,t[w],w,t)}}function If(t,e){if(qa(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const vs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Nf=t=>!Va(t)&&t!==vs;function nh(){const{caseless:t}=Nf(this)&&this||{},e={},n=(r,u)=>{const d=t&&If(e,u)||u;Ql(e[d])&&Ql(r)?e[d]=nh(e[d],r):Ql(r)?e[d]=nh({},r):sa(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&Ga(arguments[r],n);return e}const c1=(t,e,n,{allOwnKeys:r}={})=>(Ga(e,(u,d)=>{n&&Kr(u)?t[d]=Tf(u,n):t[d]=u},{allOwnKeys:r}),t),u1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),h1=(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)},d1=(t,e,n,r)=>{let u,d,p;const w={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!w[p]&&(e[p]=t[p],w[p]=!0);t=n!==!1&&th(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},p1=(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},f1=t=>{if(!t)return null;if(sa(t))return t;let e=t.length;if(!Of(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},g1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&th(Uint8Array)),m1=(t,e)=>{const n=(t&&t[Gl]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},y1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},v1=Bi("HTMLFormElement"),w1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Df=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),b1=Bi("RegExp"),Pf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ga(n,(u,d)=>{let p;(p=e(u,d,t))!==!1&&(r[d]=p||u)}),Object.defineProperties(t,r)},x1=t=>{Pf(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+"'")})}})},k1=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return sa(t)?r(t):r(String(t).split(e)),n},_1=()=>{},C1=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function S1(t){return!!(t&&Kr(t.append)&&t[Rf]==="FormData"&&t[Gl])}const $1=t=>{const e=new Array(10),n=(r,u)=>{if(Ka(r)){if(e.indexOf(r)>=0)return;if(qa(r))return r;if(!("toJSON"in r)){e[u]=r;const d=sa(r)?[]:{};return Ga(r,(p,w)=>{const f=n(p,u+1);!Va(f)&&(d[w]=f)}),e[u]=void 0,d}}return r};return n(t,0)},M1=Bi("AsyncFunction"),E1=t=>t&&(Ka(t)||Kr(t))&&Kr(t.then)&&Kr(t.catch),Ff=((t,e)=>t?setImmediate:e?((n,r)=>(vs.addEventListener("message",({source:u,data:d})=>{u===vs&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),vs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kr(vs.postMessage)),A1=typeof queueMicrotask<"u"?queueMicrotask.bind(vs):typeof process<"u"&&process.nextTick||Ff,T1=t=>t!=null&&Kr(t[Gl]),_e={isArray:sa,isArrayBuffer:Lf,isBuffer:qa,isFormData:n1,isArrayBufferView:Kx,isString:Gx,isNumber:Of,isBoolean:Yx,isObject:Ka,isPlainObject:Ql,isEmptyObject:Xx,isReadableStream:i1,isRequest:o1,isResponse:s1,isHeaders:a1,isUndefined:Va,isDate:Qx,isFile:Zx,isBlob:Jx,isRegExp:b1,isFunction:Kr,isStream:t1,isURLSearchParams:r1,isTypedArray:g1,isFileList:e1,forEach:Ga,merge:nh,extend:c1,trim:l1,stripBOM:u1,inherits:h1,toFlatObject:d1,kindOf:Yl,kindOfTest:Bi,endsWith:p1,toArray:f1,forEachEntry:m1,matchAll:y1,isHTMLForm:v1,hasOwnProperty:Df,hasOwnProp:Df,reduceDescriptors:Pf,freezeMethods:x1,toObjectSet:k1,toCamelCase:w1,noop:_1,toFiniteNumber:C1,findKey:If,global:vs,isContextDefined:Nf,isSpecCompliantForm:S1,toJSONObject:$1,isAsyncFn:M1,isThenable:E1,setImmediate:Ff,asap:A1,isIterable:T1};function kt(t,e,n,r,u){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),u&&(this.response=u,this.status=u.status?u.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 Bf=kt.prototype,jf={};["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=>{jf[t]={value:t}}),Object.defineProperties(kt,jf),Object.defineProperty(Bf,"isAxiosError",{value:!0}),kt.from=(t,e,n,r,u,d)=>{const p=Object.create(Bf);return _e.toFlatObject(t,p,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),kt.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const R1=null;function rh(t){return _e.isPlainObject(t)||_e.isArray(t)}function Wf(t){return _e.endsWith(t,"[]")?t.slice(0,-2):t}function zf(t,e,n){return t?t.concat(e).map(function(r,u){return r=Wf(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function L1(t){return _e.isArray(t)&&!t.some(rh)}const O1=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Zl(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,u=n.visitor||g,d=n.dots,p=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(e);if(!_e.isFunction(u))throw new TypeError("visitor must be a function");function f(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)&&L1(c)||(_e.isFileList(c)||_e.endsWith(o,"[]"))&&(m=_e.toArray(c)))return o=Wf(o),m.forEach(function(b,k){!(_e.isUndefined(b)||b===null)&&e.append(p===!0?zf([o],k,d):p===null?o:o+"[]",f(b))}),!1}return rh(c)?!0:(e.append(zf(l,o,d),f(c)),!1)}const i=[],a=Object.assign(O1,{defaultVisitor:g,convertValue:f,isVisitable:rh});function h(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)&&u.call(e,l,_e.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!_e.isObject(t))throw new TypeError("data must be an object");return h(t),e}function Hf(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function ih(t,e){this._pairs=[],t&&Zl(t,this,e)}const Uf=ih.prototype;Uf.append=function(t,e){this._pairs.push([t,e])},Uf.toString=function(t){const e=t?function(n){return t.call(this,n,Hf)}:Hf;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function I1(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||I1;_e.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=_e.isURLSearchParams(e)?e.toString():new ih(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let qf=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){_e.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Kf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},N1=typeof URLSearchParams<"u"?URLSearchParams:ih,D1=typeof FormData<"u"?FormData:null,P1=typeof Blob<"u"?Blob:null,F1={isBrowser:!0,classes:{URLSearchParams:N1,FormData:D1,Blob:P1},protocols:["http","https","file","blob","url","data"]},oh=typeof window<"u"&&typeof document<"u",sh=typeof navigator=="object"&&navigator||void 0,B1=oh&&(!sh||["ReactNative","NativeScript","NS"].indexOf(sh.product)<0),j1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",W1=oh&&window.location.href||"http://localhost",z1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:oh,hasStandardBrowserEnv:B1,hasStandardBrowserWebWorkerEnv:j1,navigator:sh,origin:W1},Symbol.toStringTag,{value:"Module"})),xr={...z1,...F1};function H1(t,e){return Zl(t,new xr.classes.URLSearchParams,{visitor:function(n,r,u,d){return xr.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function U1(t){return _e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function V1(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function Gf(t){function e(n,r,u,d){let p=n[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),f=d>=n.length;return p=!p&&_e.isArray(u)?u.length:p,f?(_e.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!w):((!u[p]||!_e.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&_e.isArray(u[p])&&(u[p]=V1(u[p])),!w)}if(_e.isFormData(t)&&_e.isFunction(t.entries)){const n={};return _e.forEachEntry(t,(r,u)=>{e(U1(r),u,n,0)}),n}return null}function q1(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 Ya={transitional:Kf,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=_e.isObject(t);if(u&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return r?JSON.stringify(Gf(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(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return H1(t,this.formSerializer).toString();if((d=_e.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Zl(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),q1(t)):t}],transformResponse:[function(t){const e=this.transitional||Ya.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 u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)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: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}}};_e.forEach(["delete","get","head","post","put","patch"],t=>{Ya.headers[t]={}});const K1=_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"]),G1=t=>{const e={};let n,r,u;return t&&t.split(`
3
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&K1[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Yf=Symbol("internals");function Xa(t){return t&&String(t).trim().toLowerCase()}function Jl(t){return t===!1||t==null?t:_e.isArray(t)?t.map(Jl):String(t)}function Y1(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 X1=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ah(t,e,n,r,u){if(_e.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!_e.isString(e)){if(_e.isString(r))return e.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(e)}}function Q1(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Z1(t,e){const n=_e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(w,f,g){const i=Xa(f);if(!i)throw new Error("header name must be a non-empty string");const a=_e.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||f]=Jl(w))}const p=(w,f)=>_e.forEach(w,(g,i)=>d(g,i,f));if(_e.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(_e.isString(e)&&(e=e.trim())&&!X1(e))p(G1(e),n);else if(_e.isObject(e)&&_e.isIterable(e)){let w={},f,g;for(const i of e){if(!_e.isArray(i))throw TypeError("Object iterator must return a key-value pair");w[g=i[0]]=(f=w[g])?_e.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(w,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=Xa(e),e){const r=_e.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return Y1(u);if(_e.isFunction(n))return n.call(this,u,r);if(_e.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Xa(e),e){const r=_e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ah(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(p){if(p=Xa(p),p){const w=_e.findKey(r,p);w&&(!n||ah(r,r[w],w,n))&&(delete r[w],u=!0)}}return _e.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||ah(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return _e.forEach(this,(u,d)=>{const p=_e.findKey(r,d);if(p){n[p]=Jl(u),delete n[d];return}const w=e?Q1(d):String(d).trim();w!==d&&delete n[d],n[w]=Jl(u),r[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return _e.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=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(`
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(u=>r.set(u)),r}static accessor(e){const n=(this[Yf]=this[Yf]={accessors:{}}).accessors,r=this.prototype;function u(d){const p=Xa(d);n[p]||(Z1(r,d),n[p]=!0)}return _e.isArray(e)?e.forEach(u):u(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Gr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),_e.freezeMethods(Gr);function lh(t,e){const n=this||Ya,r=e||n,u=Gr.from(r.headers);let d=r.data;return _e.forEach(t,function(p){d=p.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function Xf(t){return!!(t&&t.__CANCEL__)}function aa(t,e,n){kt.call(this,t??"canceled",kt.ERR_CANCELED,e,n),this.name="CanceledError"}_e.inherits(aa,kt,{__CANCEL__:!0});function Qf(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 J1(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ek(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,p;return e=e!==void 0?e:1e3,function(w){const f=Date.now(),g=r[d];p||(p=f),n[u]=w,r[u]=f;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function tk(t,e){let n=0,r=1e3/e,u,d;const p=(w,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const f=Date.now(),g=f-n;g>=r?p(w,f):(u=w,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const ec=(t,e,n=3)=>{let r=0;const u=ek(50,250);return tk(d=>{const p=d.loaded,w=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=w;r=p;const a={loaded:p,total:w,progress:w?p/w:void 0,bytes:f,rate:g||void 0,estimated:g&&w&&i?(w-p)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},Zf=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Jf=t=>(...e)=>_e.asap(()=>t(...e)),nk=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,rk=xr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];_e.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&p.push("path="+r),_e.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 ik(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ok(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function eg(t,e,n){let r=!ik(e);return t&&(r||n==!1)?ok(t,e):e}const tg=t=>t instanceof Gr?{...t}:t;function ws(t,e){e=e||{};const n={};function r(g,i,a,h){return _e.isPlainObject(g)&&_e.isPlainObject(i)?_e.merge.call({caseless:h},g,i):_e.isPlainObject(i)?_e.merge({},i):_e.isArray(i)?i.slice():i}function u(g,i,a,h){if(_e.isUndefined(i)){if(!_e.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!_e.isUndefined(i))return r(void 0,i)}function p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:w,headers:(g,i,a)=>u(tg(g),tg(i),a,!0)};return _e.forEach(Object.keys({...t,...e}),function(g){const i=f[g]||u,a=i(t[g],e[g],g);_e.isUndefined(a)&&i!==w||(n[g]=a)}),n}const ng=t=>{const e=ws({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:p,auth:w}=e;e.headers=p=Gr.from(p),e.url=Vf(eg(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&p.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let f;if(_e.isFormData(n)){if(xr.hasStandardBrowserEnv||xr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(xr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&nk(e.url))){const g=u&&d&&rk.read(d);g&&p.set(u,g)}return e},sk=typeof XMLHttpRequest<"u",ak=sk&&function(t){return new Promise(function(e,n){const r=ng(t);let u=r.data;const d=Gr.from(r.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:f}=r,g,i,a,h,c;function o(){h&&h(),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 k=Gr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),T={data:!p||p==="text"||p==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};Qf(function(E){e(E),o()},function(E){n(E),o()},T),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 k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Kf;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new kt(k,T.clarifyTimeoutError?kt.ETIMEDOUT:kt.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&_e.forEach(d.toJSON(),function(k,T){l.setRequestHeader(T,k)}),_e.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=ec(f,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,h]=ec(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new aa(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=J1(r.url);if(b&&xr.protocols.indexOf(b)===-1){n(new kt("Unsupported protocol "+b+":",kt.ERR_BAD_REQUEST,t));return}l.send(u||null)})},lk=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof kt?i:new aa(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new kt(`timeout ${e} of ms exceeded`,kt.ETIMEDOUT))},e);const w=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>_e.asap(w),f}},ck=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},uk=async function*(t,e){for await(const n of hk(t))yield*ck(n,e)},hk=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()}},rg=(t,e,n,r)=>{const u=uk(t,e);let d=0,p,w=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){w(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(f){return w(f),u.return()}},{highWaterMark:2})},tc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ig=tc&&typeof ReadableStream=="function",dk=tc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),og=(t,...e)=>{try{return!!t(...e)}catch{return!1}},pk=ig&&og(()=>{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}),sg=64*1024,ch=ig&&og(()=>_e.isReadableStream(new Response("").body)),nc={stream:ch&&(t=>t.body)};tc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!nc[e]&&(nc[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 fk=async t=>{if(t==null)return 0;if(_e.isBlob(t))return t.size;if(_e.isSpecCompliantForm(t))return(await new Request(xr.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 dk(t)).byteLength},gk=async(t,e)=>_e.toFiniteNumber(t.getContentLength())??fk(e),mk=tc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=ng(t);g=g?(g+"").toLowerCase():"text";let c=lk([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&pk&&n!=="get"&&n!=="head"&&(m=await gk(i,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(_e.isFormData(r)&&(x=_.headers.get("content-type"))&&i.setContentType(x),_.body){const[R,I]=Zf(m,ec(Jf(f)));r=rg(_.body,sg,R,I)}}_e.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let k=await fetch(o,h);const T=ch&&(g==="stream"||g==="response");if(ch&&(w||T&&l)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=k[O]});const x=_e.toFiniteNumber(k.headers.get("content-length")),[R,I]=w&&Zf(x,ec(Jf(w),!0))||[];k=new Response(rg(k.body,sg,R,()=>{I&&I(),l&&l()}),_)}g=g||"text";let E=await nc[_e.findKey(nc,g)||"text"](k,t);return!T&&l&&l(),await new Promise((_,x)=>{Qf(_,x,{data:E,headers:Gr.from(k.headers),status:k.status,statusText:k.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)}}),uh={http:R1,xhr:ak,fetch:mk};_e.forEach(uh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const ag=t=>`- ${t}`,yk=t=>_e.isFunction(t)||t===null||t===!1,lg={getAdapter:t=>{t=_e.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!yk(n)&&(r=uh[(p=String(n)).toLowerCase()],r===void 0))throw new kt(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([w,f])=>`adapter ${w} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
5
+ `+d.map(ag).join(`
6
+ `):" "+ag(d[0]):"as no adapter specified";throw new kt("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:uh};function hh(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new aa(null,t)}function cg(t){return hh(t),t.headers=Gr.from(t.headers),t.data=lh.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),lg.getAdapter(t.adapter||Ya.adapter)(t).then(function(e){return hh(t),e.data=lh.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e},function(e){return Xf(e)||(hh(t),e&&e.response&&(e.response.data=lh.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)})}const ug="1.11.0",rc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{rc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const hg={};rc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+ug+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,p)=>{if(t===!1)throw new kt(r(d," has been removed"+(e?" in "+e:"")),kt.ERR_DEPRECATED);return e&&!hg[d]&&(hg[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,p):!0}},rc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function vk(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 u=r.length;for(;u-- >0;){const d=r[u],p=e[d];if(p){const w=t[d],f=w===void 0||p(w,d,t);if(f!==!0)throw new kt("option "+d+" must be "+f,kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new kt("Unknown option "+d,kt.ERR_BAD_OPTION)}}const ic={assertOptions:vk,validators:rc},so=ic.validators;let bs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new qf,response:new qf}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.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:u,headers:d}=n;r!==void 0&&ic.assertOptions(r,{silentJSONParsing:so.transitional(so.boolean),forcedJSONParsing:so.transitional(so.boolean),clarifyTimeoutError:so.transitional(so.boolean)},!1),u!=null&&(_e.isFunction(u)?n.paramsSerializer={serialize:u}:ic.assertOptions(u,{encode:so.function,serialize:so.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ic.assertOptions(n,{baseUrl:so.spelling("baseURL"),withXsrfToken:so.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=d&&_e.merge(d.common,d[n.method]);d&&_e.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Gr.concat(p,d);const w=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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,h;if(!f){const o=[cg.bind(this),void 0];for(o.unshift(...w),o.push(...g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=w.length;let c=n;for(a=0;a<h;){const o=w[a++],l=w[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=cg.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=ws(this.defaults,e);const n=eg(e.baseURL,e.url,e.allowAbsoluteUrls);return Vf(n,e.params,e.paramsSerializer)}};_e.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}))}}),_e.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request(ws(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}bs.prototype[t]=e(),bs.prototype[t+"Form"]=e(!0)});let wk=class jx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new aa(u,d,p),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 jx(function(n){e=n}),cancel:e}}};function bk(t){return function(e){return t.apply(null,e)}}function xk(t){return _e.isObject(t)&&t.isAxiosError===!0}const dh={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(dh).forEach(([t,e])=>{dh[e]=t});function dg(t){const e=new bs(t),n=Tf(bs.prototype.request,e);return _e.extend(n,bs.prototype,e,{allOwnKeys:!0}),_e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return dg(ws(t,r))},n}const In=dg(Ya);In.Axios=bs,In.CanceledError=aa,In.CancelToken=wk,In.isCancel=Xf,In.VERSION=ug,In.toFormData=Zl,In.AxiosError=kt,In.Cancel=In.CanceledError,In.all=function(t){return Promise.all(t)},In.spread=bk,In.isAxiosError=xk,In.mergeConfig=ws,In.AxiosHeaders=Gr,In.formToJSON=t=>Gf(_e.isHTMLForm(t)?new FormData(t):t),In.getAdapter=lg.getAdapter,In.HttpStatusCode=dh,In.default=In;const{Axios:xB,AxiosError:kB,CanceledError:_B,isCancel:CB,CancelToken:SB,VERSION:$B,all:MB,Cancel:EB,isAxiosError:AB,spread:TB,toFormData:RB,AxiosHeaders:LB,HttpStatusCode:OB,formToJSON:IB,getAdapter:NB,mergeConfig:DB}=In,pg=In.create({baseURL:location.origin,timeout:6e4,params:{}});pg.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,p,w,f,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 h=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(h+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(h+=`${t.response.config.data} `),(d=(u=t.response)==null?void 0:u.data)!=null&&d.message?h+=`${t.response.data.message}`:(w=(p=t.response)==null?void 0:p.data)!=null&&w.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(h+=`${t.response.data.error.class} `),h+=`${t.response.data.error.message}`):h+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:h}),t}else throw t});const oc=async function(t,e,{data:n,params:r={},headers:u,noAuth:d=!1,noScope:p=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}u.Authorization=localStorage.openc3Token}return u.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),pg({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:w})},ph={Accept:"application/json"},fg={...ph,"Content-Type":"application/json"},xs={get:function(t,{params:e,headers:n=ph,noScope:r,noAuth:u,onUploadProgress:d}={}){return oc("get",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=fg,noScope:u,noAuth:d,onUploadProgress:p}={}){return oc("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=fg,noScope:u,noAuth:d,onUploadProgress:p}={}){return oc("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=ph,noScope:r,noAuth:u,onUploadProgress:d}={}){return oc("delete",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})}};let kk=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,u=n.length;r<u;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(u=>e!==u)}}}),_k=class extends Error{constructor(e,n){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=n,this.name="ReasonError"}};function Ck(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 Sk{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:u})=>(n[r]=u,n),{})}}const ks=Symbol("state");let gg=class{constructor(e={}){this.emitter=kk(),this.params=Object.freeze(e),this.presence=new Sk(this),this.initialConnect=!0,this[ks]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Ck({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[ks]}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[ks]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[ks]="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[ks]="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[ks]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[ks]="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,(...u)=>{r(),n(...u)});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(u=>u()),e()})),r.push(this.on("close",u=>{r.forEach(d=>d()),n(u||new _k("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}};Af(class extends gg{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}},"identifier","__ghost__"),Af(class extends gg{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}},"identifier","$pubsub");const sc=6e4,fh=36e5,$k=1e3,mg=Symbol.for("constructDateFrom");function Kn(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&mg in t?t[mg](e):t instanceof Date?new t.constructor(e):new Date(e)}function yn(t,e){return Kn(e||t,t)}let Mk={};function la(){return Mk}function Go(t,e){var n,r,u,d;const p=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)??p.weekStartsOn??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,f=yn(t,e==null?void 0:e.in),g=f.getDay(),i=(g<w?7:0)+g-w;return f.setDate(f.getDate()-i),f.setHours(0,0,0,0),f}function ca(t,e){return Go(t,{...e,weekStartsOn:1})}function yg(t,e){const n=yn(t,void 0),r=n.getFullYear(),u=Kn(n,0);u.setFullYear(r+1,0,4),u.setHours(0,0,0,0);const d=ca(u),p=Kn(n,0);p.setFullYear(r,0,4),p.setHours(0,0,0,0);const w=ca(p);return n.getTime()>=d.getTime()?r+1:n.getTime()>=w.getTime()?r:r-1}function ac(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 Ek(t,...e){const n=Kn.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function vg(t,e){const n=yn(t,void 0);return n.setHours(0,0,0,0),n}function Ak(t,e,n){const[r,u]=Ek(void 0,t,e),d=vg(r),p=vg(u),w=+d-ac(d),f=+p-ac(p);return Math.round((w-f)/864e5)}function Tk(t,e){const n=yg(t),r=Kn(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ca(r)}function Rk(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function wg(t){return!(!Rk(t)&&typeof t!="number"||isNaN(+yn(t)))}function Lk(t,e){const n=yn(t,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Ok={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"}},Ik=(t,e,n)=>{let r;const u=Ok[t];return typeof u=="string"?r=u:e===1?r=u.one:r=u.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function gh(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Nk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Pk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fk={date:gh({formats:Nk,defaultWidth:"full"}),time:gh({formats:Dk,defaultWidth:"full"}),dateTime:gh({formats:Pk,defaultWidth:"full"})},Bk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jk=(t,e,n,r)=>Bk[t];function Qa(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let u;if(r==="formatting"&&t.formattingValues){const p=t.defaultFormattingWidth||t.defaultWidth,w=n!=null&&n.width?String(n.width):p;u=t.formattingValues[w]||t.formattingValues[p]}else{const p=t.defaultWidth,w=n!=null&&n.width?String(n.width):t.defaultWidth;u=t.values[w]||t.values[p]}const d=t.argumentCallback?t.argumentCallback(e):e;return u[d]}}const Wk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Hk={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"]},Uk={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"]},Vk={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"}},qk={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"}},Kk=(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"},Gk={ordinalNumber:Kk,era:Qa({values:Wk,defaultWidth:"wide"}),quarter:Qa({values:zk,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Qa({values:Hk,defaultWidth:"wide"}),day:Qa({values:Uk,defaultWidth:"wide"}),dayPeriod:Qa({values:Vk,defaultWidth:"wide",formattingValues:qk,defaultFormattingWidth:"wide"})};function Za(t){return(e,n={})=>{const r=n.width,u=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],d=e.match(u);if(!d)return null;const p=d[0],w=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],f=Array.isArray(w)?Xk(w,a=>a.test(p)):Yk(w,a=>a.test(p));let g;g=t.valueCallback?t.valueCallback(f):f,g=n.valueCallback?n.valueCallback(g):g;const i=e.slice(p.length);return{value:g,rest:i}}}function Yk(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Xk(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Qk(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const u=r[0],d=e.match(t.parsePattern);if(!d)return null;let p=t.valueCallback?t.valueCallback(d[0]):d[0];p=n.valueCallback?n.valueCallback(p):p;const w=e.slice(u.length);return{value:p,rest:w}}}const Zk=/^(\d+)(th|st|nd|rd)?/i,Jk=/\d+/i,e_={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},t_={any:[/^b/i,/^(a|c)/i]},n_={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},r_={any:[/1/i,/2/i,/3/i,/4/i]},i_={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},o_={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]},s_={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},a_={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]},l_={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},c_={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}},u_={ordinalNumber:Qk({matchPattern:Zk,parsePattern:Jk,valueCallback:t=>parseInt(t,10)}),era:Za({matchPatterns:e_,defaultMatchWidth:"wide",parsePatterns:t_,defaultParseWidth:"any"}),quarter:Za({matchPatterns:n_,defaultMatchWidth:"wide",parsePatterns:r_,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Za({matchPatterns:i_,defaultMatchWidth:"wide",parsePatterns:o_,defaultParseWidth:"any"}),day:Za({matchPatterns:s_,defaultMatchWidth:"wide",parsePatterns:a_,defaultParseWidth:"any"}),dayPeriod:Za({matchPatterns:l_,defaultMatchWidth:"any",parsePatterns:c_,defaultParseWidth:"any"})},bg={code:"en-US",formatDistance:Ik,formatLong:Fk,formatRelative:jk,localize:Gk,match:u_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function h_(t,e){const n=yn(t,void 0);return Ak(n,Lk(n))+1}function xg(t,e){const n=yn(t,void 0),r=+ca(n)-+Tk(n);return Math.round(r/6048e5)+1}function mh(t,e){var n,r,u,d;const p=yn(t,e==null?void 0:e.in),w=p.getFullYear(),f=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)??f.firstWeekContainsDate??((d=(u=f.locale)==null?void 0:u.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),h=Kn((e==null?void 0:e.in)||t,0);h.setFullYear(w,0,g),h.setHours(0,0,0,0);const c=Go(h,e);return+p>=+a?w+1:+p>=+c?w:w-1}function d_(t,e){var n,r,u,d;const p=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)??p.firstWeekContainsDate??((d=(u=p.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,f=mh(t,e),g=Kn((e==null?void 0:e.in)||t,0);return g.setFullYear(f,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)-+d_(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(),u=Math.trunc(r*Math.pow(10,n-3));return en(u,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(),u=r>0?r:1-r;return n.ordinalNumber(u,{unit:"year"})}return Yo.y(t,e)},Y:function(t,e,n,r){const u=mh(t,r),d=u>0?u:1-u;if(e==="YY"){const p=d%100;return en(p,2)}return e==="Yo"?n.ordinalNumber(d,{unit:"year"}):en(d,e.length)},R:function(t,e){const n=yg(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 u=kg(t,r);return e==="wo"?n.ordinalNumber(u,{unit:"week"}):en(u,e.length)},I:function(t,e,n){const r=xg(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=h_(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 u=t.getDay(),d=(u-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(u,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(u,{width:"short",context:"formatting"});case"eeee":default:return n.day(u,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const u=t.getDay(),d=(u-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(u,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(u,{width:"narrow",context:"standalone"});case"cccccc":return n.day(u,{width:"short",context:"standalone"});case"cccc":default:return n.day(u,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),u=r===0?7:r;switch(e){case"i":return String(u);case"ii":return en(u,e.length);case"io":return n.ordinalNumber(u,{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 u;switch(r===12?u=ua.noon:r===0?u=ua.midnight:u=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let u;switch(r>=17?u=ua.evening:r>=12?u=ua.afternoon:r>=4?u=ua.morning:u=ua.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(u,{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 Sg(r);case"XXXX":case"XX":return _s(r);case"XXXXX":case"XXX":default:return _s(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Sg(r);case"xxxx":case"xx":return _s(r);case"xxxxx":case"xxx":default:return _s(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"+_s(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"+_s(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),u=Math.trunc(r/60),d=r%60;return d===0?n+String(u):n+String(u)+e+en(d,2)}function Sg(t,e){return t%60===0?(t>0?"-":"+")+en(Math.abs(t)/60,2):_s(t,e)}function _s(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=en(Math.trunc(r/60),2),d=en(r%60,2);return n+u+e+d}const $g=(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"})}},Mg=(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"})}},p_=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],u=n[2];if(!u)return $g(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}}",$g(r,e)).replace("{{time}}",Mg(u,e))},yh={p:Mg,P:p_},f_=/^D+$/,g_=/^Y+$/,m_=["D","DD","YY","YYYY"];function Eg(t){return f_.test(t)}function Ag(t){return g_.test(t)}function vh(t,e,n){const r=y_(t,e,n);if(console.warn(r),m_.includes(t))throw new RangeError(r)}function y_(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 v_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,b_=/^'([^]*?)'?$/,x_=/''/g,k_=/[a-zA-Z]/;function Cs(t,e,n){var r,u,d,p,w,f,g,i;const a=la(),h=(n==null?void 0:n.locale)??a.locale??bg,c=(n==null?void 0:n.firstWeekContainsDate)??((u=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:u.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(d=a.locale)==null?void 0:d.options)==null?void 0:p.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((f=(w=n==null?void 0:n.locale)==null?void 0:w.options)==null?void 0:f.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(!wg(l))throw new RangeError("Invalid time value");let m=e.match(w_).map(k=>{const T=k[0];if(T==="p"||T==="P"){const E=yh[T];return E(k,h.formatLong)}return k}).join("").match(v_).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const T=k[0];if(T==="'")return{isToken:!1,value:__(k)};if(_g[T])return{isToken:!0,value:k};if(T.match(k_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return{isToken:!1,value:k}});h.localize.preprocessor&&(m=h.localize.preprocessor(l,m));const b={firstWeekContainsDate:c,weekStartsOn:o,locale:h};return m.map(k=>{if(!k.isToken)return k.value;const T=k.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Ag(T)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Eg(T))&&vh(T,e,String(t));const E=_g[T[0]];return E(l,T,h.localize,b)}).join("")}function __(t){const e=t.match(b_);return e?e[1].replace(x_,"'"):t}var Xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tg={exports:{}},Rg;function C_(){return Rg||(Rg=1,function(t,e){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var u=function(i,a,h){if(typeof i!="string"){u.original?u.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(h=a),u.modules[i]||(u.payloads[i]=h,u.modules[i]=null)};u.modules={},u.payloads={};var d=function(i,a,h){if(typeof a=="string"){var c=f(i,a);if(c!=null)return h&&h(),c}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],l=0,m=a.length;l<m;++l){var b=f(i,a[l]);if(b==null&&p.original)return;o.push(b)}return h&&h.apply(null,o)||!0}},p=function(i,a){var h=d("",i,a);return h==null&&p.original?p.original.apply(this,arguments):h},w=function(i,a){if(a.indexOf("!")!==-1){var h=a.split("!");return w(i,h[0])+"!"+w(i,h[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},f=function(i,a){a=w(i,a);var h=u.modules[a];if(!h){if(h=u.payloads[a],typeof h=="function"){var c={},o={id:a,uri:"",exports:c,packaged:!0},l=function(b,k){return d(a,b,k)},m=h(l,c,o);c=m||o.exports,u.modules[a]=c,delete u.payloads[a]}h=u.modules[a]=c||h}return h};function g(i){var a=r;r[i]||(r[i]={}),a=r[i],(!a.define||!a.define.packaged)&&(u.original=a.define,a.define=u,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(p.original=a.require,a.require=p,a.require.packaged=!0)}g(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,u){function d(p,w,f){Object.defineProperty(p,w,{value:f,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||d(String.prototype,"startsWith",function(p,w){return w=w||0,this.lastIndexOf(p,w)===w}),String.prototype.endsWith||d(String.prototype,"endsWith",function(p,w){var f=this;(w===void 0||w>f.length)&&(w=f.length),w-=p.length;var g=f.indexOf(p,w);return g!==-1&&g===w}),String.prototype.repeat||d(String.prototype,"repeat",function(p){for(var w="",f=this;p>0;)p&1&&(w+=f),(p>>=1)&&(f+=f);return w}),String.prototype.includes||d(String.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var w=Object(p),f=1;f<arguments.length;f++){var g=arguments[f];g!=null&&Object.keys(g).forEach(function(i){w[i]=g[i]})}return w}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(w){return p[w]})}),Array.prototype.find||d(Array.prototype,"find",function(p){for(var w=this.length,f=arguments[1],g=0;g<w;g++){var i=this[g];if(p.call(f,i,g,this))return i}}),Array.prototype.findIndex||d(Array.prototype,"findIndex",function(p){for(var w=this.length,f=arguments[1],g=0;g<w;g++){var i=this[g];if(p.call(f,i,g,this))return g}}),Array.prototype.includes||d(Array.prototype,"includes",function(p,w){return this.indexOf(p,w)!=-1}),Array.prototype.fill||d(Array.prototype,"fill",function(p){for(var w=this,f=w.length>>>0,g=arguments[1],i=g>>0,a=i<0?Math.max(f+i,0):Math.min(i,f),h=arguments[2],c=h===void 0?f:h>>0,o=c<0?Math.max(f+c,0):Math.min(c,f);a<o;)w[a]=p,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,u){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,u){r.deepCopy=function d(p){if(typeof p!="object"||!p)return p;var w;if(Array.isArray(p)){w=[];for(var f=0;f<p.length;f++)w[f]=d(p[f]);return w}if(Object.prototype.toString.call(p)!=="[object Object]")return p;w={};for(var f in p)w[f]=d(p[f]);return w}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,u){r.last=function(w){return w[w.length-1]},r.stringReverse=function(w){return w.split("").reverse().join("")},r.stringRepeat=function(w,f){for(var g="";f>0;)f&1&&(g+=w),(f>>=1)&&(w+=w);return g};var d=/^\s\s*/,p=/\s\s*$/;r.stringTrimLeft=function(w){return w.replace(d,"")},r.stringTrimRight=function(w){return w.replace(p,"")},r.copyObject=function(w){var f={};for(var g in w)f[g]=w[g];return f},r.copyArray=function(w){for(var f=[],g=0,i=w.length;g<i;g++)w[g]&&typeof w[g]=="object"?f[g]=this.copyObject(w[g]):f[g]=w[g];return f},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(w){for(var f={},g=0;g<w.length;g++)f[w[g]]=1;return f},r.createMap=function(w){var f=Object.create(null);for(var g in w)f[g]=w[g];return f},r.arrayRemove=function(w,f){for(var g=0;g<=w.length;g++)f===w[g]&&w.splice(g,1)},r.escapeRegExp=function(w){return w.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(w){return(""+w).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(w,f){var g=[];return w.replace(f,function(i){g.push({offset:arguments[arguments.length-2],length:i.length})}),g},r.deferredCall=function(w){var f=null,g=function(){f=null,w()},i=function(a){return i.cancel(),f=setTimeout(g,a||0),i};return i.schedule=i,i.call=function(){return this.cancel(),w(),i},i.cancel=function(){return clearTimeout(f),f=null,i},i.isPending=function(){return f},i},r.delayedCall=function(w,f){var g=null,i=function(){g=null,w()},a=function(h){g==null&&(g=setTimeout(i,h||f))};return a.delay=function(h){g&&clearTimeout(g),g=setTimeout(i,h||f)},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,f,g){return g&&w.codePointAt(f)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,u){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var d=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(d.platform)||["other"])[0].toLowerCase(),w=d.userAgent||"",f=d.appName||"";r.isWin=p=="win",r.isMac=p=="mac",r.isLinux=p=="linux",r.isIE=f=="Microsoft Internet Explorer"||f.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,u){var d=n("./useragent"),p="http://www.w3.org/1999/xhtml";r.buildDom=function h(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=[],k=0;k<c.length;k++){var T=h(c[k],o,l);T&&b.push(T)}return b}var E=document.createElement(c[0]),_=c[1],x=1;_&&typeof _=="object"&&!Array.isArray(_)&&(x=2);for(var k=x;k<c.length;k++)h(c[k],E,l);return x==2&&Object.keys(_).forEach(function(R){var I=_[R];R==="class"?E.className=Array.isArray(I)?I.join(" "):I:typeof I=="function"||R=="value"||R[0]=="$"?E[R]=I:R==="ref"?l&&(l[I]=E):R==="style"?typeof I=="string"&&(E.style.cssText=I):I!=null&&E.setAttribute(R,I)}),o&&o.appendChild(E),E},r.getDocumentHead=function(h){return h||(h=document),h.head||h.getElementsByTagName("head")[0]||h.documentElement},r.createElement=function(h,c){return document.createElementNS?document.createElementNS(c||p,h):document.createElement(h)},r.removeChildren=function(h){h.innerHTML=""},r.createTextNode=function(h,c){var o=c?c.ownerDocument:document;return o.createTextNode(h)},r.createFragment=function(h){var c=h?h.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(h,c){var o=(h.className+"").split(/\s+/g);return o.indexOf(c)!==-1},r.addCssClass=function(h,c){r.hasCssClass(h,c)||(h.className+=" "+c)},r.removeCssClass=function(h,c){for(var o=h.className.split(/\s+/g);;){var l=o.indexOf(c);if(l==-1)break;o.splice(l,1)}h.className=o.join(" ")},r.toggleCssClass=function(h,c){for(var o=h.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),h.className=o.join(" "),l},r.setCssClass=function(h,c,o){o?r.addCssClass(h,c):r.removeCssClass(h,c)},r.hasCssString=function(h,c){var o=0,l;if(c=c||document,l=c.querySelectorAll("style")){for(;o<l.length;)if(l[o++].id===h)return!0}},r.removeElementById=function(h,c){c=c||document,c.getElementById(h)&&c.getElementById(h).remove()};var w,f=[];r.useStrictCSP=function(h){w=h,h==!1?g():f||(f=[])};function g(){var h=f;f=null,h&&h.forEach(function(c){i(c[0],c[1])})}function i(h,c,o){if(!(typeof document>"u")){if(f){if(o)g();else if(o===!1)return f.push([h,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&&(h+=`
8
+ /*# sourceURL=ace/css/`+c+" */");var b=r.createElement("style");b.appendChild(m.createTextNode(h)),c&&(b.id=c),l==m&&(l=r.getDocumentHead(m)),l.insertBefore(b,l.firstChild)}}}if(r.importCssString=i,r.importCssStylsheet=function(h,c){r.buildDom(["link",{rel:"stylesheet",href:h}],r.getDocumentHead(c))},r.scrollbarWidth=function(h){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=h&&h.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(o);var b=c.offsetWidth;l.overflow="scroll";var k=c.offsetWidth;return b===k&&(k=o.clientWidth),m.removeChild(o),b-k},r.computedStyle=function(h,c){return window.getComputedStyle(h,"")||{}},r.setStyle=function(h,c,o){h[c]!==o&&(h[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(h,c,o){h.style.transform="translate("+Math.round(c)+"px, "+Math.round(o)+"px)"}:r.translate=function(h,c,o){h.style.top=Math.round(o)+"px",h.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,u){/*
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(p,w){var f=new XMLHttpRequest;f.open("GET",p,!0),f.onreadystatechange=function(){f.readyState===4&&w(f.responseText)},f.send(null)},r.loadScript=function(p,w){var f=d.getDocumentHead(),g=document.createElement("script");g.src=p,f.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(p){var w=document.createElement("a");return w.href=p,w.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,u){r.inherits=function(d,p){d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(d,p){for(var w in p)d[w]=p[w];return d},r.implement=function(d,p){r.mixin(d,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,u){var d={},p=function(){this.propagationStopped=!0},w=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(f,g){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[f]||[],a=this._defaultHandlers[f];if(!(!i.length&&!a)){(typeof g!="object"||!g)&&(g={}),g.type||(g.type=f),g.stopPropagation||(g.stopPropagation=p),g.preventDefault||(g.preventDefault=w),i=i.slice();for(var h=0;h<i.length&&(i[h](g,this),!g.propagationStopped);h++);if(a&&!g.defaultPrevented)return a(g,this)}},d._signal=function(f,g){var i=(this._eventRegistry||{})[f];if(i){i=i.slice();for(var a=0;a<i.length;a++)i[a](g,this)}},d.once=function(f,g){var i=this;if(this.on(f,function a(){i.off(f,a),g.apply(null,arguments)}),!g)return new Promise(function(a){g=a})},d.setDefaultHandler=function(f,g){var i=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[f]){var a=i[f],h=i._disabled_[f];h||(i._disabled_[f]=h=[]),h.push(a);var c=h.indexOf(g);c!=-1&&h.splice(c,1)}i[f]=g},d.removeDefaultHandler=function(f,g){var i=this._defaultHandlers;if(i){var a=i._disabled_[f];if(i[f]==g)a&&this.setDefaultHandler(f,a.pop());else if(a){var h=a.indexOf(g);h!=-1&&a.splice(h,1)}}},d.on=d.addEventListener=function(f,g,i){this._eventRegistry=this._eventRegistry||{};var a=this._eventRegistry[f];return a||(a=this._eventRegistry[f]=[]),a.indexOf(g)==-1&&a[i?"unshift":"push"](g),g},d.off=d.removeListener=d.removeEventListener=function(f,g){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[f];if(i){var a=i.indexOf(g);a!==-1&&i.splice(a,1)}},d.removeAllListeners=function(f){f||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[f]=void 0),this._defaultHandlers&&(this._defaultHandlers[f]=void 0)},r.EventEmitter=d}),ace.define("ace/lib/report_error",["require","exports","module"],function(n,r,u){r.reportError=function(d,p){var w=new Error(d);w.data=p,typeof console=="object"&&console.error&&console.error(w),setTimeout(function(){throw w})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(n,r,u){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,u){"no use strict";var d=n("./oop"),p=n("./event_emitter").EventEmitter,w=n("./report_error").reportError,f=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,h,c=function(){function o(){this.$defaultOptions={},a=f,h="dollarSigns"}return o.prototype.defineOptions=function(l,m,b){return l.$options||(this.$defaultOptions[m]=l.$options={}),Object.keys(b).forEach(function(k){var T=b[k];typeof T=="string"&&(T={forwardTo:T}),T.name||(T.name=k),l.$options[T.name]=T,"initialValue"in T&&(l["$"+T.name]=T.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 k=this.$defaultOptions[l]||(this.$defaultOptions[l]={});k[m]&&(k.forwardTo?this.setDefaultValue(k.forwardTo,m,b):k[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&&(h=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 k=a[l]||a[m]||m;return b&&(h==="dollarSigns"&&(k=k.replace(/\$(\$|[\d]+)/g,function(T,E){return E=="$"?"$":b[E]})),h==="curlyBrackets"&&(k=k.replace(/\{([^\}]+)\}/g,function(T,E){return b[E]}))),k},o}();c.prototype.warn=i,c.prototype.reportError=w,d.implement(c.prototype,p),r.AppConfig=c}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(n,r,u){u.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,u){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,u){"no use strict";var d=n("./lib/lang"),p=n("./lib/net"),w=n("./lib/dom"),f=n("./lib/app_config").AppConfig;u.exports=r=new f;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 k=new RegExp("^"+o+"[\\-_]|[\\-_]"+o+"$","g");b=b.replace(k,"")}(!b||b==o)&&l.length>1&&(b=l[l.length-2]);var T=g[o+"Path"];return T==null?T=g.basePath:m=="/"&&(o=m=""),T&&T.slice(-1)!="/"&&(T+="/"),T+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 k=function(T){if(T&&!r.$loading[b])return o&&o(T);if(r.$loading[b]||(r.$loading[b]=[]),r.$loading[b].push(o),!(r.$loading[b].length>1)){var E=function(){i(b,function(_,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 E();p.loadScript(r.moduleUrl(b,m),E),h()}};if(r.dynamicModules[b])r.dynamicModules[b]().then(function(T){T.default?k(T.default):k(T)});else{try{l=this.$require(b)}catch{}k(l||r.$loaded[b])}},r.$require=function(c){if(typeof u.require=="function"){var o="require";return u[o](c)}},r.setModuleLoader=function(c,o){r.dynamicModules[c]=o};var h=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"),h=function(){})};r.version="1.43.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,u){n("./lib/fixoldbrowsers");var d=n("./config");d.setLoader(function(g,i){n([g],function(a){i(null,a)})});var p=function(){return this||typeof window<"u"&&window}();u.exports=function(g){d.init=w,d.$require=n,g.require=n},w(!0);function w(g){if(!(!p||!p.document)){d.set("packaged",g||n.packaged||u.packaged||p.define&&(void 0).packaged);var i={},a="",h=document.currentScript||document._currentScript,c=h&&h.ownerDocument||document;h&&h.src&&(a=h.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 k=m.attributes,T=0,E=k.length;T<E;T++){var _=k[T];_.name.indexOf("data-ace-")===0&&(i[f(_.name.replace(/^data-ace-/,""))]=_.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 f(g){return g.replace(/-(.)/g,function(i,a){return a.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,u){var d=function(){function p(w,f,g,i){this.start={row:w,column:f},this.end={row:g,column:i}}return p.prototype.isEqual=function(w){return this.start.row===w.start.row&&this.end.row===w.end.row&&this.start.column===w.start.column&&this.end.column===w.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(w,f){return this.compare(w,f)==0},p.prototype.compareRange=function(w){var f,g=w.end,i=w.start;return f=this.compare(g.row,g.column),f==1?(f=this.compare(i.row,i.column),f==1?2:f==0?1:0):f==-1?-2:(f=this.compare(i.row,i.column),f==-1?-1:f==1?42:0)},p.prototype.comparePoint=function(w){return this.compare(w.row,w.column)},p.prototype.containsRange=function(w){return this.comparePoint(w.start)==0&&this.comparePoint(w.end)==0},p.prototype.intersects=function(w){var f=this.compareRange(w);return f==-1||f==0||f==1},p.prototype.isEnd=function(w,f){return this.end.row==w&&this.end.column==f},p.prototype.isStart=function(w,f){return this.start.row==w&&this.start.column==f},p.prototype.setStart=function(w,f){typeof w=="object"?(this.start.column=w.column,this.start.row=w.row):(this.start.row=w,this.start.column=f)},p.prototype.setEnd=function(w,f){typeof w=="object"?(this.end.column=w.column,this.end.row=w.row):(this.end.row=w,this.end.column=f)},p.prototype.inside=function(w,f){return this.compare(w,f)==0?!(this.isEnd(w,f)||this.isStart(w,f)):!1},p.prototype.insideStart=function(w,f){return this.compare(w,f)==0?!this.isEnd(w,f):!1},p.prototype.insideEnd=function(w,f){return this.compare(w,f)==0?!this.isStart(w,f):!1},p.prototype.compare=function(w,f){return!this.isMultiLine()&&w===this.start.row?f<this.start.column?-1:f>this.end.column?1:0:w<this.start.row?-1:w>this.end.row?1:this.start.row===w?f>=this.start.column?0:-1:this.end.row===w?f<=this.end.column?0:1:0},p.prototype.compareStart=function(w,f){return this.start.row==w&&this.start.column==f?-1:this.compare(w,f)},p.prototype.compareEnd=function(w,f){return this.end.row==w&&this.end.column==f?1:this.compare(w,f)},p.prototype.compareInside=function(w,f){return this.end.row==w&&this.end.column==f?1:this.start.row==w&&this.start.column==f?-1:this.compare(w,f)},p.prototype.clipRows=function(w,f){if(this.end.row>f)var g={row:f+1,column:0};else if(this.end.row<w)var g={row:w,column:0};if(this.start.row>f)var i={row:f+1,column:0};else if(this.start.row<w)var i={row:w,column:0};return p.fromPoints(i||this.start,g||this.end)},p.prototype.extend=function(w,f){var g=this.compare(w,f);if(g==0)return this;if(g==-1)var i={row:w,column:f};else var a={row:w,column:f};return p.fromPoints(i||this.start,a||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(w){var f=w.documentToScreenPosition(this.start),g=w.documentToScreenPosition(this.end);return new p(f.row,f.column,g.row,g.column)},p.prototype.moveBy=function(w,f){this.start.row+=w,this.start.column+=f,this.end.row+=w,this.end.column+=f},p}();d.fromPoints=function(p,w){return new d(p.row,p.column,w.row,w.column)},d.comparePoints=function(p,w){return p.row-w.row||p.column-w.column},r.Range=d}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,u){for(var d=n("./oop"),p={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},w={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},f=0;f<10;f++)w["Digit"+f]=48+f,w["Numpad"+f]=96+f,p.PRINTABLE_KEYS[48+f]=""+f,p.FUNCTION_KEYS[96+f]="Numpad"+f;for(var f=65;f<91;f++){var g=String.fromCharCode(f+32);w["Key"+g.toUpperCase()]=f,p.PRINTABLE_KEYS[f]=g}for(var f=1;f<13;f++)w["F"+f]=111+f,p.FUNCTION_KEYS[111+f]="F"+f;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,p.PRINTABLE_KEYS[173]="-";for(var h in p.FUNCTION_KEYS){var c=p.FUNCTION_KEYS[h].toLowerCase();p[c]=parseInt(h,10)}for(var h in p.PRINTABLE_KEYS){var c=p.PRINTABLE_KEYS[h].toLowerCase();p[c]=parseInt(h,10)}d.mixin(p,p.MODIFIER_KEYS),d.mixin(p,p.PRINTABLE_KEYS),d.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,function(){for(var o=["cmd","ctrl","alt","shift"],l=Math.pow(2,o.length);l--;)p.KEY_MODS[l]=o.filter(function(m){return l&p.KEY_MODS[m]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",d.mixin(r,p),r.default=r,r.keyCodeToString=function(o){var l=p[o];return typeof l!="string"&&(l=String.fromCharCode(o)),l.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,u){var d=n("./keys"),p=n("./useragent"),w=null,f=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 h(T,E,_){this.elem=T,this.type=E,this.callback=_}h.prototype.destroy=function(){o(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(T,E,_,x){T.addEventListener(E,_,a()),x&&x.$toDestroy.push(new h(T,E,_))},o=r.removeListener=function(T,E,_){T.removeEventListener(E,_,a())};r.stopEvent=function(T){return r.stopPropagation(T),r.preventDefault(T),!1},r.stopPropagation=function(T){T.stopPropagation&&T.stopPropagation()},r.preventDefault=function(T){T.preventDefault&&T.preventDefault()},r.getButton=function(T){return T.type=="dblclick"?0:T.type=="contextmenu"||p.isMac&&T.ctrlKey&&!T.altKey&&!T.shiftKey?2:T.button},r.capture=function(T,E,_){var x=T&&T.ownerDocument||document;function R(I){E&&E(I),_&&_(I),o(x,"mousemove",E),o(x,"mouseup",R),o(x,"dragstart",R)}return c(x,"mousemove",E),c(x,"mouseup",R),c(x,"dragstart",R),R},r.addMouseWheelListener=function(T,E,_){c(T,"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}E(x)},_)},r.addMultiMouseDownListener=function(T,E,_,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,p.isIE){var C=Math.abs($.clientX-O)>5||Math.abs($.clientY-L)>5;(!W||C)&&(I=1),W&&clearTimeout(W),W=setTimeout(function(){W=null},E[I-1]||600),I==1&&(O=$.clientX,L=$.clientY)}if($._clicks=I,_[x]("mousedown",$),I>4)I=0;else if(I>1)return _[x](F[I],$)}Array.isArray(T)||(T=[T]),T.forEach(function($){c($,"mousedown",N,R)})};function l(T){return 0|(T.ctrlKey?1:0)|(T.altKey?2:0)|(T.shiftKey?4:0)|(T.metaKey?8:0)}r.getModifierString=function(T){return d.KEY_MODS[l(T)]};function m(T,E,_){var x=l(E);if(!_&&E.code&&(_=d.$codeToKeyCode[E.code]||_),!p.isMac&&w){if(E.getModifierState&&(E.getModifierState("OS")||E.getModifierState("Win"))&&(x|=8),w.altGr)if((3&x)!=3)w.altGr=0;else return;if(_===18||_===17){var R=E.location;if(_===17&&R===1)w[_]==1&&(f=E.timeStamp);else if(_===18&&x===3&&R===2){var I=E.timeStamp-f;I<50&&(w.altGr=!0)}}}if(_ in d.MODIFIER_KEYS&&(_=-1),!(!x&&_===13&&E.location===3&&(T(E,x,-_),E.defaultPrevented))){if(p.isChromeOS&&x&8){if(T(E,x,_),E.defaultPrevented)return;x&=-9}return!x&&!(_ in d.FUNCTION_KEYS)&&!(_ in d.PRINTABLE_KEYS)?!1:T(E,x,_)}}r.addCommandKeyListener=function(T,E,_){var x=null;c(T,"keydown",function(R){w[R.keyCode]=(w[R.keyCode]||0)+1;var I=m(E,R,R.keyCode);return x=R.defaultPrevented,I},_),c(T,"keypress",function(R){x&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),x=null)},_),c(T,"keyup",function(R){w[R.keyCode]=null},_),w||(b(),c(window,"focus",b))};function b(){w=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var k=1;r.nextTick=function(T,E){E=E||window;var _="zero-timeout-message-"+k++,x=function(R){R.data==_&&(r.stopPropagation(R),o(E,"message",x),T())};c(E,"message",x),E.postMessage(_,"*")}}r.$idleBlocked=!1,r.onIdle=function(T,E){return setTimeout(function _(){r.$idleBlocked?setTimeout(_,100):T()},E)},r.$idleBlockId=null,r.blockIdle=function(T){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},T||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(T){setTimeout(T,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,u){var d;u.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,u){var d=n("../lib/event"),p=n("../config").nls,w=n("../lib/useragent"),f=n("../lib/dom"),g=n("../lib/lang"),i=n("../clipboard"),a=w.isChrome<18,h=w.isIE,c=w.isChrome>63,o=400,l=n("../lib/keys"),m=l.KEY_MODS,b=w.isIOS,k=b?/\s/:/\n/,T=w.isMobile,E=function(){function _(x,R){var I=this;this.host=R,this.text=f.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","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="",T||(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 _.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,C=I.selectionEnd,D=null,z=0;if($==0?D=l.up:$==1?D=l.home:C>O.lastSelectionEnd&&O.lastValue[C]==`
173
+ `?D=l.end:$<O.lastSelectionStart&&O.lastValue[$-1]==" "?(D=l.left,z=m.option):$<O.lastSelectionStart||$==O.lastSelectionStart&&O.lastSelectionEnd!=O.lastSelectionStart&&$==C?D=l.left:C>O.lastSelectionEnd&&O.lastValue.slice(0,C).split(`
174
+ `).length>2?D=l.down:C>O.lastSelectionEnd&&O.lastValue[C-1]==" "?(D=l.right,z=m.option):(C>O.lastSelectionEnd||C==O.lastSelectionEnd&&O.lastSelectionEnd!=O.lastSelectionStart&&$==C)&&(D=l.right),$!==C&&(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=C,O.resetSelection("")}}};document.addEventListener("selectionchange",F),R.on("destroy",function(){document.removeEventListener("selectionchange",F)})},_.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)},_.prototype.$onContextMenu=function(x){this.host.textInput.onContextMenu(x),this.onContextMenuClose()},_.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()},_.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},_.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()))}},_.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)}}},_.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())},_.prototype.onCut=function(x){this.doCopy(x,!0)},_.prototype.onCopy=function(x){this.doCopy(x,!1)},_.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))},_.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()}))},_.prototype.handleClipboardData=function(x,R,I){var O=x.clipboardData||window.clipboardData;if(!(!O||a)){var L=h||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)}}},_.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||k.test(I)||T&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},_.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,C=0;L>0&&this.lastValue[C]==x[C];)C++,L--;for(F=F.slice(C),C=1;W>0&&this.lastValue.length-C>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-C]==x[x.length-C];)C++,W--;N-=C-1,$-=C-1;var D=F.length-C+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},_.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()):T&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},_.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}},_.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 $=[],C=this.rowStart;C<=this.rowEnd;C++)$.push(this.host.session.getLine(C));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 T&&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}},_.prototype.setHost=function(x){this.host=x},_.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},_.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+=p("text-input.aria-label","Cursor at row $0",[R+1])}this.text.setAttribute("aria-label",x)},_.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",p("text-input.aria-roledescription","editor")),this.setAriaLabel())},_.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)},_.prototype.blur=function(){this.text.blur()},_.prototype.isFocused=function(){return this.$isFocused},_.prototype.setInputHandler=function(x){this.inputHandler=x},_.prototype.getInputHandler=function(){return this.inputHandler},_.prototype.getElement=function(){return this.text},_.prototype.setCommandMode=function(x){this.commandMode=x,this.text.readOnly=!1},_.prototype.setReadOnly=function(x){this.commandMode||(this.text.readOnly=x)},_.prototype.setCopyWithEmptySelection=function(x){},_.prototype.onContextMenu=function(x){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:x}),this.moveToMouse(x,!0)},_.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=f.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(C){f.translate(I.text,C.clientX-F-2,Math.min(C.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)))},_.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},_}();r.TextInput=E,r.$setUserAgentForTests=function(_,x){T=_,b=x}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,u){var d=n("../lib/useragent"),p=0,w=550,f=function(){function a(h){h.$clickSelection=null;var c=h.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(h)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(h)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(h)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(h)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(h));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(l){h[l]=this[l]},this),h.selectByLines=this.extendSelectionBy.bind(h,"getLineRange"),h.selectByWords=this.extendSelectionBy.bind(h,"getWordRange")}return a.prototype.onMouseDown=function(h){var c=h.inSelection(),o=h.getDocumentPosition();this.mousedownEvent=h;var l=this.editor,m=h.getButton();if(m!==0){var b=l.getSelectionRange(),k=b.isEmpty();(k||m==1)&&l.selection.moveToPosition(o),m==2&&(l.textInput.onContextMenu(h.domEvent),d.isMozilla||h.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!l.isFocused()&&(l.focus(),this.$focusTimeout&&!this.$clickSelection&&!l.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(h);return}return this.captureMouse(h),this.startSelect(o,h.domEvent._clicks>1),h.preventDefault()},a.prototype.startSelect=function(h,c){h=h||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(h):c||o.selection.moveToPosition(h),c||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var h,c=this.editor,o=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(o);if(l==-1)h=this.$clickSelection.end;else if(l==1)h=this.$clickSelection.start;else{var m=i(this.$clickSelection,o);o=m.cursor,h=m.anchor}c.selection.setSelectionAnchor(h.row,h.column)}c.selection.selectToPosition(o),c.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(h){var c,o=this.editor,l=o.renderer.screenToTextCoordinates(this.x,this.y),m=o.selection[h](l.row,l.column);if(this.$clickSelection){var b=this.$clickSelection.comparePoint(m.start),k=this.$clickSelection.comparePoint(m.end);if(b==-1&&k<=0)c=this.$clickSelection.end,(m.end.row!=l.row||m.end.column!=l.column)&&(l=m.start);else if(k==1&&b>=0)c=this.$clickSelection.start,(m.start.row!=l.row||m.start.column!=l.column)&&(l=m.end);else if(b==-1&&k==1)l=m.end,c=m.start;else{var T=i(this.$clickSelection,l);l=T.cursor,c=T.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 h=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(h>p||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(h){var c=h.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(h){var c=h.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(h){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(h){if(!h.getAccelKey()){h.getShiftKey()&&h.wheelY&&!h.wheelX&&(h.wheelX=h.wheelY,h.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,l=h.domEvent.timeStamp,m=l-o.t,b=m?h.wheelX/m:o.vx,k=m?h.wheelY/m:o.vy;m<w&&(b=(b+o.vx)/2,k=(k+o.vy)/2);var T=Math.abs(b/k),E=!1;if(T>=1&&c.renderer.isScrollableBy(h.wheelX*h.speed,0)&&(E=!0),T<=1&&c.renderer.isScrollableBy(0,h.wheelY*h.speed)&&(E=!0),E)o.allowed=l;else if(l-o.allowed<w){var _=Math.abs(b)<=1.5*Math.abs(o.vx)&&Math.abs(k)<=1.5*Math.abs(o.vy);_?(E=!0,o.allowed=l):o.allowed=0}if(o.t=l,o.vx=b,o.vy=k,E)return c.renderer.scrollBy(h.wheelX*h.speed,h.wheelY*h.speed),h.stop()}},a}();f.prototype.selectEnd=f.prototype.selectByLinesEnd,f.prototype.selectAllEnd=f.prototype.selectByLinesEnd,f.prototype.selectByWordsEnd=f.prototype.selectByLinesEnd,r.DefaultHandlers=f;function g(a,h,c,o){return Math.sqrt(Math.pow(c-a,2)+Math.pow(o-h,2))}function i(a,h){if(a.start.row==a.end.row)var c=2*h.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var c=h.column-4;else var c=2*h.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,u){r.preventParentScroll=function(d){d.stopPropagation();var p=d.currentTarget,w=p.scrollHeight>p.clientHeight;w||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,u){var d=this&&this.__extends||function(){var l=function(m,b){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,T){k.__proto__=T}||function(k,T){for(var E in T)Object.prototype.hasOwnProperty.call(T,E)&&(k[E]=T[E])},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 k(){this.constructor=m}m.prototype=b===null?Object.create(b):(k.prototype=b.prototype,new k)}}(),p=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,b=m&&l[m],k=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&k>=l.length&&(l=void 0),{value:l&&l[k++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},w=n("./lib/dom");n("./lib/event");var f=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){this.getElement().style.left=m+"px",this.getElement().style.top=b+"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,k){m!=null&&this.setText(m),b!=null&&k!=null&&this.setPosition(b,k),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}(),h=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,k,T;this.popups.sort(function(F,N){return N.priority-F.priority});var E=[];try{for(var _=p(this.popups),x=_.next();!x.done;x=_.next()){var R=x.value,I=!0;try{for(var O=(k=void 0,p(E)),L=O.next();!L.done;L=O.next()){var W=L.value;if(this.doPopupsOverlap(W,R)){I=!1;break}}}catch(F){k={error:F}}finally{try{L&&!L.done&&(T=O.return)&&T.call(O)}finally{if(k)throw k.error}}I?E.push(R):R.hide()}}catch(F){m={error:F}}finally{try{x&&!x.done&&(b=_.return)&&b.call(_)}finally{if(m)throw m.error}}},l.prototype.doPopupsOverlap=function(m,b){var k=m.getElement().getBoundingClientRect(),T=b.getElement().getBoundingClientRect();return k.left<T.right&&k.right>T.left&&k.top<T.bottom&&k.bottom>T.top},l}(),c=new h;r.popupManager=c,r.Tooltip=a;var o=function(l){d(m,l);function m(b){b===void 0&&(b=document.body);var k=l.call(this,b)||this;k.timeout=void 0,k.lastT=0,k.idleTime=350,k.lastEvent=void 0,k.onMouseOut=k.onMouseOut.bind(k),k.onMouseMove=k.onMouseMove.bind(k),k.waitForHover=k.waitForHover.bind(k),k.hide=k.hide.bind(k);var T=k.getElement();return T.style.whiteSpace="pre-wrap",T.style.pointerEvents="auto",T.addEventListener("mouseout",k.onMouseOut),T.tabIndex=-1,T.addEventListener("blur",(function(){T.contains(document.activeElement)||this.hide()}).bind(k)),T.addEventListener("wheel",g),k}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,k){this.lastEvent=b,this.lastT=Date.now();var T=k.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||T||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||T||(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 k=b.editor,T=b.getDocumentPosition(),E=k.session.getLine(T.row);if(T.column==E.length){var _=k.renderer.pixelToScreenCoordinates(b.clientX,b.clientY),x=k.session.documentToScreenPosition(T.row,T.column);if(x.column!=_.column||x.row!=_.row)return!0}return!1},m.prototype.setDataProvider=function(b){this.$gatherData=b},m.prototype.showForRange=function(b,k,T,E){var _=10;if(!(E&&E!=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(k,b.session),this.range=f.fromPoints(k.start,k.end);var R=x.textToScreenCoordinates(k.start.row,k.start.column),I=x.scroller.getBoundingClientRect();R.pageX<I.left&&(R.pageX=I.left);var O=this.getElement();O.innerHTML="",O.appendChild(T),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)-_+"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-_)+"px"}},m.prototype.addMarker=function(b,k){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=k,this.marker=k&&k.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,u){var d=this&&this.__extends||function(){var l=function(m,b){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,T){k.__proto__=T}||function(k,T){for(var E in T)Object.prototype.hasOwnProperty.call(T,E)&&(k[E]=T[E])},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 k(){this.constructor=m}m.prototype=b===null?Object.create(b):(k.prototype=b.prototype,new k)}}(),p=this&&this.__values||function(l){var m=typeof Symbol=="function"&&Symbol.iterator,b=m&&l[m],k=0;if(b)return b.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&k>=l.length&&(l=void 0),{value:l&&l[k++],done:!l}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},w=n("../lib/dom"),f=n("../lib/event"),g=n("../tooltip").Tooltip,i=n("../config").nls,a=5,h=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=h;function c(l){var m=l.editor,b=m.renderer.$gutterLayer,k=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 T,E;function _(){var I=E.getDocumentPosition().row,O=m.session.getLength();if(I==O){var L=m.renderer.pixelToScreenCoordinates(0,E.y).row,W=E.$pos;if(L>m.session.documentToScreenRow(W.row,W.column))return x()}if(k.showTooltip(I),!!k.isOpen)if(m.on("mousewheel",x),m.on("changeSession",x),window.addEventListener("keydown",x,!0),l.$tooltipFollowsMouse)R(E);else{var F=E.getGutterRow(),N=b.$lines.get(F);if(N){var $=N.element.querySelector(".ace_gutter_annotation"),C=$.getBoundingClientRect(),D=k.getElement().style;D.left=C.right-a+"px",D.top=C.bottom-h+"px"}else R(E)}}function x(I){I&&I.type==="keydown"&&(I.ctrlKey||I.metaKey)||I&&I.type==="mouseout"&&(!I.relatedTarget||k.getElement().contains(I.relatedTarget))||(T&&(T=clearTimeout(T)),k.isOpen&&(k.hideTooltip(),m.off("mousewheel",x),m.off("changeSession",x),window.removeEventListener("keydown",x,!0)))}function R(I){k.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();k.isOpen&&l.$tooltipFollowsMouse&&R(I),E=I,!T&&(T=setTimeout(function(){T=null,E&&!l.isMousePressed&&_()},50))}),f.addListener(m.renderer.$gutter,"mouseout",function(I){E=null,k.isOpen&&(T=setTimeout(function(){T=null,x(I)},50))},m)}r.GutterHandler=c;var o=function(l){d(m,l);function m(b,k){k===void 0&&(k=!1);var T=l.call(this,b.container)||this;T.id="gt"+ ++m.$uid,T.editor=b,T.visibleTooltipRow;var E=T.getElement();return E.setAttribute("role","tooltip"),E.setAttribute("id",T.id),E.style.pointerEvents="auto",k&&(T.onMouseOut=T.onMouseOut.bind(T),E.addEventListener("mouseout",T.onMouseOut)),T}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,k){var T=window.innerWidth||document.documentElement.clientWidth,E=window.innerHeight||document.documentElement.clientHeight,_=this.getWidth(),x=this.getHeight();b+=15,k+=15,b+_>T&&(b-=b+_-T),k+x>E&&(k-=20+x),g.prototype.setPosition.call(this,b,k)},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 k,T=this.editor.renderer.$gutterLayer,E=T.$annotations[b],_;E?_={displayText:Array.from(E.displayText),type:Array.from(E.type)}:_={displayText:[],type:[]};var x=T.session.getFoldLine(b);if(x&&T.$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(T.$annotations[L])for(var W=0;W<T.$annotations[L].text.length;W++){var F=T.$annotations[L].type[W];R[F].push(T.$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.");_.displayText.push(N),_.type.push(O+"_fold")}}if(_.displayText.length===0)return this.hideTooltip();for(var $={error:[],security:[],warning:[],info:[],hint:[]},C=T.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=0;L<_.displayText.length;L++){var D=w.createElement("span"),z=w.createElement("span");(k=z.classList).add.apply(k,["ace_".concat(_.type[L]),C]),z.setAttribute("aria-label","".concat(m.annotationLabels[_.type[L].replace("_fold","")].singular)),z.setAttribute("role","img"),z.appendChild(w.createTextNode(" ")),D.appendChild(z),D.appendChild(w.createTextNode(_.displayText[L])),D.appendChild(w.createElement("br")),$[_.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 k=this.$findCellByRow(b);if(k){var T=k.element;if(T.childNodes.length>2)return T.childNodes[2]}},m.prototype.$findCellByRow=function(b){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(k){return k.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 k,T,E=[],_=["error","security","warning","info","hint"];try{for(var x=p(_),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;E.push("".concat(b[I].length," ").concat(O))}}}catch(L){k={error:L}}finally{try{R&&!R.done&&(T=x.return)&&T.call(x)}finally{if(k)throw k.error}}return E.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,u){var d=n("../lib/event"),p=n("../lib/useragent"),w=function(){function f(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 f.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},f.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},f.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},f.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},f.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},f.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},f.prototype.getButton=function(){return d.getButton(this.domEvent)},f.prototype.getShiftKey=function(){return this.domEvent.shiftKey},f.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},f}();r.MouseEvent=w}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,u){var d=n("../lib/dom"),p=n("../lib/event"),w=n("../lib/useragent"),f=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,k,T,E,_,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 T=ne.clientX,E=ne.clientY,k||z(),I++,ne.dataTransfer.dropEffect=O=he(ne),p.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return T=ne.clientX,E=ne.clientY,k||(z(),I++),G!==null&&(G=null),ne.dataTransfer.dropEffect=O=he(ne),p.preventDefault(ne)},this.onDragLeave=function(ne){if(I--,I<=0&&k)return U(),O=null,p.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(),p.preventDefault(ne)}},p.addListener(b,"dragstart",this.onDragStart.bind(c),o),p.addListener(b,"dragend",this.onDragEnd.bind(c),o),p.addListener(b,"dragenter",this.onDragEnter.bind(c),o),p.addListener(b,"dragover",this.onDragOver.bind(c),o),p.addListener(b,"dragleave",this.onDragLeave.bind(c),o),p.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:T,y:E};else{var Ee=h(N.x,N.y,T,E);Ee>i?F=null:ue-F>=g&&(o.renderer.scrollCursorIntoView(),F=null)}}function C(ne,le){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,ge=o.renderer.layerConfig.characterWidth,Ee=o.renderer.scroller.getBoundingClientRect(),Ae={x:{left:T-Ee.left,right:Ee.right-T},y:{top:E-Ee.top,bottom:Ee.bottom-E}},Re=Math.min(Ae.x.left,Ae.x.right),Xe=Math.min(Ae.y.top,Ae.y.bottom),Ke={row:ne.row,column:ne.column};Re/ge<=2&&(Ke.column+=Ae.x.left<Ae.x.right?-3:2),Xe/ce<=1&&(Ke.row+=Ae.y.top<Ae.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>=f&&o.renderer.scrollCursorIntoView(Ke):W=ue:W=null}function D(){var ne=R;R=o.renderer.screenToTextCoordinates(T,E),$(R,ne),C(R,ne)}function z(){x=o.selection.toOrientedRange(),k=o.session.addMarker(x,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(_),D(),_=setInterval(D,20),I=0,p.addListener(document,"mousemove",Z)}function U(){clearInterval(_),o.session.removeMarker(k),k=null,o.selection.fromOrientedRange(x),o.isFocused()&&!L&&o.$resetCursorStyle(),x=null,R=null,I=0,W=null,F=null,p.removeListener(document,"mousemove",Z)}var G=null;function Z(){G==null&&(G=setTimeout(function(){G!=null&&k&&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 Ee="none";return ce&&le.indexOf(ge)>=0?Ee="copy":ue.indexOf(ge)>=0?Ee="move":le.indexOf(ge)>=0&&(Ee="copy"),Ee}}(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=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);l>3&&o.dragDrop()}if(this.state==="dragWait"){var l=h(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 k=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in k&&(k.unselectable="on"),o.getDragDelay()){if(w.isWebKit){this.cancelDrag=!0;var T=o.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(a.prototype);function h(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,u){var d=n("./mouse_event").MouseEvent,p=n("../lib/event"),w=n("../lib/dom");r.addTouchListeners=function(f,g){var i="scroll",a,h,c,o,l,m,b=0,k,T=0,E=0,_=0,x,R;function I(){var $=window.navigator&&window.navigator.clipboard,C=!1,D=function(){var G=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();R.replaceChild(w.buildDom(C?["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"||!C)return C=!C,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",C=!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,C=g.renderer.textToScreenCoordinates($.row,$.column),D=g.renderer.textToScreenCoordinates(0,0).pageX,z=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();R.style.top=C.pageY-U.top-3+"px",C.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(),C=$.contains(k.row,k.column);($.isEmpty()||!C)&&(g.selection.moveToPosition(k),g.selection.selectWord()),i="wait",O()}function F(){l=null,clearTimeout(l),g.selection.moveToPosition(k);var $=T>=2?g.selection.getLineRange(k.row):g.session.getBracketRange(k);$&&!$.isEmpty()?g.selection.setRange($):g.selection.selectWord(),i="wait"}p.addListener(f,"contextmenu",function($){if(x){var C=g.textInput.getElement();C.focus()}},g),p.addListener(f,"touchstart",function($){var C=$.touches;if(l||C.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=C[0],Z=G.clientX,te=G.clientY;Math.abs(a-Z)+Math.abs(h-te)>D&&(c=-1),a=$.clientX=Z,h=$.clientY=te,E=_=0;var he=new d($,g);if(k=he.getDocumentPosition(),U-c<500&&C.length==1&&!b)T++,$.preventDefault(),$.button=0,F();else{T=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(),Ee=g.renderer.layerConfig.offset,Ae=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+Ae,$.clientY-ge.top-ue.top+Ee),Ke=Re($.clientX-ge.left-ce.left+Ae,$.clientY-ge.top-ce.top+Ee);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),p.addListener(f,"touchend",function($){x=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),i=="zoom"?(i="",b=0):l?(g.selection.moveToPosition(k),b=0,O()):i=="scroll"?(N(),L()):O(),clearTimeout(l),l=null},g),p.addListener(f,"touchmove",function($){l&&(clearTimeout(l),l=null);var C=$.touches;if(!(C.length>1||i=="zoom")){var D=C[0],z=a-D.clientX,U=h-D.clientY;if(i=="wait")if(z*z+U*U>4)i="cursor";else return $.preventDefault();a=D.clientX,h=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&&(E=z/Z,_=U/Z),g._emit("mousewheel",te),te.propagationStopped||(E=_=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(E)<.01&&(E=0),Math.abs(_)<.01&&(_=0),b<20&&(E=.9*E),b<20&&(_=.9*_);var $=g.session.getScrollTop();g.renderer.scrollBy(10*E,10*_),$==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,u){var d=n("../lib/event"),p=n("../lib/useragent"),w=n("./default_handlers").DefaultHandlers,f=n("./default_gutter_handler").GutterHandler,g=n("./mouse_event").MouseEvent,i=n("./dragdrop_handler").DragdropHandler,a=n("./touch_handler").addTouchListeners,h=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 f(this),new i(this);var b=function(E){var _=!document.hasFocus||!document.hasFocus()||!l.isFocused()&&document.activeElement==(l.textInput&&l.textInput.getElement());_&&window.focus(),l.focus(),setTimeout(function(){l.isFocused()||l.focus()})},k=l.renderer.getMouseEventTarget();d.addListener(k,"click",this.onMouseEvent.bind(this,"click"),l),d.addListener(k,"mousemove",this.onMouseMove.bind(this,"mousemove"),l),d.addMultiMouseDownListener([k,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 T=l.renderer.$gutter;d.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),l),d.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),l),d.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),l),d.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),l),d.addListener(k,"mousedown",b,l),d.addListener(T,"mousedown",b,l),p.isIE&&l.renderer.scrollBarV&&(d.addListener(l.renderer.scrollBarV.element,"mousedown",b,l),d.addListener(l.renderer.scrollBarH.element,"mousedown",b,l)),l.on("mousemove",function(E){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var _=l.renderer.screenToTextCoordinates(E.x,E.y),x=l.session.selection.getRange(),R=l.renderer;!x.isEmpty()&&x.insideStart(_.row,_.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,k=this.editor.renderer;k.$isMousePressed=!0;var T=this,E=!0,_=function(L){if(L){if(p.isWebKit&&!L.which&&T.releaseMouse)return T.releaseMouse();T.x=L.clientX,T.y=L.clientY,m&&m(L),T.mouseEvent=new g(L,T.editor),T.$mouseMoved=!0}},x=function(L){b.off("beforeEndOperation",O),E=!1,b.session&&R(),T[T.state+"End"]&&T[T.state+"End"](L),T.state="",T.isMousePressed=k.$isMousePressed=!1,k.$keepTextAreaAtCursor&&k.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,L&&T.onMouseEvent("mouseup",L),b.endOperation()},R=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1},I=function(){E&&(R(),d.nextFrame(I))};if(p.isOldIE&&l.domEvent.type=="dblclick")return setTimeout(function(){x(l)});var O=function(L){T.releaseMouse&&b.curOp.command.name&&b.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};b.on("beforeEndOperation",O),b.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=_,T.releaseMouse=d.capture(this.editor.container,_,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,h.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.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,u){var d=n("../lib/dom"),p=function(){function w(f){f.on("click",function(g){var i=g.getDocumentPosition(),a=f.session,h=a.getFoldAt(i.row,i.column,1);h&&(g.getAccelKey()?a.removeFold(h):a.expandFold(h),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()),f.renderer.scrollCursorIntoView())}),f.on("gutterclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.session;h.foldWidgets&&h.foldWidgets[a]&&f.session.onFoldWidgetClick(a,g),f.isFocused()||f.focus(),g.stop()}}),f.on("gutterdblclick",function(g){var i=f.renderer.$gutterLayer.getRegion(g);if(i=="foldWidgets"){var a=g.getDocumentPosition().row,h=f.session,c=h.getParentFoldRangeData(a,!0),o=c.range||c.firstRange;if(o){a=o.start.row;var l=h.getFoldAt(a,h.getLine(a).length,1);l?h.removeFold(l):(h.addFold("...",o),f.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}g.stop()}})}return w}();r.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,u){var d=n("../lib/keys"),p=n("../lib/event"),w=function(){function f(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return f.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},f.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)}},f.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)}},f.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)},f.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},f.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(" ")},f.prototype.$callKeyboardHandlers=function(g,i,a,h){for(var c,o=!1,l=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,g,i,a,h),!(!(!c||!c.command)&&(c.command=="null"?o=!0:o=l.exec(c.command,this.$editor,c.args,h),o&&h&&g!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&p.stopEvent(h),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},f.prototype.onCommandKey=function(g,i,a){var h=d.keyCodeToString(a);return this.$callKeyboardHandlers(i,h,a,g)},f.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},f}();r.KeyBinding=w}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,u){var d=0,p=0,w=!1,f=!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]],h=0,c=1,o=0,l=1,m=2,b=3,k=4,T=5,E=6,_=7,x=8,R=9,I=10,O=11,L=12,W=13,F=14,N=15,$=16,C=17,D=18,z=[D,D,D,D,D,D,D,D,D,E,T,E,x,T,D,D,D,D,D,D,D,D,D,D,D,D,D,D,T,T,T,E,x,k,k,O,O,O,k,k,k,k,k,I,R,I,R,R,m,m,m,m,m,m,m,m,m,m,R,k,k,k,k,k,k,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,k,k,k,k,k,k,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,k,k,k,k,D,D,D,D,D,D,T,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,k,O,O,O,O,k,k,k,k,o,k,k,D,k,k,O,O,m,m,k,o,k,k,k,m,o,k,k,k,k,k],U=[x,x,x,x,x,x,x,x,x,x,x,D,D,D,o,l,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,x,T,W,F,N,$,C,R,O,O,O,O,O,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,R,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,x];function G(ne,le,ue,ce){var ge=d?a:i,Ee=null,Ae=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(p=d,w=!1,f=!1,g=!1,tn=0;tn<ue;tn++){if(Ee=Xe,Bn[tn]=Ae=te(ne,ce,Bn,tn),Xe=ge[Ee][Ae],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]==T&&(le[tn]=0),p|=Re}if(g){for(gt=0;gt<ue;gt++)if(ce[gt]==E){le[gt]=d;for(var Zt=gt-1;Zt>=0&&ce[Zt]==x;Zt--)le[Zt]=d}}}function Z(ne,le,ue){if(!(p<ne)){if(ne==1&&d==c&&!f){ue.reverse();return}for(var ce=ue.length,ge=0,Ee,Ae,Re,Xe;ge<ce;){if(le[ge]>=ne){for(Ee=ge+1;Ee<ce&&le[Ee]>=ne;)Ee++;for(Ae=ge,Re=Ee-1;Ae<Re;Ae++,Re--)Xe=ue[Ae],ue[Ae]=ue[Re],ue[Re]=Xe;ge=Ee}ge++}}}function te(ne,le,ue,ce){var ge=le[ce],Ee,Ae,Re,Xe;switch(ge){case o:case l:w=!1;case k:case b:return ge;case m:return w?b:m;case _:return w=!0,l;case x:return k;case R:return ce<1||ce+1>=le.length||(Ee=ue[ce-1])!=m&&Ee!=b||(Ae=le[ce+1])!=m&&Ae!=b?k:(w&&(Ae=b),Ae==Ee?Ae:k);case I:return Ee=ce>0?ue[ce-1]:T,Ee==m&&ce+1<le.length&&le[ce+1]==m?m:k;case O:if(ce>0&&ue[ce-1]==m)return m;if(w)return k;for(Xe=ce+1,Re=le.length;Xe<Re&&le[Xe]==O;)Xe++;return Xe<Re&&le[Xe]==m?m:k;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(Ee=le[Xe],dt&&(Ee==l||Ee==_))return l}return ce<1||(Ee=le[ce-1])==T?k:ue[ce-1];case T:return w=!1,f=!0,d;case E:return g=!0,k;case W:case F:case $:case C:case N:w=!1;case D:return k}}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:_:ue==32&&le<=8287?U[le&255]:ue==254&&le>=65136?_:k}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),Ee=new Array(ce.length),Ae=[];d=ue?c:h,G(ce,Ae,ce.length,le);for(var Re=0;Re<ge.length;ge[Re]=Re,Re++);Z(2,Ae,ge),Z(1,Ae,ge);for(var Re=0;Re<ge.length-1;Re++)le[Re]===b?Ae[Re]=r.AN:Ae[Re]===l&&(le[Re]>_&&le[Re]<W||le[Re]===k||le[Re]===D)?Ae[Re]=r.ON_R:Re>0&&ce[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Re])&&(Ae[Re-1]=Ae[Re]=r.R_H,Re++);ce[ce.length-1]===r.DOT&&(Ae[ce.length-1]=r.B),ce[0]==="‫"&&(Ae[0]=r.RLE);for(var Re=0;Re<ge.length;Re++)Ee[Re]=Ae[ge[Re]];return{logicalFromVisual:ge,bidiLevels:Ee}},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]==_||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,u){var d=n("./lib/bidiutil"),p=n("./lib/lang"),w=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,f=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,h){return this.seenBidi?(i!==this.currentRow&&(this.currentRow=i,this.updateRowLine(a,h),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 h=this.session.$getRowCacheIndex(a,this.currentRow);h>=0&&(i=this.session.$docRowCache[h])}return i},g.prototype.getSplitIndex=function(){var i=0,a=this.session.$screenRowCache;if(a.length)for(var h,c=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-i>0&&(h=this.session.$getRowCacheIndex(a,this.currentRow-i-1),h===c);)c=h,i++;else i=this.currentRow;return i},g.prototype.updateRowLine=function(i,a){i===void 0&&(i=this.getDocumentRow());var h=i===this.session.getLength()-1,c=h?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(k,T){return k===" "||l.isFullWidth(k.charCodeAt(0))?(b=k===" "?l.getScreenTabSize(T+m):2,m+=b-1,p.stringRepeat(d.DOT,b)):k}),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,h=i.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=a,this.charWidths[d.R]=this.charWidths[d.AN]=h,this.charWidths[d.R_H]=h*.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 h=i.getCursorPosition(),c=i.selection.getSelectionAnchor().row;c<=h.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,h=i>a?this.session.getOverwrite()?i:i-1:a,c=d.getVisualFromLogicalIdx(h,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 h=this.bidiMap,c=h.bidiLevels,o,l=[],m=0,b=Math.min(i,a)-this.wrapIndent,k=Math.max(i,a)-this.wrapIndent,T=!1,E=!1,_=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var x,R=0;R<c.length;R++)x=h.logicalFromVisual[R],o=c[R],T=x>=b&&x<k,T&&!E?_=m:!T&&E&&l.push({left:_,width:m-_}),m+=this.charWidths[o],E=T;if(T&&R===c.length&&l.push({left:_,width:m-_}),this.isRtlDir)for(var I=0;I<l.length;I++)l[I].left+=this.rtlLineOffset;return l},g.prototype.offsetToCol=function(h){this.isRtlDir&&(h-=this.rtlLineOffset);var a=0,h=Math.max(h,0),c=0,o=0,l=this.bidiMap.bidiLevels,m=this.charWidths[l[o]];for(this.wrapIndent&&(h-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);h>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?(h<c&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&l[o-1]%2===0&&l[o]%2!==0?a=1+(h>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=f}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,u){var d=n("./lib/oop"),p=n("./lib/lang"),w=n("./lib/event_emitter").EventEmitter,f=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 h=this;this.cursor.on("change",function(c){h.$cursorChanged=!0,h.$silent||h._emit("changeCursor"),!h.$isEmpty&&!h.$silent&&h._emit("changeSelection"),!h.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(h.$desiredColumn=null)}),this.anchor.on("change",function(){h.$anchorChanged=!0,!h.$isEmpty&&!h.$silent&&h._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,h){this.$isEmpty=!1,this.anchor.setPosition(a,h)},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,h=this.lead;return a.row>h.row||a.row==h.row&&a.column>h.column},i.prototype.getRange=function(){var a=this.anchor,h=this.lead;return this.$isEmpty?f.fromPoints(h,h):this.isBackwards()?f.fromPoints(h,a):f.fromPoints(a,h)},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,h){var c=h?a.end:a.start,o=h?a.start:a.end;this.$setSelection(c.row,c.column,o.row,o.column)},i.prototype.$setSelection=function(a,h,c,o){if(!this.$silent){var l=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,h),this.cursor.setPosition(c,o),this.$isEmpty=!f.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 h=this.lead;this.$isEmpty&&this.setSelectionAnchor(h.row,h.column),a.call(this)},i.prototype.selectTo=function(a,h){this.$moveSelection(function(){this.moveCursorTo(a,h)})},i.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},i.prototype.moveTo=function(a,h){this.clearSelection(),this.moveCursorTo(a,h)},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,h){if(typeof h>"u"){var c=a||this.lead;a=c.row,h=c.column}return this.session.getWordRange(a,h)},i.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},i.prototype.selectAWord=function(){var a=this.getCursor(),h=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(h)},i.prototype.getLineRange=function(a,h){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,h===!0?new f(c,0,o,this.session.getLine(o).length):new f(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,h,c){var o=a.column,l=a.column+h;return c<0&&(o=a.column-h,l=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,l).split(" ").length-1==h},i.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),h;if(h=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(h.start.row,h.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(),h;if(h=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(h.end.row,h.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,h=this.lead.column,c=this.session.documentToScreenRow(a,h),o=this.session.screenToDocumentPosition(c,0),l=this.session.getDisplayLine(a,null,o.row,o.column),m=l.match(/^\s*/);m[0].length!=h&&!this.session.$useEmacsStyleLineStart&&(o.column+=m[0].length),this.moveCursorToPosition(o)},i.prototype.moveCursorLineEnd=function(){var a=this.lead,h=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==h.column){var c=this.session.getLine(h.row);if(h.column==c.length){var o=c.search(/\s+$/);o>0&&(h.column=o)}}this.moveCursorTo(h.row,h.column)},i.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,h=this.doc.getLine(a).length;this.moveCursorTo(a,h)},i.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},i.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,h=this.lead.column,c=this.doc.getLine(a),o=c.substring(h);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var l=this.session.getFoldAt(a,h,1);if(l){this.moveCursorTo(l.end.row,l.end.column);return}if(this.session.nonTokenRe.exec(o)&&(h+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=c.substring(h)),h>=c.length){this.moveCursorTo(a,c.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(h+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,h)},i.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,h=this.lead.column,c;if(c=this.session.getFoldAt(a,h,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var o=this.session.getFoldStringAt(a,h,-1);o==null&&(o=this.doc.getLine(a).substring(0,h));var l=p.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(l)&&(h-=this.session.nonTokenRe.lastIndex,l=l.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),h<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(l)&&(h-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,h)},i.prototype.$shortWordEndIndex=function(a){var h=0,c,o=/\s/,l=this.session.tokenRe;if(l.lastIndex=0,this.session.tokenRe.exec(a))h=this.session.tokenRe.lastIndex;else{for(;(c=a[h])&&o.test(c);)h++;if(h<1){for(l.lastIndex=0;(c=a[h])&&!l.test(c);)if(l.lastIndex=0,h++,o.test(c))if(h>2){h--;break}else{for(;(c=a[h])&&o.test(c);)h++;if(h>2)break}}}return l.lastIndex=0,h},i.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,h=this.lead.column,c=this.doc.getLine(a),o=c.substring(h),l=this.session.getFoldAt(a,h,1);if(l)return this.moveCursorTo(l.end.row,l.end.column);if(h==c.length){var m=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<m&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),h=0}var b=this.$shortWordEndIndex(o);this.moveCursorTo(a,h+b)},i.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,h=this.lead.column,c;if(c=this.session.getFoldAt(a,h,-1))return this.moveCursorTo(c.start.row,c.start.column);var o=this.session.getLine(a).substring(0,h);if(h===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));h=o.length,/\s+$/.test(o)||(o="")}var l=p.stringReverse(o),m=this.$shortWordEndIndex(l);return this.moveCursorTo(a,h-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,h){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(h===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&&h===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+h,h===0)},i.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},i.prototype.moveCursorTo=function(a,h,c){var o=this.session.getFoldAt(a,h,1);o&&(a=o.start.row,h=o.start.column),this.$keepDesiredColumnOnChange=!0;var l=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(l.charAt(h))&&l.charAt(h-1)&&(this.lead.row==a&&this.lead.column==h+1?h=h-1:h=h+1),this.lead.setPosition(a,h),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},i.prototype.moveCursorToScreen=function(a,h,c){var o=this.session.screenToDocumentPosition(a,h);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 h=this.getRange();return a?(a.start.column=h.start.column,a.start.row=h.start.row,a.end.column=h.end.column,a.end.row=h.end.row):a=h,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},i.prototype.getRangeOfMovements=function(a){var h=this.getCursor();try{a(this);var c=this.getCursor();return f.fromPoints(h,c)}catch{return f.fromPoints(h,h)}finally{this.moveCursorToPosition(h)}},i.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(h){var c=h.clone();return c.isBackwards=h.cursor==h.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 h=a.length;h--;){var c=f.fromPoints(a[h].start,a[h].end);a[h].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 h=this.ranges.length;h--;)if(!this.ranges[h].isEqual(a[h]))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,u){var d=n("./lib/report_error").reportError,p=2e3,w=function(){function f(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var i in this.states){for(var a=this.states[i],h=[],c=0,o=this.matchMappings[i]={defaultToken:"text"},l="g",m=[],b=0;b<a.length;b++){var k=a[b];if(k.defaultToken&&(o.defaultToken=k.defaultToken),k.caseInsensitive&&l.indexOf("i")===-1&&(l+="i"),k.unicode&&l.indexOf("u")===-1&&(l+="u"),k.regex!=null){k.regex instanceof RegExp&&(k.regex=k.regex.toString().slice(1,-1));var T=k.regex,E=new RegExp("(?:("+T+")|(.))").exec("a").length-2;Array.isArray(k.token)?k.token.length==1||E==1?k.token=k.token[0]:E-1!=k.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:k,groupCount:E-1}),k.token=k.token[0]):(k.tokenArray=k.token,k.token=null,k.onMatch=this.$arrayTokens):typeof k.token=="function"&&!k.onMatch&&(E>1?k.onMatch=this.$applyToken:k.onMatch=k.token),E>1&&(/\\\d/.test(k.regex)?T=k.regex.replace(/\\([0-9]+)/g,function(_,x){return"\\"+(parseInt(x,10)+c+1)}):(E=1,T=this.removeCapturingGroups(k.regex)),!k.splitRegex&&typeof k.token!="string"&&m.push(k)),o[c]=b,c+=E,h.push(T),k.onMatch||(k.onMatch=null)}}h.length||(o[0]=0,h.push("$")),m.forEach(function(_){_.splitRegex=this.createSplitterRegexp(_.regex,l)},this),this.regExps[i]=new RegExp("("+h.join(")|(")+")|($)",l)}}return f.prototype.$setMaxTokenCount=function(g){p=g|0},f.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 h=[],c=0,o=a.length;c<o;c++)i[c]&&(h[h.length]={type:a[c],value:i[c]});return h},f.prototype.$arrayTokens=function(g){if(!g)return[];var i=this.splitRegex.exec(g);if(!i)return"text";for(var a=[],h=this.tokenArray,c=0,o=h.length;c<o;c++)i[c+1]&&(a[a.length]={type:h[c],value:i[c+1]});return a},f.prototype.removeCapturingGroups=function(g){var i=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,h){return h?"(?:":a});return i},f.prototype.createSplitterRegexp=function(g,i){if(g.indexOf("(?=")!=-1){var a=0,h=!1,c={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,l,m,b,k,T){return h?h=k!="]":k?h=!0:b?(a==c.stack&&(c.end=T+1,c.stack=-1),a--):m&&(a++,m.length!=1&&(c.stack=a,c.start=T)),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",""))},f.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 h=i||"start",c=this.states[h];c||(h="start",c=this.states[h]);var o=this.matchMappings[h],l=this.regExps[h];l.lastIndex=0;for(var m,b=[],k=0,T=0,E={type:null,value:""};m=l.exec(g);){var _=o.defaultToken,x=null,R=m[0],I=l.lastIndex;if(I-R.length>k){var O=g.substring(k,I-R.length);E.type==_?E.value+=O:(E.type&&b.push(E),E={type:_,value:O})}for(var L=0;L<m.length-2;L++)if(m[L+1]!==void 0){x=c[o[L]],x.onMatch?_=x.onMatch(R,h,a,g):_=x.token,x.next&&(typeof x.next=="string"?h=x.next:h=x.next(h,a),c=this.states[h],c||(this.reportError("state doesn't exist",h),h="start",c=this.states[h]),o=this.matchMappings[h],k=I,l=this.regExps[h],l.lastIndex=I),x.consumeLineEnd&&(k=I);break}if(R){if(typeof _=="string")(!x||x.merge!==!1)&&E.type===_?E.value+=R:(E.type&&b.push(E),E={type:_,value:R});else if(_){E.type&&b.push(E),E={type:null,value:""};for(var L=0;L<_.length;L++)b.push(_[L])}}if(k==g.length)break;if(k=I,T++>p){for(T>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:i,line:g});k<g.length;)E.type&&b.push(E),E={value:g.substring(k,k+=500),type:"overflow"};h="start",a=[];break}}return E.type&&b.push(E),a.length>1&&a[0]!==h&&a.unshift("#tmp",h),{tokens:b,state:a.length?a:h}},f}();w.prototype.reportError=d,r.Tokenizer=w}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,u){var d=n("../lib/deep_copy").deepCopy,p;p=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 h=g[a],c=0;c<h.length;c++){var o=h[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]=h}},this.getRules=function(){return this.$rules},this.embedRules=function(g,i,a,h,c){var o=typeof g=="function"?new g().getRules():g;if(h)for(var l=0;l<h.length;l++)h[l]=i+h[l];else{h=[];for(var m in o)h.push(i+m)}if(this.addRules(o,i),a)for(var b=Array.prototype[c?"push":"unshift"],l=0;l<h.length;l++)b.apply(this.$rules[h[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},f=function(g,i){return i.shift(),i.shift()||"start"};this.normalizeRules=function(){var g=0,i=this.$rules;function a(h){var c=i[h];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 k=l.stateName;k||(k=l.token,typeof k!="string"&&(k=k[0]||""),i[k]&&(k+=g++)),i[k]=b,l.next=k,a(k)}else b=="pop"&&(l.next=f);if(l.push&&(l.nextState=l.next||l.push,l.next=w,delete l.push),l.rules)for(var T in l.rules)i[T]?i[T].push&&i[T].push.apply(i[T],l.rules[T]):i[T]=l.rules[T];var E=typeof l=="string"?l:l.include;if(E&&(E==="$self"&&(E="start"),Array.isArray(E)?m=E.map(function(x){return i[x]}):m=i[E]),m){var _=[o,1].concat(m);l.noEscape&&(_=_.filter(function(x){return!x.next})),c.splice.apply(c,_),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,h){var c=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(o){for(var l=g[o],m=l.split(h||"|"),b=m.length;b--;){var k=m[b];this.$keywordList.push(k),a&&(k=k.toLowerCase()),c[k]=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(p.prototype),r.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,u){var d;d=function(){this.$behaviours={}},(function(){this.add=function(p,w,f){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][w]=f},this.addBehaviours=function(p){for(var w in p)for(var f in p[w])this.add(w,f,p[w][f])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,w){if(typeof p=="function")var f=new p().getBehaviours(w);else var f=p.getBehaviours(w);this.addBehaviours(f)},this.getBehaviours=function(p){if(p){for(var w={},f=0;f<p.length;f++)this.$behaviours[p[f]]&&(w[p[f]]=this.$behaviours[p[f]]);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,u){var d=n("./range").Range,p=function(){function w(f,g,i){this.$session=f,this.$row=g,this.$rowTokens=f.getTokens(g);var a=f.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 f;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,f||(f=this.$session.getLength()),this.$row>=f)return this.$row=f-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 f=this.$rowTokens,g=this.$tokenIndex,i=f[g].start;if(i!==void 0)return i;for(i=0;g>0;)g-=1,i+=f[g].value.length;return i},w.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},w.prototype.getCurrentTokenRange=function(){var f=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+f.value.length)},w}();r.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,u){var d=n("../../lib/oop"),p=n("../behaviour").Behaviour,w=n("../../token_iterator").TokenIterator,f=n("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],i=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,h={},c={'"':'"',"'":"'"},o=function(b){var k=-1;if(b.multiSelect&&(k=b.selection.index,h.rangeCount!=b.multiSelect.rangeCount&&(h={rangeCount:b.multiSelect.rangeCount})),h[k])return a=h[k];a=h[k]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},l=function(b,k,T,E){var _=b.end.row-b.start.row;return{text:T+k+E,selection:[0,b.start.column+1,_,b.end.column+(_?0:1)]}},m;m=function(b){b=b||{},this.add("braces","insertion",function(k,T,E,_,x){var R=E.getCursorPosition(),I=_.doc.getLine(R.row);if(x=="{"){o(E);var O=E.getSelectionRange(),L=_.doc.getTextRange(O),W=_.getTokenAt(R.row,R.column);if(L!==""&&L!=="{"&&E.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(E,_,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion(E,_))return/[\]\}\)]/.test(I[R.column])||E.inMultiSelectMode||b.braces?(m.recordAutoInsert(E,_,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(E,_,"{"),{text:"{",selection:[1,1]})}else if(x=="}"){o(E);var N=I.substring(R.column,R.column+1);if(N=="}"){var $=_.$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(E);var C="";m.isMaybeInsertedClosing(R,I)&&(C=f.stringRepeat("}",a.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var N=I.substring(R.column,R.column+1);if(N==="}"){var D=_.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!D)return null;var z=this.$getIndent(_.getLine(D.row))}else if(C)var z=this.$getIndent(I);else{m.clearMaybeInsertedClosing();return}var U=z+_.getTabString();return{text:`
188
+ `+U+`
189
+ `+z+C,selection:[1,U.length,1,U.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(k,T,E,_,x){var R=_.doc.getTextRange(x);if(!x.isMultiLine()&&R=="{"){o(E);var I=_.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(k,T,E,_,x){if(x=="("){o(E);var R=E.getSelectionRange(),I=_.doc.getTextRange(R);if(I!==""&&E.getWrapBehavioursEnabled())return l(R,I,"(",")");if(m.isSaneInsertion(E,_))return m.recordAutoInsert(E,_,")"),{text:"()",selection:[1,1]}}else if(x==")"){o(E);var O=E.getCursorPosition(),L=_.doc.getLine(O.row),W=L.substring(O.column,O.column+1);if(W==")"){var F=_.$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(k,T,E,_,x){var R=_.doc.getTextRange(x);if(!x.isMultiLine()&&R=="("){o(E);var I=_.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(k,T,E,_,x){if(x=="["){o(E);var R=E.getSelectionRange(),I=_.doc.getTextRange(R);if(I!==""&&E.getWrapBehavioursEnabled())return l(R,I,"[","]");if(m.isSaneInsertion(E,_))return m.recordAutoInsert(E,_,"]"),{text:"[]",selection:[1,1]}}else if(x=="]"){o(E);var O=E.getCursorPosition(),L=_.doc.getLine(O.row),W=L.substring(O.column,O.column+1);if(W=="]"){var F=_.$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(k,T,E,_,x){var R=_.doc.getTextRange(x);if(!x.isMultiLine()&&R=="["){o(E);var I=_.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(k,T,E,_,x){var R=_.$mode.$quotes||c;if(x.length==1&&R[x]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(x)!=-1)return;o(E);var I=x,O=E.getSelectionRange(),L=_.doc.getTextRange(O);if(L!==""&&(L.length!=1||!R[L])&&E.getWrapBehavioursEnabled())return l(O,L,I,I);if(!L){var W=E.getCursorPosition(),F=_.doc.getLine(W.row),N=F.substring(W.column-1,W.column),$=F.substring(W.column,W.column+1),C=_.getTokenAt(W.row,W.column),D=_.getTokenAt(W.row,W.column+1);if(N=="\\"&&C&&/escape/.test(C.type))return null;var z=C&&/string|escape/.test(C.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=_.$mode.tokenRe;Z.lastIndex=0;var te=Z.test(N);Z.lastIndex=0;var he=Z.test($),ne=_.$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(k,T,E,_,x){var R=_.$mode.$quotes||c,I=_.doc.getTextRange(x);if(!x.isMultiLine()&&R.hasOwnProperty(I)){o(E);var O=_.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(k,T,E,_,x){if(k==="doc-start"&&(x===`
190
+ `||x===`\r
191
+ `)&&E.selection.isEmpty()){var R=E.getCursorPosition();if(R.column===0)return;for(var I=_.doc.getLine(R.row),O=_.doc.getLine(R.row+1),L=_.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 C=R.column-(W-N.value.length),D=N.value.indexOf("*/"),z=N.value.indexOf("/**",D>-1?D+2:0);if(z!==-1&&C>z&&C<z+3||D!==-1&&z!==-1&&C>=D&&C<=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,k){var T=b.getCursorPosition(),E=new w(k,T.row,T.column);if(!this.$matchTokenType(E.getCurrentToken()||"text",g)){if(/[)}\]]/.test(b.session.getLine(T.row)[T.column]))return!0;var _=new w(k,T.row,T.column+1);if(!this.$matchTokenType(_.getCurrentToken()||"text",g))return!1}return E.stepForward(),E.getCurrentTokenRow()!==T.row||this.$matchTokenType(E.getCurrentToken()||"text",i)},m.$matchTokenType=function(b,k){return k.indexOf(b.type||b)>-1},m.recordAutoInsert=function(b,k,T){var E=b.getCursorPosition(),_=k.doc.getLine(E.row);this.isAutoInsertedClosing(E,_,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=E.row,a.autoInsertedLineEnd=T+_.substr(E.column),a.autoInsertedBrackets++},m.recordMaybeInsert=function(b,k,T){var E=b.getCursorPosition(),_=k.doc.getLine(E.row);this.isMaybeInsertedClosing(E,_)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=E.row,a.maybeInsertedLineStart=_.substr(0,E.column)+T,a.maybeInsertedLineEnd=_.substr(E.column),a.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(b,k,T){return a.autoInsertedBrackets>0&&b.row===a.autoInsertedRow&&T===a.autoInsertedLineEnd[0]&&k.substr(b.column)===a.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(b,k){return a.maybeInsertedBrackets>0&&b.row===a.maybeInsertedRow&&k.substr(b.column)===a.maybeInsertedLineEnd&&k.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,p),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,u){for(var d=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],p=0,w=[],f=0;f<d.length;f+=2)w.push(p+=d[f]),d[f+1]&&w.push(45,p+=d[f+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,u){var d=n("../config"),p=n("../tokenizer").Tokenizer,w=n("./text_highlight_rules").TextHighlightRules,f=n("./behaviour/cstyle").CstyleBehaviour,g=n("../unicode"),i=n("../lib/lang"),a=n("../token_iterator").TokenIterator,h=n("../range").Range,c;c=function(){this.HighlightRules=w},(function(){this.$defaultBehaviour=new f,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 p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(o,l,m,b){var k=l.doc,T=!0,E=!0,_=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--,k.removeInLine(Z,he,ne)}},W=O+" ",F=function(G,Z){(!T||/\S/.test(G))&&($(G,_,_)?k.insertInLine({row:Z,column:_},W):k.insertInLine({row:Z,column:_},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,C=this.blockComment.end,I=new RegExp("^(\\s*)(?:"+i.escapeRegExp(O)+")"),D=new RegExp("(?:"+i.escapeRegExp(C)+")\\s*$"),F=function(le,ue){N(le,ue)||(!T||/\S/.test(le))&&(k.insertInLine({row:ue,column:le.length},C),k.insertInLine({row:ue,column:_},O))},L=function(le,ue){var ce;(ce=le.match(D))&&k.removeInLine(ue,le.length-ce[0].length,le.length),(ce=le.match(I))&&k.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(k.getLine(Z),Z)}var U=1/0;z(function(G,Z){var te=G.search(/\S/);te!==-1?(te<_&&(_=te),E&&!N(G,Z)&&(E=!1)):U>G.length&&(U=G.length)}),_==1/0&&(_=U,T=!1,E=!1),R&&_%x!=0&&(_=Math.floor(_/x)*x),z(E?L:F)},this.toggleBlockComment=function(o,l,m,b){var k=this.blockComment;if(k){!k.start&&k[0]&&(k=k[0]);var T=new a(l,b.row,b.column),E=T.getCurrentToken();l.selection;var _=l.selection.toOrientedRange(),x,R;if(E&&/comment/.test(E.type)){for(var I,O;E&&/comment/.test(E.type);){var L=E.value.indexOf(k.start);if(L!=-1){var W=T.getCurrentTokenRow(),F=T.getCurrentTokenColumn()+L;I=new h(W,F,W,F+k.start.length);break}E=T.stepBackward()}for(var T=new a(l,b.row,b.column),E=T.getCurrentToken();E&&/comment/.test(E.type);){var L=E.value.indexOf(k.end);if(L!=-1){var W=T.getCurrentTokenRow(),F=T.getCurrentTokenColumn()+L;O=new h(W,F,W,F+k.end.length);break}E=T.stepForward()}O&&l.remove(O),I&&(l.remove(I),x=I.start.row,R=-k.start.length)}else R=k.start.length,x=m.start.row,l.insert(m.end,k.end),l.insert(m.start,k.start);_.start.row==x&&(_.start.column+=R),_.end.row==x&&(_.end.column+=R),l.selection.fromOrientedRange(_)}},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,k=d.$modes[b];k||(d.$modes[b]=k=new m),d.$modes[l]||(d.$modes[l]=k),this.$embeds.push(l),this.$modes[l]=k}for(var T=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],E=function(R){(function(I){var O=T[R],L=I[O];I[T[R]]=function(){return this.$delegator(O,arguments,L)}})(_)},_=this,l=0;l<T.length;l++)E(l)},this.$delegator=function(o,l,m){var b=l[0]||"start";if(typeof b!="string"){if(Array.isArray(b[2])){var k=b[2][b[2].length-1],T=this.$modes[k];if(T)return T[o].apply(T,[b[1]].concat([].slice.call(l,1)))}b=b[0]||"start"}for(var E=0;E<this.$embeds.length;E++)if(this.$modes[this.$embeds[E]]){var _=b.split(this.$embeds[E]);if(!_[0]&&_[1]){l[0]=_[1];var T=this.$modes[this.$embeds[E]];return T[o].apply(T,l)}}var x=m.apply(this,l);return m?x:void 0},this.transformAction=function(o,l,m,b,k){if(this.$behaviour){var T=this.$behaviour.getBehaviours();for(var E in T)if(T[E][l]){var _=T[E][l].apply(this,arguments);if(_)return _}}},this.getKeywords=function(o){if(!this.completionKeywords){var l=this.$tokenizer.rules,m=[];for(var b in l)for(var k=l[b],T=0,E=k.length;T<E;T++)if(typeof k[T].token=="string")/keyword|support|storage/.test(k[T].token)&&m.push(k[T].regex);else if(typeof k[T].token=="object"){for(var _=0,x=k[T].token.length;_<x;_++)if(/keyword|support|storage/.test(k[T].token[_])){var b=k[T].regex.match(/\(.+?\)/g)[_];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 k=this.$keywordList||this.$createKeywordList();return k.map(function(T){return{name:T,value:T,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,u){var d=n("./lib/dom"),p=function(){function w(f){this.session=f,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(f){var g;return this.lineWidgets?g=this.lineWidgets[f]&&this.lineWidgets[f].rowCount||0:g=0,!this.$useWrapMode||!this.$wrapData[f]?1+g:this.$wrapData[f].length+1+g},w.prototype.$getWidgetScreenLength=function(){var f=0;return this.lineWidgets.forEach(function(g){g&&g.rowCount&&!g.hidden&&(f+=g.rowCount)}),f},w.prototype.$onChangeEditor=function(f){this.attach(f.editor)},w.prototype.attach=function(f){f&&f.widgetManager&&f.widgetManager!=this&&f.widgetManager.detach(),this.editor!=f&&(this.detach(),this.editor=f,f&&(f.widgetManager=this,f.renderer.on("beforeRender",this.measureWidgets),f.renderer.on("afterRender",this.renderWidgets)))},w.prototype.detach=function(f){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(f,g){var i=g.lineWidgets;if(!(!i||!f.action)){for(var a=f.data,h=a.start.row,c=a.end.row,o=f.action=="add",l=h+1;l<c;l++)i[l]&&(i[l].hidden=o);i[c]&&(o?i[h]?i[c].hidden=o:i[h]=i[c]:(i[h]==i[c]&&(i[h]=void 0),i[c].hidden=o))}},w.prototype.updateOnChange=function(f){var g=this.session.lineWidgets;if(g){var i=f.start.row,a=f.end.row-i;if(a!==0)if(f.action=="remove"){var h=g.splice(i+1,a);!g[i]&&h[h.length-1]&&(g[i]=h.pop()),h.forEach(function(o){o&&this.removeLineWidget(o)},this),this.$updateRows()}else{var c=new Array(a);g[i]&&g[i].column!=null&&f.start.column>g[i].column&&i++,c.unshift(i,0),g.splice.apply(g,c),this.$updateRows()}}},w.prototype.$updateRows=function(){var f=this.session.lineWidgets;if(f){var g=!0;f.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(f){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var g=this.session.lineWidgets[f.row];return g&&(f.$oldWidget=g,g.el&&g.el.parentNode&&(g.el.parentNode.removeChild(g.el),g._inDocument=!1)),this.session.lineWidgets[f.row]=f,f},w.prototype.addLineWidget=function(f){if(this.$registerLineWidget(f),f.session=this.session,!this.editor)return f;var g=this.editor.renderer;f.html&&!f.el&&(f.el=d.createElement("div"),f.el.innerHTML=f.html),f.text&&!f.el&&(f.el=d.createElement("div"),f.el.textContent=f.text),f.el&&(d.addCssClass(f.el,"ace_lineWidgetContainer"),f.className&&d.addCssClass(f.el,f.className),f.el.style.position="absolute",f.el.style.zIndex="5",g.container.appendChild(f.el),f._inDocument=!0,f.coverGutter||(f.el.style.zIndex="3"),f.pixelHeight==null&&(f.pixelHeight=f.el.offsetHeight)),f.rowCount==null&&(f.rowCount=f.pixelHeight/g.layerConfig.lineHeight);var i=this.session.getFoldAt(f.row,0);if(f.$fold=i,i){var a=this.session.lineWidgets;f.row==i.end.row&&!a[i.start.row]?a[i.start.row]=f:f.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:f.row}}}),this.$updateRows(),this.renderWidgets(null,g),this.onWidgetChanged(f),f},w.prototype.removeLineWidget=function(f){if(f._inDocument=!1,f.session=null,f.el&&f.el.parentNode&&f.el.parentNode.removeChild(f.el),f.editor&&f.editor.destroy)try{f.editor.destroy()}catch{}if(this.session.lineWidgets){var g=this.session.lineWidgets[f.row];if(g==f)this.session.lineWidgets[f.row]=f.$oldWidget,f.$oldWidget&&this.onWidgetChanged(f.$oldWidget);else for(;g;){if(g.$oldWidget==f){g.$oldWidget=f.$oldWidget;break}g=g.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:f.row}}}),this.$updateRows()},w.prototype.getWidgetsAtRow=function(f){for(var g=this.session.lineWidgets,i=g&&g[f],a=[];i;)a.push(i),i=i.$oldWidget;return a},w.prototype.onWidgetChanged=function(f){this.session._changedWidgets.push(f),this.editor&&this.editor.renderer.updateFull()},w.prototype.measureWidgets=function(f,g){var i=this.session._changedWidgets,a=g.layerConfig;if(!(!i||!i.length)){for(var h=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<h&&(h=o.row))}}h!=1/0&&(this.session._emit("changeFold",{data:{start:{row:h}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},w.prototype.renderWidgets=function(f,g){var i=g.layerConfig,a=this.session.lineWidgets;if(a){for(var h=Math.min(this.firstRow,i.firstRow),c=Math.max(this.lastRow,i.lastRow,a.length);h>0&&!a[h];)h--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,g.$cursorLayer.config=i;for(var o=h;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=p}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,u){r.applyDelta=function(d,p,w){var f=p.start.row,g=p.start.column,i=d[f]||"";switch(p.action){case"insert":var a=p.lines;if(a.length===1)d[f]=i.substring(0,g)+p.lines[0]+i.substring(g);else{var h=[f,1].concat(p.lines);d.splice.apply(d,h),d[f]=i.substring(0,g)+d[f],d[f+p.lines.length-1]+=i.substring(g)}break;case"remove":var c=p.end.column,o=p.end.row;f===o?d[f]=i.substring(0,g)+i.substring(c):d.splice(f,o-f+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,u){var d=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,w=function(){function i(a,h,c){this.$onChange=this.onChange.bind(this),this.attach(a),typeof h!="number"?this.setPosition(h.row,h.column):this.setPosition(h,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 h=g(a,{row:this.row,column:this.column},this.$insertRight);this.setPosition(h.row,h.column,!0)}},i.prototype.setPosition=function(a,h,c){var o;if(c?o={row:a,column:h}:o=this.$clipPositionToDocument(a,h),!(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,h){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,h))),h<0&&(c.column=0),c},i}();w.prototype.$insertRight=!1,d.implement(w.prototype,p);function f(i,a,h){var c=h?i.column<=a.column:i.column<a.column;return i.row<a.row||i.row==a.row&&c}function g(i,a,h){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 f(a,m,h)?{row:a.row,column:a.column}:f(b,a,!h)?{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,u){var d=n("./lib/oop"),p=n("./apply_delta").applyDelta,w=n("./lib/event_emitter").EventEmitter,f=n("./range").Range,g=n("./anchor").Anchor,i=function(){function a(h){this.$lines=[""],h.length===0?this.$lines=[""]:Array.isArray(h)?this.insertMergedLines({row:0,column:0},h):this.insert({row:0,column:0},h)}return a.prototype.setValue=function(h){var c=this.getLength()-1;this.remove(new f(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},h||"")},a.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},a.prototype.createAnchor=function(h,c){return new g(this,h,c)},a.prototype.$detectNewLine=function(h){var c=h.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(h){this.$newLineMode!==h&&(this.$newLineMode=h,this._signal("changeNewLineMode"))},a.prototype.getNewLineMode=function(){return this.$newLineMode},a.prototype.isNewLine=function(h){return h==`\r
196
+ `||h=="\r"||h==`
197
+ `},a.prototype.getLine=function(h){return this.$lines[h]||""},a.prototype.getLines=function(h,c){return this.$lines.slice(h,c+1)},a.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},a.prototype.getLength=function(){return this.$lines.length},a.prototype.getTextRange=function(h){return this.getLinesForRange(h).join(this.getNewLineCharacter())},a.prototype.getLinesForRange=function(h){var c;if(h.start.row===h.end.row)c=[this.getLine(h.start.row).substring(h.start.column,h.end.column)];else{c=this.getLines(h.start.row,h.end.row),c[0]=(c[0]||"").substring(h.start.column);var o=c.length-1;h.end.row-h.start.row==o&&(c[o]=c[o].substring(0,h.end.column))}return c},a.prototype.insertLines=function(h,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(h,c)},a.prototype.removeLines=function(h,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(h,c)},a.prototype.insertNewLine=function(h){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(h,["",""])},a.prototype.insert=function(h,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(h,this.$split(c))},a.prototype.insertInLine=function(h,c){var o=this.clippedPos(h.row,h.column),l=this.pos(h.row,h.column+c.length);return this.applyDelta({start:o,end:l,action:"insert",lines:[c]},!0),this.clonePos(l)},a.prototype.clippedPos=function(h,c){var o=this.getLength();h===void 0?h=o:h<0?h=0:h>=o&&(h=o-1,c=void 0);var l=this.getLine(h);return c==null&&(c=l.length),c=Math.min(Math.max(c,0),l.length),{row:h,column:c}},a.prototype.clonePos=function(h){return{row:h.row,column:h.column}},a.prototype.pos=function(h,c){return{row:h,column:c}},a.prototype.$clipPosition=function(h){var c=this.getLength();return h.row>=c?(h.row=Math.max(0,c-1),h.column=this.getLine(c-1).length):(h.row=Math.max(0,h.row),h.column=Math.min(Math.max(h.column,0),this.getLine(h.row).length)),h},a.prototype.insertFullLines=function(h,c){h=Math.min(Math.max(h,0),this.getLength());var o=0;h<this.getLength()?(c=c.concat([""]),o=0):(c=[""].concat(c),h--,o=this.$lines[h].length),this.insertMergedLines({row:h,column:o},c)},a.prototype.insertMergedLines=function(h,c){var o=this.clippedPos(h.row,h.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(h){var c=this.clippedPos(h.start.row,h.start.column),o=this.clippedPos(h.end.row,h.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(h,c,o){var l=this.clippedPos(h,c),m=this.clippedPos(h,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(h,c){h=Math.min(Math.max(0,h),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var o=c==this.getLength()-1&&h>0,l=c<this.getLength()-1,m=o?h-1:h,b=o?this.getLine(m).length:0,k=l?c+1:c,T=l?0:this.getLine(k).length,E=new f(m,b,k,T),_=this.$lines.slice(h,c+1);return this.applyDelta({start:E.start,end:E.end,action:"remove",lines:this.getLinesForRange(E)}),_},a.prototype.removeNewLine=function(h){h<this.getLength()-1&&h>=0&&this.applyDelta({start:this.pos(h,this.getLine(h).length),end:this.pos(h+1,0),action:"remove",lines:["",""]})},a.prototype.replace=function(h,c){if(h instanceof f||(h=f.fromPoints(h.start,h.end)),c.length===0&&h.isEmpty())return h.start;if(c==this.getTextRange(h))return h.end;this.remove(h);var o;return c?o=this.insert(h.start,c):o=h.start,o},a.prototype.applyDeltas=function(h){for(var c=0;c<h.length;c++)this.applyDelta(h[c])},a.prototype.revertDeltas=function(h){for(var c=h.length-1;c>=0;c--)this.revertDelta(h[c])},a.prototype.applyDelta=function(h,c){var o=h.action=="insert";(o?h.lines.length<=1&&!h.lines[0]:!f.comparePoints(h.start,h.end))||(o&&h.lines.length>2e4?this.$splitAndapplyLargeDelta(h,2e4):(p(this.$lines,h,c),this._signal("change",h)))},a.prototype.$safeApplyDelta=function(h){var c=this.$lines.length;(h.action=="remove"&&h.start.row<c&&h.end.row<c||h.action=="insert"&&h.start.row<=c)&&this.applyDelta(h)},a.prototype.$splitAndapplyLargeDelta=function(h,c){for(var o=h.lines,l=o.length-c+1,m=h.start.row,b=h.start.column,k=0,T=0;k<l;k=T){T+=c-1;var E=o.slice(k,T);E.push(""),this.applyDelta({start:this.pos(m+k,b),end:this.pos(m+T,b=0),action:h.action,lines:E},!0)}h.lines=o.slice(k),h.start.row=m+k,h.start.column=b,this.applyDelta(h,!0)},a.prototype.revertDelta=function(h){this.$safeApplyDelta({start:this.clonePos(h.start),end:this.clonePos(h.end),action:h.action=="insert"?"remove":"insert",lines:h.lines.slice()})},a.prototype.indexToPosition=function(h,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=c||0,b=o.length;m<b;m++)if(h-=o[m].length+l,h<0)return{row:m,column:h+o[m].length+l};return{row:b-1,column:h+o[b-1].length+l}},a.prototype.positionToIndex=function(h,c){for(var o=this.$lines||this.getAllLines(),l=this.getNewLineCharacter().length,m=0,b=Math.min(h.row,o.length),k=c||0;k<b;++k)m+=o[k].length+l;return m+h.column},a.prototype.$split=function(h){return h.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,u){var d=n("./lib/oop"),p=n("./lib/event_emitter").EventEmitter,w=function(){function f(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 h=new Date,c=a.currentLine,o=-1,l=a.doc,m=c;a.lines[c];)c++;var b=l.getLength(),k=0;for(a.running=!1;c<b;){a.$tokenizeRow(c),o=c;do c++;while(a.lines[c]);if(k++,k%5===0&&new Date-h>20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=c,o==-1&&(o=c),m<=o&&a.fireUpdateEvent(m,o)}}}return f.prototype.setTokenizer=function(g){this.tokenizer=g,this.lines=[],this.states=[],this.start(0)},f.prototype.setDocument=function(g){this.doc=g,this.lines=[],this.states=[],this.stop()},f.prototype.fireUpdateEvent=function(g,i){var a={first:g,last:i};this._signal("update",{data:a})},f.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)},f.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},f.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 h=Array(a+1);h.unshift(i,1),this.lines.splice.apply(this.lines,h),this.states.splice.apply(this.states,h)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},f.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},f.prototype.getTokens=function(g){return this.lines[g]||this.$tokenizeRow(g)},f.prototype.getState=function(g){return this.currentLine==g&&this.$tokenizeRow(g),this.states[g]||"start"},f.prototype.$tokenizeRow=function(g){var i=this.doc.getLine(g),a=this.states[g-1],h=this.tokenizer.getLineTokens(i,a,g);return this.states[g]+""!=h.state+""?(this.states[g]=h.state,this.lines[g+1]=null,this.currentLine>g+1&&(this.currentLine=g+1)):this.currentLine==g&&(this.currentLine=g+1),this.lines[g]=h.tokens},f.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},f}();d.implement(w.prototype,p),r.BackgroundTokenizer=w}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,u){var d=n("./lib/lang"),p=n("./range").Range,w=function(){function f(g,i,a){a===void 0&&(a="text"),this.setRegexp(g),this.clazz=i,this.type=a,this.docLen=0}return f.prototype.setRegexp=function(g){this.regExp+""!=g+""&&(this.regExp=g,this.cache=[])},f.prototype.update=function(g,i,a,h){if(this.regExp){for(var c=h.firstRow,o=h.lastRow,l={},m=a.$editor&&a.$editor.$search,b=m&&m.$isMultilineSearch(a.$editor.getLastSearchOptions()),k=c;k<=o;k++){var T=this.cache[k];if(T==null||a.getValue().length!=this.docLen){if(b){T=[];var E=m.$multiLineForward(a,this.regExp,k,o);if(E){var _=E.endRow<=o?E.endRow-1:o;_>k&&(k=_),T.push(new p(E.startRow,E.startCol,E.endRow,E.endCol))}T.length>this.MAX_RANGES&&(T=T.slice(0,this.MAX_RANGES))}else T=d.getMatchOffsets(a.getLine(k),this.regExp),T.length>this.MAX_RANGES&&(T=T.slice(0,this.MAX_RANGES)),T=T.map(function(O){return new p(k,O.offset,k,O.offset+O.length)});this.cache[k]=T.length?T:""}if(T.length!==0)for(var x=T.length;x--;){var R=T[x].toScreenRange(a),I=R.toString();l[I]||(l[I]=!0,i.drawSingleLineMarker(g,R,this.clazz,h))}}this.docLen=a.getValue().length}},f}();w.prototype.MAX_RANGES=500,r.SearchHighlight=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,u){var d=function(){function _(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return _.prototype.addSession=function(x){this.$session=x},_.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)}},_.prototype.addSelection=function(x,R){this.selections.push({value:x,rev:R||this.$rev})},_.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},_.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},_.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}},_.prototype.getRevision=function(){return this.$rev},_.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)},_.prototype.getChangedRanges=function(x,R){R==null&&(R=this.$rev+1)},_.prototype.getChangedLines=function(x,R){R==null&&(R=this.$rev+1)},_.prototype.undo=function(x,R){this.lastDeltas=null;var I=this.$undoStack;if(p(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}},_.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);E(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},_.prototype.$syncRev=function(){var x=this.$undoStack,R=x[x.length-1],I=R&&R[0].id||0;this.$redoStackBaseRev=I,this.$rev=I},_.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},_.prototype.canUndo=function(){return this.$undoStack.length>0},_.prototype.canRedo=function(){return this.$redoStack.length>0},_.prototype.bookmark=function(x){x==null&&(x=this.$rev),this.mark=x},_.prototype.isAtBookmark=function(){return this.$rev===this.mark},_.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},_.prototype.fromJSON=function(x){this.reset(),this.$undoStack=x.$undoStack,this.$redoStack=x.$redoStack},_.prototype.$prettyPrint=function(x){return x?a(x):a(this.$undoStack)+`
198
+ ---
199
+ `+a(this.$redoStack)},_}();d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;function p(_,x){for(var R=x;R--;){var I=_[R];if(I&&!I[0].ignore){for(;R<x-1;){var O=o(_[R],_[R+1]);_[R]=O[0],_[R+1]=O[1],R++}return!0}}}var w=n("./range").Range,f=w.comparePoints;w.comparePoints;function g(_){return{row:_.row,column:_.column}}function i(_){return{start:g(_.start),end:g(_.end),action:_.action,lines:_.lines.slice()}}function a(_){if(_=_||this,Array.isArray(_))return _.map(a).join(`
200
+ `);var x="";return _.action?(x=_.action=="insert"?"+":"-",x+="["+_.lines+"]"):_.value&&(Array.isArray(_.value)?x=_.value.map(h).join(`
201
+ `):x=h(_.value)),_.start&&(x+=h(_)),(_.id||_.rev)&&(x+=" ("+(_.id||_.rev)+")"),x}function h(_){return _.start.row+":"+_.start.column+"=>"+_.end.row+":"+_.end.column}function c(_,x){var R=_.action=="insert",I=x.action=="insert";if(R&&I)if(f(x.start,_.end)>=0)m(x,_,-1);else if(f(x.start,_.start)<=0)m(_,x,1);else return null;else if(R&&!I)if(f(x.start,_.end)>=0)m(x,_,-1);else if(f(x.end,_.start)<=0)m(_,x,-1);else return null;else if(!R&&I)if(f(x.start,_.start)>=0)m(x,_,1);else if(f(x.start,_.start)<=0)m(_,x,1);else return null;else if(!R&&!I)if(f(x.start,_.start)>=0)m(x,_,1);else if(f(x.end,_.start)<=0)m(_,x,-1);else return null;return[x,_]}function o(_,x){for(var R=_.length;R--;)for(var I=0;I<x.length;I++)if(!c(_[R],x[I])){for(;R<_.length;){for(;I--;)c(x[I],_[R]);I=x.length,R++}return[_,x]}return _.selectionBefore=x.selectionBefore=_.selectionAfter=x.selectionAfter=null,[x,_]}function l(_,x){var R=_.action=="insert",I=x.action=="insert";if(R&&I)f(_.start,x.start)<0?m(x,_,1):m(_,x,1);else if(R&&!I)f(_.start,x.end)>=0?m(_,x,-1):(f(_.start,x.start)<=0||m(_,w.fromPoints(x.start,_.start),-1),m(x,_,1));else if(!R&&I)f(x.start,_.end)>=0?m(x,_,-1):(f(x.start,_.start)<=0||m(x,w.fromPoints(_.start,x.start),-1),m(_,x,1));else if(!R&&!I)if(f(x.start,_.end)>=0)m(x,_,-1);else if(f(x.end,_.start)<=0)m(_,x,-1);else{var O,L;return f(_.start,x.start)<0&&(O=_,_=k(_,x.start)),f(_.end,x.end)>0&&(L=k(_,x.end)),b(x.end,_.start,_.end,-1),L&&!O&&(_.lines=L.lines,_.start=L.start,_.end=L.end,L=_),[x,O,L].filter(Boolean)}return[x,_]}function m(_,x,R){b(_.start,x.start,x.end,R),b(_.end,x.start,x.end,R)}function b(_,x,R,I){_.row==(I==1?x:R).row&&(_.column+=I*(R.column-x.column)),_.row+=I*(R.row-x.row)}function k(_,x){var R=_.lines,I=_.end;_.end=g(x);var O=_.end.row-_.start.row,L=R.splice(O,R.length),W=O?x.column:x.column-_.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:_.action};return F}function T(_,x){x=i(x);for(var R=_.length;R--;){for(var I=_[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||_.splice(R,1)}return _}function E(_,x){for(var R=0;R<x.length;R++)for(var I=x[R],O=0;O<I.length;O++)T(_,I[O])}r.UndoManager=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,p=function(){function w(f,g){this.foldData=f,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(f){this.start.row+=f,this.end.row+=f,this.folds.forEach(function(g){g.start.row+=f,g.end.row+=f})},w.prototype.addFold=function(f){if(f.sameRow){if(f.start.row<this.startRow||f.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(f),this.folds.sort(function(g,i){return-g.range.compareEnd(i.start.row,i.start.column)}),this.range.compareEnd(f.start.row,f.start.column)>0?(this.end.row=f.end.row,this.end.column=f.end.column):this.range.compareStart(f.end.row,f.end.column)<0&&(this.start.row=f.start.row,this.start.column=f.start.column)}else if(f.start.row==this.end.row)this.folds.push(f),this.end.row=f.end.row,this.end.column=f.end.column;else if(f.end.row==this.start.row)this.folds.unshift(f),this.start.row=f.start.row,this.start.column=f.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");f.foldLine=this},w.prototype.containsRow=function(f){return f>=this.start.row&&f<=this.end.row},w.prototype.walk=function(f,g,i){var a=0,h=this.folds,c,o,l,m=!0;g==null&&(g=this.end.row,i=this.end.column);for(var b=0;b<h.length;b++){if(c=h[b],o=c.range.compareStart(g,i),o==-1){f(null,g,i,a,m);return}if(l=f(null,c.start.row,c.start.column,a,m),l=!l&&f(c.placeholder,c.start.row,c.start.column,a),l||o===0)return;m=!c.sameRow,a=c.end.column}f(null,g,i,a,m)},w.prototype.getNextFoldTo=function(f,g){for(var i,a,h=0;h<this.folds.length;h++){if(i=this.folds[h],a=i.range.compareEnd(f,g),a==-1)return{fold:i,kind:"after"};if(a===0)return{fold:i,kind:"inside"}}return null},w.prototype.addRemoveChars=function(f,g,i){var a=this.getNextFoldTo(f,g),h,c;if(a){if(h=a.fold,a.kind=="inside"&&h.start.column!=g&&h.start.row!=f)window.console&&window.console.log(f,g,h);else if(h.start.row==f){c=this.folds;var o=c.indexOf(h);for(o===0&&(this.start.column+=i),o;o<c.length;o++){if(h=c[o],h.start.column+=i,!h.sameRow)return;h.end.column+=i}this.end.column+=i}}},w.prototype.split=function(f,g){var i=this.getNextFoldTo(f,g);if(!i||i.kind=="inside")return null;var a=i.fold,h=this.folds,c=this.foldData,o=h.indexOf(a),l=h[o-1];this.end.row=l.end.row,this.end.column=l.end.column,h=h.splice(o,h.length-o);var m=new w(c,h);return c.splice(c.indexOf(this)+1,0,m),m},w.prototype.merge=function(f){for(var g=f.folds,i=0;i<g.length;i++)this.addFold(g[i]);var a=this.foldData;a.splice(a.indexOf(f),1)},w.prototype.toString=function(){var f=[this.range.toString()+": ["];return this.folds.forEach(function(g){f.push(" "+g.toString())}),f.push("]"),f.join(`
202
+ `)},w.prototype.idxToPosition=function(f){for(var g=0,i=0;i<this.folds.length;i++){var a=this.folds[i];if(f-=a.start.column-g,f<0)return{row:a.start.row,column:a.start.column+f};if(f-=a.placeholder.length,f<0)return a.start;g=a.end.column}return{row:this.end.row,column:this.end.column+f}},w}();r.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,u){var d=n("./range").Range,p=d.comparePoints,w=function(){function f(){this.ranges=[],this.$bias=1}return f.prototype.pointIndex=function(g,i,a){for(var h=this.ranges,c=a||0;c<h.length;c++){var o=h[c],l=p(g,o.end);if(!(l>0)){var m=p(g,o.start);return l===0?i&&m!==0?-c-2:c:m>0||m===0&&!i?c:-c-1}}return-c-1},f.prototype.add=function(g){var i=!g.isEmpty(),a=this.pointIndex(g.start,i);a<0&&(a=-a-1);var h=this.pointIndex(g.end,i,a);return h<0?h=-h-1:h++,this.ranges.splice(a,h-a,g)},f.prototype.addList=function(g){for(var i=[],a=g.length;a--;)i.push.apply(i,this.add(g[a]));return i},f.prototype.substractPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges.splice(i,1)},f.prototype.merge=function(){var g=[],i=this.ranges;i=i.sort(function(l,m){return p(l.start,m.start)});for(var a=i[0],h,c=1;c<i.length;c++){h=a,a=i[c];var o=p(h.end,a.start);o<0||o==0&&!h.isEmpty()&&!a.isEmpty()||(p(h.end,a.end)<0&&(h.end.row=a.end.row,h.end.column=a.end.column),i.splice(c,1),g.push(a),a=h,c--)}return this.ranges=i,g},f.prototype.contains=function(g,i){return this.pointIndex({row:g,column:i})>=0},f.prototype.containsPoint=function(g){return this.pointIndex(g)>=0},f.prototype.rangeAtPoint=function(g){var i=this.pointIndex(g);if(i>=0)return this.ranges[i]},f.prototype.clipRows=function(g,i){var a=this.ranges;if(a[0].start.row>i||a[a.length-1].start.row<g)return[];var h=this.pointIndex({row:g,column:0});h<0&&(h=-h-1);var c=this.pointIndex({row:i,column:0},h);c<0&&(c=-c-1);for(var o=[],l=h;l<c;l++)o.push(a[l]);return o},f.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},f.prototype.attach=function(g){this.session&&this.detach(),this.session=g,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},f.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},f.prototype.$onChange=function(g){for(var i=g.start,a=g.end,h=i.row,c=a.row,o=this.ranges,l=0,m=o.length;l<m;l++){var b=o[l];if(b.end.row>=h)break}if(g.action=="insert")for(var k=c-h,T=-i.column+a.column;l<m;l++){var b=o[l];if(b.start.row>h)break;if(b.start.row==h&&b.start.column>=i.column&&(b.start.column==i.column&&this.$bias<=0||(b.start.column+=T,b.start.row+=k)),b.end.row==h&&b.end.column>=i.column){if(b.end.column==i.column&&this.$bias<0)continue;b.end.column==i.column&&T>0&&l<m-1&&b.end.column>b.start.column&&b.end.column==o[l+1].start.column&&(b.end.column-=T),b.end.column+=T,b.end.row+=k}}else for(var k=h-c,T=i.column-a.column;l<m;l++){var b=o[l];if(b.start.row>c)break;b.end.row<c&&(h<b.end.row||h==b.end.row&&i.column<b.end.column)?(b.end.row=h,b.end.column=i.column):b.end.row==c?b.end.column<=a.column?(k||b.end.column>i.column)&&(b.end.column=i.column,b.end.row=i.row):(b.end.column+=T,b.end.row+=k):b.end.row>c&&(b.end.row+=k),b.start.row<c&&(h<b.start.row||h==b.start.row&&i.column<b.start.column)?(b.start.row=h,b.start.column=i.column):b.start.row==c?b.start.column<=a.column?(k||b.start.column>i.column)&&(b.start.column=i.column,b.start.row=i.row):(b.start.column+=T,b.start.row+=k):b.start.row>c&&(b.start.row+=k)}if(k!=0&&l<m)for(;l<m;l++){var b=o[l];b.start.row+=k,b.end.row+=k}},f}();w.prototype.comparePoints=p,r.RangeList=w}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,u){var d=this&&this.__extends||function(){var h=function(c,o){return h=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])},h(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");h(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),p=n("../range_list").RangeList,w=function(h){d(c,h);function c(o,l){var m=h.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,k=-1;b<this.subFolds.length&&(k=this.subFolds[b].range.compare(l,m),k==1);b++);var T=this.subFolds[b],E=0;if(k==0){if(T.range.containsRange(o))return T.addSubFold(o);E=1}for(var l=o.range.end.row,m=o.range.end.column,_=b,k=-1;_<this.subFolds.length&&(k=this.subFolds[_].range.compare(l,m),k==1);_++);k==0&&_++;for(var x=this.subFolds.splice(b,_-b,o),R=k==0?x.length-1:x.length,I=E;I<R;I++)o.addSubFold(x[I]);return o.setFoldLine(this.foldLine),o}},c.prototype.restoreRange=function(o){return a(o,this.start)},c}(p);function f(h,c){h.row-=c.row,h.row==0&&(h.column-=c.column)}function g(h,c){f(h.start,c),f(h.end,c)}function i(h,c){h.row==0&&(h.column+=c.column),h.row+=c.row}function a(h,c){i(h.start,c),i(h.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,u){var d=n("../range").Range,p=n("./fold_line").FoldLine,w=n("./fold").Fold,f=n("../token_iterator").TokenIterator,g=n("../mouse/mouse_event").MouseEvent;function i(){this.getFoldAt=function(a,h,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,h)){if(c==1&&b.isEnd(a,h)&&!b.isEmpty()||c==-1&&b.isStart(a,h)&&!b.isEmpty())continue;return l[m]}}},this.getFoldsInRange=function(a){var h=a.start,c=a.end,o=this.$foldData,l=[];h.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 k=o[m].folds,T=0;T<k.length;T++){var E=k[T];if(b=E.range.compareRange(a),b==-2)break;if(b!=2){if(b==42)break;l.push(E)}}}}return h.column-=1,c.column+=1,l},this.getFoldsInRangeList=function(a){if(Array.isArray(a)){var h=[];a.forEach(function(o){h=h.concat(this.getFoldsInRange(o))},this)}else var h=this.getFoldsInRange(a);return h},this.getAllFolds=function(){for(var a=[],h=this.$foldData,c=0;c<h.length;c++)for(var o=0;o<h[c].folds.length;o++)a.push(h[c].folds[o]);return a},this.getFoldStringAt=function(a,h,c,o){if(o=o||this.getFoldLine(a),!o)return null;for(var l={end:{column:0}},m,b,k=0;k<o.folds.length;k++){b=o.folds[k];var T=b.range.compareEnd(a,h);if(T==-1){m=this.getLine(b.start.row).substring(l.end.column,b.start.column);break}else if(T===0)return null;l=b}return m||(m=this.getLine(b.start.row).substring(l.end.column)),c==-1?m.substring(0,h-l.end.column):c==1?m.substring(h-l.end.column):m},this.getFoldLine=function(a,h){var c=this.$foldData,o=0;for(h&&(o=c.indexOf(h)),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,h){var c=this.$foldData,o=0;for(h&&(o=c.indexOf(h)),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,h){for(var c=this.$foldData,o=h-a+1,l=0;l<c.length;l++){var m=c[l],b=m.end.row,k=m.start.row;if(b>=h){k<h&&(k>=a?o-=h-k:o=0);break}else b>=a&&(k>=a?o-=b-k:o-=b-a+1)}return o},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(h,c){return h.start.row-c.start.row}),a},this.addFold=function(a,h){var c=this.$foldData,o=!1,l;a instanceof w?l=a:(l=new w(h,a),l.collapseChildren=h.collapseChildren),this.$clipRangeToDocument(l.range);var m=l.start.row,b=l.start.column,k=l.end.row,T=l.end.column,E=this.getFoldAt(m,b,1),_=this.getFoldAt(k,T,-1);if(E&&_==E)return E.addSubFold(l);E&&!E.range.isStart(m,b)&&this.removeFold(E),_&&!_.range.isEnd(k,T)&&this.removeFold(_);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(k==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==k){I.merge(O);break}}break}else if(k<=I.start.row)break}return o||(I=this.$addFoldLine(new p(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(h){this.addFold(h)},this)},this.removeFold=function(a){var h=a.foldLine,c=h.start.row,o=h.end.row,l=this.$foldData,m=h.folds;if(m.length==1)l.splice(l.indexOf(h),1);else if(h.range.isEnd(a.end.row,a.end.column))m.pop(),h.end.row=m[m.length-1].end.row,h.end.column=m[m.length-1].end.column;else if(h.range.isStart(a.start.row,a.start.column))m.shift(),h.start.row=m[0].start.row,h.start.column=m[0].start.column;else if(a.sameRow)m.splice(m.indexOf(a),1);else{var b=h.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 h=[],c=0;c<a.length;c++)h.push(a[c]);h.forEach(function(o){this.removeFold(o)},this),this.$modified=!0},this.expandFold=function(a){this.removeFold(a),a.subFolds.forEach(function(h){a.restoreRange(h),this.addFold(h)},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(h){this.expandFold(h)},this)},this.unfold=function(a,h){var c,o;if(a==null)c=new d(0,0,this.getLength(),0),h==null&&(h=!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(h!=!1?this.removeFolds(o):this.expandFolds(o),l.length)return l},this.isRowFolded=function(a,h){return!!this.getFoldLine(a,h)},this.getRowFoldEnd=function(a,h){var c=this.getFoldLine(a,h);return c?c.end.row:a},this.getRowFoldStart=function(a,h){var c=this.getFoldLine(a,h);return c?c.start.row:a},this.getFoldDisplayLine=function(a,h,c,o,l){o==null&&(o=a.start.row),l==null&&(l=0),h==null&&(h=a.end.row),c==null&&(c=this.getLine(h).length);var m=this.doc,b="";return a.walk(function(k,T,E,_){if(!(T<o)){if(T==o){if(E<l)return;_=Math.max(l,_)}k!=null?b+=k:b+=m.getLine(T).substring(_,E)}},h,c),b},this.getDisplayLine=function(a,h,c,o){var l=this.getFoldLine(a);if(l)return this.getFoldDisplayLine(l,a,h,c,o);var m;return m=this.doc.getLine(a),m.substring(o||0,h||m.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(h){var c=h.folds.map(function(o){return o.clone()});return new p(a,c)}),a},this.toggleFold=function(a){var h=this.selection,c=h.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 k=this.getFoldsInRange(c);if(a&&k.length){this.expandFolds(k);return}else k.length==1&&(o=k[0])}if(o||(o=this.getFoldAt(c.start.row,c.start.column)),o&&o.range.toString()==c.toString()){this.expandFold(o);return}var T="...";if(!c.isMultiLine()){if(T=this.getTextRange(c),T.length<4)return;T=T.trim().substring(0,2)+".."}this.addFold(T,c)},this.getCommentFoldRange=function(a,h,c){var o=new f(this,a,h),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),k=new d;if(c!=1){do l=o.stepBackward();while(l&&b.test(l.type));l=o.stepForward()}k.start.row=o.getCurrentTokenRow(),k.start.column=o.getCurrentTokenColumn()+l.value.length,o=new f(this,a,h);var T=this.getState(o.$row);if(c!=-1){var E=-1;do if(l=o.stepForward(),E==-1){var _=this.getState(o.$row);T.toString()!==_.toString()&&(E=o.$row)}else if(o.$row>E)break;while(l&&b.test(l.type));l=o.stepBackward()}else l=o.getCurrentToken();return k.end.row=o.getCurrentTokenRow(),k.end.column=o.getCurrentTokenColumn(),k.start.row==k.end.row&&k.start.column>k.end.column?void 0:k}},this.foldAll=function(a,h,c,o){c==null&&(c=1e5);var l=this.foldWidgets;if(l){h=h||this.getLength(),a=a||0;for(var m=a;m<h;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<=h&&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(h){for(var c=a.getTokens(h),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 h=this.$foldMode;this.$setFolding(null),this.$setFolding(h)}},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,h){var c=this.foldWidgets;if(!c||h&&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,h){h instanceof g&&(h=h.domEvent);var c={children:h.shiftKey,all:h.ctrlKey||h.metaKey,siblings:h.altKey},o=this.$toggleFoldWidget(a,c);if(!o){var l=h.target||h.srcElement;l&&/ace_fold-widget/.test(l.className)&&(l.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,h){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 h.children||h.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(h.siblings){var k=this.getParentFoldRangeData(a);if(k.range)var T=k.range.start.row+1,E=k.range.end.row;this.foldAll(T,E,h.all?1e4:0)}else h.children?(E=b?b.end.row:this.getLength(),this.foldAll(a+1,E,h.all?1e4:0)):b&&(h.all&&(b.collapseChildren=1e4),this.addFold("...",b));return b}},this.toggleFoldWidget=function(a){var h=this.selection.getCursor().row;h=this.getRowFoldStart(h);var c=this.$toggleFoldWidget(h,{});if(!c){var o=this.getParentFoldRangeData(h,!0);if(c=o.range||o.firstRange,c){h=c.start.row;var l=this.getFoldAt(h,this.getLine(h).length,1);l?this.removeFold(l):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var h=a.start.row,c=a.end.row-h;if(c===0)this.foldWidgets[h]=null;else if(a.action=="remove")this.foldWidgets.splice(h,c+1,null);else{var o=Array(c+1);o.unshift(h,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(a){var h=a.data;h.first!=h.last&&this.foldWidgets.length>h.first&&this.foldWidgets.splice(h.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,u){var d=n("../token_iterator").TokenIterator,p=n("../range").Range;function w(){this.findMatchingBracket=function(f,g){if(f.column==0)return null;var i=g||this.getLine(f.row).charAt(f.column-1);if(i=="")return null;var a=i.match(/([\(\[\{])|([\)\]\}])/);return a?a[1]?this.$findClosingBracket(a[1],f):this.$findOpeningBracket(a[2],f):null},this.getBracketRange=function(f){var g=this.getLine(f.row),i=!0,a,h=g.charAt(f.column-1),c=h&&h.match(/([\(\[\{])|([\)\]\}])/);if(c||(h=g.charAt(f.column),f={row:f.row,column:f.column+1},c=h&&h.match(/([\(\[\{])|([\)\]\}])/),i=!1),!c)return null;if(c[1]){var o=this.$findClosingBracket(c[1],f);if(!o)return null;a=p.fromPoints(f,o),i||(a.end.column++,a.start.column--),a.cursor=a.end}else{var o=this.$findOpeningBracket(c[2],f);if(!o)return null;a=p.fromPoints(o,f),i||(a.start.column++,a.end.column--),a.cursor=a.start}return a},this.getMatchingBracketRanges=function(f,g){var i=this.getLine(f.row),a=/([\(\[\{])|([\)\]\}])/,h=!g&&i.charAt(f.column-1),c=h&&h.match(a);if(c||(h=(g===void 0||g)&&i.charAt(f.column),f={row:f.row,column:f.column+1},c=h&&h.match(a)),!c)return null;var o=new p(f.row,f.column-1,f.row,f.column),l=c[1]?this.$findClosingBracket(c[1],f):this.$findOpeningBracket(c[2],f);if(!l)return[o];var m=new p(l.row,l.column,l.row,l.column+1);return[o,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(f,g,i){var a=this.$brackets[f],h=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(h-=1,h==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else b==f&&(h+=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(f,g,i){var a=this.$brackets[f],h=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 k=m.charAt(l);if(k==a){if(h-=1,h==0)return{row:c.getCurrentTokenRow(),column:l+c.getCurrentTokenColumn()}}else k==f&&(h+=1);l+=1}do o=c.stepForward();while(o&&!i.test(o.type));if(o==null)break;l=0}return null}},this.getMatchingTags=function(f){var g=new d(this,f.row,f.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(f){var g=f.getCurrentToken(),i=!1,a=!1;if(g&&g.type.indexOf("tag-name")===-1)do a?g=f.stepBackward():g=f.stepForward(),g&&(g.value==="/>"?a=!0:g.type.indexOf("tag-name")!==-1&&(i=!0));while(g&&!i);return g},this.$findClosingTag=function(f,g){var i,a=g.value,h=g.value,c=0,o=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);g=f.stepForward();var l=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+g.value.length),m=!1;do{if(i=g,i.type.indexOf("tag-close")!==-1&&!m){var b=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);m=!0}if(g=f.stepForward(),g){if(g.value===">"&&!m){var b=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);m=!0}if(g.type.indexOf("tag-name")!==-1){if(a=g.value,h===a){if(i.value==="<")c++;else if(i.value==="</"&&(c--,c<0)){f.stepBackward();var k=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+2);g=f.stepForward();var T=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=f.stepForward()),g&&g.value===">")var E=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);else return}}}else if(h===a&&g.value==="/>"&&(c--,c<0))var k=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+2),T=k,E=T,b=new p(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(g&&c>=0);if(o&&b&&k&&E&&l&&T)return{openTag:new p(o.start.row,o.start.column,b.end.row,b.end.column),closeTag:new p(k.start.row,k.start.column,E.end.row,E.end.column),openTagName:l,closeTagName:T}},this.$findOpeningTag=function(f,g){var i=f.getCurrentToken(),a=g.value,h=0,c=f.getCurrentTokenRow(),o=f.getCurrentTokenColumn(),l=o+2,m=new p(c,o,c,l);f.stepForward();var b=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+g.value.length);if(g.type.indexOf("tag-close")===-1&&(g=f.stepForward()),!(!g||g.value!==">")){var k=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);f.stepBackward(),f.stepBackward();do if(g=i,c=f.getCurrentTokenRow(),o=f.getCurrentTokenColumn(),l=o+g.value.length,i=f.stepBackward(),g){if(g.type.indexOf("tag-name")!==-1){if(a===g.value)if(i.value==="<"){if(h++,h>0){var T=new p(c,o,c,l),E=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1);do g=f.stepForward();while(g&&g.value!==">");var _=new p(f.getCurrentTokenRow(),f.getCurrentTokenColumn(),f.getCurrentTokenRow(),f.getCurrentTokenColumn()+1)}}else i.value==="</"&&h--}else if(g.value==="/>"){for(var x=0,R=i;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===a){h--;break}else if(R.value==="<")break;R=f.stepBackward(),x++}for(var I=0;I<x;I++)f.stepForward()}}while(i&&h<=0);if(E&&_&&m&&k&&T&&b)return{openTag:new p(E.start.row,E.start.column,_.end.row,_.end.column),closeTag:new p(m.start.row,m.start.column,k.end.row,k.end.column),openTagName:T,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,u){var d=n("./lib/oop"),p=n("./lib/lang"),w=n("./bidihandler").BidiHandler,f=n("./config"),g=n("./lib/event_emitter").EventEmitter,i=n("./selection").Selection,a=n("./mode/text").Mode,h=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,k=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 C=this;this.bgTokenizer.on("update",function(D){C._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),f.resetOptions(this),this.setMode($),f._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=p.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,C=this.$getRowCacheIndex(this.$docRowCache,N)+1;$>C&&(this.$docRowCache.splice(C,$),this.$screenRowCache.splice(C,$))},F.prototype.$getRowCacheIndex=function(N,$){for(var C=0,D=N.length-1;C<=D;){var z=C+D>>1,U=N[z];if($>U)C=z+1;else if($<U)D=z-1;else return z}return C-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 C=new F(N.value);return N.folds.forEach(function(D){C.addFold("...",h.fromPoints(D.start,D.end))}),C.setAnnotations(N.annotations),C.setBreakpoints(N.breakpoints),C.setMode(N.mode),C.setScrollLeft(N.scrollLeft),C.setScrollTop(N.scrollTop),C.setUndoManager($),C.selection.fromJSON(N.selection),C},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 C=this.bgTokenizer.getTokens(N),D,z=0;if($==null){var U=C.length-1;z=this.getLine(N).length}else for(var U=0;U<C.length&&(z+=C[U].value.length,!(z>=$));U++);return D=C[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=p.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()?p.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,$,C,D){var z=this.$markerId++,U={range:N,type:C||"line",renderer:typeof C=="function"?C: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 C=this.$markerId++;return N.id=C,N.inFront=!!$,$?(this.$frontMarkers[C]=N,this._signal("changeFrontMarker")):(this.$backMarkers[C]=N,this._signal("changeBackMarker")),N}},F.prototype.removeMarker=function(N){var $=this.$frontMarkers[N]||this.$backMarkers[N];if($){var C=$.inFront?this.$frontMarkers:this.$backMarkers;delete C[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,$,C,D){typeof $!="number"&&(C=$,$=N),C||(C="ace_step");var z=new h(N,0,$,1/0);return z.id=this.addMarker(z,C,"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 C=this.getLine(N),D=!1;if($>0&&(D=!!C.charAt($-1).match(this.tokenRe)),D||(D=!!C.charAt($).match(this.tokenRe)),D)var z=this.tokenRe;else if(/^\s+$/.test(C.slice($-1,$+1)))var z=/\s/;else var z=this.nonTokenRe;var U=$;if(U>0){do U--;while(U>=0&&C.charAt(U).match(z));U++}for(var G=$;G<C.length&&C.charAt(G).match(z);)G++;return new h(N,U,N,G)},F.prototype.getAWordRange=function(N,$){for(var C=this.getWordRange(N,$),D=this.getLine(C.end.row);D.charAt(C.end.column).match(/[ \t]/);)C.end.column+=1;return C},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 C=N,D=C.path}else D=N||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new a),this.$modes[D]&&!C){this.$onChangeMode(this.$modes[D]),$&&$();return}this.$modeId=D,f.loadModule(["mode",D],(function(z){if(!this.destroyed){if(this.$modeId!==D)return $&&$();this.$modes[D]&&!C?this.$onChangeMode(this.$modes[D]):z&&z.Mode&&(z=new z.Mode(C),C||(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 C=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:C,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){f.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(),C=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}C[te]==null&&(C[te]=this.$getStringScreenWidth($[te])[0]),C[te]>D&&(D=C[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 C=N.length-1;C!=-1;C--){var D=N[C];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 C=0;C<N.length;C++){var D=N[C];(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 C(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){C(G)?D=h.fromPoints(G.start,G.end):D=h.fromPoints(G.start,G.start);continue}C(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=h.fromPoints(G.start,G.start)))}}return D},F.prototype.replace=function(N,$){return this.doc.replace(N,$)},F.prototype.moveText=function(N,$,C){var D=this.getTextRange(N),z=this.getFoldsInRange(N),U=h.fromPoints($,$);if(!C){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,$,C){C=C.replace(/\t/g,this.getTabString());for(var D=N;D<=$;D++)this.doc.insertInLine({row:D,column:0},C)},F.prototype.outdentRows=function(N){for(var $=N.collapseRows(),C=new h(0,0,0,0),D=this.getTabSize(),z=$.start.row;z<=$.end.row;++z){var U=this.getLine(z);C.start.row=z,C.end.row=z;for(var G=0;G<D&&U.charAt(G)==" ";++G);G<D&&U.charAt(G)==" "?(C.start.column=G,C.end.column=G+1):(C.start.column=0,C.end.column=G),this.remove(C)}},F.prototype.$moveLines=function(N,$,C){if(N=this.getRowFoldStart(N),$=this.getRowFoldEnd($),C<0){var D=this.getRowFoldStart(N+C);if(D<0)return 0;var z=D-N}else if(C>0){var D=this.getRowFoldEnd($+C);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 h(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=C==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 C=this.doc.getLength();N>=C?(N=C-1,$=this.doc.getLine(C-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 C=this.$wrapLimitRange;C.max<0&&(C={min:$,max:$});var D=this.$constrainWrapLimit(N,C.min,C.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,$,C){return $&&(N=Math.max($,N)),C&&(N=Math.min(C,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,C=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(C==="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 Ee=ne.range.compareInside(D.row,D.column);Ee==0?(ne=ne.split(D.row,D.column),ne&&(ne.shiftRow(Z),ne.addRemoveChars(G,0,z.column-D.column))):Ee==-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),C==="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 C=this.doc.getAllLines(),D=this.getTabSize(),z=this.$wrapData,U=this.$wrapLimit,G,Z,te=N;for($=Math.min($,C.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]=_;for(var ge=1;ge<ce.length;ge++)ce[ge]=x}else ce=this.$getDisplayTokens(C[ne].substring(ue,le),G.length);G=G.concat(ce)}).bind(this),Z.end.row,C[Z.end.row].length+1),z[Z.start.row]=this.$computeWrapSplits(G,U,D),te=Z.end.row+1):(G=this.$getDisplayTokens(C[te]),z[te]=this.$computeWrapSplits(G,U,D),te++)},F.prototype.$computeWrapSplits=function(N,$,C){if(N.length==0)return[];var D=[],z=N.length,U=0,G=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,he=$<=Math.max(2*C,8)||te===!1?0:Math.floor($/2);function ne(){var Ee=0;if(he===0)return Ee;if(te)for(var Ae=0;Ae<N.length;Ae++){var Re=N[Ae];if(Re==I)Ee+=1;else if(Re==O)Ee+=C;else{if(Re==L)continue;break}}return Z&&te!==!1&&(Ee+=C),Math.min(Ee,he)}function le(Ee){for(var Ae=Ee-U,Re=U;Re<Ee;Re++){var Xe=N[Re];(Xe===12||Xe===2)&&(Ae-=1)}D.length||(ue=ne(),D.indent=ue),G+=Ae,D.push(G),U=Ee}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]==_||N[ce]==x){for(ce;ce!=U-1&&N[ce]!=_;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]<_;)ce--;if(Z){for(;ce>ge&&N[ce]<_;)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]==E&&ce--,le(ce-ue)}return D},F.prototype.$getDisplayTokens=function(N,$){var C=[],D;$=$||0;for(var z=0;z<N.length;z++){var U=N.charCodeAt(z);if(U==9){D=this.getScreenTabSize(C.length+$),C.push(O);for(var G=1;G<D;G++)C.push(L)}else U==32?C.push(I):U>39&&U<48||U>57&&U<64?C.push(R):U>=4352&&W(U)?C.push(T,E):C.push(T)}return C},F.prototype.$getStringScreenWidth=function(N,$,C){if($==0)return[0,0];$==null&&($=1/0),C=C||0;var D,z;for(z=0;z<N.length&&(D=N.charCodeAt(z),D==9?C+=this.getScreenTabSize(C):D>=4352&&W(D)?C+=2:C+=1,!(C>$));z++);return[C,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),C=this.$wrapData[$.row];return C.length&&C[0]<$.column?C.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 C=this.documentToScreenRow(N,$);return this.getScreenLastRowColumn(C)},F.prototype.getDocumentLastRowColumnPosition=function(N,$){var C=this.documentToScreenRow(N,$);return this.screenToDocumentPosition(C,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,$,C){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),Ee=ge?ge.start.row:1/0;ne<=N&&(G=this.getRowLength(le),!(ne+G>N||le>=ce));)ne+=G,le++,le>Ee&&(le=ge.end.row+1,ge=this.getNextFoldLine(le,ge),Ee=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 Ae=0,Re=Math.floor(N-ne);if(this.$useWrapMode){var Xe=this.$wrapData[le];Xe&&(U=Xe[Re],Re>0&&Xe.length&&(Ae=Xe.indent,z=Xe[Re-1]||Xe[Xe.length-1],D=D.substring(z)))}return C!==void 0&&this.$bidiHandler.isBidiRow(ne+Re,le,Re)&&($=this.$bidiHandler.offsetToCol(C)),z+=this.$getStringScreenWidth(D,$-Ae)[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 C=this.$clipPositionToDocument(N.row,N.column);else C=this.$clipPositionToDocument(N,$);N=C.row,$=C.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 Ee=0;if(this.$useWrapMode){var Ae=this.$wrapData[D];if(Ae){for(var Re=0;ge.length>=Ae[Re];)ne++,Re++;ge=ge.substring(Ae[Re-1]||0,ge.length),Ee=Re>0?Ae.indent:0}}return this.lineWidgets&&this.lineWidgets[he]&&this.lineWidgets[he].rowsAbove&&(ne+=this.lineWidgets[he].rowsAbove),{row:ne,column:Ee+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 C=this.$wrapData.length,D=0,z=0,$=this.$foldData[z++],U=$?$.start.row:1/0;D<C;){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($,C,D){if(C===0)return[0,0];C||(C=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>C));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}();k.$uid=0,k.prototype.$modes=f.$modes,k.prototype.getValue=k.prototype.toString,k.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},k.prototype.$overwrite=!1,k.prototype.$mode=null,k.prototype.$modeId=null,k.prototype.$scrollTop=0,k.prototype.$scrollLeft=0,k.prototype.$wrapLimit=80,k.prototype.$useWrapMode=!1,k.prototype.$wrapLimitRange={min:null,max:null},k.prototype.lineWidgets=null,k.prototype.isFullWidth=W,d.implement(k.prototype,g);var T=1,E=2,_=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(k.prototype),n("./edit_session/bracket_match").BracketMatch.call(k.prototype),f.defineOptions(k.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=k}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,u){var d=n("./lib/lang"),p=n("./lib/oop"),w=n("./range").Range,f=function(){function h(){this.$options={}}return h.prototype.set=function(c){return p.mixin(this.$options,c),this},h.prototype.getOptions=function(){return d.copyObject(this.$options)},h.prototype.setOptions=function(c){this.$options=c},h.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,k,T,E){return m=new w(b,k,T,E),k==E&&o.start&&o.start.start&&o.skipCurrent!=!1&&m.isEqual(o.start)?(m=null,!1):!0}),m},h.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=[],k=o.re;if(o.$isMultiLine){var T=k.length,E=m.length-T,_;e:for(var x=k.offset||0;x<=E;x++){for(var R=0;R<T;R++)if(m[x+R].search(k[R])==-1)continue e;var I=m[x],O=m[x+T-1],L=I.length-I.match(k[0])[0].length,W=O.match(k[T-1])[0].length;_&&_.end.row===x&&_.end.column>L||(b.push(_=new w(x,L,x+T-1,W)),T>2&&(x=x+T-2))}}else for(var F,N=0;N<m.length;N++)if(this.$isMultilineSearch(o)){var $=m.length-1;if(F=this.$multiLineForward(c,k,N,$),F){var C=F.endRow<=$?F.endRow-1:$;C>N&&(N=C),b.push(new w(F.startRow,F.startCol,F.endRow,F.endCol))}}else{F=d.getMatchOffsets(m[N],k);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},h.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 k=c.charCodeAt(m);if(k===o.Backslash){if(m++,m>=b){l+="\\";break}var T=c.charCodeAt(m);switch(T){case o.Backslash:l+="\\";break;case o.n:l+=`
205
+ `;break;case o.t:l+=" ";break}continue}if(k===o.DollarSign){if(m++,m>=b){l+="$";break}var E=c.charCodeAt(m);if(E===o.DollarSign){l+="$$";continue}if(E===o.Digit0||E===o.Ampersand){l+="$&";continue}if(o.Digit1<=E&&E<=o.Digit9){l+="$"+c[m];continue}}l+=c[m]}return l||c},h.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 k=m.exec(c);if(!k||!b&&k[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 T=Math.min(c.length,c.length);T--;){var E=c[T];E&&E.toLowerCase()!=E?o[T]=o[T].toUpperCase():o[T]=o[T].toLowerCase()}o=o.join("")}return o}},h.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},h.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},h.prototype.$isMultilineSearch=function(c){return c.re&&/\\r\\n|\\r|\\n/.test(c.re.source)&&c.regExp&&!c.$isMultiLine},h.prototype.$multiLineForward=function(c,o,l,m){for(var b,k=a(c,l),T=l;T<=m;){for(var E=0;E<k&&!(T>m);E++){var _=c.getLine(T++);b=b==null?_:b+`
209
+ `+_}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},h.prototype.$multiLineBackward=function(c,o,l,m,b){for(var k,T=a(c,m),E=c.getLine(m).length-l,_=m;_>=b;){for(var x=0;x<T&&_>=b;x++){var R=c.getLine(_--);k=k==null?R:R+`
212
+ `+k}var I=i(k,o,E);if(I){var O=k.slice(0,I.index).split(`
213
+ `),L=I[0].split(`
214
+ `),W=_+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},h.prototype.$matchIterator=function(c,o){var l=this.$assembleRegExp(o);if(!l)return!1;var m=this.$isMultilineSearch(o),b=this.$multiLineForward,k=this.$multiLineBackward,T=o.backwards==!0,E=o.skipCurrent!=!1,_=l.unicode,x=o.range,R=o.start;R||(R=x?x[T?"end":"start"]:c.selection.getRange()),R.start&&(R=R[E!=T?"end":"start"]);var I=x?x.start.row:0,O=x?x.end.row:c.getLength()-1;if(T)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,$,C){var D=T?N-W+1:N;if(!(D<0||D+W>c.getLength())){var z=c.getLine(D),U=z.search(l[0]);if(!(!T&&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(!(T&&Z>$)&&C(D,U,D+W-1,Z))return!0}}};else if(T)var F=function(N,$,C){if(m){var D=k(c,l,$,N,I);if(!D)return!1;if(C(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,_)}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(C(N,ne,N,ne+te))return!0}}};else var F=function(N,$,C){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(C(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,C(N,G,N,G+te))return!0;if(!te&&(l.lastIndex=G+=d.skipEmptyMatch(U,G,_),G>=U.length))return!1}};return{forEach:L}},h}();function g(h,c){var o=d.supportsLookbehind();function l(T,E){E===void 0&&(E=!0);var _=o&&c.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return _.test(T)||c.regExp?o&&c.$supportsUnicodeFlag?E?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var m=Array.from(h),b=m[0],k=m[m.length-1];return l(b)+h+l(k,!1)}function i(h,c,o){for(var l=null,m=0;m<=h.length;){c.lastIndex=m;var b=c.exec(h);if(!b)break;var k=b.index+b[0].length;if(k>h.length-o)break;(!l||k>l.index+l[0].length)&&(l=b),m=b.index+1}return l}function a(h,c){var o=5e3,l={row:c,column:0},m=h.doc.positionToIndex(l),b=m+o,k=h.doc.indexToPosition(b),T=k.row;return T+1}r.Search=f}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,u){var d=this&&this.__extends||function(){var h=function(c,o){return h=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])},h(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");h(c,o);function l(){this.constructor=c}c.prototype=o===null?Object.create(o):(l.prototype=o.prototype,new l)}}(),p=n("../lib/keys"),w=n("../lib/useragent"),f=p.KEY_MODS,g=function(){function h(c,o){this.$init(c,o,!1)}return h.prototype.$init=function(c,o,l){this.platform=o||(w.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=l},h.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},h.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 k=m[b];if(k==c)delete m[b];else if(Array.isArray(k)){var T=k.indexOf(c);T!=-1&&(k.splice(T,1),k.length==1&&(m[b]=k[0]))}}},h.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 k=m.split(/\s+/);m=k.pop(),k.forEach(function(_){var x=this.parseKeys(_),R=f[x.hashId]+x.key;b+=(b?" ":"")+R,this._addCommandToBinding(b,"chainKeys")},this),b+=" "}var T=this.parseKeys(m),E=f[T.hashId]+T.key;this._addCommandToBinding(b+E,o,l)},this)}},h.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 k=m[c];for(b=0;b<k.length;b++){var T=k[b],E=i(T);if(E>l)break}k.splice(b,0,o)}},h.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)},h.prototype.removeCommands=function(c){Object.keys(c).forEach(function(o){this.removeCommand(c[o])},this)},h.prototype.bindKeys=function(c){Object.keys(c).forEach(function(o){this.bindKey(o,c[o])},this)},h.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},h.prototype.parseKeys=function(c){var o=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(E){return E}),l=o.pop(),m=p[l];if(p.FUNCTION_KEYS[m])l=p.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,k=o.length;k--;){var T=p.KEY_MODS[o[k]];if(T==null)return typeof console<"u"&&console.error("invalid modifier "+o[k]+" in "+c),!1;b|=T}return{key:l,hashId:b}},h.prototype.findKeyCommand=function(c,o){var l=f[c]+o;return this.commandKeyBinding[l]},h.prototype.handleKeyboard=function(c,o,l,m){if(!(m<0)){var b=f[o]+l,k=this.commandKeyBinding[b];return c.$keyChain&&(c.$keyChain+=" "+b,k=this.commandKeyBinding[c.$keyChain]||k),k&&(k=="chainKeys"||k[k.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:k})}},h.prototype.getStatusText=function(c,o){return o.$keyChain||""},h}();function i(h){return typeof h=="object"&&h.bindKey&&h.bindKey.position||(h.isDefault?-100:0)}var a=function(h){d(c,h);function c(o,l){var m=h.call(this,o,l)||this;return m.$singleCommand=!0,m}return c}(g);a.call=function(h,c,o){g.prototype.$init.call(h,c,o,!0)},g.call=function(h,c,o){g.prototype.$init.call(h,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,u){var d=this&&this.__extends||function(){var i=function(a,h){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,h)};return function(a,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");i(a,h);function c(){this.constructor=a}a.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}}(),p=n("../lib/oop"),w=n("../keyboard/hash_handler").MultiHashHandler,f=n("../lib/event_emitter").EventEmitter,g=function(i){d(a,i);function a(h,c){var o=i.call(this,c,h)||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(h,c,o){if(Array.isArray(h)){for(var l=h.length;l--;)if(this.exec(h[l],c,o))return!0;return!1}typeof h=="string"&&(h=this.commands[h]);var m={editor:c,command:h,args:o};return this.canExecute(h,c)?(m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1):(this._signal("commandUnavailable",m),!1)},a.prototype.canExecute=function(h,c){return typeof h=="string"&&(h=this.commands[h]),!(!h||c&&c.$readOnly&&!h.readOnly||this.$checkCommandState!=!1&&h.isAvailable&&!h.isAvailable(c))},a.prototype.toggleRecording=function(h){if(!this.$inReplay)return h&&h._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(h){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(h);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,h):this.exec(c[0],h,c[1])},this)}finally{this.$inReplay=!1}}},a.prototype.trimMacro=function(h){return h.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},a}(w);p.implement(g.prototype,f),r.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,u){var d=n("../lib/lang"),p=n("../config"),w=n("../range").Range;function f(i,a){return{win:i,mac:a}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:f("Ctrl-,","Command-,"),exec:function(i){p.loadModule("ace/ext/settings_menu",function(a){a.init(i),i.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:f("Alt-E","F4"),exec:function(i){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:f("Alt-Shift-E","Shift-F4"),exec:function(i){p.loadModule("ace/ext/error_marker",function(a){a.showErrorMarker(i,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:f("Ctrl-A","Command-A"),exec:function(i){i.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:f(null,"Ctrl-L"),exec:function(i){i.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:f("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:f("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:f("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:f("F2","F2"),exec:function(i){i.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:f("Alt-F2","Alt-F2"),exec:function(i){i.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:f(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:f(null,"Ctrl-Command-Option-0"),exec:function(i){i.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:f("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:f("Alt-Shift-0","Command-Option-Shift-0"),exec:function(i){i.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:f("Ctrl-K","Command-G"),exec:function(i){i.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:f("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:f("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:f("Alt-Shift-K","Ctrl-Shift-G"),exec:function(i){i.selection.isEmpty()?i.selection.selectWord():i.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:f("Ctrl-F","Command-F"),exec:function(i){p.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:f("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:f("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:f("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:f("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:f("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:f("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:f("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:f("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:f("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:f("Ctrl-Left","Option-Left"),exec:function(i){i.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:f("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:f("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:f("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:f("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:f("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:f("Ctrl-Right","Option-Right"),exec:function(i){i.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:f("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:f("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:f("Shift-Right","Shift-Right"),exec:function(i){i.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:f("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:f(null,"Option-PageDown"),exec:function(i){i.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:f("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:f(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:f("Ctrl-Up",null),exec:function(i){i.renderer.scrollBy(0,-2*i.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:f("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:f("Ctrl-Alt-E","Command-Option-E"),exec:function(i){i.commands.toggleRecording(i)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:f("Ctrl-Shift-E","Command-Shift-E"),exec:function(i){i.commands.replay(i)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:f("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(i){i.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:f("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:f("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:f(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(),h=a?i.selection.getLineRange():i.selection.getRange();i._emit("cut",h),h.isEmpty()||i.session.remove(h),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:f("Ctrl-D","Command-D"),exec:function(i){i.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:f("Ctrl-Shift-D","Command-Shift-D"),exec:function(i){i.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:f("Ctrl-Alt-S","Command-Alt-S"),exec:function(i){i.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:f("Ctrl-/","Command-/"),exec:function(i){i.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:f("Ctrl-Shift-/","Command-Shift-/"),exec:function(i){i.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:f("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(i){i.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:f("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(i){i.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:f("Ctrl-H","Command-Option-F"),exec:function(i){p.loadModule("ace/ext/searchbox",function(a){a.Search(i,!0)})}},{name:"undo",description:"Undo",bindKey:f("Ctrl-Z","Command-Z"),exec:function(i){i.undo()}},{name:"redo",description:"Redo",bindKey:f("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(i){i.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:f("Alt-Shift-Up","Command-Option-Up"),exec:function(i){i.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:f("Alt-Up","Option-Up"),exec:function(i){i.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:f("Alt-Shift-Down","Command-Option-Down"),exec:function(i){i.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:f("Alt-Down","Option-Down"),exec:function(i){i.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:f("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(i){i.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:f("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:f("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:f("Alt-Backspace","Command-Backspace"),exec:function(i){i.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:f("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(i){i.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:f("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:f("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:f("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(i){i.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:f("Ctrl-Delete","Alt-Delete"),exec:function(i){i.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:f("Shift-Tab","Shift-Tab"),exec:function(i){i.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:f("Tab","Tab"),exec:function(i){i.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:f("Ctrl-[","Ctrl-["),exec:function(i){i.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:f("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:f(null,"Ctrl-O"),exec:function(i){i.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:f("Alt-Shift-X","Ctrl-T"),exec:function(i){i.transposeLetters()},multiSelectAction:function(i){i.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:f("Ctrl-U","Ctrl-U"),exec:function(i){i.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:f("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(i){i.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:f(null,null),exec:function(i){i.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:f("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:f("Ctrl+F3","F3"),exec:function(i){i.openLink()}},{name:"joinlines",description:"Join lines",bindKey:f(null,null),exec:function(i){for(var a=i.selection.isBackwards(),h=a?i.selection.getSelectionLead():i.selection.getSelectionAnchor(),c=a?i.selection.getSelectionAnchor():i.selection.getSelectionLead(),o=i.session.doc.getLine(h.row).length,l=i.session.doc.getTextRange(i.selection.getRange()),m=l.replace(/\n\s*/," ").length,b=i.session.doc.getLine(h.row),k=h.row+1;k<=c.row+1;k++){var T=d.stringTrimLeft(d.stringTrimRight(i.session.doc.getLine(k)));T.length!==0&&(T=" "+T),b+=T}c.row+1<i.session.doc.getLength()-1&&(b+=i.session.doc.getNewLineCharacter()),i.clearSelection(),i.session.doc.replace(new w(h.row,0,c.row+2,0),b),m>0?(i.selection.moveCursorTo(h.row,h.column),i.selection.selectTo(h.row,h.column+m)):(o=i.session.doc.getLine(h.row).length>o?o+1:o,i.selection.moveCursorTo(h.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:f(null,null),exec:function(i){var a=i.session.doc.getLength()-1,h=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===h||o.push(new w(c[l].end.row,c[l].end.column,a,h))),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:f("F1","F1"),exec:function(i){i.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:f(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,u){var d=n("../lib/keys"),p=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 p(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 h=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldLaneWidget(h),o=this.$findNearestAnnotation(h);if(!(c===null&&o===null)){var l=this.$findClosestNumber(c,o,h);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 f(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),h=this.editor.session.$gutterCustomWidgets[a];if(h)h.callbacks&&h.callbacks.onClick&&h.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)),h=this.$getFoldWidget(i).style.display!=="none";return a&&h},g.prototype.$isCustomWidgetVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),h=!!this.$getCustomWidget(i);return a&&h},g.prototype.$isAnnotationVisible=function(i){var a=this.editor.isRowFullyVisible(this.$rowIndexToRow(i)),h=this.$getAnnotation(i).style.display!=="none";return a&&h},g.prototype.$getFoldWidget=function(i){var a=this.lines.get(i),h=a.element;return h.childNodes[1]},g.prototype.$getCustomWidget=function(i){var a=this.lines.get(i),h=a.element;return h.childNodes[3]},g.prototype.$getAnnotation=function(i){var a=this.lines.get(i),h=a.element;return h.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,h){return i===null?a:a===null||Math.abs(h-i)<=Math.abs(h-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 h=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(h===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$isCustomWidgetVisible(h)?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 h=this.lines.get(a);if(h.row==i)return a}return null},g}();r.GutterKeyboardHandler=w;var f=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=f}),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,u){var d=this&&this.__values||function($){var C=typeof Symbol=="function"&&Symbol.iterator,D=C&&$[C],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(C?"Object is not iterable.":"Symbol.iterator is not defined.")},p=n("./lib/oop"),w=n("./lib/dom"),f=n("./lib/lang"),g=n("./lib/useragent"),i=n("./keyboard/textinput").TextInput,a=n("./mouse/mouse_handler").MouseHandler,h=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,k=n("./commands/command_manager").CommandManager,T=n("./commands/default_commands").commands,E=n("./config"),_=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 $(C,D,z){this.id="editor"+ ++$.$uid,this.session,this.$toDestroy=[];var U=C.getContainerElement();this.container=U,this.renderer=C,this.commands=new k(g.isMac?"mac":"win",T),typeof document=="object"&&(this.textInput=new i(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new h(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=f.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("")),E.resetOptions(this),z&&this.setOptions(z),E._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(C){this.session.startOperation(C)},$.prototype.endOperation=function(C){this.session.endOperation(C)},$.prototype.onStartOperation=function(C){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,C||(this.previousCommand=null)},$.prototype.onEndOperation=function(C){if(this.curOp&&this.session){if(C&&C.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(C){if(this.$mergeUndoDeltas){var D=this.prevOp,z=this.$mergeableCommands,U=D.command&&C.command.name==D.command.name;if(C.command.name=="insertstring"){var G=C.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(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(U=!1),U?this.session.mergeUndoDeltas=!0:z.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},$.prototype.setKeyboardHandler=function(C,D){if(C&&typeof C=="string"&&C!="ace"){this.$keybindingId=C;var z=this;E.loadModule(["keybinding",C],function(U){z.$keybindingId==C&&z.keyBinding.setKeyboardHandler(U&&U.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),D&&D()},$.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},$.prototype.setSession=function(C){if(this.session!=C){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=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.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=C.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(C)),this._signal("changeSession",{session:C,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),D&&(D.$editor=null),C&&C._signal("changeEditor",{editor:this}),C&&(C.$editor=this),C&&!C.destroyed&&C.bgTokenizer.scheduleStart()}},$.prototype.getSession=function(){return this.session},$.prototype.setValue=function(C,D){return this.session.doc.setValue(C),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),C},$.prototype.getValue=function(){return this.session.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.resize=function(C){this.renderer.onResize(C)},$.prototype.setTheme=function(C,D){this.renderer.setTheme(C,D)},$.prototype.getTheme=function(){return this.renderer.getTheme()},$.prototype.setStyle=function(C,D){this.renderer.setStyle(C,D)},$.prototype.unsetStyle=function(C){this.renderer.unsetStyle(C)},$.prototype.getFontSize=function(){return this.getOption("fontSize")||w.computedStyle(this.container).fontSize},$.prototype.setFontSize=function(C){this.setOption("fontSize",C)},$.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var D=C.session;if(!(!D||D.destroyed)){D.$bracketHighlight&&(D.$bracketHighlight.markerIds.forEach(function(ue){D.removeMarker(ue)}),D.$bracketHighlight=null);var z=C.getCursorPosition(),U=C.getKeyboardHandler(),G=U&&U.$getDirectionForHighlight&&U.$getDirectionForHighlight(C),Z=D.getMatchingBracketRanges(z,G);if(!Z){var te=new _(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(C.session)),!Z){C.getHighlightIndentGuides()&&C.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")})},C.getHighlightIndentGuides()&&C.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(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},$.prototype.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},$.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},$.prototype.onDocumentChange=function(C){var D=this.session.$useWrapMode,z=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,z,D),this._signal("change",C),this.$cursorChange()},$.prototype.onTokenizerUpdate=function(C){var D=C.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 C=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)),C.$highlightLineMarker&&!D)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&D){var z=new m(D.row,D.column,D.row,1/0);z.id=C.addMarker(z,"ace_active-line","screenLine"),C.$highlightLineMarker=z}else D&&(C.$highlightLineMarker.start.row=D.row,C.$highlightLineMarker.end.row=D.row,C.$highlightLineMarker.start.column=D.column,C._signal("changeBackMarker"))},$.prototype.onSelectionChange=function(C){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 C=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var z=D.start.column,U=D.end.column,G=C.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(C){this.renderer.updateText(),this._emit("changeMode",C)},$.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 C=this.getSelectedText(),D=this.session.doc.getNewLineCharacter(),z=!1;if(!C&&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||(C+=this.session.getLine(Z.start.row)+D)}}var te={text:C};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(C,D){var z={text:C,event:D};this.commands.exec("paste",this,z)},$.prototype.$handlePaste=function(C){typeof C=="string"&&(C={text:C}),this._signal("paste",C);var D=C.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(C,D){return this.commands.exec(C,this,D)},$.prototype.insert=function(C,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,C);Z&&(C!==Z.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),C=Z.text)}if(C==" "&&(C=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&C.indexOf(`
217
+ `)==-1){var te=m.fromPoints(G,G);te.end.column+=C.length,this.session.remove(te)}}else{var te=this.getSelectionRange();G=this.session.remove(te),this.clearSelection()}if(C==`
218
+ `||C==`\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,C);if(z.insert(G,C),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(C)){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 C=this.session,D=C.getMode(),z=this.selection.isEmpty()?[new m(0,0,C.doc.getLength()-1,0)]:this.selection.getAllRanges(),U="",G="",Z="",te=C.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=C.getState(ue-1),G=C.getLine(ue-1),Z=D.getNextLineIndent(U,G,te));var ce=C.getLine(ue),ge=D.$getIndent(ce);if(Z!==ge){if(ge.length>0){var Ee=new m(ue,0,ue,ge.length);C.remove(Ee)}Z.length>0&&C.insert({row:ue,column:0},Z)}D.autoOutdent(U,C,ue)}},$.prototype.onTextInput=function(C,D){if(!D)return this.keyBinding.onTextInput(C);this.startOperation({command:{name:"insertstring"}});var z=this.applyComposition.bind(this,C,D);this.selection.rangeCount?this.forEachSelection(z):z(),this.endOperation()},$.prototype.applyComposition=function(C,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),!C&&!z.isEmpty()&&this.remove()}if((C||!this.selection.isEmpty())&&this.insert(C,!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(C,D,z){return this.keyBinding.onCommandKey(C,D,z)},$.prototype.setOverwrite=function(C){this.session.setOverwrite(C)},$.prototype.getOverwrite=function(){return this.session.getOverwrite()},$.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},$.prototype.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},$.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},$.prototype.setDragDelay=function(C){this.setOption("dragDelay",C)},$.prototype.getDragDelay=function(){return this.getOption("dragDelay")},$.prototype.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},$.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},$.prototype.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},$.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},$.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},$.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},$.prototype.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},$.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},$.prototype.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},$.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},$.prototype.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},$.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},$.prototype.setHighlightIndentGuides=function(C){this.renderer.setHighlightIndentGuides(C)},$.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},$.prototype.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},$.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},$.prototype.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},$.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},$.prototype.setReadOnly=function(C){this.setOption("readOnly",C)},$.prototype.getReadOnly=function(){return this.getOption("readOnly")},$.prototype.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},$.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},$.prototype.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},$.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},$.prototype.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},$.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},$.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.remove=function(C){this.selection.isEmpty()&&(C=="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 C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},$.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(`
221
+ `),this.moveCursorToPosition(C)},$.prototype.setGhostText=function(C,D){this.renderer.setGhostText(C,D)},$.prototype.removeGhostText=function(){this.renderer.removeGhostText()},$.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),D=C.column;if(D!==0){var z=this.session.getLine(C.row),U,G;D<z.length?(U=z.charAt(D)+z.charAt(D-1),G=new m(C.row,D-1,C.row,D+1)):(U=z.charAt(D-1)+z.charAt(D-2),G=new m(C.row,D-2,C.row,D)),this.session.replace(G,U),this.session.selection.moveToPosition(G.end)}}},$.prototype.toLowerCase=function(){var C=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(C)},$.prototype.toUpperCase=function(){var C=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(C)},$.prototype.indent=function(){var C=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var z=this.$getSelectedRows();C.indentRows(z.first,z.last," ");return}else if(D.start.column<D.end.column){var U=C.getTextRange(D);if(!/^\s+$/.test(U)){var z=this.$getSelectedRows();C.indentRows(z.first,z.last," ");return}}var G=C.getLine(D.start.row),Z=D.start,te=C.getTabSize(),he=C.documentToScreenColumn(Z.row,Z.column);if(this.session.getUseSoftTabs())var ne=te-he%te,le=f.stringRepeat(" ",ne);else{for(var ne=he%te;G[D.start.column-1]==" "&&ne;)D.start.column--,ne--;this.selection.setSelectionRange(D),le=" "}return this.insert(le)},$.prototype.blockIndent=function(){var C=this.$getSelectedRows();this.session.indentRows(C.first,C.last," ")},$.prototype.blockOutdent=function(){var C=this.session.getSelection();this.session.outdentRows(C.getRange())},$.prototype.sortLines=function(){for(var C=this.$getSelectedRows(),D=this.session,z=[],U=C.first;U<=C.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=C.first;U<=C.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-C.first])}},$.prototype.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,D.first,D.last)},$.prototype.toggleBlockComment=function(){var C=this.getCursorPosition(),D=this.session.getState(C.row),z=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,z,C)},$.prototype.getNumberAt=function(C,D){var z=/[\-]?[0-9]+(?:\.[0-9]+)?/g;z.lastIndex=0;for(var U=this.session.getLine(C);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(C){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?C*=Math.pow(10,Z.end-z-1):C*=Math.pow(10,Z.end-z),ne+=C,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 C=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(C,te+U),ne.selection.selectTo(C,he+U)),te=he});for(var le=this.$toggleWordPairs,ue,ce=0;ce<le.length;ce++)for(var ge=le[ce],Ee=0;Ee<=1;Ee++){var Ae=+!Ee,Re=z.match(new RegExp("^\\s?_?("+f.escapeRegExp(ge[Ee])+")\\s?$","i"));if(Re){var Xe=z.match(new RegExp("([_]|^|\\s)("+f.escapeRegExp(Re[1])+")($|\\s)","g"));Xe&&(ue=z.replace(new RegExp(f.escapeRegExp(ge[Ee]),"i"),function(Ke){var dt=ge[Ae];return Ke.toUpperCase()==Ke?dt=dt.toUpperCase():Ke.charAt(0).toUpperCase()==Ke.charAt(0)&&(dt=dt.substr(0,0)+ge[Ae].charAt(0).toUpperCase()+dt.substr(1)),dt}),this.insert(ue),ue="")}}},$.prototype.findLinkAt=function(C,D){var z,U,G=this.session.getLine(C),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(Ee){z={error:Ee}}finally{try{ce&&!ce.done&&(U=ue.return)&&U.call(ue)}finally{if(z)throw z.error}}return le},$.prototype.openLink=function(){var C=this.selection.getCursor(),D=this.findLinkAt(C.row,C.column);return D&&window.open(D,"_blank"),D!=null},$.prototype.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},$.prototype.duplicateSelection=function(){var C=this.selection,D=this.session,z=C.getRange(),U=C.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,C.setSelectionRange(z,U)}},$.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},$.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},$.prototype.moveText=function(C,D,z){return this.session.moveText(C,D,z)},$.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},$.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},$.prototype.$moveLines=function(C,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:C),D&&C==-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,Ee=z.last;++ue<le;){ne&&te[ue].moveBy(ne,0);var Ae=this.$getSelectedRows(te[ue]);if(D&&Ae.first!=Ee||!D&&Ae.first>Ee+1)break;Ee=Ae.last}for(ue--,he=this.session.$moveLines(ge,Ee,D?0:C),D&&C==-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(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},$.prototype.onCompositionStart=function(C){this.renderer.showComposition(C)},$.prototype.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},$.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},$.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},$.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},$.prototype.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},$.prototype.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},$.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},$.prototype.$moveByPage=function(C,D){var z=this.renderer,U=this.renderer.layerConfig,G=C*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(C){this.renderer.scrollToRow(C)},$.prototype.scrollToLine=function(C,D,z,U){this.renderer.scrollToLine(C,D,z,U)},$.prototype.centerSelection=function(){var C=this.getSelectionRange(),D={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.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(C,D){this.selection.moveCursorTo(C,D)},$.prototype.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},$.prototype.jumpToMatching=function(C,D){var z=this.getCursorPosition(),U=new _(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 Ee,Ae;if(he==="bracket")Ee=this.session.getBracketRange(z),Ee||(Ee=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1,U.getCurrentTokenRow(),U.getCurrentTokenColumn()+ue-1),Ae=Ee.start,(D||Ae.row===z.row&&Math.abs(Ae.column-z.column)<2)&&(Ee=this.session.getBracketRange(Ae)));else if(he==="tag"){if(!te||te.type.indexOf("tag-name")===-1)return;if(Ee=new m(U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2,U.getCurrentTokenRow(),U.getCurrentTokenColumn()-2),Ee.compare(z.row,z.column)===0){var Re=this.session.getMatchingTags(z);Re&&(Re.openTag.contains(z.row,z.column)?(Ee=Re.closeTag,Ae=Ee.start):(Ee=Re.openTag,Re.closeTag.start.row===z.row&&Re.closeTag.start.column===z.column?Ae=Ee.end:Ae=Ee.start))}Ae=Ae||Ee.start}Ae=Ee&&Ee.cursor||Ae,Ae&&(C?Ee&&D?this.selection.setRange(Ee):Ee&&Ee.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Ae.row,Ae.column):this.selection.moveTo(Ae.row,Ae.column))}}},$.prototype.gotoLine=function(C,D,z){this.selection.clearSelection(),this.session.unfold({row:C-1,column:D||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(C-1,D||0),this.isRowFullyVisible(C-1)||this.scrollToLine(C-1,!0,z)},$.prototype.navigateTo=function(C,D){this.selection.moveTo(C,D)},$.prototype.navigateUp=function(C){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-C||-1,0)},$.prototype.navigateDown=function(C){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(C||1,0)},$.prototype.navigateLeft=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},$.prototype.navigateRight=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)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(C,D){D&&this.$search.set(D);var z=this.$search.find(this.session),U=0;return z&&(this.$tryReplace(z,C)&&(U=1),this.selection.setSelectionRange(z),this.renderer.scrollSelectionIntoView(z.start,z.end)),U},$.prototype.replaceAll=function(C,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],C)&&U++;return this.selection.setSelectionRange(G),U},$.prototype.$tryReplace=function(C,D){var z=this.session.getTextRange(C);return D=this.$search.replace(z,D),D!==null?(C.end=this.session.replace(C,D),C):null},$.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},$.prototype.find=function(C,D,z){D||(D={}),typeof C=="string"||C instanceof RegExp?D.needle=C:typeof C=="object"&&p.mixin(D,C);var U=this.selection.getRange();D.needle==null&&(C=this.session.getTextRange(U)||this.$search.$options.needle,C||(U=this.session.getWordRange(U.start.row,U.start.column),C=this.session.getTextRange(U)),this.$search.set({needle:C})),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(C,D){this.find({skipCurrent:!0,backwards:!1},C,D)},$.prototype.findPrevious=function(C,D){this.find(C,{skipCurrent:!0,backwards:!0},D)},$.prototype.revealRange=function(C,D){this.session.unfold(C),this.selection.setSelectionRange(C);var z=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.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(C){C.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(C){if(C){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 C=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(C)),D.isBlinking=!this.$readOnly&&C!="wide",w.setCssClass(D.element,"ace_slim-cursors",/slim/.test(C)))},$.prototype.prompt=function(C,D,z){var U=this;E.loadModule("ace/ext/prompt",function(G){G.prompt(U,C,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"],["&&","||"],["==","!="]],p.implement(F.prototype,b),E.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 C=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){C.hoverTooltip||(C.hoverTooltip=new W);var G=w.createElement("div");G.textContent=R("editor.tooltip.disable-editing","Editing is disabled"),C.hoverTooltip.isOpen||C.hoverTooltip.showForRange(C,C.getSelectionRange(),G)}else C.hoverTooltip&&C.hoverTooltip.isOpen&&C.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 C=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(C&&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(!C&&!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!C&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function($){var C={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(C),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(C),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($,C){return(Math.abs($.selection.lead.row-C)||C+1+(C<9?"·":""))+""},getWidth:function($,C,D){return Math.max(C.toString().length,(D.lastRow+1).toString().length,2)*D.characterWidth},update:function($,C){C.renderer.$loop.schedule(C.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,u){var d=n("../lib/dom"),p=function(){function w(f,g){this.element=f,this.canvasHeight=g||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return w.prototype.moveContainer=function(f){d.translate(this.element,0,-(f.firstRowScreen*f.lineHeight%this.canvasHeight)-f.offset*this.$offsetCoefficient)},w.prototype.pageChanged=function(f,g){return Math.floor(f.firstRowScreen*f.lineHeight/this.canvasHeight)!==Math.floor(g.firstRowScreen*g.lineHeight/this.canvasHeight)},w.prototype.computeLineTop=function(f,g,i){var a=g.firstRowScreen*g.lineHeight,h=Math.floor(a/this.canvasHeight),c=i.documentToScreenRow(f,0)*g.lineHeight;return c-h*this.canvasHeight},w.prototype.computeLineHeight=function(f,g,i){return g.lineHeight*i.getRowLineCount(f)},w.prototype.getLength=function(){return this.cells.length},w.prototype.get=function(f){return this.cells[f]},w.prototype.shift=function(){this.$cacheCell(this.cells.shift())},w.prototype.pop=function(){this.$cacheCell(this.cells.pop())},w.prototype.push=function(f){if(Array.isArray(f)){this.cells.push.apply(this.cells,f);for(var g=d.createFragment(this.element),i=0;i<f.length;i++)g.appendChild(f[i].element);this.element.appendChild(g)}else this.cells.push(f),this.element.appendChild(f.element)},w.prototype.unshift=function(f){if(Array.isArray(f)){this.cells.unshift.apply(this.cells,f);for(var g=d.createFragment(this.element),i=0;i<f.length;i++)g.appendChild(f[i].element);this.element.firstChild?this.element.insertBefore(g,this.element.firstChild):this.element.appendChild(g)}else this.cells.unshift(f),this.element.insertAdjacentElement("afterbegin",f.element)},w.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},w.prototype.$cacheCell=function(f){f&&(f.element.remove(),this.cellCache.push(f))},w.prototype.createCell=function(f,g,i,a){var h=this.cellCache.pop();if(!h){var c=d.createElement("div");a&&a(c),this.element.appendChild(c),h={element:c,text:"",row:f}}return h.row=f,h},w}();r.Lines=p}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,u){var d=n("../lib/dom"),p=n("../lib/oop"),w=n("../lib/lang"),f=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,k=this.$annotations[b];k||(k=this.$annotations[b]={text:[],type:[],displayText:[]});var T=m.text,E=m.text,_=m.type;T=T?w.escapeHTML(T):m.html||"",E=E||m.html||"",k.text.indexOf(T)===-1&&(k.text.push(T),k.type.push(_),k.displayText.push(E));var x=m.className;x?k.className=x:_==="error"?k.className=" ace_error":_==="security"&&!/\bace_error\b/.test(k.className)?k.className=" ace_security":_==="warning"&&!/\bace_(error|security)\b/.test(k.className)?k.className=" ace_warning":_==="info"&&!k.className?k.className=" ace_info":_==="hint"&&!k.className&&(k.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 k=l.getNextFoldLine(m),T=k?k.start.row:1/0,E=null,_=-1,x=m;;){if(x>T&&(x=k.end.row+1,k=l.getNextFoldLine(x,k),T=k?k.start.row:1/0),x>b){for(;this.$lines.getLength()>_+1;)this.$lines.pop();break}E=this.$lines.get(++_),E?E.row=x:(E=this.$lines.createCell(x,o,this.session,h),this.$lines.push(E)),this.$renderCell(E,o,k,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,k=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||l.$useWrapMode)&&(k=l.getLength()+b-1);var T=m?m.getWidth(l,k,o):k.toString().length*o.characterWidth,E=this.$padding||this.$computePadding();T+=E.left+E.right,T!==this.gutterWidth&&!isNaN(T)&&(this.gutterWidth=T,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",T))},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 k=this.session.getFoldLine(this.$cursorRow);if(m>0&&k&&k.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 k=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);k>0;k--)this.$lines.shift();if(b>m)for(var k=this.session.getFoldedRowCount(m+1,b);k>0;k--)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=[],k=l,T=this.session.getNextFoldLine(k),E=T?T.start.row:1/0;k>E&&(k=T.end.row+1,T=this.session.getNextFoldLine(k,T),E=T?T.start.row:1/0),!(k>m);){var _=this.$lines.createCell(k,o,this.session,h);this.$renderCell(_,o,T,k),b.push(_),k++}return b},c.prototype.$renderCell=function(o,l,m,b){var k=o.element,T=this.session,E=k.childNodes[0],_=k.childNodes[1],x=k.childNodes[2],R=k.childNodes[3],I=x.firstChild,O=T.$firstLineNumber,L=T.$breakpoints,W=T.$decorations,F=T.gutterRenderer||this.$renderer,N=this.$showFoldWidgets&&T.foldWidgets,$=m?m.start.row:Number.MAX_VALUE,C=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(T,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]=T.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";_.className!=Z&&(_.className=Z),d.setStyle(_.style,"height",C),d.setStyle(_.style,"display","inline-block"),_.setAttribute("role","button"),_.setAttribute("tabindex","-1");var ue=T.getFoldWidgetRange(b);ue?_.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?_.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])):_.setAttribute("aria-label",i("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[b+1])),te?(_.setAttribute("aria-expanded","false"),_.setAttribute("title",i("gutter.code-folding.closed.title","Unfold code"))):(_.setAttribute("aria-expanded","true"),_.setAttribute("title",i("gutter.code-folding.open.title","Fold code")))}else _&&(d.setStyle(_.style,"display","none"),_.setAttribute("tabindex","0"),_.removeAttribute("role"),_.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",C),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",C);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:k.classList.add(this.$annotations[b].className.replace(" ","")),d.setStyle(I.style,"height",C),d.setStyle(x.style,"display","block"),d.setStyle(x.style,"height",C);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!==E.data&&(E.data=U),k.className!=D&&(k.className=D),d.setStyle(o.element.style,"height",this.$lines.computeLineHeight(b,l,T)+"px"),d.setStyle(o.element.style,"top",this.$lines.computeLineTop(b,l,T)+"px"),o.text=U,x.style.display==="none"&&_.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,k=l.label,T=l.title,E=l.callbacks;this.session.$gutterCustomWidgets[o]={className:b,label:k,title:T,callbacks:E},this.$hideFoldWidget(o,m);var _=m||this.$getGutterCell(o);if(_&&_.element){var x=_.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",k),x.setAttribute("title",T),d.setStyle(x.style,"display","inline-block"),d.setStyle(x.style,"height","inherit"),E&&E.onClick&&x.addEventListener("click",function(R){E.onClick(R,o),R.stopPropagation()}),_.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,p.implement(a.prototype,f);function h(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,u){var d=n("../range").Range,p=n("../lib/dom"),w=function(){function g(i){this.element=p.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 h=this.i!=-1&&this.element.childNodes[this.i];h?this.i++:(h=document.createElement("div"),this.element.appendChild(h),this.i=-1),h.style.cssText=a,h.className=i},g.prototype.update=function(i){if(i){this.config=i,this.i=0;var a;for(var h in this.markers){var c=this.markers[h];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,h,c,o){for(var l=this.session,m=a.start.row,b=a.end.row,k=m,T=0,E=0,_=l.getScreenLastRowColumn(k),x=new d(k,a.start.column,k,E);k<=b;k++)x.start.row=x.end.row=k,x.start.column=k==m?a.start.column:l.getRowWrapIndent(k),x.end.column=_,T=E,E=_,_=k+1<b?l.getScreenLastRowColumn(k+1):k==b?0:a.end.column,this.drawSingleLineMarker(i,x,h+(k==m?" ace_start":"")+" ace_br"+f(k==m||k==m+1&&a.start.column,T<E,E>_,k==b),c,k==b?0:1,o)},g.prototype.drawMultiLineMarker=function(i,a,h,c,o){var l=this.$padding,m=c.lineHeight,b=this.$getTop(a.start.row,c),k=l+a.start.column*c.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(a.start.row)){var T=a.clone();T.end.row=T.start.row,T.end.column=this.session.getLine(T.start.row).length,this.drawBidiSingleLineMarker(i,T,h+" ace_br1 ace_start",c,null,o)}else this.elt(h+" ace_br1 ace_start","height:"+m+"px;right:"+l+"px;top:"+b+"px;left:"+k+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(a.end.row)){var T=a.clone();T.start.row=T.end.row,T.start.column=0,this.drawBidiSingleLineMarker(i,T,h+" ace_br12",c,null,o)}else{b=this.$getTop(a.end.row,c);var E=a.end.column*c.characterWidth;this.elt(h+" ace_br12","height:"+m+"px;width:"+E+"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 _=(a.start.column?1:0)|(a.end.column?0:8);this.elt(h+(_?" ace_br"+_:""),"height:"+m+"px;right:"+l+"px;top:"+b+"px;left:"+l+"px;"+(o||""))}},g.prototype.drawSingleLineMarker=function(i,a,h,c,o,l){if(this.session.$bidiHandler.isBidiRow(a.start.row))return this.drawBidiSingleLineMarker(i,a,h,c,o,l);var m=c.lineHeight,b=(a.end.column+(o||0)-a.start.column)*c.characterWidth,k=this.$getTop(a.start.row,c),T=this.$padding+a.start.column*c.characterWidth;this.elt(h,"height:"+m+"px;width:"+b+"px;top:"+k+"px;left:"+T+"px;"+(l||""))},g.prototype.drawBidiSingleLineMarker=function(i,a,h,c,o,l){var m=c.lineHeight,b=this.$getTop(a.start.row,c),k=this.$padding,T=this.session.$bidiHandler.getSelections(a.start.column,a.end.column);T.forEach(function(E){this.elt(h,"height:"+m+"px;width:"+(E.width+(o||0))+"px;top:"+b+"px;left:"+(k+E.left)+"px;"+(l||""))},this)},g.prototype.drawFullLineMarker=function(i,a,h,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(h,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g.prototype.drawScreenLineMarker=function(i,a,h,c,o){var l=this.$getTop(a.start.row,c),m=c.lineHeight;this.elt(h,"height:"+m+"px;top:"+l+"px;left:0;right:0;"+(o||""))},g}();w.prototype.$padding=0;function f(g,i,a,h){return(g?1:0)|(i?2:0)|(a?4:0)|(h?8:0)}r.Marker=w}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,u){var d=new Set(["text","rparen","lparen"]);r.isTextToken=function(p){return d.has(p)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,u){var d=n("../lib/oop"),p=n("../lib/dom"),w=n("../lib/lang"),f=n("./lines").Lines,g=n("../lib/event_emitter").EventEmitter,i=n("../config").nls,a=n("./text_util").isTextToken,h=function(){function c(o){this.dom=p,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",o.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new f(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 k="ace_indent-guide",T=this.showSpaces?" ace_invisible ace_invisible_space":"",E=this.showSpaces?w.stringRepeat(this.SPACE_CHAR,this.tabSize):w.stringRepeat(" ",this.tabSize),_=this.showTabs?" ace_invisible ace_invisible_tab":"",x=this.showTabs?w.stringRepeat(this.TAB_CHAR,this.tabSize):E,b=this.dom.createElement("span");b.className=k+T,b.textContent=E,this.$tabStrings[" "]=b;var b=this.dom.createElement("span");b.className=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),k=Math.min(m,o.lastRow),T=this.element.childNodes,E=0,_=o.firstRow;_<b;_++){var x=this.session.getFoldLine(_);if(x)if(x.containsRow(b)){b=x.start.row;break}else _=x.end.row;E++}for(var R=!1,_=b,x=this.session.getNextFoldLine(_),I=x?x.start.row:1/0;_>I&&(_=x.end.row+1,x=this.session.getNextFoldLine(_,x),I=x?x.start.row:1/0),!(_>k);){var O=T[E++];if(O){this.dom.removeChildren(O),this.$renderLine(O,_,_==I?x:!1),R&&(O.style.top=this.$lines.computeLineTop(_,o,this.session)+"px");var L=o.lineHeight*this.session.getRowLength(_)+"px";O.style.height!=L&&(R=!0,O.style.height=L)}_++}if(R)for(;E<this.$lines.cells.length;){var W=this.$lines.cells[E++];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 k=this.session.getFoldedRowCount(l.firstRow,o.firstRow-1);k>0;k--)this.$lines.shift();if(l.lastRow>o.lastRow)for(var k=this.session.getFoldedRowCount(o.lastRow+1,l.lastRow);k>0;k--)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=[],k=l,T=this.session.getNextFoldLine(k),E=T?T.start.row:1/0;k>E&&(k=T.end.row+1,T=this.session.getNextFoldLine(k,T),E=T?T.start.row:1/0),!(k>m);){var _=this.$lines.createCell(k,o,this.session),x=_.element;this.dom.removeChildren(x),p.setStyle(x.style,"height",this.$lines.computeLineHeight(k,o,this.session)+"px"),p.setStyle(x.style,"top",this.$lines.computeLineTop(k,o,this.session)+"px"),this.$renderLine(x,k,k==E?T:!1),this.$useLineGroups()?x.className="ace_line_group":x.className="ace_line",b.push(_),k++}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 k=this,T=/(\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,E=this.dom.createFragment(this.element),_,x=0;_=T.exec(b);){var R=_[1],I=_[2],O=_[3],L=_[4],W=_[5];if(!(!k.showSpaces&&I)){var F=x!=_.index?b.slice(x,_.index):"";if(x=_.index+_[0].length,F&&E.appendChild(this.dom.createTextNode(F,this.element)),R){var N=k.session.getScreenTabSize(l+_.index),$=k.$tabStrings[N].cloneNode(!0);$.charCount=1,E.appendChild($),l+=N-1}else if(I)if(k.showSpaces){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space",C.textContent=w.stringRepeat(k.SPACE_CHAR,I.length),E.appendChild(C)}else E.appendChild(this.dom.createTextNode(I,this.element));else if(O){var C=this.dom.createElement("span");C.className="ace_invisible ace_invisible_space ace_invalid",C.textContent=w.stringRepeat(k.SPACE_CHAR,O.length),E.appendChild(C)}else if(L){l+=1;var C=this.dom.createElement("span");C.style.width=k.config.characterWidth*2+"px",C.className=k.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",C.textContent=k.showSpaces?k.SPACE_CHAR:L,E.appendChild(C)}else if(W){l+=1;var C=this.dom.createElement("span");C.style.width=k.config.characterWidth*2+"px",C.className="ace_cjk",C.textContent=W,E.appendChild(C)}}}if(E.appendChild(this.dom.createTextNode(x?b.slice(x):b,this.element)),a(m.type))o.appendChild(E);else{var D="ace_"+m.type.replace(/\./g," ace_"),C=this.dom.createElement("span");m.type=="fold"&&(C.style.width=m.value.length*this.config.characterWidth+"px",C.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),C.className=D,C.appendChild(E),o.appendChild(C)}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 k=b/this.tabSize,T=0;T<k;T++)o.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),l.substr(b)}else if(l[0]==" "){for(var T=0;T<b;T++)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 k=this.session.$bracketHighlight;if(k){for(var T=this.session.$bracketHighlight.ranges,E=0;E<T.length;E++)if(l.row!==T[E].start.row){this.$highlightIndentGuideMarker.end=T[E].start.row+1,l.row>T[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&o[l.row]!==""&&l.column===o[l.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=l.row+1;E<o.length;E++){var _=o[E],x=/^\s*/.exec(_)[0].length;if(_!==""&&(this.$highlightIndentGuideMarker.end=E,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 k=b.childNodes;if(k){var T=k[l-1];T&&T.classList&&T.classList.contains("ace_indent-guide")&&T.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,k=0,T=m[0],E=0,_=this.$createLineElement();o.appendChild(_);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(_,I,T),!I)continue;b-=I.length}if(b+I.length<T)E=this.$renderToken(_,E,R,I),b+=I.length;else{for(;b+I.length>=T;){E=this.$renderToken(_,E,R,I.substring(0,T-b)),I=I.substring(T-b),b=T,_=this.$createLineElement(),o.appendChild(_);var O=this.dom.createTextNode(w.stringRepeat(" ",m.indent),this.element);O.charCount=0,_.appendChild(O),k++,E=0,T=m[k]||Number.MAX_VALUE}I.length!=0&&(b+=I.length,E=this.$renderToken(_,E,R,I))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(_,E,null,"",!0)},c.prototype.$renderSimpleLine=function(o,l){for(var m=0,b=0;b<l.length;b++){var k=l[b],T=k.value;if(!(b==0&&this.displayIndentGuides&&(T=this.renderIndentGuide(o,T),!T))){if(m+T.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(o,m,k,T);m=this.$renderToken(o,m,k,T)}}},c.prototype.$renderOverflowMessage=function(o,l,m,b,k){m&&this.$renderToken(o,l,m,b.slice(0,this.MAX_LINE_LENGTH-l));var T=this.dom.createElement("span");T.className="ace_inline_button ace_keyword ace_toggle_wrap",T.textContent=k?"<hide>":"<click to see more...>",o.appendChild(T)},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 k=o;if(b.length){var T=this.session.getRowSplitData(l);if(T&&T.length){this.$renderWrappedLine(o,b,T);var k=o.lastChild}else{var k=o;this.$useLineGroups()&&(k=this.$createLineElement(),o.appendChild(k)),this.$renderSimpleLine(k,b)}}else this.$useLineGroups()&&(k=this.$createLineElement(),o.appendChild(k));if(this.showEOL&&k){m&&(l=m.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=l==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,k.appendChild(E)}},c.prototype.$getFoldLineTokens=function(o,l){var m=this.session,b=[];function k(E,_,x){for(var R=0,I=0;I+E[R].value.length<_;)if(I+=E[R].value.length,R++,R==E.length)return;if(I!=_){var O=E[R].value.substring(_-I);O.length>x-_&&(O=O.substring(0,x-_)),b.push({type:E[R].type,value:O}),I=_+O.length,R+=1}for(;I<x&&R<E.length;){var O=E[R].value;O.length+I>x?b.push({type:E[R].type,value:O.substring(0,x-I)}):b.push(E[R]),I+=O.length,R+=1}}var T=m.getTokens(o);return l.walk(function(E,_,x,R,I){E!=null?b.push({type:"fold",value:E}):(I&&(T=m.getTokens(_)),T.length&&k(T,R,x))},l.end.row,this.session.getLine(l.end.row).length),b},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,d.implement(h.prototype,g),r.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,u){var d=n("../lib/dom"),p=function(){function w(f){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",f.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(f){for(var g=this.cursors,i=g.length;i--;)d.setStyle(g[i].style,"opacity",f?"":"0")},w.prototype.$startCssAnimation=function(){for(var f=this.cursors,g=f.length;g--;)f[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(f){this.$padding=f},w.prototype.setSession=function(f){this.session=f},w.prototype.setBlinking=function(f){f!=this.isBlinking&&(this.isBlinking=f,this.restartTimer())},w.prototype.setBlinkInterval=function(f){f!=this.blinkInterval&&(this.blinkInterval=f,this.restartTimer())},w.prototype.setSmoothBlinking=function(f){f!=this.smoothBlinking&&(this.smoothBlinking=f,d.setCssClass(this.element,"ace_smooth-blinking",f),this.$updateCursors(!0),this.restartTimer())},w.prototype.addCursor=function(){var f=d.createElement("div");return f.className="ace_cursor",this.element.appendChild(f),this.cursors.push(f),f},w.prototype.removeCursor=function(){if(this.cursors.length>1){var f=this.cursors.pop();return f.parentNode.removeChild(f),f}},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 f=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,d.removeCssClass(this.element,"ace_smooth-blinking")),f(!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(){f(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){f(!0),g()},this.blinkInterval),g()}},w.prototype.getPixelPosition=function(f,g){if(!this.config||!this.session)return{left:0,top:0};f||(f=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(f),a=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,f.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),h=(i.row-(g?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:a,top:h}},w.prototype.isCursorInView=function(f,g){return f.top>=0&&f.top<g.maxHeight},w.prototype.update=function(f){this.config=f;var g=this.session.$selectionMarkers,i=0,a=0;(g===void 0||g.length===0)&&(g=[{cursor:null}]);for(var i=0,h=g.length;i<h;i++){var c=this.getPixelPosition(g[i].cursor,!0);if(!((c.top>f.height+f.offset||c.top<0)&&i>1)){var o=this.cursors[a++]||this.addCursor(),l=o.style;this.drawCursor?this.drawCursor(o,c,f,g[i],this.session):this.isCursorInView(c,f)?(d.setStyle(l,"display","block"),d.translate(o,c.left,c.top),d.setStyle(l,"width",Math.round(f.characterWidth)+"px"),d.setStyle(l,"height",f.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(f){f!=this.overwrite&&(this.overwrite=f,f?d.addCssClass(this.element,"ace_overwrite-cursors"):d.removeCssClass(this.element,"ace_overwrite-cursors"))},w.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},w}();p.prototype.$padding=0,p.prototype.drawCursor=null,r.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,u){var d=this&&this.__extends||function(){var o=function(l,m){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,k){b.__proto__=k}||function(b,k){for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(b[T]=k[T])},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)}}(),p=n("./lib/oop"),w=n("./lib/dom"),f=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,f.addListener(this.element,"scroll",this.onScroll.bind(this)),f.addListener(this.element,"mousedown",f.preventDefault)}return o.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},o}();p.implement(a.prototype,g);var h=function(o){d(l,o);function l(m,b){var k=o.call(this,m,"-v")||this;return k.scrollTop=0,k.scrollHeight=0,b.$scrollbarWidth=k.width=w.scrollbarWidth(m.ownerDocument),k.inner.style.width=k.element.style.width=(k.width||15)+5+"px",k.$minWidth=0,k}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);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var c=function(o){d(l,o);function l(m,b){var k=o.call(this,m,"-h")||this;return k.scrollLeft=0,k.height=b.$scrollbarWidth,k.inner.style.height=k.element.style.height=(k.height||15)+5+"px",k}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=h,r.ScrollBarV=h,r.ScrollBarH=c,r.VScrollBar=h,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,u){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 k in b)Object.prototype.hasOwnProperty.call(b,k)&&(m[k]=b[k])},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)}}(),p=n("./lib/oop"),w=n("./lib/dom"),f=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,f.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}();p.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"&&!(f.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,k=m.clientY,T=function(L){k=L.clientY},E=function(){clearInterval(I)},_=m.clientY,x=this.thumbTop,R=function(){if(k!==void 0){var L=b.scrollTopFromThumbTop(x+k-_);L!==b.scrollTop&&b._emit("scroll",{data:L})}};f.capture(this.inner,T,E);var I=setInterval(R,20);return f.preventDefault(m)}var O=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(O)}),f.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 h=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"&&!(f.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var b=this,k=m.clientX,T=function(L){k=L.clientX},E=function(){clearInterval(I)},_=m.clientX,x=this.thumbLeft,R=function(){if(k!==void 0){var L=b.scrollLeftFromThumbLeft(x+k-_);L!==b.scrollLeft&&b._emit("scroll",{data:L})}};f.capture(this.inner,T,E);var I=setInterval(R,20);return f.preventDefault(m)}var O=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(O)}),f.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);h.prototype.setInnerWidth=h.prototype.setScrollWidth,r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=h,r.VScrollBar=a,r.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,u){var d=n("./lib/event"),p=function(){function w(f,g){this.onRender=f,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=g||window;var i=this;this._flush=function(a){i.pending=!1;var h=i.changes;if(h&&(d.blockIdle(100),i.changes=0,i.onRender(h)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}}return w.prototype.schedule=function(f){this.changes=this.changes|f,this.changes&&!this.pending&&(d.nextFrame(this._flush),this.pending=!0)},w.prototype.clear=function(f){var g=this.changes;return this.changes=0,g},w}();r.RenderLoop=p}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,u){var d=n("../lib/oop"),p=n("../lib/dom"),w=n("../lib/lang"),f=n("../lib/event"),g=n("../lib/useragent"),i=n("../lib/event_emitter").EventEmitter,a=512,h=typeof ResizeObserver=="function",c=200,o=function(){function l(m){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=w.stringRepeat("X",a),this.$characterSize={width:0,height:0},h?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=f.onIdle(function b(){m.checkForSizeChanges(),f.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,k){return["div",{style:"position: absolute;top:"+b+"px;left:"+k+"px;"}]};this.els=p.buildDom([m(0,0),m(c,0),m(0,c),m(c,c)],this.el)},l.prototype.transformCoordinates=function(m,b){if(m){var k=this.$getZoom(this.el);m=x(1/k,m)}function T(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 E(Z,te){return[Z[0]-te[0],Z[1]-te[1]]}function _(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=T(E(W,O),E(W,L),E(_(O,L),_(W,I))),N=x(1+F[0],E(O,I)),$=x(1+F[1],E(L,I));if(b){var C=b,D=F[0]*C[0]/c+F[1]*C[1]/c+1,z=_(x(C[0],N),x(C[1],$));return _(x(1/D/c,z),I)}var U=E(m,I),G=T(E(N,x(F[0],U)),E($,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,u){u.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 &nbsp; 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: fixed;
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,u){var d=n("../lib/dom"),p=n("../lib/oop"),w=n("../lib/event_emitter").EventEmitter,f=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 h=this.canvas.getContext("2d");function c(N,$){return N.priority<$.priority?-1:N.priority>$.priority?1:0}var o=this.renderer.session.$annotations;if(h.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,k=this.getVerticalOffsetForRow(b),T=k+this.lineHeight,E=Math.round(this.heightRatio*k),_=Math.round(this.heightRatio*T),x=Math.round((E+_)/2),R=_-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;h.fillStyle=a[o[m].type]||null,h.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);h.fillStyle="rgba(0, 0, 0, 0.5)",h.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}();p.implement(f.prototype,w),r.Decorator=f}),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,u){var d=n("./lib/oop"),p=n("./lib/dom"),w=n("./lib/lang"),f=n("./config"),g=n("./layer/gutter").Gutter,i=n("./layer/marker").Marker,a=n("./layer/text").Text,h=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,k=n("./layer/font_metrics").FontMetrics,T=n("./lib/event_emitter").EventEmitter,E=n("./css/editor-css"),_=n("./layer/decorators").Decorator,x=n("./lib/useragent"),R=n("./layer/text_util").isTextToken;p.importCssString(E,"ace_editor.css",!1);var I=function(){function O(L,W){var F=this;this.container=L||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(W),f.get("useStrictCSP")==null&&f.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new 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 h(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 k(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(),f.resetOptions(this),f._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(),p.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 C=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(C|this.$changes,!0):this.$loop.schedule(C|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,C=this.$size,D={width:C.width,height:C.height,scrollerHeight:C.scrollerHeight,scrollerWidth:C.scrollerWidth};if(N&&(L||C.height!=N)&&(C.height=N,$|=this.CHANGE_SIZE,C.scrollerHeight=C.height,this.$horizScroll&&(C.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(C.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",$=$|this.CHANGE_SCROLL),F&&(L||C.width!=F)){$|=this.CHANGE_SIZE,C.width=F,W==null&&(W=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=W,p.setStyle(this.scrollBarH.element.style,"left",W+"px"),p.setStyle(this.scroller.style,"left",W+this.margin.left+"px"),C.scrollerWidth=Math.max(0,F-W-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var z=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",z),p.setStyle(this.scroller.style,"right",z),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(C.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&($|=this.CHANGE_FULL)}return C.$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=p.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.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){p.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,C=F.left;$-=N.offset;var D=W&&W.useTextareaForIME||x.isMobile?this.lineHeight:1;if($<0||$>N.height-D){p.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;C-=this.scrollLeft,C>this.$size.scrollerWidth-z&&(C=this.$size.scrollerWidth-z),C+=this.gutterWidth+this.margin.left,p.setStyle(L,"height",D+"px"),p.setStyle(L,"width",z+"px"),p.translate(this.textarea,Math.min(C,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(),p.translate(this.content,-this.scrollLeft,-F.offset);var $=F.width+2*this.$padding+"px",C=F.minHeight+"px";p.setStyle(this.content.style,"width",$),p.setStyle(this.content.style,"height",C)}if(L&this.CHANGE_H_SCROLL&&(p.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 C=this.container.clientWidth;this.container.style.height=F+"px",this.$updateCachedSize(!0,this.$gutterWidth,C,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,C=this.$getLongestLine(),D=!F&&(this.$hScrollBarAlwaysVisible||W.scrollerWidth-C-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,C+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,Ee,Ae,Re=this.lineHeight;ce=L.screenToDocumentRow(ce,0);var Xe=L.getFoldLine(ce);Xe&&(ce=Xe.start.row),Ee=L.documentToScreenRow(ce,0),Ae=L.getRowLength(ce)*Re,ge=Math.min(L.screenToDocumentRow(ge,0),L.getLength()-1),G=W.scrollerHeight+L.getRowLength(ge)*Re+Ae,le=this.scrollTop-Ee*Re,le<0&&Ee>0&&(Ee=Math.max(0,Ee+Math.floor(le/Re)),le=this.scrollTop-Ee*Re);var Ke=0;return(this.layerConfig.width!=C||z)&&(Ke=this.CHANGE_H_SCROLL),(z||ne)&&(Ke|=this.$updateCachedSize(!0,this.gutterWidth,W.width,W.height),this._signal("scrollbarVisibilityChanged"),ne&&(C=this.$getLongestLine())),this.layerConfig={width:C,padding:this.$padding,firstRow:ce,firstRowScreen:Ee,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(C-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,C=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>C?(W&&U+D>C+this.lineHeight&&(C-=W*this.$size.scrollerHeight),C===0&&(C=-this.scrollMargin.top),this.session.setScrollTop(C)):U+this.$size.scrollerHeight-z<C+this.lineHeight&&(W&&U+this.$size.scrollerHeight-z<C-this.lineHeight&&(C+=W*this.$size.scrollerHeight),this.session.setScrollTop(C+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,$=[],C=function(D,z,U){return U*(Math.pow(D-1,3)+1)+z};for(F=0;F<N;++F)$.push(C(F/this.STEPS,L,W-L));return $},O.prototype.scrollToLine=function(L,W,F,N){var $=this.$cursorLayer.getPixelPosition({row:L,column:0}),C=$.top;W&&(C-=this.$size.scrollerHeight/2);var D=this.scrollTop;this.session.setScrollTop(C),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 C=N.$calcSteps(L,F);this.$scrollAnimation={from:L,to:F,steps:C},clearInterval(this.$timer),N.session.setScrollTop(C.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);C.length?(N.session.setScrollTop(C.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,C=$/this.characterWidth,D=Math.floor((W+this.scrollTop-F.top)/this.lineHeight),z=this.$blockCursor?Math.floor(C):Math.round(C);return{row:D,column:z,side:C-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,C=$/this.characterWidth,D=this.$blockCursor?Math.floor(C):Math.round(C),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)),C=N.row*this.lineHeight;return{pageX:F.left+$-this.scrollLeft,pageY:F.top+C-this.scrollTop}},O.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){p.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?(p.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),p.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 C=p.createElement("div");if($.length>1){var D=this.hideTokensAfterPosition(N.row,N.column),z;$.slice(1).forEach(function(ne){var le=p.createElement("div"),ue=p.createElement("span");ue.className="ace_ghost_text",ne.wrapped&&(le.className="ghost_text_line_wrapped"),ne.text.length===0&&(ne.text=" "),ue.appendChild(p.createTextNode(ne.text)),le.appendChild(ue),C.appendChild(le),z=le}),D.forEach(function(ne){var le=p.createElement("span");R(ne.type)||(le.className="ace_"+ne.type.replace(/\./g," ace_")),le.appendChild(p.createTextNode(ne.value)),z.appendChild(le)}),this.$ghostTextWidget={el:C,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/),C=[],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]);C.push({text:te,wrapped:!0}),G=U[Z]}}else C.push({text:$[D],wrapped:!1})}return C},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 C={type:W,value:L},D=$.getTokens(F);if(N==null||!D.length)D.push(C);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},C,{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,C=[],D=0;D<F.length;D++){var z=F[D];if(N+=z.value.length,z.type!=="ghost_text"){if($){C.push({type:z.type,value:z.value}),z.type="hidden_token";continue}N===W&&($=!0)}}return this.updateLines(L,L),C},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;f.loadModule(["theme",N],$)}else $(L);function $(C){if(F.$themeId!=L)return W&&W();if(!C||!C.cssClass)throw new Error("couldn't load module "+L+" or it didn't call define");C.$id&&(F.$themeId=C.$id),p.importCssString(C.cssText,C.cssClass,F.container),F.theme&&p.removeCssClass(F.container,F.theme.cssClass);var D="padding"in C?C.padding:"padding"in(F.theme||{})?4:F.$padding;F.$padding&&D!=F.$padding&&F.setPadding(D),F.$theme=C.cssClass,F.theme=C,p.addCssClass(F.container,C.cssClass),p.setCssClass(F.container,"ace_dark",C.isDark),F.$size&&(F.$size.width=0,F.$updateSizeAsync()),F._dispatchEvent("themeLoaded",{theme:C}),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){p.setCssClass(this.container,L,W!==!1)},O.prototype.unsetStyle=function(L){p.removeCssClass(this.container,L)},O.prototype.setCursorStyle=function(L){p.setStyle(this.scroller.style,"cursor",L)},O.prototype.setMouseCursor=function(L){p.setStyle(this.scroller.style,"cursor",L)},O.prototype.attachToShadowRoot=function(){p.importCssString(E,"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 _(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,T),f.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){p.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,u){var d=n("../lib/oop"),p=n("../lib/net"),w=n("../lib/event_emitter").EventEmitter,f=n("../config");function g(c){var o="importScripts('"+p.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(f.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),f.get("packaged")||!n.toUrl)m=m||f.moduleUrl(o,"worker");else{var k=this.$normalizePath;m=m||k(n.toUrl("ace/worker/worker.js",null,"_"));var T={};c.forEach(function(E){T[E]=k(n.toUrl(E,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=i(m),b&&this.send("importScripts",b),this.$worker.postMessage({init:!0,tlns:T,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 p.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 h=function(c,o,l){var m=null,b=!1,k=Object.create(w),T=[],E=new a({messageBuffer:T,terminate:function(){},postMessage:function(x){T.push(x),m&&(b?setTimeout(_):_())}});E.setEmitSync=function(x){b=x};var _=function(){var x=T.shift();x.command?m[x.command].apply(m,x.args):x.event&&k._signal(x.event,x.data)};return k.postMessage=function(x){E.onMessage({data:x})},k.callback=function(x,R){this.postMessage({type:"call",id:R,data:x})},k.emit=function(x,R){this.postMessage({type:"event",name:x,data:R})},f.loadModule(["worker",o],function(x){for(m=new x[l](k);T.length;)_()}),E};r.UIWorkerClient=h,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,u){var d=n("./range").Range,p=n("./lib/event_emitter").EventEmitter,w=n("./lib/oop"),f=function(){function g(i,a,h,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=h;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,h=this.session;this.selectionBefore=h.selection.toJSON(),h.selection.inMultiSelectMode&&h.selection.toSingleRange(),this.pos=a.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=h.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)}),h.setUndoSelect(!1)},g.prototype.showOtherMarkers=function(){if(!this.othersActive){var i=this.session,a=this;this.othersActive=!0,this.others.forEach(function(h){h.markerId=i.addMarker(new d(h.row,h.column,h.row,h.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 h=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+=h),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-h))}}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,h=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)};h(this.pos,this.mainClass);for(var c=this.others.length;c--;)h(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,h=0;h<a;h++)i.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},g}();w.implement(f.prototype,p),r.PlaceHolder=f}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,u){var d=n("../lib/event"),p=n("../lib/useragent");function w(g,i){return g.row==i.row&&g.column==i.column}function f(g){var i=g.domEvent,a=i.altKey,h=i.shiftKey,c=i.ctrlKey,o=g.getAccelKey(),l=g.getButton();if(c&&p.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,k=m.inMultiSelectMode,T=g.getDocumentPosition(),E=b.getCursor(),_=g.inSelection()||b.isEmpty()&&w(T,E),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=h?"block":"add":a&&m.$blockSelectEnabled&&(F="block");else if(o&&!a){if(F="add",!k&&h)return}else a&&m.$blockSelectEnabled&&(F="block");if(F&&p.isMac&&i.ctrlKey&&m.$mouseHandler.cancelContextMenu(),F=="add"){if(!k&&_)return;if(!k){var N=b.toOrientedRange();m.addSelectionMarker(N)}var $=b.rangeList.rangeAtPoint(T);m.inVirtualSelectionMode=!0,h&&($=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):(h?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 C,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())};k&&!o?b.toSingleRange():!k&&o&&(C=b.toOrientedRange(),m.addSelectionMarker(C)),h?L=O.documentToScreenPosition(b.lead):b.moveToPosition(T),W={row:-1,column:-1};var U=function(te){z(),clearInterval(Z),m.removeSelectionMarkers(D),D.length||(D=[b.toOrientedRange()]),C&&(m.removeSelectionMarker(C),b.toSingleRange(C));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=f}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,u){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(p){p.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(p){p.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(p){p.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var d=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,u){var d=n("./range_list").RangeList,p=n("./range").Range,w=n("./selection").Selection,f=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 h=n("./search").Search,c=new h;function o(E,_,x){return c.$options.wrap=!0,c.$options.needle=_,c.$options.backwards=x==-1,c.find(E)}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(E,_){if(E){if(!this.inMultiSelectMode&&this.rangeCount===0){var x=this.toOrientedRange();if(this.rangeList.add(x),this.rangeList.add(E),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),_||this.fromOrientedRange(E);this.rangeList.removeAll(),this.rangeList.add(x),this.$onAddRange(x)}E.cursor||(E.cursor=E.end);var R=this.rangeList.add(E);return this.$onAddRange(E),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)),_||this.fromOrientedRange(E)}},this.toSingleRange=function(E){E=E||this.ranges[0];var _=this.rangeList.removeAll();_.length&&this.$onRemoveRange(_),E&&this.fromOrientedRange(E)},this.substractPoint=function(E){var _=this.rangeList.substractPoint(E);if(_)return this.$onRemoveRange(_),_[0]},this.mergeOverlappingRanges=function(){var E=this.rangeList.merge();E.length&&this.$onRemoveRange(E)},this.$onAddRange=function(E){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(E),this._signal("addRange",{range:E})},this.$onRemoveRange=function(E){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var _=this.rangeList.ranges.pop();E.push(_),this.rangeCount=0}for(var x=E.length;x--;){var R=this.ranges.indexOf(E[x]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:E}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),_=_||this.ranges[0],_&&!_.isEqual(this.getRange())&&this.fromOrientedRange(_)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new d,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var E=this.ranges.length?this.ranges:[this.getRange()],_=[],x=0;x<E.length;x++){var R=E[x],I=R.start.row,O=R.end.row;if(I===O)_.push(R.clone());else{for(_.push(new p(I,R.start.column,I,this.session.getLine(I).length));++I<O;)_.push(this.getLineRange(I,!0));_.push(new p(O,0,O,R.end.column))}x==0&&!this.isBackwards()&&(_=_.reverse())}this.toSingleRange();for(var x=_.length;x--;)this.addRange(_[x])},this.joinSelections=function(){var E=this.rangeList.ranges,_=E[E.length-1],x=p.fromPoints(E[0].start,_.end);this.toSingleRange(),this.setSelectionRange(x,_.cursor==_.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var E=this.rangeList.ranges,_=E[E.length-1],x=p.fromPoints(E[0].start,_.end);this.toSingleRange(),this.setSelectionRange(x,_.cursor==_.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(E,_,x){var R=[],I=E.column<_.column;if(I)var O=E.column,L=_.column,W=E.offsetX,F=_.offsetX;else var O=_.column,L=E.column,W=_.offsetX,F=E.offsetX;var N=E.row<_.row;if(N)var $=E.row,C=_.row;else var $=_.row,C=E.row;O<0&&(O=0),$<0&&($=0),$==C&&(x=!0);for(var D,z=$;z<=C;z++){var U=p.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(E){E.cursor||(E.cursor=E.end);var _=this.getSelectionStyle();return E.marker=this.session.addMarker(E,"ace_selection",_),this.session.$selectionMarkers.push(E),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,E},this.removeSelectionMarker=function(E){if(E.marker){this.session.removeMarker(E.marker);var _=this.session.$selectionMarkers.indexOf(E);_!=-1&&this.session.$selectionMarkers.splice(_,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(E){for(var _=this.session.$selectionMarkers,x=E.length;x--;){var R=E[x];if(R.marker){this.session.removeMarker(R.marker);var I=_.indexOf(R);I!=-1&&_.splice(I,1)}}this.session.selectionMarkerCount=_.length},this.$onAddRange=function(E){this.addSelectionMarker(E.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(E){this.removeSelectionMarkers(E.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(E){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(E){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(E){var _=E.command,x=E.editor;if(x.multiSelect){if(_.multiSelectAction)_.multiSelectAction=="forEach"?R=x.forEachSelection(_,E.args):_.multiSelectAction=="forEachLine"?R=x.forEachSelection(_,E.args,!0):_.multiSelectAction=="single"?(x.exitMultiSelectMode(),R=_.exec(x,E.args||{})):R=_.multiSelectAction(x,E.args||{});else{var R=_.exec(x,E.args||{});x.multiSelect.addRange(x.multiSelect.toOrientedRange()),x.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(E,_,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 E.exec?E.exec(this,_||{}):E(this,_||{});var $=L._eventRegistry;L._eventRegistry={};var C=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--;C.fromOrientedRange(F[D]),C.index=D,this.selection=O.selection=C;var z=E.exec?E.exec(this,_||{}):E(this,_||{});!N&&z!==void 0&&(N=z),C.toOrientedRange(F[D])}C.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 E="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var _=this.multiSelect.rangeList.ranges,x=[],R=0;R<_.length;R++)x.push(this.session.getTextRange(_[R]));var I=this.session.getDocument().getNewLineCharacter();E=x.join(I),E.length==(x.length-1)*I.length&&(E="")}else this.selection.isEmpty()||(E=this.session.getTextRange(this.getSelectionRange()));return E},this.$checkMultiselectChange=function(E,_){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var x=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&_==this.multiSelect.anchor)return;var R=_==this.multiSelect.anchor?x.cursor==x.start?x.end:x.start:x.cursor;R.row!=_.row||this.session.$clipPositionToDocument(R.row,R.column).column!=_.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(E,_,x){if(_=_||{},_.needle=E||_.needle,_.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();_.needle=this.session.getTextRange(R)}this.$search.set(_);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(E,_){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+E,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+E,L.column);if(R){var F=p.fromPoints(O,W);F.cursor=F.start}else{var F=p.fromPoints(W,O);F.cursor=F.end}if(F.desiredColumn=I.column,!this.selection.inMultiSelectMode)this.selection.addRange(x);else if(_)var N=x.cursor;this.selection.addRange(F),N&&this.selection.substractPoint(N)},this.transposeSelections=function(E){for(var _=this.session,x=_.multiSelect,R=x.ranges,I=R.length;I--;){var O=R[I];if(O.isEmpty()){var L=_.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(_.getTextRange(O))}E<0?W.unshift(W.pop()):W.push(W.shift());for(var I=R.length;I--;){var O=R[I],F=O.clone();_.replace(O,W[I]),O.start.row=F.start.row,O.start.column=F.start.column}x.fromOrientedRange(x.ranges[0])},this.selectMore=function(E,_,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=E==-1?O.start:O.end,this.multiSelect.addRange(O),x))){var L=R.getTextRange(O),W=o(R,L,E);W&&(W.cursor=E==-1?W.start:W.end,this.session.unfold(W),this.multiSelect.addRange(W),this.renderer.scrollCursorIntoView(null,.5)),_&&this.multiSelect.substractPoint(O.cursor)}},this.alignCursors=function(){var E=this.session,_=E.multiSelect,x=_.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 C=this.session.removeFullLines(L,W);C=this.$reAlignText(C,F),this.session.insert({row:L,column:0},C.join(`
957
+ `)+`
958
+ `),F||(O.start.column=0,O.end.column=C[C.length-1].length),this.selection.setRange(O)}else{I.forEach(function(G){_.substractPoint(G.cursor)});var D=0,z=1/0,U=x.map(function(G){var Z=G.cursor,te=E.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?E.insert(te,i.stringRepeat(" ",he-ne)):E.remove(new p(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}),_.fromOrientedRange(x[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(E,_){var x=!0,R=!0,I,O,L;return E.map(function(C){var D=C.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):[C]}).map(_?F:x?R?N:F:$);function W(C){return i.stringRepeat(" ",C)}function F(C){return C[2]?W(I)+C[2]+W(O-C[2].length+L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function N(C){return C[2]?W(I+O-C[2].length)+C[2]+W(L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}function $(C){return C[2]?W(I)+C[2]+W(L)+C[4].replace(/^([=:])\s+/,"$1 "):C[0]}}}).call(m.prototype);function b(E,_){return E.row==_.row&&E.column==_.column}r.onSessionChange=function(E){var _=E.session;_&&!_.multiSelect&&(_.$selectionMarkers=[],_.selection.$initRangeList(),_.multiSelect=_.selection),this.multiSelect=_&&_.multiSelect;var x=E.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)),_&&(_.multiSelect.on("addRange",this.$onAddRange),_.multiSelect.on("removeRange",this.$onRemoveRange),_.multiSelect.on("multiSelect",this.$onMultiSelect),_.multiSelect.on("singleSelect",this.$onSingleSelect),_.multiSelect.lead.on("change",this.$checkMultiselectChange),_.multiSelect.anchor.on("change",this.$checkMultiselectChange)),_&&this.inMultiSelectMode!=_.selection.inMultiSelectMode&&(_.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function k(E){E.$multiselectOnSessionChange||(E.$onAddRange=E.$onAddRange.bind(E),E.$onRemoveRange=E.$onRemoveRange.bind(E),E.$onMultiSelect=E.$onMultiSelect.bind(E),E.$onSingleSelect=E.$onSingleSelect.bind(E),E.$multiselectOnSessionChange=r.onSessionChange.bind(E),E.$checkMultiselectChange=E.$checkMultiselectChange.bind(E),E.$multiselectOnSessionChange(E),E.on("changeSession",E.$multiselectOnSessionChange),E.on("mousedown",f),E.commands.addCommands(a.defaultCommands),T(E))}function T(E){if(!E.textInput)return;var _=E.textInput.getElement(),x=!1;g.addListener(_,"keydown",function(I){var O=I.keyCode==18&&!(I.ctrlKey||I.shiftKey||I.metaKey);E.$blockSelectEnabled&&O?x||(E.renderer.setMouseCursor("crosshair"),x=!0):x&&R()},E),g.addListener(_,"keyup",R,E),g.addListener(_,"blur",R,E);function R(I){x&&(E.renderer.setMouseCursor(""),x=!1)}}r.MultiSelect=k,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(E){k(this),E?this.on("mousedown",f):this.off("mousedown",f)},value:!0},enableBlockSelect:{set:function(E){this.$blockSelectEnabled=E},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,u){var d=n("../../range").Range,p=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(w,f,g){var i=w.getLine(g);return this.foldingStartMarker.test(i)?"start":f=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(w,f,g){return null},this.indentationBlock=function(w,f,g){var i=/\S/,a=w.getLine(f),h=a.search(i);if(h!=-1){for(var c=g||a.length,o=w.getLength(),l=f,m=f;++f<o;){var b=w.getLine(f).search(i);if(b!=-1){if(b<=h){var k=w.getTokenAt(f,0);if(!k||k.type!=="string")break}m=f}}if(m>l){var T=w.getLine(m).length;return new d(l,c,m,T)}}},this.openingBracketBlock=function(w,f,g,i,a){var h={row:g,column:i+1},c=w.$findClosingBracket(f,h,a);if(c){var o=w.foldWidgets[c.row];return o==null&&(o=w.getFoldWidget(c.row)),o=="start"&&c.row>h.row&&(c.row--,c.column=w.getLine(c.row).length),d.fromPoints(h,c)}},this.closingBracketBlock=function(w,f,g,i,a){var h={row:g,column:i},c=w.$findOpeningBracket(f,h);if(c)return c.column++,h.column--,d.fromPoints(c,h)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(n,r,u){var d=n("../lib/dom"),p=n("../range").Range,w=n("../config").nls;function f(i,a,h){for(var c=0,o=i.length-1;c<=o;){var l=c+o>>1,m=h(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,h){var c=i.getAnnotations().sort(p.comparePoints);if(c.length){var o=f(c,{row:a,column:-1},p.comparePoints);o<0&&(o=-o-1),o>=c.length?o=h>0?0:c.length-1:o===0&&h<0&&(o=c.length-1);var l=c[o];if(!(!l||!h)){if(l.row===a){do l=c[o+=h];while(l&&l.row===a);if(!l)return c.slice()}var m=[];a=l.row;do m[h<0?"unshift":"push"](l),l=c[o+=h];while(l&&l.row==a);return m.length&&m}}}r.showErrorMarker=function(i,a){var h=i.session,c=i.getCursorPosition(),o=c.row,l=h.widgetManager.getWidgetsAtRow(o).filter(function(I){return I.type=="errorMarker"})[0];l?l.destroy():o-=a;var m=g(h,o,a),b;if(m){var k=m[0];c.column=(k.pos&&typeof k.column!="number"?k.pos.sc:k.column)||0,c.row=k.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 T={row:c.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},E=T.el.appendChild(d.createElement("div")),_=T.el.appendChild(d.createElement("div"));_.className="error_widget_arrow "+b.className;var x=i.renderer.$cursorLayer.getPixelPosition(c).left;_.style.left=x+i.renderer.gutterWidth-5+"px",T.el.className="error_widget_wrapper",E.className="error_widget "+b.className,b.displayText.forEach(function(I,O){E.appendChild(d.createTextNode(I)),O<b.displayText.length-1&&E.appendChild(d.createElement("br"))}),E.appendChild(d.createElement("div"));var R=function(I,O,L){if(O===0&&(L==="esc"||L==="return"))return T.destroy(),{command:"null"}};T.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(R),h.widgetManager.removeLineWidget(T),i.off("changeSelection",T.destroy),i.off("changeSession",T.destroy),i.off("mouseup",T.destroy),i.off("change",T.destroy))},i.keyBinding.addKeyboardHandler(R),i.on("changeSelection",T.destroy),i.on("changeSession",T.destroy),i.on("mouseup",T.destroy),i.on("change",T.destroy),i.session.widgetManager.addLineWidget(T),T.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:T.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,u){n("./loader_build")(r);var d=n("./lib/dom"),p=n("./range").Range,w=n("./editor").Editor,f=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(h,c){if(typeof h=="string"){var o=h;if(h=document.getElementById(o),!h)throw new Error("ace.edit can't find div #"+o)}if(h&&h.env&&h.env.editor instanceof w)return h.env.editor;var l="";if(h&&/input|textarea/i.test(h.tagName)){var m=h;l=m.value,h=d.createElement("pre"),m.parentNode.replaceChild(h,m)}else h&&(l=h.textContent,h.innerHTML="");var b=r.createEditSession(l),k=new w(new i(h),b,c),T={document:b,editor:k,onResize:k.resize.bind(k,null)};return m&&(T.textarea=m),k.on("destroy",function(){T.editor.container.env=null}),k.container.env=k.env=T,k},r.createEditSession=function(h,c){var o=new f(h,c);return o.setUndoManager(new g),o},r.Range=p,r.Editor=w,r.EditSession=f,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 u in n)n.hasOwnProperty(u)&&(r.ace[u]=n[u]);r.ace.default=r.ace,t&&(t.exports=r.ace)})}()}(Tg)),Tg.exports}var Nr=C_(),Lg={exports:{}},Og;function S_(){return Og||(Og=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,u){var d=n("../lib/oop"),p=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 f=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/},h=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",k="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",T="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",E="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",_=this.$keywords=this.createKeywordMapper({keyword:k,"constant.language":T,"variable.language":E,"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:/\?(?=.+:)/},h,c,w,f,o,g,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:_,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(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,p),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,f){return/^\s+$/.test(w)?/^\s*\}/.test(f):!1},this.autoOutdent=function(w,f){var g=w.getLine(f),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=w.findMatchingBracket({row:f,column:a});if(!h||h.row==f)return 0;var c=this.$getIndent(w.getLine(h.row));w.replace(new d(f,0,f,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(n,r,u){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,w=n("../../range").Range,f=n("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,p),(function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(i,a,h){var c=i.getLine(h),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(h,m.index+2).type==="keyword")return"start"}else if(!m[3]||i.getTokenAt(h,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(h,m.index+1).type==="keyword")return"end"}else if(!m[1]||i.getTokenAt(h,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(i,a,h){var c=i.doc.getLine(h),o=this.foldingStartMarker.exec(c);if(o)return o[1]||o[3]?this.rubyBlock(i,h,o.index+2):this.openingBracketBlock(i,"{",h,o.index);var o=this.foldingStopMarker.exec(c);if(o)return o[3]==="end"&&i.getTokenAt(h,o.index+1).type==="keyword"?this.rubyBlock(i,h,o.index+1):o[1]==="=end"&&i.getTokenAt(h,o.index+1).type==="comment.multiline"?this.rubyBlock(i,h,o.index+1):this.closingBracketBlock(i,"}",h,o.index+o[0].length)},this.rubyBlock=function(i,a,h,c){var o=new f(i,a,h),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 k=new RegExp("^\\s*"+l.value);if(!k.test(b))return;var T=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(b))return;case"elsif":case"rescue":case"ensure":var T=1;break;case"else":var k=new RegExp("^\\s*"+l.value+"\\s*$");if(!k.test(b))return;var T=1;break;default:var T=this.indentKeywords[m]}var E=[m];if(T){var _=T===-1?i.getLine(a-1).length:i.getLine(a).length,x=a,R=[];if(R.push(o.getCurrentTokenRange()),o.step=T===-1?o.stepBackward:o.stepForward,l.type=="comment.multiline"){for(;l=o.step();)if(l.type==="comment.multiline"){if(T==1){if(_=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=T*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 k=new RegExp("^\\s*"+l.value+"\\s*$");(!k.test(b)||m=="case")&&(O=0,I=!0);break;case"if":case"unless":case"while":case"until":var k=new RegExp("^\\s*"+l.value);k.test(b)||(O=0,I=!0);break;case"when":(/\sthen\s/.test(b)||m=="case")&&(O=0,I=!0)}if(O>0)E.unshift(l.value);else if(O<=0&&I===!1){if(E.shift(),!E.length&&((m=="while"||m=="until"||m=="for")&&l.value!="do"||l.value=="do"&&T==-1&&O!=0||l.value!="do"))break;O===0&&E.unshift(l.value)}}}if(!l)return null;if(c)return R.push(o.getCurrentTokenRange()),R;var a=o.getCurrentTokenRow();if(T===-1){if(l.type==="comment.multiline")var F=6;else var F=i.getLine(a).length;return new w(a,F,x-1,_)}return new w(x,_,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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./ruby_highlight_rules").RubyHighlightRules,f=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../range").Range,i=n("./folding/ruby").FoldMode,a=function(){this.HighlightRules=w,this.$outdent=new f,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new i,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(a,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[]\s*$/),T=c.match(/^\s*(class|def|module)\s.*$/),E=c.match(/.*do(\s*|\s+\|.*\|\s*)$/),_=c.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(k||T||E||_)&&(l+=o)}return l},this.checkOutdent=function(h,c,o){return/^\s+(end|else|rescue|ensure)$/.test(c+o)||this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(h,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),k=this.$getIndent(b),T=c.getTabString();k.length<=m.length&&m.slice(-T.length)==T&&c.remove(new g(o,m.length-T.length,o,m.length))},this.getMatching=function(h,c,o){if(c==null){var l=h.selection.lead;o=l.column,c=l.row}var m=h.getTokenAt(c,o);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(h,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)})}()}(Lg)),Lg.exports}S_();var Ig={exports:{}},Ng;function $_(){return Ng||(Ng=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,u){var d=n("../lib/oop"),p=n("./text_highlight_rules").TextHighlightRules,w=function(){var f="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:f},"identifier"),h="[uU]?",c="[rR]",o="[fF]",l="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",b="(?:0[oO]?[0-7]+)",k="(?:0[xX][\\dA-Fa-f]+)",T="(?:0[bB][01]+)",E="(?:"+m+"|"+b+"|"+k+"|"+T+")",_="(?:[eE][+-]?\\d+)",x="(?:\\.\\d+)",R="(?:\\d+)",I="(?:(?:"+R+"?"+x+")|(?:"+R+"\\.))",O="(?:(?:"+I+"|"+R+")"+_+")",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:h+'"{3}',next:"qqstring3"},{token:"string",regex:h+'"(?=.)',next:"qqstring"},{token:"string",regex:h+"'{3}",next:"qstring3"},{token:"string",regex:h+"'(?=.)",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:E+"[lL]\\b"},{token:"constant.numeric",regex:E+"\\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,p),r.PythonHighlightRules=w}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(n,r,u){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,w=r.FoldMode=function(f){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+f+")(?:\\s*)(?:#.*)?$")};d.inherits(w,p),(function(){this.getFoldWidgetRange=function(f,g,i){var a=f.getLine(i),h=a.match(this.foldingStartMarker);if(h)return h[1]?this.openingBracketBlock(f,h[1],i,h.index):h[2]?this.indentationBlock(f,i,h.index+h[2].length):this.indentationBlock(f,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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./python_highlight_rules").PythonHighlightRules,f=n("./folding/pythonic").FoldMode,g=n("../range").Range,i=function(){this.HighlightRules=w,this.foldingRules=new f("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(i,p),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[:]\s*$/);k&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,c,o){if(o!==`\r
992
+ `&&o!=="\r"&&o!==`
993
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),h).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(h,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)})}()}(Ig)),Ig.exports}$_();var Dg={exports:{}},Pg;function M_(){return Pg||(Pg=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,u){var d=n("../lib/oop"),p=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,p),r.JsonHighlightRules=w}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,f){return/^\s+$/.test(w)?/^\s*\}/.test(f):!1},this.autoOutdent=function(w,f){var g=w.getLine(f),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=w.findMatchingBracket({row:f,column:a});if(!h||h.row==f)return 0;var c=this.$getIndent(w.getLine(h.row));w.replace(new d(f,0,f,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,u){var d=n("../../lib/oop"),p=n("../../range").Range,w=n("./fold_mode").FoldMode,f=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(f,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 h=g.getLine(a);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(h)?"start":c},this.getFoldWidgetRange=function(g,i,a,h){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()&&(h?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),h=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(h>b)break;var k=this.getFoldWidgetRange(g,"all",i);if(k){if(k.start.row<=c)break;if(k.isMultiLine())i=k.end.row;else if(h==b)break}l=i}}return new p(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var h=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 k=a;if(k>o)return new p(o,h,k,i.length)}}).call(f.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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./json_highlight_rules").JsonHighlightRules,f=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("./folding/cstyle").FoldMode,i=n("../worker/worker_client").WorkerClient,a=function(){this.HighlightRules=w,this.$outdent=new f,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};d.inherits(a,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c);if(h=="start"){var m=c.match(/^.*[\{\(\[]\s*$/);m&&(l+=o)}return l},this.checkOutdent=function(h,c,o){return this.$outdent.checkOutdent(c,o)},this.autoOutdent=function(h,c,o){this.$outdent.autoOutdent(c,o)},this.createWorker=function(h){var c=new i(["ace"],"ace/mode/json_worker","JsonWorker");return c.attachToDocument(h.getDocument()),c.on("annotate",function(o){h.setAnnotations(o.data)}),c.on("terminate",function(){h.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)})}()}(Dg)),Dg.exports}M_();var Fg={exports:{}},Bg;function E_(){return Bg||(Bg=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,u){var d=n("../lib/oop");n("../lib/lang");var p=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",f=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",h=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":f,"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:h},{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:"("+h+")(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:h},{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,p),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,u){var d=n("../lib/oop"),p=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,p),w.getTagRule=function(f){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},w.getStartRule=function(f){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:f}},w.getEndRule=function(f){return{token:"comment.doc",regex:"\\*\\/",next:f}},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,u){function d(){var h=i.replace("\\d","\\d\\-"),c={onMatch:function(l,m,b){var k=l.charAt(1)=="/"?2:1;return k==1?(m!=this.nextState?b.unshift(this.next,this.nextState,0):b.unshift(this.next),b[2]++):k==2&&m==this.nextState&&(b[1]--,(!b[1]||b[1]<0)&&(b.shift(),b.shift())),[{type:"meta.tag.punctuation."+(k==1?"":"end-")+"tag-open.xml",value:l.slice(0,k)},{type:"meta.tag.tag-name.xml",value:l.substr(k)}]},regex:"</?(?:"+h+"|(?=>))",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,p("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:h},{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 p(h){return[{token:"comment",regex:/\/\*/,next:[f.getTagRule(),{token:"comment",regex:"\\*\\/",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[f.getTagRule(),{token:"comment",regex:"$|^",next:h||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var w=n("../lib/oop"),f=n("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=n("./text_highlight_rules").TextHighlightRules,i="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",a=function(h){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*)(\\*?)",k={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(c).join("|")+"\\b)"+i+")(\\s*)(\\()"};this.$rules={no_regex:[f.getStartRule("doc-start"),p("no_regex"),k,{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:[f.getStartRule("doc-start"),p("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],default_parameter:[{token:"string",regex:"'(?=.)",push:[{token:"string",regex:"'|$",next:"pop"},{include:"qstring"}]},{token:"string",regex:'"(?=.)',push:[{token:"string",regex:'"|$',next:"pop"},{include:"qqstring"}]},{token:"constant.language",regex:"null|Infinity|NaN|undefined"},{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:[p("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"}]},(!h||!h.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(T,E,_){if(this.next=T=="{"?this.nextState:"",T=="{"&&_.length)_.unshift("start",E);else if(T=="}"&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return T=="{"?"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"}),(!h||h.jsx!=0)&&d.call(this)),this.embedRules(f,"doc-",[f.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,u){var d=n("../lib/oop"),p=n("./text_highlight_rules").TextHighlightRules,w=function(f){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(f,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,h,c){return c.splice(0),this.token}}],this.embedRules(f,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(p.prototype),d.inherits(w,p),r.XmlHighlightRules=w}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(n,r,u){var d=n("../lib/oop"),p=n("../lib/lang"),w=n("./css_highlight_rules").CssHighlightRules,f=n("./javascript_highlight_rules").JavaScriptHighlightRules,g=n("./xml_highlight_rules").XmlHighlightRules,i=p.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),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(h,c){var o=i[c];return["meta.tag.punctuation."+(h=="<"?"":"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 f({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,u){var d=n("../config").$modes,p=n("../lib/oop"),w=n("../lib/lang"),f=n("./text_highlight_rules").TextHighlightRules,g=n("./html_highlight_rules").HtmlHighlightRules,i=function(h){return"(?:[^"+w.escapeRegExp(h)+"\\\\]|\\\\.)*"},a=function(){g.call(this);var h={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(o,l,m,b){var k=o.match(/^(\s*)([`~]+)(.*)/),T=/[\w-]+|$/.exec(k[3])[0];return d[T]||(T=""),m.unshift("githubblock",[],[k[1],k[2],T],l),this.token},next:"githubblock"},c=[{token:"support.function",regex:".*",onMatch:function(o,l,m,b){var k=m[1],T=m[2][0],E=m[2][1],_=m[2][2],x=/^(\s*)(`+|~+)\s*$/.exec(o);if(x&&x[1].length<T.length+3&&x[2].length>=E.length&&x[2][0]==E[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",_&&d[_]){var R=d[_].getTokenizer().getLineTokens(o,k.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"},h,{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},h,{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()};p.inherits(a,f),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,u){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,w=n("../../range").Range,f=r.FoldMode=function(){};d.inherits(f,p),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,i,a){var h=g.getLine(a);return this.foldingStartMarker.test(h)?h[0]=="`"&&g.bgTokenizer.getState(a)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,i,a){function h(I){return T=g.getTokens(I)[0],T&&T.type.lastIndexOf(E,0)===0}function c(){var I=T.value[0];return I=="="?6:I=="-"?5:7-T.value.search(/[^#]|$/)}var o=g.getLine(a),l=o.length,m=g.getLength(),b=a,k=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 T,E="markup.heading";if(h(a)){for(var _=c();++a<m;)if(h(a)){var x=c();if(x>=_)break}if(k=a-(!T||["=","-"].indexOf(T.value[0])==-1?1:2),k>b)for(;k>b&&/^\s*$/.test(g.getLine(k));)k--;if(k>b){var R=g.getLine(k).length;return new w(b,l,k,R)}}}}}).call(f.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,u){var d=n("../range").Range,p=function(){};(function(){this.checkOutdent=function(w,f){return/^\s+$/.test(w)?/^\s*\}/.test(f):!1},this.autoOutdent=function(w,f){var g=w.getLine(f),i=g.match(/^(\s*\})/);if(!i)return 0;var a=i[1].length,h=w.findMatchingBracket({row:f,column:a});if(!h||h.row==f)return 0;var c=this.$getIndent(w.getLine(h.row));w.replace(new d(f,0,f,a-1),c)},this.$getIndent=function(w){return w.match(/^\s*/)[0]}}).call(p.prototype),r.MatchingBraceOutdent=p}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(n,r,u){function d(i,a){return i&&i.type.lastIndexOf(a+".xml")>-1}var p=n("../../lib/oop"),w=n("../behaviour").Behaviour,f=n("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(i,a,h,c,o){if(o=='"'||o=="'"){var l=o,m=c.doc.getTextRange(h.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&h.getWrapBehavioursEnabled())return{text:l+m+l,selection:!1};var b=h.getCursorPosition(),k=c.doc.getLine(b.row),T=k.substring(b.column,b.column+1),E=new f(c,b.row,b.column),_=E.getCurrentToken();if(T==l&&(d(_,"attribute-value")||d(_,"string")))return{text:"",selection:[1,1]};if(_||(_=E.stepBackward()),!_)return;for(;d(_,"tag-whitespace")||d(_,"whitespace");)_=E.stepBackward();var x=!T||T.match(/\s/);if(d(_,"attribute-equals")&&(x||T==">")||d(_,"decl-attribute-equals")&&(x||T=="?"))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(i,a,h,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,h,c,o){if(o==">"){var l=h.getSelectionRange().start,m=new f(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 k=m.getCurrentTokenColumn()+b.value.length;if(l.column<k)return;if(l.column==k){var T=m.stepForward();if(T&&d(T,"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 E=m.getCurrentTokenRow(),_=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var x=b.value;return E==l.row&&(x=x.substring(0,l.column-_)),this.voidElements&&this.voidElements.hasOwnProperty(x.toLowerCase())?void 0:{text:"></"+x+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(i,a,h,c,o){if(o==`
994
+ `){var l=h.getCursorPosition(),m=c.getLine(l.row),b=new f(c,l.row,l.column),k=b.getCurrentToken();if(d(k,"")&&k.type.indexOf("tag-close")!==-1){if(k.value=="/>")return;for(;k&&k.type.indexOf("tag-name")===-1;)k=b.stepBackward();if(!k)return;var T=k.value,E=b.getCurrentTokenRow();if(k=b.stepBackward(),!k||k.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[T]||!this.voidElements){var _=c.getTokenAt(l.row,l.column+1),m=c.getLine(E),x=this.$getIndent(m),R=x+c.getTabString();return _&&_.value==="</"?{text:`
995
+ `+R+`
996
+ `+x,selection:[1,R.length,1,R.length]}:{text:`
997
+ `+R}}}}})};p.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,u){var d=n("../../lib/oop"),p=n("../../token_iterator").TokenIterator,w=n("../behaviour/cstyle").CstyleBehaviour,f=n("../behaviour/xml").XmlBehaviour,g=function(){var i=new f({closeCurlyBraces:!0}).getBehaviours();this.addBehaviours(i),this.inherit(w),this.add("autoclosing-fragment","insertion",function(a,h,c,o,l){if(l==">"){var m=c.getSelectionRange().start,b=new p(o,m.row,m.column),k=b.getCurrentToken()||b.stepBackward();if(!k)return;if(k.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,u){function d(a,h){return a&&a.type&&a.type.lastIndexOf(h+".xml")>-1}var p=n("../../lib/oop"),w=n("../../range").Range,f=n("./fold_mode").FoldMode,g=r.FoldMode=function(a,h){f.call(this),this.voidElements=a||{},this.optionalEndTags=p.mixin({},this.voidElements),h&&p.mixin(this.optionalEndTags,h)};p.inherits(g,f);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,h,c){var o=this._getFirstTagInLine(a,c);return o?o.closing||!o.tagName&&o.selfClosing?h==="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,h){return/comment/.test(a.getState(h))&&/<!-/.test(a.getLine(h))?"start":""},this._getFirstTagInLine=function(a,h){for(var c=a.getTokens(h),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,h,c,o){for(var l=a.getTokens(h),m=0,b=0;b<l.length;b++){var k=l[b];if(m+=k.value.length,!(m<o-1)&&d(k,"end-tag-open")&&(k=l[b+1],d(k,"tag-name")&&k.value===""&&(k=l[b+2]),k&&k.value==c))return!0}return!1},this.getFoldWidgetRange=function(a,h,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,u){var d=n("../../lib/oop"),p=n("../../range").Range,w=n("./fold_mode").FoldMode,f=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(f,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 h=g.getLine(a);if(this.singleLineBlockCommentRe.test(h)&&!this.startRegionRe.test(h)&&!this.tripleStarBlockCommentRe.test(h))return"";var c=this._getFoldWidgetBase(g,i,a);return!c&&this.startRegionRe.test(h)?"start":c},this.getFoldWidgetRange=function(g,i,a,h){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()&&(h?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),h=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(h>b)break;var k=this.getFoldWidgetRange(g,"all",i);if(k){if(k.start.row<=c)break;if(k.isMultiLine())i=k.end.row;else if(h==b)break}l=i}}return new p(c,o,l,g.getLine(l).length)},this.getCommentRegionBlock=function(g,i,a){for(var h=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 k=a;if(k>o)return new p(o,h,k,i.length)}}).call(f.prototype)}),ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(n,r,u){var d=n("../../lib/oop"),p=n("./xml").FoldMode,w=n("./cstyle").FoldMode,f=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 p};d.inherits(f,w),(function(){this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(g,i,a){var h=this.getFoldWidgetBase(g,i,a);return h||this.xmlFoldMode.getFoldWidget(g,i,a)},this.getFoldWidgetRange=function(g,i,a,h){var c=this.getFoldWidgetRangeBase(g,i,a,h);return c||this.xmlFoldMode.getFoldWidgetRange(g,i,a)}}).call(f.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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./javascript_highlight_rules").JavaScriptHighlightRules,f=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./behaviour/javascript").JavaScriptBehaviour,a=n("./folding/javascript").FoldMode,h=function(){this.HighlightRules=w,this.$outdent=new f,this.$behaviour=new i,this.foldingRules=new a};d.inherits(h,p),(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),k=b.tokens,T=b.state;if(k.length&&k[k.length-1].type=="comment")return m;if(c=="start"||c=="no_regex"){var E=o.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);E&&(m+=l)}else if(c=="doc-start"&&(T=="start"||T=="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(h.prototype),r.Mode=h}),ace.define("ace/mode/css_completions",["require","exports","module"],function(n,r,u){var d={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},p=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var w=document.createElement("c").style;for(var f in w)if(typeof w[f]=="string"){var g=f.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()});d.hasOwnProperty(g)||(d[g]=1)}}this.completionsDefined=!0},this.getCompletions=function(w,f,g,i){if(this.completionsDefined||this.defineCompletions(),w==="ruleset"||f.$mode.$id=="ace/mode/scss"){var a=f.getLine(g.row).substr(0,g.column),h=/\([^)]*$/.test(a);return h&&(a=a.substr(a.lastIndexOf("(")+1)),/:[^;]+$/.test(a)?this.getPropertyValueCompletions(w,f,g,i):this.getPropertyCompletions(w,f,g,i,h)}return[]},this.getPropertyCompletions=function(w,f,g,i,a){a=a||!1;var h=Object.keys(d);return h.map(function(c){return{caption:c,snippet:c+": $0"+(a?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(w,f,g,i){var a=f.getLine(g.row).substr(0,g.column),h=(/([\w\-]+):[^:]*$/.exec(a)||{})[1];if(!h)return[];var c=[];return h in d&&typeof d[h]=="object"&&(c=Object.keys(d[h])),c.map(function(o){return{caption:o,snippet:o,meta:"property value",score:1e6}})}}).call(p.prototype),r.CssCompletions=p}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(n,r,u){var d=n("../../lib/oop");n("../behaviour").Behaviour;var p=n("./cstyle").CstyleBehaviour,w=n("../../token_iterator").TokenIterator,f=function(){this.inherit(p),this.add("colon","insertion",function(g,i,a,h,c){if(c===":"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=new w(h,o.row,o.column),m=l.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=l.stepBackward()),m&&m.type==="support.type"){var b=h.doc.getLine(o.row),k=b.substring(o.column,o.column+1);if(k===":")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,h,c){var o=h.doc.getTextRange(c);if(!c.isMultiLine()&&o===":"){var l=a.getCursorPosition(),m=new w(h,l.row,l.column),b=m.getCurrentToken();if(b&&b.value.match(/\s+/)&&(b=m.stepBackward()),b&&b.type==="support.type"){var k=h.doc.getLine(c.start.row),T=k.substring(c.end.column,c.end.column+1);if(T===";")return c.end.column++,c}}}),this.add("semicolon","insertion",function(g,i,a,h,c){if(c===";"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=h.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,h,c){if(c==="!"&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=h.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}})};d.inherits(f,p),r.CssBehaviour=f}),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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./css_highlight_rules").CssHighlightRules,f=n("./matching_brace_outdent").MatchingBraceOutdent,g=n("../worker/worker_client").WorkerClient,i=n("./css_completions").CssCompletions,a=n("./behaviour/css").CssBehaviour,h=n("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=w,this.$outdent=new f,this.$behaviour=new a,this.$completer=new i,this.foldingRules=new h};d.inherits(c,p),(function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(o,l,m){var b=this.$getIndent(l),k=this.getTokenizer().getLineTokens(l,o).tokens;if(k.length&&k[k.length-1].type=="comment")return b;var T=l.match(/^.*\{\s*$/);return T&&(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,u){var d=n("../../lib/oop"),p=n("./fold_mode").FoldMode,w=r.FoldMode=function(f,g){this.defaultMode=f,this.subModes=g};d.inherits(w,p),(function(){this.$getMode=function(f){typeof f!="string"&&(f=f[0]);for(var g in this.subModes)if(f.indexOf(g)===0)return this.subModes[g];return null},this.$tryMode=function(f,g,i,a){var h=this.$getMode(f);return h?h.getFoldWidget(g,i,a):""},this.getFoldWidget=function(f,g,i){return this.$tryMode(f.getState(i-1),f,g,i)||this.$tryMode(f.getState(i),f,g,i)||this.defaultMode.getFoldWidget(f,g,i)},this.getFoldWidgetRange=function(f,g,i){var a=this.$getMode(f.getState(i-1));return(!a||!a.getFoldWidget(f,g,i))&&(a=this.$getMode(f.getState(i))),(!a||!a.getFoldWidget(f,g,i))&&(a=this.defaultMode),a.getFoldWidgetRange(f,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,u){var d=n("../../lib/oop"),p=n("./mixed").FoldMode,w=n("./xml").FoldMode,f=n("./cstyle").FoldMode,g=r.FoldMode=function(i,a){p.call(this,new w(i,a),{"js-":new f,"css-":new f})};d.inherits(g,p)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(n,r,u){function d(l,m){return l.type.lastIndexOf(m+".xml")>-1}function p(l,m){for(var b=new f(l,m.row,m.column),k=b.getCurrentToken();k&&!d(k,"tag-name");)k=b.stepBackward();if(k)return k.value}function w(l,m){for(var b=new f(l,m.row,m.column),k=b.getCurrentToken();k&&!d(k,"attribute-name");)k=b.stepBackward();if(k)return k.value}var f=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),h={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(h),o=function(){};(function(){this.getCompletions=function(l,m,b,k){var T=m.getTokenAt(b.row,b.column);if(!T)return[];if(d(T,"tag-name")||d(T,"tag-open")||d(T,"end-tag-open"))return this.getTagCompletions(l,m,b,k);if(d(T,"tag-whitespace")||d(T,"attribute-name"))return this.getAttributeCompletions(l,m,b,k);if(d(T,"attribute-value"))return this.getAttributeValueCompletions(l,m,b,k);var E=m.getLine(b.row).substr(0,b.column);return/&[a-z]*$/i.test(E)?this.getHTMLEntityCompletions(l,m,b,k):[]},this.getTagCompletions=function(l,m,b,k){return c.map(function(T){return{value:T,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(l,m,b,k){var T=p(m,b);if(!T)return[];var E=a;return T in h&&(E=E.concat(Object.keys(h[T]))),E.map(function(_){return{caption:_,snippet:_+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(l,m,b,k){var T=p(m,b),E=w(m,b);if(!T)return[];var _=[];return T in h&&E in h[T]&&typeof h[T][E]=="object"&&(_=Object.keys(h[T][E])),_.map(function(x){return{caption:x,snippet:x,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(l,m,b,k){var T=["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 T.map(function(E){return{caption:E,snippet:E,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,u){var d=n("../lib/oop"),p=n("../lib/lang"),w=n("./text").Mode,f=n("./javascript").Mode,g=n("./css").Mode,i=n("./html_highlight_rules").HtmlHighlightRules,a=n("./behaviour/xml").XmlBehaviour,h=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(k){this.fragmentContext=k&&k.fragmentContext,this.HighlightRules=i,this.$behaviour=new a,this.$completer=new c,this.createModeDelegates({"js-":f,"css-":g}),this.foldingRules=new h(this.voidElements,p.arrayToMap(m))};d.inherits(b,w),(function(){this.blockComment={start:"<!--",end:"-->"},this.voidElements=p.arrayToMap(l),this.getNextLineIndent=function(k,T,E){return this.$getIndent(T)},this.checkOutdent=function(k,T,E){return!1},this.getCompletions=function(k,T,E,_){return this.$completer.getCompletions(k,T,E,_)},this.createWorker=function(k){if(this.constructor==b){var T=new o(["ace"],"ace/mode/html_worker","Worker");return T.attachToDocument(k.getDocument()),this.fragmentContext&&T.call("setOptions",[{context:this.fragmentContext}]),T.on("error",function(E){k.setAnnotations(E.data)}),T.on("terminate",function(){k.clearAnnotations()}),T}},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,u){var d=n("../lib/oop"),p=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",f=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":f,"invalid.deprecated":"debugger"},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",h="(?:\\.\\d+)",c="(?:\\d+)",o="(?:(?:"+c+"?"+h+")|(?:"+c+"\\.))",l="(?:(?:"+o+"|"+c+"))",m="(?:"+l+"|"+o+")",b="(?:&"+c+")",k="[a-zA-Z_][a-zA-Z0-9_]*",T="(?:"+k+"(?==))",E="(?:\\$(?:SHLVL|\\$|\\!|\\?))",_="(?:"+k+"\\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:E},{token:"variable",regex:T},{include:"variables"},{token:"support.function",regex:_},{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,p),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,u){var d=n("../lib/oop"),p=n("./text").Mode,w=n("./sh_highlight_rules").ShHighlightRules,f=n("../range").Range,g=n("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=w,this.foldingRules=new g,this.$behaviour=this.$defaultBehaviour};d.inherits(i,p),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(h,c,o){var l=this.$getIndent(c),m=this.getTokenizer().getLineTokens(c,h),b=m.tokens;if(b.length&&b[b.length-1].type=="comment")return l;if(h=="start"){var k=c.match(/^.*[\{\(\[:]\s*$/);k&&(l+=o)}return l};var a={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(h,c,o){if(o!==`\r
998
+ `&&o!=="\r"&&o!==`
999
+ `)return!1;var l=this.getTokenizer().getLineTokens(c.trim(),h).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(h,c,o){o+=1;var l=this.$getIndent(c.getLine(o)),m=c.getTabString();l.slice(-m.length)==m&&c.remove(new f(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,u){var d=n("../lib/oop"),p=n("../lib/lang"),w=n("./text").Mode,f=n("./xml_highlight_rules").XmlHighlightRules,g=n("./behaviour/xml").XmlBehaviour,i=n("./folding/xml").FoldMode,a=n("../worker/worker_client").WorkerClient,h=function(){this.HighlightRules=f,this.$behaviour=new g,this.foldingRules=new i};d.inherits(h,w),(function(){this.voidElements=p.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(h.prototype),r.Mode=h}),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,u){var d=n("../lib/oop"),p=n("./behaviour/cstyle").CstyleBehaviour,w=n("./text").Mode,f=n("./markdown_highlight_rules").MarkdownHighlightRules,g=n("./folding/markdown").FoldMode,i=function(){this.HighlightRules=f,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 p({braces:!0})};d.inherits(i,w),(function(){this.type="text",this.blockComment={start:"<!--",end:"-->"},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(a,h,c){if(a=="listblock"){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(h);if(!o)return"";var l=o[2];return l||(l=parseInt(o[3],10)+1+"."),o[1]+l+o[4]}return this.$getIndent(h)},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)})}()}(Fg)),Fg.exports}E_();var jg={exports:{}},Wg;function A_(){return Wg||(Wg=1,function(t,e){ace.define("ace/theme/twilight-css",["require","exports","module"],function(n,r,u){u.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,u){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)})}()}(jg)),jg.exports}A_();var zg={exports:{}},Hg;function T_(){return Hg||(Hg=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,u){function d(x){var R=new Date().toLocaleString("en-us",x);return R.length==1?"0"+R:R}var p=n("./lib/dom"),w=n("./lib/oop"),f=n("./lib/event_emitter").EventEmitter,g=n("./lib/lang"),i=n("./range").Range,a=n("./range_list").RangeList,h=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 C=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.__=C,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 C=R.indexOf($,N+1);C==-1&&(C=R.length),$.fmt=R.slice(N+1,C),N=C}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 k(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(C){var D=N[C];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(C){return C&&!/^\^?\(.*\)\$?$|^\\b$/.test(C)&&(C="(?:"+C+")"),C||""}function L(C,D,z){return C=O(C),D=O(D),C=D+C,C&&C[C.length-1]!="$"&&(C+="$"),new RegExp(C)}function W(C){C.scope||(C.scope=I||"_"),I=C.scope,F[I]||(F[I]=[],N[I]={});var D=N[I];if(C.name){var z=D[C.name];z&&$.unregister(z),D[C.name]=C}F[I].push(C),C.prefix&&(C.tabTrigger=C.prefix),!C.content&&C.body&&(C.content=Array.isArray(C.body)?C.body.join(`
1133
+ `):C.body),C.tabTrigger&&!C.trigger&&(!C.guard&&/^\w/.test(C.tabTrigger)&&(C.guard="\\b"),C.trigger=g.escapeRegExp(C.tabTrigger)),!(!C.trigger&&!C.guard&&!C.endTrigger&&!C.endGuard)&&(C.startRe=L(C.trigger,C.guard),C.triggerRe=new RegExp(C.trigger),C.endRe=L(C.endTrigger,C.endGuard),C.endTriggerRe=new RegExp(C.endTrigger))}var F=this.snippetMap,N=this.snippetNameMap,$=this;R||(R=[]),Array.isArray(R)?R.forEach(W):Object.keys(R).forEach(function(C){W(R[C])}),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],C=$&&$.indexOf(F);C>=0&&$.splice(C,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,f);var b=function(x,R,I){function O(ce){for(var ge=[],Ee=0;Ee<ce.length;Ee++){var Ae=ce[Ee];if(typeof Ae=="object"){if(D[Ae.tabstopId])continue;var Re=ce.lastIndexOf(Ae,Ee-1);Ae=ge[Re]||{tabstopId:Ae.tabstopId}}ge[Ee]=Ae}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 C=[];$.forEach(function(ce,ge){if(typeof ce=="object"){var Ee=ce.tabstopId,Ae=C[Ee];if(Ae||(Ae=C[Ee]=[],Ae.index=Ee,Ae.value="",Ae.parents={}),Ae.indexOf(ce)===-1){ce.choices&&!Ae.choices&&(Ae.choices=ce.choices),Ae.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&&!Ae.value?Ae.value=Xe:Xe.length&&(!Ae.value||typeof Ae.value!="string")&&(Ae.value=Xe.join(""))}}}}),C.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=C[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:C,tokens:$}},k=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 C=N.parents&&N.parents[O.index],D=N.rangeList.pointIndex(R.start,C);D=D<0?-D-1:D+1;var z=N.rangeList.pointIndex(R.end,C);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);E(W.start,I),E(W.end,I),R[0]=[W],R[0].index=0}var F=this.index,N=[F+1,0],$=this.ranges,C=this.snippetId=(this.snippetId||0)+1;R.forEach(function(D,z){var U=this.$openTabstops[z]||D;U.snippetId=C;for(var G=0;G<D.length;G++){var Z=D[G],te=i.fromPoints(Z.start,Z.end||Z.start);T(te.start,I),T(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}();k.prototype.keyboardHandler=new h,k.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 T=function(x,R){x.row==0&&(x.column+=R.column),x.row+=R.row},E=function(x,R){x.row==R.row&&(x.column-=R.column),x.row-=R.row};p.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 _=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(_.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,u){var d=n("../virtual_renderer").VirtualRenderer,p=n("../editor").Editor,w=n("../range").Range,f=n("../lib/event"),g=n("../lib/lang"),i=n("../lib/dom"),a=n("../config").nls,h=n("./../lib/useragent"),c=function(T){return"suggest-aria-id:".concat(T)},o=h.isSafari?"menu":"listbox",l=h.isSafari?"menuitem":"option",m=h.isSafari?"aria-current":"aria-selected",b=function(T){var E=new d(T);E.$maxLines=4;var _=new p(E);return _.setHighlightActiveLine(!1),_.setShowPrintMargin(!1),_.renderer.setShowGutter(!1),_.renderer.setHighlightGutterLine(!1),_.$mouseHandler.$focusTimeout=0,_.$highlightTagPending=!0,_},k=function(){function T(E){var _=i.createElement("div"),x=b(_);E&&E.appendChild(_),_.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 C=$.getDocumentPosition();x.selection.moveToPosition(C),L.start.row=L.end.row=C.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 C=I.getDocumentPosition().row;O.start.row!=C&&(O.id||x.setRow(C),F(C))}}),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,C=$.config.firstRow,D=$.config.lastRow;C<=D;C++){var z=$.element.childNodes[C-$.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",C+1);var U=x.getData(C);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(),C=x.renderer.$textLayer,D=C.element.childNodes[$-C.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,C.element.setAttribute("aria-activedescendant",U),z.setAttribute("aria-activedescendant",U),D.setAttribute(m,"true")}});var W=function(){F(-1)},F=function($,C){$!==O.start.row&&(O.start.row=O.end.row=$,C||x.session._emit("changeBackMarker"),x._emit("changeHoverMarker"))};x.getHoveredRow=function(){return O.start.row},f.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 C=x.data[$];return typeof C=="string"?C:C&&C.value||""};var N=x.session.bgTokenizer;return N.$tokenizeRow=function($){function C(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;C(U.slice(te,ue),""),te=ue+le.length,C(U.slice(ue,te),"completion-highlight")}return C(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($,C){x.filterText=C||"",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($,C,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*C*1.4,le={top:0,bottom:0},ue=Z-$.top-3*this.$borderSize-C,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+C+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,D==="top"?(U.style.top="",U.style.bottom=Z+G-le.bottom+"px",x.isTopdown=!1):(U.style.top=le.top+"px",U.style.bottom="",x.isTopdown=!0),U.style.display="";var Ee=$.left;return Ee+U.offsetWidth>te&&(Ee=te-U.offsetWidth),U.style.left=Ee+"px",U.style.right="",x.isOpen||(x.isOpen=!0,this._signal("show"),I=null),x.anchorPos=$,x.anchor=D,!0},x.show=function($,C,D){this.tryShow($,C,D?"bottom":void 0,!0)},x.goTo=function($){var C=this.getRow(),D=this.session.getLength()-1;switch($){case"up":C=C<=0?D:C-1;break;case"down":C=C>=D?-1:C+1;break;case"start":C=0;break;case"end":C=D}this.setRow(C)},x.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},x.$imageSize=0,x.$borderSize=1,x}return T}();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: fixed;
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=k,r.$singleLineEditor=b,r.getAriaId=c}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(n,r,u){var d=function(){function p(w){this.editor=w,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return p.prototype.setScreenReaderContent=function(w){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var g=this.popup.getRow(),i=this.popup.renderer.$textLayer,a=i.element.childNodes[g-i.config.firstRow];if(a){for(var h="doc-tooltip ",c=0;c<this._lines.length;c++)h+="ace-inline-screenreader-line-".concat(c," ");a.setAttribute("aria-describedby",h)}}).bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=w.split(/\r\n|\r|\n/);var f=this.createCodeBlock();this.screenReaderDiv.appendChild(f)},p.prototype.destroy=function(){this.screenReaderDiv.remove()},p.prototype.createCodeBlock=function(){var w=document.createElement("pre");w.setAttribute("id","ace-inline-screenreader");for(var f=0;f<this._lines.length;f++){var g=document.createElement("code");g.setAttribute("id","ace-inline-screenreader-line-".concat(f));var i=document.createTextNode(this._lines[f]);g.appendChild(i),w.appendChild(g)}return w},p}();r.AceInlineScreenReader=d}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets","ace/autocomplete/inline_screenreader"],function(n,r,u){var d=n("../snippets").snippetManager,p=n("./inline_screenreader").AceInlineScreenReader,w=function(){function f(){this.editor=null}return f.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 p(g));var h=i.snippet?d.getDisplayTextForSnippet(g,i.snippet):i.value;return i.hideInlinePreview||!h||!h.startsWith(a)?!1:(this.editor=g,this.inlineScreenReader.setScreenReaderContent(h),h=h.slice(a.length),h===""?g.removeGhostText():g.setGhostText(h),!0)},f.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},f.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},f.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&(this.inlineScreenReader.destroy(),this.inlineScreenReader=null)},f}();r.AceInline=w}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,u){r.parForEach=function(p,w,f){var g=0,i=p.length;i===0&&f();for(var a=0;a<i;a++)w(p[a],function(h,c){g++,g===i&&f(h,c)})};var d=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(p,w,f){f=f||d;for(var g=[],i=w-1;i>=0&&f.test(p[i]);i--)g.push(p[i]);return g.reverse().join("")},r.retrieveFollowingIdentifier=function(p,w,f){f=f||d;for(var g=[],i=w;i<p.length&&f.test(p[i]);i++)g.push(p[i]);return g},r.getCompletionPrefix=function(p){var w=p.getCursorPosition(),f=p.session.getLine(w.row),g;return p.completers.forEach((function(i){i.identifierRegexps&&i.identifierRegexps.forEach((function(a){!g&&a&&(g=this.retrievePrecedingIdentifier(f,w.column,a))}).bind(this))}).bind(this)),g||this.retrievePrecedingIdentifier(f,w.column)},r.triggerAutocomplete=function(p,f){var f=f??p.session.getPrecedingCharacter();return p.completers.some(function(g){if(g.triggerCharacters&&Array.isArray(g.triggerCharacters))return g.triggerCharacters.includes(f)})}}),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,u){var d=n("./keyboard/hash_handler").HashHandler,p=n("./autocomplete/popup").AcePopup,w=n("./autocomplete/inline").AceInline,f=n("./autocomplete/popup").getAriaId,g=n("./autocomplete/util"),i=n("./lib/lang"),a=n("./lib/dom"),h=n("./snippets").snippetManager,c=n("./config"),o=n("./lib/event"),l=n("./lib/scroll").preventParentScroll,m=function(E,_){_.completer&&_.completer.destroy()},b=function(){function E(){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 _=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!_||this.editor.completers.length===0||(this.completions=new T(E.completionsForLoading),this.openPopup(this.editor,_.prefix,!1),this.popup.renderer.setStyle("ace_loading",!0))}).bind(this),this.stickySelectionDelay)}return Object.defineProperty(E,"completionsForLoading",{get:function(){return[{caption:c.nls("autocomplete.loading","Loading..."),value:""}]},enumerable:!1,configurable:!0}),E.prototype.$init=function(){return this.popup=new p(this.parentNode||document.body||document.documentElement),this.popup.on("click",(function(_){this.insertMatch(),_.stop()}).bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupShow.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),o.addListener(this.popup.container,"mouseout",this.mouseOutListener.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup.renderer.on("afterRender",this.$onPopupRender.bind(this)),this.popup},E.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new w,this.inlineRenderer},E.prototype.getPopup=function(){return this.popup||this.$init()},E.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},E.prototype.$seen=function(_){!this.hasSeen.has(_)&&_&&_.completer&&_.completer.onSeen&&typeof _.completer.onSeen=="function"&&(_.completer.onSeen(this.editor,_),this.hasSeen.add(_))},E.prototype.$onPopupChange=function(_){if(this.inlineRenderer&&this.inlineEnabled){var x=_?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)},E.prototype.$updateGhostText=function(_){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,_,O)?this.$seen(_):this.inlineRenderer.hide()},E.prototype.$onPopupRender=function(){var _=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&&(!_||R.hideInlinePreview)&&this.$seen(R)}},E.prototype.$onPopupShow=function(_){this.$onPopupChange(_),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},E.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var _=this.editor.container.parentNode,x=[];_;)x.push(_),_.addEventListener("scroll",this.onLayoutChange,{passive:!0}),_=_.parentNode;this.$elements=x}},E.prototype.unObserveLayoutChanges=function(){var _=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(x){x.removeEventListener("scroll",_.onLayoutChange,{passive:!0})}),this.$elements=null},E.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},E.prototype.$updatePopupPosition=function(){var _=this.editor,x=_.renderer,R=x.layerConfig.lineHeight,I=x.$cursorLayer.getPixelPosition(this.base,!0);I.left-=this.popup.getTextLeftOffset();var O=_.container.getBoundingClientRect();I.top+=O.top-x.layerConfig.offset,I.left+=O.left-_.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=_.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)},E.prototype.openPopup=function(_,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:f(this.popup.getRow()),inline:this.inlineEnabled}),_.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(_.getTheme()),this.popup.setFontSize(_.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},E.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()},E.prototype.changeListener=function(_){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()},E.prototype.blurListener=function(_){var x=document.activeElement,R=this.editor.textInput.getElement(),I=_.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(_.relatedTarget),O=this.popup&&this.popup.container;x!=R&&x.parentNode!=O&&!I&&x!=this.tooltipNode&&_.relatedTarget!=R&&this.detach()},E.prototype.mousedownListener=function(_){this.detach()},E.prototype.mousewheelListener=function(_){this.popup&&!this.popup.isMouseOver&&this.detach()},E.prototype.mouseOutListener=function(_){this.popup.isOpen&&this.$updatePopupPosition()},E.prototype.goTo=function(_){this.popup.goTo(_)},E.prototype.insertMatch=function(_,x){if(_||(_=this.popup.getData(this.popup.getRow())),!_)return!1;if(_.value==="")return this.detach();var R=this.completions,I=this.getCompletionProvider().insertMatch(this.editor,_,R.filterText,x);return this.completions==R&&this.detach(),I},E.prototype.showPopup=function(_,x){this.editor&&this.detach(),this.activated=!0,this.editor=_,_.completer!=this&&(_.completer&&_.completer.detach(),_.completer=this),_.on("changeSelection",this.changeListener),_.on("blur",this.blurListener),_.on("mousedown",this.mousedownListener),_.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,x)},E.prototype.getCompletionProvider=function(_){return this.completionProvider||(this.completionProvider=new k(_)),this.completionProvider},E.prototype.gatherCompletions=function(_,x){return this.getCompletionProvider().gatherCompletions(_,x)},E.prototype.updateCompletions=function(_,x){if(_&&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,_);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 T(x.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,"",_)}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,C=g.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),N){if(!$.length){var D=!this.autoShown&&this.emptyMessage;if(typeof D=="function"&&(D=this.emptyMessage(C)),D){var z=[{caption:D,value:""}];this.completions=new T(z),this.openPopup(this.editor,C,_),this.popup.renderer.setStyle("ace_loading",!1),this.popup.renderer.setStyle("ace_empty-message",!0);return}return this.detach()}if($.length==1&&$[0].value==C&&!$[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&$.length==1)return this.insertMatch($[0])}this.completions=!N&&this.showLoadingState?new T(E.completionsForLoading.concat($),F.filterText):F,this.openPopup(this.editor,C,_),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)},E.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},E.prototype.updateDocTooltip=function(){var _=this.popup,x=this.completions&&this.completions.filtered,R=x&&(x[_.getHoveredRow()]||x[_.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)},E.prototype.showDocTooltip=function(_){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;_.docHTML?R.innerHTML=_.docHTML:_.docText&&(R.textContent=_.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,C=I.isTopdown?O.top:window.innerHeight-F-O.bottom,D=[Math.min($/L,1),Math.min(N/L,1),Math.min(C/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"))},E.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var _=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==_&&this.editor.focus(),this.tooltipNode=null,_.parentNode&&_.parentNode.removeChild(_)}},E.prototype.onTooltipClick=function(_){for(var x=_.target;x&&x!=this.tooltipNode;){if(x.nodeName=="A"&&x.href){x.rel="noreferrer",x.target="_blank";break}x=x.parentNode}},E.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var _=this.popup.container;_&&_.parentNode&&_.parentNode.removeChild(_)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},E.for=function(_){return _.completer instanceof E||(_.completer&&(_.completer.destroy(),_.completer=null),c.get("sharedPopups")?(E.$sharedInstance||(E.$sharedInstance=new E),_.completer=E.$sharedInstance):(_.completer=new E,_.once("destroy",m))),_.completer},E}();b.prototype.commands={Up:function(E){E.completer.goTo("up")},Down:function(E){E.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(E){E.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(E){E.completer.goTo("end")},Esc:function(E){E.completer.detach()},Return:function(E){return E.completer.insertMatch()},"Shift-Return":function(E){E.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(E){var _=E.completer.insertMatch();if(_||E.tabstopManager)return _;E.completer.goTo("down")},Backspace:function(E){E.execCommand("backspace");var _=g.getCompletionPrefix(E);!_&&E.completer&&E.completer.detach()},PageUp:function(E){E.completer.popup.gotoPageUp()},PageDown:function(E){E.completer.popup.gotoPageDown()}},b.startCommand={name:"startAutocomplete",exec:function(E,_){var x=b.for(E);x.autoInsert=!1,x.autoSelect=!0,x.autoShown=!1,x.showPopup(E,_),x.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var k=function(){function E(_){this.initialPosition=_,this.active=!0}return E.prototype.insertByIndex=function(_,x,R){return!this.completions||!this.completions.filtered?!1:this.insertMatch(_,this.completions.filtered[x],R)},E.prototype.insertMatch=function(_,x,R){if(!x)return!1;if(_.startOperation({command:{name:"insertMatch"}}),x.completer&&x.completer.insertMatch)x.completer.insertMatch(_,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;_.selection.getAllRanges?L=_.selection.getAllRanges():L=[_.getSelectionRange()];for(var W=0,F;F=L[W];W++)F.start.column-=I,F.end.column+=O,_.session.remove(F)}x.snippet?h.insertSnippet(_,x.snippet):this.$insertString(_,x),x.completer&&x.completer.onInsert&&typeof x.completer.onInsert=="function"&&x.completer.onInsert(_,x),x.command&&x.command==="startAutocomplete"&&_.execCommand(x.command)}return _.endOperation(),!0},E.prototype.$insertString=function(_,x){var R=x.value||x;_.execCommand("insertstring",R)},E.prototype.gatherCompletions=function(_,x){var R=_.getSession(),I=_.getCursorPosition(),O=g.getCompletionPrefix(_),L=[];this.completers=_.completers;var W=_.completers.length;return _.completers.forEach(function(F,N){F.getCompletions(_,R,I,O,function($,C){F.hideInlinePreview&&(C=C.map(function(D){return Object.assign(D,{hideInlinePreview:F.hideInlinePreview})})),!$&&C&&(L=L.concat(C)),x(null,{prefix:g.getCompletionPrefix(_),matches:L,finished:--W===0})})}),!0},E.prototype.provideCompletions=function(_,x,R){var I=(function(F){var N=F.prefix,$=F.matches;this.completions=new T($),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(_,(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)}},E.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(_){typeof _.cancel=="function"&&_.cancel()})},E}(),T=function(){function E(_,x){this.all=_,this.filtered=_,this.filterText=x||"",this.exactMatch=!1,this.ignoreCaption=!1}return E.prototype.setFilter=function(_){if(_.length>this.filterText&&_.lastIndexOf(this.filterText,0)===0)var x=this.filtered;else var x=this.all;this.filterText=_,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},E.prototype.filterCompletions=function(_,x){var R=[],I=x.toUpperCase(),O=x.toLowerCase();e:for(var L=0,W;W=_[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,C=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)C=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&&(C+=10),C+=z,$|=1<<G),N=D}}W.matchMask=$,W.exactMatch=C?0:1,W.$score=(W.score||0)-C,R.push(W)}}return R},E}();r.Autocomplete=b,r.CompletionProvider=k,r.FilteredList=T}),ace.define("ace/marker_group",["require","exports","module"],function(n,r,u){var d=function(){function p(w,f){f&&(this.markerType=f.markerType),this.markers=[],this.session=w,w.addDynamicMarker(this)}return p.prototype.getMarkerAtPosition=function(w){return this.markers.find(function(f){return f.range.contains(w.row,w.column)})},p.prototype.markersComparator=function(w,f){return w.range.start.row-f.range.start.row},p.prototype.setMarkers=function(w){this.markers=w.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal("changeBackMarker")},p.prototype.update=function(w,f,g,i){if(!(!this.markers||!this.markers.length))for(var a=i.firstRow,h=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>h)&&(b.range.start.row===l?o++:(l=b.range.start.row,o=0),!(o>200))){var k=b.range.clipRows(a,h);if(!(k.start.row===k.end.row&&k.start.column===k.end.column)){var T=k.toScreenRange(g);if(T.isEmpty()){c=g.getNextFoldLine(k.end.row,c),c&&c.end.row>k.end.row&&(a=c.end.row);continue}this.markerType==="fullLine"?f.drawFullLineMarker(w,T,b.className,i):T.isMultiLine()?this.markerType==="line"?f.drawMultiLineMarker(w,T,b.className,i):f.drawTextMarker(w,T,b.className,i):f.drawSingleLineMarker(w,T,b.className+" ace_br15",i)}}}},p}();d.prototype.MAX_MARKERS=1e4,r.MarkerGroup=d}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,u){function d(g,i){var a=g.getTextRange(w.fromPoints({row:0,column:0},i));return a.split(f).length-1}function p(g,i){var a=d(g,i),h=g.getValue().split(f),c=Object.create(null),o=h[a];return h.forEach(function(l,m){if(!(!l||l===o)){var b=Math.abs(a-m),k=h.length-b;c[l]?c[l]=Math.max(k,c[l]):c[l]=k}}),c}var w=n("../range").Range,f=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;r.getCompletions=function(g,i,a,h,c){var o=p(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,u){var d=n("../snippets").snippetManager,p=n("../autocomplete").Autocomplete,w=n("../config"),f=n("../lib/lang"),g=n("../autocomplete/util"),i=n("../marker_group").MarkerGroup,a=n("../autocomplete/text_completer"),h={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),C=L.$mode.getCompletions($,L,W,F);C=C.map(function(D){return D.completerId=h.id,D}),N(null,C)},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 $=[],C=L.getTokenAt(W.row,W.column);C&&C.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>",f.escapeHTML(O.caption),"</b>","<hr></hr>",f.escapeHTML(c(O.snippet))].join(""))},id:"snippetCompleter"},l=[o,a,h];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=h,r.snippetCompleter=o;var m={name:"expandSnippet",exec:function(O){return d.expandWithTab(O)},bindKey:"Tab"},b=function(O,L){k(L.session.$mode)},k=function(O){typeof O=="string"&&(O=w.$modes[O]),O&&(d.files||(d.files={}),T(O.$id,O.snippetFileId),O.modes&&O.modes.forEach(k))},T=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){k("ace/mode/"+F)})))}))},E=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){_=O;var F=O.editor.$liveAutocompletionDelay;F?x.delay(F):R(O)}},_,x=f.delayedCall(function(){R(_)},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 $=p.for(L);$.autoShown=!0,$.showPopup(L)}},I=n("../editor").Editor;n("../config").defineOptions(I.prototype,"editor",{enableBasicAutocompletion:{set:function(O){O?(p.for(this),this.completers||(this.completers=Array.isArray(O)?O:l),this.commands.addCommand(p.startCommand)):this.commands.removeCommand(p.startCommand)},value:!1},enableLiveAutocompletion:{set:function(O){O?(this.completers||(this.completers=Array.isArray(O)?O:l),this.commands.on("afterExec",E)):this.commands.off("afterExec",E)},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)})}()}(zg)),zg.exports}T_();var Ug={exports:{}},Vg;function R_(){return Vg||(Vg=1,function(t,e){ace.define("ace/ext/searchbox-css",["require","exports","module"],function(n,r,u){u.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,u){var d=n("../lib/dom"),p=n("../lib/lang"),w=n("../lib/event"),f=n("./searchbox-css"),g=n("../keyboard/hash_handler").HashHandler,i=n("../lib/keys"),a=n("../config").nls,h=999;d.importCssString(f,"ace_searchbox",!1);var c=function(){function m(b,k,T){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(f,"ace_searchbox",b.container),w.addListener(this.element,"touchstart",function(E){E.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 k=this;w.addListener(b,"mousedown",function(T){setTimeout(function(){k.activeInput.focus()},0),w.stopPropagation(T)}),w.addListener(b,"click",function(T){var E=T.target||T.srcElement,_=E.getAttribute("action");_&&k[_]?k[_]():k.$searchBarKb.commands[_]&&k.$searchBarKb.commands[_].exec(k),w.stopPropagation(T)}),w.addCommandKeyListener(b,function(T,E,_){var x=i.keyCodeToString(_),R=k.$searchBarKb.findKeyCommand(E,x);R&&R.exec&&(R.exec(k),w.stopEvent(T))}),this.$onChange=p.delayedCall(function(){k.find(!1,!1)}),w.addListener(this.searchInput,"input",function(){k.$onChange.schedule(20)}),w.addListener(this.searchInput,"focus",function(){k.activeInput=k.searchInput,k.searchInput.value&&k.highlight()}),w.addListener(this.replaceInput,"focus",function(){k.activeInput=k.replaceInput,k.searchInput.value&&k.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 k=this.editor.getReadOnly();this.replaceOption.style.display=k?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!k?"":"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,k,T){if(this.editor.session){var E=this.editor.find(this.searchInput.value,{skipCurrent:b,backwards:k,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:T,range:this.searchRange}),_=!E&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",_),this.editor._emit("findSearchBox",{match:!_}),this.highlight(),this.updateCounter()}},m.prototype.updateCounter=function(){var b=this.editor,k=b.$search.$options.re,T=k.unicode,E=0,_=0;if(k){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=k.lastIndex=0,O;(O=k.exec(x))&&(E++,I=O.index,I<=R&&_++,!(E>h||!O[0]&&(k.lastIndex=I+=p.skipEmptyMatch(x,I,T),I>=x.length))););}this.searchCounter.textContent=a("search-box.search-counter","$0 of $1",[_,E>h?h+"+":E])},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}),k=!b&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",k),this.editor._emit("findSearchBox",{match:!k}),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,k){this.active=!0,this.editor.on("changeSession",this.setSession),this.editor.on("input",this.$onEditorInput),this.element.style.display="",this.replaceOption.checked=k,this.editor.$search.$options.regExp&&(b=p.escapeRegExp(b)),b!=null&&(this.searchInput.value=b),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},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 k=m.searchBox||new c(m),T=m.session.selection.getRange(),E=T.isMultiLine()?"":m.session.getTextRange(T);k.show(E,b)}}),function(){ace.require(["ace/ext/searchbox"],function(n){t&&(t.exports=n)})}()}(Ug)),Ug.exports}R_();var L_=Object.defineProperty,O_=(t,e,n)=>e in t?L_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cc=(t,e,n)=>O_(t,typeof e!="symbol"?e+"":e,n);function qg(t,e){return function(){return t.apply(e,arguments)}}const{toString:I_}=Object.prototype,{getPrototypeOf:wh}=Object,{iterator:uc,toStringTag:Kg}=Symbol,hc=(t=>e=>{const n=I_.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ji=t=>(t=t.toLowerCase(),e=>hc(e)===t),dc=t=>e=>typeof e===t,{isArray:ha}=Array,Ja=dc("undefined");function el(t){return t!==null&&!Ja(t)&&t.constructor!==null&&!Ja(t.constructor)&&Yr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Gg=ji("ArrayBuffer");function N_(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Gg(t.buffer),e}const D_=dc("string"),Yr=dc("function"),Yg=dc("number"),tl=t=>t!==null&&typeof t=="object",P_=t=>t===!0||t===!1,pc=t=>{if(hc(t)!=="object")return!1;const e=wh(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Kg in t)&&!(uc in t)},F_=t=>{if(!tl(t)||el(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},B_=ji("Date"),j_=ji("File"),W_=ji("Blob"),z_=ji("FileList"),H_=t=>tl(t)&&Yr(t.pipe),U_=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Yr(t.append)&&((e=hc(t))==="formdata"||e==="object"&&Yr(t.toString)&&t.toString()==="[object FormData]"))},V_=ji("URLSearchParams"),[q_,K_,G_,Y_]=["ReadableStream","Request","Response","Headers"].map(ji),X_=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,u;if(typeof t!="object"&&(t=[t]),ha(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{if(el(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],e.call(null,t[w],w,t)}}function Xg(t,e){if(el(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Ss=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qg=t=>!Ja(t)&&t!==Ss;function bh(){const{caseless:t}=Qg(this)&&this||{},e={},n=(r,u)=>{const d=t&&Xg(e,u)||u;pc(e[d])&&pc(r)?e[d]=bh(e[d],r):pc(r)?e[d]=bh({},r):ha(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&nl(arguments[r],n);return e}const Q_=(t,e,n,{allOwnKeys:r}={})=>(nl(e,(u,d)=>{n&&Yr(u)?t[d]=qg(u,n):t[d]=u},{allOwnKeys:r}),t),Z_=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),J_=(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)},eC=(t,e,n,r)=>{let u,d,p;const w={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!w[p]&&(e[p]=t[p],w[p]=!0);t=n!==!1&&wh(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},tC=(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},nC=t=>{if(!t)return null;if(ha(t))return t;let e=t.length;if(!Yg(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},rC=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&wh(Uint8Array)),iC=(t,e)=>{const n=(t&&t[uc]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},oC=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},sC=ji("HTMLFormElement"),aC=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),Zg=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),lC=ji("RegExp"),Jg=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};nl(n,(u,d)=>{let p;(p=e(u,d,t))!==!1&&(r[d]=p||u)}),Object.defineProperties(t,r)},cC=t=>{Jg(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+"'")})}})},uC=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return ha(t)?r(t):r(String(t).split(e)),n},hC=()=>{},dC=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function pC(t){return!!(t&&Yr(t.append)&&t[Kg]==="FormData"&&t[uc])}const fC=t=>{const e=new Array(10),n=(r,u)=>{if(tl(r)){if(e.indexOf(r)>=0)return;if(el(r))return r;if(!("toJSON"in r)){e[u]=r;const d=ha(r)?[]:{};return nl(r,(p,w)=>{const f=n(p,u+1);!Ja(f)&&(d[w]=f)}),e[u]=void 0,d}}return r};return n(t,0)},gC=ji("AsyncFunction"),mC=t=>t&&(tl(t)||Yr(t))&&Yr(t.then)&&Yr(t.catch),em=((t,e)=>t?setImmediate:e?((n,r)=>(Ss.addEventListener("message",({source:u,data:d})=>{u===Ss&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Ss.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Yr(Ss.postMessage)),yC=typeof queueMicrotask<"u"?queueMicrotask.bind(Ss):typeof process<"u"&&process.nextTick||em,vC=t=>t!=null&&Yr(t[uc]),Ce={isArray:ha,isArrayBuffer:Gg,isBuffer:el,isFormData:U_,isArrayBufferView:N_,isString:D_,isNumber:Yg,isBoolean:P_,isObject:tl,isPlainObject:pc,isEmptyObject:F_,isReadableStream:q_,isRequest:K_,isResponse:G_,isHeaders:Y_,isUndefined:Ja,isDate:B_,isFile:j_,isBlob:W_,isRegExp:lC,isFunction:Yr,isStream:H_,isURLSearchParams:V_,isTypedArray:rC,isFileList:z_,forEach:nl,merge:bh,extend:Q_,trim:X_,stripBOM:Z_,inherits:J_,toFlatObject:eC,kindOf:hc,kindOfTest:ji,endsWith:tC,toArray:nC,forEachEntry:iC,matchAll:oC,isHTMLForm:sC,hasOwnProperty:Zg,hasOwnProp:Zg,reduceDescriptors:Jg,freezeMethods:cC,toObjectSet:uC,toCamelCase:aC,noop:hC,toFiniteNumber:dC,findKey:Xg,global:Ss,isContextDefined:Qg,isSpecCompliantForm:pC,toJSONObject:fC,isAsyncFn:gC,isThenable:mC,setImmediate:em,asap:yC,isIterable:vC};function _t(t,e,n,r,u){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),u&&(this.response=u,this.status=u.status?u.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 tm=_t.prototype,nm={};["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=>{nm[t]={value:t}}),Object.defineProperties(_t,nm),Object.defineProperty(tm,"isAxiosError",{value:!0}),_t.from=(t,e,n,r,u,d)=>{const p=Object.create(tm);return Ce.toFlatObject(t,p,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),_t.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const wC=null;function xh(t){return Ce.isPlainObject(t)||Ce.isArray(t)}function rm(t){return Ce.endsWith(t,"[]")?t.slice(0,-2):t}function im(t,e,n){return t?t.concat(e).map(function(r,u){return r=rm(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function bC(t){return Ce.isArray(t)&&!t.some(xh)}const xC=Ce.toFlatObject(Ce,{},null,function(t){return/^is[A-Z]/.test(t)});function fc(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,u=n.visitor||g,d=n.dots,p=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(e);if(!Ce.isFunction(u))throw new TypeError("visitor must be a function");function f(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)&&bC(c)||(Ce.isFileList(c)||Ce.endsWith(o,"[]"))&&(m=Ce.toArray(c)))return o=rm(o),m.forEach(function(b,k){!(Ce.isUndefined(b)||b===null)&&e.append(p===!0?im([o],k,d):p===null?o:o+"[]",f(b))}),!1}return xh(c)?!0:(e.append(im(l,o,d),f(c)),!1)}const i=[],a=Object.assign(xC,{defaultVisitor:g,convertValue:f,isVisitable:xh});function h(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)&&u.call(e,l,Ce.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!Ce.isObject(t))throw new TypeError("data must be an object");return h(t),e}function om(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&&fc(t,this,e)}const sm=kh.prototype;sm.append=function(t,e){this._pairs.push([t,e])},sm.toString=function(t){const e=t?function(n){return t.call(this,n,om)}:om;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function kC(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function am(t,e,n){if(!e)return t;const r=n&&n.encode||kC;Ce.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=Ce.isURLSearchParams(e)?e.toString():new kh(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class lm{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 cm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_C=typeof URLSearchParams<"u"?URLSearchParams:kh,CC=typeof FormData<"u"?FormData:null,SC=typeof Blob<"u"?Blob:null,$C={isBrowser:!0,classes:{URLSearchParams:_C,FormData:CC,Blob:SC},protocols:["http","https","file","blob","url","data"]},_h=typeof window<"u"&&typeof document<"u",Ch=typeof navigator=="object"&&navigator||void 0,MC=_h&&(!Ch||["ReactNative","NativeScript","NS"].indexOf(Ch.product)<0),EC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",AC=_h&&window.location.href||"http://localhost",TC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_h,hasStandardBrowserEnv:MC,hasStandardBrowserWebWorkerEnv:EC,navigator:Ch,origin:AC},Symbol.toStringTag,{value:"Module"})),kr={...TC,...$C};function RC(t,e){return fc(t,new kr.classes.URLSearchParams,{visitor:function(n,r,u,d){return kr.isNode&&Ce.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function LC(t){return Ce.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function OC(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function um(t){function e(n,r,u,d){let p=n[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),f=d>=n.length;return p=!p&&Ce.isArray(u)?u.length:p,f?(Ce.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!w):((!u[p]||!Ce.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Ce.isArray(u[p])&&(u[p]=OC(u[p])),!w)}if(Ce.isFormData(t)&&Ce.isFunction(t.entries)){const n={};return Ce.forEachEntry(t,(r,u)=>{e(LC(r),u,n,0)}),n}return null}function IC(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 rl={transitional:cm,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=Ce.isObject(t);if(u&&Ce.isHTMLForm(t)&&(t=new FormData(t)),Ce.isFormData(t))return r?JSON.stringify(um(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(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return RC(t,this.formSerializer).toString();if((d=Ce.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return fc(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),IC(t)):t}],transformResponse:[function(t){const e=this.transitional||rl.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 u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)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:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],t=>{rl.headers[t]={}});const NC=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"]),DC=t=>{const e={};let n,r,u;return t&&t.split(`
1399
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&NC[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},hm=Symbol("internals");function il(t){return t&&String(t).trim().toLowerCase()}function gc(t){return t===!1||t==null?t:Ce.isArray(t)?t.map(gc):String(t)}function PC(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 FC=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sh(t,e,n,r,u){if(Ce.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!Ce.isString(e)){if(Ce.isString(r))return e.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(e)}}function BC(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function jC(t,e){const n=Ce.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let Xr=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function u(p,w,f){const g=il(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||f===!0||f===void 0&&r[i]!==!1)&&(r[i||w]=gc(p))}const d=(p,w)=>Ce.forEach(p,(f,g)=>u(f,g,w));if(Ce.isPlainObject(t)||t instanceof this.constructor)d(t,e);else if(Ce.isString(t)&&(t=t.trim())&&!FC(t))d(DC(t),e);else if(Ce.isObject(t)&&Ce.isIterable(t)){let p={},w,f;for(const g of t){if(!Ce.isArray(g))throw TypeError("Object iterator must return a key-value pair");p[f=g[0]]=(w=p[f])?Ce.isArray(w)?[...w,g[1]]:[w,g[1]]:g[1]}d(p,e)}else t!=null&&u(e,t,n);return this}get(t,e){if(t=il(t),t){const n=Ce.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return PC(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=il(t),t){const n=Ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Sh(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function u(d){if(d=il(d),d){const p=Ce.findKey(n,d);p&&(!e||Sh(n,n[p],p,e))&&(delete n[p],r=!0)}}return Ce.isArray(t)?t.forEach(u):u(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const u=e[n];(!t||Sh(this,this[u],u,t,!0))&&(delete this[u],r=!0)}return r}normalize(t){const e=this,n={};return Ce.forEach(this,(r,u)=>{const d=Ce.findKey(n,u);if(d){e[d]=gc(r),delete e[u];return}const p=t?BC(u):String(u).trim();p!==u&&delete e[u],e[p]=gc(r),n[p]=!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(`
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[hm]=this[hm]={accessors:{}}).accessors,n=this.prototype;function r(u){const d=il(u);e[d]||(jC(n,u),e[d]=!0)}return Ce.isArray(t)?t.forEach(r):r(t),this}};Xr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Xr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Ce.freezeMethods(Xr);function $h(t,e){const n=this||rl,r=e||n,u=Xr.from(r.headers);let d=r.data;return Ce.forEach(t,function(p){d=p.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function dm(t){return!!(t&&t.__CANCEL__)}function da(t,e,n){_t.call(this,t??"canceled",_t.ERR_CANCELED,e,n),this.name="CanceledError"}Ce.inherits(da,_t,{__CANCEL__:!0});function pm(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 WC(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function zC(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,p;return e=e!==void 0?e:1e3,function(w){const f=Date.now(),g=r[d];p||(p=f),n[u]=w,r[u]=f;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function HC(t,e){let n=0,r=1e3/e,u,d;const p=(w,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const f=Date.now(),g=f-n;g>=r?p(w,f):(u=w,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const mc=(t,e,n=3)=>{let r=0;const u=zC(50,250);return HC(d=>{const p=d.loaded,w=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=w;r=p;const a={loaded:p,total:w,progress:w?p/w:void 0,bytes:f,rate:g||void 0,estimated:g&&w&&i?(w-p)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},fm=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},gm=t=>(...e)=>Ce.asap(()=>t(...e)),UC=kr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,kr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(kr.origin),kr.navigator&&/(msie|trident)/i.test(kr.navigator.userAgent)):()=>!0,VC=kr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];Ce.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Ce.isString(r)&&p.push("path="+r),Ce.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 qC(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function KC(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mm(t,e,n){let r=!qC(e);return t&&(r||n==!1)?KC(t,e):e}const ym=t=>t instanceof Xr?{...t}:t;function $s(t,e){e=e||{};const n={};function r(g,i,a,h){return Ce.isPlainObject(g)&&Ce.isPlainObject(i)?Ce.merge.call({caseless:h},g,i):Ce.isPlainObject(i)?Ce.merge({},i):Ce.isArray(i)?i.slice():i}function u(g,i,a,h){if(Ce.isUndefined(i)){if(!Ce.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!Ce.isUndefined(i))return r(void 0,i)}function p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:w,headers:(g,i,a)=>u(ym(g),ym(i),a,!0)};return Ce.forEach(Object.keys({...t,...e}),function(g){const i=f[g]||u,a=i(t[g],e[g],g);Ce.isUndefined(a)&&i!==w||(n[g]=a)}),n}const vm=t=>{const e=$s({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:p,auth:w}=e;e.headers=p=Xr.from(p),e.url=am(mm(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&p.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let f;if(Ce.isFormData(n)){if(kr.hasStandardBrowserEnv||kr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(kr.hasStandardBrowserEnv&&(r&&Ce.isFunction(r)&&(r=r(e)),r||r!==!1&&UC(e.url))){const g=u&&d&&VC.read(d);g&&p.set(u,g)}return e},GC=typeof XMLHttpRequest<"u",YC=GC&&function(t){return new Promise(function(e,n){const r=vm(t);let u=r.data;const d=Xr.from(r.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:f}=r,g,i,a,h,c;function o(){h&&h(),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 k=Xr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),T={data:!p||p==="text"||p==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};pm(function(E){e(E),o()},function(E){n(E),o()},T),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 k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||cm;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new _t(k,T.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Ce.forEach(d.toJSON(),function(k,T){l.setRequestHeader(T,k)}),Ce.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=mc(f,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,h]=mc(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new da(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=WC(r.url);if(b&&kr.protocols.indexOf(b)===-1){n(new _t("Unsupported protocol "+b+":",_t.ERR_BAD_REQUEST,t));return}l.send(u||null)})},XC=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof _t?i:new da(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new _t(`timeout ${e} of ms exceeded`,_t.ETIMEDOUT))},e);const w=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>Ce.asap(w),f}},QC=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},ZC=async function*(t,e){for await(const n of JC(t))yield*QC(n,e)},JC=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()}},wm=(t,e,n,r)=>{const u=ZC(t,e);let d=0,p,w=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){w(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(f){return w(f),u.return()}},{highWaterMark:2})},yc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",bm=yc&&typeof ReadableStream=="function",eS=yc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),xm=(t,...e)=>{try{return!!t(...e)}catch{return!1}},tS=bm&&xm(()=>{let t=!1;const e=new Request(kr.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),km=64*1024,Mh=bm&&xm(()=>Ce.isReadableStream(new Response("").body)),vc={stream:Mh&&(t=>t.body)};yc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!vc[e]&&(vc[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 nS=async t=>{if(t==null)return 0;if(Ce.isBlob(t))return t.size;if(Ce.isSpecCompliantForm(t))return(await new Request(kr.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 eS(t)).byteLength},rS=async(t,e)=>Ce.toFiniteNumber(t.getContentLength())??nS(e),iS=yc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=vm(t);g=g?(g+"").toLowerCase():"text";let c=XC([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&tS&&n!=="get"&&n!=="head"&&(m=await rS(i,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Ce.isFormData(r)&&(x=_.headers.get("content-type"))&&i.setContentType(x),_.body){const[R,I]=fm(m,mc(gm(f)));r=wm(_.body,km,R,I)}}Ce.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let k=await fetch(o,h);const T=Mh&&(g==="stream"||g==="response");if(Mh&&(w||T&&l)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=k[O]});const x=Ce.toFiniteNumber(k.headers.get("content-length")),[R,I]=w&&fm(x,mc(gm(w),!0))||[];k=new Response(wm(k.body,km,R,()=>{I&&I(),l&&l()}),_)}g=g||"text";let E=await vc[Ce.findKey(vc,g)||"text"](k,t);return!T&&l&&l(),await new Promise((_,x)=>{pm(_,x,{data:E,headers:Xr.from(k.headers),status:k.status,statusText:k.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)}}),Eh={http:wC,xhr:YC,fetch:iS};Ce.forEach(Eh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const _m=t=>`- ${t}`,oS=t=>Ce.isFunction(t)||t===null||t===!1,Cm={getAdapter:t=>{t=Ce.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!oS(n)&&(r=Eh[(p=String(n)).toLowerCase()],r===void 0))throw new _t(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([w,f])=>`adapter ${w} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1401
+ `+d.map(_m).join(`
1402
+ `):" "+_m(d[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Eh};function Ah(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new da(null,t)}function Sm(t){return Ah(t),t.headers=Xr.from(t.headers),t.data=$h.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 Ah(t),e.data=$h.call(t,t.transformResponse,e),e.headers=Xr.from(e.headers),e},function(e){return dm(e)||(Ah(t),e&&e.response&&(e.response.data=$h.call(t,t.transformResponse,e.response),e.response.headers=Xr.from(e.response.headers))),Promise.reject(e)})}const $m="1.11.0",wc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{wc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Mm={};wc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+$m+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,p)=>{if(t===!1)throw new _t(r(d," has been removed"+(e?" in "+e:"")),_t.ERR_DEPRECATED);return e&&!Mm[d]&&(Mm[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,p):!0}},wc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function sS(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 u=r.length;for(;u-- >0;){const d=r[u],p=e[d];if(p){const w=t[d],f=w===void 0||p(w,d,t);if(f!==!0)throw new _t("option "+d+" must be "+f,_t.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _t("Unknown option "+d,_t.ERR_BAD_OPTION)}}const bc={assertOptions:sS,validators:wc},ao=bc.validators;let Ms=class{constructor(t){this.defaults=t||{},this.interceptors={request:new lm,response:new lm}}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 u=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?u&&!String(n.stack).endsWith(u.replace(/^.+\n.+\n/,""))&&(n.stack+=`
1403
+ `+u):n.stack=u}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:u}=e;n!==void 0&&bc.assertOptions(n,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),r!=null&&(Ce.isFunction(r)?e.paramsSerializer={serialize:r}:bc.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),bc.assertOptions(e,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let d=u&&Ce.merge(u.common,u[e.method]);u&&Ce.forEach(["delete","get","head","post","put","patch","common"],c=>{delete u[c]}),e.headers=Xr.concat(d,u);const p=[];let w=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(e)===!1||(w=w&&c.synchronous,p.unshift(c.fulfilled,c.rejected))});const f=[];this.interceptors.response.forEach(function(c){f.push(c.fulfilled,c.rejected)});let g,i=0,a;if(!w){const c=[Sm.bind(this),void 0];for(c.unshift(...p),c.push(...f),a=c.length,g=Promise.resolve(e);i<a;)g=g.then(c[i++],c[i++]);return g}a=p.length;let h=e;for(i=0;i<a;){const c=p[i++],o=p[i++];try{h=c(h)}catch(l){o.call(this,l);break}}try{g=Sm.call(this,h)}catch(c){return Promise.reject(c)}for(i=0,a=f.length;i<a;)g=g.then(f[i++],f[i++]);return g}getUri(t){t=$s(this.defaults,t);const e=mm(t.baseURL,t.url,t.allowAbsoluteUrls);return am(e,t.params,t.paramsSerializer)}};Ce.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}))}}),Ce.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request($s(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}Ms.prototype[t]=e(),Ms.prototype[t+"Form"]=e(!0)});let aS=class Wx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new da(u,d,p),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 Wx(function(n){e=n}),cancel:e}}};function lS(t){return function(e){return t.apply(null,e)}}function cS(t){return Ce.isObject(t)&&t.isAxiosError===!0}const Th={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(Th).forEach(([t,e])=>{Th[e]=t});function Em(t){const e=new Ms(t),n=qg(Ms.prototype.request,e);return Ce.extend(n,Ms.prototype,e,{allOwnKeys:!0}),Ce.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Em($s(t,r))},n}const Nn=Em(rl);Nn.Axios=Ms,Nn.CanceledError=da,Nn.CancelToken=aS,Nn.isCancel=dm,Nn.VERSION=$m,Nn.toFormData=fc,Nn.AxiosError=_t,Nn.Cancel=Nn.CanceledError,Nn.all=function(t){return Promise.all(t)},Nn.spread=lS,Nn.isAxiosError=cS,Nn.mergeConfig=$s,Nn.AxiosHeaders=Xr,Nn.formToJSON=t=>um(Ce.isHTMLForm(t)?new FormData(t):t),Nn.getAdapter=Cm.getAdapter,Nn.HttpStatusCode=Th,Nn.default=Nn;const{Axios:jB,AxiosError:WB,CanceledError:zB,isCancel:HB,CancelToken:UB,VERSION:VB,all:qB,Cancel:KB,isAxiosError:GB,spread:YB,toFormData:XB,AxiosHeaders:QB,HttpStatusCode:ZB,formToJSON:JB,getAdapter:ej,mergeConfig:tj}=Nn,Rh=Nn.create({baseURL:location.origin,timeout:6e4,params:{}});Rh.interceptors.response.use(t=>t,t=>{var e,n,r,u,d,p,w,f,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 h=`HTTP ${t.response.status} - `;(e=t.response)!=null&&e.statusText&&(h+=`${t.response.statusText} `),(r=(n=t.response)==null?void 0:n.config)!=null&&r.data&&(h+=`${t.response.config.data} `),(d=(u=t.response)==null?void 0:u.data)!=null&&d.message?h+=`${t.response.data.message}`:(w=(p=t.response)==null?void 0:p.data)!=null&&w.exception?h+=`${t.response.data.exception}`:(i=(g=(f=t.response)==null?void 0:f.data)==null?void 0:g.error)!=null&&i.message?(t.response.data.error.class&&(h+=`${t.response.data.error.class} `),h+=`${t.response.data.error.message}`):h+=`${(a=t.response)==null?void 0:a.data}`;const{$cosmosNotify:c}=window;throw c&&c.serious({title:"Network error",body:h}),t}else throw t});const xc=async function(t,e,{data:n,params:r={},headers:u,noAuth:d=!1,noScope:p=!1,onUploadProgress:w=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}u.Authorization=localStorage.openc3Token}return u.manual=!0,!p&&!r.scope&&(r.scope=window.openc3Scope),Rh({method:t,url:e,data:n,params:r,headers:u,onUploadProgress:w})},Lh={Accept:"application/json"},Am={...Lh,"Content-Type":"application/json"},nj=Fi("D",{get:function(t,{params:e,headers:n=Lh,noScope:r,noAuth:u,onUploadProgress:d}={}){return xc("get",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})},put:function(t,{data:e,params:n,headers:r=Am,noScope:u,noAuth:d,onUploadProgress:p}={}){return xc("put",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},post:function(t,{data:e,params:n,headers:r=Am,noScope:u,noAuth:d,onUploadProgress:p}={}){return xc("post",t,{data:e,params:n,headers:r,noScope:u,noAuth:d,onUploadProgress:p})},delete:function(t,{params:e,headers:n=Lh,noScope:r,noAuth:u,onUploadProgress:d}={}){return xc("delete",t,{params:e,headers:n,noScope:r,noAuth:u,onUploadProgress:d})}});let kc=()=>({emit(t,...e){for(let n=this.events[t]||[],r=0,u=n.length;r<u;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(u=>e!==u)}}});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 Oh extends ol{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class uS 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 hS extends Wi{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Tm(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 dS{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:u})=>(n[r]=u,n),{})}}const Es=Symbol("state");class Rm{constructor(e={}){this.emitter=kc(),this.params=Object.freeze(e),this.presence=new dS(this),this.initialConnect=!0,this[Es]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Tm({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[Es]}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[Es]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[Es]="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[Es]="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[Es]="disconnected",this.presence.reset(),this.emit("disconnect",e))}closed(e){this.state!=="closed"&&(this[Es]="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,(...u)=>{r(),n(...u)});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(u=>u()),e()})),r.push(this.on("close",u=>{r.forEach(d=>d()),n(u||new ol("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class pS{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},u=this._pendingTop;return this._pendings.push(r),u&&await u.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 fS{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 gS{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new fS),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:n,unsubscribe:r}){let u=this._subscriptions[e]=new pS(e);return u.remoteId=this._localToRemote[e],u.subscriber=n,u.unsubscriber=r,u.gvl=this.glv,u}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 mS{constructor(e={}){this.subscriptions=new gS(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 u=this._remoteToLocal[e];if(!u){this._pendingMessages.push([e,n,r]);return}let d=this.subscriptions.get(u);d&&d.channels.forEach(p=>{p.receive(n,r)})}notify(e,n,r){let u=this._remoteToLocal[e];if(!u)return;let d=this.subscriptions.get(u);d&&d.channels.forEach(p=>p.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 Lm={debug:0,info:1,warn:2,error:3};class Om{constructor(e){this.level=e||"warn"}log(e,n,r){Lm[e]<Lm[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 Om{writeLogEntry(){}}class yS{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let vS=0;class Im{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 u=Tm(r);if(this.pendingUnsubscriptions[u]){let p=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${p}`,u),new Promise(w=>{setTimeout(()=>{w(this.subscribe(e,n))},p)})}if(this.pendingSubscriptions[u])return this.logger.warn("subscription is already pending, skipping",u),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((p,w)=>{let f=++vS;this.pendingSubscriptions[u]={resolve:p,reject:w,id:f},this.cable.send(this.buildSubscribeRequest(u)),this.maybeRetrySubscribe(f,u,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,n,r){setTimeout(()=>{let u=this.pendingSubscriptions[n];u&&u.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 u=this.pendingSubscriptions[n];u&&u.id===e&&(delete this.pendingSubscriptions[n],u.reject(new uS(`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:u,reason:d,reconnect:p}=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),p===!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 Oh)):this.logger.error("subscription not found",{type:n,identifier:r})}if(u)return{identifier:r,message:u};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 Nm=()=>Date.now()/1e3|0;class wS extends Im{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=Nm()),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:u}=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=Nm()),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 p of d)this.cable.send({identifier:p,command:"history",history:this.historyRequestFor(p)}),this.presenceInfo[p]&&this.cable.send({identifier:p,command:"join",presence:this.presenceInfo[p]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(n==="presence"){let d=u.type;if(d==="info"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.resolve(u))}else if(d==="error"){let p=this.pendingPresence[r];p&&(delete this.pendingPresence[r],p.reject(new Error("failed to retrieve presence")))}return{type:n,identifier:r,message:u}}if(u){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:u,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 u=this.presenceInfo[e];return u&&(n.presence=u),n}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let n={},r=!1;if(this.subscriptionStreams[e])for(let u of this.subscriptionStreams[e]){let d=this.streamsPositions[u];d&&(r=!0,n[u]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:n}}trackStreamPosition(e,n,r,u){if(!(!n||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(n),this.streamsPositions[n]={epoch:r,offset:u},{stream:n,epoch:r,offset:u}}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,u)=>{this.pendingPresence[e]={resolve:r,reject:u},this.cable.send({command:"presence",identifier:e,data:n})})}}class bS extends ol{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Ih extends Rm{constructor(e,n){super(n),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}cc(Ih,"identifier","__ghost__");const xS="$pubsub";class Nh extends Rm{async perform(e,n){if(e.startsWith("$"))return super.perform(e,n);throw Error("not implemented")}}cc(Nh,"identifier",xS);const As=Symbol("state");let kS=class{constructor({transport:t,protocol:e,encoder:n,logger:r,lazy:u,hubOptions:d,performFailures:p,transportConfigurator:w}){this.emitter=kc(),this.transport=t,this.encoder=n,this.logger=r||new sl,this.protocol=e,this.performFailures=p||"throw",this.protocol.attached(this),this.hub=new mS(d||{}),this[As]="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,u===!1&&this.connect().catch(()=>{})}get state(){return this[As]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let t=this.state==="idle";this[As]="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[As]="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[As]="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[As]="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[As]="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:u,message:d,meta:p}=n;r?this.hub.notify(u,r,d):this.hub.transmit(u,d,p)}}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 Nh({stream_name:t});return this.subscribe(e)}streamFromSigned(t){let e=new Nh({signed_stream_name:t});return this.subscribe(e)}subscribeTo(t,e){let n,r;return typeof t=="string"&&(r=t,t=Ih),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 u=await t.acquire("subscribed");if(u.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),u.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),t.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),u.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),u.release();return}if(t.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),t.notify("connected"),u.release();return}let d={identifier:e,params:n};this.logger.debug("subscribing",d);try{let p=await this.protocol.subscribe(e,n);this.hub.subscribe(r,p),this.logger.debug("subscribed",{...d,remoteId:p}),t.notify("connected")}catch(p){if(p){if(p instanceof Oh&&this.logger.warn("rejected",d),p instanceof Wi){this.logger.debug("disconnected during subscription; will retry on connect",d),u.release();return}this.logger.error("failed to subscribe",{error:p,...d})}t.close(p),this.hub.unsubscribe(r)}u.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(u){u&&(u instanceof Wi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:u}):this.logger.error("unsubscribe failed",{id:e,error:u}))}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 bS;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 u=r.remoteId,d={id:u,action:e,payload:n};this.logger.debug("perform",d);try{let p=await this.protocol.perform(u,e,n);return p&&this.logger.debug("perform result",{message:p,request:d}),p}catch(p){throw this.logger.error("perform failed",{error:p,request:d}),p}}on(t,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(u=>u()),e(r)})),n.push(this.on("disconnect",r=>{n.forEach(u=>u()),e(r)}))}),this._pendingConnect)}};const _S={maxMissingPings:2,maxReconnectAttempts:1/0},pa=()=>Date.now(),Dm=(t,e)=>{e=e||{};let{backoffRate:n,jitterRatio:r,maxInterval:u}=e;return n=n||2,r===void 0&&(r=.5),d=>{let p=t*n**d,w=p*n,f=p+(w-p)*Math.random(),g=2*(Math.random()-.5)*r;return f=f*(1+g),u&&u<f&&(f=u),f}};let Pm=class{constructor({pingInterval:t,...e}){if(this.pingInterval=t,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${t}`);if(e=Object.assign({},_S,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 hS))}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 CS{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,(...u)=>{r(),n(...u)});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 SS{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:u,subprotocol:d,authStrategy:p}=n;this.format=u||"text",this.connectionOptions=n.websocketOptions,this.authStrategy=p||"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 u=[];u.push(this.once("open",()=>{u.forEach(d=>d()),n()})),u.push(this.once("close",()=>{u.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 u=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(u)}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(u=>u.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,(...u)=>{r(),n(...u)});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 Fm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function $S(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({},Fm,e);let{protocol:n,websocketImplementation:r,websocketFormat:u,websocketOptions:d,websocketAuthStrategy:p,fallbacks:w,logLevel:f,logger:g,transport:i,encoder:a,lazy:h,monitor:c,pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:b,subprotocol:k,tokenRefresher:T,historyTimestamp:E,protocolOptions:_,concurrentSubscribes:x,performFailures:R,transportConfigurator:I,auth:O}=e;if(g=g||new sl(f),typeof n=="string"){k=k||n;let F=n.substring(0,n.lastIndexOf("-")),N=n.substring(n.lastIndexOf("-")+1);if(_=_||{},F==="actioncable-v1")n=new Im({logger:g,..._});else if(F==="actioncable-v1-ext")n=new wS({logger:g,historyTimestamp:E,..._});else throw Error(`Protocol is not supported yet: ${n}`);if(N==="json")a=a||new yS,u=u||"text";else if(N==="msgpack"){if(u="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(N==="protobuf"){if(u=u||"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 SS(t,{websocketImplementation:r,websocketOptions:d,subprotocol:k,authStrategy:p,format:u}),w&&(i=new CS([i,...w],{logger:g})),O&&O.token&&i.setToken(O.token,O.param||"jid"),l=l||Dm(o),c!==!1&&(c=c||new Pm({pingInterval:o,reconnectStrategy:l,maxMissingPings:m,maxReconnectAttempts:b,logger:g}));let L={concurrentSubscribes:x},W=new kS({protocol:n,transport:i,encoder:a,logger:g,lazy:h,hubOptions:L,performFailures:R,transportConfigurator:I});return c&&(c.watch(W),W.monitor=c),T&&MS(W,async()=>{try{await T(i)}catch(F){return g.error("Failed to refresh authentication token: "+F),!1}return W.connect().catch(()=>{}),!0}),W}function MS(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 ES{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 AS extends Ih{constructor(e,n,r){super(e,n),this.subscription=new ES(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:u})=>this.subscription.notify("connected",{reconnected:u})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",u=>this.subscription.notify("received",u)),this.on("close",u=>{u&&u instanceof Oh?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class TS{constructor(e){this.cable=e}create(e,n){let r,u;typeof e=="object"?(r=e.channel,delete e.channel,u=e):(r=e,u={});let d=new AS(r,u,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 RS{constructor(e){this.cable=e,this.subscriptions=new TS(e)}}class LS extends Om{writeLogEntry(e,n,r){r?console[e](n,r):console[e](n)}}class OS extends Pm{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=u=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:u})},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 IS=["cable","action-cable"],NS="/cable",_c=(t,e)=>{for(let n of IS){let r=t.head.querySelector(`meta[name='${n}-${e}']`);if(r)return r.getAttribute("content")}},Bm=t=>t.match(/wss?:\/\//)?t:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${t}`:t,DS=()=>{if(typeof document<"u"&&document.head){let t=_c(document,"url");if(t)return Bm(t)}return Bm(NS)},PS=()=>{if(typeof document<"u"&&document.head){let t=_c(document,"history-timestamp");if(t)return t|0}},FS=()=>{if(typeof document<"u"&&document.head)return _c(document,"token")},BS=()=>{if(typeof document<"u"&&document.head)return _c(document,"token-param")};function jS(t,e){typeof t=="object"&&typeof e>"u"&&(e=t,t=void 0),t=t||DS(),e=e||{},e.historyTimestamp||(e.historyTimestamp=PS());let n=FS();if(n){let g=BS();e.auth=Object.assign({token:n,param:g},e.auth||{})}e=Object.assign({},Fm,e);let{logLevel:r,logger:u,pingInterval:d,reconnectStrategy:p,maxMissingPings:w,maxReconnectAttempts:f}=e;return u=e.logger=e.logger||new LS(r),p=e.reconnectStrategy=e.reconnectStrategy||Dm(d),e.monitor!==!1&&(e.monitor=e.monitor||new OS({pingInterval:d,reconnectStrategy:p,maxMissingPings:w,maxReconnectAttempts:f,logger:u})),$S(t,e)}function WS(t,e){let n=jS(t,e);return new RS(n)}class zS{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={},u={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let p=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);p=new URL(p,document.baseURI).href,this._cable=WS(p)}return this._cable.subscriptions.create({channel:e,...u},r)})}recordPing(){}}Fi("N",zS);class HS{constructor(e,n,r="",u=""){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=u}}Fi("x",HS);function Cc(t){return US.test(t)}const US=/^-?[0-9]+$/;function jm(t){return VS.test(t)}const VS=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Wm(t,e){const n=Number.parseFloat(t),r=String(n);if(t===r)return!0;const u=zm(t),d=zm(r);return!!(u===d||(e==null?void 0:e.approx)===!0&&!Cc(t)&&d.length>=14&&u.startsWith(d.substring(0,14)))}let al=function(t){return t.underflow="underflow",t.overflow="overflow",t.truncate_integer="truncate_integer",t.truncate_float="truncate_float",t}({});function qS(t){if(Wm(t,{approx:!1}))return;if(Cc(t))return al.truncate_integer;const e=Number.parseFloat(t);return Number.isFinite(e)?e===0?al.underflow:al.truncate_float:al.overflow}function zm(t){const{start:e,end:n}=KS(t),r=t.substring(e,n),u=r.indexOf(".");return u===-1?r:r.substring(0,u)+r.substring(u+1)}function KS(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 GS{constructor(e){if(cc(this,"isLosslessNumber",!0),!jm(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=qS(this.value);if(e===void 0||e===al.truncate_float)return Number.parseFloat(this.value);if(Cc(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 YS(t){return t&&typeof t=="object"&&t.isLosslessNumber||!1}function XS(t){return new GS(t)}function QS(t,e){return Dh({"":t},"",t,e)}function Dh(t,e,n,r){return Array.isArray(n)?r.call(t,e,JS(n,r)):n&&typeof n=="object"&&!YS(n)?r.call(t,e,ZS(n,r)):r.call(t,e,n)}function ZS(t,e){for(const n of Object.keys(t)){const r=Dh(t,n,t[n],e);r!==void 0?t[n]=r:delete t[n]}return t}function JS(t,e){for(let n=0;n<t.length;n++)t[n]=Dh(t,String(n),t[n],e);return t}function e$(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:XS,r=0;const u=w();return o(u),m(),e?QS(u,e):u;function d(){if(t.charCodeAt(r)===s$){r++,g();const $={};let C=!0;for(;r<t.length&&t.charCodeAt(r)!==Um;){C?C=!1:(h(),g());const D=r,z=i();if(z===void 0){T();return}g(),c();const U=w();if(U===void 0){O();return}Object.prototype.hasOwnProperty.call($,z)&&!Ph(U,$[z])&&E(z,D+1),$[z]=U}return t.charCodeAt(r)!==Um&&_(),r++,$}}function p(){if(t.charCodeAt(r)===a$){r++,g();const $=[];let C=!0;for(;r<t.length&&t.charCodeAt(r)!==Vm;){C?C=!1:h();const D=w();l(D),$.push(D)}return t.charCodeAt(r)!==Vm&&x(),r++,$}}function w(){g();const $=i()??a()??d()??p()??f("true",!0)??f("false",!1)??f("null",null);return g(),$}function f($,C){if(t.slice(r,r+$.length)===$)return r+=$.length,C}function g(){for(;t$(t.charCodeAt(r));)r++}function i(){if(t.charCodeAt(r)===Fh){r++;let $="";for(;r<t.length&&t.charCodeAt(r)!==Fh;){if(t.charCodeAt(r)===o$){const C=t[r+1],D=i$[C];D!==void 0?($+=D,r++):C==="u"?Sc(t.charCodeAt(r+2))&&Sc(t.charCodeAt(r+3))&&Sc(t.charCodeAt(r+4))&&Sc(t.charCodeAt(r+5))?($+=String.fromCharCode(Number.parseInt(t.slice(r+2,r+6),16)),r+=5):L(r):I(r)}else r$(t.charCodeAt(r))?$+=t[r]:R(t[r]);r++}return k(),r++,$}}function a(){const $=r;if(t.charCodeAt(r)===qm&&(r++,b($)),t.charCodeAt(r)===Bh)r++;else if(n$(t.charCodeAt(r)))for(r++;$c(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===g$)for(r++,b($);$c(t.charCodeAt(r));)r++;if(t.charCodeAt(r)===b$||t.charCodeAt(r)===w$)for(r++,(t.charCodeAt(r)===qm||t.charCodeAt(r)===d$)&&r++,b($);$c(t.charCodeAt(r));)r++;if(r>$)return n(t.slice($,r))}function h(){if(t.charCodeAt(r)!==f$)throw new SyntaxError(`Comma ',' expected after value ${N()}`);r++}function c(){if(t.charCodeAt(r)!==m$)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 C=t.slice($,r);throw new SyntaxError(`Invalid number '${C}', expecting a digit ${N()}`)}}function k(){if(t.charCodeAt(r)!==Fh)throw new SyntaxError(`End of string '"' expected ${N()}`)}function T(){throw new SyntaxError(`Quoted object key expected ${N()}`)}function E($,C){throw new SyntaxError(`Duplicate key '${$}' encountered at position ${C}`)}function _(){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 C=t.slice($,$+2);throw new SyntaxError(`Invalid escape character '${C}' ${W()}`)}function O(){throw new SyntaxError(`Object value expected after ':' ${W()}`)}function L($){const C=t.slice($,$+6);throw new SyntaxError(`Invalid unicode character '${C}' ${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 t$(t){return t===l$||t===c$||t===u$||t===h$}function Sc(t){return t>=Bh&&t<=jh||t>=y$&&t<=x$||t>=v$&&t<=k$}function $c(t){return t>=Bh&&t<=jh}function n$(t){return t>=p$&&t<=jh}function r$(t){return t>=32&&t<=1114111}function Ph(t,e){return t===e?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>Ph(n,e[r])):Hm(t)&&Hm(e)?[...new Set([...Object.keys(t),...Object.keys(e)])].every(n=>Ph(t[n],e[n])):!1}function Hm(t){return typeof t=="object"&&t!==null}const i$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1404
+ `,r:"\r",t:" "},o$=92,s$=123,Um=125,a$=91,Vm=93,l$=32,c$=10,u$=9,h$=13,Fh=34,d$=43,qm=45,Bh=48,p$=49,jh=57,f$=44,g$=46,m$=58,y$=65,v$=97,w$=69,b$=101,x$=70,k$=102;function Km(t,e,n,r){return u(t);function u(f,g){if(Array.isArray(r)){const i=r.find(a=>a.test(f));if(i){const a=i.stringify(f);if(typeof a!="string"||!jm(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 f=="boolean"||typeof f=="number"||typeof f=="string"||f===null||f instanceof Date||f instanceof Boolean||f instanceof Number||f instanceof String)return JSON.stringify(f);if(f!=null&&f.isLosslessNumber||typeof f=="bigint")return f.toString();if(Array.isArray(f))return d(f);if(f&&typeof f=="object")return p(f)}function d(f,g){if(f.length===0)return"[]";let i="[";for(let a=0;a<f.length;a++){const h=f[a];typeof h<"u"&&typeof h!="function"?i+=u(h):i+="null",a<f.length-1&&(i+=",")}return i+="]",i}function p(f,g){if(typeof f.toJSON=="function")return Km(f.toJSON(),e,n,void 0);const i=Array.isArray(e)?e.map(String):Object.keys(f);if(i.length===0)return"{}";let a=!0,h="{";for(const c of i){const o=f[c];if(w(c,o)){a?a=!1:h+=",";const l=JSON.stringify(c);h+=`${l}:`,h+=u(o)}}return h+="}",h}function w(f,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function _$(t){return Cc(t)&&!Wm(t)?BigInt(t):parseFloat(t)}class Gm{constructor(){cc(this,"id",1)}async exec(e,n,r={},u={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,u.manual=!0,(await Rh.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",...u},timeout:d,transformRequest:[(p,w)=>Km(p)],transformResponse:[p=>e$(p,void 0,_$)]})).data.result}catch(p){let w=new Error;throw p.response?(w.name=p.response.data.error.data.class,w.message=p.response.data.error.data.message,w.object=p.response.data.error):p.request?(w.name="Request error",w.message="Request error, no response received"):w=p,w}}decode_openc3_type(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,u=30){const d=await this.exec("get_tlm_packet",[e,n],{type:r,stale_time:u});if(d!=null){let p=d.length,w=null;for(let f=0;f<p;f++)w=this.decode_openc3_type(d[f][1]),w!==null&&(d[f][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,u=null,d=null){let p={stale_time:n};r!==null&&(p.cache_timeout=r),u!==null&&(p.start_time=u.toISOString()),d!==null&&(p.end_time=d.toISOString());const w=await this.exec("get_tlm_values",[e],p,{},1e4);if(w&&w.length>0){let f=w[0].length,g=null;for(let i=0;i<f;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,u="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:u});let p=this.decode_openc3_type(d);return p!==null&&(d=p),d}async inject_tlm(e,n,r=null,u="CONVERTED"){await this.exec("inject_tlm",[e,n,r],{type:u})}set_tlm(e,n,r,u){return this.exec("set_tlm",[e,n,r],{type:u})}override_tlm(e,n,r,u){return this.exec("override_tlm",[e,n,r],{type:u})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,n,r,u){return this.exec("normalize_tlm",[e,n,r],{type:u})}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,u="CONVERTED"){return this.exec("get_cmd_value",[e,n,r,u])}get_cmd_buffer(e,n){return this.exec("get_cmd_buffer",[e,n])}_cmd(e,n,r,u,d){let p=null;for(let w in u)Object.prototype.hasOwnProperty.call(u,w)&&(p=this.encode_openc3_type(u[w]),p!==null&&(u[w]=p));return this.exec(e,[n,r,u],{},d)}get_cmd_hazardous(e,n,r,u={}){return n===void 0?this.exec("get_cmd_hazardous",e,{},u):this._cmd("get_cmd_hazardous",e,n,r,u)}cmd(e,n,r,u={}){return n===void 0?this.exec("cmd",e,{},u):this._cmd("cmd",e,n,r,u)}cmd_no_range_check(e,n,r,u={}){return n===void 0?this.exec("cmd_no_range_check",e,{},u):this._cmd("cmd_no_range_check",e,n,r,u)}cmd_raw(e,n,r,u={}){return n===void 0?this.exec("cmd_raw",e,{},u):this._cmd("cmd_raw",e,n,r,u)}cmd_raw_no_range_check(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_range_check",e,{},u):this._cmd("cmd_raw_no_range_check",e,n,r,u)}cmd_no_hazardous_check(e,n,r,u={}){return n===void 0?this.exec("cmd_no_hazardous_check",e,{},u):this._cmd("cmd_no_hazardous_check",e,n,r,u)}cmd_no_checks(e,n,r,u={}){return n===void 0?this.exec("cmd_no_checks",e,{},u):this._cmd("cmd_no_checks",e,n,r,u)}cmd_raw_no_hazardous_check(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_hazardous_check",e,{},u):this._cmd("cmd_raw_no_hazardous_check",e,n,r,u)}cmd_raw_no_checks(e,n,r,u={}){return n===void 0?this.exec("cmd_raw_no_checks",e,{},u):this._cmd("cmd_raw_no_checks",e,n,r,u)}build_cmd(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}build_command(e,n,r){return n===void 0?this.exec("build_cmd",e):this._cmd("build_cmd",e,n,r)}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),u=new Uint8Array(r);return Array.from(u).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Fi("P",Gm);var Ym={exports:{}},Xm;function C$(){return Xm||(Xm=1,function(t,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(n,r,u){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),C=/(?:(\s+)|(\s+)(\S+))$/.exec(F),D=0,z=0;if(C&&!C[2]&&(D=L-C[1].length,z=L),$&&!$[2]&&(D||(D=L),z=L+$[1].length),D)return{start:D,end:z};if(C&&C[2]&&C.index>W)return{start:C.index,end:C.index+C[2].length};if($&&$[2])return D=L+$[2].length,{start:D,end:D+$[3].length}}}for(var h=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>h){var k=a(b,h,5);if(k){var T=/^\s*/.exec(b)[0];m.replace(new w(o,k.start,o,k.end),`
1405
+ `+T)}l++}else if(c&&/\S/.test(b)&&o!=l){var E=m.getLine(o+1);if(E&&/\S/.test(E)){var _=b.replace(/\s+$/,""),x=E.replace(/^\s+/,""),R=_+" "+x,k=a(R,h,5);if(k&&k.start>_.length||R.length<h){var I=new w(o,_.length,o+1,E.length-x.length);m.replace(I," "),o--,l--}else _.length<b.length&&m.remove(new w(o,_.length,o,b.length))}}o++}}function p(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 h=i.session.$undoManager.$lastDelta;d(i,{startRow:a.row,endRow:a.row,allowMerge:!1}),h!=i.session.$undoManager.$lastDelta&&i.session.markUndoGroup()}}var w=n("../range").Range,f=n("../editor").Editor;n("../config").defineOptions(f.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",p):this.commands.off("afterExec",p)},value:!1}}),r.hardWrap=d}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(n,r,u){function d(v){return{row:v.line,column:v.ch}}function p(v){return new De(v.row,v.column)}function w(v,M,S){if(M.line===S.line&&M.ch>=S.ch-1){var P=v.getLine(M.line),B=P.charCodeAt(M.ch);55296<=B&&B<=55551&&(S.ch+=1)}return{start:M,end:S}}function f(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 M=v.state.vim;return M.onPasteFn||(M.onPasteFn=function(){M.insertMode||(v.setCursor(ge(v.getCursor(),0,1)),Rn.enterInsertMode(v,{},M))}),M.onPasteFn}function a(v,M){return M>=v.firstLine()&&M<=v.lastLine()}function h(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 k(v,M){for(var S=0;S<M.length;S++)if(M[S]==v)return!0;return!1}function T(v,M,S,P,B){if(M===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(S||(S="string"),Ft[v]={type:S,defaultValue:M,callback:B},P)for(var j=0;j<P.length;j++)Ft[P[j]]=Ft[v];M&&E(v,M)}function E(v,M,S,P){var B=Ft[v];P=P||{};var j=P.scope;if(!B)return new Error("Unknown option: "+v);if(B.type=="boolean"){if(M&&M!==!0)return new Error("Invalid argument: "+v+"="+M);M!==!1&&(M=!0)}B.callback?(j!=="local"&&B.callback(M,void 0),j!=="global"&&S&&B.callback(M,S)):(j!=="local"&&(B.value=B.type=="boolean"?!!M:M),j!=="global"&&S&&(S.state.vim.options[v]={value:M}))}function _(v,M,S){var P=Ft[v];S=S||{};var B=S.scope;if(!P)return new Error("Unknown option: "+v);if(P.callback){var j=M&&P.callback(void 0,M);return B!=="global"&&j!==void 0?j:B!=="local"?P.callback():void 0}var j=B!=="global"&&M&&M.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=An()}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:Ai(),macroModeState:new x,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new G({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var v in Ft){var M=Ft[v];M.value=M.defaultValue}}function O(v){function M(Y){typeof Y=="string"?mn.value=Y:mn=null}if(v[0]=="<"){var S=v.toLowerCase().slice(1,-1),P=S.split("-");if(S=P.pop()||"",S=="lt")v="<";else if(S=="space")v=" ";else if(S=="cr")v=`
1406
+ `;else if(Ti[S]){var B=mn.value,j={key:Ti[S],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};mn.onKeyDown&&mn.onKeyDown(j,mn.value,M),mn&&mn.onKeyUp&&mn.onKeyUp(j,mn.value,M);return}}if(v==`
1407
+ `){var q=mn;mn=null,q.onClose&&q.onClose(q.value)}else mn.value=(mn.value||"")+v}function L(v,M,S){var P=on;if(S){if(jr.indexOf(S)!=-1)return;jr.push(S),on=S.noremap!=0}try{for(var B=R(v),j=/<(?:[CSMA]-)*\w+>|./gi,q;q=j.exec(M);){var Y=q[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(Ti.hasOwnProperty(se)){Y=Ti[se],ss(v,Y);continue}Y=Y[0],j.lastIndex=q.index+1}}v.replaceSelection(Y)}}}finally{if(jr.pop(),on=jr.length?P:!1,!jr.length&&mn){var ke=mn;mn=null,Ar(v,ke)}}}function W(v,M){var S=v.key;if(!Wr[S]){S.length>1&&S[0]=="n"&&(S=S.replace("Numpad","")),S=Zn[S]||S;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||S.length>1)&&v.shiftKey&&(P+="S-"),M&&!M.expectLiteralNext&&S.length==1){if(zn.keymap&&S in zn.keymap)(zn.remapCtrl!=0||!P)&&(S=zn.keymap[S]);else if(S.charCodeAt(0)>255){var B=v.code&&v.code.slice(-1)||"";v.shiftKey||(B=B.toLowerCase()),B&&(S=B)}}return P+=S,P.length>1&&(P="<"+P+">"),P}}function F(v,M){zn.string!==v&&(zn=N(v)),zn.remapCtrl=M}function N(v){function M(P){return P.split(/\\?(.)/).filter(Boolean)}var S={};return v?(v.split(/((?:[^\\,]|\\.)+),/).map(function(P){if(P){var B=P.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var j=M(B[1]),q=M(B[2]);if(j.length!==q.length)return;for(var Y=0;Y<j.length;++Y)S[j[Y]]=q[Y]}else if(B.length==1){var Q=M(P);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)S[Q[Y]]=Q[Y+1]}}}),{keymap:S,string:v}):{keymap:S,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 C(v,M){v.state.vim.inputState=new $,v.state.vim.expectLiteralNext=!1,Be.signal(v,"vim-command-done",M)}function D(){this.removed=[],this.inserted=""}function z(v,M,S){this.clear(),this.keyBuffer=[v||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!M,this.blockwise=!!S}function U(v,M){var S=We.registerController.registers;if(!v||v.length!=1)throw Error("Register name must be 1 character");S[v]=M,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,M){ri[v]=M}function he(v,M){for(var S=[],P=0;P<M;P++)S.push(v);return S}function ne(v,M){us[v]=M}function le(v,M){Rn[v]=M}function ue(v,M,S){var P=v.state.vim,B=P.insertMode||P.visualMode,j=Math.min(Math.max(v.firstLine(),M.line),v.lastLine()),q=v.getLine(j),Y=q.length-1+ +!!B,Q=Math.min(Math.max(0,M.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;S&&S.line==j&&S.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new De(j,Q)}function ce(v){var M={};for(var S in v)v.hasOwnProperty(S)&&(M[S]=v[S]);return M}function ge(v,M,S){return typeof M=="object"&&(S=M.ch,M=M.line),new De(v.line+M,v.ch+S)}function Ee(v,M,S,P){P.operator&&(S="operatorPending");for(var B,j=[],q=[],Y=on?M.length-No:0,Q=Y;Q<M.length;Q++){var re=M[Q];S=="insert"&&re.context!="insert"||re.context&&re.context!=S||P.operator&&re.type=="action"||!(B=Ae(v,re.keys))||(B=="partial"&&j.push(re),B=="full"&&q.push(re))}return{partial:j.length&&j,full:q.length&&q}}function Ae(v,M){var S=M.slice(-11)=="<character>",P=M.slice(-10)=="<register>";if(S||P){var B=M.length-(S?11:10),j=v.slice(0,B),q=M.slice(0,B);return j==q&&v.length>B?"full":q.indexOf(j)==0?"partial":!1}return v==M?"full":M.indexOf(v)==0?"partial":!1}function Re(v){var M=/^.*(<[^>]+>)$/.exec(v),S=M?M[1]:v.slice(-1);if(S.length>1)switch(S){case"<CR>":S=`
1409
+ `;break;case"<Space>":S=" ";break;default:S=""}return S}function Xe(v,M,S){return function(){for(var P=0;P<S;P++)M(v)}}function Ke(v){return new De(v.line,v.ch)}function dt(v,M){return v.ch==M.ch&&v.line==M.line}function rt(v,M){return v.line<M.line?!0:v.line==M.line&&v.ch<M.ch}function gt(v,M){return arguments.length>2&&(M=gt.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,M)?v:M}function tn(v,M){return arguments.length>2&&(M=tn.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(v,M)?M:v}function Bn(v,M,S){var P=rt(v,M),B=rt(M,S);return P&&B}function Zt(v,M){return v.getLine(M).length}function hi(v){return v.trim?v.trim():v.replace(/^\s+|\s+$/g,"")}function kn(v){return v.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xn(v,M,S){var P=Zt(v,M),B=new Array(S-P+1).join(" ");v.setCursor(new De(M,P)),v.replaceRange(B,v.getCursor())}function ur(v,M){var S=[],P=v.listSelections(),B=Ke(v.clipPos(M)),j=!dt(M,B),q=v.getCursor("head"),Y=vt(P,q),Q=dt(P[Y].head,P[Y].anchor),re=P.length-1,se=re-Y>Y?re:0,ve=P[se].anchor,ke=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=ke;st<=me;st++){var Ye={anchor:new De(st,we),head:new De(st,Ne)};S.push(Ye)}return v.setSelections(S),M.ch=Ne,ve.ch=we,ve}function Fr(v,M,S){for(var P=[],B=0;B<S;B++){var j=ge(M,B,0);P.push({anchor:j,head:j})}v.setSelections(P,0)}function vt(v,M,S){for(var P=0;P<v.length;P++){var B=dt(v[P].anchor,M),j=dt(v[P].head,M);if(B||j)return P}return-1}function Ve(v,M){var S=M.lastSelection,P=function(){var j=v.listSelections(),q=j[0],Y=j[j.length-1],Q=rt(q.anchor,q.head)?q.anchor:q.head,re=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var j=v.getCursor(),q=v.getCursor(),Y=S.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new De(j.line+re,j.ch+Q);for(var se=[],ve=j.line;ve<q.line;ve++){var ke=new De(ve,j.ch),me=new De(ve,q.ch),we={anchor:ke,head:me};se.push(we)}v.setSelections(se)}else{var Ne=S.anchorMark.find(),Ie=S.headMark.find(),He=Ie.line-Ne.line,st=Ie.ch-Ne.ch;q={line:q.line+He,ch:He?q.ch:st+q.ch},S.visualLine&&(j=new De(j.line,0),q=new De(q.line,Zt(v,q.line))),v.setSelection(j,q)}return[j,q]};return M.visualMode?P():B()}function Vt(v,M){var S=M.sel.anchor,P=M.sel.head;M.lastPastedText&&(P=v.posFromIndex(v.indexFromPos(S)+M.lastPastedText.length),M.lastPastedText=null),M.lastSelection={anchorMark:v.setBookmark(S),headMark:v.setBookmark(P),anchor:Ke(S),head:Ke(P),visualMode:M.visualMode,visualLine:M.visualLine,visualBlock:M.visualBlock}}function gn(v,M,S,P){var B=v.state.vim.sel,j=P?M:B.head,q=P?M:B.anchor,Y;return rt(S,M)&&(Y=S,S=M,M=Y),rt(j,q)?(j=gt(M,j),q=tn(q,S)):(q=gt(M,q),j=tn(j,S),j=ge(j,0,-1),j.ch==-1&&j.line!=v.firstLine()&&(j=new De(j.line-1,Zt(v,j.line-1)))),[q,j]}function Qn(v,M,B){var P=v.state.vim;M=M||P.sel;var B=B||P.visualLine?"line":P.visualBlock?"block":"char",j=Br(v,M,B);v.setSelections(j.ranges,j.primary)}function Br(v,M,S,P){var B=Ke(M.head),j=Ke(M.anchor);if(S=="char"){var q=!P&&!rt(M.head,M.anchor)?1:0,Y=rt(M.head,M.anchor)?1:0;return B=ge(M.head,0,q),j=ge(M.anchor,0,Y),{ranges:[{anchor:j,head:B}],primary:0}}if(S=="line"){if(rt(M.head,M.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(S=="block"){var re=Math.min(j.line,B.line),se=j.ch,ve=Math.max(j.line,B.line),ke=B.ch;se<ke?ke+=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,ke)});return{ranges:Ne,primary:we}}}function $r(v){var M=v.getCursor("head");return v.getSelection().length==1&&(M=gt(M,v.getCursor("anchor"))),M}function _n(v,M){var S=v.state.vim;M!==!1&&v.setCursor(ue(v,S.sel.head)),Vt(v,S),S.visualMode=!1,S.visualLine=!1,S.visualBlock=!1,S.insertMode||Be.signal(v,"vim-mode-change",{mode:"normal"})}function ir(v,M,S){var P=v.getRange(M,S);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())S.line--,S.ch=0;j?(S.line--,S.ch=Zt(v,S.line)):S.ch=0}}function hr(v,M,S){M.ch=0,S.ch=0,S.line++}function nn(v){if(!v)return 0;var M=v.search(/\S/);return M==-1?v.length:M}function or(v,M,S){var P=M.inclusive,B=M.innerWord,j=M.bigWord,q=M.noSymbol,Y=M.multiline,Q=S||$r(v),re=v.getLine(Q.line),se=re,ve=Q.line,ke=ve,me=Q.ch,we,Ne=q?Do[0]:Ei[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=Ei[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,ke=we.line,se=v.getLine(ke),!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(ke,Ie)}}function $o(v,M,S){var P=M;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:P,end:P};var B=Be.findMatchingTag(v,M)||Be.findEnclosingTag(v,M);return!B||!B.open||!B.close?{start:P,end:P}:S?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Ki(v,M,S){dt(M,S)||We.jumpList.add(v,M,S)}function Gi(v,M){We.lastCharacterSearch.increment=v,We.lastCharacterSearch.forward=M.forward,We.lastCharacterSearch.selectedCharacter=M.selectedCharacter}function Yi(v,M,S,P){var B=Ke(v.getCursor()),j=S?1:-1,q=S?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:(S?{")":"(","}":"{"}:{"(":")","{":"}"})[P],forward:S,depth:0,curMoveThrough:!1},ve=gi[P];if(!ve)return B;var ke=mi[ve].init,me=mi[ve].isComplete;for(ke&&ke(se);Q!==q&&M;){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,M--)}return se.nextCh||se.curMoveThrough?new De(Q,se.index):B}function Mo(v,M,S,P,B){var j=M.line,q=M.ch,Y=v.getLine(j),Q=S?1:-1,re=P?Ei:Do;if(B&&Y==""){if(j+=Q,Y=v.getLine(j),!a(v,j))return null;q=S?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:j};for(var se=Q>0?Y.length:-1,ve=se,ke=se;q!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(q))){for(ve=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(ke=q,me=ve!=ke,ve==M.ch&&j==M.line&&ke==ve+Q)continue;return{from:Math.min(ve,ke+1),to:Math.max(ve,ke),line:j}}me||(q+=Q)}if(j+=Q,!a(v,j))return null;Y=v.getLine(j),q=Q>0?0:Y.length}}function yr(v,M,S,P,B,j){var q=Ke(M),Y=[];(P&&!B||!P&&B)&&S++;for(var Q=!P||!B,re=0;re<S;re++){var se=Mo(v,M,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),M=new De(se.line,P?se.to-1:se.from)}var ke=Y.length!=S,me=Y[0],we=Y.pop();return P&&!B?(!ke&&(me.from!=q.ch||me.line!=q.line)&&(we=Y.pop()),new De(we.line,we.from)):P&&B?new De(we.line,we.to-1):!P&&B?(!ke&&(me.to!=q.ch||me.line!=q.line)&&(we=Y.pop()),new De(we.line,we.to)):new De(we.line,we.from)}function Eo(v,M,S,P,B){var j=M,q=new De(j.line+S.repeat-1,1/0),Y=v.clipPos(q);return Y.ch--,B||(P.lastHPos=1/0,P.lastHSPos=v.charCoords(Y,"div").left),q}function Jo(v,M,S,P,B){for(var j=B||v.getCursor(),q=j.ch,Y,Q=0;Q<M;Q++){var re=v.getLine(j.line);if(Y=Tl(q,re,P,S),Y==-1)return null;q=Y}return new De(v.getCursor().line,Y)}function Al(v,M){var S=v.getCursor().line;return ue(v,new De(S,M-1))}function di(v,M,S,P){!k(S,wo)&&!qt.test(S)||(M.marks[S]&&M.marks[S].clear(),M.marks[S]=v.setBookmark(P))}function Tl(v,M,S,P,B){var j;return P?(j=M.indexOf(S,v+1),j!=-1):(j=M.lastIndexOf(S,v-1),j!=-1),j}function zs(v,M,S,P,B){function j(He){return!/\S/.test(v.getLine(He))}function q(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=M.line,re=v.firstLine(),se=v.lastLine(),ve,ke,me=Q;if(P){for(;re<=me&&me<=se&&S>0;)Y(me),q(me,P)&&S--,me+=P;return new De(me,0)}var we=v.state.vim;if(we.visualLine&&q(Q,1,!0)){var Ne=we.sel.anchor;q(Ne.line,-1,!0)&&(!B||Ne.line!=Q)&&(Q+=1)}var Ie=j(Q);for(me=Q;me<=se&&S;me++)q(me,1,!0)&&(!B||j(me)!=Ie)&&S--;for(ke=new De(me,0),me>se&&!Ie?Ie=!0:B=!1,me=Q;me>re&&!((!B||j(me)==Ie||me==Q)&&q(me,-1,!0));me--);return ve=new De(me,0),{start:ve,end:ke}}function Aa(v,M,S,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 q(re,se,ve,ke){var me=re.getLine(se),we={line:me,ln:se,pos:ve,dir:ke};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,ke){var me=re.getLine(se),we={line:me,ln:se,pos:ve,dir:ke};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:M.line,pos:M.ch};S>0;)P<0?Q=Y(v,Q.ln,Q.pos,P):Q=q(v,Q.ln,Q.pos,P),S--;return new De(Q.ln,Q.pos)}function Xi(v,M,S,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),ke=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(ke&&me.line!==""&&!m(me.line[me.pos]))return{ln:me.ln,pos:me.pos};b(me.line[me.pos])&&!ke&&(me.pos===me.line.length-1||m(me.line[me.pos+1]))&&(ke=!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 q(Q,re,se,ve){var Ne=Q.getLine(re),ke={line:Ne,ln:re,pos:se,dir:ve},me={ln:ke.ln,pos:null},we=ke.line==="";for(B(Q,ke);ke.line!==null;){if(ke.line===""&&!we)return me.pos!==null?me:{ln:ke.ln,pos:ke.pos};if(!(!b(ke.line[ke.pos])||me.pos===null||ke.ln===me.ln&&ke.pos+1===me.pos))return me;ke.line!==""&&!m(ke.line[ke.pos])&&(we=!1,me={ln:ke.ln,pos:ke.pos}),B(Q,ke)}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:M.line,pos:M.ch};S>0;)P<0?Y=q(v,Y.ln,Y.pos,P):Y=j(v,Y.ln,Y.pos,P),S--;return new De(Y.ln,Y.pos)}function jn(v,M,S,P){var B=M,j,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[S],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[S],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}),q=v.scanForBracket(new De(B.line,B.ch+se),1,void 0,{bracketRegex:Y}),!j||!q)return null;if(j=j.pos,q=q.pos,j.line==q.line&&j.ch>q.ch||j.line>q.line){var ve=j;j=q,q=ve}return P?q.ch+=1:j.ch+=1,{start:j,end:q}}function Mr(v,M,S,P){var B=Ke(M),j=v.getLine(B.line),q=j.split(""),Y,Q,re,se,ve=q.indexOf(S);if(B.ch<ve)B.ch=ve;else if(ve<B.ch&&q[B.ch]==S){var ke=/string/.test(v.getTokenTypeAt(ge(M,0,1))),me=/string/.test(v.getTokenTypeAt(M)),we=ke&&!me;we||(Q=B.ch,--B.ch)}if(q[B.ch]==S&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)q[re]==S&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==S&&(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 Cn(v){var M=v.state.vim;return M.searchState_||(M.searchState_=new Qi)}function Er(v){return Zi(v,"/")}function fo(v){return Hs(v,"/")}function Zi(v,M){var S=Hs(v,M)||[];if(!S.length)return[];var P=[];if(S[0]===0){for(var B=0;B<S.length;B++)typeof S[B]=="number"&&P.push(v.substring(S[B]+1,S[B+1]));return P}}function Hs(v,M){M||(M="/");for(var S=!1,P=[],B=0;B<v.length;B++){var j=v.charAt(B);!S&&j==M&&P.push(B),S=!S&&j=="\\"}return P}function Ta(v){for(var M="|(){",S="}",P=!1,B=[],j=-1;j<v.length;j++){var q=v.charAt(j)||"",Y=v.charAt(j+1)||"",Q=Y&&M.indexOf(Y)!=-1;P?((q!=="\\"||!Q)&&B.push(q),P=!1):q==="\\"?(P=!0,Y&&S.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(q)):(B.push(q),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Rl(v){for(var M=!1,S=[],P=-1;P<v.length;P++){var B=v.charAt(P)||"",j=v.charAt(P+1)||"";Ri[B+j]?(S.push(Ri[B+j]),P++):M?(S.push(B),M=!1):B==="\\"?(M=!0,o(j)||j==="$"?S.push("$"):j!=="/"&&j!=="\\"&&S.push("\\")):(B==="$"&&S.push("$"),S.push(B),j==="/"&&S.push("\\"))}return S.join("")}function Ll(v){for(var M=new Be.StringStream(v),S=[];!M.eol();){for(;M.peek()&&M.peek()!="\\";)S.push(M.next());var P=!1;for(var B in dr)if(M.match(B,!0)){P=!0,S.push(dr[B]);break}P||S.push(M.next())}return S.join("")}function Ji(v,M,S){var P=We.registerController.getRegister("/");if(P.setText(v),v instanceof RegExp)return v;var B=fo(v),j,q;if(!B.length)j=v;else{j=v.substring(0,B[0]);var Y=v.substring(B[0]);q=Y.indexOf("i")!=-1}if(!j)return null;_("pcre")||(j=Ta(j)),S&&(M=/^[^A-Z]*$/.test(j));var Q=new RegExp(j,M||q?"im":"m");return Q}function pi(v){typeof v=="string"&&(v=document.createElement(v));for(var M,S=1;S<arguments.length;S++)if(M=arguments[S])if(typeof M!="object"&&(M=document.createTextNode(M)),M.nodeType)v.appendChild(M);else for(var P in M)Object.prototype.hasOwnProperty.call(M,P)&&(P[0]==="$"?v.style[P.slice(1)]=M[P]:v.setAttribute(P,M[P]));return v}function Pt(v,M){var S=pi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},M);v.openNotification?v.openNotification(S,{bottom:!0,duration:5e3}):alert(S.innerText)}function Ra(v,M){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%"})),M&&pi("span",{$color:"#888"},M))}function Ar(v,M){if(jr.length){M.value||(M.value=""),mn=M;return}var S=Ra(M.prefix,M.desc);if(v.openDialog)v.openDialog(S,M.onClose,{onKeyDown:M.onKeyDown,onKeyUp:M.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:M.value});else{var P="";typeof M.prefix!="string"&&M.prefix&&(P+=M.prefix.textContent),M.desc&&(P+=" "+M.desc),M.onClose(prompt(P,""))}}function Wn(v,M){if(v instanceof RegExp&&M instanceof RegExp){for(var S=["global","multiline","ignoreCase","source"],P=0;P<S.length;P++){var B=S[P];if(v[B]!==M[B])return!1}return!0}return!1}function hn(v,M,S,P){if(M){var B=Cn(v),j=Ji(M,!!S,!!P);if(j)return Si(v,j),Wn(j,B.getQuery())||B.setQuery(j),j}}function En(v){if(v.source.charAt(0)=="^")var M=!0;return{token:function(S){if(M&&!S.sol()){S.skipToEnd();return}var P=S.match(v,!1);if(P)return P[0].length==0?(S.next(),"searching"):!S.sol()&&(S.backUp(1),!v.exec(S.next()+P[0]))?(S.next(),null):(S.match(v),"searching");for(;!S.eol()&&(S.next(),!S.match(v,!1)););},query:v}}function Si(v,M){clearTimeout(pr);var S=Cn(v);S.highlightTimeout=pr,pr=setTimeout(function(){if(v.state.vim){var P=Cn(v);P.highlightTimeout=null;var B=P.getOverlay();(!B||M!=B.query)&&(B&&v.removeOverlay(B),B=En(M),v.addOverlay(B),v.showMatchesOnScrollbar&&(P.getScrollbarAnnotate()&&P.getScrollbarAnnotate().clear(),P.setScrollbarAnnotate(v.showMatchesOnScrollbar(M))),P.setOverlay(B))}},50)}function Tr(v,M,S,P){return P===void 0&&(P=1),v.operation(function(){for(var B=v.getCursor(),j=v.getSearchCursor(S,B),q=0;q<P;q++){var Y=j.find(M);if(q==0&&Y&&dt(j.from(),B)){var Q=M?j.from():j.to();Y=j.find(M),Y&&!Y[0]&&dt(j.from(),Q)&&v.getLine(Q.line).length==Q.ch&&(Y=j.find(M))}if(!Y&&(j=v.getSearchCursor(S,M?new De(v.lastLine()):new De(v.firstLine(),0)),!j.find(M)))return}return j.from()})}function $i(v,M,S,P,B){return P===void 0&&(P=1),v.operation(function(){var j=v.getCursor(),q=v.getSearchCursor(S,j),Y=q.find(!M);!B.visualMode&&Y&&dt(q.from(),j)&&q.find(!M);for(var Q=0;Q<P;Q++)if(Y=q.find(M),!Y&&(q=v.getSearchCursor(S,M?new De(v.lastLine()):new De(v.firstLine(),0)),!q.find(M)))return;return[q.from(),q.to()]})}function es(v){var M=Cn(v);M.highlightTimeout&&(clearTimeout(M.highlightTimeout),M.highlightTimeout=null),v.removeOverlay(Cn(v).getOverlay()),M.setOverlay(null),M.getScrollbarAnnotate()&&(M.getScrollbarAnnotate().clear(),M.setScrollbarAnnotate(null))}function Us(v,M,S){return typeof v!="number"&&(v=v.line),M instanceof Array?k(v,M):typeof S=="number"?v>=M&&v<=S:v==M}function go(v){var M=v.ace.renderer;return{top:M.getFirstFullyVisibleRow(),bottom:M.getLastFullyVisibleRow()}}function ti(v,M,S){if(S=="'"||S=="`")return We.jumpList.find(v,-1)||new De(0,0);if(S==".")return Ao(v);var P=M.marks[S];return P&&P.find()}function Ao(v){if(v.getLastEditEnd)return v.getLastEditEnd();for(var M=v.doc.history.done,S=M.length;S--;)if(M[S].changes)return Ke(M[S].changes[0].to)}function ts(v,M,S,P,B,j,q,Y,Q){function re(){v.operation(function(){for(;!Ne;)se(),ke();me()})}function se(){var Ye=v.getRange(j.from(),j.to()),Je=Ye.replace(q,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 ke(){for(;ve()&&Us(j.from(),P,B);)if(!(!S&&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(),ke();break;case"n":ke();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(ke(),Ne){Pt(v,"No matches for "+q.source);return}if(!M){re(),Q&&Q();return}Ar(v,{prefix:pi("span","replace with ",pi("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function ni(v,M){var S=v.state.vim,P=We.macroModeState,B=We.registerController.getRegister("."),j=P.isPlaying,q=P.lastInsertModeChanges;j||(v.off("change",To),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=null,Be.off(v.getInputField(),"keydown",Gs)),!j&&S.insertModeRepeat>1&&(La(v,S,S.insertModeRepeat-1,!0),S.lastEditInputState.repeatOverride=S.insertModeRepeat),delete S.insertModeRepeat,S.insertMode=!1,M||v.setCursor(v.getCursor().line,v.getCursor().ch-1),v.setOption("keyMap","vim"),v.setOption("disableInput",!0),v.toggleOverwrite(!1),B.setText(q.changes.join("")),Be.signal(v,"vim-mode-change",{mode:"normal"}),P.isRecording&&sr(P)}function ns(v){Sn.unshift(v)}function Vs(v,M,S,P,B){var j={keys:v,type:M};j[M]=S,j[M+"Args"]=P;for(var q in B)j[q]=B[q];ns(j)}function qs(v,M,S,P){var B=We.registerController.getRegister(P);if(P==":"){B.keyBuffer[0]&&wr.processCommand(v,B.keyBuffer[0]),S.isPlaying=!1;return}var j=B.keyBuffer,q=0;S.isPlaying=!0,S.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"),M.insertMode){var ve=B.insertModeChanges[q++].changes;We.macroModeState.lastInsertModeChanges.changes=ve,as(v,ve,1),ni(v)}S.isPlaying=!1}function rs(v,M){if(!v.isPlaying){var S=v.latestRegister,P=We.registerController.getRegister(S);P&&P.pushText(M)}}function sr(v){if(!v.isPlaying){var M=v.latestRegister,S=We.registerController.getRegister(M);S&&S.pushInsertModeChanges&&S.pushInsertModeChanges(v.lastInsertModeChanges)}}function Ks(v,M){if(!v.isPlaying){var S=v.latestRegister,P=We.registerController.getRegister(S);P&&P.pushSearchQuery&&P.pushSearchQuery(M)}}function To(v,M){var S=We.macroModeState,P=S.lastInsertModeChanges;if(!S.isPlaying)for(var B=v.state.vim;M;){if(P.expectCursorActivityForChange=!0,P.ignoreCount>1)P.ignoreCount--;else if(M.origin=="+input"||M.origin=="paste"||M.origin===void 0){var j=v.listSelections().length;j>1&&(P.ignoreCount=j);var q=M.text.join(`
1411
+ `);if(P.maybeReset&&(P.changes=[],P.maybeReset=!1),q)if(v.state.overwrite&&!/\n/.test(q))P.changes.push([q]);else{if(q.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<q.length&&(P.changes.push([q,re]),q="")}}q&&P.changes.push(q)}}M=M.next}}function is(v){var M=v.state.vim;if(M.insertMode){var S=We.macroModeState;if(S.isPlaying)return;var P=S.lastInsertModeChanges;P.expectCursorActivityForChange?P.expectCursorActivityForChange=!1:(P.maybeReset=!0,M.insertEnd&&M.insertEnd.clear(),M.insertEnd=v.setBookmark(v.getCursor(),{insertLeft:!0}))}else v.curOp.isVimOp||os(v,M)}function os(v,M,S){var P=v.getCursor("anchor"),B=v.getCursor("head");if(M.visualMode&&!v.somethingSelected()?_n(v,!1):!M.visualMode&&!M.insertMode&&v.somethingSelected()&&(M.visualMode=!0,M.visualLine=!1,Be.signal(v,"vim-mode-change",{mode:"visual"})),M.visualMode){var j=rt(B,P)?0:-1,q=rt(B,P)?-1:0;B=ge(B,0,j),P=ge(P,0,q),M.sel={anchor:P,head:B},di(v,M,"<",gt(B,P)),di(v,M,">",tn(B,P))}else!M.insertMode&&!S&&(M.lastHPos=v.getCursor().ch)}function mo(v,M){this.keyName=v,this.key=M.key,this.ctrlKey=M.ctrlKey,this.altKey=M.altKey,this.metaKey=M.metaKey,this.shiftKey=M.shiftKey}function Gs(v){var M=We.macroModeState,S=M.lastInsertModeChanges,P=Be.keyName?Be.keyName(v):v.key;P&&(P.indexOf("Delete")!=-1||P.indexOf("Backspace")!=-1)&&(S.maybeReset&&(S.changes=[],S.maybeReset=!1),S.changes.push(new mo(P,v)))}function La(v,M,S,P){function B(){Y?Tn.processAction(v,M,M.lastEditActionCommand):Tn.evalInput(v,M)}function j(se){if(q.lastInsertModeChanges.changes.length>0){se=M.lastEditActionCommand?se:1;var ve=q.lastInsertModeChanges;as(v,ve.changes,se)}}var q=We.macroModeState;q.isPlaying=!0;var Y=!!M.lastEditActionCommand,Q=M.inputState;if(M.inputState=M.lastEditInputState,Y&&M.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<S;re++)B(),j(1);else P||B(),j(S);M.inputState=Q,M.insertMode&&!P&&ni(v),q.isPlaying=!1}function ss(v,M){Be.lookupKey(M,"vim-insert",function(S){return typeof S=="string"?Be.commands[S](v):S(v),!0})}function as(v,M,S){var P=v.getCursor("head"),B=We.macroModeState.lastInsertModeChanges.visualBlock;B&&(Fr(v,P,B+1),S=v.listSelections().length,v.setCursor(P));for(var j=0;j<S;j++){B&&v.setCursor(ge(P,j,0));for(var q=0;q<M.length;q++){var Y=M[q];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,M,S,P){M.length>1&&M[0]=="n"&&(M=M.replace("numpad","")),M=Rr[M]||M;var B="";if(S.ctrlKey&&(B+="C-"),S.altKey&&(B+="A-"),(B||M.length>1)&&S.shiftKey&&(B+="S-"),P&&!P.expectLiteralNext&&M.length==1){if(zn.keymap&&M in zn.keymap)(zn.remapCtrl!==!1||!B)&&(M=zn.keymap[M]);else if(M.charCodeAt(0)>255){var j=S.code&&S.code.slice(-1)||"";S.shiftKey||(j=j.toLowerCase()),j&&(M=j)}}return B+=M,B.length>1&&(B="<"+B+">"),B}function ls(v){var M=new v.constructor;return Object.keys(v).forEach(function(S){if(S!="insertEnd"){var P=v[S];Array.isArray(P)?P=P.slice():P&&typeof P=="object"&&P.constructor!=Object&&(P=ls(P)),M[S]=P}}),v.sel&&(M.sel={head:v.sel.head&&Ke(v.sel.head),anchor:v.sel.anchor&&Ke(v.sel.anchor)}),M}function Ro(v,M,S){var P=!1,B=mt.maybeInitVimState_(v),j=B.visualBlock||B.wasInVisualBlock,q=v.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!q?B.wasInVisualBlock=!1:q&&B.visualBlock&&(B.wasInVisualBlock=!0),M=="<Esc>"&&!B.insertMode&&!B.visualMode&&q)v.ace.exitMultiSelectMode();else if(j||!q||v.ace.inVirtualSelectionMode)P=mt.handleKey(v,M,S);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"),ke=v.getCursor("anchor"),me=rt(ve,ke)?0:-1,we=rt(ve,ke)?-1:0;ve=ge(ve,0,me),ke=ge(ke,0,we),v.state.vim.sel.head=ve,v.state.vim.sel.anchor=ke,P=yi(v,M,S),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,M){M.off("beforeEndOperation",Mi);var S=M.state.cm.vimCmd;S&&M.execCommand(S.exec?S:S.name,S.args),M.curOp=M.prevOp}var ar=n("../range").Range,yo=n("../lib/event_emitter").EventEmitter,eo=n("../lib/dom"),Oa=n("../lib/oop"),Ol=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,M){if(!(this instanceof De))return new De(v,M);this.line=v,this.ch=M},Be.defineOption=function(v,M,S){},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 M=Ol[v.keyCode]||v.key||"";return M.length==1&&(M=M.toUpperCase()),M=Lo.getModifierString(v).replace(/(^|-)\w/g,function(S){return S.toUpperCase()})+M,M},Be.keyMap.default=function(v){return function(M){var S=M.ace.commands.commandKeyBinding[v.toLowerCase()];return S&&M.ace.execCommand(S)!==!1}},Be.lookupKey=function v(M,S,P){S||(S="default"),typeof S=="string"&&(S=Be.keyMap[S]||Be.keyMap.default);var B=typeof S=="function"?S(M):S[M];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&P(B))return"handled";if(S.fallthrough){if(!Array.isArray(S.fallthrough))return v(M,S.fallthrough,P);for(var j=0;j<S.fallthrough.length;j++){var q=v(M,S.fallthrough[j],P);if(q)return q}}},Be.findMatchingTag=function(v,M){return v.findMatchingTag(M)},Be.findEnclosingTag=function(v,M){},Be.signal=function(v,M,S){return v._signal(M,S)},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(S){this.$lineHandleChanges&&this.$lineHandleChanges.push(S);var P={text:S.action[0]=="i"?S.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(S)},this.onSelectionChange=function(){var S=this.curOp=this.curOp||{};S.cursorActivityHandlers||(S.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Io.keyboardHandler)},this.operation=function(S,P){if(!P&&this.curOp||P&&this.curOp&&this.curOp.force)return S();if((P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var j=this.curOp=this.curOp||{};this.curOp.force=P;var q=S();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!j.cursorActivity&&!j.lastChange&&B&&(this.ace.prevOp=B)),(P||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var S=this.curOp;S&&(S.change&&this.signal("change",S.change,S),S&&S.cursorActivity&&this.signal("cursorActivity",null,S),this.curOp=null)},this.signal=function(S,P,B){var j=B?B[S+"Handlers"]:(this._eventRegistry||{})[S];if(j){j=j.slice();for(var q=0;q<j.length;q++)j[q](this,P)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(S,P){typeof S=="object"&&(P=S.ch,S=S.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:S,column:P}),this.ace.selection.moveTo(S,P),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(S){var P=this.ace.selection,B=S=="anchor"?P.isEmpty()?P.lead:P.anchor:S=="head"||!S?P.lead:P.getRange()[S];return p(B)},this.listSelections=function(S){var P=this.ace.multiSelect.rangeList.ranges;return!P.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:P.map(function(B){return{anchor:this.clipPos(p(B.cursor==B.end?B.start:B.end)),head:this.clipPos(p(B.cursor))}},this)},this.setSelections=function(S,P){var B=this.ace.multiSelect,j=S.map(function(re){var se=d(re.anchor),ve=d(re.head),ke=ar.comparePoints(se,ve)<0?new ar.fromPoints(se,ve):new ar.fromPoints(ve,se);return ke.cursor=ar.comparePoints(ke.start,ve)?ke.end:ke.start,ke});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 q=this.ace.session,Y=0;Y<j.length;Y++){var Q=q.$clipRangeToDocument(j[Y]);B.addRange(Q)}},this.setSelection=function(S,P,B){var j=this.ace.selection;j.moveTo(S.line,S.ch),j.selectTo(P.line,P.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(S){return!this.ace.selection.isEmpty()},this.clipPos=function(S){var P=this.ace.session.$clipPositionToDocument(S.line,S.ch);return p(P)},this.foldCode=function(S){this.ace.session.$toggleFoldWidget(S.line,{})},this.markText=function(S){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(S){var P=S.action=="insert",B=S.start,j=S.end,q=(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+=q,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(S,P,B,j){this.cm=S,this.id=P,this.row=B,this.column=j,S.marks[this.id]=this};v.prototype.clear=function(){delete this.cm.marks[this.id]},v.prototype.find=function(){return p(this)},this.setBookmark=function(S,P){var B=new v(this,this.$uid++,S.line,S.ch);return(!P||!P.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(S,P){if(P=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,S)}},this.findPosV=function(S,P,B,j){if(B=="page"){var q=this.ace.renderer,Y=q.layerConfig;P*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(S.line,S.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 p(re)}debugger},this.charCoords=function(S,P){if(P=="div"||!P){var B=this.ace.session.documentToScreenPosition(S.line,S.ch);return{left:B.column,top:B.row}}if(P=="local"){var j=this.ace.renderer,B=this.ace.session.documentToScreenPosition(S.line,S.ch),q=j.layerConfig.lineHeight,Y=j.layerConfig.characterWidth,Q=q*B.row;return{left:B.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(S,P){var B=this.ace.renderer;if(P=="local"){var j=Math.max(0,Math.floor(S.top/B.lineHeight)),q=Math.max(0,Math.floor(S.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(j,q);return p(Y)}if(P=="div")throw"not implemented"},this.getSearchCursor=function(S,P,B){var j=!1,q=!1;S instanceof RegExp&&!S.global&&(j=!S.ignoreCase,S=S.source,q=!0),S=="\\n"&&(S=`
1413
+ `,q=!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:S,caseSensitive:j,wrap:!1,backwards:ve,regExp:q,start:se||Q});var ke=Y.find(re.ace.session);return se=ke,se&&[!se.isEmpty()]},from:function(){return se&&p(se.start)},to:function(){return se&&p(se.end)},replace:function(ve){se&&(se.end=re.ace.session.doc.replace(se,ve))}}},this.scrollTo=function(S,P){var B=this.ace.renderer,j=B.layerConfig,q=j.maxHeight;q-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,P!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(P,q))),S!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(S,j.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(S,P){if(S){var B=this.ace.renderer,j={top:0,bottom:P};B.scrollCursorIntoView(d(S),B.lineHeight*2/B.$size.scrollerHeight,j)}},this.getLine=function(S){return this.ace.session.getLine(S)},this.getRange=function(S,P){return this.ace.session.getTextRange(new ar(S.line,S.ch,P.line,P.ch))},this.replaceRange=function(S,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,S)},this.replaceSelection=this.replaceSelections=function(S){var P=Array.isArray(S)&&S,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),P?S[0]||"":S);return}B.inVirtualSelectionMode=!0;var j=B.rangeList.ranges;j.length||(j=[this.ace.multiSelect.getRange()]);for(var q=j.length;q--;)this.ace.session.replace(j[q],P?S[q]||"":S);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(S){return this.getRange(S.anchor,S.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var M={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(S,P){switch(this.state[S]=P,S){case"indentWithTabs":S=M[S],P=!P;break;case"keyMap":this.state.$keyMap=P;return;default:S=M[S]}S&&this.ace.setOption(S,P)},this.getOption=function(S){var P,B=M[S];switch(B&&(P=this.ace.getOption(B)),S){case"indentWithTabs":return S=M[S],!P;case"keyMap":return this.state.$keyMap||"vim"}return B?P:this.state[S]},this.toggleOverwrite=function(S){return this.state.overwrite=S,this.ace.setOverwrite(S)},this.addOverlay=function(S){if(!this.$searchHighlight||!this.$searchHighlight.session){var P=new cs(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(P);P.id=B.id,P.session=this.ace.session,P.destroy=function(q){P.session.off("change",P.updateOnChange),P.session.off("changeEditor",P.destroy),P.session.removeMarker(P.id),P.session=null},P.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?P.cache[Y]=void 0:P.cache.splice(Y,P.cache.length)},P.session.on("changeEditor",P.destroy),P.session.on("change",P.updateOnChange)}var j=new RegExp(S.query.source,"gmi");this.$searchHighlight=S.highlight=P,this.$searchHighlight.setRegexp(j),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(S){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var S=this.ace.renderer,P=S.layerConfig;return{left:S.scrollLeft,top:S.scrollTop,height:P.maxHeight,width:P.width,clientHeight:P.height,clientWidth:P.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(S){return this.ace.setValue(S,-1)},this.getTokenTypeAt=function(S){var P=this.ace.session.getTokenAt(S.line,S.ch);return P&&/comment|string/.test(P.type)?"string":""},this.findMatchingBracket=function(S){var P=this.ace.session.findMatchingBracket(d(S));return{to:P&&p(P)}},this.findMatchingTag=function(S){var P=this.ace.session.getMatchingTags(d(S));if(P)return{open:{from:p(P.openTag.start),to:p(P.openTag.end)},close:{from:p(P.closeTag.start),to:p(P.closeTag.end)}}},this.indentLine=function(S,P){P===!0?this.ace.session.indentRows(S,S," "):P===!1&&this.ace.session.outdentRows(new ar(S,0,S,0))},this.indexFromPos=function(S){return this.ace.session.doc.positionToIndex(d(S))},this.posFromIndex=function(S){return p(this.ace.session.doc.indexToPosition(S))},this.focus=function(S){return this.ace.textInput.focus()},this.blur=function(S){return this.ace.blur()},this.defaultTextHeight=function(S){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(S,P,B,j){var q=j.bracketRegex.source,Y=/paren|text|operator|tag/;if(P==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),d(S),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:S.line,column:S.ch+1},Y);!Q&&j.bracketRegex&&j.bracketRegex.test(this.getLine(S.line)[S.ch-1])&&(Q={row:S.line,column:S.ch-1})}return Q&&{pos:p(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(S){if(Be.commands.hasOwnProperty(S))return Be.commands[S](this);if(S=="indentAuto")return this.ace.execCommand("autoindent");console.log(S+" is not implemented")},this.getLineNumber=function(S){var P=this.$lineHandleChanges;if(!P)return null;for(var B=S.row,j=0;j<P.length;j++){var q=P[j];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<B&&(B+=q.end.row-q.start.row);else if(q.start.row<B){if(B<q.end.row||B==q.end.row&&q.start.column>0)return null;B-=q.end.row-q.start.row}}}return B},this.getLineHandle=function(S){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(S),row:S}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var S=this.ace.session.$undoManager;if(S&&S.$lastDelta)return p(S.$lastDelta.end)}}).call(Be.prototype);var Na=Be.StringStream=function(v,M){this.pos=this.start=0,this.string=v,this.tabSize=M||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 M=this.string.charAt(this.pos);if(typeof v=="string")var S=M==v;else var S=M&&(v.test?v.test(M):v(M));if(S)return++this.pos,M},eatWhile:function(v){for(var M=this.pos;this.eat(v););return this.pos>M},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 M=this.string.indexOf(v,this.pos);if(M>-1)return this.pos=M,!0},backUp:function(v){this.pos-=v},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(v,M,S){if(typeof v!="string"){var P=this.string.slice(this.pos).match(v);return P&&P.index>0?null:(P&&M!==!1&&(this.pos+=P[0].length),P)}var B=function(q){return S?q.toLowerCase():q},j=this.string.substr(this.pos,v.length);if(B(j)==B(v))return M!==!1&&(this.pos+=v.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(v,M){this.lineStart+=v;try{return M()}finally{this.lineStart-=v}}},Be.defineExtension=function(v,M){Be.prototype[v]=M},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(S,P,B){var j=S.ace.container,q;return q=j.appendChild(document.createElement("div")),B?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof P=="string"?q.innerHTML=P:q.appendChild(P),q}function M(S,P){S.state.currentNotificationClose&&S.state.currentNotificationClose(),S.state.currentNotificationClose=P}Be.defineExtension("openDialog",function(S,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==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),B.onClose&&B.onClose(q);var ke=Q;ke.state.vim&&(ke.state.vim.status=null,ke.ace._signal("changeStatus"),ke.ace.renderer.$loop.schedule(ke.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){B||(B={}),M(this,null);var q=v(this,S,B.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.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=q.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(S,P){function B(){q||(q=!0,clearTimeout(Y),j.remove())}if(!this.virtualSelectionMode()){M(this,B);var j=v(this,S,P&&P.bottom),q=!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,Sn=[{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=Sn.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)}],Ei=[function(v){return/\S/.test(v)}],wo=["<",">"],Yt=["-",'"',".",":","_","/","+"],qt=/^\w$/,Xt;try{Xt=new RegExp("^[\\p{Lu}]$","u")}catch{Xt=/^[A-Z]$/}var Ft={};T("filetype",void 0,"string",["ft"],function(v,M){if(M!==void 0){if(v===void 0){var S=M.getOption("mode");return S=="null"?"":S}var S=v==""?"null":v;M.setOption("mode",S)}}),T("textwidth",80,"number",["tw"],function(v,M){if(M!==void 0){if(v===void 0){var S=M.getOption("textwidth");return S}var P=Math.round(v);P>1&&M.setOption("textwidth",P)}});var Ai=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 ke=B%P,me=Y[ke];if(me){var we=me.find();we&&!dt(we,re)&&ve(re)}else ve(re);ve(se),j=B,q=B-P+1,q<0&&(q=0)}function M(Q,re){B+=re,B>j?B=j:B<q&&(B=q);var se=Y[(P+B)%P];if(se&&!se.find()){var ve=re>0?1:-1,ke,me=Q.getCursor();do if(B+=ve,se=Y[(P+B)%P],se&&(ke=se.find())&&!dt(me,ke))break;while(B<j&&B>q)}return se}function S(Q,re){var se=B,ve=M(Q,re);return B=se,ve&&ve.find()}var P=100,B=-1,j=0,q=0,Y=new Array(P);return{cachedCursor:void 0,add:v,find:S,move:M}},An=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,M){var S=We.registerController.getRegister(M);if(S){if(S.clear(),this.latestRegister=M,v.openDialog){var P=pi("span",{class:"cm-vim-message"},"recording @"+M);this.onRecordingDone=v.openDialog(P,null,{bottom:!0})}this.isRecording=!0}}};var We,dn,mt={enterVimMode:f,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:I,getVimGlobalState_:function(){return We},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:mo,map:function(v,M,S){wr.map(v,M,S)},unmap:function(v,M){return wr.unmap(v,M)},noremap:function(v,M,S){wr.map(v,M,S,!0)},mapclear:function(v){var M=Sn.length,S=No,P=Sn.slice(0,M-S);if(Sn=Sn.slice(M-S),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 q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==v){var Q={};for(var re in j)Q[re]=j[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:F,vimKeyFromEvent:W,setOption:E,getOption:_,defineOption:T,defineEx:function(v,M,S){if(!M)M=v;else if(v.indexOf(M)!==0)throw new Error('(Vim.defineEx) "'+M+'" is not a prefix of "'+v+'", command not registered');Xs[v]=S,wr.commandMap_[M]={name:v,shortName:M,type:"api"}},handleKey:function(v,M,S){var P=this.findKey(v,M,S);if(typeof P=="function")return P()},multiSelectHandleKey:Ro,findKey:function(v,M,S){function P(){var re=We.macroModeState;if(re.isRecording){if(M=="q")return re.exitMacroRecordMode(),C(v),!0;S!="mapping"&&rs(re,M)}}function B(){if(M=="<Esc>"){if(Y.visualMode)_n(v);else{if(!Y.insertMode)return;ni(v)}return C(v),!0}}function j(){if(B())return!0;Y.inputState.keyBuffer.push(M);var re=Y.inputState.keyBuffer.join(""),se=M.length==1,ve=Tn.matchCommand(re,Sn,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(ve.type=="none")return C(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&&C(v)},_("insertModeEscKeysTimeout")),se){var me=v.listSelections();(!ke||ke.removed.length!=me.length)&&(ke=Y.inputState.changeQueue=new D),ke.inserted+=M;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);ke.removed[we]=(ke.removed[we]||"")+He}}return!se}if(Y.expectLiteralNext=!1,dn&&window.clearTimeout(dn),ve.command&&ke){for(var me=v.listSelections(),we=0;we<me.length;we++){var st=me[we].head;v.replaceRange(ke.removed[we]||"",ge(st,0,-ke.inserted.length),st,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ve.command||C(v),ve.command}function q(){if(P()||B())return!0;Y.inputState.keyBuffer.push(M);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return C(v),!1;var ve=Y.visualMode?"visual":"normal",ke=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var me=Tn.matchCommand(ke,Sn,Y.inputState,ve);return me.type=="none"?(C(v),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(C(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=q(),Q===!1?!Y.insertMode&&M.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):Tn.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,M){wr.processCommand(v,M)},defineMotion:te,defineAction:le,defineOperator:ne,mapCommand:Vs,_mapCommand:ns,defineRegister:U,exitVisualMode:_n,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},Ti={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Zn)).forEach(function(v){Ti[(Zn[v]||"").toLowerCase()]=Ti[v.toLowerCase()]=v}),T("langmap",void 0,"string",["lmap"],function(v,M){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,M,S){this.keyBuffer=[v||""],this.linewise=!!M,this.blockwise=!!S},pushText:function(v,M){M&&(this.linewise||this.keyBuffer.push(`
1447
+ `),this.linewise=!0),this.keyBuffer.push(v)},pushInsertModeChanges:function(v){this.insertModeChanges.push(An(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,M,S,P,B){if(v!=="_"){P&&S.charAt(S.length-1)!==`
1448
+ `&&(S+=`
1449
+ `);var j=this.isValidRegister(v)?this.getRegister(v):null;if(!j){switch(M){case"yank":this.registers[0]=new z(S,P,B);break;case"delete":case"change":S.indexOf(`
1450
+ `)==-1?this.registers["-"]=new z(S,P):(this.shiftNumericRegisters_(),this.registers[1]=new z(S,P))}this.unnamedRegister.setText(S,P,B);return}var q=l(v);q?j.pushText(S,P):j.setText(S,P,B),v==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(S),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&&(k(v,Yt)||qt.test(v))},shiftNumericRegisters_:function(){for(var v=9;v>=2;v--)this.registers[v]=this.getRegister(""+(v-1))}},Z.prototype={nextMatch:function(v,M){var S=this.historyBuffer,P=M?-1:1;this.initialPrefix===null&&(this.initialPrefix=v);for(var B=this.iterator+P;M?B>=0:B<S.length;B+=P)for(var j=S[B],q=0;q<=j.length;q++)if(this.initialPrefix==j.substring(0,q))return this.iterator=B,j;if(B>=S.length)return this.iterator=S.length,this.initialPrefix;if(B<0)return v},pushInput:function(v){var M=this.historyBuffer.indexOf(v);M>-1&&this.historyBuffer.splice(M,1),v.length&&this.historyBuffer.push(v)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Tn={matchCommand:function(v,M,S,P){var B=Ee(v,M,P,S);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,q=0;q<B.full.length;q++){var Y=B.full[q];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"};S.selectedCharacter=Q}return{type:"full",command:j}},processCommand:function(v,M,S){switch(M.inputState.repeatOverride=S.repeatOverride,S.type){case"motion":this.processMotion(v,M,S);break;case"operator":this.processOperator(v,M,S);break;case"operatorMotion":this.processOperatorMotion(v,M,S);break;case"action":this.processAction(v,M,S);break;case"search":this.processSearch(v,M,S);break;case"ex":case"keyToEx":this.processEx(v,M,S);break}},processMotion:function(v,M,S){M.inputState.motion=S.motion,M.inputState.motionArgs=ce(S.motionArgs),this.evalInput(v,M)},processOperator:function(v,M,S){var P=M.inputState;if(P.operator){if(P.operator==S.operator){P.motion="expandToLine",P.motionArgs={linewise:!0},this.evalInput(v,M);return}C(v)}P.operator=S.operator,P.operatorArgs=ce(S.operatorArgs),S.keys.length>1&&(P.operatorShortcut=S.keys),S.exitVisualBlock&&(M.visualBlock=!1,Qn(v)),M.visualMode&&this.evalInput(v,M)},processOperatorMotion:function(v,M,S){var P=M.visualMode,B=ce(S.operatorMotionArgs);B&&P&&B.visualLine&&(M.visualLine=!0),this.processOperator(v,M,S),P||this.processMotion(v,M,S)},processAction:function(v,M,S){var P=M.inputState,B=P.getRepeat(),j=!!B,q=ce(S.actionArgs)||{};P.selectedCharacter&&(q.selectedCharacter=P.selectedCharacter),S.operator&&this.processOperator(v,M,S),S.motion&&this.processMotion(v,M,S),(S.motion||S.operator)&&this.evalInput(v,M),q.repeat=B||1,q.repeatIsExplicit=j,q.registerName=P.registerName,C(v),M.lastMotion=null,S.isEdit&&this.recordLastEdit(M,P,S),Rn[S.action](v,q,M)},processSearch:function(v,M,S){function P(Ie,He,st){We.searchHistoryController.pushInput(Ie),We.searchHistoryController.reset();try{hn(v,Ie,He,st)}catch{Pt(v,"Invalid regex: "+Ie),C(v);return}Tn.processMotion(v,M,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:S.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(Tr(v,!Y,lt),30):(es(v),v.scrollTo(ve.left,ve.top))}function q(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),C(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=S.searchArgs.forward,Q=S.searchArgs.wholeWordOnly;Cn(v).setReversed(!Y);var re=Y?"/":"?",se=Cn(v).getQuery(),ve=v.getScrollInfo();switch(S.searchArgs.querySrc){case"prompt":var ke=We.macroModeState;if(ke.isPlaying){var Ne=ke.replaySearchQueries.shift();P(Ne,!0,!1)}else Ar(v,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:j,onKeyDown:q});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"),C(v);return}var Ne=v.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Ne="\\b"+Ne+"\\b":Ne=kn(Ne),We.jumpList.cachedCursor=v.getCursor(),v.setCursor(me.start),P(Ne,!0,!1)}}},processEx:function(v,M,S){function P(j){We.exCommandHistoryController.pushInput(j),We.exCommandHistoryController.reset(),wr.processCommand(v,j),v.state.vim&&C(v)}function B(j,q,Y){var Q=W(j),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(We.exCommandHistoryController.pushInput(q),We.exCommandHistoryController.reset(),Be.e_stop(j),C(v),Y(),v.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(j),re=Q=="<Up>",se=j.target?j.target.selectionEnd:0,q=We.exCommandHistoryController.nextMatch(q,re)||"",Y(q),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()}S.type=="keyToEx"?wr.processCommand(v,S.exArgs.input):M.visualMode?Ar(v,{onClose:P,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Ar(v,{onClose:P,prefix:":",onKeyDown:B})},evalInput:function(v,M){var S=M.inputState,P=S.motion,B=S.motionArgs||{},j=S.operator,q=S.operatorArgs||{},Y=S.registerName,Q=M.sel,re=Ke(M.visualMode?ue(v,Q.head):v.getCursor("head")),se=Ke(M.visualMode?ue(v,Q.anchor):v.getCursor("anchor")),ve=Ke(re),ke=Ke(se),me,we,Ne;if(j&&this.recordLastEdit(M,S),S.repeatOverride!==void 0?Ne=S.repeatOverride:Ne=S.getRepeat(),Ne>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Ne===0)&&(Ne=1,B.repeatIsExplicit=!1),S.selectedCharacter&&(B.selectedCharacter=q.selectedCharacter=S.selectedCharacter),B.repeat=Ne,C(v),P){var Ie=ri[P](v,re,B,M,S);if(M.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)),M.visualMode?((!M.visualBlock||me.ch!==1/0)&&(me=ue(v,me,ve)),we&&(we=ue(v,we)),we=we||ke,Q.anchor=we,Q.head=me,Qn(v),di(v,M,"<",rt(we,me)?we:me),di(v,M,">",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(q.lastSel){we=ke;var Ye=q.lastSel,Je=Math.abs(Ye.head.line-Ye.anchor.line),pn=Math.abs(Ye.head.ch-Ye.anchor.ch);Ye.visualLine?me=new De(ke.line+Je,ke.ch):Ye.visualBlock?me=new De(ke.line+Je,ke.ch+pn):Ye.head.line==Ye.anchor.line?me=new De(ke.line,ke.ch+pn):me=new De(ke.line+Je,ke.ch),M.visualMode=!0,M.visualLine=Ye.visualLine,M.visualBlock=Ye.visualBlock,Q=M.sel={anchor:we,head:me},Qn(v)}else M.visualMode&&(q.lastSel={anchor:Ke(Q.anchor),head:Ke(Q.head),visualBlock:M.visualBlock,visualLine:M.visualLine});var lt,vn,wt,$t,Jn;if(M.visualMode){lt=gt(Q.head,Q.anchor),vn=tn(Q.head,Q.anchor),wt=M.visualLine||q.linewise,$t=M.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 V=0;V<wn.length;V++)wn[V].head.ch=Zt(v,wn[V].head.line);else $t=="line"&&(wn[0].head=new De(wn[0].head.line+1,0))}}else{if(lt=Ke(we||ke),vn=Ke(me||ve),rt(vn,lt)){var X=lt;lt=vn,vn=X}wt=B.linewise||q.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),M.lastMotion=null,q.repeat=Ne,q.registerName=Y,q.linewise=wt;var oe=us[j](v,q,Jn.ranges,ke,me);M.visualMode&&_n(v,oe!=null),oe&&v.setCursor(oe)}},recordLastEdit:function(v,M,S){var P=We.macroModeState;P.isPlaying||(v.lastEditInputState=M,v.lastEditActionCommand=S,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,M,S){var P=go(v).top+S.repeat-1;return new De(P,nn(v.getLine(P)))},moveToMiddleLine:function(v){var M=go(v),S=Math.floor((M.top+M.bottom)*.5);return new De(S,nn(v.getLine(S)))},moveToBottomLine:function(v,M,S){var P=go(v).bottom-S.repeat+1;return new De(P,nn(v.getLine(P)))},expandToLine:function(v,M,S){var P=M;return new De(P.line+S.repeat-1,1/0)},findNext:function(v,M,S){var P=Cn(v),B=P.getQuery();if(B){var j=!S.forward;return j=P.isReversed()?!j:j,Si(v,B),Tr(v,j,B,S.repeat)}},findAndSelectNextInclusive:function(v,M,S,P,B){var j=Cn(v),q=j.getQuery();if(q){var Y=!S.forward;Y=j.isReversed()?!Y:Y;var Q=$i(v,Y,q,S.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()?S.forward?[ve,re]:[ve,se]:S.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,M,S,P){var B=ti(v,P,S.selectedCharacter);return B?S.linewise?{line:B.line,ch:nn(v.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(v,M,S,P){if(P.visualBlock&&S.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,M,S,P){for(var B=M,j=0;j<S.repeat;j++){var q=B;for(var Y in P.marks)if(h(Y)){var Q=P.marks[Y].find(),re=S.forward?rt(Q,q):rt(q,Q);if(!re&&!(S.linewise&&Q.line==q.line)){var se=dt(q,B),ve=S.forward?Bn(q,Q,B):Bn(B,Q,q);(se||ve)&&(B=Q)}}}return S.linewise&&(B=new De(B.line,nn(v.getLine(B.line)))),B},moveByCharacters:function(v,M,S){var P=M,B=S.repeat,j=S.forward?P.ch+B:P.ch-B;return new De(P.line,j)},moveByLines:function(v,M,S,P){var B=M,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 q=S.repeat+(S.repeatOffset||0),Y=S.forward?B.line+q:B.line-q,Q=v.firstLine(),re=v.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(v,M,S,P);if(Y>re&&B.line==re)return Eo(v,M,S,P,!0);var se=v.ace.session.getFoldLine(Y);return se&&(S.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),S.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,M,S,P){var B=M;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=S.repeat,Q=v.findPosV(B,S.forward?j:-j,"line",P.lastHSPos);if(Q.hitSide)if(S.forward)var q=v.charCoords(Q,"div"),Y={top:q.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,M,S){var P=M,B=S.repeat;return v.findPosV(P,S.forward?B:-B,"page")},moveByParagraph:function(v,M,S){var P=S.forward?1:-1;return zs(v,M,S.repeat,P)},moveBySentence:function(v,M,S){var P=S.forward?1:-1;return Xi(v,M,S.repeat,P)},moveByScroll:function(v,M,S,P){var B=v.getScrollInfo(),j=null,q=S.repeat;q||(q=B.clientHeight/(2*v.defaultTextHeight()));var Y=v.charCoords(M,"local");if(S.repeat=q,j=ri.moveByDisplayLines(v,M,S,P),!j)return null;var Q=v.charCoords(j,"local");return v.scrollTo(null,B.top+Q.top-Y.top),j},moveByWords:function(v,M,S){return yr(v,M,S.repeat,!!S.forward,!!S.wordEnd,!!S.bigWord)},moveTillCharacter:function(v,M,S){var P=S.repeat,B=Jo(v,P,S.forward,S.selectedCharacter,M),j=S.forward?-1:1;return Gi(j,S),B?(B.ch+=j,B):null},moveToCharacter:function(v,M,S){var P=S.repeat;return Gi(0,S),Jo(v,P,S.forward,S.selectedCharacter,M)||M},moveToSymbol:function(v,M,S){var P=S.repeat;return Yi(v,P,S.forward,S.selectedCharacter)||M},moveToColumn:function(v,M,S,P){var B=S.repeat;return P.lastHPos=B-1,P.lastHSPos=v.charCoords(M,"div").left,Al(v,B)},moveToEol:function(v,M,S,P){return Eo(v,M,S,P,!1)},moveToFirstNonWhiteSpaceCharacter:function(v,M){var S=M;return new De(S.line,nn(v.getLine(S.line)))},moveToMatchedSymbol:function(v,M){for(var S=M,P=S.line,B=S.ch,j=v.getLine(P),q;B<j.length;B++)if(q=j.charAt(B),q&&c(q)){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 S},moveToStartOfLine:function(v,M){return new De(M.line,0)},moveToLineOrEdgeOfDocument:function(v,M,S){var P=S.forward?v.lastLine():v.firstLine();return S.repeatIsExplicit&&(P=S.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 M=v.getCursor();return M.sticky=="before"&&M.ch--,M},textObjectManipulation:function(v,M,S,P){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},j={"'":!0,'"':!0,"`":!0},q=S.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!S.textObjectInner,Q,re;if(B[q]){if(re=!0,Q=jn(v,M,q,Y),!Q){var se=v.getSearchCursor(new RegExp("\\"+q,"g"),M);se.find()&&(Q=jn(v,se.from(),q,Y))}}else if(j[q])re=!0,Q=Mr(v,M,q,Y);else if(q==="W"||q==="w")for(var ve=S.repeat||1;ve-- >0;){var ke=or(v,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(q==="p")if(Q=zs(v,M,S.repeat,0,Y),S.linewise=!0,P.visualMode)P.visualLine||(P.visualLine=!0);else{var me=P.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=$o(v,M,Y);else if(q==="s"){var we=v.getLine(M.line);M.ch>0&&b(we[M.ch])&&(M.ch-=1);var Ne=Aa(v,M,S.repeat,1,Y),Ie=Aa(v,M,S.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,M,S){var P=We.lastCharacterSearch,B=S.repeat,j=S.forward===P.forward,q=(P.increment?1:0)*(j?-1:1);v.moveH(-q,"char"),S.inclusive=!!j;var Y=Jo(v,B,j,P.selectedCharacter);return Y?(Y.ch+=q,Y):(v.moveH(q,"char"),M)}},us={change:function(v,M,S){var P,B,j=v.state.vim,q=S[0].anchor,Y=S[0].head;if(j.visualMode)if(M.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,v.setSelection(q,Y),B=v.getSelection(),v.replaceSelection(""),P=q;else{B=v.getSelection();var Q=he("",S.length);v.replaceSelections(Q),P=gt(S[0].head,S[0].anchor)}else{B=v.getRange(q,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))}M.linewise&&(q=new De(q.line,nn(v.getLine(q.line))),Y.line>q.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),v.replaceRange("",q,Y),P=q}We.registerController.pushText(M.registerName,"change",B,M.linewise,S.length>1),Rn.enterInsertMode(v,{head:P},v.state.vim)},delete:function(v,M,S){var P,B,j=v.state.vim;if(j.visualBlock){B=v.getSelection();var q=he("",S.length);v.replaceSelections(q),P=gt(S[0].head,S[0].anchor)}else{var Y=S[0].anchor,Q=S[0].head;M.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,M.linewise&&(P=ri.moveToFirstNonWhiteSpaceCharacter(v,Y))}return We.registerController.pushText(M.registerName,"delete",B,M.linewise,j.visualBlock),ue(v,P)},indent:function(v,M,S){var P=v.state.vim,B=P.visualMode?M.repeat:1;if(P.visualBlock){for(var j=v.getOption("tabSize"),q=v.getOption("indentWithTabs")?" ":" ".repeat(j),Y,Q=S.length-1;Q>=0;Q--)if(Y=gt(S[Q].anchor,S[Q].head),M.indentRight)v.replaceRange(q.repeat(B),Y,Y);else{for(var re=v.getLine(Y.line),se=0,ve=0;ve<B;ve++){var ke=re[Y.ch+se];if(ke==" ")se++;else{if(ke!=" ")break;se++;for(var me=1;me<q.length&&(ke=re[Y.ch+se],ke===" ");me++)se++}}v.replaceRange("",Y,ge(Y,0,se))}return Y}if(v.indentMore)for(var ve=0;ve<B;ve++)M.indentRight?v.indentMore():v.indentLess();else{var we=S[0].anchor.line,Ne=P.visualBlock?S[S.length-1].anchor.line:S[0].head.line;M.linewise&&Ne--;for(var Q=we;Q<=Ne;Q++)for(var ve=0;ve<B;ve++)v.indentLine(Q,M.indentRight)}return ri.moveToFirstNonWhiteSpaceCharacter(v,S[0].anchor)},indentAuto:function(v,M,S){return v.execCommand("indentAuto"),ri.moveToFirstNonWhiteSpaceCharacter(v,S[0].anchor)},hardWrap:function(v,M,S,P,B){if(v.hardWrap){var j=S[0].anchor.line,q=S[0].head.line;M.linewise&&q--;var Y=v.hardWrap({from:j,to:q});return Y>j&&M.linewise&&Y--,M.keepCursor?P:new De(Y,0)}},changeCase:function(v,M,S,P,B){for(var j=v.getSelections(),q=[],Y=M.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 ke=re.charAt(ve);se+=l(ke)?ke.toLowerCase():ke.toUpperCase()}q.push(se)}return v.replaceSelections(q),M.shouldMoveCursor?B:!v.state.vim.visualMode&&M.linewise&&S[0].anchor.line+1==S[0].head.line?ri.moveToFirstNonWhiteSpaceCharacter(v,P):M.linewise?P:gt(S[0].anchor,S[0].head)},yank:function(v,M,S,P){var B=v.state.vim,j=v.getSelection(),q=B.visualMode?gt(B.sel.anchor,B.sel.head,S[0].head,S[0].anchor):P;return We.registerController.pushText(M.registerName,"yank",j,M.linewise,B.visualBlock),q}},Rn={jumpListWalk:function(v,M,S){if(!S.visualMode){var P=M.repeat,B=M.forward,j=We.jumpList,q=j.move(v,B?P:-P),Y=q?q.find():void 0;Y=Y||v.getCursor(),v.setCursor(Y),v.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(v,M,S){if(!S.visualMode){var P=M.repeat||1,B=v.defaultTextHeight(),j=v.getScrollInfo().top,q=B*P,Y=M.forward?j+q:j-q,Q=Ke(v.getCursor()),re=v.charCoords(Q,"local");if(M.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,M){var S=v.getCursor().line,P=v.charCoords(new De(S,0),"local"),B=v.getScrollInfo().clientHeight,j=P.top;switch(M.position){case"center":j=P.bottom-B/2;break;case"bottom":var q=new De(S,v.getLine(S).length-1),Y=v.charCoords(q,"local"),Q=Y.bottom-j;j=j-B+Q}v.scrollTo(null,j)},replayMacro:function(v,M,S){var P=M.selectedCharacter,B=M.repeat,j=We.macroModeState;for(P=="@"?P=j.latestRegister:j.latestRegister=P;B--;)qs(v,S,j,P)},enterMacroRecordMode:function(v,M){var S=We.macroModeState,P=M.selectedCharacter;We.registerController.isValidRegister(P)&&S.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,M,S){if(!v.getOption("readOnly")){S.insertMode=!0,S.insertModeRepeat=M&&M.repeat||1;var P=M?M.insertAt:null,B=S.sel,j=M.head||v.getCursor("head"),q=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(!S.visualMode)return;S.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),q=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(!S.visualMode)return;S.visualBlock?(j=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),q=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(S.visualMode)return}else P=="lastEdit"&&(j=Ao(v)||j);v.setOption("disableInput",!1),M&&M.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",To),S.insertEnd&&S.insertEnd.clear(),S.insertEnd=v.setBookmark(j,{insertLeft:!0}),Be.on(v.getInputField(),"keydown",Gs)),S.visualMode&&_n(v),Fr(v,j,q)}},toggleVisualMode:function(v,M,S){var P=M.repeat,B=v.getCursor(),j;if(S.visualMode)S.visualLine^M.linewise||S.visualBlock^M.blockwise?(S.visualLine=!!M.linewise,S.visualBlock=!!M.blockwise,Be.signal(v,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Qn(v)):_n(v);else{S.visualMode=!0,S.visualLine=!!M.linewise,S.visualBlock=!!M.blockwise,j=ue(v,new De(B.line,B.ch+P-1));var q=w(v,B,j);S.sel={anchor:q.start,head:q.end},Be.signal(v,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""}),Qn(v),di(v,S,"<",gt(B,j)),di(v,S,">",tn(B,j))}},reselectLastSelection:function(v,M,S){var P=S.lastSelection;if(S.visualMode&&Vt(v,S),P){var B=P.anchorMark.find(),j=P.headMark.find();if(!B||!j)return;S.sel={anchor:B,head:j},S.visualMode=!0,S.visualLine=P.visualLine,S.visualBlock=P.visualBlock,Qn(v),di(v,S,"<",gt(B,j)),di(v,S,">",tn(B,j)),Be.signal(v,"vim-mode-change",{mode:"visual",subMode:S.visualLine?"linewise":S.visualBlock?"blockwise":""})}},joinLines:function(v,M,S){var P,B;if(S.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 q=Math.max(M.repeat,2);P=v.getCursor(),B=ue(v,new De(P.line+q-1,1/0))}for(var Y=0,Q=P.line;Q<B.line;Q++){Y=Zt(v,P.line);var re="",se=0;if(!M.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 ke=ue(v,new De(P.line,Y));S.visualMode&&_n(v,!1),v.setCursor(ke)},newLineAndEnterInsertMode:function(v,M,S){S.insertMode=!0;var P=Ke(v.getCursor());if(P.line===v.firstLine()&&!M.after)v.replaceRange(`
1451
+ `,new De(v.firstLine(),0)),v.setCursor(v.firstLine(),0);else{P.line=M.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:M.repeat},S)},paste:function(v,M,S){var P=this,B=We.registerController.getRegister(M.registerName),j=function(){var q=B.toString();P.continuePaste(v,M,S,q,B)};M.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){P.continuePaste(v,M,S,q,B)},function(){j()}):j()},continuePaste:function(v,M,S,P,B){var j=Ke(v.getCursor());if(P){if(M.matchIndent){var q=v.getOption("tabSize"),Y=function(wn){var V=wn.split(" ").length-1,X=wn.split(" ").length-1;return V*q+X*1},Q=v.getLine(v.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=P.replace(/\n$/,""),ve=P!==se,ke=Y(P.match(/^\s*/)[0]),P=se.replace(/^\s*/gm,function(wn){var V=re+(Y(wn)-ke);if(V<0)return"";if(v.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});P+=ve?`
1452
+ `:""}if(M.repeat>1)var P=Array(M.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+=M.after?1:0,j.ch=Math.min(Zt(v,j.line),j.ch)}else me?S.visualMode?P=S.visualLine?P.slice(0,-1):`
1454
+ `+P.slice(0,P.length-1)+`
1455
+ `:M.after?(P=`
1456
+ `+P.slice(0,P.length-1),j.ch=Zt(v,j.line)):j.ch=0:j.ch+=M.after?1:0;var Ie;if(S.visualMode){S.lastPastedText=P;var He,st=Ve(v,S),Ye=st[0],Je=st[1],pn=v.getSelection(),lt=v.listSelections(),vn=new Array(lt.length).join("1").split("1");S.lastSelection&&(He=S.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):S.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&&(S.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=M.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-(M.after?1:0));S.visualMode&&_n(v,!1),v.setCursor(Ie)}},undo:function(v,M){v.operation(function(){Xe(v,Be.commands.undo,M.repeat)(),v.setCursor(ue(v,v.getCursor("start")))})},redo:function(v,M){Xe(v,Be.commands.redo,M.repeat)()},setRegister:function(v,M,S){S.inputState.registerName=M.selectedCharacter},insertRegister:function(v,M,S){var P=M.selectedCharacter,B=We.registerController.getRegister(P),j=B&&B.toString();j&&v.replaceSelection(j)},oneNormalCommand:function(v,M,S){ni(v,!0),S.insertModeReturn=!0,Be.on(v,"vim-command-done",function P(){S.visualMode||(S.insertModeReturn&&(S.insertModeReturn=!1,S.insertMode||Rn.enterInsertMode(v,{},S)),Be.off(v,"vim-command-done",P))})},setMark:function(v,M,S){var P=M.selectedCharacter;di(v,S,P,v.getCursor())},replace:function(v,M,S){var P=M.selectedCharacter,B=v.getCursor(),j,q,Y=v.listSelections();if(S.visualMode)B=v.getCursor("start"),q=v.getCursor("end");else{var Q=v.getLine(B.line);j=B.ch+M.repeat,j>Q.length&&(j=Q.length),q=new De(B.line,j)}var re=w(v,B,q);if(B=re.start,q=re.end,P==`
1458
+ `)S.visualMode||v.replaceRange("",B,q),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(v);else{var se=v.getRange(B,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,P),se=se.replace(/[^\n]/g,P),S.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,q);S.visualMode?(B=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,v.setCursor(B),_n(v,!1)):v.setCursor(ge(q,0,-1))}},incrementNumberToken:function(v,M){for(var S=v.getCursor(),P=v.getLine(S.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,j,q,Y,Q;(j=B.exec(P))!==null&&(q=j.index,Y=q+j[0].length,!(S.ch<Y)););if(!(!M.backtrack&&Y<=S.ch)&&j){var re=j[2]||j[4],se=j[3]||j[5],ve=M.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(j[1]+se,ke)+ve*M.repeat;Q=me.toString(ke);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(S.line,q),Ie=new De(S.line,Y);v.replaceRange(Q,Ne,Ie),v.setCursor(new De(S.line,q+Q.length-1))}},repeatLastEdit:function(v,M,S){var P=S.lastEditInputState;if(P){var B=M.repeat;B&&M.repeatIsExplicit?S.lastEditInputState.repeatOverride=B:B=S.lastEditInputState.repeatOverride||B,La(v,S,B,!1)}},indent:function(v,M){v.indentLine(v.getCursor().line,M.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 M=v.lastCh==="*"&&v.nextCh==="/";return v.lastCh=v.nextCh,M}},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 M=v.lineText.match(/^#(\w+)/)[1];if(M==="endif"){if(v.forward&&v.depth===0)return!0;v.depth++}else if(M==="if"){if(!v.forward&&v.depth===0)return!0;v.depth--}if(M==="else"&&v.depth===0)return!0}return!1}}};T("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,M,S){var P=this;v.operation(function(){v.curOp.isVimOp=!0,P._processCommand(v,M,S)})},_processCommand:function(v,M,S){var P=v.state.vim,B=We.registerController.getRegister(":"),j=B.toString(),q=new Be.StringStream(M);B.setText(M);var Y=S||{};Y.input=M;try{this.parseInput_(v,q,Y)}catch(se){throw Pt(v,se.toString()),se}P.visualMode&&_n(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_(q,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 ":'+M+'"');return}try{Xs[re](v,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw Pt(v,se.toString()),se}},parseInput_:function(v,M,S){if(M.eatWhile(":"),M.eat("%")?(S.line=v.firstLine(),S.lineEnd=v.lastLine()):(S.line=this.parseLineSpec_(v,M),S.line!==void 0&&M.eat(",")&&(S.lineEnd=this.parseLineSpec_(v,M))),S.line==null)if(v.state.vim.visualMode){var P=ti(v,v.state.vim,"<");S.selectionLine=P&&P.line,P=ti(v,v.state.vim,">"),S.selectionLineEnd=P&&P.line}else S.selectionLine=v.getCursor().line;else S.selectionLine=S.line,S.selectionLineEnd=S.lineEnd;var B=M.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?S.commandName=B[1]:S.commandName=M.match(/.*/)[0],S},parseLineSpec_:function(v,M){var S=M.match(/^(\d+)/);if(S)return parseInt(S[1],10)-1;switch(M.next()){case".":return this.parseLineSpecOffset_(M,v.getCursor().line);case"$":return this.parseLineSpecOffset_(M,v.lastLine());case"'":var P=M.next(),B=ti(v,v.state.vim,P);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(M,B.line);case"-":case"+":return M.backUp(1),this.parseLineSpecOffset_(M,v.getCursor().line);default:return M.backUp(1),void 0}},parseLineSpecOffset_:function(v,M){var S=v.match(/^([+-])?(\d+)/);if(S){var P=parseInt(S[2],10);S[1]=="-"?M-=P:M+=P}return M},parseCommandArgs_:function(v,M,S){if(!v.eol()){M.argString=v.match(/.*/)[0];var P=S.argDelimiter||/\s+/,B=hi(M.argString).split(P);B.length&&B[0]&&(M.args=B)}},matchCommand_:function(v){for(var M=v.length;M>0;M--){var S=v.substring(0,M);if(this.commandMap_[S]){var P=this.commandMap_[S];if(P.name.indexOf(v)===0)return P}}return null},buildCommandMap_:function(){this.commandMap_={};for(var v=0;v<fi.length;v++){var M=fi[v],S=M.shortName||M.name;this.commandMap_[S]=M}},map:function(v,M,S,P){if(v!=":"&&v.charAt(0)==":"){if(S)throw Error("Mode not supported for ex mappings");var B=v.substring(1);M!=":"&&M.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:M.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:M,user:!0}}else{var j={keys:v,type:"keyToKey",toKeys:M,noremap:!!P};S&&(j.context=S),Sn.unshift(j)}},unmap:function(v,M){if(v!=":"&&v.charAt(0)==":"){if(M)throw Error("Mode not supported for ex mappings");var S=v.substring(1);if(this.commandMap_[S]&&this.commandMap_[S].user)return delete this.commandMap_[S],!0}else for(var P=v,B=0;B<Sn.length;B++)if(P==Sn[B].keys&&Sn[B].context===M)return Sn.splice(B,1),!0}};var Xs={colorscheme:function(v,M){if(!M.args||M.args.length<1){Pt(v,v.getOption("theme"));return}v.setOption("theme",M.args[0])},map:function(v,M,S,P){var B=M.args;if(!B||B.length<2){v&&Pt(v,"Invalid mapping: "+M.input);return}wr.map(B[0],B[1],S,P)},imap:function(v,M){this.map(v,M,"insert")},nmap:function(v,M){this.map(v,M,"normal")},vmap:function(v,M){this.map(v,M,"visual")},omap:function(v,M){this.map(v,M,"operatorPending")},noremap:function(v,M){this.map(v,M,void 0,!0)},inoremap:function(v,M){this.map(v,M,"insert",!0)},nnoremap:function(v,M){this.map(v,M,"normal",!0)},vnoremap:function(v,M){this.map(v,M,"visual",!0)},onoremap:function(v,M){this.map(v,M,"operatorPending",!0)},unmap:function(v,M,S){var P=M.args;(!P||P.length<1||!wr.unmap(P[0],S))&&v&&Pt(v,"No such mapping: "+M.input)},mapclear:function(v,M){mt.mapclear()},imapclear:function(v,M){mt.mapclear("insert")},nmapclear:function(v,M){mt.mapclear("normal")},vmapclear:function(v,M){mt.mapclear("visual")},omapclear:function(v,M){mt.mapclear("operatorPending")},move:function(v,M){Tn.processCommand(v,v.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:M.line+1})},set:function(v,M){var S=M.args,P=M.setCfg||{};if(!S||S.length<1){v&&Pt(v,"Invalid mapping: "+M.input);return}var B=S[0].split("="),j=B[0],q=B[1],Y=!1,Q=!1;if(j.charAt(j.length-1)=="?"){if(q)throw Error("Trailing characters: "+M.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);q===void 0&&j.substring(0,2)=="no"&&(j=j.substring(2),q=!1);var re=Ft[j]&&Ft[j].type=="boolean";if(re&&(Q?q=!_(j,v,P):q==null&&(q=!0)),!re&&q===void 0||Y){var se=_(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=E(j,q,v,P);ve instanceof Error&&Pt(v,ve.message)}},setlocal:function(v,M){M.setCfg={scope:"local"},this.set(v,M)},setglobal:function(v,M){M.setCfg={scope:"global"},this.set(v,M)},registers:function(v,M){var S=M.args,P=We.registerController.registers,B=`----------Registers----------
1462
+
1463
+ `;if(S){var j;S=S.join("");for(var q=0;q<S.length;q++)if(j=S.charAt(q),!!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,M){function S(){if(M.argString){var wt=new Be.StringStream(M.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]){q=$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),q?"i":""))}}function P(wt,$t){if(j){var Jn;Jn=wt,wt=$t,$t=Jn}q&&(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 q&&(wt[0]=wt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),wt[0]<$t[0]?-1:1}var j,q,Y,Q,re,se=S();if(se){Pt(v,se+": "+M.argString);return}var ve=M.line||v.firstLine(),ke=M.lineEnd||M.line||v.lastLine();if(ve!=ke){var me=new De(ve,0),we=new De(ke,Zt(v,ke)),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,M){this.global(v,M)},normal:function(v,M){var S=M.argString;if(S&&S[0]=="!"&&(S=S.slice(1),on=!0),S=S.trimStart(),!S){Pt(v,"Argument is required.");return}var P=M.line;if(typeof P=="number")for(var B=isNaN(M.lineEnd)?P:M.lineEnd,j=P;j<=B;j++)v.setCursor(j,0),L(v,M.argString.trimStart()),v.state.vim.insertMode&&ni(v,!0);else L(v,M.argString.trimStart()),v.state.vim.insertMode&&ni(v,!0)},global:function(v,M){var S=M.argString;if(!S){Pt(v,"Regular Expression missing from global");return}var P=M.commandName[0]==="v";S[0]==="!"&&M.commandName[0]==="g"&&(P=!0,S=S.slice(1));var B=M.line!==void 0?M.line:v.firstLine(),j=M.lineEnd||M.line||v.lastLine(),q=Er(S),Y=S,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{hn(v,Y,!0,!0)}catch{Pt(v,"Invalid regex: "+Y);return}for(var re=Cn(v).getQuery(),se=[],ve=B;ve<=j;ve++){var ke=v.getLine(ve),me=re.test(ke);me!==P&&se.push(Q?v.getLineHandle(ve):ke)}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,M){if(!v.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var S=M.argString,P=S?Zi(S,S[0]):[],B,j="",q,Y,Q,re=!1,se=!1;if(P.length)B=P[0],_("pcre")&&B!==""&&(B=new RegExp(B).source),j=P[1],j!==void 0&&(_("pcre")?j=Ll(j.replace(/([^\\])&/g,"$1$$&")):j=Rl(j),We.lastSubstituteReplacePart=j),q=P[2]?P[2].split(" "):[];else if(S&&S.length){Pt(v,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),_("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=Cn(v),ke=ve.getQuery(),me=M.line!==void 0?M.line:v.getCursor().line,we=M.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(ke,Ne);ts(v,re,se,me,we,Ie,ke,j,M.callback)},startinsert:function(v,M){L(v,M.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 M=Ke(v.getCursor()),S=M.line,P=v.getLine(S);We.registerController.pushText("0","yank",P,!0,!0)},delete:function(v,M){var S=M.selectionLine,P=isNaN(M.selectionLineEnd)?S:M.selectionLineEnd;us.delete(v,{linewise:!0},[{anchor:new De(S,0),head:new De(P+1,0)}])},join:function(v,M){var S=M.selectionLine,P=isNaN(M.selectionLineEnd)?S:M.selectionLineEnd;v.setCursor(new De(S,0)),Rn.joinLines(v,{repeat:P-S},v.state.vim)},delmarks:function(v,M){if(!M.argString||!hi(M.argString)){Pt(v,"Argument required");return}for(var S=v.state.vim,P=new Be.StringStream(hi(M.argString));!P.eol();){P.eatSpace();var B=P.pos;if(!P.match(/[a-zA-Z]/,!1)){Pt(v,"Invalid argument: "+M.argString.substring(B));return}var j=P.next();if(P.match("-",!0)){if(!P.match(/[a-zA-Z]/,!1)){Pt(v,"Invalid argument: "+M.argString.substring(B));return}var q=j,Y=P.next();if(!(h(q)&&h(Y)||l(q)&&l(Y))){Pt(v,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Pt(v,"Invalid argument: "+M.argString.substring(B));return}for(var se=0;se<=re-Q;se++){var ve=String.fromCharCode(Q+se);delete S.marks[ve]}}else delete S.marks[j]}}},wr=new vr;T("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,M,S){return v.operation(function(){return yi(v,M,S)},!0)},I(),r.CodeMirror=Be;var vi=mt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(v,M,S,P,B){var j=this.state.vim||{},q=S.characterWidth,Y=S.lineHeight,Q=M.top,re=M.left;if(!j.insertMode){var se=P.cursor?ar.comparePoints(P.cursor,P.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!se&&re>q&&(re-=q)}!j.insertMode&&j.status&&(Y/=2,Q+=Y),eo.translate(v,re,Q),eo.setStyle(v.style,"width",q+"px"),eo.setStyle(v.style,"height",Y+"px")},$getDirectionForHighlight:function(v){var M=v.state.cm,S=vi(M);if(!S.insertMode)return v.session.selection.isBackwards()||v.session.selection.isEmpty()},handleKeyboard:function(v,M,S,P,B){var j=v.editor,q=j.state.cm,Y=vi(q);if(P!=-1){if(Y.insertMode||(M==-1?(S.charCodeAt(0)>255&&v.inputKey&&(S=v.inputKey,S&&v.inputHash==4&&(S=S.toUpperCase())),v.inputChar=S):M==4||M==0?v.inputKey==S&&v.inputHash==M&&v.inputChar?(S=v.inputChar,M=-1):(v.inputChar=null,v.inputKey=S,v.inputHash=M):v.inputChar=v.inputKey=null),q.state.overwrite&&Y.insertMode&&S=="backspace"&&M==0)return{command:"gotoleft"};if(S=="c"&&M==1&&!Oo.isMac&&j.getCopyText())return j.once("copy",function(){Y.insertMode?j.selection.clearSelection():q.operation(function(){_n(q)})}),{command:"null",passEvent:!0};if(S=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Cn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if(M==-1||M&1||M===0&&S.length>1){var se=Y.insertMode,ve=Ys(M,S,B||{},Y);Y.status==null&&(Y.status="");var ke=Ro(q,ve,"user");return Y=vi(q),ke&&Y.status!=null?Y.status+=ve:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!ke&&(M!=-1||se)?void 0:{command:"null",passEvent:!ke}}}},attach:function(v){function M(){var P=vi(S).insertMode;S.ace.renderer.setStyle("normal-mode",!P),v.textInput.setCommandMode(!P),v.renderer.$keepTextAreaAtCursor=P,v.renderer.$blockCursor=!P}v.state||(v.state={});var S=new Be(v);v.state.cm=S,v.$vimModeHandler=this,f(S),vi(S).status=null,S.on("vim-command-done",function(){S.virtualSelectionMode()||(vi(S).status=null,S.ace._signal("changeStatus"),S.ace.session.markUndoGroup())}),S.on("changeStatus",function(){S.ace.renderer.updateCursor(),S.ace._signal("changeStatus")}),S.on("vim-mode-change",function(){S.virtualSelectionMode()||(M(),S._signal("changeStatus"))}),M(),v.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(S)},detach:function(v){var M=v.state.cm;g(M),M.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 M=v.state.cm,S=vi(M);if(S.insertMode)return"INSERT";var P="";return S.visualMode&&(P+="VISUAL",S.visualLine&&(P+=" LINE"),S.visualBlock&&(P+=" BLOCK")),S.status&&(P+=(P?" ":"")+S.status),P}},mt.defineOption({name:"wrap",set:function(v,M){M&&M.ace.setOption("wrap",v)},type:"boolean"},!1),mt.defineEx("write","w",function(){console.log(":write is not implemented")}),Sn.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"}}),Sn.push({keys:"gq",type:"operator",operator:"hardWrap"}),mt.defineOperator("hardWrap",function(v,M,S,P,B){var j=S[0].anchor.line,q=S[0].head.line;return M.linewise&&q--,vo(v.ace,{startRow:j,endRow:q}),De(q,0)}),T("textwidth",void 0,"number",["tw"],function(v,M){if(M!==void 0){if(v===void 0){var S=M.ace.getOption("printMarginColumn");return S}var P=Math.round(v);P>1&&M.ace.setOption("printMarginColumn",P)}}),Rn.aceCommand=function(v,M,S){v.vimCmd=M,v.ace.inVirtualSelectionMode?v.ace.on("beforeEndOperation",Mi):Mi(null,v.ace)},Rn.fold=function(v,M,S){v.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(M.all?2:0)+(M.open?1:0)])},No=Sn.length,r.handler.defaultKeymap=Sn,r.handler.actions=Rn,r.Vim=mt}),function(){ace.require(["ace/keyboard/vim"],function(n){t&&(t.exports=n)})}()}(Ym)),Ym.exports}C$();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 S$=Mc.exports,Qm;function $$(){return Qm||(Qm=1,function(t,e){(function(){var n,r="4.17.21",u=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",w="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,i="__lodash_placeholder__",a=1,h=2,c=4,o=1,l=2,m=1,b=2,k=4,T=8,E=16,_=32,x=64,R=128,I=256,O=512,L=30,W="...",F=800,N=16,$=1,C=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",T],["curryRight",E],["flip",O],["partial",_],["partialRight",x],["rearg",I]],ue="[object Arguments]",ce="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Ae="[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]",kn="[object RegExp]",Xn="[object Set]",ur="[object String]",Fr="[object Symbol]",vt="[object Undefined]",Ve="[object WeakMap]",Vt="[object WeakSet]",gn="[object ArrayBuffer]",Qn="[object DataView]",Br="[object Float32Array]",$r="[object Float64Array]",_n="[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,Eo=/[&<>"']/g,Jo=RegExp(yr.source),Al=RegExp(Eo.source),di=/<%-([\s\S]+?)%>/g,Tl=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Aa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xi=/^\w*$/,jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mr=/[\\^$.*+?()[\]{}|]/g,Qi=RegExp(Mr.source),Cn=/^\s+/,Er=/\s/,fo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Zi=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ta=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rl=/[()=,{}\[\]\/\s]/,Ll=/\\(\\)?/g,Ji=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pi=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,Ar=/^\[object .+?Constructor\]$/,Wn=/^0o[0-7]+$/i,hn=/^(?:0|[1-9]\d*)$/,En=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Si=/($^)/,Tr=/['\n\r\u2028\u2029\\]/g,$i="\\ud800-\\udfff",es="\\u0300-\\u036f",Us="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",ti=es+Us+go,Ao="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",ni="\\xac\\xb1\\xd7\\xf7",ns="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Vs="\\u2000-\\u206f",qs=" \\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+Vs+qs,To="['’]",is="["+$i+"]",os="["+Ks+"]",mo="["+ti+"]",Gs="\\d+",La="["+Ao+"]",ss="["+ts+"]",as="[^"+$i+Ks+Gs+Ao+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+")",Ol="(?:"+yo+"|"+as+")",Lo="(?:"+To+"(?:d|ll|m|re|s|t|ve))?",to="(?:"+To+"(?: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("|")+")",Sn=RegExp(To,"g"),No=RegExp(mo,"g"),fi=RegExp(Ys+"(?="+Ys+")|"+De+Be,"g"),zn=RegExp([yo+"?"+ss+"+"+Lo+"(?="+[os,yo,"$"].join("|")+")",Ol+"+"+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 ]/,Ei=["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[_n]=Yt[ir]=Yt[hr]=Yt[nn]=Yt[or]=Yt[$o]=Yt[Ki]=!0,Yt[ue]=Yt[ce]=Yt[gn]=Yt[Ee]=Yt[Qn]=Yt[Ae]=Yt[Xe]=Yt[Ke]=Yt[rt]=Yt[gt]=Yt[Bn]=Yt[kn]=Yt[Xn]=Yt[ur]=Yt[Ve]=!1;var qt={};qt[ue]=qt[ce]=qt[gn]=qt[Qn]=qt[Ee]=qt[Ae]=qt[Br]=qt[$r]=qt[_n]=qt[ir]=qt[hr]=qt[rt]=qt[gt]=qt[Bn]=qt[kn]=qt[Xn]=qt[ur]=qt[Fr]=qt[nn]=qt[or]=qt[$o]=qt[Ki]=!0,qt[Xe]=qt[Ke]=qt[Ve]=!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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ai={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},An={"\\":"\\","'":"'","\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,Ti=Wr&&mt.process,Tn=function(){try{var pe=Zn&&Zn.require&&Zn.require("util").types;return pe||Ti&&Ti.binding&&Ti.binding("util")}catch{}}(),ri=Tn&&Tn.isArrayBuffer,us=Tn&&Tn.isDate,Rn=Tn&&Tn.isMap,gi=Tn&&Tn.isRegExp,mi=Tn&&Tn.isSet,Ri=Tn&&Tn.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 M(pe,Me){for(var xe=-1,ze=Me.length,ct=pe.length;++xe<ze;)pe[ct+xe]=Me[xe];return pe}function S(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 q(pe){return pe.split("")}function Y(pe){return pe.match(Ta)||[]}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,ke,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 ke(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,At){xe=ze?(ze=!1,Mt):Me(xe,Mt,Ht,At)}),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(Cn,"")}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),V=Ne(Ft);function X(pe){return"\\"+An[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 Te(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)?cn(pe):q(pe)}function Rt(pe){for(var Me=pe.length;Me--&&Er.test(pe.charAt(Me)););return Me}var ut=Ne(Ai);function it(pe){for(var Me=fi.lastIndex=0;fi.test(pe);)++Me;return Me}function cn(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,Ei));var xe=Me.Array,ze=Me.Date,ct=Me.Error,Mt=Me.Function,Ht=Me.Math,At=Me.Object,zr=Me.RegExp,Li=Me.String,sn=Me.TypeError,gr=xe.prototype,Po=Mt.prototype,Ln=At.prototype,Qs=Me["__core-js_shared__"],yu=Po.toString,rn=Ln.hasOwnProperty,m2=0,Q0=function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),vu=Ln.toString,y2=yu.call(At),v2=on._,w2=zr("^"+yu.call(rn).replace(Mr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wu=Wr?Me.Buffer:n,hs=Me.Symbol,bu=Me.Uint8Array,Z0=wu?wu.allocUnsafe:n,xu=Fe(At.getPrototypeOf,At),J0=At.create,eb=Ln.propertyIsEnumerable,ku=gr.splice,tb=hs?hs.isConcatSpreadable:n,Il=hs?hs.iterator:n,Zs=hs?hs.toStringTag:n,_u=function(){try{var s=ra(At,"defineProperty");return s({},"",{}),s}catch{}}(),b2=Me.clearTimeout!==on.clearTimeout&&Me.clearTimeout,x2=ze&&ze.now!==on.Date.now&&ze.now,k2=Me.setTimeout!==on.setTimeout&&Me.setTimeout,Cu=Ht.ceil,Su=Ht.floor,Rp=At.getOwnPropertySymbols,_2=wu?wu.isBuffer:n,nb=Me.isFinite,C2=gr.join,S2=Fe(At.keys,At),lr=Ht.max,Lr=Ht.min,$2=ze.now,M2=Me.parseInt,rb=Ht.random,E2=gr.reverse,Lp=ra(Me,"DataView"),Nl=ra(Me,"Map"),Op=ra(Me,"Promise"),Pa=ra(Me,"Set"),Dl=ra(Me,"WeakMap"),Pl=ra(At,"create"),$u=Dl&&new Dl,Fa={},A2=ia(Lp),T2=ia(Nl),R2=ia(Op),L2=ia(Pa),O2=ia(Dl),Mu=hs?hs.prototype:n,Fl=Mu?Mu.valueOf:n,ib=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 ox(s)}return new Oi(s)}var Ba=function(){function s(){}return function(y){if(!$n(y))return{};if(J0)return J0(y);s.prototype=y;var A=new s;return s.prototype=n,A}}();function Eu(){}function Oi(s,y){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!y,this.__index__=0,this.__values__=n}J.templateSettings={escape:di,evaluate:Tl,interpolate:zs,variable:"",imports:{_:J}},J.prototype=Eu.prototype,J.prototype.constructor=J,Oi.prototype=Ba(Eu.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 I2(){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 N2(){if(this.__filtered__){var s=new Bt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function D2(){var s=this.__wrapped__.value(),y=this.__dir__,A=xt(s),H=y<0,K=A?s.length:0,ee=GI(0,K,this.__views__),ae=ee.start,de=ee.end,ye=de-ae,Le=H?de:ae-1,Oe=this.__iteratees__,Pe=Oe.length,qe=0,nt=Lr(ye,this.__takeCount__);if(!A||!H&&K==ye&&nt==ye)return Eb(s,this.__actions__);var pt=[];e:for(;ye--&&qe<nt;){Le+=y;for(var Tt=-1,ft=s[Le];++Tt<Pe;){var Nt=Oe[Tt],Wt=Nt.iteratee,xi=Nt.type,Vr=Wt(ft);if(xi==C)ft=Vr;else if(!Vr){if(xi==$)continue e;break e}}pt[qe++]=ft}return pt}Bt.prototype=Ba(Eu.prototype),Bt.prototype.constructor=Bt;function Js(s){var y=-1,A=s==null?0:s.length;for(this.clear();++y<A;){var H=s[y];this.set(H[0],H[1])}}function P2(){this.__data__=Pl?Pl(null):{},this.size=0}function F2(s){var y=this.has(s)&&delete this.__data__[s];return this.size-=y?1:0,y}function B2(s){var y=this.__data__;if(Pl){var A=y[s];return A===f?n:A}return rn.call(y,s)?y[s]:n}function j2(s){var y=this.__data__;return Pl?y[s]!==n:rn.call(y,s)}function W2(s,y){var A=this.__data__;return this.size+=this.has(s)?0:1,A[s]=Pl&&y===n?f:y,this}Js.prototype.clear=P2,Js.prototype.delete=F2,Js.prototype.get=B2,Js.prototype.has=j2,Js.prototype.set=W2;function Fo(s){var y=-1,A=s==null?0:s.length;for(this.clear();++y<A;){var H=s[y];this.set(H[0],H[1])}}function z2(){this.__data__=[],this.size=0}function H2(s){var y=this.__data__,A=Au(y,s);if(A<0)return!1;var H=y.length-1;return A==H?y.pop():ku.call(y,A,1),--this.size,!0}function U2(s){var y=this.__data__,A=Au(y,s);return A<0?n:y[A][1]}function V2(s){return Au(this.__data__,s)>-1}function q2(s,y){var A=this.__data__,H=Au(A,s);return H<0?(++this.size,A.push([s,y])):A[H][1]=y,this}Fo.prototype.clear=z2,Fo.prototype.delete=H2,Fo.prototype.get=U2,Fo.prototype.has=V2,Fo.prototype.set=q2;function Bo(s){var y=-1,A=s==null?0:s.length;for(this.clear();++y<A;){var H=s[y];this.set(H[0],H[1])}}function K2(){this.size=0,this.__data__={hash:new Js,map:new(Nl||Fo),string:new Js}}function G2(s){var y=Wu(this,s).delete(s);return this.size-=y?1:0,y}function Y2(s){return Wu(this,s).get(s)}function X2(s){return Wu(this,s).has(s)}function Q2(s,y){var A=Wu(this,s),H=A.size;return A.set(s,y),this.size+=A.size==H?0:1,this}Bo.prototype.clear=K2,Bo.prototype.delete=G2,Bo.prototype.get=Y2,Bo.prototype.has=X2,Bo.prototype.set=Q2;function ea(s){var y=-1,A=s==null?0:s.length;for(this.__data__=new Bo;++y<A;)this.add(s[y])}function Z2(s){return this.__data__.set(s,f),this}function J2(s){return this.__data__.has(s)}ea.prototype.add=ea.prototype.push=Z2,ea.prototype.has=J2;function no(s){var y=this.__data__=new Fo(s);this.size=y.size}function eI(){this.__data__=new Fo,this.size=0}function tI(s){var y=this.__data__,A=y.delete(s);return this.size=y.size,A}function nI(s){return this.__data__.get(s)}function rI(s){return this.__data__.has(s)}function iI(s,y){var A=this.__data__;if(A instanceof Fo){var H=A.__data__;if(!Nl||H.length<u-1)return H.push([s,y]),this.size=++A.size,this;A=this.__data__=new Bo(H)}return A.set(s,y),this.size=A.size,this}no.prototype.clear=eI,no.prototype.delete=tI,no.prototype.get=nI,no.prototype.has=rI,no.prototype.set=iI;function ob(s,y){var A=xt(s),H=!A&&oa(s),K=!A&&!H&&ms(s),ee=!A&&!H&&!K&&Ha(s),ae=A||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 sb(s){var y=s.length;return y?s[Up(0,y-1)]:n}function oI(s,y){return zu(ii(s),ta(y,0,s.length))}function sI(s){return zu(ii(s))}function Ip(s,y,A){(A!==n&&!ro(s[y],A)||A===n&&!(y in s))&&jo(s,y,A)}function Bl(s,y,A){var H=s[y];(!(rn.call(s,y)&&ro(H,A))||A===n&&!(y in s))&&jo(s,y,A)}function Au(s,y){for(var A=s.length;A--;)if(ro(s[A][0],y))return A;return-1}function aI(s,y,A,H){return ds(s,function(K,ee,ae){y(H,K,A(K),ae)}),H}function ab(s,y){return s&&xo(y,mr(y),s)}function lI(s,y){return s&&xo(y,si(y),s)}function jo(s,y,A){y=="__proto__"&&_u?_u(s,y,{configurable:!0,enumerable:!0,value:A,writable:!0}):s[y]=A}function Np(s,y){for(var A=-1,H=y.length,K=xe(H),ee=s==null;++A<H;)K[A]=ee?n:mf(s,y[A]);return K}function ta(s,y,A){return s===s&&(A!==n&&(s=s<=A?s:A),y!==n&&(s=s>=y?s:y)),s}function Ii(s,y,A,H,K,ee){var ae,de=y&a,ye=y&h,Le=y&c;if(A&&(ae=K?A(s,H,K,ee):A(s)),ae!==n)return ae;if(!$n(s))return s;var Oe=xt(s);if(Oe){if(ae=XI(s),!de)return ii(s,ae)}else{var Pe=Or(s),qe=Pe==Ke||Pe==dt;if(ms(s))return Rb(s,de);if(Pe==Bn||Pe==ue||qe&&!K){if(ae=ye||qe?{}:Xb(s),!de)return ye?BI(s,lI(ae,s)):FI(s,ab(ae,s))}else{if(!qt[Pe])return K?s:{};ae=QI(s,Pe,de)}}ee||(ee=new no);var nt=ee.get(s);if(nt)return nt;ee.set(s,ae),Sx(s)?s.forEach(function(ft){ae.add(Ii(ft,y,A,ft,s,ee))}):_x(s)&&s.forEach(function(ft,Nt){ae.set(Nt,Ii(ft,y,A,Nt,s,ee))});var pt=Le?ye?tf:ef:ye?si:mr,Tt=Oe?n:pt(s);return vr(Tt||s,function(ft,Nt){Tt&&(Nt=ft,ft=s[Nt]),Bl(ae,Nt,Ii(ft,y,A,Nt,s,ee))}),ae}function cI(s){var y=mr(s);return function(A){return lb(A,s,y)}}function lb(s,y,A){var H=A.length;if(s==null)return!H;for(s=At(s);H--;){var K=A[H],ee=y[K],ae=s[K];if(ae===n&&!(K in s)||!ee(ae))return!1}return!0}function cb(s,y,A){if(typeof s!="function")throw new sn(p);return ql(function(){s.apply(n,A)},y)}function jl(s,y,A,H){var K=-1,ee=yi,ae=!0,de=s.length,ye=[],Le=y.length;if(!de)return ye;A&&(y=v(y,lt(A))),H?(ee=vi,ae=!1):y.length>=u&&(ee=wt,ae=!1,y=new ea(y));e:for(;++K<de;){var Oe=s[K],Pe=A==null?Oe:A(Oe);if(Oe=H||Oe!==0?Oe:0,ae&&Pe===Pe){for(var qe=Le;qe--;)if(y[qe]===Pe)continue e;ye.push(Oe)}else ee(y,Pe,H)||ye.push(Oe)}return ye}var ds=Db(bo),ub=Db(Pp,!0);function uI(s,y){var A=!0;return ds(s,function(H,K,ee){return A=!!y(H,K,ee),A}),A}function Tu(s,y,A){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):A(ae,de)))var de=ae,ye=ee}return ye}function hI(s,y,A,H){var K=s.length;for(A=Et(A),A<0&&(A=-A>K?0:K+A),H=H===n||H>K?K:Et(H),H<0&&(H+=K),H=A>H?0:Mx(H);A<H;)s[A++]=y;return s}function hb(s,y){var A=[];return ds(s,function(H,K,ee){y(H,K,ee)&&A.push(H)}),A}function br(s,y,A,H,K){var ee=-1,ae=s.length;for(A||(A=JI),K||(K=[]);++ee<ae;){var de=s[ee];y>0&&A(de)?y>1?br(de,y-1,A,H,K):M(K,de):H||(K[K.length]=de)}return K}var Dp=Pb(),db=Pb(!0);function bo(s,y){return s&&Dp(s,y,mr)}function Pp(s,y){return s&&db(s,y,mr)}function Ru(s,y){return Rr(y,function(A){return Uo(s[A])})}function na(s,y){y=fs(y,s);for(var A=0,H=y.length;s!=null&&A<H;)s=s[ko(y[A++])];return A&&A==H?s:n}function pb(s,y,A){var H=y(s);return xt(s)?H:M(H,A(s))}function Hr(s){return s==null?s===n?vt:tn:Zs&&Zs in At(s)?KI(s):sN(s)}function Fp(s,y){return s>y}function dI(s,y){return s!=null&&rn.call(s,y)}function pI(s,y){return s!=null&&y in At(s)}function fI(s,y,A){return s>=Lr(y,A)&&s<lr(y,A)}function Bp(s,y,A){for(var H=A?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]=!A&&(y||K>=120&&Oe.length>=120)?new ea(ae&&Oe):n}Oe=s[0];var Pe=-1,qe=de[0];e:for(;++Pe<K&&Le.length<ye;){var nt=Oe[Pe],pt=y?y(nt):nt;if(nt=A||nt!==0?nt:0,!(qe?wt(qe,pt):H(Le,pt,A))){for(ae=ee;--ae;){var Tt=de[ae];if(!(Tt?wt(Tt,pt):H(s[ae],pt,A)))continue e}qe&&qe.push(pt),Le.push(nt)}}return Le}function gI(s,y,A,H){return bo(s,function(K,ee,ae){y(H,A(K),ee,ae)}),H}function Wl(s,y,A){y=fs(y,s),s=ex(s,y);var H=s==null?s:s[ko(Di(y))];return H==null?n:dr(H,s,A)}function fb(s){return On(s)&&Hr(s)==ue}function mI(s){return On(s)&&Hr(s)==gn}function yI(s){return On(s)&&Hr(s)==Ae}function zl(s,y,A,H,K){return s===y?!0:s==null||y==null||!On(s)&&!On(y)?s!==s&&y!==y:vI(s,y,A,H,zl,K)}function vI(s,y,A,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,qe=ye==Le;if(qe&&ms(s)){if(!ms(y))return!1;ae=!0,Oe=!1}if(qe&&!Oe)return ee||(ee=new no),ae||Ha(s)?Kb(s,y,A,H,K,ee):VI(s,y,ye,A,H,K,ee);if(!(A&o)){var nt=Oe&&rn.call(s,"__wrapped__"),pt=Pe&&rn.call(y,"__wrapped__");if(nt||pt){var Tt=nt?s.value():s,ft=pt?y.value():y;return ee||(ee=new no),K(Tt,ft,A,H,ee)}}return qe?(ee||(ee=new no),qI(s,y,A,H,K,ee)):!1}function wI(s){return On(s)&&Or(s)==rt}function jp(s,y,A,H){var K=A.length,ee=K,ae=!H;if(s==null)return!ee;for(s=At(s);K--;){var de=A[K];if(ae&&de[2]?de[1]!==s[de[0]]:!(de[0]in s))return!1}for(;++K<ee;){de=A[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 qe=H(Le,Oe,ye,s,y,Pe);if(!(qe===n?zl(Oe,Le,o|l,H,Pe):qe))return!1}}return!0}function gb(s){if(!$n(s)||tN(s))return!1;var y=Uo(s)?w2:Ar;return y.test(ia(s))}function bI(s){return On(s)&&Hr(s)==kn}function xI(s){return On(s)&&Or(s)==Xn}function kI(s){return On(s)&&Gu(s.length)&&!!Yt[Hr(s)]}function mb(s){return typeof s=="function"?s:s==null?ai:typeof s=="object"?xt(s)?wb(s[0],s[1]):vb(s):Fx(s)}function Wp(s){if(!Vl(s))return S2(s);var y=[];for(var A in At(s))rn.call(s,A)&&A!="constructor"&&y.push(A);return y}function _I(s){if(!$n(s))return oN(s);var y=Vl(s),A=[];for(var H in s)H=="constructor"&&(y||!rn.call(s,H))||A.push(H);return A}function zp(s,y){return s<y}function yb(s,y){var A=-1,H=oi(s)?xe(s.length):[];return ds(s,function(K,ee,ae){H[++A]=y(K,ee,ae)}),H}function vb(s){var y=rf(s);return y.length==1&&y[0][2]?Zb(y[0][0],y[0][1]):function(A){return A===s||jp(A,s,y)}}function wb(s,y){return sf(s)&&Qb(y)?Zb(ko(s),y):function(A){var H=mf(A,s);return H===n&&H===y?yf(A,s):zl(y,H,o|l)}}function Lu(s,y,A,H,K){s!==y&&Dp(y,function(ee,ae){if(K||(K=new no),$n(ee))CI(s,y,ae,A,Lu,H,K);else{var de=H?H(lf(s,ae),ee,ae+"",s,y,K):n;de===n&&(de=ee),Ip(s,ae,de)}},si)}function CI(s,y,A,H,K,ee,ae){var de=lf(s,A),ye=lf(y,A),Le=ae.get(ye);if(Le){Ip(s,A,Le);return}var Oe=ee?ee(de,ye,A+"",s,y,ae):n,Pe=Oe===n;if(Pe){var qe=xt(ye),nt=!qe&&ms(ye),pt=!qe&&!nt&&Ha(ye);Oe=ye,qe||nt||pt?xt(de)?Oe=de:Hn(de)?Oe=ii(de):nt?(Pe=!1,Oe=Rb(ye,!0)):pt?(Pe=!1,Oe=Lb(ye,!0)):Oe=[]:Kl(ye)||oa(ye)?(Oe=de,oa(de)?Oe=Ex(de):(!$n(de)||Uo(de))&&(Oe=Xb(ye))):Pe=!1}Pe&&(ae.set(ye,Oe),K(Oe,ye,H,ee,ae),ae.delete(ye)),Ip(s,A,Oe)}function bb(s,y){var A=s.length;if(A)return y+=y<0?A:0,Ho(y,A)?s[y]:n}function xb(s,y,A){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=yb(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 PI(ee,ae,A)})}function SI(s,y){return kb(s,y,function(A,H){return yf(s,H)})}function kb(s,y,A){for(var H=-1,K=y.length,ee={};++H<K;){var ae=y[H],de=na(s,ae);A(de,ae)&&Hl(ee,fs(ae,s),de)}return ee}function $I(s){return function(y){return na(y,s)}}function Hp(s,y,A,H){var K=H?ve:se,ee=-1,ae=y.length,de=s;for(s===y&&(y=ii(y)),A&&(de=v(s,lt(A)));++ee<ae;)for(var ye=0,Le=y[ee],Oe=A?A(Le):Le;(ye=K(de,Oe,ye,H))>-1;)de!==s&&ku.call(de,ye,1),ku.call(s,ye,1);return s}function _b(s,y){for(var A=s?y.length:0,H=A-1;A--;){var K=y[A];if(A==H||K!==ee){var ee=K;Ho(K)?ku.call(s,K,1):Kp(s,K)}}return s}function Up(s,y){return s+Su(rb()*(y-s+1))}function MI(s,y,A,H){for(var K=-1,ee=lr(Cu((y-s)/(A||1)),0),ae=xe(ee);ee--;)ae[H?ee:++K]=s,s+=A;return ae}function Vp(s,y){var A="";if(!s||y<1||y>U)return A;do y%2&&(A+=s),y=Su(y/2),y&&(s+=s);while(y);return A}function Lt(s,y){return cf(Jb(s,y,ai),s+"")}function EI(s){return sb(Ua(s))}function AI(s,y){var A=Ua(s);return zu(A,ta(y,0,A.length))}function Hl(s,y,A,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=ko(y[K]),Le=A;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])?[]:{})}Bl(de,ye,Le),de=de[ye]}return s}var Cb=$u?function(s,y){return $u.set(s,y),s}:ai,TI=_u?function(s,y){return _u(s,"toString",{configurable:!0,enumerable:!1,value:wf(y),writable:!0})}:ai;function RI(s){return zu(Ua(s))}function Ni(s,y,A){var H=-1,K=s.length;y<0&&(y=-y>K?0:K+y),A=A>K?K:A,A<0&&(A+=K),K=y>A?0:A-y>>>0,y>>>=0;for(var ee=xe(K);++H<K;)ee[H]=s[H+y];return ee}function LI(s,y){var A;return ds(s,function(H,K,ee){return A=y(H,K,ee),!A}),!!A}function Ou(s,y,A){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)&&(A?ae<=y:ae<y)?H=ee+1:K=ee}return K}return qp(s,y,ai,A)}function qp(s,y,A,H){var K=0,ee=s==null?0:s.length;if(ee===0)return 0;y=A(y);for(var ae=y!==y,de=y===null,ye=bi(y),Le=y===n;K<ee;){var Oe=Su((K+ee)/2),Pe=A(s[Oe]),qe=Pe!==n,nt=Pe===null,pt=Pe===Pe,Tt=bi(Pe);if(ae)var ft=H||pt;else Le?ft=pt&&(H||qe):de?ft=pt&&qe&&(H||!nt):ye?ft=pt&&qe&&!nt&&(H||!Tt):nt||Tt?ft=!1:ft=H?Pe<=y:Pe<y;ft?K=Oe+1:ee=Oe}return Lr(ee,he)}function Sb(s,y){for(var A=-1,H=s.length,K=0,ee=[];++A<H;){var ae=s[A],de=y?y(ae):ae;if(!A||!ro(de,ye)){var ye=de;ee[K++]=ae===0?0:ae}}return ee}function $b(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 ib?ib.call(s):"";var y=s+"";return y=="0"&&1/s==-z?"-0":y}function ps(s,y,A){var H=-1,K=yi,ee=s.length,ae=!0,de=[],ye=de;if(A)ae=!1,K=vi;else if(ee>=u){var Le=y?null:HI(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=A||Oe!==0?Oe:0,ae&&Pe===Pe){for(var qe=ye.length;qe--;)if(ye[qe]===Pe)continue e;y&&ye.push(Pe),de.push(Oe)}else K(ye,Pe,A)||(ye!==de&&ye.push(Pe),de.push(Oe))}return de}function Kp(s,y){return y=fs(y,s),s=ex(s,y),s==null||delete s[ko(Di(y))]}function Mb(s,y,A,H){return Hl(s,y,A(na(s,y)),H)}function Iu(s,y,A,H){for(var K=s.length,ee=H?K:-1;(H?ee--:++ee<K)&&y(s[ee],ee,s););return A?Ni(s,H?0:ee,H?ee+1:K):Ni(s,H?ee+1:0,H?K:ee)}function Eb(s,y){var A=s;return A instanceof Bt&&(A=A.value()),S(y,function(H,K){return K.func.apply(K.thisArg,M([H],K.args))},A)}function Gp(s,y,A){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]=jl(ee[K]||ae,s[de],y,A));return ps(br(ee,1),y,A)}function Ab(s,y,A){for(var H=-1,K=s.length,ee=y.length,ae={};++H<K;){var de=H<ee?y[H]:n;A(ae,s[H],de)}return ae}function Yp(s){return Hn(s)?s:[]}function Xp(s){return typeof s=="function"?s:ai}function fs(s,y){return xt(s)?s:sf(s,y)?[s]:ix(Jt(s))}var OI=Lt;function gs(s,y,A){var H=s.length;return A=A===n?H:A,!y&&A>=H?s:Ni(s,y,A)}var Tb=b2||function(s){return on.clearTimeout(s)};function Rb(s,y){if(y)return s.slice();var A=s.length,H=Z0?Z0(A):new s.constructor(A);return s.copy(H),H}function Qp(s){var y=new s.constructor(s.byteLength);return new bu(y).set(new bu(s)),y}function II(s,y){var A=y?Qp(s.buffer):s.buffer;return new s.constructor(A,s.byteOffset,s.byteLength)}function NI(s){var y=new s.constructor(s.source,pi.exec(s));return y.lastIndex=s.lastIndex,y}function DI(s){return Fl?At(Fl.call(s)):{}}function Lb(s,y){var A=y?Qp(s.buffer):s.buffer;return new s.constructor(A,s.byteOffset,s.length)}function Ob(s,y){if(s!==y){var A=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||!A&&ye||!K)return 1;if(!H&&!ee&&!Le&&s<y||Le&&A&&K&&!H&&!ee||de&&A&&K||!ae&&K||!ye)return-1}return 0}function PI(s,y,A){for(var H=-1,K=s.criteria,ee=y.criteria,ae=K.length,de=A.length;++H<ae;){var ye=Ob(K[H],ee[H]);if(ye){if(H>=de)return ye;var Le=A[H];return ye*(Le=="desc"?-1:1)}}return s.index-y.index}function Ib(s,y,A,H){for(var K=-1,ee=s.length,ae=A.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[A[K]]=s[K]);for(;Le--;)Oe[de++]=s[K++];return Oe}function Nb(s,y,A,H){for(var K=-1,ee=s.length,ae=-1,de=A.length,ye=-1,Le=y.length,Oe=lr(ee-de,0),Pe=xe(Oe+Le),qe=!H;++K<Oe;)Pe[K]=s[K];for(var nt=K;++ye<Le;)Pe[nt+ye]=y[ye];for(;++ae<de;)(qe||K<ee)&&(Pe[nt+A[ae]]=s[K++]);return Pe}function ii(s,y){var A=-1,H=s.length;for(y||(y=xe(H));++A<H;)y[A]=s[A];return y}function xo(s,y,A,H){var K=!A;A||(A={});for(var ee=-1,ae=y.length;++ee<ae;){var de=y[ee],ye=H?H(A[de],s[de],de,A,s):n;ye===n&&(ye=s[de]),K?jo(A,de,ye):Bl(A,de,ye)}return A}function FI(s,y){return xo(s,of(s),y)}function BI(s,y){return xo(s,Gb(s),y)}function Nu(s,y){return function(A,H){var K=xt(A)?pr:aI,ee=y?y():{};return K(A,s,ht(H,2),ee)}}function ja(s){return Lt(function(y,A){var H=-1,K=A.length,ee=K>1?A[K-1]:n,ae=K>2?A[2]:n;for(ee=s.length>3&&typeof ee=="function"?(K--,ee):n,ae&&Ur(A[0],A[1],ae)&&(ee=K<3?n:ee,K=1),y=At(y);++H<K;){var de=A[H];de&&s(y,de,H,ee)}return y})}function Db(s,y){return function(A,H){if(A==null)return A;if(!oi(A))return s(A,H);for(var K=A.length,ee=y?K:-1,ae=At(A);(y?ee--:++ee<K)&&H(ae[ee],ee,ae)!==!1;);return A}}function Pb(s){return function(y,A,H){for(var K=-1,ee=At(y),ae=H(y),de=ae.length;de--;){var ye=ae[s?de:++K];if(A(ee[ye],ye,ee)===!1)break}return y}}function jI(s,y,A){var H=y&m,K=Ul(s);function ee(){var ae=this&&this!==on&&this instanceof ee?K:s;return ae.apply(H?A:this,arguments)}return ee}function Fb(s){return function(y){y=Jt(y);var A=oe(y)?bt(y):n,H=A?A[0]:y.charAt(0),K=A?gs(A,1).join(""):y.slice(1);return H[s]()+K}}function Wa(s){return function(y){return S(Dx(Nx(y).replace(Sn,"")),s,"")}}function Ul(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 A=Ba(s.prototype),H=s.apply(A,y);return $n(H)?H:A}}function WI(s,y,A){var H=Ul(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<A)return Hb(s,y,Du,K.placeholder,n,ae,Le,n,n,A-ee);var Oe=this&&this!==on&&this instanceof K?H:s;return dr(Oe,this,ae)}return K}function Bb(s){return function(y,A,H){var K=At(y);if(!oi(y)){var ee=ht(A,3);y=mr(y),A=function(de){return ee(K[de],de,K)}}var ae=s(y,A,H);return ae>-1?K[ee?y[ae]:ae]:n}}function jb(s){return zo(function(y){var A=y.length,H=A,K=Oi.prototype.thru;for(s&&y.reverse();H--;){var ee=y[H];if(typeof ee!="function")throw new sn(p);if(K&&!ae&&ju(ee)=="wrapper")var ae=new Oi([],!0)}for(H=ae?H:A;++H<A;){ee=y[H];var de=ju(ee),ye=de=="wrapper"?nf(ee):n;ye&&af(ye[0])&&ye[1]==(R|T|_|I)&&!ye[4].length&&ye[9]==1?ae=ae[ju(ye[0])].apply(ae,ye[3]):ae=ee.length==1&&af(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,qe=A?y[Pe].apply(this,Le):Oe;++Pe<A;)qe=y[Pe].call(this,qe);return qe}})}function Du(s,y,A,H,K,ee,ae,de,ye,Le){var Oe=y&R,Pe=y&m,qe=y&b,nt=y&(T|E),pt=y&O,Tt=qe?n:Ul(s);function ft(){for(var Nt=arguments.length,Wt=xe(Nt),xi=Nt;xi--;)Wt[xi]=arguments[xi];if(nt)var Vr=za(ft),ki=fr(Wt,Vr);if(H&&(Wt=Ib(Wt,H,K,nt)),ee&&(Wt=Nb(Wt,ee,ae,nt)),Nt-=ki,nt&&Nt<Le){var Un=je(Wt,Vr);return Hb(s,y,Du,ft.placeholder,A,Wt,Un,de,ye,Le-Nt)}var io=Pe?A:this,qo=qe?io[s]:s;return Nt=Wt.length,de?Wt=aN(Wt,de):pt&&Nt>1&&Wt.reverse(),Oe&&ye<Nt&&(Wt.length=ye),this&&this!==on&&this instanceof ft&&(qo=Tt||Ul(qo)),qo.apply(io,Wt)}return ft}function Wb(s,y){return function(A,H){return gI(A,s,y(H),{})}}function Pu(s,y){return function(A,H){var K;if(A===n&&H===n)return y;if(A!==n&&(K=A),H!==n){if(K===n)return H;typeof A=="string"||typeof H=="string"?(A=wi(A),H=wi(H)):(A=$b(A),H=$b(H)),K=s(A,H)}return K}}function Zp(s){return zo(function(y){return y=v(y,lt(ht())),Lt(function(A){var H=this;return s(y,function(K){return dr(K,H,A)})})})}function Fu(s,y){y=y===n?" ":wi(y);var A=y.length;if(A<2)return A?Vp(y,s):y;var H=Vp(y,Cu(s/Ot(y)));return oe(y)?gs(bt(H),0,s).join(""):H.slice(0,s)}function zI(s,y,A,H){var K=y&m,ee=Ul(s);function ae(){for(var de=-1,ye=arguments.length,Le=-1,Oe=H.length,Pe=xe(Oe+ye),qe=this&&this!==on&&this instanceof ae?ee:s;++Le<Oe;)Pe[Le]=H[Le];for(;ye--;)Pe[Le++]=arguments[++de];return dr(qe,K?A:this,Pe)}return ae}function zb(s){return function(y,A,H){return H&&typeof H!="number"&&Ur(y,A,H)&&(A=H=n),y=Vo(y),A===n?(A=y,y=0):A=Vo(A),H=H===n?y<A?1:-1:Vo(H),MI(y,A,H,s)}}function Bu(s){return function(y,A){return typeof y=="string"&&typeof A=="string"||(y=Pi(y),A=Pi(A)),s(y,A)}}function Hb(s,y,A,H,K,ee,ae,de,ye,Le){var Oe=y&T,Pe=Oe?ae:n,qe=Oe?n:ae,nt=Oe?ee:n,pt=Oe?n:ee;y|=Oe?_:x,y&=~(Oe?x:_),y&k||(y&=-4);var Tt=[s,y,K,nt,Pe,pt,qe,de,ye,Le],ft=A.apply(n,Tt);return af(s)&&tx(ft,Tt),ft.placeholder=H,nx(ft,s,y)}function Jp(s){var y=Ht[s];return function(A,H){if(A=Pi(A),H=H==null?0:Lr(Et(H),292),H&&nb(A)){var K=(Jt(A)+"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(A)}}var HI=Pa&&1/Ue(new Pa([,-0]))[1]==z?function(s){return new Pa(s)}:kf;function Ub(s){return function(y){var A=Or(y);return A==rt?Te(y):A==Xn?Ge(y):Je(y,s(y))}}function Wo(s,y,A,H,K,ee,ae,de){var ye=y&b;if(!ye&&typeof s!="function")throw new sn(p);var Le=H?H.length:0;if(Le||(y&=-97,H=K=n),ae=ae===n?ae:lr(Et(ae),0),de=de===n?de:Et(de),Le-=K?K.length:0,y&x){var Oe=H,Pe=K;H=K=n}var qe=ye?n:nf(s),nt=[s,y,A,H,K,Oe,Pe,ee,ae,de];if(qe&&iN(nt,qe),s=nt[0],y=nt[1],A=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&(T|E)&&(y&=-25),!y||y==m)var pt=jI(s,y,A);else y==T||y==E?pt=WI(s,y,de):(y==_||y==(m|_))&&!K.length?pt=zI(s,y,A,H):pt=Du.apply(n,nt);var Tt=qe?Cb:tx;return nx(Tt(pt,nt),s,y)}function Vb(s,y,A,H){return s===n||ro(s,Ln[A])&&!rn.call(H,A)?y:s}function qb(s,y,A,H,K,ee){return $n(s)&&$n(y)&&(ee.set(y,s),Lu(s,y,n,qb,ee),ee.delete(y)),s}function UI(s){return Kl(s)?n:s}function Kb(s,y,A,H,K,ee){var ae=A&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,qe=!0,nt=A&l?new ea:n;for(ee.set(s,y),ee.set(y,s);++Pe<de;){var pt=s[Pe],Tt=y[Pe];if(H)var ft=ae?H(Tt,pt,Pe,y,s,ee):H(pt,Tt,Pe,s,y,ee);if(ft!==n){if(ft)continue;qe=!1;break}if(nt){if(!B(y,function(Nt,Wt){if(!wt(nt,Wt)&&(pt===Nt||K(pt,Nt,A,H,ee)))return nt.push(Wt)})){qe=!1;break}}else if(!(pt===Tt||K(pt,Tt,A,H,ee))){qe=!1;break}}return ee.delete(s),ee.delete(y),qe}function VI(s,y,A,H,K,ee,ae){switch(A){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 Ee:case Ae:case gt:return ro(+s,+y);case Xe:return s.name==y.name&&s.message==y.message;case kn:case ur:return s==y+"";case rt:var de=Te;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=Kb(de(s),de(y),H,K,ee,ae);return ae.delete(s),Oe;case Fr:if(Fl)return Fl.call(s)==Fl.call(y)}return!1}function qI(s,y,A,H,K,ee){var ae=A&o,de=ef(s),ye=de.length,Le=ef(y),Oe=Le.length;if(ye!=Oe&&!ae)return!1;for(var Pe=ye;Pe--;){var qe=de[Pe];if(!(ae?qe in y:rn.call(y,qe)))return!1}var nt=ee.get(s),pt=ee.get(y);if(nt&&pt)return nt==y&&pt==s;var Tt=!0;ee.set(s,y),ee.set(y,s);for(var ft=ae;++Pe<ye;){qe=de[Pe];var Nt=s[qe],Wt=y[qe];if(H)var xi=ae?H(Wt,Nt,qe,y,s,ee):H(Nt,Wt,qe,s,y,ee);if(!(xi===n?Nt===Wt||K(Nt,Wt,A,H,ee):xi)){Tt=!1;break}ft||(ft=qe=="constructor")}if(Tt&&!ft){var Vr=s.constructor,ki=y.constructor;Vr!=ki&&"constructor"in s&&"constructor"in y&&!(typeof Vr=="function"&&Vr instanceof Vr&&typeof ki=="function"&&ki instanceof ki)&&(Tt=!1)}return ee.delete(s),ee.delete(y),Tt}function zo(s){return cf(Jb(s,n,lx),s+"")}function ef(s){return pb(s,mr,of)}function tf(s){return pb(s,si,Gb)}var nf=$u?function(s){return $u.get(s)}:kf;function ju(s){for(var y=s.name+"",A=Fa[y],H=rn.call(Fa,y)?A.length:0;H--;){var K=A[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||bf;return s=s===bf?mb:s,arguments.length?s(arguments[0],arguments[1]):s}function Wu(s,y){var A=s.__data__;return eN(y)?A[typeof y=="string"?"string":"hash"]:A.map}function rf(s){for(var y=mr(s),A=y.length;A--;){var H=y[A],K=s[H];y[A]=[H,K,Qb(K)]}return y}function ra(s,y){var A=ie(s,y);return gb(A)?A:n}function KI(s){var y=rn.call(s,Zs),A=s[Zs];try{s[Zs]=n;var H=!0}catch{}var K=vu.call(s);return H&&(y?s[Zs]=A:delete s[Zs]),K}var of=Rp?function(s){return s==null?[]:(s=At(s),Rr(Rp(s),function(y){return eb.call(s,y)}))}:_f,Gb=Rp?function(s){for(var y=[];s;)M(y,of(s)),s=xu(s);return y}:_f,Or=Hr;(Lp&&Or(new Lp(new ArrayBuffer(1)))!=Qn||Nl&&Or(new Nl)!=rt||Op&&Or(Op.resolve())!=Zt||Pa&&Or(new Pa)!=Xn||Dl&&Or(new Dl)!=Ve)&&(Or=function(s){var y=Hr(s),A=y==Bn?s.constructor:n,H=A?ia(A):"";if(H)switch(H){case A2:return Qn;case T2:return rt;case R2:return Zt;case L2:return Xn;case O2:return Ve}return y});function GI(s,y,A){for(var H=-1,K=A.length;++H<K;){var ee=A[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 YI(s){var y=s.match(Zi);return y?y[1].split(Hs):[]}function Yb(s,y,A){y=fs(y,s);for(var H=-1,K=y.length,ee=!1;++H<K;){var ae=ko(y[H]);if(!(ee=s!=null&&A(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 XI(s){var y=s.length,A=new s.constructor(y);return y&&typeof s[0]=="string"&&rn.call(s,"index")&&(A.index=s.index,A.input=s.input),A}function Xb(s){return typeof s.constructor=="function"&&!Vl(s)?Ba(xu(s)):{}}function QI(s,y,A){var H=s.constructor;switch(y){case gn:return Qp(s);case Ee:case Ae:return new H(+s);case Qn:return II(s,A);case Br:case $r:case _n:case ir:case hr:case nn:case or:case $o:case Ki:return Lb(s,A);case rt:return new H;case gt:case ur:return new H(s);case kn:return NI(s);case Xn:return new H;case Fr:return DI(s)}}function ZI(s,y){var A=y.length;if(!A)return s;var H=A-1;return y[H]=(A>1?"& ":"")+y[H],y=y.join(A>2?", ":" "),s.replace(fo,`{
1476
+ /* [wrapped with `+y+`] */
1477
+ `)}function JI(s){return xt(s)||oa(s)||!!(tb&&s&&s[tb])}function Ho(s,y){var A=typeof s;return y=y??U,!!y&&(A=="number"||A!="symbol"&&hn.test(s))&&s>-1&&s%1==0&&s<y}function Ur(s,y,A){if(!$n(A))return!1;var H=typeof y;return(H=="number"?oi(A)&&Ho(y,A.length):H=="string"&&y in A)?ro(A[y],s):!1}function sf(s,y){if(xt(s))return!1;var A=typeof s;return A=="number"||A=="symbol"||A=="boolean"||s==null||bi(s)?!0:Xi.test(s)||!Aa.test(s)||y!=null&&s in At(y)}function eN(s){var y=typeof s;return y=="string"||y=="number"||y=="symbol"||y=="boolean"?s!=="__proto__":s===null}function af(s){var y=ju(s),A=J[y];if(typeof A!="function"||!(y in Bt.prototype))return!1;if(s===A)return!0;var H=nf(A);return!!H&&s===H[0]}function tN(s){return!!Q0&&Q0 in s}var nN=Qs?Uo:Cf;function Vl(s){var y=s&&s.constructor,A=typeof y=="function"&&y.prototype||Ln;return s===A}function Qb(s){return s===s&&!$n(s)}function Zb(s,y){return function(A){return A==null?!1:A[s]===y&&(y!==n||s in At(A))}}function rN(s){var y=qu(s,function(H){return A.size===g&&A.clear(),H}),A=y.cache;return y}function iN(s,y){var A=s[1],H=y[1],K=A|H,ee=K<(m|b|R),ae=H==R&&A==T||H==R&&A==I&&s[7].length<=y[8]||H==(R|I)&&y[7].length<=y[8]&&A==T;if(!(ee||ae))return s;H&m&&(s[2]=y[2],K|=A&m?0:k);var de=y[3];if(de){var ye=s[3];s[3]=ye?Ib(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?Nb(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 oN(s){var y=[];if(s!=null)for(var A in At(s))y.push(A);return y}function sN(s){return vu.call(s)}function Jb(s,y,A){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]=A(ae),dr(s,this,de)}}function ex(s,y){return y.length<2?s:na(s,Ni(y,0,-1))}function aN(s,y){for(var A=s.length,H=Lr(y.length,A),K=ii(s);H--;){var ee=y[H];s[H]=Ho(ee,A)?K[ee]:n}return s}function lf(s,y){if(!(y==="constructor"&&typeof s[y]=="function")&&y!="__proto__")return s[y]}var tx=rx(Cb),ql=k2||function(s,y){return on.setTimeout(s,y)},cf=rx(TI);function nx(s,y,A){var H=y+"";return cf(s,ZI(H,lN(YI(H),A)))}function rx(s){var y=0,A=0;return function(){var H=$2(),K=N-(H-A);if(A=H,K>0){if(++y>=F)return arguments[0]}else y=0;return s.apply(n,arguments)}}function zu(s,y){var A=-1,H=s.length,K=H-1;for(y=y===n?H:y;++A<y;){var ee=Up(A,K),ae=s[ee];s[ee]=s[A],s[A]=ae}return s.length=y,s}var ix=rN(function(s){var y=[];return s.charCodeAt(0)===46&&y.push(""),s.replace(jn,function(A,H,K,ee){y.push(K?ee.replace(Ll,"$1"):H||A)}),y});function ko(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 lN(s,y){return vr(le,function(A){var H="_."+A[0];y&A[1]&&!yi(s,H)&&s.push(H)}),s.sort()}function ox(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 cN(s,y,A){(A?Ur(s,y,A):y===n)?y=1:y=lr(Et(y),0);var H=s==null?0:s.length;if(!H||y<1)return[];for(var K=0,ee=0,ae=xe(Cu(H/y));K<H;)ae[ee++]=Ni(s,K,K+=y);return ae}function uN(s){for(var y=-1,A=s==null?0:s.length,H=0,K=[];++y<A;){var ee=s[y];ee&&(K[H++]=ee)}return K}function hN(){var s=arguments.length;if(!s)return[];for(var y=xe(s-1),A=arguments[0],H=s;H--;)y[H-1]=arguments[H];return M(xt(A)?ii(A):[A],br(y,1))}var dN=Lt(function(s,y){return Hn(s)?jl(s,br(y,1,Hn,!0)):[]}),pN=Lt(function(s,y){var A=Di(y);return Hn(A)&&(A=n),Hn(s)?jl(s,br(y,1,Hn,!0),ht(A,2)):[]}),fN=Lt(function(s,y){var A=Di(y);return Hn(A)&&(A=n),Hn(s)?jl(s,br(y,1,Hn,!0),n,A):[]});function gN(s,y,A){var H=s==null?0:s.length;return H?(y=A||y===n?1:Et(y),Ni(s,y<0?0:y,H)):[]}function mN(s,y,A){var H=s==null?0:s.length;return H?(y=A||y===n?1:Et(y),y=H-y,Ni(s,0,y<0?0:y)):[]}function yN(s,y){return s&&s.length?Iu(s,ht(y,3),!0,!0):[]}function vN(s,y){return s&&s.length?Iu(s,ht(y,3),!0):[]}function wN(s,y,A,H){var K=s==null?0:s.length;return K?(A&&typeof A!="number"&&Ur(s,y,A)&&(A=0,H=K),hI(s,y,A,H)):[]}function sx(s,y,A){var H=s==null?0:s.length;if(!H)return-1;var K=A==null?0:Et(A);return K<0&&(K=lr(H+K,0)),re(s,ht(y,3),K)}function ax(s,y,A){var H=s==null?0:s.length;if(!H)return-1;var K=H-1;return A!==n&&(K=Et(A),K=A<0?lr(H+K,0):Lr(K,H-1)),re(s,ht(y,3),K,!0)}function lx(s){var y=s==null?0:s.length;return y?br(s,1):[]}function bN(s){var y=s==null?0:s.length;return y?br(s,z):[]}function xN(s,y){var A=s==null?0:s.length;return A?(y=y===n?1:Et(y),br(s,y)):[]}function kN(s){for(var y=-1,A=s==null?0:s.length,H={};++y<A;){var K=s[y];H[K[0]]=K[1]}return H}function cx(s){return s&&s.length?s[0]:n}function _N(s,y,A){var H=s==null?0:s.length;if(!H)return-1;var K=A==null?0:Et(A);return K<0&&(K=lr(H+K,0)),se(s,y,K)}function CN(s){var y=s==null?0:s.length;return y?Ni(s,0,-1):[]}var SN=Lt(function(s){var y=v(s,Yp);return y.length&&y[0]===s[0]?Bp(y):[]}),$N=Lt(function(s){var y=Di(s),A=v(s,Yp);return y===Di(A)?y=n:A.pop(),A.length&&A[0]===s[0]?Bp(A,ht(y,2)):[]}),MN=Lt(function(s){var y=Di(s),A=v(s,Yp);return y=typeof y=="function"?y:n,y&&A.pop(),A.length&&A[0]===s[0]?Bp(A,n,y):[]});function EN(s,y){return s==null?"":C2.call(s,y)}function Di(s){var y=s==null?0:s.length;return y?s[y-1]:n}function AN(s,y,A){var H=s==null?0:s.length;if(!H)return-1;var K=H;return A!==n&&(K=Et(A),K=K<0?lr(H+K,0):Lr(K,H-1)),y===y?yt(s,y,K):re(s,ke,K,!0)}function TN(s,y){return s&&s.length?bb(s,Et(y)):n}var RN=Lt(ux);function ux(s,y){return s&&s.length&&y&&y.length?Hp(s,y):s}function LN(s,y,A){return s&&s.length&&y&&y.length?Hp(s,y,ht(A,2)):s}function ON(s,y,A){return s&&s.length&&y&&y.length?Hp(s,y,n,A):s}var IN=zo(function(s,y){var A=s==null?0:s.length,H=Np(s,y);return _b(s,v(y,function(K){return Ho(K,A)?+K:K}).sort(Ob)),H});function NN(s,y){var A=[];if(!(s&&s.length))return A;var H=-1,K=[],ee=s.length;for(y=ht(y,3);++H<ee;){var ae=s[H];y(ae,H,s)&&(A.push(ae),K.push(H))}return _b(s,K),A}function uf(s){return s==null?s:E2.call(s)}function DN(s,y,A){var H=s==null?0:s.length;return H?(A&&typeof A!="number"&&Ur(s,y,A)?(y=0,A=H):(y=y==null?0:Et(y),A=A===n?H:Et(A)),Ni(s,y,A)):[]}function PN(s,y){return Ou(s,y)}function FN(s,y,A){return qp(s,y,ht(A,2))}function BN(s,y){var A=s==null?0:s.length;if(A){var H=Ou(s,y);if(H<A&&ro(s[H],y))return H}return-1}function jN(s,y){return Ou(s,y,!0)}function WN(s,y,A){return qp(s,y,ht(A,2),!0)}function zN(s,y){var A=s==null?0:s.length;if(A){var H=Ou(s,y,!0)-1;if(ro(s[H],y))return H}return-1}function HN(s){return s&&s.length?Sb(s):[]}function UN(s,y){return s&&s.length?Sb(s,ht(y,2)):[]}function VN(s){var y=s==null?0:s.length;return y?Ni(s,1,y):[]}function qN(s,y,A){return s&&s.length?(y=A||y===n?1:Et(y),Ni(s,0,y<0?0:y)):[]}function KN(s,y,A){var H=s==null?0:s.length;return H?(y=A||y===n?1:Et(y),y=H-y,Ni(s,y<0?0:y,H)):[]}function GN(s,y){return s&&s.length?Iu(s,ht(y,3),!1,!0):[]}function YN(s,y){return s&&s.length?Iu(s,ht(y,3)):[]}var XN=Lt(function(s){return ps(br(s,1,Hn,!0))}),QN=Lt(function(s){var y=Di(s);return Hn(y)&&(y=n),ps(br(s,1,Hn,!0),ht(y,2))}),ZN=Lt(function(s){var y=Di(s);return y=typeof y=="function"?y:n,ps(br(s,1,Hn,!0),n,y)});function JN(s){return s&&s.length?ps(s):[]}function eD(s,y){return s&&s.length?ps(s,ht(y,2)):[]}function tD(s,y){return y=typeof y=="function"?y:n,s&&s.length?ps(s,n,y):[]}function hf(s){if(!(s&&s.length))return[];var y=0;return s=Rr(s,function(A){if(Hn(A))return y=lr(A.length,y),!0}),Ye(y,function(A){return v(s,we(A))})}function hx(s,y){if(!(s&&s.length))return[];var A=hf(s);return y==null?A:v(A,function(H){return dr(y,n,H)})}var nD=Lt(function(s,y){return Hn(s)?jl(s,y):[]}),rD=Lt(function(s){return Gp(Rr(s,Hn))}),iD=Lt(function(s){var y=Di(s);return Hn(y)&&(y=n),Gp(Rr(s,Hn),ht(y,2))}),oD=Lt(function(s){var y=Di(s);return y=typeof y=="function"?y:n,Gp(Rr(s,Hn),n,y)}),sD=Lt(hf);function aD(s,y){return Ab(s||[],y||[],Bl)}function lD(s,y){return Ab(s||[],y||[],Hl)}var cD=Lt(function(s){var y=s.length,A=y>1?s[y-1]:n;return A=typeof A=="function"?(s.pop(),A):n,hx(s,A)});function dx(s){var y=J(s);return y.__chain__=!0,y}function uD(s,y){return y(s),s}function Hu(s,y){return y(s)}var hD=zo(function(s){var y=s.length,A=y?s[0]:0,H=this.__wrapped__,K=function(ee){return Np(ee,s)};return y>1||this.__actions__.length||!(H instanceof Bt)||!Ho(A)?this.thru(K):(H=H.slice(A,+A+(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 dD(){return dx(this)}function pD(){return new Oi(this.value(),this.__chain__)}function fD(){this.__values__===n&&(this.__values__=$x(this.value()));var s=this.__index__>=this.__values__.length,y=s?n:this.__values__[this.__index__++];return{done:s,value:y}}function gD(){return this}function mD(s){for(var y,A=this;A instanceof Eu;){var H=ox(A);H.__index__=0,H.__values__=n,y?K.__wrapped__=H:y=H;var K=H;A=A.__wrapped__}return K.__wrapped__=s,y}function yD(){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:[uf],thisArg:n}),new Oi(y,this.__chain__)}return this.thru(uf)}function vD(){return Eb(this.__wrapped__,this.__actions__)}var wD=Nu(function(s,y,A){rn.call(s,A)?++s[A]:jo(s,A,1)});function bD(s,y,A){var H=xt(s)?wr:uI;return A&&Ur(s,y,A)&&(y=n),H(s,ht(y,3))}function xD(s,y){var A=xt(s)?Rr:hb;return A(s,ht(y,3))}var kD=Bb(sx),_D=Bb(ax);function CD(s,y){return br(Uu(s,y),1)}function SD(s,y){return br(Uu(s,y),z)}function $D(s,y,A){return A=A===n?1:Et(A),br(Uu(s,y),A)}function px(s,y){var A=xt(s)?vr:ds;return A(s,ht(y,3))}function fx(s,y){var A=xt(s)?Xs:ub;return A(s,ht(y,3))}var MD=Nu(function(s,y,A){rn.call(s,A)?s[A].push(y):jo(s,A,[y])});function ED(s,y,A,H){s=oi(s)?s:Ua(s),A=A&&!H?Et(A):0;var K=s.length;return A<0&&(A=lr(K+A,0)),Yu(s)?A<=K&&s.indexOf(y,A)>-1:!!K&&se(s,y,A)>-1}var AD=Lt(function(s,y,A){var H=-1,K=typeof y=="function",ee=oi(s)?xe(s.length):[];return ds(s,function(ae){ee[++H]=K?dr(y,ae,A):Wl(ae,y,A)}),ee}),TD=Nu(function(s,y,A){jo(s,A,y)});function Uu(s,y){var A=xt(s)?v:yb;return A(s,ht(y,3))}function RD(s,y,A,H){return s==null?[]:(xt(y)||(y=y==null?[]:[y]),A=H?n:A,xt(A)||(A=A==null?[]:[A]),xb(s,y,A))}var LD=Nu(function(s,y,A){s[A?0:1].push(y)},function(){return[[],[]]});function OD(s,y,A){var H=xt(s)?S:Ie,K=arguments.length<3;return H(s,ht(y,4),A,K,ds)}function ID(s,y,A){var H=xt(s)?P:Ie,K=arguments.length<3;return H(s,ht(y,4),A,K,ub)}function ND(s,y){var A=xt(s)?Rr:hb;return A(s,Ku(ht(y,3)))}function DD(s){var y=xt(s)?sb:EI;return y(s)}function PD(s,y,A){(A?Ur(s,y,A):y===n)?y=1:y=Et(y);var H=xt(s)?oI:AI;return H(s,y)}function FD(s){var y=xt(s)?sI:RI;return y(s)}function BD(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:Wp(s).length}function jD(s,y,A){var H=xt(s)?B:LI;return A&&Ur(s,y,A)&&(y=n),H(s,ht(y,3))}var WD=Lt(function(s,y){if(s==null)return[];var A=y.length;return A>1&&Ur(s,y[0],y[1])?y=[]:A>2&&Ur(y[0],y[1],y[2])&&(y=[y[0]]),xb(s,br(y,1),[])}),Vu=x2||function(){return on.Date.now()};function zD(s,y){if(typeof y!="function")throw new sn(p);return s=Et(s),function(){if(--s<1)return y.apply(this,arguments)}}function gx(s,y,A){return y=A?n:y,y=s&&y==null?s.length:y,Wo(s,R,n,n,n,n,y)}function mx(s,y){var A;if(typeof y!="function")throw new sn(p);return s=Et(s),function(){return--s>0&&(A=y.apply(this,arguments)),s<=1&&(y=n),A}}var df=Lt(function(s,y,A){var H=m;if(A.length){var K=je(A,za(df));H|=_}return Wo(s,H,y,A,K)}),yx=Lt(function(s,y,A){var H=m|b;if(A.length){var K=je(A,za(yx));H|=_}return Wo(y,H,s,A,K)});function vx(s,y,A){y=A?n:y;var H=Wo(s,T,n,n,n,n,n,y);return H.placeholder=vx.placeholder,H}function wx(s,y,A){y=A?n:y;var H=Wo(s,E,n,n,n,n,n,y);return H.placeholder=wx.placeholder,H}function bx(s,y,A){var H,K,ee,ae,de,ye,Le=0,Oe=!1,Pe=!1,qe=!0;if(typeof s!="function")throw new sn(p);y=Pi(y)||0,$n(A)&&(Oe=!!A.leading,Pe="maxWait"in A,ee=Pe?lr(Pi(A.maxWait)||0,y):ee,qe="trailing"in A?!!A.trailing:qe);function nt(Un){var io=H,qo=K;return H=K=n,Le=Un,ae=s.apply(qo,io),ae}function pt(Un){return Le=Un,de=ql(Nt,y),Oe?nt(Un):ae}function Tt(Un){var io=Un-ye,qo=Un-Le,Bx=y-io;return Pe?Lr(Bx,ee-qo):Bx}function ft(Un){var io=Un-ye,qo=Un-Le;return ye===n||io>=y||io<0||Pe&&qo>=ee}function Nt(){var Un=Vu();if(ft(Un))return Wt(Un);de=ql(Nt,Tt(Un))}function Wt(Un){return de=n,qe&&H?nt(Un):(H=K=n,ae)}function xi(){de!==n&&Tb(de),Le=0,H=ye=K=de=n}function Vr(){return de===n?ae:Wt(Vu())}function ki(){var Un=Vu(),io=ft(Un);if(H=arguments,K=this,ye=Un,io){if(de===n)return pt(ye);if(Pe)return Tb(de),de=ql(Nt,y),nt(ye)}return de===n&&(de=ql(Nt,y)),ae}return ki.cancel=xi,ki.flush=Vr,ki}var HD=Lt(function(s,y){return cb(s,1,y)}),UD=Lt(function(s,y,A){return cb(s,Pi(y)||0,A)});function VD(s){return Wo(s,O)}function qu(s,y){if(typeof s!="function"||y!=null&&typeof y!="function")throw new sn(p);var A=function(){var H=arguments,K=y?y.apply(this,H):H[0],ee=A.cache;if(ee.has(K))return ee.get(K);var ae=s.apply(this,H);return A.cache=ee.set(K,ae)||ee,ae};return A.cache=new(qu.Cache||Bo),A}qu.Cache=Bo;function Ku(s){if(typeof s!="function")throw new sn(p);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 qD(s){return mx(2,s)}var KD=OI(function(s,y){y=y.length==1&&xt(y[0])?v(y[0],lt(ht())):v(br(y,1),lt(ht()));var A=y.length;return Lt(function(H){for(var K=-1,ee=Lr(H.length,A);++K<ee;)H[K]=y[K].call(this,H[K]);return dr(s,this,H)})}),pf=Lt(function(s,y){var A=je(y,za(pf));return Wo(s,_,n,y,A)}),xx=Lt(function(s,y){var A=je(y,za(xx));return Wo(s,x,n,y,A)}),GD=zo(function(s,y){return Wo(s,I,n,n,n,y)});function YD(s,y){if(typeof s!="function")throw new sn(p);return y=y===n?y:Et(y),Lt(s,y)}function XD(s,y){if(typeof s!="function")throw new sn(p);return y=y==null?0:lr(Et(y),0),Lt(function(A){var H=A[y],K=gs(A,0,y);return H&&M(K,H),dr(s,this,K)})}function QD(s,y,A){var H=!0,K=!0;if(typeof s!="function")throw new sn(p);return $n(A)&&(H="leading"in A?!!A.leading:H,K="trailing"in A?!!A.trailing:K),bx(s,y,{leading:H,maxWait:y,trailing:K})}function ZD(s){return gx(s,1)}function JD(s,y){return pf(Xp(y),s)}function eP(){if(!arguments.length)return[];var s=arguments[0];return xt(s)?s:[s]}function tP(s){return Ii(s,c)}function nP(s,y){return y=typeof y=="function"?y:n,Ii(s,c,y)}function rP(s){return Ii(s,a|c)}function iP(s,y){return y=typeof y=="function"?y:n,Ii(s,a|c,y)}function oP(s,y){return y==null||lb(s,y,mr(y))}function ro(s,y){return s===y||s!==s&&y!==y}var sP=Bu(Fp),aP=Bu(function(s,y){return s>=y}),oa=fb(function(){return arguments}())?fb:function(s){return On(s)&&rn.call(s,"callee")&&!eb.call(s,"callee")},xt=xe.isArray,lP=ri?lt(ri):mI;function oi(s){return s!=null&&Gu(s.length)&&!Uo(s)}function Hn(s){return On(s)&&oi(s)}function cP(s){return s===!0||s===!1||On(s)&&Hr(s)==Ee}var ms=_2||Cf,uP=us?lt(us):yI;function hP(s){return On(s)&&s.nodeType===1&&!Kl(s)}function dP(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!Wp(s).length;for(var A in s)if(rn.call(s,A))return!1;return!0}function pP(s,y){return zl(s,y)}function fP(s,y,A){A=typeof A=="function"?A:n;var H=A?A(s,y):n;return H===n?zl(s,y,n,A):!!H}function ff(s){if(!On(s))return!1;var y=Hr(s);return y==Xe||y==Re||typeof s.message=="string"&&typeof s.name=="string"&&!Kl(s)}function gP(s){return typeof s=="number"&&nb(s)}function Uo(s){if(!$n(s))return!1;var y=Hr(s);return y==Ke||y==dt||y==ge||y==hi}function kx(s){return typeof s=="number"&&s==Et(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):wI;function mP(s,y){return s===y||jp(s,y,rf(y))}function yP(s,y,A){return A=typeof A=="function"?A:n,jp(s,y,rf(y),A)}function vP(s){return Cx(s)&&s!=+s}function wP(s){if(nN(s))throw new ct(d);return gb(s)}function bP(s){return s===null}function xP(s){return s==null}function Cx(s){return typeof s=="number"||On(s)&&Hr(s)==gt}function Kl(s){if(!On(s)||Hr(s)!=Bn)return!1;var y=xu(s);if(y===null)return!0;var A=rn.call(y,"constructor")&&y.constructor;return typeof A=="function"&&A instanceof A&&yu.call(A)==y2}var gf=gi?lt(gi):bI;function kP(s){return kx(s)&&s>=-U&&s<=U}var Sx=mi?lt(mi):xI;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):kI;function _P(s){return s===n}function CP(s){return On(s)&&Or(s)==Ve}function SP(s){return On(s)&&Hr(s)==Vt}var $P=Bu(zp),MP=Bu(function(s,y){return s<=y});function $x(s){if(!s)return[];if(oi(s))return Yu(s)?bt(s):ii(s);if(Il&&s[Il])return be(s[Il]());var y=Or(s),A=y==rt?Te:y==Xn?Ue:Ua;return A(s)}function Vo(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 Et(s){var y=Vo(s),A=y%1;return y===y?A?y-A:y:0}function Mx(s){return s?ta(Et(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 A=Ra.test(s);return A||Wn.test(s)?dn(s.slice(2),A?2:8):Pt.test(s)?Z:+s}function Ex(s){return xo(s,si(s))}function EP(s){return s?ta(Et(s),-U,U):s===0?s:0}function Jt(s){return s==null?"":wi(s)}var AP=ja(function(s,y){if(Vl(y)||oi(y)){xo(y,mr(y),s);return}for(var A in y)rn.call(y,A)&&Bl(s,A,y[A])}),Ax=ja(function(s,y){xo(y,si(y),s)}),Xu=ja(function(s,y,A,H){xo(y,si(y),s,H)}),TP=ja(function(s,y,A,H){xo(y,mr(y),s,H)}),RP=zo(Np);function LP(s,y){var A=Ba(s);return y==null?A:ab(A,y)}var OP=Lt(function(s,y){s=At(s);var A=-1,H=y.length,K=H>2?y[2]:n;for(K&&Ur(y[0],y[1],K)&&(H=1);++A<H;)for(var ee=y[A],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}),IP=Lt(function(s){return s.push(n,qb),dr(Tx,n,s)});function NP(s,y){return Q(s,ht(y,3),bo)}function DP(s,y){return Q(s,ht(y,3),Pp)}function PP(s,y){return s==null?s:Dp(s,ht(y,3),si)}function FP(s,y){return s==null?s:db(s,ht(y,3),si)}function BP(s,y){return s&&bo(s,ht(y,3))}function jP(s,y){return s&&Pp(s,ht(y,3))}function WP(s){return s==null?[]:Ru(s,mr(s))}function zP(s){return s==null?[]:Ru(s,si(s))}function mf(s,y,A){var H=s==null?n:na(s,y);return H===n?A:H}function HP(s,y){return s!=null&&Yb(s,y,dI)}function yf(s,y){return s!=null&&Yb(s,y,pI)}var UP=Wb(function(s,y,A){y!=null&&typeof y.toString!="function"&&(y=vu.call(y)),s[y]=A},wf(ai)),VP=Wb(function(s,y,A){y!=null&&typeof y.toString!="function"&&(y=vu.call(y)),rn.call(s,y)?s[y].push(A):s[y]=[A]},ht),qP=Lt(Wl);function mr(s){return oi(s)?ob(s):Wp(s)}function si(s){return oi(s)?ob(s,!0):_I(s)}function KP(s,y){var A={};return y=ht(y,3),bo(s,function(H,K,ee){jo(A,y(H,K,ee),H)}),A}function GP(s,y){var A={};return y=ht(y,3),bo(s,function(H,K,ee){jo(A,K,y(H,K,ee))}),A}var YP=ja(function(s,y,A){Lu(s,y,A)}),Tx=ja(function(s,y,A,H){Lu(s,y,A,H)}),XP=zo(function(s,y){var A={};if(s==null)return A;var H=!1;y=v(y,function(ee){return ee=fs(ee,s),H||(H=ee.length>1),ee}),xo(s,tf(s),A),H&&(A=Ii(A,a|h|c,UI));for(var K=y.length;K--;)Kp(A,y[K]);return A});function QP(s,y){return Rx(s,Ku(ht(y)))}var ZP=zo(function(s,y){return s==null?{}:SI(s,y)});function Rx(s,y){if(s==null)return{};var A=v(tf(s),function(H){return[H]});return y=ht(y),kb(s,A,function(H,K){return y(H,K[0])})}function JP(s,y,A){y=fs(y,s);var H=-1,K=y.length;for(K||(K=1,s=n);++H<K;){var ee=s==null?n:s[ko(y[H])];ee===n&&(H=K,ee=A),s=Uo(ee)?ee.call(s):ee}return s}function eF(s,y,A){return s==null?s:Hl(s,y,A)}function tF(s,y,A,H){return H=typeof H=="function"?H:n,s==null?s:Hl(s,y,A,H)}var Lx=Ub(mr),Ox=Ub(si);function nF(s,y,A){var H=xt(s),K=H||ms(s)||Ha(s);if(y=ht(y,4),A==null){var ee=s&&s.constructor;K?A=H?new ee:[]:$n(s)?A=Uo(ee)?Ba(xu(s)):{}:A={}}return(K?vr:bo)(s,function(ae,de,ye){return y(A,ae,de,ye)}),A}function rF(s,y){return s==null?!0:Kp(s,y)}function iF(s,y,A){return s==null?s:Mb(s,y,Xp(A))}function oF(s,y,A,H){return H=typeof H=="function"?H:n,s==null?s:Mb(s,y,Xp(A),H)}function Ua(s){return s==null?[]:vn(s,mr(s))}function sF(s){return s==null?[]:vn(s,si(s))}function aF(s,y,A){return A===n&&(A=y,y=n),A!==n&&(A=Pi(A),A=A===A?A:0),y!==n&&(y=Pi(y),y=y===y?y:0),ta(Pi(s),y,A)}function lF(s,y,A){return y=Vo(y),A===n?(A=y,y=0):A=Vo(A),s=Pi(s),fI(s,y,A)}function cF(s,y,A){if(A&&typeof A!="boolean"&&Ur(s,y,A)&&(y=A=n),A===n&&(typeof y=="boolean"?(A=y,y=n):typeof s=="boolean"&&(A=s,s=n)),s===n&&y===n?(s=0,y=1):(s=Vo(s),y===n?(y=s,s=0):y=Vo(y)),s>y){var H=s;s=y,y=H}if(A||s%1||y%1){var K=rb();return Lr(s+K*(y-s+We("1e-"+((K+"").length-1))),y)}return Up(s,y)}var uF=Wa(function(s,y,A){return y=y.toLowerCase(),s+(A?Ix(y):y)});function Ix(s){return vf(Jt(s).toLowerCase())}function Nx(s){return s=Jt(s),s&&s.replace(En,wn).replace(No,"")}function hF(s,y,A){s=Jt(s),y=wi(y);var H=s.length;A=A===n?H:ta(Et(A),0,H);var K=A;return A-=y.length,A>=0&&s.slice(A,K)==y}function dF(s){return s=Jt(s),s&&Al.test(s)?s.replace(Eo,V):s}function pF(s){return s=Jt(s),s&&Qi.test(s)?s.replace(Mr,"\\$&"):s}var fF=Wa(function(s,y,A){return s+(A?"-":"")+y.toLowerCase()}),gF=Wa(function(s,y,A){return s+(A?" ":"")+y.toLowerCase()}),mF=Fb("toLowerCase");function yF(s,y,A){s=Jt(s),y=Et(y);var H=y?Ot(s):0;if(!y||H>=y)return s;var K=(y-H)/2;return Fu(Su(K),A)+s+Fu(Cu(K),A)}function vF(s,y,A){s=Jt(s),y=Et(y);var H=y?Ot(s):0;return y&&H<y?s+Fu(y-H,A):s}function wF(s,y,A){s=Jt(s),y=Et(y);var H=y?Ot(s):0;return y&&H<y?Fu(y-H,A)+s:s}function bF(s,y,A){return A||y==null?y=0:y&&(y=+y),M2(Jt(s).replace(Cn,""),y||0)}function xF(s,y,A){return(A?Ur(s,y,A):y===n)?y=1:y=Et(y),Vp(Jt(s),y)}function kF(){var s=arguments,y=Jt(s[0]);return s.length<3?y:y.replace(s[1],s[2])}var _F=Wa(function(s,y,A){return s+(A?"_":"")+y.toLowerCase()});function CF(s,y,A){return A&&typeof A!="number"&&Ur(s,y,A)&&(y=A=n),A=A===n?te:A>>>0,A?(s=Jt(s),s&&(typeof y=="string"||y!=null&&!gf(y))&&(y=wi(y),!y&&oe(s))?gs(bt(s),0,A):s.split(y,A)):[]}var SF=Wa(function(s,y,A){return s+(A?" ":"")+vf(y)});function $F(s,y,A){return s=Jt(s),A=A==null?0:ta(Et(A),0,s.length),y=wi(y),s.slice(A,A+y.length)==y}function MF(s,y,A){var H=J.templateSettings;A&&Ur(s,y,A)&&(y=n),s=Jt(s),y=Xu({},y,H,Vb);var K=Xu({},y.imports,H.imports,Vb),ee=mr(K),ae=vn(K,ee),de,ye,Le=0,Oe=y.interpolate||Si,Pe="__p += '",qe=zr((y.escape||Si).source+"|"+Oe.source+"|"+(Oe===zs?Ji:Si).source+"|"+(y.evaluate||Si).source+"|$","g"),nt="//# sourceURL="+(rn.call(y,"sourceURL")?(y.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++wo+"]")+`
1478
+ `;s.replace(qe,function(ft,Nt,Wt,xi,Vr,ki){return Wt||(Wt=xi),Pe+=s.slice(Le,ki).replace(Tr,X),Nt&&(de=!0,Pe+=`' +
1479
+ __e(`+Nt+`) +
1480
+ '`),Vr&&(ye=!0,Pe+=`';
1481
+ `+Vr+`;
1482
+ __p += '`),Wt&&(Pe+=`' +
1483
+ ((__t = (`+Wt+`)) == null ? '' : __t) +
1484
+ '`),Le=ki+ft.length,ft}),Pe+=`';
1485
+ `;var pt=rn.call(y,"variable")&&y.variable;if(!pt)Pe=`with (obj) {
1486
+ `+Pe+`
1487
+ }
1488
+ `;else if(Rl.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 Tt=Px(function(){return Mt(ee,nt+"return "+Pe).apply(n,ae)});if(Tt.source=Pe,ff(Tt))throw Tt;return Tt}function EF(s){return Jt(s).toLowerCase()}function AF(s){return Jt(s).toUpperCase()}function TF(s,y,A){if(s=Jt(s),s&&(A||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 RF(s,y,A){if(s=Jt(s),s&&(A||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 LF(s,y,A){if(s=Jt(s),s&&(A||y===n))return s.replace(Cn,"");if(!s||!(y=wi(y)))return s;var H=bt(s),K=$t(H,bt(y));return gs(H,K).join("")}function OF(s,y){var A=L,H=W;if($n(y)){var K="separator"in y?y.separator:K;A="length"in y?Et(y.length):A,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(A>=ee)return s;var de=A-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),gf(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 qe=ye.lastIndexOf(K);qe>-1&&(ye=ye.slice(0,qe))}return ye+H}function IF(s){return s=Jt(s),s&&Jo.test(s)?s.replace(yr,ut):s}var NF=Wa(function(s,y,A){return s+(A?" ":"")+y.toUpperCase()}),vf=Fb("toUpperCase");function Dx(s,y,A){return s=Jt(s),y=A?n:y,y===n?fe(s)?bn(s):Y(s):s.match(y)||[]}var Px=Lt(function(s,y){try{return dr(s,n,y)}catch(A){return ff(A)?A:new ct(A)}}),DF=zo(function(s,y){return vr(y,function(A){A=ko(A),jo(s,A,df(s[A],s))}),s});function PF(s){var y=s==null?0:s.length,A=ht();return s=y?v(s,function(H){if(typeof H[1]!="function")throw new sn(p);return[A(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 FF(s){return cI(Ii(s,a))}function wf(s){return function(){return s}}function BF(s,y){return s==null||s!==s?y:s}var jF=jb(),WF=jb(!0);function ai(s){return s}function bf(s){return mb(typeof s=="function"?s:Ii(s,a))}function zF(s){return vb(Ii(s,a))}function HF(s,y){return wb(s,Ii(y,a))}var UF=Lt(function(s,y){return function(A){return Wl(A,s,y)}}),VF=Lt(function(s,y){return function(A){return Wl(s,A,y)}});function xf(s,y,A){var H=mr(y),K=Ru(y,H);A==null&&!($n(y)&&(K.length||!H.length))&&(A=y,y=s,s=this,K=Ru(y,mr(y)));var ee=!($n(A)&&"chain"in A)||!!A.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,M([this.value()],arguments))})}),s}function qF(){return on._===this&&(on._=v2),this}function kf(){}function KF(s){return s=Et(s),Lt(function(y){return bb(y,s)})}var GF=Zp(v),YF=Zp(wr),XF=Zp(B);function Fx(s){return sf(s)?we(ko(s)):$I(s)}function QF(s){return function(y){return s==null?n:na(s,y)}}var ZF=zb(),JF=zb(!0);function _f(){return[]}function Cf(){return!1}function eB(){return{}}function tB(){return""}function nB(){return!0}function rB(s,y){if(s=Et(s),s<1||s>U)return[];var A=te,H=Lr(s,te);y=ht(y),s-=te;for(var K=Ye(H,y);++A<s;)y(A);return K}function iB(s){return xt(s)?v(s,ko):bi(s)?[s]:ii(ix(Jt(s)))}function oB(s){var y=++m2;return Jt(s)+y}var sB=Pu(function(s,y){return s+y},0),aB=Jp("ceil"),lB=Pu(function(s,y){return s/y},1),cB=Jp("floor");function uB(s){return s&&s.length?Tu(s,ai,Fp):n}function hB(s,y){return s&&s.length?Tu(s,ht(y,2),Fp):n}function dB(s){return me(s,ai)}function pB(s,y){return me(s,ht(y,2))}function fB(s){return s&&s.length?Tu(s,ai,zp):n}function gB(s,y){return s&&s.length?Tu(s,ht(y,2),zp):n}var mB=Pu(function(s,y){return s*y},1),yB=Jp("round"),vB=Pu(function(s,y){return s-y},0);function wB(s){return s&&s.length?st(s,ai):0}function bB(s,y){return s&&s.length?st(s,ht(y,2)):0}return J.after=zD,J.ary=gx,J.assign=AP,J.assignIn=Ax,J.assignInWith=Xu,J.assignWith=TP,J.at=RP,J.before=mx,J.bind=df,J.bindAll=DF,J.bindKey=yx,J.castArray=eP,J.chain=dx,J.chunk=cN,J.compact=uN,J.concat=hN,J.cond=PF,J.conforms=FF,J.constant=wf,J.countBy=wD,J.create=LP,J.curry=vx,J.curryRight=wx,J.debounce=bx,J.defaults=OP,J.defaultsDeep=IP,J.defer=HD,J.delay=UD,J.difference=dN,J.differenceBy=pN,J.differenceWith=fN,J.drop=gN,J.dropRight=mN,J.dropRightWhile=yN,J.dropWhile=vN,J.fill=wN,J.filter=xD,J.flatMap=CD,J.flatMapDeep=SD,J.flatMapDepth=$D,J.flatten=lx,J.flattenDeep=bN,J.flattenDepth=xN,J.flip=VD,J.flow=jF,J.flowRight=WF,J.fromPairs=kN,J.functions=WP,J.functionsIn=zP,J.groupBy=MD,J.initial=CN,J.intersection=SN,J.intersectionBy=$N,J.intersectionWith=MN,J.invert=UP,J.invertBy=VP,J.invokeMap=AD,J.iteratee=bf,J.keyBy=TD,J.keys=mr,J.keysIn=si,J.map=Uu,J.mapKeys=KP,J.mapValues=GP,J.matches=zF,J.matchesProperty=HF,J.memoize=qu,J.merge=YP,J.mergeWith=Tx,J.method=UF,J.methodOf=VF,J.mixin=xf,J.negate=Ku,J.nthArg=KF,J.omit=XP,J.omitBy=QP,J.once=qD,J.orderBy=RD,J.over=GF,J.overArgs=KD,J.overEvery=YF,J.overSome=XF,J.partial=pf,J.partialRight=xx,J.partition=LD,J.pick=ZP,J.pickBy=Rx,J.property=Fx,J.propertyOf=QF,J.pull=RN,J.pullAll=ux,J.pullAllBy=LN,J.pullAllWith=ON,J.pullAt=IN,J.range=ZF,J.rangeRight=JF,J.rearg=GD,J.reject=ND,J.remove=NN,J.rest=YD,J.reverse=uf,J.sampleSize=PD,J.set=eF,J.setWith=tF,J.shuffle=FD,J.slice=DN,J.sortBy=WD,J.sortedUniq=HN,J.sortedUniqBy=UN,J.split=CF,J.spread=XD,J.tail=VN,J.take=qN,J.takeRight=KN,J.takeRightWhile=GN,J.takeWhile=YN,J.tap=uD,J.throttle=QD,J.thru=Hu,J.toArray=$x,J.toPairs=Lx,J.toPairsIn=Ox,J.toPath=iB,J.toPlainObject=Ex,J.transform=nF,J.unary=ZD,J.union=XN,J.unionBy=QN,J.unionWith=ZN,J.uniq=JN,J.uniqBy=eD,J.uniqWith=tD,J.unset=rF,J.unzip=hf,J.unzipWith=hx,J.update=iF,J.updateWith=oF,J.values=Ua,J.valuesIn=sF,J.without=nD,J.words=Dx,J.wrap=JD,J.xor=rD,J.xorBy=iD,J.xorWith=oD,J.zip=sD,J.zipObject=aD,J.zipObjectDeep=lD,J.zipWith=cD,J.entries=Lx,J.entriesIn=Ox,J.extend=Ax,J.extendWith=Xu,xf(J,J),J.add=sB,J.attempt=Px,J.camelCase=uF,J.capitalize=Ix,J.ceil=aB,J.clamp=aF,J.clone=tP,J.cloneDeep=rP,J.cloneDeepWith=iP,J.cloneWith=nP,J.conformsTo=oP,J.deburr=Nx,J.defaultTo=BF,J.divide=lB,J.endsWith=hF,J.eq=ro,J.escape=dF,J.escapeRegExp=pF,J.every=bD,J.find=kD,J.findIndex=sx,J.findKey=NP,J.findLast=_D,J.findLastIndex=ax,J.findLastKey=DP,J.floor=cB,J.forEach=px,J.forEachRight=fx,J.forIn=PP,J.forInRight=FP,J.forOwn=BP,J.forOwnRight=jP,J.get=mf,J.gt=sP,J.gte=aP,J.has=HP,J.hasIn=yf,J.head=cx,J.identity=ai,J.includes=ED,J.indexOf=_N,J.inRange=lF,J.invoke=qP,J.isArguments=oa,J.isArray=xt,J.isArrayBuffer=lP,J.isArrayLike=oi,J.isArrayLikeObject=Hn,J.isBoolean=cP,J.isBuffer=ms,J.isDate=uP,J.isElement=hP,J.isEmpty=dP,J.isEqual=pP,J.isEqualWith=fP,J.isError=ff,J.isFinite=gP,J.isFunction=Uo,J.isInteger=kx,J.isLength=Gu,J.isMap=_x,J.isMatch=mP,J.isMatchWith=yP,J.isNaN=vP,J.isNative=wP,J.isNil=xP,J.isNull=bP,J.isNumber=Cx,J.isObject=$n,J.isObjectLike=On,J.isPlainObject=Kl,J.isRegExp=gf,J.isSafeInteger=kP,J.isSet=Sx,J.isString=Yu,J.isSymbol=bi,J.isTypedArray=Ha,J.isUndefined=_P,J.isWeakMap=CP,J.isWeakSet=SP,J.join=EN,J.kebabCase=fF,J.last=Di,J.lastIndexOf=AN,J.lowerCase=gF,J.lowerFirst=mF,J.lt=$P,J.lte=MP,J.max=uB,J.maxBy=hB,J.mean=dB,J.meanBy=pB,J.min=fB,J.minBy=gB,J.stubArray=_f,J.stubFalse=Cf,J.stubObject=eB,J.stubString=tB,J.stubTrue=nB,J.multiply=mB,J.nth=TN,J.noConflict=qF,J.noop=kf,J.now=Vu,J.pad=yF,J.padEnd=vF,J.padStart=wF,J.parseInt=bF,J.random=cF,J.reduce=OD,J.reduceRight=ID,J.repeat=xF,J.replace=kF,J.result=JP,J.round=yB,J.runInContext=pe,J.sample=DD,J.size=BD,J.snakeCase=_F,J.some=jD,J.sortedIndex=PN,J.sortedIndexBy=FN,J.sortedIndexOf=BN,J.sortedLastIndex=jN,J.sortedLastIndexBy=WN,J.sortedLastIndexOf=zN,J.startCase=SF,J.startsWith=$F,J.subtract=vB,J.sum=wB,J.sumBy=bB,J.template=MF,J.times=rB,J.toFinite=Vo,J.toInteger=Et,J.toLength=Mx,J.toLower=EF,J.toNumber=Pi,J.toSafeInteger=EP,J.toString=Jt,J.toUpper=AF,J.trim=TF,J.trimEnd=RF,J.trimStart=LF,J.truncate=OF,J.unescape=IF,J.uniqueId=oB,J.upperCase=NF,J.upperFirst=vf,J.each=px,J.eachRight=fx,J.first=cx,xf(J,function(){var s={};return bo(J,function(y,A){rn.call(J.prototype,A)||(s[A]=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(A){A=A===n?1:lr(Et(A),0);var H=this.__filtered__&&!y?new Bt(this):this.clone();return H.__filtered__?H.__takeCount__=Lr(A,H.__takeCount__):H.__views__.push({size:Lr(A,te),type:s+(H.__dir__<0?"Right":"")}),H},Bt.prototype[s+"Right"]=function(A){return this.reverse()[s](A).reverse()}}),vr(["filter","map","takeWhile"],function(s,y){var A=y+1,H=A==$||A==D;Bt.prototype[s]=function(K){var ee=this.clone();return ee.__iteratees__.push({iteratee:ht(K,3),type:A}),ee.__filtered__=ee.__filtered__||H,ee}}),vr(["head","last"],function(s,y){var A="take"+(y?"Right":"");Bt.prototype[s]=function(){return this[A](1).value()[0]}}),vr(["initial","tail"],function(s,y){var A="drop"+(y?"":"Right");Bt.prototype[s]=function(){return this.__filtered__?new Bt(this):this[A](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(A){return Wl(A,s,y)})}),Bt.prototype.reject=function(s){return this.filter(Ku(ht(s)))},Bt.prototype.slice=function(s,y){s=Et(s);var A=this;return A.__filtered__&&(s>0||y<0)?new Bt(A):(s<0?A=A.takeRight(-s):s&&(A=A.drop(s)),y!==n&&(y=Et(y),A=y<0?A.dropRight(-y):A.take(y-s)),A)},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 A=/^(?: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,M([Nt],de));return H&&qe?Wt[0]:Wt};Oe&&A&&typeof Le=="function"&&Le.length!=1&&(ye=Oe=!1);var qe=this.__chain__,nt=!!this.__actions__.length,pt=ee&&!qe,Tt=ye&&!nt;if(!ee&&Oe){ae=Tt?ae:new Bt(this);var ft=s.apply(ae,de);return ft.__actions__.push({func:Hu,args:[Pe],thisArg:n}),new Oi(ft,qe)}return pt&&Tt?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],A=/^(?: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[A](function(ae){return y.apply(xt(ae)?ae:[],K)})}}),bo(Bt.prototype,function(s,y){var A=J[y];if(A){var H=A.name+"";rn.call(Fa,H)||(Fa[H]=[]),Fa[H].push({name:y,func:A})}}),Fa[Du(n,b).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=I2,Bt.prototype.reverse=N2,Bt.prototype.value=D2,J.prototype.at=hD,J.prototype.chain=dD,J.prototype.commit=pD,J.prototype.next=fD,J.prototype.plant=mD,J.prototype.reverse=yD,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=vD,J.prototype.first=J.prototype.head,Il&&(J.prototype[Il]=gD),J},jt=er();Zn?((Zn.exports=jt)._=jt,mn._=jt):on._=jt}).call(S$)}(Mc,Mc.exports)),Mc.exports}var M$=$$();Fi("a",lc(M$)).debounce(function(){this.rebuildDisplayText()},300);var Zm={exports:{}},Jm;function E$(){return Jm||(Jm=1,function(t,e){(function(){ace.require(["ace/mode/text"],function(n){t&&(t.exports=n)})})()}(Zm)),Zm.exports}E$();const A$=!0,tr="u-",T$="uplot",R$=tr+"hz",L$=tr+"vt",O$=tr+"title",I$=tr+"wrap",N$=tr+"under",D$=tr+"over",P$=tr+"axis",Ts=tr+"off",F$=tr+"select",B$=tr+"cursor-x",j$=tr+"cursor-y",W$=tr+"cursor-pt",z$=tr+"legend",H$=tr+"live",U$=tr+"inline",V$=tr+"series",q$=tr+"marker",ey=tr+"label",K$=tr+"value",ll="width",cl="height",ul="top",ty="bottom",fa="left",Wh="right",zh="#000",ny=zh+"0",Hh="mousemove",ry="mousedown",Uh="mouseup",iy="mouseenter",oy="mouseleave",sy="dblclick",G$="resize",Y$="scroll",ay="change",Ec="dppxchange",Vh="--",ga=typeof window<"u",qh=ga?document:null,ma=ga?window:null,X$=ga?navigator:null;let Kt,Ac;function Kh(){let t=devicePixelRatio;Kt!=t&&(Kt=t,Ac&&Xh(ay,Ac,Kh),Ac=matchMedia(`(min-resolution: ${Kt-.001}dppx) and (max-resolution: ${Kt+.001}dppx)`),Rs(ay,Ac,Kh),ma.dispatchEvent(new CustomEvent(Ec)))}function li(t,e){if(e!=null){let n=t.classList;!n.contains(e)&&n.add(e)}}function Gh(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 u=qh.createElement(t);return e!=null&&li(u,e),n!=null&&n.insertBefore(u,r),u}function _i(t,e){return zi("div",t,e)}const ly=new WeakMap;function lo(t,e,n,r,u){let d="translate("+e+"px,"+n+"px)",p=ly.get(t);d!=p&&(t.style.transform=d,ly.set(t,d),e<0||n<0||e>r||n>u?li(t,Ts):Gh(t,Ts))}const cy=new WeakMap;function uy(t,e,n){let r=e+n,u=cy.get(t);r!=u&&(cy.set(t,r),t.style.background=e,t.style.borderColor=n)}const hy=new WeakMap;function dy(t,e,n,r){let u=e+""+n,d=hy.get(t);u!=d&&(hy.set(t,u),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 Yh={passive:!0},Q$={...Yh,capture:!0};function Rs(t,e,n,r){e.addEventListener(t,n,r?Q$:Yh)}function Xh(t,e,n,r){e.removeEventListener(t,n,Yh)}ga&&Kh();function Hi(t,e,n,r){let u;n=n||0,r=r||e.length-1;let d=r<=2147483647;for(;r-n>1;)u=d?n+r>>1:ui((n+r)/2),e[u]<t?n=u:r=u;return t-e[n]<=e[r]-t?n:r}function py(t){return(e,n,r)=>{let u=-1,d=-1;for(let p=n;p<=r;p++)if(t(e[p])){u=p;break}for(let p=r;p>=n;p--)if(t(e[p])){d=p;break}return[u,d]}}const fy=t=>t!=null,gy=t=>t!=null&&t>0,Tc=py(fy),Z$=py(gy);function J$(t,e,n,r=0,u=!1){let d=u?Z$:Tc,p=u?gy:fy;[e,n]=d(t,e,n);let w=t[e],f=t[e];if(e>-1)if(r==1)w=t[e],f=t[n];else if(r==-1)w=t[n],f=t[e];else for(let g=e;g<=n;g++){let i=t[g];p(i)&&(i<w?w=i:i>f&&(f=i))}return[w??an,f??-an]}function Rc(t,e,n,r){let u=vy(t),d=vy(e);t==e&&(u==-1?(t*=n,e/=n):(t/=n,e*=n));let p=n==10?Co:wy,w=u==1?ui:Ci,f=d==1?Ci:ui,g=w(p(nr(t))),i=f(p(nr(e))),a=ya(n,g),h=ya(n,i);return n==10&&(g<0&&(a=ln(a,-g)),i<0&&(h=ln(h,-i))),r||n==2?(t=a*u,e=h*d):(t=$y(t,a),e=Ic(e,h)),[t,e]}function Qh(t,e,n,r){let u=Rc(t,e,n,r);return t==0&&(u[0]=0),e==0&&(u[1]=0),u}const Zh=.1,my={mode:3,pad:Zh},hl={pad:0,soft:null,mode:0},eM={min:hl,max:hl};function Lc(t,e,n,r){return Nc(n)?yy(t,e,n):(hl.pad=n,hl.soft=r?0:null,hl.mode=r?3:0,yy(t,e,eM))}function Ut(t,e){return t??e}function tM(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 yy(t,e,n){let r=n.min,u=n.max,d=Ut(r.pad,0),p=Ut(u.pad,0),w=Ut(r.hard,-an),f=Ut(u.hard,an),g=Ut(r.soft,an),i=Ut(u.soft,-an),a=Ut(r.mode,0),h=Ut(u.mode,0),c=e-t,o=Co(c),l=Dr(nr(t),nr(e)),m=Co(l),b=nr(m-o);(c<1e-24||b>10)&&(c=0,(t==0||e==0)&&(c=1e-24,a==2&&g!=an&&(d=0),h==2&&i!=-an&&(p=0)));let k=c||l||1e3,T=Co(k),E=ya(10,ui(T)),_=k*(c==0?t==0?.1:1:d),x=ln($y(t-_,E/10),24),R=t>=g&&(a==1||a==3&&x<=g||a==2&&x>=g)?g:an,I=Dr(w,x<R&&t>=R?R:Ui(R,x)),O=k*(c==0?e==0?.1:1:p),L=ln(Ic(e+O,E/10),24),W=e<=i&&(h==1||h==3&&L>=i||h==2&&L<=i)?i:-an,F=Ui(f,L>W&&e<=W?W:Dr(W,L));return I==F&&I==0&&(F=100),[I,F]}const nM=new Intl.NumberFormat(ga?X$.language:"en-US"),Jh=t=>nM.format(t),ci=Math,Oc=ci.PI,nr=ci.abs,ui=ci.floor,rr=ci.round,Ci=ci.ceil,Ui=ci.min,Dr=ci.max,ya=ci.pow,vy=ci.sign,Co=ci.log10,wy=ci.log2,rM=(t,e=1)=>ci.sinh(t)*e,ed=(t,e=1)=>ci.asinh(t/e),an=1/0;function by(t){return(Co((t^t>>31)-(t>>31))|0)+1}function td(t,e,n){return Ui(Dr(t,e),n)}function xy(t){return typeof t=="function"}function Dt(t){return xy(t)?t:()=>t}const iM=()=>{},ky=t=>t,_y=(t,e)=>e,oM=t=>null,Cy=t=>!0,Sy=(t,e)=>t==e,sM=/\.\d*?(?=9{6,}|0{6,})/gm,Ls=t=>{if(Ey(t)||Qo.has(t))return t;const e=`${t}`,n=e.match(sM);if(n==null)return t;let r=n[0].length-1;if(e.indexOf("e-")!=-1){let[u,d]=e.split("e");return+`${Ls(u)}e${d}`}return ln(t,r)};function Os(t,e){return Ls(ln(Ls(t/e))*e)}function Ic(t,e){return Ls(Ci(Ls(t/e))*e)}function $y(t,e){return Ls(ui(Ls(t/e))*e)}function ln(t,e=0){if(Ey(t))return t;let n=10**e,r=t*n*(1+Number.EPSILON);return rr(r)/n}const Qo=new Map;function My(t){return((""+t).split(".")[1]||"").length}function dl(t,e,n,r){let u=[],d=r.map(My);for(let p=e;p<n;p++){let w=nr(p),f=ln(ya(t,p),w);for(let g=0;g<r.length;g++){let i=t==10?+`${r[g]}e${p}`:r[g]*f,a=(p>=0?0:w)+(p>=d[g]?0:d[g]),h=t==10?i:ln(i,a);u.push(h),Qo.set(h,a)}}return u}const pl={},nd=[],va=[null,null],Zo=Array.isArray,Ey=Number.isInteger,aM=t=>t===void 0;function Ay(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 lM(t){return t!=null&&typeof t=="object"}const cM=Object.getPrototypeOf(Uint8Array),Ty="__proto__";function wa(t,e=Nc){let n;if(Zo(t)){let r=t.find(u=>u!=null);if(Zo(r)||e(r)){n=Array(t.length);for(let u=0;u<t.length;u++)n[u]=wa(t[u],e)}else n=t.slice()}else if(t instanceof cM)n=t.slice();else if(e(t)){n={};for(let r in t)r!=Ty&&(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 u in r)u!=Ty&&(Nc(t[u])?Gn(t[u],wa(r[u])):t[u]=wa(r[u]))}return t}const uM=0,hM=1,dM=2;function pM(t,e,n){for(let r=0,u,d=-1;r<e.length;r++){let p=e[r];if(p>d){for(u=p-1;u>=0&&t[u]==null;)t[u--]=null;for(u=p+1;u<n&&t[u]==null;)t[d=u++]=null}}}function fM(t,e){if(yM(t)){let p=t[0].slice();for(let w=1;w<t.length;w++)p.push(...t[w].slice(1));return vM(p[0])||(p=mM(p)),p}let n=new Set;for(let p=0;p<t.length;p++){let w=t[p][0],f=w.length;for(let g=0;g<f;g++)n.add(w[g])}let r=[Array.from(n).sort((p,w)=>p-w)],u=r[0].length,d=new Map;for(let p=0;p<u;p++)d.set(r[0][p],p);for(let p=0;p<t.length;p++){let w=t[p],f=w[0];for(let g=1;g<w.length;g++){let i=w[g],a=Array(u).fill(void 0),h=e?e[p][g]:hM,c=[];for(let o=0;o<i.length;o++){let l=i[o],m=d.get(f[o]);l===null?h!=uM&&(a[m]=l,h==dM&&c.push(m)):a[m]=l}pM(a,c,u),r.push(a)}}return r}const gM=typeof queueMicrotask>"u"?t=>Promise.resolve().then(t):queueMicrotask;function mM(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,p)=>e[d]-e[p]);let u=[];for(let d=0;d<t.length;d++){let p=t[d],w=Array(n);for(let f=0;f<n;f++)w[f]=p[r[f]];u.push(w)}return u}function yM(t){let e=t[0][0],n=e.length;for(let r=1;r<t.length;r++){let u=t[r][0];if(u.length!=n)return!1;if(u!=e){for(let d=0;d<n;d++)if(u[d]!=e[d])return!1}}return!0}function vM(t,e=100){const n=t.length;if(n<=1)return!0;let r=0,u=n-1;for(;r<=u&&t[r]==null;)r++;for(;u>=r&&t[u]==null;)u--;if(u<=r)return!0;const d=Dr(1,ui((u-r+1)/e));for(let p=t[r],w=r+d;w<=u;w+=d){const f=t[w];if(f!=null){if(f<=p)return!1;p=f}}return!0}const Ry=["January","February","March","April","May","June","July","August","September","October","November","December"],Ly=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Oy(t){return t.slice(0,3)}const wM=Ly.map(Oy),bM=Ry.map(Oy),xM={MMMM:Ry,MMM:bM,WWWW:Ly,WWW:wM};function fl(t){return(t<10?"0":"")+t}function kM(t){return(t<10?"00":t<100?"0":"")+t}const _M={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=>fl(t.getMonth()+1),M:t=>t.getMonth()+1,DD:t=>fl(t.getDate()),D:t=>t.getDate(),WWWW:(t,e)=>e.WWWW[t.getDay()],WWW:(t,e)=>e.WWW[t.getDay()],HH:t=>fl(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=>fl(t.getMinutes()),m:t=>t.getMinutes(),ss:t=>fl(t.getSeconds()),s:t=>t.getSeconds(),fff:t=>kM(t.getMilliseconds())};function rd(t,e){e=e||xM;let n=[],r=/\{([a-z]+)\}|[^{]+/gi,u;for(;u=r.exec(t);)n.push(u[0][0]=="{"?_M[u[1]]:u[0]);return d=>{let p="";for(let w=0;w<n.length;w++)p+=typeof n[w]=="string"?n[w]:n[w](d,e);return p}}const CM=new Intl.DateTimeFormat().resolvedOptions().timeZone;function SM(t,e){let n;return e=="UTC"||e=="Etc/UTC"?n=new Date(+t+t.getTimezoneOffset()*6e4):e==CM?n=t:(n=new Date(t.toLocaleString("en-US",{timeZone:e})),n.setMilliseconds(t.getMilliseconds())),n}const Iy=t=>t%1==0,Dc=[1,2,2.5,5],$M=dl(10,-32,0,Dc),Ny=dl(10,0,32,Dc),MM=Ny.filter(Iy),Is=$M.concat(Ny),id=`
1495
+ `,Dy="{YYYY}",Py=id+Dy,Fy="{M}/{D}",gl=id+Fy,Pc=gl+"/{YY}",By="{aa}",EM="{h}:{mm}",ba=EM+By,jy=id+ba,Wy=":{ss}",Qt=null;function zy(t){let e=t*1e3,n=e*60,r=n*60,u=r*24,d=u*30,p=u*365,w=(t==1?dl(10,0,3,Dc).filter(Iy):dl(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,u,u*2,u*3,u*4,u*5,u*6,u*7,u*8,u*9,u*10,u*15,d,d*2,d*3,d*4,d*6,p,p*2,p*5,p*10,p*25,p*50,p*100]);const f=[[p,Dy,Qt,Qt,Qt,Qt,Qt,Qt,1],[u*28,"{MMM}",Py,Qt,Qt,Qt,Qt,Qt,1],[u,Fy,Py,Qt,Qt,Qt,Qt,Qt,1],[r,"{h}"+By,Pc,Qt,gl,Qt,Qt,Qt,1],[n,ba,Pc,Qt,gl,Qt,Qt,Qt,1],[e,Wy,Pc+" "+ba,Qt,gl+" "+ba,Qt,jy,Qt,1],[t,Wy+".{fff}",Pc+" "+ba,Qt,gl+" "+ba,Qt,jy,Qt,1]];function g(i){return(a,h,c,o,l,m)=>{let b=[],k=l>=p,T=l>=d&&l<p,E=i(c),_=ln(E*t,3),x=od(E.getFullYear(),k?0:E.getMonth(),T||k?1:E.getDate()),R=ln(x*t,3);if(T||k){let I=T?l/d:0,O=k?l/p:0,L=_==R?_:ln(od(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 C=od(F+O*$,N+I*$,1),D=C-i(ln(C*t,3));L=ln((+C+D)*t,3),L<=o&&b.push(L)}}else{let I=l>=u?u:l,O=ui(c)-ui(_),L=R+O+Ic(_-R,I);b.push(L);let W=i(L),F=W.getHours()+W.getMinutes()/n+W.getSeconds()/r,N=l/r,$=a.axes[h]._space,C=m/$;for(;L=ln(L+l,t==1?0:3),!(L>o);)if(N>1){let D=ui(ln(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];ln((L-U)/l,3)*C>=.7&&b.push(L)}else b.push(L)}return b}}return[w,f,g]}const[AM,TM,RM]=zy(1),[LM,OM,IM]=zy(.001);dl(2,-53,53,[1]);function Hy(t,e){return t.map(n=>n.map((r,u)=>u==0||u==8||r==null?r:e(u==1||n[8]==0?r:n[1]+r)))}function Uy(t,e){return(n,r,u,d,p)=>{let w=e.find(o=>p>=o[0])||e[e.length-1],f,g,i,a,h,c;return r.map(o=>{let l=t(o),m=l.getFullYear(),b=l.getMonth(),k=l.getDate(),T=l.getHours(),E=l.getMinutes(),_=l.getSeconds(),x=m!=f&&w[2]||b!=g&&w[3]||k!=i&&w[4]||T!=a&&w[5]||E!=h&&w[6]||_!=c&&w[7]||w[1];return f=m,g=b,i=k,a=T,h=E,c=_,x(l)})}}function NM(t,e){let n=rd(e);return(r,u,d,p,w)=>u.map(f=>n(t(f)))}function od(t,e,n){return new Date(t,e,n)}function Vy(t,e){return e(t)}const DM="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function qy(t,e){return(n,r,u,d)=>d==null?Vh:e(t(r))}function PM(t,e){let n=t.series[e];return n.width?n.stroke(t,e):n.points.width?n.points.stroke(t,e):null}function FM(t,e){return t.series[e].fill(t,e)}const BM={show:!0,live:!0,isolate:!1,mount:iM,markers:{show:!0,width:2,stroke:PM,fill:FM,dash:"solid"},idx:null,idxs:null,values:[]};function jM(t,e){let n=t.cursor.points,r=_i(),u=n.size(t,e);fn(r,ll,u),fn(r,cl,u);let d=u/-2;fn(r,"marginLeft",d),fn(r,"marginTop",d);let p=n.width(t,e,u);return p&&fn(r,"borderWidth",p),r}function WM(t,e){let n=t.series[e].points;return n._fill||n._stroke}function zM(t,e){let n=t.series[e].points;return n._stroke||n._fill}function HM(t,e){return t.series[e].points.size}const sd=[0,0];function UM(t,e,n){return sd[0]=e,sd[1]=n,sd}function Fc(t,e,n,r=!0){return u=>{u.button==0&&(!r||u.target==e)&&n(u)}}function ad(t,e,n,r=!0){return u=>{(!r||u.target==e)&&n(u)}}const VM={show:!0,x:!0,y:!0,lock:!1,move:UM,points:{one:!1,show:jM,size:HM,width:0,stroke:zM,fill:WM},bind:{mousedown:Fc,mouseup:Fc,click:Fc,dblclick:Fc,mousemove:ad,mouseleave:ad,mouseenter:ad},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,u)=>r-u,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Ky={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},ld=Gn({},Ky,{filter:_y}),Gy=Gn({},ld,{size:10}),Yy=Gn({},Ky,{show:!1}),cd='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"',Xy="bold "+cd,Qy=1.5,Zy={show:!0,scale:"x",stroke:zh,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xy,side:2,grid:ld,ticks:Gy,border:Yy,font:cd,lineGap:Qy,rotate:0},qM="Value",KM="Time",Jy={show:!0,scale:"x",auto:!1,sorted:1,min:an,max:-an,idxs:[]};function GM(t,e,n,r,u){return e.map(d=>d==null?"":Jh(d))}function YM(t,e,n,r,u,d,p){let w=[],f=Qo.get(u)||0;n=p?n:ln(Ic(n,u),f);for(let g=n;g<=r;g=ln(g+u,f))w.push(Object.is(g,-0)?0:g);return w}function ud(t,e,n,r,u,d,p){const w=[],f=t.scales[t.axes[e].scale].log,g=f==10?Co:wy,i=ui(g(n));u=ya(f,i),f==10&&(u=Is[Hi(u,Is)]);let a=n,h=u*f;f==10&&(h=Is[Hi(h,Is)]);do w.push(a),a=a+u,f==10&&!Qo.has(a)&&(a=ln(a,Qo.get(u))),a>=h&&(u=a,h=u*f,f==10&&(h=Is[Hi(h,Is)]));while(a<=r);return w}function XM(t,e,n,r,u,d,p){let w=t.scales[t.axes[e].scale].asinh,f=r>w?ud(t,e,Dr(w,n),r,u):[w],g=r>=0&&n<=0?[0]:[];return(n<-w?ud(t,e,Dr(w,-r),-n,u):[w]).reverse().map(i=>-i).concat(g,f)}const ev=/./,QM=/[12357]/,ZM=/[125]/,tv=/1/,hd=(t,e,n,r)=>t.map((u,d)=>e==4&&u==0||d%r==0&&n.test(u.toExponential()[u<0?1:0])?u:null);function JM(t,e,n,r,u){let d=t.axes[n],p=d.scale,w=t.scales[p],f=t.valToPos,g=d._space,i=f(10,p),a=f(9,p)-i>=g?ev:f(7,p)-i>=g?QM:f(5,p)-i>=g?ZM:tv;if(a==tv){let h=nr(f(1,p)-i);if(h<g)return hd(e.slice().reverse(),w.distr,a,Ci(g/h)).reverse()}return hd(e,w.distr,a,1)}function eE(t,e,n,r,u){let d=t.axes[n],p=d.scale,w=d._space,f=t.valToPos,g=nr(f(1,p)-f(2,p));return g<w?hd(e.slice().reverse(),3,ev,Ci(w/g)).reverse():e}function tE(t,e,n,r){return r==null?Vh:e==null?"":Jh(e)}const nv={show:!0,scale:"y",stroke:zh,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xy,side:3,grid:ld,ticks:Gy,border:Yy,font:cd,lineGap:Qy,rotate:0};function nE(t,e){let n=3+(t||1)*2;return ln(n*e,3)}function rE(t,e){let{scale:n,idxs:r}=t.series[0],u=t._data[0],d=t.valToPos(u[r[0]],n,!0),p=t.valToPos(u[r[1]],n,!0),w=nr(p-d),f=t.series[e],g=w/(f.points.space*Kt);return r[1]-r[0]<=g}const rv={scale:null,auto:!0,sorted:0,min:an,max:-an},iv=(t,e,n,r,u)=>u,ov={show:!0,auto:!0,sorted:0,gaps:iv,alpha:1,facets:[Gn({},rv,{scale:"x"}),Gn({},rv,{scale:"y"})]},sv={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:iv,alpha:1,points:{show:rE,filter:null},values:null,min:an,max:-an,idxs:[],path:null,clip:null};function iE(t,e,n,r,u){return n/10}const av={time:A$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},oE=Gn({},av,{time:!1,ori:1}),lv={};function cv(t,e){let n=lv[t];return n||(n={key:t,plots:[],sub(r){n.plots.push(r)},unsub(r){n.plots=n.plots.filter(u=>u!=r)},pub(r,u,d,p,w,f,g){for(let i=0;i<n.plots.length;i++)n.plots[i]!=u&&n.plots[i].pub(r,u,d,p,w,f,g)}},t!=null&&(lv[t]=n)),n}const xa=1,dd=2;function Ns(t,e,n){const r=t.mode,u=t.series[e],d=r==2?t._data[e]:t._data,p=t.scales,w=t.bbox;let f=d[0],g=r==2?d[1]:d[e],i=r==2?p[u.facets[0].scale]:p[t.series[0].scale],a=r==2?p[u.facets[1].scale]:p[u.scale],h=w.left,c=w.top,o=w.width,l=w.height,m=t.valToPosH,b=t.valToPosV;return i.ori==0?n(u,f,g,i,a,m,b,h,c,o,l,jc,ka,zc,dv,fv):n(u,f,g,i,a,b,m,c,h,l,o,Wc,_a,gd,pv,gv)}function pd(t,e){let n=0,r=0,u=Ut(t.bands,nd);for(let d=0;d<u.length;d++){let p=u[d];p.series[0]==e?n=p.dir:p.series[1]==e&&(p.dir==1?r|=1:r|=2)}return[n,r==1?-1:r==2?1:r==3?2:0]}function sE(t,e,n,r,u){let d=t.mode,p=t.series[e],w=d==2?p.facets[1].scale:p.scale,f=t.scales[w];return u==-1?f.min:u==1?f.max:f.distr==3?f.dir==1?f.min:f.max:0}function So(t,e,n,r,u,d){return Ns(t,e,(p,w,f,g,i,a,h,c,o,l,m)=>{let b=p.pxRound;const k=g.dir*(g.ori==0?1:-1),T=g.ori==0?ka:_a;let E,_;k==1?(E=n,_=r):(E=r,_=n);let x=b(a(w[E],g,l,c)),R=b(h(f[E],i,m,o)),I=b(a(w[_],g,l,c)),O=b(h(d==1?i.max:i.min,i,m,o)),L=new Path2D(u);return T(L,I,O),T(L,x,O),T(L,x,R),L})}function Bc(t,e,n,r,u,d){let p=null;if(t.length>0){p=new Path2D;const w=e==0?zc:gd;let f=n;for(let a=0;a<t.length;a++){let h=t[a];if(h[1]>h[0]){let c=h[0]-f;c>0&&w(p,f,r,c,r+d),f=h[1]}}let g=n+u-f,i=10;g>0&&w(p,f,r-i/2,g,r+d+i)}return p}function aE(t,e,n){let r=t[t.length-1];r&&r[0]==e?r[1]=n:t.push([e,n])}function fd(t,e,n,r,u,d,p){let w=[],f=t.length;for(let g=u==1?n:r;g>=n&&g<=r;g+=u)if(e[g]===null){let i=g,a=g;if(u==1)for(;++g<=r&&e[g]===null;)a=g;else for(;--g>=n&&e[g]===null;)a=g;let h=d(t[i]),c=a==i?h:d(t[a]),o=i-u;h=p<=0&&o>=0&&o<f?d(t[o]):h;let l=a+u;c=p>=0&&l>=0&&l<f?d(t[l]):c,c>=h&&w.push([h,c])}return w}function uv(t){return t==0?ky:t==1?rr:e=>Os(e,t)}function hv(t){let e=t==0?jc:Wc,n=t==0?(u,d,p,w,f,g)=>{u.arcTo(d,p,w,f,g)}:(u,d,p,w,f,g)=>{u.arcTo(p,d,f,w,g)},r=t==0?(u,d,p,w,f)=>{u.rect(d,p,w,f)}:(u,d,p,w,f)=>{u.rect(p,d,f,w)};return(u,d,p,w,f,g=0,i=0)=>{g==0&&i==0?r(u,d,p,w,f):(g=Ui(g,w/2,f/2),i=Ui(i,w/2,f/2),e(u,d+g,p),n(u,d+w,p,d+w,p+f,g),n(u,d+w,p+f,d,p+f,i),n(u,d,p+f,d,p,i),n(u,d,p,d+w,p,g),u.closePath())}}const jc=(t,e,n)=>{t.moveTo(e,n)},Wc=(t,e,n)=>{t.moveTo(n,e)},ka=(t,e,n)=>{t.lineTo(e,n)},_a=(t,e,n)=>{t.lineTo(n,e)},zc=hv(0),gd=hv(1),dv=(t,e,n,r,u,d)=>{t.arc(e,n,r,u,d)},pv=(t,e,n,r,u,d)=>{t.arc(n,e,r,u,d)},fv=(t,e,n,r,u,d,p)=>{t.bezierCurveTo(e,n,r,u,d,p)},gv=(t,e,n,r,u,d,p)=>{t.bezierCurveTo(n,e,u,r,p,d)};function mv(t){return(e,n,r,u,d)=>Ns(e,n,(p,w,f,g,i,a,h,c,o,l,m)=>{let{pxRound:b,points:k}=p,T,E;g.ori==0?(T=jc,E=dv):(T=Wc,E=pv);const _=ln(k.width*Kt,3);let x=(k.size-k.width)/2*Kt,R=ln(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 $=C=>{if(f[C]!=null){let D=b(a(w[C],g,l,c)),z=b(h(f[C],i,m,o));T(I,D+x,z),E(I,D,z,x,0,Oc*2)}};if(d)d.forEach($);else for(let C=r;C<=u;C++)$(C);return{stroke:_>0?I:null,fill:I,clip:O,flags:xa|dd}})}function yv(t){return(e,n,r,u,d,p)=>{r!=u&&(d!=r&&p!=r&&t(e,n,r),d!=u&&p!=u&&t(e,n,u),t(e,n,p))}}const lE=yv(ka),cE=yv(_a);function vv(t){const e=Ut(t==null?void 0:t.alignGaps,0);return(n,r,u,d)=>Ns(n,r,(p,w,f,g,i,a,h,c,o,l,m)=>{[u,d]=Tc(f,u,d);let b=p.pxRound,k=F=>b(a(F,g,l,c)),T=F=>b(h(F,i,m,o)),E,_;g.ori==0?(E=ka,_=lE):(E=_a,_=cE);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-u>=l*4){let F=he=>n.posToVal(he,g.key,!0),N=null,$=null,C,D,z,U=k(w[x==1?u:d]),G=k(w[u]),Z=k(w[d]),te=F(x==1?G+1:Z-1);for(let he=x==1?u:d;he>=u&&he<=d;he+=x){let ne=w[he],le=(x==1?ne<te:ne>te)?U:k(ne),ue=f[he];le==U?ue!=null?(D=ue,N==null?(E(I,le,T(D)),C=N=$=D):D<N?N=D:D>$&&($=D)):ue===null&&(O=!0):(N!=null&&_(I,U,T(N),T($),T(C),T(D)),ue!=null?(D=ue,E(I,le,T(D)),N=$=C=D):(N=$=null,ue===null&&(O=!0)),U=le,te=F(U+x))}N!=null&&N!=$&&z!=U&&_(I,U,T(N),T($),T(C),T(D))}else for(let F=x==1?u:d;F>=u&&F<=d;F+=x){let N=f[F];N===null?O=!0:N!=null&&E(I,k(w[F]),T(N))}let[L,W]=pd(n,r);if(p.fill!=null||L!=0){let F=R.fill=new Path2D(I),N=p.fillTo(n,r,p.min,p.max,L),$=T(N),C=k(w[u]),D=k(w[d]);x==-1&&([D,C]=[C,D]),E(F,D,$),E(F,C,$)}if(!p.spanGaps){let F=[];O&&F.push(...fd(w,f,u,d,x,k,e)),R.gaps=F=p.gaps(n,r,u,d,F),R.clip=Bc(F,g.ori,c,o,l,m)}return W!=0&&(R.band=W==2?[So(n,r,u,d,I,-1),So(n,r,u,d,I,1)]:So(n,r,u,d,I,W)),R})}function uE(t){const e=Ut(t.align,1),n=Ut(t.ascDesc,!1),r=Ut(t.alignGaps,0),u=Ut(t.extend,!1);return(d,p,w,f)=>Ns(d,p,(g,i,a,h,c,o,l,m,b,k,T)=>{[w,f]=Tc(a,w,f);let E=g.pxRound,{left:_,width:x}=d.bbox,R=Z=>E(o(Z,h,k,m)),I=Z=>E(l(Z,c,T,b)),O=h.ori==0?ka:_a;const L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:xa},W=L.stroke,F=h.dir*(h.ori==0?1:-1);let N=I(a[F==1?w:f]),$=R(i[F==1?w:f]),C=$,D=$;u&&e==-1&&(D=_,O(W,D,N)),O(W,$,N);for(let Z=F==1?w:f;Z>=w&&Z<=f;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,C,ne),O(W,he,ne),N=ne,C=he}let z=C;u&&e==1&&(z=_+x,O(W,z,N));let[U,G]=pd(d,p);if(g.fill!=null||U!=0){let Z=L.fill=new Path2D(W),te=g.fillTo(d,p,g.min,g.max,U),he=I(te);O(Z,z,he),O(Z,D,he)}if(!g.spanGaps){let Z=[];Z.push(...fd(i,a,w,f,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,p,w,f,Z),L.clip=Bc(Z,h.ori,m,b,k,T)}return G!=0&&(L.band=G==2?[So(d,p,w,f,W,-1),So(d,p,w,f,W,1)]:So(d,p,w,f,W,G)),L})}function wv(t,e,n,r,u,d,p=an){if(t.length>1){let w=null;for(let f=0,g=1/0;f<t.length;f++)if(e[f]!==void 0){if(w!=null){let i=nr(t[f]-t[w]);i<g&&(g=i,p=nr(n(t[f],r,u,d)-n(t[w],r,u,d)))}w=f}}return p}function hE(t){t=t||pl;const e=Ut(t.size,[.6,an,1]),n=t.align||0,r=t.gap||0;let u=t.radius;u=u==null?[0,0]:typeof u=="number"?[u,0]:u;const d=Dt(u),p=1-e[0],w=Ut(e[1],an),f=Ut(e[2],1),g=Ut(t.disp,pl),i=Ut(t.each,c=>{}),{fill:a,stroke:h}=g;return(c,o,l,m)=>Ns(c,o,(b,k,T,E,_,x,R,I,O,L,W)=>{let F=b.pxRound,N=n,$=r*Kt,C=w*Kt,D=f*Kt,z,U;E.ori==0?[z,U]=d(c,o):[U,z]=d(c,o);const G=E.dir*(E.ori==0?1:-1);let Z=E.ori==0?zc:gd,te=E.ori==0?i:(Ve,Vt,gn,Qn,Br,$r,_n)=>{i(Ve,Vt,gn,Br,Qn,_n,$r)},he=Ut(c.bands,nd).find(Ve=>Ve.series[0]==o),ne=he!=null?he.dir:0,le=b.fillTo(c,o,b.min,b.max,ne),ue=F(R(le,_,W,O)),ce,ge,Ee,Ae=L,Re=F(b.width*Kt),Xe=!1,Ke=null,dt=null,rt=null,gt=null;a!=null&&(Re==0||h!=null)&&(Xe=!0,Ke=a.values(c,o,l,m),dt=new Map,new Set(Ke).forEach(Ve=>{Ve!=null&&dt.set(Ve,new Path2D)}),Re>0&&(rt=h.values(c,o,l,m),gt=new Map,new Set(rt).forEach(Ve=>{Ve!=null&&gt.set(Ve,new Path2D)})));let{x0:tn,size:Bn}=g;if(tn!=null&&Bn!=null){N=1,k=tn.values(c,o,l,m),tn.unit==2&&(k=k.map(Vt=>c.posToVal(I+Vt*L,E.key,!0)));let Ve=Bn.values(c,o,l,m);Bn.unit==2?ge=Ve[0]*L:ge=x(Ve[0],E,L,I)-x(0,E,L,I),Ae=wv(k,T,x,E,L,I,Ae),Ee=Ae-ge+$}else Ae=wv(k,T,x,E,L,I,Ae),Ee=Ae*p+$,ge=Ae-Ee;Ee<1&&(Ee=0),Re>=ge/2&&(Re=0),Ee<5&&(F=ky);let Zt=Ee>0,hi=Ae-Ee-(Zt?Re:0);ge=F(td(hi,D,C)),ce=(N==0?ge/2:N==G?0:ge)-N*G*((N==0?$/2:0)+(Zt?Re/2:0));const kn={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:Ve,y1:Vt}=g;Ve!=null&&Vt!=null&&(T=Vt.values(c,o,l,m),ur=Ve.values(c,o,l,m))}let Fr=z*ge,vt=U*ge;for(let Ve=G==1?l:m;Ve>=l&&Ve<=m;Ve+=G){let Vt=T[Ve];if(Vt==null)continue;if(ur!=null){let nn=ur[Ve]??0;if(Vt-nn==0)continue;ue=R(nn,_,W,O)}let gn=E.distr!=2||g!=null?k[Ve]:Ve,Qn=x(gn,E,L,I),Br=R(Ut(Vt,le),_,W,O),$r=F(Qn-ce),_n=F(Dr(Br,ue)),ir=F(Ui(Br,ue)),hr=_n-ir;if(Vt!=null){let nn=Vt<0?vt:Fr,or=Vt<0?Fr:vt;Xe?(Re>0&&rt[Ve]!=null&&Z(gt.get(rt[Ve]),$r,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),Ke[Ve]!=null&&Z(dt.get(Ke[Ve]),$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,Ve,$r-Re/2,ir,ge+Re,hr)}}return Re>0?kn.stroke=Xe?gt:Xn:Xe||(kn._fill=b.width==0?b._fill:b._stroke??b._fill,kn.width=0),kn.fill=Xe?dt:Xn,kn})}function dE(t,e){const n=Ut(e==null?void 0:e.alignGaps,0);return(r,u,d,p)=>Ns(r,u,(w,f,g,i,a,h,c,o,l,m,b)=>{[d,p]=Tc(g,d,p);let k=w.pxRound,T=z=>k(h(z,i,m,o)),E=z=>k(c(z,a,b,l)),_,x,R;i.ori==0?(_=jc,R=ka,x=fv):(_=Wc,R=_a,x=gv);const I=i.dir*(i.ori==0?1:-1);let O=T(f[I==1?d:p]),L=O,W=[],F=[];for(let z=I==1?d:p;z>=d&&z<=p;z+=I)if(g[z]!=null){let U=f[z],G=T(U);W.push(L=G),F.push(E(g[z]))}const N={stroke:t(W,F,_,R,x,k),fill:null,clip:null,band:null,gaps:null,flags:xa},$=N.stroke;let[C,D]=pd(r,u);if(w.fill!=null||C!=0){let z=N.fill=new Path2D($),U=w.fillTo(r,u,w.min,w.max,C),G=E(U);R(z,L,G),R(z,O,G)}if(!w.spanGaps){let z=[];z.push(...fd(f,g,d,p,I,T,n)),N.gaps=z=w.gaps(r,u,d,p,z),N.clip=Bc(z,i.ori,o,l,m,b)}return D!=0&&(N.band=D==2?[So(r,u,d,p,$,-1),So(r,u,d,p,$,1)]:So(r,u,d,p,$,D)),N})}function pE(t){return dE(fE,t)}function fE(t,e,n,r,u,d){const p=t.length;if(p<2)return null;const w=new Path2D;if(n(w,t[0],e[0]),p==2)r(w,t[1],e[1]);else{let f=Array(p),g=Array(p-1),i=Array(p-1),a=Array(p-1);for(let h=0;h<p-1;h++)i[h]=e[h+1]-e[h],a[h]=t[h+1]-t[h],g[h]=i[h]/a[h];f[0]=g[0];for(let h=1;h<p-1;h++)g[h]===0||g[h-1]===0||g[h-1]>0!=g[h]>0?f[h]=0:(f[h]=3*(a[h-1]+a[h])/((2*a[h]+a[h-1])/g[h-1]+(a[h]+2*a[h-1])/g[h]),isFinite(f[h])||(f[h]=0));f[p-1]=g[p-2];for(let h=0;h<p-1;h++)u(w,t[h]+a[h]/3,e[h]+f[h]*a[h]/3,t[h+1]-a[h]/3,e[h+1]-f[h+1]*a[h]/3,t[h+1],e[h+1])}return w}const md=new Set;function bv(){for(let t of md)t.syncRect(!0)}ga&&(Rs(G$,ma,bv),Rs(Y$,ma,bv,!0),Rs(Ec,ma,()=>{_r.pxRatio=Kt}));const gE=vv(),mE=mv();function xv(t,e,n,r){return(r?[t[0],t[1]].concat(t.slice(2)):[t[0]].concat(t.slice(1))).map((u,d)=>yd(u,d,e,n))}function yE(t,e){return t.map((n,r)=>r==0?{}:Gn({},e,n))}function yd(t,e,n,r){return Gn({},e==0?n:r,t)}function kv(t,e,n){return e==null?va:[e,n]}const vE=kv;function wE(t,e,n){return e==null?va:Lc(e,n,Zh,!0)}function _v(t,e,n,r){return e==null?va:Rc(e,n,t.scales[r].log,!1)}const bE=_v;function Cv(t,e,n,r){return e==null?va:Qh(e,n,t.scales[r].log,!1)}const xE=Cv;function kE(t,e,n,r,u){let d=Dr(by(t),by(e)),p=e-t,w=Hi(u/r*p,n);do{let f=n[w],g=r*f/p;if(g>=u&&d+(f<5?Qo.get(f):0)<=17)return[f,g]}while(++w<n.length);return[0,0]}function Sv(t){let e,n;return t=t.replace(/(\d+)px/,(r,u)=>(e=rr((n=+u)*Kt))+"px"),[t,e,n]}function _E(t){t.show&&[t.font,t.labelFont].forEach(e=>{let n=ln(e[2]*Kt,1);e[0]=e[0].replace(/[0-9.]+px/,n+"px"),e[1]=n})}function _r(t,e,n){const r={mode:Ut(t.mode,1)},u=r.mode;function d(V,X,ie,oe){let fe=X.valToPct(V);return oe+ie*(X.dir==-1?1-fe:fe)}function p(V,X,ie,oe){let fe=X.valToPct(V);return oe+ie*(X.dir==-1?fe:1-fe)}function w(V,X,ie,oe){return X.ori==0?d(V,X,ie,oe):p(V,X,ie,oe)}r.valToPosH=d,r.valToPosV=p;let f=!1;r.status=0;const g=r.root=_i(T$);if(t.id!=null&&(g.id=t.id),li(g,t.class),t.title){let V=_i(O$,g);V.textContent=t.title}const i=zi("canvas"),a=r.ctx=i.getContext("2d"),h=_i(I$,g);Rs("click",h,V=>{V.target===o&&(Xt!=Ei||Ft!=wo)&&An.click(r,V)},!0);const c=r.under=_i(N$,h);h.appendChild(i);const o=r.over=_i(D$,h);t=wa(t);const l=+Ut(t.pxAlign,1),m=uv(l);(t.plugins||[]).forEach(V=>{V.opts&&(t=V.opts(r,t)||t)});const b=t.ms||.001,k=r.series=u==1?xv(t.series||[],Jy,sv,!1):yE(t.series||[null],ov),T=r.axes=xv(t.axes||[],Zy,nv,!0),E=r.scales={},_=r.bands=t.bands||[];_.forEach(V=>{V.fill=Dt(V.fill||null),V.dir=Ut(V.dir,-1)});const x=u==2?k[1].facets[0].scale:k[0].scale,R={axes:Lo,series:La},I=(t.drawOrder||["axes","series"]).map(V=>R[V]);function O(V){const X=V.distr==3?ie=>Co(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>ed(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:fe,_max:be}=V,Te=be-fe;return(oe-fe)/Te}}function L(V){let X=E[V];if(X==null){let ie=(t.scales||pl)[V]||pl;if(ie.from!=null){L(ie.from);let oe=Gn({},E[ie.from],ie,{key:V});oe.valToPct=O(oe),E[V]=oe}else{X=E[V]=Gn({},V==x?av:oE,ie),X.key=V;let oe=X.time,fe=X.range,be=Zo(fe);if((V!=x||u==2&&!oe)&&(be&&(fe[0]==null||fe[1]==null)&&(fe={min:fe[0]==null?my:{mode:1,hard:fe[0],soft:fe[0]},max:fe[1]==null?my:{mode:1,hard:fe[1],soft:fe[1]}},be=!1),!be&&Nc(fe))){let Te=fe;fe=(Fe,je,Ue)=>je==null?va:Lc(je,Ue,Te)}X.range=Dt(fe||(oe?vE:V==x?X.distr==3?bE:X.distr==4?xE:kv:X.distr==3?_v:X.distr==4?Cv:wE)),X.auto=Dt(be?!1:X.auto),X.clamp=Dt(X.clamp||iE),X._min=X._max=null,X.valToPct=O(X)}}}L("x"),L("y"),u==1&&k.forEach(V=>{L(V.scale)}),T.forEach(V=>{L(V.scale)});for(let V in t.scales)L(V);const W=E[x],F=W.distr;let N,$;W.ori==0?(li(g,R$),N=d,$=p):(li(g,L$),N=p,$=d);const C={};for(let V in E){let X=E[V];(X.min!=null||X.max!=null)&&(C[V]={min:X.min,max:X.max},X.min=X.max=null)}const D=t.tzDate||(V=>new Date(rr(V/b))),z=t.fmtDate||rd,U=b==1?RM(D):IM(D),G=Uy(D,Hy(b==1?TM:OM,z)),Z=qy(D,Vy(DM,z)),te=[],he=r.legend=Gn({},BM,t.legend),ne=r.cursor=Gn({},VM,{drag:{y:u==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,Ee,Ae,Re=[],Xe=[],Ke,dt=!1,rt={};if(he.live){const V=k[1]?k[1].values:null;dt=V!=null,Ke=dt?V(r,1,0):{_:0};for(let X in Ke)rt[X]=Vh}if(le)if(ge=zi("table",z$,g),Ae=zi("tbody",null,ge),he.mount(r,ge),dt){Ee=zi("thead",null,ge,Ae);let V=zi("tr",null,Ee);zi("th",null,V);for(var gt in Ke)zi("th",ey,V).textContent=gt}else li(ge,U$),he.live&&li(ge,H$);const tn={show:!0},Bn={show:!1};function Zt(V,X){if(X==0&&(dt||!he.live||u==2))return va;let ie=[],oe=zi("tr",V$,Ae,Ae.childNodes[X]);li(oe,V.class),V.show||li(oe,Ts);let fe=zi("th",null,oe);if(ce.show){let Fe=_i(q$,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=_i(ey,fe);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ce.show||(be.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),kn("click",fe,Fe=>{if(ne._lock)return;Xi(Fe);let je=k.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ue=k.some((Ge,Qe)=>Qe>0&&Qe!=je&&Ge.show);k.forEach((Ge,Qe)=>{Qe>0&&Wr(Qe,Ue?Qe==je?tn:Bn:tn,!0,lt.setSeries)})}else Wr(je,{show:!V.show},!0,lt.setSeries)},!1),Qi&&kn(iy,fe,Fe=>{ne._lock||(Xi(Fe),Wr(k.indexOf(V),Ri,!0,lt.setSeries))},!1));for(var Te in Ke){let Fe=zi("td",K$,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const hi=new Map;function kn(V,X,ie,oe=!0){const fe=hi.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(Rs(V,X,fe[V]=be),hi.set(X,fe))}function Xn(V,X,ie){const oe=hi.get(X)||{};for(let fe in oe)(V==null||fe==V)&&(Xh(fe,X,oe[fe]),delete oe[fe]);V==null&&hi.delete(X)}let ur=0,Fr=0,vt=0,Ve=0,Vt=0,gn=0,Qn=Vt,Br=gn,$r=vt,_n=Ve,ir=0,hr=0,nn=0,or=0;r.bbox={};let $o=!1,Ki=!1,Gi=!1,Yi=!1,Mo=!1,yr=!1;function Eo(V,X,ie){(ie||V!=r.width||X!=r.height)&&Jo(V,X),to(!1),Gi=!0,Ki=!0,vo()}function Jo(V,X){r.width=ur=vt=V,r.height=Fr=Ve=X,Vt=gn=0,zs(),Aa();let ie=r.bbox;ir=ie.left=Os(Vt*Kt,.5),hr=ie.top=Os(gn*Kt,.5),nn=ie.width=Os(vt*Kt,.5),or=ie.height=Os(Ve*Kt,.5)}const Al=3;function di(){let V=!1,X=0;for(;!V;){X++;let ie=Oa(X),oe=Ol(X);V=X==Al||ie&&oe,V||(Jo(r.width,r.height),Ki=!0)}}function Tl({width:V,height:X}){Eo(V,X)}r.setSize=Tl;function zs(){let V=!1,X=!1,ie=!1,oe=!1;T.forEach((fe,be)=>{if(fe.show&&fe._show){let{side:Te,_size:Fe}=fe,je=Te%2,Ue=fe.label!=null?fe.labelSize:0,Ge=Fe+Ue;Ge>0&&(je?(vt-=Ge,Te==3?(Vt+=Ge,oe=!0):ie=!0):(Ve-=Ge,Te==0?(gn+=Ge,V=!0):X=!0))}}),Ji[0]=V,Ji[1]=ie,Ji[2]=X,Ji[3]=oe,vt-=Ar[1]+Ar[3],Vt+=Ar[3],Ve-=Ar[2]+Ar[0],gn+=Ar[0]}function Aa(){let V=Vt+vt,X=gn+Ve,ie=Vt,oe=gn;function fe(be,Te){switch(be){case 1:return V+=Te,V-Te;case 2:return X+=Te,X-Te;case 3:return ie-=Te,ie+Te;case 0:return oe-=Te,oe+Te}}T.forEach((be,Te)=>{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 V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Dt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(fe,be,Te,Fe)=>{if(be==0)return Te;let je=Te,Ue=ie(fe,be,Te,Fe)??an,Ge=Ue>=0&&Ue<an,Qe=W.ori==0?vt:Ve,yt=ne.left,Ot=e[0],bt=e[be];if(X.has(bt[Te])){je=null;let Rt=null,ut=null,it;if(oe==0||oe==-1)for(it=Te;Rt==null&&it-- >0;)X.has(bt[it])||(Rt=it);if(oe==0||oe==1)for(it=Te;ut==null&&it++<bt.length;)X.has(bt[it])||(ut=it);if(Rt!=null||ut!=null)if(Ge){let cn=Rt==null?-1/0:N(Ot[Rt],W,Qe,0),bn=ut==null?1/0:N(Ot[ut],W,Qe,0),er=yt-cn,jt=bn-yt;er<=jt?er<=Ue&&(je=Rt):jt<=Ue&&(je=ut)}else je=ut==null?Rt:Rt==null?ut:Te-Rt<=ut-Te?Rt:ut}else Ge&&nr(yt-N(Ot[Te],W,Qe,0))>Ue&&(je=null);return je}}const Xi=V=>{ne.event=V};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,Cn=Qi&&jn.one;let Er=[],fo=[],Zi=[];function Hs(V,X){let ie=jn.show(r,X);if(ie instanceof HTMLElement)return li(ie,W$),li(ie,V.class),lo(ie,-10,-10,vt,Ve),o.insertBefore(ie,Er[X]),ie}function Ta(V,X){if(u==1||X>0){let ie=u==1&&E[V.scale].time,oe=V.value;V.value=ie?Ay(oe)?qy(D,Vy(oe,z)):oe||Z:oe||tE,V.label=V.label||(ie?KM:qM)}if(Cn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||gE||oM,V.fillTo=Dt(V.fillTo||sE),V.pxAlign=+Ut(V.pxAlign,l),V.pxRound=uv(V.pxAlign),V.stroke=Dt(V.stroke||null),V.fill=Dt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=nE(Dr(1,V.width),1),oe=V.points=Gn({},{size:ie,width:Dr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:mE,_stroke:null,_fill:null},V.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=V.pxAlign}if(le){let ie=Zt(V,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;Cn?X==0&&(ie=Hs(V,X)):X>0&&(ie=Hs(V,X)),Er.splice(X,0,ie),fo.splice(X,0,0),Zi.splice(X,0,0)}Je("addSeries",X)}function Rl(V,X){X=X??k.length,V=u==1?yd(V,X,Jy,sv):yd(V,X,{},ov),k.splice(X,0,V),Ta(k[X],X)}r.addSeries=Rl;function Ll(V){if(k.splice(V,1),le){he.values.splice(V,1),Xe.splice(V,1);let X=Re.splice(V,1)[0];Xn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Er.splice(V,1)[0].remove(),fo.splice(V,1),Zi.splice(V,1)),Je("delSeries",V)}r.delSeries=Ll;const Ji=[!1,!1,!1,!1];function pi(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=E[V.scale];oe==null&&(V.scale=ie?k[1].scale:x,oe=E[V.scale]);let fe=oe.time;V.size=Dt(V.size),V.space=Dt(V.space),V.rotate=Dt(V.rotate),Zo(V.incrs)&&V.incrs.forEach(Te=>{!Qo.has(Te)&&Qo.set(Te,My(Te))}),V.incrs=Dt(V.incrs||(oe.distr==2?MM:fe?b==1?AM:LM:Is)),V.splits=Dt(V.splits||(fe&&oe.distr==1?U:oe.distr==3?ud:oe.distr==4?XM:YM)),V.stroke=Dt(V.stroke),V.grid.stroke=Dt(V.grid.stroke),V.ticks.stroke=Dt(V.ticks.stroke),V.border.stroke=Dt(V.border.stroke);let be=V.values;V.values=Zo(be)&&!Zo(be[0])?Dt(be):fe?Zo(be)?Uy(D,Hy(be,z)):Ay(be)?NM(D,be):be||G:be||GM,V.filter=Dt(V.filter||(oe.distr>=3&&oe.log==10?JM:oe.distr==3&&oe.log==2?eE:_y)),V.font=Sv(V.font),V.labelFont=Sv(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Ji[X]=!0,V._el=_i(P$,h))}}function Pt(V,X,ie,oe){let[fe,be,Te,Fe]=ie,je=X%2,Ue=0;return je==0&&(Fe||be)&&(Ue=X==0&&!fe||X==2&&!Te?rr(Zy.size/3):0),je==1&&(fe||Te)&&(Ue=X==1&&!be||X==3&&!Fe?rr(nv.size/2):0),Ue}const Ra=r.padding=(t.padding||[Pt,Pt,Pt,Pt]).map(V=>Dt(Ut(V,Pt))),Ar=r._padding=Ra.map((V,X)=>V(r,X,Ji,0));let Wn,hn=null,En=null;const Si=u==1?k[0].idxs:null;let Tr=null,$i=!1;function es(V,X){if(e=V??[],r.data=r._data=e,u==2){Wn=0;for(let ie=1;ie<k.length;ie++)Wn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Tr=e[0],Wn=Tr.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 V,X;u==1&&(Wn>0?(hn=Si[0]=0,En=Si[1]=Wn-1,V=e[0][hn],X=e[0][En],F==2?(V=hn,X=En):V==X&&(F==3?[V,X]=Rc(V,V,W.log,!1):F==4?[V,X]=Qh(V,V,W.log,!1):W.time?X=V+rr(86400/b):[V,X]=Lc(V,X,Zh,!0))):(hn=Si[0]=V=null,En=Si[1]=X=null)),Zn(x,V,X)}let go,ti,Ao,ts,ni,ns,Vs,qs,rs,sr;function Ks(V,X,ie,oe,fe,be){V??(V=ny),ie??(ie=nd),oe??(oe="butt"),fe??(fe=ny),be??(be="round"),V!=go&&(a.strokeStyle=go=V),fe!=ti&&(a.fillStyle=ti=fe),X!=Ao&&(a.lineWidth=Ao=X),be!=ni&&(a.lineJoin=ni=be),oe!=ns&&(a.lineCap=ns=oe),ie!=ts&&a.setLineDash(ts=ie)}function To(V,X,ie,oe){X!=ti&&(a.fillStyle=ti=X),V!=Vs&&(a.font=Vs=V),ie!=qs&&(a.textAlign=qs=ie),oe!=rs&&(a.textBaseline=rs=oe)}function is(V,X,ie,oe,fe=0){if(oe.length>0&&V.auto(r,$i)&&(X==null||X.min==null)){let be=Ut(hn,0),Te=Ut(En,oe.length-1),Fe=ie.min==null?J$(oe,be,Te,fe,V.distr==3):[ie.min,ie.max];V.min=Ui(V.min,ie.min=Fe[0]),V.max=Dr(V.max,ie.max=Fe[1])}}const os={min:null,max:null};function mo(){for(let oe in E){let fe=E[oe];C[oe]==null&&(fe.min==null||C[x]!=null&&fe.auto(r,$i))&&(C[oe]=os)}for(let oe in E){let fe=E[oe];C[oe]==null&&fe.from!=null&&C[fe.from]!=null&&(C[oe]=os)}C[x]!=null&&to(!0);let V={};for(let oe in C){let fe=C[oe];if(fe!=null){let be=V[oe]=wa(E[oe],lM);if(fe.min!=null)Gn(be,fe);else if(oe!=x||u==2)if(Wn==0&&be.from==null){let Te=be.range(r,null,null,oe);be.min=Te[0],be.max=Te[1]}else be.min=an,be.max=-an}}if(Wn>0){k.forEach((oe,fe)=>{if(u==1){let be=oe.scale,Te=C[be];if(Te==null)return;let Fe=V[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]),En=Hi(Fe.max,e[0]),En-hn>1&&(e[0][hn]<Fe.min&&hn++,e[0][En]>Fe.max&&En--),oe.min=Tr[hn],oe.max=Tr[En]}else oe.show&&oe.auto&&is(Fe,Te,oe,e[fe],oe.sorted);oe.idxs[0]=hn,oe.idxs[1]=En}else if(fe>0&&oe.show&&oe.auto){let[be,Te]=oe.facets,Fe=be.scale,je=Te.scale,[Ue,Ge]=e[fe],Qe=V[Fe],yt=V[je];Qe!=null&&is(Qe,C[Fe],be,Ue,be.sorted),yt!=null&&is(yt,C[je],Te,Ge,Te.sorted),oe.min=Te.min,oe.max=Te.max}});for(let oe in V){let fe=V[oe],be=C[oe];if(fe.from==null&&(be==null||be.min==null)){let Te=fe.range(r,fe.min==an?null:fe.min,fe.max==-an?null:fe.max,oe);fe.min=Te[0],fe.max=Te[1]}}}for(let oe in V){let fe=V[oe];if(fe.from!=null){let be=V[fe.from];if(be.min==null)fe.min=fe.max=null;else{let Te=fe.range(r,be.min,be.max,oe);fe.min=Te[0],fe.max=Te[1]}}}let X={},ie=!1;for(let oe in V){let fe=V[oe],be=E[oe];if(be.min!=fe.min||be.max!=fe.max){be.min=fe.min,be.max=fe.max;let Te=be.distr;be._min=Te==3?Co(be.min):Te==4?ed(be.min,be.asinh):Te==100?be.fwd(be.min):be.min,be._max=Te==3?Co(be.max):Te==4?ed(be.max,be.asinh):Te==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){k.forEach((oe,fe)=>{u==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 C)C[oe]=null}function Gs(V){let X=td(hn-1,0,Wn-1),ie=td(En+1,0,Wn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<Wn-1;)ie++;return[X,ie]}function La(){if(Wn>0){let V=k.some(X=>X._focus)&&sr!=Mr.alpha;V&&(a.globalAlpha=sr=Mr.alpha),k.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=u==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)}}),k.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,En,fe),Te=X.points.filter(r,ie,be,fe);(be||Te)&&(X.points._paths=X.points.paths(r,ie,hn,En,Te),as(ie,!0))}sr!=oe&&(a.globalAlpha=sr=oe),Je("drawSeries",ie)}}),V&&(a.globalAlpha=sr=1)}}function ss(V,X){let ie=X?k[V].points:k[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function as(V,X){let ie=X?k[V].points:k[V],{stroke:oe,fill:fe,clip:be,flags:Te,_stroke:Fe=ie._stroke,_fill:je=ie._fill,_width:Ue=ie.width}=ie._paths;Ue=ln(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,Te,be):Ys(V,Fe,Ue,ie.dash,ie.cap,je,oe,fe,Te,Ge,be),yt&&a.translate(-Qe,-Qe)}function Ys(V,X,ie,oe,fe,be,Te,Fe,je,Ue,Ge){let Qe=!1;je!=0&&_.forEach((yt,Ot)=>{if(yt.series[0]==V){let bt=k[yt.series[1]],Rt=e[yt.series[1]],ut=(bt._paths||pl).band;Zo(ut)&&(ut=yt.dir==1?ut[0]:ut[1]);let it,cn=null;bt.show&&ut&&tM(Rt,hn,En)?(cn=yt.fill(r,Ot)||be,it=bt._paths.clip):ut=null,Ro(X,ie,oe,fe,cn,Te,Fe,je,Ue,Ge,it,ut),Qe=!0}}),Qe||Ro(X,ie,oe,fe,be,Te,Fe,je,Ue,Ge)}const ls=xa|dd;function Ro(V,X,ie,oe,fe,be,Te,Fe,je,Ue,Ge,Qe){Ks(V,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,Te),Mi(V,be,X)):Fe&dd?(ar(fe,Te),a.clip(Qe),Mi(V,be,X)):Fe&xa&&(a.save(),a.clip(Qe),Ge&&a.clip(Ge),ar(fe,Te),a.restore(),Mi(V,be,X)):(ar(fe,Te),Mi(V,be,X)),(je||Ue||Qe)&&a.restore()}function Mi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,fe)=>{a.strokeStyle=go=fe,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function ar(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=ti=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function yo(V,X,ie,oe){let fe=T[V],be;if(oe<=0)be=[0,0];else{let Te=fe._space=fe.space(r,V,X,ie,oe),Fe=fe._incrs=fe.incrs(r,V,X,ie,oe,Te);be=kE(X,ie,Fe,oe,Te)}return fe._found=be}function eo(V,X,ie,oe,fe,be,Te,Fe,je,Ue){let Ge=Te%2/2;l==1&&a.translate(Ge,Ge),Ks(Fe,Te,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<V.length;ut++)X[ut]!=null&&(ie==0?Qe=Ot=V[ut]:yt=bt=V[ut],a.moveTo(Qe,yt),a.lineTo(Ot,bt));a.stroke(),l==1&&a.translate(-Ge,-Ge)}function Oa(V){let X=!0;return T.forEach((ie,oe)=>{if(!ie.show)return;let fe=E[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,Te=be%2,{min:Fe,max:je}=fe,[Ue,Ge]=yo(oe,Fe,je,Te==0?vt:Ve);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=>Tr[it]):yt,bt=fe.distr==2?Tr[yt[1]]-Tr[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=Ci(ie.size(r,Rt,oe,V)),ut!=null&&ie._size!=ut&&(X=!1)}),X}function Ol(V){let X=!0;return Ra.forEach((ie,oe)=>{let fe=ie(r,oe,Ji,V);fe!=Ar[oe]&&(X=!1),Ar[oe]=fe}),X}function Lo(){for(let V=0;V<T.length;V++){let X=T[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,fe,be,Te=X.stroke(r,V),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);To(X.labelFont[0],Te,"center",ie==2?ul:ty),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=xy(X.label)?X.label(r,V,je,Ue):X.label;a.fillText(Po,fe,be),a.restore()}if(Ue==0)continue;let Ge=E[X.scale],Qe=oe==0?nn:or,yt=oe==0?ir:hr,Ot=X._splits,bt=Ge.distr==2?Ot.map(sn=>Tr[sn]):Ot,Rt=Ge.distr==2?Tr[Ot[1]]-Tr[Ot[0]]:je,ut=X.ticks,it=X.border,cn=ut.show?ut.size:0,bn=rr(cn*Kt),er=rr((X.alignTo==2?X._size-cn-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?Wh:jt>0?fa:jt<0?Wh:oe==0?"center":ie==3?Wh:fa,Mt=jt||oe==1?"middle":ie==2?ul:ty;To(ze,Te,ct,Mt);let Ht=X.font[1]*X.lineGap,At=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=At[sn]:be=At[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(At,ut.filter(r,bt,V,Ue,Rt),oe,ie,pe,bn,ln(ut.width*Kt,3),ut.stroke(r,V),ut.dash,ut.cap);let Li=X.grid;Li.show&&eo(At,Li.filter(r,bt,V,Ue,Rt),oe,oe==0?2:1,oe==0?hr:ir,oe==0?or:nn,ln(Li.width*Kt,3),Li.stroke(r,V),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,ln(it.width*Kt,3),it.stroke(r,V),it.dash,it.cap)}Je("drawAxes")}function to(V){k.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(u==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 V=0;V<Io.length;V++)Je(...Io[V]);Io.length=0}function vo(){Oo||(gM(Na),Oo=!0)}function Be(V,X=!1){Oo=!0,cs=X,V(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,Vt),fn(c,ul,gn),fn(c,ll,vt),fn(c,cl,Ve),fn(o,fa,Vt),fn(o,ul,gn),fn(o,ll,vt),fn(o,cl,Ve),fn(h,ll,ur),fn(h,cl,Fr),i.width=rr(ur*Kt),i.height=rr(Fr*Kt),T.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:fe})=>{if(V!=null)if(X){let be=fe===3||fe===0?ie:0,Te=fe%2==1;fn(V,Te?"left":"top",oe-be),fn(V,Te?"width":"height",ie),fn(V,Te?"top":"left",Te?gn:Vt),fn(V,Te?"height":"width",Te?Ve:vt),Gh(V,Ts)}else li(V,Ts)}),go=ti=Ao=ni=ns=Vs=qs=rs=ts=null,sr=1,B(!0),Vt!=Qn||gn!=Br||vt!=$r||Ve!=_n){to(!1);let V=vt/$r,X=Ve/_n;if(ue&&!Yi&&ne.left>=0){ne.left*=V,ne.top*=X,fi&&lo(fi,rr(ne.left),0,vt,Ve),zn&&lo(zn,0,rr(ne.top),vt,Ve);for(let ie=0;ie<Er.length;ie++){let oe=Er[ie];oe!=null&&(fo[ie]*=V,Zi[ie]*=X,lo(oe,Ci(fo[ie]),Ci(Zi[ie]),vt,Ve))}}if(mt.show&&!Mo&&mt.left>=0&&mt.width>0){mt.left*=V,mt.width*=V,mt.top*=X,mt.height*=X;for(let ie in Y)fn(jr,ie,mt[ie])}Qn=Vt,Br=gn,$r=vt,_n=Ve}Je("setSize"),Ki=!1}ur>0&&Fr>0&&(a.clearRect(0,0,i.width,i.height),Je("drawClear"),I.forEach(V=>V()),Je("draw")),mt.show&&Mo&&(on(mt),Mo=!1),ue&&Yi&&(S(null,!0,!1),Yi=!1),he.show&&he.live&&yr&&(v(),yr=!1),f||(f=!0,r.status=1,Je("ready")),$i=!1,Oo=!1}r.redraw=(V,X)=>{Gi=X||!1,V!==!1?Zn(x,W.min,W.max):vo()};function De(V,X){let ie=E[V];if(ie.from==null){if(Wn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Wn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==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++),C[V]=X,$o=!0,vo()}}r.setScale=De;let Sn,No,fi,zn,Da,Do,Ei,wo,Yt,qt,Xt,Ft,Ai=!1;const An=ne.drag;let We=An.x,dn=An.y;ue&&(ne.x&&(Sn=_i(B$,o)),ne.y&&(No=_i(j$,o)),W.ori==0?(fi=Sn,zn=No):(fi=No,zn=Sn),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?_i(F$,mt.over?o:c):null;function on(V,X){if(mt.show){for(let ie in V)mt[ie]=V[ie],ie in Y&&fn(jr,ie,V[ie]);X!==!1&&Je("setSelect")}}r.setSelect=on;function mn(V){if(k[V].show)le&&Gh(Re[V],Ts);else if(le&&li(Re[V],Ts),ue){let X=Cn?Er[0]:Er[V];X!=null&&lo(X,-10,-10,vt,Ve)}}function Zn(V,X,ie){De(V,{min:X,max:ie})}function Wr(V,X,ie,oe){X.focus!=null&&dr(V),X.show!=null&&k.forEach((fe,be)=>{be>0&&(V==be||V==null)&&(fe.show=X.show,mn(be),u==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",V,X),oe&&$t("setSeries",r,V,X)}r.setSeries=Wr;function Ti(V,X){Gn(_[V],X)}function Tn(V,X){V.fill=Dt(V.fill||null),V.dir=Ut(V.dir,-1),X=X??_.length,_.splice(X,0,V)}function ri(V){V==null?_.length=0:_.splice(V,1)}r.addBand=Tn,r.setBand=Ti,r.delBand=ri;function us(V,X){k[V].alpha=X,ue&&Er[V]!=null&&(Er[V].style.opacity=X),le&&Re[V]&&(Re[V].style.opacity=X)}let Rn,gi,mi;const Ri={focus:!0};function dr(V){if(V!=mi){let X=V==null,ie=Mr.alpha!=1;k.forEach((oe,fe)=>{if(u==1||fe>0){let be=X||fe==0||fe==V;oe._focus=X?null:be,ie&&us(fe,be?1:Mr.alpha)}}),mi=V,ie&&vo()}}le&&Qi&&kn(oy,ge,V=>{ne._lock||(Xi(V),mi!=null&&Wr(null,Ri,!0,lt.setSeries))});function pr(V,X,ie){let oe=E[X];ie&&(V=V/Kt-(oe.ori==1?gn:Vt));let fe=vt;oe.ori==1&&(fe=Ve,V=fe-V),oe.dir==-1&&(V=fe-V);let be=oe._min,Te=oe._max,Fe=V/fe,je=be+(Te-be)*Fe,Ue=oe.distr;return Ue==3?ya(10,je):Ue==4?rM(je,oe.asinh):Ue==100?oe.bwd(je):je}function vr(V,X){let ie=pr(V,x,X);return Hi(ie,e[0],hn,En)}r.valToIdx=V=>Hi(V,e[0]),r.posToIdx=vr,r.posToVal=pr,r.valToPos=(V,X,ie)=>E[X].ori==0?d(V,E[X],ie?nn:vt,ie?ir:0):p(V,E[X],ie?or:Ve,ie?hr:0),r.setCursor=(V,X,ie)=>{Xt=V.left,Ft=V.top,S(null,X,ie)};function Xs(V,X){fn(jr,fa,mt.left=V),fn(jr,ll,mt.width=X)}function wr(V,X){fn(jr,ul,mt.top=V),fn(jr,cl,mt.height=X)}let Rr=W.ori==0?Xs:wr,yi=W.ori==1?Xs:wr;function vi(){if(le&&he.live)for(let V=u==2?1:0;V<k.length;V++){if(V==0&&dt)continue;let X=he.values[V],ie=0;for(let oe in X)Xe[V][ie++].firstChild.nodeValue=X[oe]}}function v(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):aM(V.idx)||te.fill(V.idx),he.idx=te[0]),le&&he.live){for(let ie=0;ie<k.length;ie++)(ie>0||u==1&&!dt)&&M(ie,te[ie]);vi()}yr=!1,X!==!1&&Je("setLegend")}r.setLegend=v;function M(V,X){let ie=k[V],oe=V==0&&F==2?Tr:e[V],fe;dt?fe=ie.values(r,V,X)??rt:(fe=ie.value(r,X==null?null:oe[X],V,X),fe=fe==null?rt:{_:fe}),he.values[V]=fe}function S(V,X,ie){Yt=Xt,qt=Ft,[Xt,Ft]=ne.move(r,Xt,Ft),ne.left=Xt,ne.top=Ft,ue&&(fi&&lo(fi,rr(Xt),0,vt,Ve),zn&&lo(zn,0,rr(Ft),vt,Ve));let oe,fe=hn>En;Rn=an,gi=null;let be=W.ori==0?vt:Ve,Te=W.ori==1?vt:Ve;if(Xt<0||Wn==0||fe){oe=ne.idx=null;for(let Fe=0;Fe<k.length;Fe++){let je=Er[Fe];je!=null&&lo(je,-10,-10,vt,Ve)}Qi&&Wr(null,Ri,!0,V==null&&lt.setSeries),he.live&&(te.fill(oe),yr=!0)}else{let Fe,je,Ue;u==1&&(Fe=W.ori==0?Xt:Ft,je=pr(Fe,x),oe=ne.idx=Hi(je,e[0],hn,En),Ue=N(e[0][oe],W,be,0));let Ge=-10,Qe=-10,yt=0,Ot=0,bt=!0,Rt="",ut="";for(let it=u==2?1:0;it<k.length;it++){let cn=k[it],bn=te[it],er=bn==null?null:u==1?e[it][bn]:e[it][1][bn],jt=ne.dataIdx(r,it,oe,je),pe=jt==null?null:u==1?e[it][jt]:e[it][1][jt];if(yr=yr||pe!=er||jt!=bn,te[it]=jt,it>0&&cn.show){let Me=jt==null?-10:jt==oe?Ue:N(u==1?e[0][jt]:e[it][0][jt],W,be,0),xe=pe==null?-10:$(pe,u==1?E[cn.scale]:E[cn.facets[1].scale],Te,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,cn.scale),At=pe>=0?1:-1,zr=Ht>=0?1:-1;zr==At&&(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||Cn){let ze,ct;W.ori==0?(ze=Me,ct=xe):(ze=xe,ct=Me);let Mt,Ht,At,zr,Li,sn,gr=!0,Po=jn.bbox;if(Po!=null){gr=!1;let Ln=Po(r,it);At=Ln.left,zr=Ln.top,Mt=Ln.width,Ht=Ln.height}else At=ze,zr=ct,Mt=Ht=jn.size(r,it);if(sn=jn.fill(r,it),Li=jn.stroke(r,it),Cn)it==gi&&Rn<=Mr.prox&&(Ge=At,Qe=zr,yt=Mt,Ot=Ht,bt=gr,Rt=sn,ut=Li);else{let Ln=Er[it];Ln!=null&&(fo[it]=At,Zi[it]=zr,dy(Ln,Mt,Ht,gr),uy(Ln,sn,Li),lo(Ln,Ci(At),Ci(zr),vt,Ve))}}}}if(Cn){let it=Mr.prox,cn=mi==null?Rn<=it:Rn>it||gi!=mi;if(yr||cn){let bn=Er[0];bn!=null&&(fo[0]=Ge,Zi[0]=Qe,dy(bn,yt,Ot,bt),uy(bn,Rt,ut),lo(bn,Ci(Ge),Ci(Qe),vt,Ve))}}}if(mt.show&&Ai)if(V!=null){let[Fe,je]=lt.scales,[Ue,Ge]=lt.match,[Qe,yt]=V.cursor.sync.scales,Ot=V.cursor.drag;if(We=Ot._x,dn=Ot._y,We||dn){let{left:bt,top:Rt,width:ut,height:it}=V.select,cn=V.scales[Qe].ori,bn=V.posToVal,er,jt,pe,Me,xe,ze=Fe!=null&&Ue(Fe,Qe),ct=je!=null&&Ge(je,yt);ze&&We?(cn==0?(er=bt,jt=ut):(er=Rt,jt=it),pe=E[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?(cn==1?(er=bt,jt=ut):(er=Rt,jt=it),pe=E[je],Me=$(bn(er,yt),pe,Te,0),xe=$(bn(er+jt,yt),pe,Te,0),yi(Ui(Me,xe),nr(xe-Me))):yi(0,Te)}else Q()}else{let Fe=nr(Yt-Da),je=nr(qt-Do);if(W.ori==1){let yt=Fe;Fe=je,je=yt}We=An.x&&Fe>=An.dist,dn=An.y&&je>=An.dist;let Ue=An.uni;Ue!=null?We&&dn&&(We=Fe>=Ue,dn=je>=Ue,!We&&!dn&&(je>Fe?dn=!0:We=!0)):An.x&&An.y&&(We||dn)&&(We=dn=!0);let Ge,Qe;We&&(W.ori==0?(Ge=Ei,Qe=Xt):(Ge=wo,Qe=Ft),Rr(Ui(Ge,Qe),nr(Qe-Ge)),dn||yi(0,Te)),dn&&(W.ori==1?(Ge=Ei,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(An._x=We,An._y=dn,V==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(Hh,r,Xt,Ft,vt,Ve,oe)}if(Qi){let Fe=ie&&lt.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(V=!1){V?P=null:(P=o.getBoundingClientRect(),Je("syncRect",P))}function j(V,X,ie,oe,fe,be,Te){ne._lock||Ai&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,fe,be,Te,!1,V!=null),V!=null?S(null,!0,!0):S(X,!0,!1))}function q(V,X,ie,oe,fe,be,Te,Fe,je){if(P==null&&B(!1),Xi(V),V!=null)ie=V.clientX-P.left,oe=V.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,cn=X.axes[0].side%2==1,bn=W.ori==0?vt:Ve,er=W.ori==1?vt:Ve,jt=cn?be:fe,pe=cn?fe:be,Me=cn?oe:ie,xe=cn?ie:oe;if(bt!=null?ie=ut(Ue,bt)?w(yt,E[Ue],bn,0):-10:ie=bn*(Me/jt),Rt!=null?oe=it(Ge,Rt)?w(Ot,E[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==Hh)&&((ie<=1||ie>=vt-1)&&(ie=Os(ie,vt)),(oe<=1||oe>=Ve-1)&&(oe=Os(oe,Ve))),Fe?(Da=ie,Do=oe,[Ei,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,ke;function me(V,X,ie,oe,fe,be,Te){Ai=!0,We=dn=An._x=An._y=!1,q(V,X,ie,oe,fe,be,Te,!0,!1),V!=null&&(kn(Uh,qh,we,!1),$t(ry,r,Ei,wo,vt,Ve,null));let{left:Fe,top:je,width:Ue,height:Ge}=mt;re=Fe,se=je,ve=Ue,ke=Ge}function we(V,X,ie,oe,fe,be,Te){Ai=An._x=An._y=!1,q(V,X,ie,oe,fe,be,Te,!1,!0);let{left:Fe,top:je,width:Ue,height:Ge}=mt,Qe=Ue>0||Ge>0,yt=re!=Fe||se!=je||ve!=Ue||ke!=Ge;if(Qe&&yt&&on(mt),An.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 E){let cn=E[it];it!=x&&cn.from==null&&cn.min!=an&&Zn(it,pr(Rt+ut,it),pr(Rt,it))}Q()}else ne.lock&&(ne._lock=!ne._lock,S(X,!0,V!=null));V!=null&&(Xn(Uh,qh),$t(Uh,r,Xt,Ft,vt,Ve,null))}function Ne(V,X,ie,oe,fe,be,Te){if(ne._lock)return;Xi(V);let Fe=Ai;if(Ai){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>=Ve-Ge),Qe&&je&&(Xt=Xt<Ei?0:vt),yt&&Ue&&(Ft=Ft<wo?0:Ve),S(null,!0,!0),Ai=!1}Xt=-10,Ft=-10,te.fill(null),S(null,!0,!0),Fe&&(Ai=Fe)}function Ie(V,X,ie,oe,fe,be,Te){ne._lock||(Xi(V),Us(),Q(),V!=null&&$t(sy,r,Xt,Ft,vt,Ve,null))}function He(){T.forEach(_E),Eo(r.width,r.height,!0)}Rs(Ec,ma,He);const st={};st.mousedown=me,st.mousemove=j,st.mouseup=we,st.dblclick=Ie,st.setSeries=(V,X,ie,oe)=>{let fe=lt.match[2];ie=fe(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ue&&(kn(ry,o,me),kn(Hh,o,j),kn(iy,o,V=>{Xi(V),B(!1)}),kn(oy,o,Ne),kn(sy,o,Ie),md.add(r),r.syncRect=B);const Ye=r.hooks=t.hooks||{};function Je(V,X,ie){cs?Io.push([V,X,ie]):V in Ye&&Ye[V].forEach(oe=>{oe.call(null,r,X,ie)})}(t.plugins||[]).forEach(V=>{for(let X in V.hooks)Ye[X]=(Ye[X]||[]).concat(V.hooks[X])});const pn=(V,X,ie)=>ie,lt=Gn({key:null,setSeries:!1,filters:{pub:Cy,sub:Cy},scales:[x,k[1]?k[1].scale:null],match:[Sy,Sy,pn],values:[null,null]},ne.sync);lt.match.length==2&&lt.match.push(pn),ne.sync=lt;const vn=lt.key,wt=cv(vn);function $t(V,X,ie,oe,fe,be,Te){lt.filters.pub(V,X,ie,oe,fe,be,Te)&&wt.pub(V,X,ie,oe,fe,be,Te)}wt.sub(r);function Jn(V,X,ie,oe,fe,be,Te){lt.filters.sub(V,X,ie,oe,fe,be,Te)&&st[V](null,X,ie,oe,fe,be,Te)}r.pub=Jn;function fr(){wt.unsub(r),md.delete(r),hi.clear(),Xh(Ec,ma,He),g.remove(),ge==null||ge.remove(),Je("destroy")}r.destroy=fr;function wn(){Je("init",t,e),es(e||t.data,!1),C[x]?De(x,C[x]):Us(),Mo=mt.show&&(mt.width>0||mt.height>0),Yi=yr=!0,Eo(t.width,t.height)}return k.forEach(Ta),T.forEach(pi),n?n instanceof HTMLElement?(n.appendChild(g),wn()):n(r,wn):wn(),r}_r.assign=Gn,_r.fmtNum=Jh,_r.rangeNum=Lc,_r.rangeLog=Rc,_r.rangeAsinh=Qh,_r.orient=Ns,_r.pxRatio=Kt,_r.join=fM,_r.fmtDate=rd,_r.tzDate=SM,_r.sync=cv;{_r.addGap=aE,_r.clipGaps=Bc;let t=_r.paths={points:mv};t.linear=vv,t.stepped=uE,t.bars=hE,t.spline=pE}var $v,Mv;function CE(){return Mv||(Mv=1,$v=function(t,e,n,r,u){var d,p;if(r===void 0)r=0;else if(r=r|0,r<0||r>=t.length)throw new RangeError("invalid lower bound");if(u===void 0)u=t.length-1;else if(u=u|0,u<r||u>=t.length)throw new RangeError("invalid upper bound");for(;r<=u;)if(d=r+(u-r>>>1),p=+n(t[d],e,d,t),p<0)r=d+1;else if(p>0)u=d-1;else return d;return~r}),$v}var SE=CE();const ij=Fi("B",lc(SE));var vd,Ev;function $E(){if(Ev)return vd;Ev=1;function t(e,n,r){var u=-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 p=Array(d);++u<d;)p[u]=e[u+n];return p}return vd=t,vd}var wd,Av;function ME(){if(Av)return wd;Av=1;var t=$E();function e(n,r,u){var d=n.length;return u=u===void 0?d:u,!r&&u>=d?n:t(n,r,u)}return wd=e,wd}var bd,Tv;function Rv(){if(Tv)return bd;Tv=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\ufe0e\\ufe0f",p="\\u200d",w=RegExp("["+p+t+u+d+"]");function f(g){return w.test(g)}return bd=f,bd}var xd,Lv;function EE(){if(Lv)return xd;Lv=1;function t(e){return e.split("")}return xd=t,xd}var kd,Ov;function AE(){if(Ov)return kd;Ov=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\ufe0e\\ufe0f",p="["+t+"]",w="["+u+"]",f="\\ud83c[\\udffb-\\udfff]",g="(?:"+w+"|"+f+")",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",c="\\u200d",o=g+"?",l="["+d+"]?",m="(?:"+c+"(?:"+[i,a,h].join("|")+")"+l+o+")*",b=l+o+m,k="(?:"+[i+w+"?",w,a,h,p].join("|")+")",T=RegExp(f+"(?="+f+")|"+k+b,"g");function E(_){return _.match(T)||[]}return kd=E,kd}var _d,Iv;function TE(){if(Iv)return _d;Iv=1;var t=EE(),e=Rv(),n=AE();function r(u){return e(u)?n(u):t(u)}return _d=r,_d}var Cd,Nv;function RE(){if(Nv)return Cd;Nv=1;var t=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo;return Cd=t,Cd}var Sd,Dv;function LE(){if(Dv)return Sd;Dv=1;var t=RE(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Sd=n,Sd}var $d,Pv;function Md(){if(Pv)return $d;Pv=1;var t=LE(),e=t.Symbol;return $d=e,$d}var Ed,Fv;function OE(){if(Fv)return Ed;Fv=1;function t(e,n){for(var r=-1,u=e==null?0:e.length,d=Array(u);++r<u;)d[r]=n(e[r],r,e);return d}return Ed=t,Ed}var Ad,Bv;function IE(){if(Bv)return Ad;Bv=1;var t=Array.isArray;return Ad=t,Ad}var Td,jv;function NE(){if(jv)return Td;jv=1;var t=Md(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,u=t?t.toStringTag:void 0;function d(p){var w=n.call(p,u),f=p[u];try{p[u]=void 0;var g=!0}catch{}var i=r.call(p);return g&&(w?p[u]=f:delete p[u]),i}return Td=d,Td}var Rd,Wv;function DE(){if(Wv)return Rd;Wv=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Rd=n,Rd}var Ld,zv;function PE(){if(zv)return Ld;zv=1;var t=Md(),e=NE(),n=DE(),r="[object Null]",u="[object Undefined]",d=t?t.toStringTag:void 0;function p(w){return w==null?w===void 0?u:r:d&&d in Object(w)?e(w):n(w)}return Ld=p,Ld}var Od,Hv;function FE(){if(Hv)return Od;Hv=1;function t(e){return e!=null&&typeof e=="object"}return Od=t,Od}var Id,Uv;function BE(){if(Uv)return Id;Uv=1;var t=PE(),e=FE(),n="[object Symbol]";function r(u){return typeof u=="symbol"||e(u)&&t(u)==n}return Id=r,Id}var Nd,Vv;function jE(){if(Vv)return Nd;Vv=1;var t=Md(),e=OE(),n=IE(),r=BE(),u=t?t.prototype:void 0,d=u?u.toString:void 0;function p(w){if(typeof w=="string")return w;if(n(w))return e(w,p)+"";if(r(w))return d?d.call(w):"";var f=w+"";return f=="0"&&1/w==-1/0?"-0":f}return Nd=p,Nd}var Dd,qv;function Hc(){if(qv)return Dd;qv=1;var t=jE();function e(n){return n==null?"":t(n)}return Dd=e,Dd}var Pd,Kv;function WE(){if(Kv)return Pd;Kv=1;var t=ME(),e=Rv(),n=TE(),r=Hc();function u(d){return function(p){p=r(p);var w=e(p)?n(p):void 0,f=w?w[0]:p.charAt(0),g=w?t(w,1).join(""):p.slice(1);return f[d]()+g}}return Pd=u,Pd}var Fd,Gv;function Yv(){if(Gv)return Fd;Gv=1;var t=WE(),e=t("toUpperCase");return Fd=e,Fd}var zE=Yv();const HE=lc(zE);var Bd,Xv;function UE(){if(Xv)return Bd;Xv=1;var t=Hc(),e=Yv();function n(r){return e(t(r).toLowerCase())}return Bd=n,Bd}var jd,Qv;function VE(){if(Qv)return jd;Qv=1;function t(e,n,r,u){var d=-1,p=e==null?0:e.length;for(u&&p&&(r=e[++d]);++d<p;)r=n(r,e[d],d,e);return r}return jd=t,jd}var Wd,Zv;function qE(){if(Zv)return Wd;Zv=1;function t(e){return function(n){return e==null?void 0:e[n]}}return Wd=t,Wd}var zd,Jv;function KE(){if(Jv)return zd;Jv=1;var t=qE(),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 zd=n,zd}var Hd,ew;function GE(){if(ew)return Hd;ew=1;var t=KE(),e=Hc(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",p=r+u+d,w="["+p+"]",f=RegExp(w,"g");function g(i){return i=e(i),i&&i.replace(n,t).replace(f,"")}return Hd=g,Hd}var Ud,tw;function YE(){if(tw)return Ud;tw=1;var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(n){return n.match(t)||[]}return Ud=e,Ud}var Vd,nw;function XE(){if(nw)return Vd;nw=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 qd,rw;function QE(){if(rw)return qd;rw=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",u=e+n+r,d="\\u2700-\\u27bf",p="a-z\\xdf-\\xf6\\xf8-\\xff",w="\\xac\\xb1\\xd7\\xf7",f="\\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",h="\\ufe0e\\ufe0f",c=w+f+g+i,o="['’]",l="["+c+"]",m="["+u+"]",b="\\d+",k="["+d+"]",T="["+p+"]",E="[^"+t+c+b+d+p+a+"]",_="\\ud83c[\\udffb-\\udfff]",x="(?:"+m+"|"+_+")",R="[^"+t+"]",I="(?:\\ud83c[\\udde6-\\uddff]){2}",O="[\\ud800-\\udbff][\\udc00-\\udfff]",L="["+a+"]",W="\\u200d",F="(?:"+T+"|"+E+")",N="(?:"+L+"|"+E+")",$="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",C="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",D=x+"?",z="["+h+"]?",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="(?:"+[k,I,O].join("|")+")"+te,ne=RegExp([L+"?"+T+"+"+$+"(?="+[l,L,"$"].join("|")+")",N+"+"+C+"(?="+[l,L+F,"$"].join("|")+")",L+"?"+F+"+"+$,L+"+"+C,Z,G,b,he].join("|"),"g");function le(ue){return ue.match(ne)||[]}return qd=le,qd}var Kd,iw;function ZE(){if(iw)return Kd;iw=1;var t=YE(),e=XE(),n=Hc(),r=QE();function u(d,p,w){return d=n(d),p=w?void 0:p,p===void 0?e(d)?r(d):t(d):d.match(p)||[]}return Kd=u,Kd}var Gd,ow;function JE(){if(ow)return Gd;ow=1;var t=VE(),e=GE(),n=ZE(),r="['’]",u=RegExp(r,"g");function d(p){return function(w){return t(n(e(w).replace(u,"")),p,"")}}return Gd=d,Gd}var Yd,sw;function eA(){if(sw)return Yd;sw=1;var t=UE(),e=JE(),n=e(function(r,u,d){return u=u.toLowerCase(),r+(d?t(u):u)});return Yd=n,Yd}var tA=eA();const nA=lc(tA),rA=Object.assign({"./ArrayWidget.vue":()=>ot(()=>at.import("./ArrayWidget-BSG8KEtf-625e298b76ab5a393561.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>at.import("./ArrayplotWidget-WVu76Kqn-3b08fd32eb23dde3112e.js"),void 0),"./BlockWidget.vue":()=>ot(()=>at.import("./BlockWidget-B7ryWGCq-9d40634097b25adf42e1.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>at.import("./ButtonWidget-BKih3ix9-a5442c244a53b1952c50.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>at.import("./CanvasWidget-DT9xMSfb-300c54f7e5c6f3f07b25.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>at.import("./CanvasdotWidget-7H5Hvcn--c3618cb51458194d0d6f.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>at.import("./CanvasimageWidget-BbWYx6Gj-43a99e46bb8b7ca6284f.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>at.import("./CanvasimagevalueWidget-Blvoe2X4-7cff2c4b41ca2f97b5d1.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>at.import("./CanvaslabelWidget-BPx_Rm4o-73f7d4f33556706e4aaa.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>at.import("./CanvaslabelvalueWidget-DzdWvL0W-565b2993a3a636c78083.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>at.import("./CanvaslineWidget-CqskilGk-5d3500584f9f36f70bab.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>at.import("./CanvaslinevalueWidget-C0JIKdvZ-d0374f7c7a981b09ff0b.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>at.import("./CheckbuttonWidget-C9FbJx2v-34dfd9c16c465fa40436.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>at.import("./ComboboxWidget-BbNKT0s8-945ef2250c8eb563d3f7.js"),void 0),"./DateWidget.vue":()=>ot(()=>at.import("./DateWidget-CBMsdRUE-7580447a212be724388a.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>at.import("./DynamicWidget-CfMtj7H8-15ce5daec63461ef1c69.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>at.import("./FormatvalueWidget-BLWsqhIZ-87c7ee6ef666607dfd71.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>at.import("./HorizontalWidget-CsVhLwZO-edf26d27dc73f37bee3b.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>at.import("./HorizontalboxWidget-xC6PADl3-f5f50842985dc51cea77.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>at.import("./HorizontallineWidget-NZIxmRVN-cd05834d5d286ccae2e8.js"),void 0),"./IframeWidget.vue":()=>ot(()=>at.import("./IframeWidget-BgzjSfag-1c6b3db4fc4097fe66db.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>at.import("./ImageviewerWidget-BnT5m-nw-f051ad1e725bcdcc4aa6.js"),void 0),"./LabelWidget.vue":()=>ot(()=>at.import("./LabelWidget-DSDYmz6X-4cfd026fc6fb355f4009.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>at.import("./LabelledWidget-DMb-myxs-44b1113de24dbb0be12b.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>at.import("./LabelprogressbarWidget-CkjDJBao-12681d2e81f95ba3f9c6.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>at.import("./LabelsparklineWidget-DBYPFz3Y-8400ce2949167c445fc8.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>at.import("./LabelvalueWidget-DlTkJC4i-fa385cba56df8d367001.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>at.import("./LabelvaluedescWidget-dRqnGZub-be793c6b242f459781c5.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitsbarWidget-CS4NAPJ1-77001f867d0d4ba168f3.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitscolumnWidget-D9x4Ppv8-2fff2e51510e538ef92b.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>at.import("./LabelvaluerangebarWidget-Dhyng4-n-b7bf680a389925234568.js"),void 0),"./LedWidget.vue":()=>ot(()=>at.import("./LedWidget-D8cq4pUv-b75079f3005e09a45a7f.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>at.import("./LimitsbarWidget-VGJnDuVM-60a42afd635786e20b4e.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>at.import("./LimitscolorWidget-CG6Pqi12-5258d28d0611c02f074d.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>at.import("./LimitscolumnWidget-DjovQdiT-ec4c95521601c9ec47e7.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>at.import("./LinegraphWidget-DSWAhXgZ-d797fdf756af69c64f53.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>at.import("./MatrixbycolumnsWidget-C3cuhRxz-dd2bee0ea6b2072f2775.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>at.import("./ProgressbarWidget-oCgAEFBO-79e56fb819db5f3a7534.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>at.import("./RadiobuttonWidget-D4Dak3lc-42694b030a2a182184b9.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>at.import("./RadiogroupWidget-Dbe9T4fp-2139af3c3e4eb1f18244.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>at.import("./RangebarWidget-CIVrgqrW-f577bef2396ed802dff1.js"),void 0),"./RollupWidget.vue":()=>ot(()=>at.import("./RollupWidget-CH1-XNLV-b1e85a107dfcad6a1309.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>at.import("./ScrollwindowWidget-BwFG6Wn8-a49de26a6ae5796f2c34.js"),void 0),"./SignalWidget.vue":()=>ot(()=>at.import("./SignalWidget-Gz2gHrUm-28f5b06a6cfbdbf4441e.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>at.import("./SpacerWidget-Bg7VDB0k-4fdc6d1a58a866a2d5fc.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>at.import("./SparklineWidget-D_b5rfJv-7e34d3ea6146846384bc.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>at.import("./TabbookWidget-C30f9B6z-81df828957d13db6a3dc.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>at.import("./TextboxWidget-CDqxsgys-c36cc30d99b99d89dd54.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>at.import("./TextfieldWidget-CAyjKJs6-4763a5783ac6676b261d.js"),void 0),"./TimeWidget.vue":()=>ot(()=>at.import("./TimeWidget-BQsP0G2X-6874c2688011d1ad4ee4.js"),void 0),"./TitleWidget.vue":()=>ot(()=>at.import("./TitleWidget-DXVba53S-eb6bf3561921d8585524.js"),void 0),"./ValueWidget.vue":()=>ot(()=>at.import("./ValueWidget-B-TWLPdM-8a1ed563df428d950123.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>at.import("./ValuelimitsbarWidget-jsDXdPdC-36c47ebec784602888fe.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>at.import("./ValuelimitscolumnWidget-I-uwnXM2-eb33c6a7fc61e076cc83.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>at.import("./ValuerangebarWidget-OyhSTScu-ecc2fd62fd691ed72402.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>at.import("./VerticalWidget-CkFbX1Gq-eb15cf848e39c878b000.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>at.import("./VerticalboxWidget-FEQgPM9r-7516a8162755c0e4bd0b.js"),void 0)}),iA=Object.entries(rA).reduce((t,[e,n])=>{e=e.split("/").pop();const r=HE(nA(e.replace(/\.\w+$/,"")));return{...t,[r]:$f(n)}},{}),oj=Fi("H",{components:iA}),oA={methods:{buildLanguageMode(t,e){let n=Nr.require("ace/lib/oop"),r=Object.getOwnPropertyNames(Gm.prototype).filter(f=>f!=="constructor").filter(f=>f!=="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"]),u=new RegExp(`(\\b${r.join("\\b|\\b")}\\b)`),d=function(){t.call(this);for(let f in this.$rules)this.$rules[f].unshift({regex:u,token:"support.function"})};n.inherits(d,t);let p=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 p,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}}},sA={mixins:[oA],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 u=this.buildRubyMode();t=new u;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()}}},aA=["textContent"],lA={class:"mx-2"},cA={ref:"editor",class:"editor"};function uA(t,e,n,r,u,d){const p=It("v-spacer"),w=It("v-btn"),f=It("v-toolbar"),g=It("v-card-text"),i=It("v-card-actions"),a=It("v-card"),h=It("v-dialog");return zt(),Vn(h,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=c=>d.show=c),width:"85vw"},{default:et(()=>[tt(a,null,{default:et(()=>[tt(f,{height:"24"},{default:et(()=>[tt(p),cr("span",{textContent:Ir(d.title)},null,8,aA),tt(p),cr("div",lA,[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",cA,null,512)]),_:1}),tt(i,{class:"pr-6 pb-4 pt-0"},{default:et(()=>[tt(p),tt(w,{variant:"flat",onClick:e[0]||(e[0]=c=>d.show=!d.show)},{default:et(()=>e[2]||(e[2]=[qn(" Ok ",-1)])),_:1,__:[2]})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const hA=Qu(sA,[["render",uA],["__scopeId","data-v-69e71dd8"]]),dA={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}},pA={class:"app-title mr-2"};function fA(t,e,n,r,u,d){const p=It("v-col"),w=It("v-row"),f=It("v-icon"),g=It("v-btn"),i=It("v-divider"),a=It("v-list-item-title"),h=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"),k=It("v-checkbox");return zt(),Vn(Mf,{to:"#openc3-menu"},[tt(w,{"no-gutters":""},{default:et(()=>[tt(p,{"align-self":"end"},{default:et(()=>[cr("span",pA,Ir(n.title),1)]),_:1})]),_:1}),tt(w,{dense:"",class:"flex-nowrap"},{default:et(()=>[(zt(!0),qr(_o,null,Ko(n.menus,(T,E)=>(zt(),Vn(o,{ref_for:!0,ref:"topmenu",key:E},{activator:et(({props:_})=>[tt(g,Zu({ref_for:!0},_,{variant:"outlined",class:"mx-1 menu-button",text:T.label,"data-test":d.formatDT(`${n.title} ${T.label}`)}),{append:et(()=>[tt(f,{class:"menu-button-icon"},{default:et(()=>e[0]||(e[0]=[qn(" mdi-menu-down ",-1)])),_:1,__:[0]})]),_:2},1040,["text","data-test"])]),default:et(()=>[tt(c,null,{default:et(()=>[(zt(!0),qr(_o,null,Ko(T.items,(_,x)=>(zt(),qr(_o,null,[_.divider?(zt(),Vn(i,{key:x+"-divider"})):_.subMenu&&_.subMenu.length>0?(zt(),qr("div",{key:x+"-submenu"},[(zt(),Vn(o,{"open-on-hover":"",location:"right",key:x},{activator:et(({props:R})=>[(zt(),Vn(h,Zu({ref_for:!0},R,{disabled:_.disabled,key:x}),Ju({append:et(()=>[tt(f,null,{default:et(()=>e[1]||(e[1]=[qn(" mdi-chevron-right ",-1)])),_:1,__:[1]})]),default:et(()=>[!_.radio&&!_.checkbox?(zt(),Vn(a,{key:0,style:eh("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:et(()=>[qn(Ir(_.label),1)]),_:2},1032,["style"])):oo("",!0)]),_:2},[_.icon?{name:"prepend",fn:et(()=>[tt(f,{disabled:_.disabled},{default:et(()=>[qn(Ir(_.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:et(()=>[tt(c,null,{default:et(()=>[(zt(!0),qr(_o,null,Ko(_.subMenu,(R,I)=>(zt(),Vn(h,{key:I,"prepend-icon":R.icon,onClick:O=>d.subMenuClick(R)},{default:et(()=>[tt(a,null,{default:et(()=>[qn(Ir(R.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):_.radioGroup?(zt(),Vn(b,{"model-value":_.value,"onUpdate:modelValue":_.command,key:x+"-radio-group","hide-details":"",density:"compact",class:"ma-0 pa-0"},{default:et(()=>[(zt(!0),qr(_o,null,Ko(_.choices,(R,I)=>(zt(),Vn(h,{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(),Vn(h,{onClick:R=>_.command(_),disabled:_.disabled,"data-test":d.formatDT(`${n.title} ${T.label} ${_.label}`),key:x+"-list"},Ju({default:et(()=>[_.checkbox?(zt(),Vn(m,{key:0,class:"list-action"},{default:et(()=>[tt(k,{modelValue:_.checked,"onUpdate:modelValue":R=>_.checked=R,label:_.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):oo("",!0),!_.radio&&!_.checkbox?(zt(),Vn(a,{key:1,style:eh("cursor: pointer;"+(_.disabled?"opacity: 0.2":""))},{default:et(()=>[qn(Ir(_.label),1)]),_:2},1032,["style"])):oo("",!0)]),_:2},[_.icon?{name:"prepend",fn:et(()=>[tt(f,{icon:_.icon,disabled:_.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["onClick","disabled","data-test"]))],64))),256))]),_:2},1024)]),_:2},1024))),128))]),_:1})])}const gA=Qu(dA,[["render",fA],["__scopeId","data-v-4d454b93"]]);function aw(t,e){return function(){return t.apply(e,arguments)}}const{toString:mA}=Object.prototype,{getPrototypeOf:Xd}=Object,{iterator:Uc,toStringTag:lw}=Symbol,Vc=(t=>e=>{const n=mA.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vi=t=>(t=t.toLowerCase(),e=>Vc(e)===t),qc=t=>e=>typeof e===t,{isArray:Ca}=Array,ml=qc("undefined");function yl(t){return t!==null&&!ml(t)&&t.constructor!==null&&!ml(t.constructor)&&Qr(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const cw=Vi("ArrayBuffer");function yA(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&cw(t.buffer),e}const vA=qc("string"),Qr=qc("function"),uw=qc("number"),vl=t=>t!==null&&typeof t=="object",wA=t=>t===!0||t===!1,Kc=t=>{if(Vc(t)!=="object")return!1;const e=Xd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lw in t)&&!(Uc in t)},bA=t=>{if(!vl(t)||yl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},xA=Vi("Date"),kA=Vi("File"),_A=Vi("Blob"),CA=Vi("FileList"),SA=t=>vl(t)&&Qr(t.pipe),$A=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Qr(t.append)&&((e=Vc(t))==="formdata"||e==="object"&&Qr(t.toString)&&t.toString()==="[object FormData]"))},MA=Vi("URLSearchParams"),[EA,AA,TA,RA]=["ReadableStream","Request","Response","Headers"].map(Vi),LA=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function wl(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),Ca(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{if(yl(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],e.call(null,t[w],w,t)}}function hw(t,e){if(yl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dw=t=>!ml(t)&&t!==Ds;function Qd(){const{caseless:t}=dw(this)&&this||{},e={},n=(r,u)=>{const d=t&&hw(e,u)||u;Kc(e[d])&&Kc(r)?e[d]=Qd(e[d],r):Kc(r)?e[d]=Qd({},r):Ca(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&wl(arguments[r],n);return e}const OA=(t,e,n,{allOwnKeys:r}={})=>(wl(e,(u,d)=>{n&&Qr(u)?t[d]=aw(u,n):t[d]=u},{allOwnKeys:r}),t),IA=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),NA=(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)},DA=(t,e,n,r)=>{let u,d,p;const w={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!w[p]&&(e[p]=t[p],w[p]=!0);t=n!==!1&&Xd(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},PA=(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},FA=t=>{if(!t)return null;if(Ca(t))return t;let e=t.length;if(!uw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},BA=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xd(Uint8Array)),jA=(t,e)=>{const n=(t&&t[Uc]).call(t);let r;for(;(r=n.next())&&!r.done;){const u=r.value;e.call(t,u[0],u[1])}},WA=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},zA=Vi("HTMLFormElement"),HA=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),pw=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),UA=Vi("RegExp"),fw=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};wl(n,(u,d)=>{let p;(p=e(u,d,t))!==!1&&(r[d]=p||u)}),Object.defineProperties(t,r)},VA=t=>{fw(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+"'")})}})},qA=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return Ca(t)?r(t):r(String(t).split(e)),n},KA=()=>{},GA=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function YA(t){return!!(t&&Qr(t.append)&&t[lw]==="FormData"&&t[Uc])}const XA=t=>{const e=new Array(10),n=(r,u)=>{if(vl(r)){if(e.indexOf(r)>=0)return;if(yl(r))return r;if(!("toJSON"in r)){e[u]=r;const d=Ca(r)?[]:{};return wl(r,(p,w)=>{const f=n(p,u+1);!ml(f)&&(d[w]=f)}),e[u]=void 0,d}}return r};return n(t,0)},QA=Vi("AsyncFunction"),ZA=t=>t&&(vl(t)||Qr(t))&&Qr(t.then)&&Qr(t.catch),gw=((t,e)=>t?setImmediate:e?((n,r)=>(Ds.addEventListener("message",({source:u,data:d})=>{u===Ds&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qr(Ds.postMessage)),JA=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||gw,eT=t=>t!=null&&Qr(t[Uc]),Se={isArray:Ca,isArrayBuffer:cw,isBuffer:yl,isFormData:$A,isArrayBufferView:yA,isString:vA,isNumber:uw,isBoolean:wA,isObject:vl,isPlainObject:Kc,isEmptyObject:bA,isReadableStream:EA,isRequest:AA,isResponse:TA,isHeaders:RA,isUndefined:ml,isDate:xA,isFile:kA,isBlob:_A,isRegExp:UA,isFunction:Qr,isStream:SA,isURLSearchParams:MA,isTypedArray:BA,isFileList:CA,forEach:wl,merge:Qd,extend:OA,trim:LA,stripBOM:IA,inherits:NA,toFlatObject:DA,kindOf:Vc,kindOfTest:Vi,endsWith:PA,toArray:FA,forEachEntry:jA,matchAll:WA,isHTMLForm:zA,hasOwnProperty:pw,hasOwnProp:pw,reduceDescriptors:fw,freezeMethods:VA,toObjectSet:qA,toCamelCase:HA,noop:KA,toFiniteNumber:GA,findKey:hw,global:Ds,isContextDefined:dw,isSpecCompliantForm:YA,toJSONObject:XA,isAsyncFn:QA,isThenable:ZA,setImmediate:gw,asap:JA,isIterable:eT};function Ct(t,e,n,r,u){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),u&&(this.response=u,this.status=u.status?u.status:null)}Se.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:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const mw=Ct.prototype,yw={};["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=>{yw[t]={value:t}}),Object.defineProperties(Ct,yw),Object.defineProperty(mw,"isAxiosError",{value:!0}),Ct.from=(t,e,n,r,u,d)=>{const p=Object.create(mw);return Se.toFlatObject(t,p,function(w){return w!==Error.prototype},w=>w!=="isAxiosError"),Ct.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const tT=null;function Zd(t){return Se.isPlainObject(t)||Se.isArray(t)}function vw(t){return Se.endsWith(t,"[]")?t.slice(0,-2):t}function ww(t,e,n){return t?t.concat(e).map(function(r,u){return r=vw(r),!n&&u?"["+r+"]":r}).join(n?".":""):e}function nT(t){return Se.isArray(t)&&!t.some(Zd)}const rT=Se.toFlatObject(Se,{},null,function(t){return/^is[A-Z]/.test(t)});function Gc(t,e,n){if(!Se.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,o){return!Se.isUndefined(o[c])});const r=n.metaTokens,u=n.visitor||g,d=n.dots,p=n.indexes,w=(n.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(u))throw new TypeError("visitor must be a function");function f(c){if(c===null)return"";if(Se.isDate(c))return c.toISOString();if(Se.isBoolean(c))return c.toString();if(!w&&Se.isBlob(c))throw new Ct("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(c)||Se.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(Se.endsWith(o,"{}"))o=r?o:o.slice(0,-2),c=JSON.stringify(c);else if(Se.isArray(c)&&nT(c)||(Se.isFileList(c)||Se.endsWith(o,"[]"))&&(m=Se.toArray(c)))return o=vw(o),m.forEach(function(b,k){!(Se.isUndefined(b)||b===null)&&e.append(p===!0?ww([o],k,d):p===null?o:o+"[]",f(b))}),!1}return Zd(c)?!0:(e.append(ww(l,o,d),f(c)),!1)}const i=[],a=Object.assign(rT,{defaultVisitor:g,convertValue:f,isVisitable:Zd});function h(c,o){if(!Se.isUndefined(c)){if(i.indexOf(c)!==-1)throw Error("Circular reference detected in "+o.join("."));i.push(c),Se.forEach(c,function(l,m){(!(Se.isUndefined(l)||l===null)&&u.call(e,l,Se.isString(m)?m.trim():m,o,a))===!0&&h(l,o?o.concat(m):[m])}),i.pop()}}if(!Se.isObject(t))throw new TypeError("data must be an object");return h(t),e}function bw(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Jd(t,e){this._pairs=[],t&&Gc(t,this,e)}const xw=Jd.prototype;xw.append=function(t,e){this._pairs.push([t,e])},xw.toString=function(t){const e=t?function(n){return t.call(this,n,bw)}:bw;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function iT(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kw(t,e,n){if(!e)return t;const r=n&&n.encode||iT;Se.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=Se.isURLSearchParams(e)?e.toString():new Jd(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}let _w=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){Se.forEach(this.handlers,function(n){n!==null&&e(n)})}};const Cw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oT=typeof URLSearchParams<"u"?URLSearchParams:Jd,sT=typeof FormData<"u"?FormData:null,aT=typeof Blob<"u"?Blob:null,lT={isBrowser:!0,classes:{URLSearchParams:oT,FormData:sT,Blob:aT},protocols:["http","https","file","blob","url","data"]},ep=typeof window<"u"&&typeof document<"u",tp=typeof navigator=="object"&&navigator||void 0,cT=ep&&(!tp||["ReactNative","NativeScript","NS"].indexOf(tp.product)<0),uT=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hT=ep&&window.location.href||"http://localhost",dT=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ep,hasStandardBrowserEnv:cT,hasStandardBrowserWebWorkerEnv:uT,navigator:tp,origin:hT},Symbol.toStringTag,{value:"Module"})),Cr={...dT,...lT};function pT(t,e){return Gc(t,new Cr.classes.URLSearchParams,{visitor:function(n,r,u,d){return Cr.isNode&&Se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function fT(t){return Se.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gT(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function Sw(t){function e(n,r,u,d){let p=n[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),f=d>=n.length;return p=!p&&Se.isArray(u)?u.length:p,f?(Se.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!w):((!u[p]||!Se.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&Se.isArray(u[p])&&(u[p]=gT(u[p])),!w)}if(Se.isFormData(t)&&Se.isFunction(t.entries)){const n={};return Se.forEachEntry(t,(r,u)=>{e(fT(r),u,n,0)}),n}return null}function mT(t,e,n){if(Se.isString(t))try{return(e||JSON.parse)(t),Se.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const bl={transitional:Cw,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,u=Se.isObject(t);if(u&&Se.isHTMLForm(t)&&(t=new FormData(t)),Se.isFormData(t))return r?JSON.stringify(Sw(t)):t;if(Se.isArrayBuffer(t)||Se.isBuffer(t)||Se.isStream(t)||Se.isFile(t)||Se.isBlob(t)||Se.isReadableStream(t))return t;if(Se.isArrayBufferView(t))return t.buffer;if(Se.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(u){if(n.indexOf("application/x-www-form-urlencoded")>-1)return pT(t,this.formSerializer).toString();if((d=Se.isFileList(t))||n.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return Gc(d?{"files[]":t}:t,p&&new p,this.formSerializer)}}return u||r?(e.setContentType("application/json",!1),mT(t)):t}],transformResponse:[function(t){const e=this.transitional||bl.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(t)||Se.isReadableStream(t))return t;if(t&&Se.isString(t)&&(n&&!this.responseType||r)){const u=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(d){if(u)throw d.name==="SyntaxError"?Ct.from(d,Ct.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:Cr.classes.FormData,Blob:Cr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],t=>{bl.headers[t]={}});const yT=Se.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"]),vT=t=>{const e={};let n,r,u;return t&&t.split(`
1497
+ `).forEach(function(d){u=d.indexOf(":"),n=d.substring(0,u).trim().toLowerCase(),r=d.substring(u+1).trim(),!(!n||e[n]&&yT[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},$w=Symbol("internals");function xl(t){return t&&String(t).trim().toLowerCase()}function Yc(t){return t===!1||t==null?t:Se.isArray(t)?t.map(Yc):String(t)}function wT(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 bT=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function np(t,e,n,r,u){if(Se.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function xT(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function kT(t,e){const n=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let Zr=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(w,f,g){const i=xl(f);if(!i)throw new Error("header name must be a non-empty string");const a=Se.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||f]=Yc(w))}const p=(w,f)=>Se.forEach(w,(g,i)=>d(g,i,f));if(Se.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if(Se.isString(e)&&(e=e.trim())&&!bT(e))p(vT(e),n);else if(Se.isObject(e)&&Se.isIterable(e)){let w={},f,g;for(const i of e){if(!Se.isArray(i))throw TypeError("Object iterator must return a key-value pair");w[g=i[0]]=(f=w[g])?Se.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(w,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=xl(e),e){const r=Se.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return wT(u);if(Se.isFunction(n))return n.call(this,u,r);if(Se.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=xl(e),e){const r=Se.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||np(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(p){if(p=xl(p),p){const w=Se.findKey(r,p);w&&(!n||np(r,r[w],w,n))&&(delete r[w],u=!0)}}return Se.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||np(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return Se.forEach(this,(u,d)=>{const p=Se.findKey(r,d);if(p){n[p]=Yc(u),delete n[d];return}const w=e?xT(d):String(d).trim();w!==d&&delete n[d],n[w]=Yc(u),r[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Se.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=e&&Se.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(`
1498
+ `)}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(u=>r.set(u)),r}static accessor(e){const n=(this[$w]=this[$w]={accessors:{}}).accessors,r=this.prototype;function u(d){const p=xl(d);n[p]||(kT(r,d),n[p]=!0)}return Se.isArray(e)?e.forEach(u):u(e),this}};Zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Zr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),Se.freezeMethods(Zr);function rp(t,e){const n=this||bl,r=e||n,u=Zr.from(r.headers);let d=r.data;return Se.forEach(t,function(p){d=p.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function Mw(t){return!!(t&&t.__CANCEL__)}function Sa(t,e,n){Ct.call(this,t??"canceled",Ct.ERR_CANCELED,e,n),this.name="CanceledError"}Se.inherits(Sa,Ct,{__CANCEL__:!0});function Ew(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 _T(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function CT(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,p;return e=e!==void 0?e:1e3,function(w){const f=Date.now(),g=r[d];p||(p=f),n[u]=w,r[u]=f;let i=d,a=0;for(;i!==u;)a+=n[i++],i=i%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),f-p<e)return;const h=g&&f-g;return h?Math.round(a*1e3/h):void 0}}function ST(t,e){let n=0,r=1e3/e,u,d;const p=(w,f=Date.now())=>{n=f,u=null,d&&(clearTimeout(d),d=null),t(...w)};return[(...w)=>{const f=Date.now(),g=f-n;g>=r?p(w,f):(u=w,d||(d=setTimeout(()=>{d=null,p(u)},r-g)))},()=>u&&p(u)]}const Xc=(t,e,n=3)=>{let r=0;const u=CT(50,250);return ST(d=>{const p=d.loaded,w=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=w;r=p;const a={loaded:p,total:w,progress:w?p/w:void 0,bytes:f,rate:g||void 0,estimated:g&&w&&i?(w-p)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},Aw=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Tw=t=>(...e)=>Se.asap(()=>t(...e)),$T=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,MT=Cr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];Se.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&p.push("path="+r),Se.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 ET(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function AT(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Rw(t,e,n){let r=!ET(e);return t&&(r||n==!1)?AT(t,e):e}const Lw=t=>t instanceof Zr?{...t}:t;function Ps(t,e){e=e||{};const n={};function r(g,i,a,h){return Se.isPlainObject(g)&&Se.isPlainObject(i)?Se.merge.call({caseless:h},g,i):Se.isPlainObject(i)?Se.merge({},i):Se.isArray(i)?i.slice():i}function u(g,i,a,h){if(Se.isUndefined(i)){if(!Se.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!Se.isUndefined(i))return r(void 0,i)}function p(g,i){if(Se.isUndefined(i)){if(!Se.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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:w,headers:(g,i,a)=>u(Lw(g),Lw(i),a,!0)};return Se.forEach(Object.keys({...t,...e}),function(g){const i=f[g]||u,a=i(t[g],e[g],g);Se.isUndefined(a)&&i!==w||(n[g]=a)}),n}const Ow=t=>{const e=Ps({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:p,auth:w}=e;e.headers=p=Zr.from(p),e.url=kw(Rw(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&p.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let f;if(Se.isFormData(n)){if(Cr.hasStandardBrowserEnv||Cr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Cr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&$T(e.url))){const g=u&&d&&MT.read(d);g&&p.set(u,g)}return e},TT=typeof XMLHttpRequest<"u",RT=TT&&function(t){return new Promise(function(e,n){const r=Ow(t);let u=r.data;const d=Zr.from(r.headers).normalize();let{responseType:p,onUploadProgress:w,onDownloadProgress:f}=r,g,i,a,h,c;function o(){h&&h(),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 k=Zr.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),T={data:!p||p==="text"||p==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:k,config:t,request:l};Ew(function(E){e(E),o()},function(E){n(E),o()},T),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 Ct("Request aborted",Ct.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new Ct("Network Error",Ct.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let k=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Cw;r.timeoutErrorMessage&&(k=r.timeoutErrorMessage),n(new Ct(k,T.clarifyTimeoutError?Ct.ETIMEDOUT:Ct.ECONNABORTED,t,l)),l=null},u===void 0&&d.setContentType(null),"setRequestHeader"in l&&Se.forEach(d.toJSON(),function(k,T){l.setRequestHeader(T,k)}),Se.isUndefined(r.withCredentials)||(l.withCredentials=!!r.withCredentials),p&&p!=="json"&&(l.responseType=r.responseType),f&&([a,c]=Xc(f,!0),l.addEventListener("progress",a)),w&&l.upload&&([i,h]=Xc(w),l.upload.addEventListener("progress",i),l.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(g=k=>{l&&(n(!k||k.type?new Sa(null,t,l):k),l.abort(),l=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const b=_T(r.url);if(b&&Cr.protocols.indexOf(b)===-1){n(new Ct("Unsupported protocol "+b+":",Ct.ERR_BAD_REQUEST,t));return}l.send(u||null)})},LT=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof Ct?i:new Sa(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new Ct(`timeout ${e} of ms exceeded`,Ct.ETIMEDOUT))},e);const w=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>Se.asap(w),f}},OT=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},IT=async function*(t,e){for await(const n of NT(t))yield*OT(n,e)},NT=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()}},Iw=(t,e,n,r)=>{const u=IT(t,e);let d=0,p,w=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){w(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(f){return w(f),u.return()}},{highWaterMark:2})},Qc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nw=Qc&&typeof ReadableStream=="function",DT=Qc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Dw=(t,...e)=>{try{return!!t(...e)}catch{return!1}},PT=Nw&&Dw(()=>{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}),Pw=64*1024,ip=Nw&&Dw(()=>Se.isReadableStream(new Response("").body)),Zc={stream:ip&&(t=>t.body)};Qc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Zc[e]&&(Zc[e]=Se.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 FT=async t=>{if(t==null)return 0;if(Se.isBlob(t))return t.size;if(Se.isSpecCompliantForm(t))return(await new Request(Cr.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(t)||Se.isArrayBuffer(t))return t.byteLength;if(Se.isURLSearchParams(t)&&(t=t+""),Se.isString(t))return(await DT(t)).byteLength},BT=async(t,e)=>Se.toFiniteNumber(t.getContentLength())??FT(e),jT=Qc&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=Ow(t);g=g?(g+"").toLowerCase():"text";let c=LT([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&PT&&n!=="get"&&n!=="head"&&(m=await BT(i,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if(Se.isFormData(r)&&(x=_.headers.get("content-type"))&&i.setContentType(x),_.body){const[R,I]=Aw(m,Xc(Tw(f)));r=Iw(_.body,Pw,R,I)}}Se.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let k=await fetch(o,h);const T=ip&&(g==="stream"||g==="response");if(ip&&(w||T&&l)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=k[O]});const x=Se.toFiniteNumber(k.headers.get("content-length")),[R,I]=w&&Aw(x,Xc(Tw(w),!0))||[];k=new Response(Iw(k.body,Pw,R,()=>{I&&I(),l&&l()}),_)}g=g||"text";let E=await Zc[Se.findKey(Zc,g)||"text"](k,t);return!T&&l&&l(),await new Promise((_,x)=>{Ew(_,x,{data:E,headers:Zr.from(k.headers),status:k.status,statusText:k.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)}}),op={http:tT,xhr:RT,fetch:jT};Se.forEach(op,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Fw=t=>`- ${t}`,WT=t=>Se.isFunction(t)||t===null||t===!1,Bw={getAdapter:t=>{t=Se.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!WT(n)&&(r=op[(p=String(n)).toLowerCase()],r===void 0))throw new Ct(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([w,f])=>`adapter ${w} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1499
+ `+d.map(Fw).join(`
1500
+ `):" "+Fw(d[0]):"as no adapter specified";throw new Ct("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:op};function sp(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Sa(null,t)}function jw(t){return sp(t),t.headers=Zr.from(t.headers),t.data=rp.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Bw.getAdapter(t.adapter||bl.adapter)(t).then(function(e){return sp(t),e.data=rp.call(t,t.transformResponse,e),e.headers=Zr.from(e.headers),e},function(e){return Mw(e)||(sp(t),e&&e.response&&(e.response.data=rp.call(t,t.transformResponse,e.response),e.response.headers=Zr.from(e.response.headers))),Promise.reject(e)})}const Ww="1.11.0",Jc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Jc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const zw={};Jc.transitional=function(t,e,n){function r(u,d){return"[Axios v"+Ww+"] Transitional option '"+u+"'"+d+(n?". "+n:"")}return(u,d,p)=>{if(t===!1)throw new Ct(r(d," has been removed"+(e?" in "+e:"")),Ct.ERR_DEPRECATED);return e&&!zw[d]&&(zw[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(u,d,p):!0}},Jc.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function zT(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 u=r.length;for(;u-- >0;){const d=r[u],p=e[d];if(p){const w=t[d],f=w===void 0||p(w,d,t);if(f!==!0)throw new Ct("option "+d+" must be "+f,Ct.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ct("Unknown option "+d,Ct.ERR_BAD_OPTION)}}const eu={assertOptions:zT,validators:Jc},co=eu.validators;let Fs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new _w,response:new _w}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.stack.replace(/^.+\n/,""):"";try{r.stack?d&&!String(r.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1501
+ `+d):r.stack=d}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ps(this.defaults,n);const{transitional:r,paramsSerializer:u,headers:d}=n;r!==void 0&&eu.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),u!=null&&(Se.isFunction(u)?n.paramsSerializer={serialize:u}:eu.assertOptions(u,{encode:co.function,serialize:co.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),eu.assertOptions(n,{baseUrl:co.spelling("baseURL"),withXsrfToken:co.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let p=d&&Se.merge(d.common,d[n.method]);d&&Se.forEach(["delete","get","head","post","put","patch","common"],o=>{delete d[o]}),n.headers=Zr.concat(p,d);const w=[];let f=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(n)===!1||(f=f&&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,h;if(!f){const o=[jw.bind(this),void 0];for(o.unshift(...w),o.push(...g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=w.length;let c=n;for(a=0;a<h;){const o=w[a++],l=w[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=jw.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=Ps(this.defaults,e);const n=Rw(e.baseURL,e.url,e.allowAbsoluteUrls);return kw(n,e.params,e.paramsSerializer)}};Se.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}))}}),Se.forEach(["post","put","patch"],function(t){function e(n){return function(r,u,d){return this.request(Ps(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:u}))}}Fs.prototype[t]=e(),Fs.prototype[t+"Form"]=e(!0)});let HT=class zx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(u,d,p){r.reason||(r.reason=new Sa(u,d,p),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 zx(function(n){e=n}),cancel:e}}};function UT(t){return function(e){return t.apply(null,e)}}function VT(t){return Se.isObject(t)&&t.isAxiosError===!0}const ap={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(ap).forEach(([t,e])=>{ap[e]=t});function Hw(t){const e=new Fs(t),n=aw(Fs.prototype.request,e);return Se.extend(n,Fs.prototype,e,{allOwnKeys:!0}),Se.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Hw(Ps(t,r))},n}const Yn=Fi("E",Hw(bl));Yn.Axios=Fs,Yn.CanceledError=Sa,Yn.CancelToken=HT,Yn.isCancel=Mw,Yn.VERSION=Ww,Yn.toFormData=Gc,Yn.AxiosError=Ct,Yn.Cancel=Yn.CanceledError,Yn.all=function(t){return Promise.all(t)},Yn.spread=UT,Yn.isAxiosError=VT,Yn.mergeConfig=Ps,Yn.AxiosHeaders=Zr,Yn.formToJSON=t=>Sw(Se.isHTMLForm(t)?new FormData(t):t),Yn.getAdapter=Bw.getAdapter,Yn.HttpStatusCode=ap,Yn.default=Yn;const{Axios:sj,AxiosError:aj,CanceledError:lj,isCancel:cj,CancelToken:uj,VERSION:hj,all:dj,Cancel:pj,isAxiosError:fj,spread:gj,toFormData:mj,AxiosHeaders:yj,HttpStatusCode:vj,formToJSON:wj,getAdapter:bj,mergeConfig:xj}=Yn;function Uw(){return Object.assign({},la())}function qT(t,e,n){const r=yn(t,void 0);return r.setTime(r.getTime()+e*sc),r}function KT(t,e){const n=()=>Kn(void 0,NaN),r=QT(t);let u;if(r.date){const f=ZT(r.date,2);u=JT(f.restDateString,f.year)}if(!u||isNaN(+u))return n();const d=+u;let p=0,w;if(r.time&&(p=eR(r.time),isNaN(p)))return n();if(r.timezone){if(w=tR(r.timezone),isNaN(w))return n()}else{const f=new Date(d+p),g=yn(0,void 0);return g.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),g.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),g}return yn(d+p+w,void 0)}const tu={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},GT=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,YT=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,XT=/^([+-])(\d{2})(?::?(\d{2}))?$/;function QT(t){const e={},n=t.split(tu.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],tu.timeZoneDelimiter.test(e.date)&&(e.date=t.split(tu.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const u=tu.timezone.exec(r);u?(e.time=r.replace(u[1],""),e.timezone=u[1]):e.time=r}return e}function ZT(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 u=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?u:d*100,restDateString:t.slice((r[1]||r[2]).length)}}function JT(t,e){if(e===null)return new Date(NaN);const n=t.match(GT);if(!n)return new Date(NaN);const r=!!n[4],u=kl(n[1]),d=kl(n[2])-1,p=kl(n[3]),w=kl(n[4]),f=kl(n[5])-1;if(r)return sR(e,w,f)?nR(e,w,f):new Date(NaN);{const g=new Date(0);return!iR(e,d,p)||!oR(e,u)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(u,p)),g)}}function kl(t){return t?parseInt(t):1}function eR(t){const e=t.match(YT);if(!e)return NaN;const n=lp(e[1]),r=lp(e[2]),u=lp(e[3]);return aR(n,r,u)?n*fh+r*sc+u*1e3:NaN}function lp(t){return t&&parseFloat(t.replace(",","."))||0}function tR(t){if(t==="Z")return 0;const e=t.match(XT);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),u=e[3]&&parseInt(e[3])||0;return lR(r,u)?n*(r*fh+u*sc):NaN}function nR(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const u=r.getUTCDay()||7,d=(e-1)*7+n+1-u;return r.setUTCDate(r.getUTCDate()+d),r}const rR=[31,null,31,30,31,30,31,31,30,31,30,31];function Vw(t){return t%400===0||t%4===0&&t%100!==0}function iR(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(rR[e]||(Vw(t)?29:28))}function oR(t,e){return e>=1&&e<=(Vw(t)?366:365)}function sR(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function aR(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function lR(t,e){return e>=0&&e<=59}function cR(t,e,n){return qT(t,-e)}function qw(t,e,n){const r=Uw(),u=dR(t,n.timeZone,n.locale??r.locale);return"formatToParts"in u?uR(u,e):hR(u,e)}function uR(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 hR(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}function dR(t,e,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:e,timeZoneName:t})}function pR(t,e){const n=vR(e);return"formatToParts"in n?gR(n,t):mR(n,t)}const fR={year:0,month:1,day:2,hour:3,minute:4,second:5};function gR(t,e){try{const n=t.formatToParts(e),r=[];for(let u=0;u<n.length;u++){const d=fR[n[u].type];d!==void 0&&(r[d]=parseInt(n[u].value,10))}return r}catch(n){if(n instanceof RangeError)return[NaN];throw n}}function mR(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 cp={},Kw=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")),yR=Kw==="06/25/2014, 00:00:00"||Kw==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function vR(t){return cp[t]||(cp[t]=yR?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"})),cp[t]}function Gw(t,e,n,r,u,d,p){const w=new Date(0);return w.setUTCFullYear(t,e,n),w.setUTCHours(r,u,d,p),w}const Yw=36e5,wR=6e4,up={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function hp(t,e,n){if(!t)return 0;let r=up.timezoneZ.exec(t);if(r)return 0;let u,d;if(r=up.timezoneHH.exec(t),r)return u=parseInt(r[1],10),Xw(u)?-(u*Yw):NaN;if(r=up.timezoneHHMM.exec(t),r){u=parseInt(r[2],10);const p=parseInt(r[3],10);return Xw(u,p)?(d=Math.abs(u)*Yw+p*wR,r[1]==="+"?-d:d):NaN}if(kR(t)){e=new Date(e||Date.now());const p=n?e:bR(e),w=dp(p,t);return-(n?w:xR(e,w,t))}return NaN}function bR(t){return Gw(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}function dp(t,e){const n=pR(t,e),r=Gw(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime();let u=t.getTime();const d=u%1e3;return u-=d>=0?d:1e3+d,r-u}function xR(t,e,n){let r=t.getTime()-e;const u=dp(new Date(r),n);if(e===u)return e;r-=u-e;const d=dp(new Date(r),n);return u===d?u:Math.max(u,d)}function Xw(t,e){return-23<=t&&t<=23&&(e==null||0<=e&&e<=59)}const Qw={};function kR(t){if(Qw[t])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:t}),Qw[t]=!0,!0}catch{return!1}}const _R=60*1e3,CR={X:function(t,e,n){const r=pp(n.timeZone,t);if(r===0)return"Z";switch(e){case"X":return Zw(r);case"XXXX":case"XX":return $a(r);case"XXXXX":case"XXX":default:return $a(r,":")}},x:function(t,e,n){const r=pp(n.timeZone,t);switch(e){case"x":return Zw(r);case"xxxx":case"xx":return $a(r);case"xxxxx":case"xxx":default:return $a(r,":")}},O:function(t,e,n){const r=pp(n.timeZone,t);switch(e){case"O":case"OO":case"OOO":return"GMT"+SR(r,":");case"OOOO":default:return"GMT"+$a(r,":")}},z:function(t,e,n){switch(e){case"z":case"zz":case"zzz":return qw("short",t,n);case"zzzz":default:return qw("long",t,n)}}};function pp(t,e){const n=t?hp(t,e,!0)/_R:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+t);return n}function nu(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),u=nu(Math.floor(r/60),2),d=nu(Math.floor(r%60),2);return n+u+e+d}function Zw(t,e){return t%60===0?(t>0?"-":"+")+nu(Math.abs(t)/60,2):$a(t,e)}function SR(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),u=Math.floor(r/60),d=r%60;return d===0?n+String(u):n+String(u)+e+nu(d,2)}function Jw(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 $R=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,fp=36e5,e0=6e4,MR=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:$R};function t0(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?MR: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=ER(t),{year:u,restDateString:d}=AR(r.date,n),p=TR(d,u);if(p===null||isNaN(p.getTime()))return new Date(NaN);if(p){const w=p.getTime();let f=0,g;if(r.time&&(f=RR(r.time),f===null||isNaN(f)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=hp(r.timeZone||e.timeZone,new Date(w+f)),isNaN(g))return new Date(NaN)}else g=Jw(new Date(w+f)),g=Jw(new Date(w+f+g));return new Date(w+f+g)}else return new Date(NaN)}function ER(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 u=Pr.timeZone.exec(r);u?(e.time=r.replace(u[1],""),e.timeZone=u[1].trim()):e.time=r}return e}function AR(t,e){if(t){const n=Pr.YYY[e],r=Pr.YYYYY[e];let u=Pr.YYYY.exec(t)||r.exec(t);if(u){const d=u[1];return{year:parseInt(d,10),restDateString:t.slice(d.length)}}if(u=Pr.YY.exec(t)||n.exec(t),u){const d=u[1];return{year:parseInt(d,10)*100,restDateString:t.slice(d.length)}}}return{year:null}}function TR(t,e){if(e===null)return null;let n,r,u;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,i0(e,r)?(n.setUTCFullYear(e,r),n):new Date(NaN);if(d=Pr.DDD.exec(t),d){n=new Date(0);const p=parseInt(d[1],10);return IR(e,p)?(n.setUTCFullYear(e,0,p),n):new Date(NaN)}if(d=Pr.MMDD.exec(t),d){n=new Date(0),r=parseInt(d[1],10)-1;const p=parseInt(d[2],10);return i0(e,r,p)?(n.setUTCFullYear(e,r,p),n):new Date(NaN)}if(d=Pr.Www.exec(t),d)return u=parseInt(d[1],10)-1,o0(u)?n0(e,u):new Date(NaN);if(d=Pr.WwwD.exec(t),d){u=parseInt(d[1],10)-1;const p=parseInt(d[2],10)-1;return o0(u,p)?n0(e,u,p):new Date(NaN)}return null}function RR(t){let e,n,r=Pr.HH.exec(t);if(r)return e=parseFloat(r[1].replace(",",".")),gp(e)?e%24*fp:NaN;if(r=Pr.HHMM.exec(t),r)return e=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),gp(e,n)?e%24*fp+n*e0:NaN;if(r=Pr.HHMMSS.exec(t),r){e=parseInt(r[1],10),n=parseInt(r[2],10);const u=parseFloat(r[3].replace(",","."));return gp(e,n,u)?e%24*fp+n*e0+u*1e3:NaN}return null}function n0(t,e,n){e=e||0,n=n||0;const r=new Date(0);r.setUTCFullYear(t,0,4);const u=r.getUTCDay()||7,d=e*7+n+1-u;return r.setUTCDate(r.getUTCDate()+d),r}const LR=[31,28,31,30,31,30,31,31,30,31,30,31],OR=[31,29,31,30,31,30,31,31,30,31,30,31];function r0(t){return t%400===0||t%4===0&&t%100!==0}function i0(t,e,n){if(e<0||e>11)return!1;if(n!=null){if(n<1)return!1;const r=r0(t);if(r&&n>OR[e]||!r&&n>LR[e])return!1}return!0}function IR(t,e){if(e<1)return!1;const n=r0(t);return!(n&&e>366||!n&&e>365)}function o0(t,e){return!(t<0||t>52||e!=null&&(e<0||e>6))}function gp(t,e,n){return!(t<0||t>=25||e!=null&&(e<0||e>=60)||n!=null&&(n<0||n>=60))}const NR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function DR(t,e,n={}){e=String(e);const r=e.match(NR);if(r){const u=t0(n.originalDate||t,n);e=r.reduce(function(d,p){if(p[0]==="'")return d;const w=d.indexOf(p),f=d[w-1]==="'",g=d.replace(p,"'"+CR[p[0]](u,p,n)+"'");return f?g.substring(0,w-1)+g.substring(w+1):g},e)}return Cs(t,e,n)}function PR(t,e,n){t=t0(t,n);const r=hp(e,t,!0),u=new Date(t.getTime()-r),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}function ru(t,e,n,r){return r={...r,timeZone:e,originalDate:t},DR(PR(t,e,{timeZone:r.timeZone}),n,r)}const iu="yyyy-MM-dd",s0="HH:mm:ss.SSS",a0="HH:mm:ss",ou=`${iu} ${s0}`,l0=`${iu} ${a0}`,kj=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 Cs(!e||e==="local"?cR(t,t.getTimezoneOffset()):t,ou)},formatDateTime(t,e){return!e||e==="local"?Cs(t,ou):ru(t,e,ou)},formatDateTimeHMS(t,e){return!e||e==="local"?Cs(t,l0):ru(t,e,l0)},formatDate:function(t,e){return!e||e==="local"?Cs(t,iu):ru(t,this.timeZone,iu)},formatTime:function(t,e,n=s0){return!e||e==="local"?Cs(t,n):ru(t,this.timeZone,n)},formatTimeHMS:function(t,e){return this.formatTime(t,e,a0)},formatTimestamp(t,e){return this.formatDateTime(KT(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 FR=Object.defineProperty,BR=(t,e,n)=>e in t?FR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ze=(t,e,n)=>BR(t,typeof e!="symbol"?e+"":e,n);function mp(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 jR(t,e){const n=yn(t,void 0).getDay();return n===0?7:n}function WR(t,e){const n=zR(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 zR(t){var e;return typeof t=="function"&&((e=t.prototype)==null?void 0:e.constructor)===t}const HR=10;class c0{constructor(){Ze(this,"subPriority",0)}validate(e,n){return!0}}class UR extends c0{constructor(e,n,r,u,d){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=u,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)}}class VR extends c0{constructor(e,n){super(),Ze(this,"priority",HR),Ze(this,"subPriority",-1),this.context=e||(r=>Kn(n,r))}set(e,n){return n.timestampIsSet?e:Kn(e,WR(e,this.context))}}class Gt{run(e,n,r,u){const d=this.parse(e,n,r,u);return d?{setter:new UR(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,n,r){return!0}}class qR 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}/},uo={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 ho(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,u=n[2]?parseInt(n[2],10):0,d=n[3]?parseInt(n[3],10):0,p=n[5]?parseInt(n[5],10):0;return{value:r*(u*fh+d*sc+p*$k),rest:e.slice(n[0].length)}}function u0(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 h0(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 yp(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 d0(t,e){const n=e>0,r=n?e:1-e;let u;if(r<=50)u=t||100;else{const d=r+50,p=Math.trunc(d/100)*100,w=t>=d%100;u=t+p-(w?100:0)}return n?u:1-u}function p0(t){return t%400===0||t%4===0&&t%100!==0}class KR 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 u=d=>({year:d,isTwoDigitYear:n==="yy"});switch(n){case"y":return Pn(Mn(4,e),u);case"yo":return Pn(r.ordinalNumber(e,{unit:"year"}),u);default:return Pn(Mn(n.length,e),u)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const u=e.getFullYear();if(r.isTwoDigitYear){const p=d0(r.year,u);return e.setFullYear(p,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}}class GR 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 u=d=>({year:d,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Pn(Mn(4,e),u);case"Yo":return Pn(r.ordinalNumber(e,{unit:"year"}),u);default:return Pn(Mn(n.length,e),u)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,u){const d=mh(e,u);if(r.isTwoDigitYear){const w=d0(r.year,d);return e.setFullYear(w,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}const p=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(p,0,u.firstWeekContainsDate),e.setHours(0,0,0,0),Go(e,u)}}class YR 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 h0(n==="R"?4:n.length,e)}set(e,n,r){const u=Kn(e,0);return u.setFullYear(r,0,4),u.setHours(0,0,0,0),ca(u)}}class XR 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 h0(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class QR 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}}class ZR 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}}class JR 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 u=d=>d-1;switch(n){case"M":return Pn(xn(Dn.month,e),u);case"MM":return Pn(Mn(2,e),u);case"Mo":return Pn(r.ordinalNumber(e,{unit:"month"}),u);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}}class eL 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 u=d=>d-1;switch(n){case"L":return Pn(xn(Dn.month,e),u);case"LL":return Pn(Mn(2,e),u);case"Lo":return Pn(r.ordinalNumber(e,{unit:"month"}),u);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 tL(t,e,n){const r=yn(t,n==null?void 0:n.in),u=kg(r,n)-e;return r.setDate(r.getDate()-u*7),yn(r,n==null?void 0:n.in)}class nL 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,u){return Go(tL(e,r,u),u)}}function rL(t,e,n){const r=yn(t,void 0),u=xg(r)-e;return r.setDate(r.getDate()-u*7),r}class iL 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(rL(e,r))}}const oL=[31,28,31,30,31,30,31,31,30,31,30,31],sL=[31,29,31,30,31,30,31,31,30,31,30,31];class aL 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(),u=p0(r),d=e.getMonth();return u?n>=1&&n<=sL[d]:n>=1&&n<=oL[d]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class lL 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 p0(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 vp(t,e,n){var r,u,d,p;const w=la(),f=(n==null?void 0:n.weekStartsOn)??((u=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:u.weekStartsOn)??w.weekStartsOn??((p=(d=w.locale)==null?void 0:d.options)==null?void 0:p.weekStartsOn)??0,g=yn(t,n==null?void 0:n.in),i=g.getDay(),a=(e%7+7)%7,h=7-f,c=e<0||e>6?e-(i+h)%7:(a+h)%7-(i+h)%7;return mp(g,c,n)}class cL 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,u){return e=vp(e,r,u),e.setHours(0,0,0,0),e}}class uL 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,u){const d=p=>{const w=Math.floor((p-1)/7)*7;return(p+u.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,u){return e=vp(e,r,u),e.setHours(0,0,0,0),e}}class hL 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,u){const d=p=>{const w=Math.floor((p-1)/7)*7;return(p+u.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,u){return e=vp(e,r,u),e.setHours(0,0,0,0),e}}function dL(t,e,n){const r=yn(t,void 0),u=jR(r),d=e-u;return mp(r,d,n)}class pL 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 u=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"}),u);case"iiiii":return Pn(r.day(e,{width:"narrow",context:"formatting"}),u);case"iiiiii":return Pn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),u);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"}),u)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=dL(e,r),e.setHours(0,0,0,0),e}}class fL 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(yp(r),0,0,0),e}}class gL 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(yp(r),0,0,0),e}}class mL 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(yp(r),0,0,0),e}}class yL 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 u=e.getHours()>=12;return u&&r<12?e.setHours(r+12,0,0,0):!u&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class vL 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}}class wL 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}}class bL 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 u=r<=24?r%24:r;return e.setHours(u,0,0,0),e}}class xL 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}}class kL 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}}class _L extends Gt{constructor(){super(...arguments),Ze(this,"priority",30),Ze(this,"incompatibleTokens",["t","T"])}parse(e,n){const r=u=>Math.trunc(u*Math.pow(10,-n.length+3));return Pn(Mn(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}}class CL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","x"])}parse(e,n){switch(n){case"X":return ho(uo.basicOptionalMinutes,e);case"XX":return ho(uo.basic,e);case"XXXX":return ho(uo.basicOptionalSeconds,e);case"XXXXX":return ho(uo.extendedOptionalSeconds,e);case"XXX":default:return ho(uo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class SL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","X"])}parse(e,n){switch(n){case"x":return ho(uo.basicOptionalMinutes,e);case"xx":return ho(uo.basic,e);case"xxxx":return ho(uo.basicOptionalSeconds,e);case"xxxxx":return ho(uo.extendedOptionalSeconds,e);case"xxx":default:return ho(uo.extended,e)}}set(e,n,r){return n.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class $L extends Gt{constructor(){super(...arguments),Ze(this,"priority",40),Ze(this,"incompatibleTokens","*")}parse(e){return u0(e)}set(e,n,r){return[Kn(e,r*1e3),{timestampIsSet:!0}]}}class ML extends Gt{constructor(){super(...arguments),Ze(this,"priority",20),Ze(this,"incompatibleTokens","*")}parse(e){return u0(e)}set(e,n,r){return[Kn(e,r),{timestampIsSet:!0}]}}const EL={G:new qR,y:new KR,Y:new GR,R:new YR,u:new XR,Q:new QR,q:new ZR,M:new JR,L:new eL,w:new nL,I:new iL,d:new aL,D:new lL,E:new cL,e:new uL,c:new hL,i:new pL,a:new fL,b:new gL,B:new mL,h:new yL,H:new vL,K:new wL,k:new bL,m:new xL,s:new kL,S:new _L,X:new CL,x:new SL,t:new $L,T:new ML},AL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RL=/^'([^]*?)'?$/,LL=/''/g,OL=/\S/,IL=/[a-zA-Z]/;function NL(t,e,n,r){var u,d,p,w;const f=()=>Kn(n,NaN),g=Uw(),i=g.locale??bg,a=g.firstWeekContainsDate??((d=(u=g.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,h=g.weekStartsOn??((w=(p=g.locale)==null?void 0:p.options)==null?void 0:w.weekStartsOn)??0;if(!e)return t?f():yn(n,void 0);const c={firstWeekContainsDate:a,weekStartsOn:h,locale:i},o=[new VR(void 0,n)],l=e.match(TL).map(E=>{const _=E[0];if(_ in yh){const x=yh[_];return x(E,i.formatLong)}return E}).join("").match(AL),m=[];for(let E of l){Ag(E)&&vh(E,e,t),Eg(E)&&vh(E,e,t);const _=E[0],x=EL[_];if(x){const{incompatibleTokens:R}=x;if(Array.isArray(R)){const O=m.find(L=>R.includes(L.token)||L.token===_);if(O)throw new RangeError(`The format string mustn't contain \`${O.fullToken}\` and \`${E}\` at the same time`)}else if(x.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${E}\` and any other token at the same time`);m.push({token:_,fullToken:E});const I=x.run(t,E,i.match,c);if(!I)return f();o.push(I.setter),t=I.rest}else{if(_.match(IL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");if(E==="''"?E="'":_==="'"&&(E=DL(E)),t.indexOf(E)===0)t=t.slice(E.length);else return f()}}if(t.length>0&&OL.test(t))return f();const b=o.map(E=>E.priority).sort((E,_)=>_-E).filter((E,_,x)=>x.indexOf(E)===_).map(E=>o.filter(_=>_.priority===E).sort((_,x)=>x.subPriority-_.subPriority)).map(E=>E[0]);let k=yn(n,void 0);if(isNaN(+k))return f();const T={};for(const E of b){if(!E.validate(k,c))return f();const _=E.set(k,T,c);Array.isArray(_)?(k=_[0],Object.assign(T,_[1])):k=_}return k}function DL(t){return t.match(RL)[1].replace(LL,"'")}function f0(t,e){return function(){return t.apply(e,arguments)}}const{toString:PL}=Object.prototype,{getPrototypeOf:wp}=Object,{iterator:su,toStringTag:g0}=Symbol,au=(t=>e=>{const n=PL.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),qi=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 m0=qi("ArrayBuffer");function FL(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&m0(t.buffer),e}const BL=lu("string"),Jr=lu("function"),y0=lu("number"),Sl=t=>t!==null&&typeof t=="object",jL=t=>t===!0||t===!1,cu=t=>{if(au(t)!=="object")return!1;const e=wp(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(g0 in t)&&!(su in t)},WL=t=>{if(!Sl(t)||Cl(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},zL=qi("Date"),HL=qi("File"),UL=qi("Blob"),VL=qi("FileList"),qL=t=>Sl(t)&&Jr(t.pipe),KL=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]"))},GL=qi("URLSearchParams"),[YL,XL,QL,ZL]=["ReadableStream","Request","Response","Headers"].map(qi),JL=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $l(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,u;if(typeof t!="object"&&(t=[t]),Ma(t))for(r=0,u=t.length;r<u;r++)e.call(null,t[r],r,t);else{if(Cl(t))return;const d=n?Object.getOwnPropertyNames(t):Object.keys(t),p=d.length;let w;for(r=0;r<p;r++)w=d[r],e.call(null,t[w],w,t)}}function v0(t,e){if(Cl(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,u;for(;r-- >0;)if(u=n[r],e===u.toLowerCase())return u;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,w0=t=>!_l(t)&&t!==Bs;function bp(){const{caseless:t}=w0(this)&&this||{},e={},n=(r,u)=>{const d=t&&v0(e,u)||u;cu(e[d])&&cu(r)?e[d]=bp(e[d],r):cu(r)?e[d]=bp({},r):Ma(r)?e[d]=r.slice():e[d]=r};for(let r=0,u=arguments.length;r<u;r++)arguments[r]&&$l(arguments[r],n);return e}const eO=(t,e,n,{allOwnKeys:r}={})=>($l(e,(u,d)=>{n&&Jr(u)?t[d]=f0(u,n):t[d]=u},{allOwnKeys:r}),t),tO=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),nO=(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)},rO=(t,e,n,r)=>{let u,d,p;const w={};if(e=e||{},t==null)return e;do{for(u=Object.getOwnPropertyNames(t),d=u.length;d-- >0;)p=u[d],(!r||r(p,t,e))&&!w[p]&&(e[p]=t[p],w[p]=!0);t=n!==!1&&wp(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},iO=(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},oO=t=>{if(!t)return null;if(Ma(t))return t;let e=t.length;if(!y0(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},sO=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&wp(Uint8Array)),aO=(t,e)=>{const r=(t&&t[su]).call(t);let u;for(;(u=r.next())&&!u.done;){const d=u.value;e.call(t,d[0],d[1])}},lO=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},cO=qi("HTMLFormElement"),uO=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,u){return r.toUpperCase()+u}),b0=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),hO=qi("RegExp"),x0=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$l(n,(u,d)=>{let p;(p=e(u,d,t))!==!1&&(r[d]=p||u)}),Object.defineProperties(t,r)},dO=t=>{x0(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+"'")})}})},pO=(t,e)=>{const n={},r=u=>{u.forEach(d=>{n[d]=!0})};return Ma(t)?r(t):r(String(t).split(e)),n},fO=()=>{},gO=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function mO(t){return!!(t&&Jr(t.append)&&t[g0]==="FormData"&&t[su])}const yO=t=>{const e=new Array(10),n=(r,u)=>{if(Sl(r)){if(e.indexOf(r)>=0)return;if(Cl(r))return r;if(!("toJSON"in r)){e[u]=r;const d=Ma(r)?[]:{};return $l(r,(p,w)=>{const f=n(p,u+1);!_l(f)&&(d[w]=f)}),e[u]=void 0,d}}return r};return n(t,0)},vO=qi("AsyncFunction"),wO=t=>t&&(Sl(t)||Jr(t))&&Jr(t.then)&&Jr(t.catch),k0=((t,e)=>t?setImmediate:e?((n,r)=>(Bs.addEventListener("message",({source:u,data:d})=>{u===Bs&&d===n&&r.length&&r.shift()()},!1),u=>{r.push(u),Bs.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Jr(Bs.postMessage)),bO=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||k0,$e={isArray:Ma,isArrayBuffer:m0,isBuffer:Cl,isFormData:KL,isArrayBufferView:FL,isString:BL,isNumber:y0,isBoolean:jL,isObject:Sl,isPlainObject:cu,isEmptyObject:WL,isReadableStream:YL,isRequest:XL,isResponse:QL,isHeaders:ZL,isUndefined:_l,isDate:zL,isFile:HL,isBlob:UL,isRegExp:hO,isFunction:Jr,isStream:qL,isURLSearchParams:GL,isTypedArray:sO,isFileList:VL,forEach:$l,merge:bp,extend:eO,trim:JL,stripBOM:tO,inherits:nO,toFlatObject:rO,kindOf:au,kindOfTest:qi,endsWith:iO,toArray:oO,forEachEntry:aO,matchAll:lO,isHTMLForm:cO,hasOwnProperty:b0,hasOwnProp:b0,reduceDescriptors:x0,freezeMethods:dO,toObjectSet:pO,toCamelCase:uO,noop:fO,toFiniteNumber:gO,findKey:v0,global:Bs,isContextDefined:w0,isSpecCompliantForm:mO,toJSONObject:yO,isAsyncFn:vO,isThenable:wO,setImmediate:k0,asap:bO,isIterable:t=>t!=null&&Jr(t[su])};function St(t,e,n,r,u){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),u&&(this.response=u,this.status=u.status?u.status:null)}$e.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:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const _0=St.prototype,C0={};["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=>{C0[t]={value:t}}),Object.defineProperties(St,C0),Object.defineProperty(_0,"isAxiosError",{value:!0}),St.from=(t,e,n,r,u,d)=>{const p=Object.create(_0);return $e.toFlatObject(t,p,function(f){return f!==Error.prototype},w=>w!=="isAxiosError"),St.call(p,t.message,e,n,r,u),p.cause=t,p.name=t.name,d&&Object.assign(p,d),p};const xO=null;function xp(t){return $e.isPlainObject(t)||$e.isArray(t)}function S0(t){return $e.endsWith(t,"[]")?t.slice(0,-2):t}function $0(t,e,n){return t?t.concat(e).map(function(u,d){return u=S0(u),!n&&d?"["+u+"]":u}).join(n?".":""):e}function kO(t){return $e.isArray(t)&&!t.some(xp)}const _O=$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,u=n.visitor||i,d=n.dots,p=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(u))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(!f&&$e.isBlob(o))throw new St("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(o)||$e.isTypedArray(o)?f&&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)&&kO(o)||($e.isFileList(o)||$e.endsWith(l,"[]"))&&(b=$e.toArray(o)))return l=S0(l),b.forEach(function(T,E){!($e.isUndefined(T)||T===null)&&e.append(p===!0?$0([l],E,d):p===null?l:l+"[]",g(T))}),!1}return xp(o)?!0:(e.append($0(m,l,d),g(o)),!1)}const a=[],h=Object.assign(_O,{defaultVisitor:i,convertValue:g,isVisitable:xp});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,k){(!($e.isUndefined(b)||b===null)&&u.call(e,b,$e.isString(k)?k.trim():k,l,h))===!0&&c(b,l?l.concat(k):[k])}),a.pop()}}if(!$e.isObject(t))throw new TypeError("data must be an object");return c(t),e}function M0(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 E0=kp.prototype;E0.append=function(e,n){this._pairs.push([e,n])},E0.toString=function(e){const n=e?function(r){return e.call(this,r,M0)}:M0;return this._pairs.map(function(u){return n(u[0])+"="+n(u[1])},"").join("&")};function CO(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function A0(t,e,n){if(!e)return t;const r=n&&n.encode||CO;$e.isFunction(n)&&(n={serialize:n});const u=n&&n.serialize;let d;if(u?d=u(e,n):d=$e.isURLSearchParams(e)?e.toString():new kp(e,n).toString(r),d){const p=t.indexOf("#");p!==-1&&(t=t.slice(0,p)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class T0{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 R0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},SO={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,$O=_p&&(!Cp||["ReactNative","NativeScript","NS"].indexOf(Cp.product)<0),MO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EO=_p&&window.location.href||"http://localhost",Sr={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_p,hasStandardBrowserEnv:$O,hasStandardBrowserWebWorkerEnv:MO,navigator:Cp,origin:EO},Symbol.toStringTag,{value:"Module"})),...SO};function AO(t,e){return uu(t,new Sr.classes.URLSearchParams,{visitor:function(n,r,u,d){return Sr.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function TO(t){return $e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function RO(t){const e={},n=Object.keys(t);let r;const u=n.length;let d;for(r=0;r<u;r++)d=n[r],e[d]=t[d];return e}function L0(t){function e(n,r,u,d){let p=n[d++];if(p==="__proto__")return!0;const w=Number.isFinite(+p),f=d>=n.length;return p=!p&&$e.isArray(u)?u.length:p,f?($e.hasOwnProp(u,p)?u[p]=[u[p],r]:u[p]=r,!w):((!u[p]||!$e.isObject(u[p]))&&(u[p]=[]),e(n,r,u[p],d)&&$e.isArray(u[p])&&(u[p]=RO(u[p])),!w)}if($e.isFormData(t)&&$e.isFunction(t.entries)){const n={};return $e.forEachEntry(t,(r,u)=>{e(TO(r),u,n,0)}),n}return null}function LO(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 Ml={transitional:R0,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",u=r.indexOf("application/json")>-1,d=$e.isObject(e);if(d&&$e.isHTMLForm(e)&&(e=new FormData(e)),$e.isFormData(e))return u?JSON.stringify(L0(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 AO(e,this.formSerializer).toString();if((w=$e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return uu(w?{"files[]":e}:e,f&&new f,this.formSerializer)}}return d||u?(n.setContentType("application/json",!1),LO(e)):e}],transformResponse:[function(e){const n=this.transitional||Ml.transitional,r=n&&n.forcedJSONParsing,u=this.responseType==="json";if($e.isResponse(e)||$e.isReadableStream(e))return e;if(e&&$e.isString(e)&&(r&&!this.responseType||u)){const p=!(n&&n.silentJSONParsing)&&u;try{return JSON.parse(e)}catch(w){if(p)throw w.name==="SyntaxError"?St.from(w,St.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:Sr.classes.FormData,Blob:Sr.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=>{Ml.headers[t]={}});const OO=$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"]),IO=t=>{const e={};let n,r,u;return t&&t.split(`
1502
+ `).forEach(function(p){u=p.indexOf(":"),n=p.substring(0,u).trim().toLowerCase(),r=p.substring(u+1).trim(),!(!n||e[n]&&OO[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},O0=Symbol("internals");function El(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 NO(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 DO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sp(t,e,n,r,u){if($e.isFunction(r))return r.call(this,e,n);if(u&&(e=n),!!$e.isString(e)){if($e.isString(r))return e.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(e)}}function PO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function FO(t,e){const n=$e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(u,d,p){return this[r].call(this,e,u,d,p)},configurable:!0})})}let ei=class{constructor(e){e&&this.set(e)}set(e,n,r){const u=this;function d(w,f,g){const i=El(f);if(!i)throw new Error("header name must be a non-empty string");const a=$e.findKey(u,i);(!a||u[a]===void 0||g===!0||g===void 0&&u[a]!==!1)&&(u[a||f]=hu(w))}const p=(w,f)=>$e.forEach(w,(g,i)=>d(g,i,f));if($e.isPlainObject(e)||e instanceof this.constructor)p(e,n);else if($e.isString(e)&&(e=e.trim())&&!DO(e))p(IO(e),n);else if($e.isObject(e)&&$e.isIterable(e)){let w={},f,g;for(const i of e){if(!$e.isArray(i))throw TypeError("Object iterator must return a key-value pair");w[g=i[0]]=(f=w[g])?$e.isArray(f)?[...f,i[1]]:[f,i[1]]:i[1]}p(w,n)}else e!=null&&d(n,e,r);return this}get(e,n){if(e=El(e),e){const r=$e.findKey(this,e);if(r){const u=this[r];if(!n)return u;if(n===!0)return NO(u);if($e.isFunction(n))return n.call(this,u,r);if($e.isRegExp(n))return n.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=El(e),e){const r=$e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Sp(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let u=!1;function d(p){if(p=El(p),p){const w=$e.findKey(r,p);w&&(!n||Sp(r,r[w],w,n))&&(delete r[w],u=!0)}}return $e.isArray(e)?e.forEach(d):d(e),u}clear(e){const n=Object.keys(this);let r=n.length,u=!1;for(;r--;){const d=n[r];(!e||Sp(this,this[d],d,e,!0))&&(delete this[d],u=!0)}return u}normalize(e){const n=this,r={};return $e.forEach(this,(u,d)=>{const p=$e.findKey(r,d);if(p){n[p]=hu(u),delete n[d];return}const w=e?PO(d):String(d).trim();w!==d&&delete n[d],n[w]=hu(u),r[w]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return $e.forEach(this,(r,u)=>{r!=null&&r!==!1&&(n[u]=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(u=>r.set(u)),r}static accessor(e){const r=(this[O0]=this[O0]={accessors:{}}).accessors,u=this.prototype;function d(p){const w=El(p);r[w]||(FO(u,p),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 $p(t,e){const n=this||Ml,r=e||n,u=ei.from(r.headers);let d=r.data;return $e.forEach(t,function(w){d=w.call(n,d,u.normalize(),e?e.status:void 0)}),u.normalize(),d}function I0(t){return!!(t&&t.__CANCEL__)}function Ea(t,e,n){St.call(this,t??"canceled",St.ERR_CANCELED,e,n),this.name="CanceledError"}$e.inherits(Ea,St,{__CANCEL__:!0});function N0(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 BO(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function jO(t,e){t=t||10;const n=new Array(t),r=new Array(t);let u=0,d=0,p;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),i=r[d];p||(p=g),n[u]=f,r[u]=g;let a=d,h=0;for(;a!==u;)h+=n[a++],a=a%t;if(u=(u+1)%t,u===d&&(d=(d+1)%t),g-p<e)return;const c=i&&g-i;return c?Math.round(h*1e3/c):void 0}}function WO(t,e){let n=0,r=1e3/e,u,d;const p=(g,i=Date.now())=>{n=i,u=null,d&&(clearTimeout(d),d=null),t(...g)};return[(...g)=>{const i=Date.now(),a=i-n;a>=r?p(g,i):(u=g,d||(d=setTimeout(()=>{d=null,p(u)},r-a)))},()=>u&&p(u)]}const du=(t,e,n=3)=>{let r=0;const u=jO(50,250);return WO(d=>{const p=d.loaded,w=d.lengthComputable?d.total:void 0,f=p-r,g=u(f),i=p<=w;r=p;const a={loaded:p,total:w,progress:w?p/w:void 0,bytes:f,rate:g||void 0,estimated:g&&w&&i?(w-p)/g:void 0,event:d,lengthComputable:w!=null,[e?"download":"upload"]:!0};t(a)},n)},D0=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},P0=t=>(...e)=>$e.asap(()=>t(...e)),zO=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,HO=Sr.hasStandardBrowserEnv?{write(t,e,n,r,u,d){const p=[t+"="+encodeURIComponent(e)];$e.isNumber(n)&&p.push("expires="+new Date(n).toGMTString()),$e.isString(r)&&p.push("path="+r),$e.isString(u)&&p.push("domain="+u),d===!0&&p.push("secure"),document.cookie=p.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 UO(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function VO(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function F0(t,e,n){let r=!UO(e);return t&&(r||n==!1)?VO(t,e):e}const B0=t=>t instanceof ei?{...t}:t;function js(t,e){e=e||{};const n={};function r(g,i,a,h){return $e.isPlainObject(g)&&$e.isPlainObject(i)?$e.merge.call({caseless:h},g,i):$e.isPlainObject(i)?$e.merge({},i):$e.isArray(i)?i.slice():i}function u(g,i,a,h){if($e.isUndefined(i)){if(!$e.isUndefined(g))return r(void 0,g,a,h)}else return r(g,i,a,h)}function d(g,i){if(!$e.isUndefined(i))return r(void 0,i)}function p(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 f={url:d,method:d,data:d,baseURL:p,transformRequest:p,transformResponse:p,paramsSerializer:p,timeout:p,timeoutMessage:p,withCredentials:p,withXSRFToken:p,adapter:p,responseType:p,xsrfCookieName:p,xsrfHeaderName:p,onUploadProgress:p,onDownloadProgress:p,decompress:p,maxContentLength:p,maxBodyLength:p,beforeRedirect:p,transport:p,httpAgent:p,httpsAgent:p,cancelToken:p,socketPath:p,responseEncoding:p,validateStatus:w,headers:(g,i,a)=>u(B0(g),B0(i),a,!0)};return $e.forEach(Object.keys({...t,...e}),function(i){const a=f[i]||u,h=a(t[i],e[i],i);$e.isUndefined(h)&&a!==w||(n[i]=h)}),n}const j0=t=>{const e=js({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:u,xsrfCookieName:d,headers:p,auth:w}=e;e.headers=p=ei.from(p),e.url=A0(F0(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),w&&p.set("Authorization","Basic "+btoa((w.username||"")+":"+(w.password?unescape(encodeURIComponent(w.password)):"")));let f;if($e.isFormData(n)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)p.setContentType(void 0);else if((f=p.getContentType())!==!1){const[g,...i]=f?f.split(";").map(a=>a.trim()).filter(Boolean):[];p.setContentType([g||"multipart/form-data",...i].join("; "))}}if(Sr.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(e)),r||r!==!1&&zO(e.url))){const g=u&&d&&HO.read(d);g&&p.set(u,g)}return e},qO=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const u=j0(t);let d=u.data;const p=ei.from(u.headers).normalize();let{responseType:w,onUploadProgress:f,onDownloadProgress:g}=u,i,a,h,c,o;function l(){c&&c(),o&&o(),u.cancelToken&&u.cancelToken.unsubscribe(i),u.signal&&u.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;m.open(u.method.toUpperCase(),u.url,!0),m.timeout=u.timeout;function b(){if(!m)return;const T=ei.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!w||w==="text"||w==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:t,request:m};N0(function(R){n(R),l()},function(R){r(R),l()},_),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 St("Request aborted",St.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new St("Network Error",St.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let E=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const _=u.transitional||R0;u.timeoutErrorMessage&&(E=u.timeoutErrorMessage),r(new St(E,_.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,t,m)),m=null},d===void 0&&p.setContentType(null),"setRequestHeader"in m&&$e.forEach(p.toJSON(),function(E,_){m.setRequestHeader(_,E)}),$e.isUndefined(u.withCredentials)||(m.withCredentials=!!u.withCredentials),w&&w!=="json"&&(m.responseType=u.responseType),g&&([h,o]=du(g,!0),m.addEventListener("progress",h)),f&&m.upload&&([a,c]=du(f),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(u.cancelToken||u.signal)&&(i=T=>{m&&(r(!T||T.type?new Ea(null,t,m):T),m.abort(),m=null)},u.cancelToken&&u.cancelToken.subscribe(i),u.signal&&(u.signal.aborted?i():u.signal.addEventListener("abort",i)));const k=BO(u.url);if(k&&Sr.protocols.indexOf(k)===-1){r(new St("Unsupported protocol "+k+":",St.ERR_BAD_REQUEST,t));return}m.send(d||null)})},KO=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,u;const d=function(g){if(!u){u=!0,w();const i=g instanceof Error?g:this.reason;r.abort(i instanceof St?i:new Ea(i instanceof Error?i.message:i))}};let p=e&&setTimeout(()=>{p=null,d(new St(`timeout ${e} of ms exceeded`,St.ETIMEDOUT))},e);const w=()=>{t&&(p&&clearTimeout(p),p=null,t.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),t=null)};t.forEach(g=>g.addEventListener("abort",d));const{signal:f}=r;return f.unsubscribe=()=>$e.asap(w),f}},GO=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,u;for(;r<n;)u=r+e,yield t.slice(r,u),r=u},YO=async function*(t,e){for await(const n of XO(t))yield*GO(n,e)},XO=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()}},W0=(t,e,n,r)=>{const u=YO(t,e);let d=0,p,w=f=>{p||(p=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:g,value:i}=await u.next();if(g){w(),f.close();return}let a=i.byteLength;if(n){let h=d+=a;n(h)}f.enqueue(new Uint8Array(i))}catch(g){throw w(g),g}},cancel(f){return w(f),u.return()}},{highWaterMark:2})},pu=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",z0=pu&&typeof ReadableStream=="function",QO=pu&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),H0=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ZO=z0&&H0(()=>{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}),U0=64*1024,Mp=z0&&H0(()=>$e.isReadableStream(new Response("").body)),fu={stream:Mp&&(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 St(`Response type '${e}' is not supported`,St.ERR_NOT_SUPPORT,r)})})})(new Response);const JO=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 QO(t)).byteLength},e2=async(t,e)=>{const n=$e.toFiniteNumber(t.getContentLength());return n??JO(e)},Ep={http:xO,xhr:qO,fetch:pu&&(async t=>{let{url:e,method:n,data:r,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:f,responseType:g,headers:i,withCredentials:a="same-origin",fetchOptions:h}=j0(t);g=g?(g+"").toLowerCase():"text";let c=KO([u,d&&d.toAbortSignal()],p),o;const l=c&&c.unsubscribe&&(()=>{c.unsubscribe()});let m;try{if(f&&ZO&&n!=="get"&&n!=="head"&&(m=await e2(i,r))!==0){let _=new Request(e,{method:"POST",body:r,duplex:"half"}),x;if($e.isFormData(r)&&(x=_.headers.get("content-type"))&&i.setContentType(x),_.body){const[R,I]=D0(m,du(P0(f)));r=W0(_.body,U0,R,I)}}$e.isString(a)||(a=a?"include":"omit");const b="credentials"in Request.prototype;o=new Request(e,{...h,signal:c,method:n.toUpperCase(),headers:i.normalize().toJSON(),body:r,duplex:"half",credentials:b?a:void 0});let k=await fetch(o,h);const T=Mp&&(g==="stream"||g==="response");if(Mp&&(w||T&&l)){const _={};["status","statusText","headers"].forEach(O=>{_[O]=k[O]});const x=$e.toFiniteNumber(k.headers.get("content-length")),[R,I]=w&&D0(x,du(P0(w),!0))||[];k=new Response(W0(k.body,U0,R,()=>{I&&I(),l&&l()}),_)}g=g||"text";let E=await fu[$e.findKey(fu,g)||"text"](k,t);return!T&&l&&l(),await new Promise((_,x)=>{N0(_,x,{data:E,headers:ei.from(k.headers),status:k.status,statusText:k.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)}})};$e.forEach(Ep,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const V0=t=>`- ${t}`,t2=t=>$e.isFunction(t)||t===null||t===!1,q0={getAdapter:t=>{t=$e.isArray(t)?t:[t];const{length:e}=t;let n,r;const u={};for(let d=0;d<e;d++){n=t[d];let p;if(r=n,!t2(n)&&(r=Ep[(p=String(n)).toLowerCase()],r===void 0))throw new St(`Unknown adapter '${p}'`);if(r)break;u[p||"#"+d]=r}if(!r){const d=Object.entries(u).map(([w,f])=>`adapter ${w} `+(f===!1?"is not supported by the environment":"is not available in the build"));let p=e?d.length>1?`since :
1504
+ `+d.map(V0).join(`
1505
+ `):" "+V0(d[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return r},adapters:Ep};function Ap(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ea(null,t)}function K0(t){return Ap(t),t.headers=ei.from(t.headers),t.data=$p.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),q0.getAdapter(t.adapter||Ml.adapter)(t).then(function(r){return Ap(t),r.data=$p.call(t,t.transformResponse,r),r.headers=ei.from(r.headers),r},function(r){return I0(r)||(Ap(t),r&&r.response&&(r.response.data=$p.call(t,t.transformResponse,r.response),r.response.headers=ei.from(r.response.headers))),Promise.reject(r)})}const G0="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 Y0={};gu.transitional=function(e,n,r){function u(d,p){return"[Axios v"+G0+"] Transitional option '"+d+"'"+p+(r?". "+r:"")}return(d,p,w)=>{if(e===!1)throw new St(u(p," has been removed"+(n?" in "+n:"")),St.ERR_DEPRECATED);return n&&!Y0[p]&&(Y0[p]=!0,console.warn(u(p," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(d,p,w):!0}},gu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function n2(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 u=r.length;for(;u-- >0;){const d=r[u],p=e[d];if(p){const w=t[d],f=w===void 0||p(w,d,t);if(f!==!0)throw new St("option "+d+" must be "+f,St.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new St("Unknown option "+d,St.ERR_BAD_OPTION)}}const mu={assertOptions:n2,validators:gu},po=mu.validators;let Ws=class{constructor(e){this.defaults=e||{},this.interceptors={request:new T0,response:new T0}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const d=u.stack?u.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:u,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),u!=null&&($e.isFunction(u)?n.paramsSerializer={serialize:u}:mu.assertOptions(u,{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 p=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(p,d);const w=[];let f=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(f=f&&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,h;if(!f){const o=[K0.bind(this),void 0];for(o.unshift(...w),o.push(...g),h=o.length,i=Promise.resolve(n);a<h;)i=i.then(o[a++],o[a++]);return i}h=w.length;let c=n;for(a=0;a<h;){const o=w[a++],l=w[a++];try{c=o(c)}catch(m){l.call(this,m);break}}try{i=K0.call(this,c)}catch(o){return Promise.reject(o)}for(a=0,h=g.length;a<h;)i=i.then(g[a++],g[a++]);return i}getUri(e){e=js(this.defaults,e);const n=F0(e.baseURL,e.url,e.allowAbsoluteUrls);return A0(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,p,w){return this.request(js(w||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:p}))}}Ws.prototype[e]=n(),Ws.prototype[e+"Form"]=n(!0)});let r2=class Hx{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(u=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](u);r._listeners=null}),this.promise.then=u=>{let d;const p=new Promise(w=>{r.subscribe(w),d=w}).then(u);return p.cancel=function(){r.unsubscribe(d)},p},e(function(d,p,w){r.reason||(r.reason=new Ea(d,p,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 Hx(function(u){e=u}),cancel:e}}};function i2(t){return function(n){return t.apply(null,n)}}function o2(t){return $e.isObject(t)&&t.isAxiosError===!0}const Tp={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(Tp).forEach(([t,e])=>{Tp[e]=t});function X0(t){const e=new Ws(t),n=f0(Ws.prototype.request,e);return $e.extend(n,Ws.prototype,e,{allOwnKeys:!0}),$e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(u){return X0(js(t,u))},n}const Fn=X0(Ml);Fn.Axios=Ws,Fn.CanceledError=Ea,Fn.CancelToken=r2,Fn.isCancel=I0,Fn.VERSION=G0,Fn.toFormData=uu,Fn.AxiosError=St,Fn.Cancel=Fn.CanceledError,Fn.all=function(e){return Promise.all(e)},Fn.spread=i2,Fn.isAxiosError=o2,Fn.mergeConfig=js,Fn.AxiosHeaders=ei,Fn.formToJSON=t=>L0($e.isHTMLForm(t)?new FormData(t):t),Fn.getAdapter=q0.getAdapter,Fn.HttpStatusCode=Tp,Fn.default=Fn;const{Axios:Tj,AxiosError:Rj,CanceledError:Lj,isCancel:Oj,CancelToken:Ij,VERSION:Nj,all:Dj,Cancel:Pj,isAxiosError:Fj,spread:Bj,toFormData:jj,AxiosHeaders:Wj,HttpStatusCode:zj,formToJSON:Hj,getAdapter:Uj,mergeConfig:Vj}=Fn,s2={components:{TopBar:gA,OutputDialog:hA},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 this.files.reduce((t,e)=>t+(e.size?e.size:0),0).toLocaleString()},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 u=null;if(this.mode==="bucket")u=r.data.url;else{const p=window.atob(r.data.contents),w=new Uint8Array(p.length);for(let g=0;g<p.length;++g)w[g]=p.charCodeAt(g);const f=new Blob([w]);u=URL.createObjectURL(f)}const d=document.createElement("a");d.href=u,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})}}},a2={style:{"padding-left":"5px","padding-top":"5px"}},l2={key:0,style:{"padding-left":"5px"}},c2={class:".text-body-1 ma-2 font-size","data-test":"file-path"},u2=["onClick"],h2={class:"ma-2 font-size"},d2={key:0,class:"ma-2",style:{display:"flex"}},p2={class:"mx-1"},f2={class:"pa-3"};function g2(t,e,n,r,u,d){const p=It("top-bar"),w=It("v-icon"),f=It("v-avatar"),g=It("v-chip"),i=It("v-spacer"),a=It("v-text-field"),h=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"),k=It("v-toolbar"),T=It("v-card-text"),E=It("v-dialog"),_=It("output-dialog");return zt(),qr("div",null,[tt(p,{title:u.title,menus:u.menus},null,8,["title","menus"]),tt(b,{width:"100%"},{default:et(()=>[cr("div",a2,[e[12]||(e[12]=cr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(zt(!0),qr(_o,null,Ko(u.buckets,(x,R)=>(zt(),Vn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(I=>d.selectBucket(x),["stop"])},{default:et(()=>[tt(f,{start:""},{default:et(()=>[tt(w,null,{default:et(()=>e[11]||(e[11]=[qn("mdi-bucket",-1)])),_:1,__:[11]})]),_:1}),qn(" "+Ir(x),1)]),_:2},1032,["onClick"]))),128))]),u.volumes.length!==0?(zt(),qr("div",l2,[e[14]||(e[14]=cr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(zt(!0),qr(_o,null,Ko(u.volumes,(x,R)=>(zt(),Vn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:ys(I=>d.selectVolume(x),["stop"])},{default:et(()=>[tt(f,{start:""},{default:et(()=>[tt(w,null,{default:et(()=>e[13]||(e[13]=[qn("mdi-folder",-1)])),_:1,__:[13]})]),_:1}),qn(" "+Ir(x),1)]),_:2},1032,["onClick"]))),128))])):oo("",!0),tt(h,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:et(()=>[qn(Ir(u.root)+" Files ",1),tt(i),tt(a,{modelValue:u.search,"onUpdate:modelValue":e[0]||(e[0]=x=>u.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":u.sortBy,"onUpdate:sortBy":e[2]||(e[2]=x=>u.sortBy=x),headers:u.headers,items:u.files,search:u.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",c2,[(zt(!0),qr(_o,null,Ko(d.breadcrumbPath,(x,R)=>(zt(),qr("span",{key:R},[e[15]||(e[15]=qn(" / ",-1)),cr("a",{style:{cursor:"pointer"},onClick:ys(I=>d.gotoPath(x.path),["prevent"])},Ir(x.name),9,u2)]))),128))]),tt(i),cr("div",h2,[qn(" Folder Size: "+Ir(d.folderTotal)+" ",1),e[16]||(e[16]=cr("span",{class:"small-font-size"},"(not recursive)",-1))]),tt(i),u.mode==="bucket"?(zt(),qr("div",d2,[e[17]||(e[17]=cr("span",{class:"font-size"},"Upload File",-1)),tt(o,{modelValue:u.file,"onUpdate:modelValue":e[1]||(e[1]=x=>u.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(()=>[qn(Ir(x.icon),1)]),_:2},1024),qn(" "+Ir(x.name),1)]),"item.size":et(({item:x})=>[qn(Ir(x.size?x.size.toLocaleString():""),1)]),"item.action":et(({item:x})=>[x.icon==="mdi-file"&&d.isText(x.name)?(zt(),Vn(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(),Vn(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(),Vn(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(E,{modelValue:u.uploadPathDialog,"onUpdate:modelValue":e[5]||(e[5]=x=>u.uploadPathDialog=x),"max-width":"600"},{default:et(()=>[tt(b,null,{default:et(()=>[tt(k,{height:"24"},{default:et(()=>[tt(i),e[18]||(e[18]=cr("span",null," Upload Path ",-1)),tt(i)]),_:1,__:[18]}),tt(T,null,{default:et(()=>[cr("div",p2,[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,__:[19]}),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=>u.uploadPathDialog=!1)},{default:et(()=>e[20]||(e[20]=[qn(" Cancel ",-1)])),_:1,__:[20]}),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]=[qn(" Upload ",-1)])),_:1,__:[21]},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"]),tt(E,{modelValue:u.optionsDialog,"onUpdate:modelValue":e[7]||(e[7]=x=>u.optionsDialog=x),"max-width":"300",onKeydown:e[8]||(e[8]=Ef(x=>u.optionsDialog=!1,["esc"]))},{default:et(()=>[tt(b,null,{default:et(()=>[tt(k,{height:"24"},{default:et(()=>[tt(i),e[22]||(e[22]=cr("span",null,"Options",-1)),tt(i)]),_:1,__:[22]}),tt(T,null,{default:et(()=>[cr("div",f2,[tt(a,{modelValue:u.refreshInterval,"onUpdate:modelValue":e[6]||(e[6]=x=>u.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"]),u.showDialog?(zt(),Vn(_,{key:0,modelValue:u.showDialog,"onUpdate:modelValue":e[9]||(e[9]=x=>u.showDialog=x),type:"File",content:u.dialogContent,name:u.dialogName,filename:u.dialogFilename,onSubmit:e[10]||(e[10]=x=>u.showDialog=!1)},null,8,["modelValue","content","name","filename"])):oo("",!0)])}Fi("b",Object.freeze(Object.defineProperty({__proto__:null,default:Sf(s2,[["render",g2],["__scopeId","data-v-5d442166"]])},Symbol.toStringTag,{value:"Module"})))}}});