openc3-cosmos-tool-bucketexplorer 6.10.2 → 6.10.3

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/tools/bucketexplorer/ArrayWidget-Bc-Awsbn-202e0673c9eaf7beaa5a.js +2 -0
  3. data/tools/bucketexplorer/{ArrayplotWidget-DDEd-jRJ-2857cf0bca6c3de48ff7.js → ArrayplotWidget-B9UGCr4--2a7d43d0bd9c555359dd.js} +1 -1
  4. data/tools/bucketexplorer/BarColumn-ClLBRGll-f69696707fc52a4db0be.js +1 -0
  5. data/tools/bucketexplorer/BlockWidget-CoQp-LZM-82ffdb2ee306bbc24ad5.js +2 -0
  6. data/tools/bucketexplorer/{BucketExplorer-1f78f0698d02d7704690.js → BucketExplorer-1921dbbf9a7a54a3da0e.js} +25 -25
  7. data/tools/bucketexplorer/ButtonWidget-CTTwpFec-8ee595bdd5d3320123e8.js +2 -0
  8. data/tools/bucketexplorer/CanvasWidget-jFarbJ3t-17017b86b8ed25fcaee9.js +1 -0
  9. data/tools/bucketexplorer/CanvasdotWidget-BoyUcwiB-69d5308fad5251ca5d81.js +1 -0
  10. data/tools/bucketexplorer/CanvasimageWidget-DmyCSnuQ-3baf8861b6ab88687196.js +1 -0
  11. data/tools/bucketexplorer/CanvasimagevalueWidget-CmbngMqv-c9da5cd94d7cd3bc6f36.js +1 -0
  12. data/tools/bucketexplorer/CanvaslabelWidget-D8NzLKqi-651469a7a4034f6f5cf0.js +1 -0
  13. data/tools/bucketexplorer/CanvaslabelvalueWidget-DOybGI9D-c6df196e890d3728af3a.js +1 -0
  14. data/tools/bucketexplorer/{CanvaslineWidget-D7W1TIxm-f6f0bc8445fdcd80a702.js → CanvaslineWidget-D2NEei7j-20ae2a6f40b22ffeee94.js} +1 -1
  15. data/tools/bucketexplorer/CanvaslinevalueWidget-Ctvv9owf-c2392946037b6d01336e.js +1 -0
  16. data/tools/bucketexplorer/CheckbuttonWidget-CQeR0BMF-f642e449ad4e634b4233.js +1 -0
  17. data/tools/bucketexplorer/ComboboxWidget-4N-MagvN-173ae3cc380605ce2f5f.js +1 -0
  18. data/tools/bucketexplorer/DateWidget-rYTjwUdb-c05c9568c1a2472917f8.js +1 -0
  19. data/tools/bucketexplorer/DetailsDialog-p_vutijL-39c61403e387db6f957c.js +1 -0
  20. data/tools/bucketexplorer/DynamicWidget-DEHWYr8i-15f79b6a6248ecd2c8a2.js +1 -0
  21. data/tools/bucketexplorer/FilechecksumWidget-gcmXxJHl-cefe2afd927c18996e1e.js +1 -0
  22. data/tools/bucketexplorer/FiledisplayWidget-CqM549A4-e65a9d2fc98ce0908a36.js +1 -0
  23. data/tools/bucketexplorer/FormatvalueWidget-BEwH0C7S-9f5c4680cd5a0daa983e.js +1 -0
  24. data/tools/bucketexplorer/Graph-CbjlChwf-5b07d2c75cc7ca27259c.js +1 -0
  25. data/tools/bucketexplorer/{GraphWidget-BpkPpAbd-7ce431656848d33b7320.js → GraphWidget-CjxnC0Dc-7a94cdca3cd839ddf27f.js} +1 -1
  26. data/tools/bucketexplorer/HorizontalWidget-Dt8bkM3k-d5eb259635c40983c784.js +1 -0
  27. data/tools/bucketexplorer/HorizontalboxWidget-CdAZ5Sa6-985c6ab4858c68e1a969.js +1 -0
  28. data/tools/bucketexplorer/HorizontallineWidget-CXZJTeU2-547ec0d3d7e5c1641ab5.js +1 -0
  29. data/tools/bucketexplorer/{IframeWidget-DK7rbULe-10c7f6d396585b58b9ca.js → IframeWidget-CrcWiAVE-d6ad0b9699db7be22fc1.js} +1 -1
  30. data/tools/bucketexplorer/{ImageLoader-C9rN_pSY-16782721f4febccb4dd8.js → ImageLoader-DPqax8yu-5b7cbbe5dd7cad59e449.js} +1 -1
  31. data/tools/bucketexplorer/ImageviewerWidget-CTEl6iPg-c68dbdf5774a798fc155.js +1 -0
  32. data/tools/bucketexplorer/{LabelWidget-D71FfOSw-dd8eb6360630c1b2c688.js → LabelWidget-CPqKGMx0-53c874ebe5cff4d620e1.js} +1 -1
  33. data/tools/bucketexplorer/LabelledWidget-BHYzRMFd-d210f4731d2aa4a07518.js +1 -0
  34. data/tools/bucketexplorer/LabelprogressbarWidget-D9deeUo7-2ef1aae3fbd20adcafe5.js +1 -0
  35. data/tools/bucketexplorer/LabelsparklineWidget-7mYre3CP-61ea2fa654fc354f7349.js +1 -0
  36. data/tools/bucketexplorer/LabelvalueWidget-NLsD60n4-4b96872518f58ddb88d6.js +1 -0
  37. data/tools/bucketexplorer/LabelvaluedescWidget-DXROG4Gs-9c67c83c6f1517799fd7.js +1 -0
  38. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-DqVqHF4W-7f22363671dcffddf201.js +1 -0
  39. data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-BK6_31pC-bbe3304972602555928c.js +1 -0
  40. data/tools/bucketexplorer/LabelvaluerangebarWidget-DR7C8gqw-54c1fe87327127d2617f.js +1 -0
  41. data/tools/bucketexplorer/Layout-B_Hgw3gd-89d30164b9988726fa27.js +1 -0
  42. data/tools/bucketexplorer/LedWidget-CiAVs2tj-a7f0b4ecb264b57fc3ec.js +1 -0
  43. data/tools/bucketexplorer/LimitsBar-_UQG-M6e-ad7653a086ab3729f8aa.js +1 -0
  44. data/tools/bucketexplorer/LimitsbarWidget-CIwcOhC8-cf1b307af95c6d13dc68.js +1 -0
  45. data/tools/bucketexplorer/LimitscolorWidget-CGPfJwvT-8c439c50f6ffa0404d76.js +1 -0
  46. data/tools/bucketexplorer/{LimitscolumnWidget-CjBy-CCI-d9b902ebca3b8f3e8832.js → LimitscolumnWidget-Bj_UPEC8-fa0a6dc3811e52d81877.js} +1 -1
  47. data/tools/bucketexplorer/{LinegraphWidget-lmu_tFKd-bf0f7aa0b6593cbfbb9b.js → LinegraphWidget-DccnHbWa-1ed3d33006c4b2b6d30a.js} +1 -1
  48. data/tools/bucketexplorer/MatrixbycolumnsWidget-U_NZ6aW--d8e8538d24ba887b8629.js +1 -0
  49. data/tools/bucketexplorer/ProgressbarWidget-D4JtVzyk-e55b6a8d8b51eacc56d6.js +1 -0
  50. data/tools/bucketexplorer/RadiobuttonWidget-BUaW7pRx-1d111d9defef80ee83fe.js +1 -0
  51. data/tools/bucketexplorer/RadiogroupWidget-NIv4CaUQ-32c2bddc764991b73bde.js +1 -0
  52. data/tools/bucketexplorer/RangebarWidget-1-CsFpcl-b7e6048ff61b60caa373.js +1 -0
  53. data/tools/bucketexplorer/RollupWidget-ChasTJYP-b772cfcf7b4cccd042d6.js +1 -0
  54. data/tools/bucketexplorer/ScrollwindowWidget-Y2J758y6-f37fd44892d08d4af8ed.js +1 -0
  55. data/tools/bucketexplorer/SignalWidget-DFhHDicI-71b7de4e8ac5216beece.js +1 -0
  56. data/tools/bucketexplorer/SpacerWidget-D4KojaGb-91ea8f7f2ab18293a822.js +1 -0
  57. data/tools/bucketexplorer/SparklineWidget-DMHFzw8L-3bfa4871de6d64778eb9.js +1 -0
  58. data/tools/bucketexplorer/TabbookWidget-NVLYMdFG-2c7238f5f6d3aeec7c65.js +1 -0
  59. data/tools/bucketexplorer/TextboxWidget-CrMYPQIF-6dcf99580dc114ee150b.js +1 -0
  60. data/tools/bucketexplorer/{TextfieldWidget-Be_Pz2bF-2554c151345b9c1f46ca.js → TextfieldWidget-DMBQwtnb-292f89519348f8e5941c.js} +1 -1
  61. data/tools/bucketexplorer/TimeWidget-CWLJZ2bt-df5276863e1bb9ad9a43.js +1 -0
  62. data/tools/bucketexplorer/TitleWidget-V1FGI8l3-f10848ed20d60ef98000.js +1 -0
  63. data/tools/bucketexplorer/{VWidget-CBmUpKSV-869e80ec5077db199eb0.js → VWidget-rAFU-0vj-45692d195444957b37c5.js} +1 -1
  64. data/tools/bucketexplorer/ValueWidget-BI3uXmda-fac1859571cbbb8fbebb.js +1 -0
  65. data/tools/bucketexplorer/ValuelimitsbarWidget-BGSJLpw4-52ff7f3febf13969eb60.js +1 -0
  66. data/tools/bucketexplorer/ValuelimitscolumnWidget-CaNjHy4v-73018a6c2c62db99242a.js +1 -0
  67. data/tools/bucketexplorer/ValuerangebarWidget-Do40-aaL-9a6671803fd750e31bb2.js +1 -0
  68. data/tools/bucketexplorer/VerticalWidget-DZqghqIm-8ff648dac0156d8dcb2c.js +1 -0
  69. data/tools/bucketexplorer/VerticalboxWidget-CQ__4FcS-3f65e4f18cf3294d363c.js +1 -0
  70. data/tools/bucketexplorer/Widget-6-Nvewdp-8ef51a845a579d94016c.js +1 -0
  71. data/tools/bucketexplorer/{main-2d24b5c8b84fa9a15ff1.js → main-276ad60a6db0a8f717d6.js} +3 -3
  72. data/tools/bucketexplorer/main.js +1 -1
  73. metadata +71 -68
  74. data/tools/bucketexplorer/ArrayWidget-CR7Wpw3N-bda67931d09f4b5f7c30.js +0 -2
  75. data/tools/bucketexplorer/BarColumn-XWs-3Cwb-70d8a2f65194b7942df1.js +0 -1
  76. data/tools/bucketexplorer/BlockWidget-CfFgdNSv-7028a06f0cc004e5ee89.js +0 -2
  77. data/tools/bucketexplorer/ButtonWidget-BaSvtElA-a36c46ac75b71019bc0d.js +0 -2
  78. data/tools/bucketexplorer/CanvasWidget-DcwDi5Zk-46adec4959a7895b6273.js +0 -1
  79. data/tools/bucketexplorer/CanvasdotWidget--awMOWyz-365bcad1f1513e58258c.js +0 -1
  80. data/tools/bucketexplorer/CanvasimageWidget-YP1pCtvb-370832b7a527364025f8.js +0 -1
  81. data/tools/bucketexplorer/CanvasimagevalueWidget-CjVHb2uj-7a880846dedce7817262.js +0 -1
  82. data/tools/bucketexplorer/CanvaslabelWidget-DoMplTTO-88b8aa82b61fafe9e13a.js +0 -1
  83. data/tools/bucketexplorer/CanvaslabelvalueWidget-Dyo_ogHn-9fc4f191a6010c872bcd.js +0 -1
  84. data/tools/bucketexplorer/CanvaslinevalueWidget-BOZyJuLE-4ddf3264c9d2d79ee8b4.js +0 -1
  85. data/tools/bucketexplorer/CheckbuttonWidget-B1E4BC6v-f5c38acb9e75246db2ed.js +0 -1
  86. data/tools/bucketexplorer/ComboboxWidget-BExUBH57-d35b9ec50988a44ba5fc.js +0 -1
  87. data/tools/bucketexplorer/DateWidget-_ZmPsi2l-35f631f60083cedfff6c.js +0 -1
  88. data/tools/bucketexplorer/DetailsDialog-Bq7SS7bc-db464671b9dcc94ca771.js +0 -1
  89. data/tools/bucketexplorer/DynamicWidget-DHL7pbgW-cf98899d5951f5e5fc10.js +0 -1
  90. data/tools/bucketexplorer/FormatvalueWidget-4C0vrL2i-d4d357bf535d0bba7b4a.js +0 -1
  91. data/tools/bucketexplorer/Graph-B7KPo9Ul-1a73f11359798d7da97f.js +0 -1
  92. data/tools/bucketexplorer/HorizontalWidget-DbEQYjFC-b351dfb8b08ccca0a85c.js +0 -1
  93. data/tools/bucketexplorer/HorizontalboxWidget-CTomf_Iy-83202384f40b358a6729.js +0 -1
  94. data/tools/bucketexplorer/HorizontallineWidget-B7xx7ofY-f8aaf188ce94fa1b6d7d.js +0 -1
  95. data/tools/bucketexplorer/ImageviewerWidget-6d6Kl3W_-d0306437582aa895bbdb.js +0 -1
  96. data/tools/bucketexplorer/LabelledWidget-D2ir5kVU-a264fee599a49a44bd40.js +0 -1
  97. data/tools/bucketexplorer/LabelprogressbarWidget-C4_YbROz-969982be5a60170a801b.js +0 -1
  98. data/tools/bucketexplorer/LabelsparklineWidget-CdZ_pM2B-e0a34222efeeab05bd1f.js +0 -1
  99. data/tools/bucketexplorer/LabelvalueWidget-BS0EPY5h-7055481f4436d700d9a2.js +0 -1
  100. data/tools/bucketexplorer/LabelvaluedescWidget-Cpr8_Voq-ee4389da78b26cf6ca35.js +0 -1
  101. data/tools/bucketexplorer/LabelvaluelimitsbarWidget-DTcYbEQS-c46940073d1cc860b01b.js +0 -1
  102. data/tools/bucketexplorer/LabelvaluelimitscolumnWidget-D0ltQ9Ta-1faf2e440d0327b51db7.js +0 -1
  103. data/tools/bucketexplorer/LabelvaluerangebarWidget-O8IHjvHs-45b9a376d6288583faed.js +0 -1
  104. data/tools/bucketexplorer/Layout-DW5yNlp7-d0ea56c9f2f6c2bcabba.js +0 -1
  105. data/tools/bucketexplorer/LedWidget-DUvJ2v8k-c05a373ebcefb0e3dbf3.js +0 -1
  106. data/tools/bucketexplorer/LimitsbarWidget-BehZv0-k-7d23b1df84cc8e0a2099.js +0 -1
  107. data/tools/bucketexplorer/LimitscolorWidget-FXT0ZPPH-9616db9c2433d6de8d00.js +0 -1
  108. data/tools/bucketexplorer/MatrixbycolumnsWidget-CCF7rCkV-fade60f5d5ca05d961b9.js +0 -1
  109. data/tools/bucketexplorer/ProgressbarWidget-B5WN658S-40fd618f179bbb0a7eed.js +0 -1
  110. data/tools/bucketexplorer/RadiobuttonWidget-B_3nys46-9c7cbb117658cc886780.js +0 -1
  111. data/tools/bucketexplorer/RadiogroupWidget-BiMIL9li-1b82a5661231447112c1.js +0 -1
  112. data/tools/bucketexplorer/RangebarWidget-Dn0GASdi-3a25812b815b630d9213.js +0 -1
  113. data/tools/bucketexplorer/RollupWidget-b62qcG5K-5c3768b6dbd2bc04d9ac.js +0 -1
  114. data/tools/bucketexplorer/ScrollwindowWidget-Dn29gs-U-f27245a971f6c54ef506.js +0 -1
  115. data/tools/bucketexplorer/SignalWidget-CLi6qask-57417f51fd1e035d59b3.js +0 -1
  116. data/tools/bucketexplorer/SpacerWidget-BCA3gdap-5b2a1f1c0f818aa1f56d.js +0 -1
  117. data/tools/bucketexplorer/SparklineWidget-D8mb4zLt-f9618c2d29eb071bdab2.js +0 -1
  118. data/tools/bucketexplorer/TabbookWidget-Bkt4g02d-6e80590512a18b8aae1b.js +0 -1
  119. data/tools/bucketexplorer/TextboxWidget-CR05wO-t-b6b8d573d3fe6dbaee1f.js +0 -1
  120. data/tools/bucketexplorer/TimeWidget-Dy8zpkC6-b82291ec0107974a776f.js +0 -1
  121. data/tools/bucketexplorer/TitleWidget-BcmxUDzM-3d458d5d79dcfd672e0f.js +0 -1
  122. data/tools/bucketexplorer/ValueWidget-BxWrHkYY-2e27324754692a3f9323.js +0 -1
  123. data/tools/bucketexplorer/ValuelimitsbarWidget-BdY02gqc-7894a29d103115a1e2ab.js +0 -1
  124. data/tools/bucketexplorer/ValuelimitscolumnWidget-CuJ6rqtC-2e02777baedef6f48063.js +0 -1
  125. data/tools/bucketexplorer/ValuerangebarWidget-C5rolGDi-2bc40f657b9e4f4ed1c7.js +0 -1
  126. data/tools/bucketexplorer/VerticalWidget-DsnEzKZ2-911d954540212ea4ff53.js +0 -1
  127. data/tools/bucketexplorer/VerticalboxWidget-CzDgveBl-2b18d4c4d6cb9610a926.js +0 -1
  128. data/tools/bucketexplorer/Widget-VCl8Ts8s-d1395db1f6e90590f3d5.js +0 -1
@@ -1,5 +1,5 @@
1
- System.register(["./main-2d24b5c8b84fa9a15ff1.js","vue","single-spa"],function(Bi,at){"use strict";var ot,Ku,bp,Gu,wp,Tt,xn,Dt,Je,et,cr,xr,kn,xp,Vr,So,Ko,kp,Yu,Xu,Si,Qu,Go,Zu;return{setters:[on=>{ot=on._,Ku=on.d,bp=on.a,Gu=on.r},on=>{wp=on.defineAsyncComponent,Tt=on.resolveComponent,xn=on.createBlock,Dt=on.openBlock,Je=on.withCtx,et=on.createVNode,cr=on.createElementVNode,xr=on.toDisplayString,kn=on.createTextVNode,xp=on.Teleport,Vr=on.createElementBlock,So=on.Fragment,Ko=on.renderList,kp=on.ref,Yu=on.mergeProps,Xu=on.createSlots,Si=on.createCommentVNode,Qu=on.normalizeStyle,Go=on.withModifiers,Zu=on.withKeys},null],execute:function(){var on=document.createElement("style");on.textContent=`.font-size[data-v-73b5c6d5]{font-size:1rem}.small-font-size[data-v-73b5c6d5]{font-size:.8rem}.file-input[data-v-73b5c6d5]{padding-top:0;margin-top:0}
2
- /*$vite$:1*/`,document.head.appendChild(on),Bi({$:gg,c:BL,f:_r,l:vn,y:Kn,z:df});var Yx=Object.defineProperty,Xx=(n,e,t)=>e in n?Yx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sp=(n,e,t)=>Xx(n,e+"",t);function _p(n,e){return function(){return n.apply(e,arguments)}}const{toString:Qx}=Object.prototype,{getPrototypeOf:Ju}=Object,{iterator:Yl,toStringTag:Cp}=Symbol,Xl=(n=>e=>{const t=Qx.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ji=n=>(n=n.toLowerCase(),e=>Xl(e)===n),Ql=n=>e=>typeof e===n,{isArray:sa}=Array,aa=Ql("undefined");function Ya(n){return n!==null&&!aa(n)&&n.constructor!==null&&!aa(n.constructor)&&Kr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const $p=ji("ArrayBuffer");function Zx(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&$p(n.buffer),e}const Jx=Ql("string"),Kr=Ql("function"),Ap=Ql("number"),Xa=n=>n!==null&&typeof n=="object",e1=n=>n===!0||n===!1,Zl=n=>{if(Xl(n)!=="object")return!1;const e=Ju(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Cp in n)&&!(Yl in n)},t1=n=>{if(!Xa(n)||Ya(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},n1=ji("Date"),r1=ji("File"),i1=ji("Blob"),o1=ji("FileList"),s1=n=>Xa(n)&&Kr(n.pipe),a1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Kr(n.append)&&((e=Xl(n))==="formdata"||e==="object"&&Kr(n.toString)&&n.toString()==="[object FormData]"))},l1=ji("URLSearchParams"),[c1,u1,h1,d1]=["ReadableStream","Request","Response","Headers"].map(ji),f1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qa(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),sa(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(Ya(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function Ep(n,e){if(Ya(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Tp=n=>!aa(n)&&n!==bs;function eh(){const{caseless:n,skipUndefined:e}=Tp(this)&&this||{},t={},r=(l,d)=>{const u=n&&Ep(t,d)||d;Zl(t[u])&&Zl(l)?t[u]=eh(t[u],l):Zl(l)?t[u]=eh({},l):sa(l)?t[u]=l.slice():(!e||!aa(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&Qa(arguments[l],r);return t}const p1=(n,e,t,{allOwnKeys:r}={})=>(Qa(e,(l,d)=>{t&&Kr(l)?n[d]=_p(l,t):n[d]=l},{allOwnKeys:r}),n),g1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),m1=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},v1=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&Ju(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},y1=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},b1=n=>{if(!n)return null;if(sa(n))return n;let e=n.length;if(!Ap(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},w1=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Ju(Uint8Array)),x1=(n,e)=>{const t=(n&&n[Yl]).call(n);let r;for(;(r=t.next())&&!r.done;){const l=r.value;e.call(n,l[0],l[1])}},k1=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},S1=ji("HTMLFormElement"),_1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Mp=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),C1=ji("RegExp"),Rp=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Qa(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},$1=n=>{Rp(n,(e,t)=>{if(Kr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},A1=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return sa(n)?r(n):r(String(n).split(e)),t},E1=()=>{},T1=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function M1(n){return!!(n&&Kr(n.append)&&n[Cp]==="FormData"&&n[Yl])}const R1=n=>{const e=new Array(10),t=(r,l)=>{if(Xa(r)){if(e.indexOf(r)>=0)return;if(Ya(r))return r;if(!("toJSON"in r)){e[l]=r;const d=sa(r)?[]:{};return Qa(r,(u,b)=>{const p=t(u,l+1);!aa(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},L1=ji("AsyncFunction"),O1=n=>n&&(Xa(n)||Kr(n))&&Kr(n.then)&&Kr(n.catch),Lp=((n,e)=>n?setImmediate:e?((t,r)=>(bs.addEventListener("message",({source:l,data:d})=>{l===bs&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),bs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Kr(bs.postMessage)),I1=typeof queueMicrotask<"u"?queueMicrotask.bind(bs):typeof process<"u"&&process.nextTick||Lp,N1=n=>n!=null&&Kr(n[Yl]),Se={isArray:sa,isArrayBuffer:$p,isBuffer:Ya,isFormData:a1,isArrayBufferView:Zx,isString:Jx,isNumber:Ap,isBoolean:e1,isObject:Xa,isPlainObject:Zl,isEmptyObject:t1,isReadableStream:c1,isRequest:u1,isResponse:h1,isHeaders:d1,isUndefined:aa,isDate:n1,isFile:r1,isBlob:i1,isRegExp:C1,isFunction:Kr,isStream:s1,isURLSearchParams:l1,isTypedArray:w1,isFileList:o1,forEach:Qa,merge:eh,extend:p1,trim:f1,stripBOM:g1,inherits:m1,toFlatObject:v1,kindOf:Xl,kindOfTest:ji,endsWith:y1,toArray:b1,forEachEntry:x1,matchAll:k1,isHTMLForm:S1,hasOwnProperty:Mp,hasOwnProp:Mp,reduceDescriptors:Rp,freezeMethods:$1,toObjectSet:A1,toCamelCase:_1,noop:E1,toFiniteNumber:T1,findKey:Ep,global:bs,isContextDefined:Tp,isSpecCompliantForm:M1,toJSONObject:R1,isAsyncFn:L1,isThenable:O1,setImmediate:Lp,asap:I1,isIterable:N1};function kt(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}Se.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:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const Op=kt.prototype,Ip={};["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(n=>{Ip[n]={value:n}}),Object.defineProperties(kt,Ip),Object.defineProperty(Op,"isAxiosError",{value:!0}),kt.from=(n,e,t,r,l,d)=>{const u=Object.create(Op);Se.toFlatObject(n,u,function(g){return g!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return kt.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const D1=null;function th(n){return Se.isPlainObject(n)||Se.isArray(n)}function Np(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Dp(n,e,t){return n?n.concat(e).map(function(r,l){return r=Np(r),!t&&l?"["+r+"]":r}).join(t?".":""):e}function F1(n){return Se.isArray(n)&&!n.some(th)}const P1=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function Jl(n,e,t){if(!Se.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Se.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,i){return!Se.isUndefined(i[h])});const r=t.metaTokens,l=t.visitor||g,d=t.dots,u=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(l))throw new TypeError("visitor must be a function");function p(h){if(h===null)return"";if(Se.isDate(h))return h.toISOString();if(Se.isBoolean(h))return h.toString();if(!b&&Se.isBlob(h))throw new kt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(h)||Se.isTypedArray(h)?b&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function g(h,i,a){let m=h;if(h&&!a&&typeof h=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),h=JSON.stringify(h);else if(Se.isArray(h)&&F1(h)||(Se.isFileList(h)||Se.endsWith(i,"[]"))&&(m=Se.toArray(h)))return i=Np(i),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(u===!0?Dp([i],x,d):u===null?i:i+"[]",p(w))}),!1}return th(h)?!0:(e.append(Dp(a,i,d),p(h)),!1)}const o=[],c=Object.assign(P1,{defaultVisitor:g,convertValue:p,isVisitable:th});function f(h,i){if(!Se.isUndefined(h)){if(o.indexOf(h)!==-1)throw Error("Circular reference detected in "+i.join("."));o.push(h),Se.forEach(h,function(a,m){(!(Se.isUndefined(a)||a===null)&&l.call(e,a,Se.isString(m)?m.trim():m,i,c))===!0&&f(a,i?i.concat(m):[m])}),o.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return f(n),e}function Fp(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function nh(n,e){this._pairs=[],n&&Jl(n,this,e)}const Pp=nh.prototype;Pp.append=function(n,e){this._pairs.push([n,e])},Pp.toString=function(n){const e=n?function(t){return n.call(this,t,Fp)}:Fp;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function B1(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bp(n,e,t){if(!e)return n;const r=t&&t.encode||B1;Se.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=Se.isURLSearchParams(e)?e.toString():new nh(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}let jp=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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(t){t!==null&&e(t)})}};const Wp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},j1=typeof URLSearchParams<"u"?URLSearchParams:nh,W1=typeof FormData<"u"?FormData:null,z1=typeof Blob<"u"?Blob:null,H1={isBrowser:!0,classes:{URLSearchParams:j1,FormData:W1,Blob:z1},protocols:["http","https","file","blob","url","data"]},rh=typeof window<"u"&&typeof document<"u",ih=typeof navigator=="object"&&navigator||void 0,U1=rh&&(!ih||["ReactNative","NativeScript","NS"].indexOf(ih.product)<0),q1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",V1=rh&&window.location.href||"http://localhost",K1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rh,hasStandardBrowserEnv:U1,hasStandardBrowserWebWorkerEnv:q1,navigator:ih,origin:V1},Symbol.toStringTag,{value:"Module"})),kr={...K1,...H1};function G1(n,e){return Jl(n,new kr.classes.URLSearchParams,{visitor:function(t,r,l,d){return kr.isNode&&Se.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function Y1(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function X1(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function zp(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&Se.isArray(l)?l.length:u,p?(Se.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!Se.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&Se.isArray(l[u])&&(l[u]=X1(l[u])),!b)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const t={};return Se.forEachEntry(n,(r,l)=>{e(Y1(r),l,t,0)}),t}return null}function Q1(n,e,t){if(Se.isString(n))try{return(e||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Za={transitional:Wp,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,l=Se.isObject(n);if(l&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(zp(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let d;if(l){if(t.indexOf("application/x-www-form-urlencoded")>-1)return G1(n,this.formSerializer).toString();if((d=Se.isFileList(n))||t.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Jl(d?{"files[]":n}:n,u&&new u,this.formSerializer)}}return l||r?(e.setContentType("application/json",!1),Q1(n)):n}],transformResponse:[function(n){const e=this.transitional||Za.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(t&&!this.responseType||r)){const l=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(d){if(l)throw d.name==="SyntaxError"?kt.from(d,kt.ERR_BAD_RESPONSE,this,null,this.response):d}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Za.headers[n]={}});const Z1=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"]),J1=n=>{const e={};let t,r,l;return n&&n.split(`
1
+ System.register(["./main-276ad60a6db0a8f717d6.js","vue","single-spa"],function(Si,it){"use strict";var nt,Ku,bp,Gu,wp,Tt,xn,Dt,Je,et,cr,xr,kn,xp,Vr,So,Ko,kp,Yu,Xu,_i,Qu,Go,Zu;return{setters:[on=>{nt=on._,Ku=on.d,bp=on.a,Gu=on.r},on=>{wp=on.defineAsyncComponent,Tt=on.resolveComponent,xn=on.createBlock,Dt=on.openBlock,Je=on.withCtx,et=on.createVNode,cr=on.createElementVNode,xr=on.toDisplayString,kn=on.createTextVNode,xp=on.Teleport,Vr=on.createElementBlock,So=on.Fragment,Ko=on.renderList,kp=on.ref,Yu=on.mergeProps,Xu=on.createSlots,_i=on.createCommentVNode,Qu=on.normalizeStyle,Go=on.withModifiers,Zu=on.withKeys},null],execute:function(){var on=document.createElement("style");on.textContent=`.font-size[data-v-73b5c6d5]{font-size:1rem}.small-font-size[data-v-73b5c6d5]{font-size:.8rem}.file-input[data-v-73b5c6d5]{padding-top:0;margin-top:0}
2
+ /*$vite$:1*/`,document.head.appendChild(on),Si({$:gg,c:BL,f:_r,l:vn,y:Kn,z:df});var Yx=Object.defineProperty,Xx=(n,e,t)=>e in n?Yx(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Sp=(n,e,t)=>Xx(n,e+"",t);function _p(n,e){return function(){return n.apply(e,arguments)}}const{toString:Qx}=Object.prototype,{getPrototypeOf:Ju}=Object,{iterator:Yl,toStringTag:Cp}=Symbol,Xl=(n=>e=>{const t=Qx.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),ji=n=>(n=n.toLowerCase(),e=>Xl(e)===n),Ql=n=>e=>typeof e===n,{isArray:sa}=Array,aa=Ql("undefined");function Ya(n){return n!==null&&!aa(n)&&n.constructor!==null&&!aa(n.constructor)&&Kr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const $p=ji("ArrayBuffer");function Zx(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&$p(n.buffer),e}const Jx=Ql("string"),Kr=Ql("function"),Ap=Ql("number"),Xa=n=>n!==null&&typeof n=="object",e1=n=>n===!0||n===!1,Zl=n=>{if(Xl(n)!=="object")return!1;const e=Ju(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Cp in n)&&!(Yl in n)},t1=n=>{if(!Xa(n)||Ya(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},n1=ji("Date"),r1=ji("File"),i1=ji("Blob"),o1=ji("FileList"),s1=n=>Xa(n)&&Kr(n.pipe),a1=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Kr(n.append)&&((e=Xl(n))==="formdata"||e==="object"&&Kr(n.toString)&&n.toString()==="[object FormData]"))},l1=ji("URLSearchParams"),[c1,u1,h1,d1]=["ReadableStream","Request","Response","Headers"].map(ji),f1=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qa(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),sa(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(Ya(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function Ep(n,e){if(Ya(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Tp=n=>!aa(n)&&n!==bs;function eh(){const{caseless:n,skipUndefined:e}=Tp(this)&&this||{},t={},r=(l,d)=>{const u=n&&Ep(t,d)||d;Zl(t[u])&&Zl(l)?t[u]=eh(t[u],l):Zl(l)?t[u]=eh({},l):sa(l)?t[u]=l.slice():(!e||!aa(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&Qa(arguments[l],r);return t}const p1=(n,e,t,{allOwnKeys:r}={})=>(Qa(e,(l,d)=>{t&&Kr(l)?n[d]=_p(l,t):n[d]=l},{allOwnKeys:r}),n),g1=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),m1=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},v1=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&Ju(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},y1=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},b1=n=>{if(!n)return null;if(sa(n))return n;let e=n.length;if(!Ap(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},w1=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Ju(Uint8Array)),x1=(n,e)=>{const t=(n&&n[Yl]).call(n);let r;for(;(r=t.next())&&!r.done;){const l=r.value;e.call(n,l[0],l[1])}},k1=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},S1=ji("HTMLFormElement"),_1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),Mp=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),C1=ji("RegExp"),Rp=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Qa(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},$1=n=>{Rp(n,(e,t)=>{if(Kr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},A1=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return sa(n)?r(n):r(String(n).split(e)),t},E1=()=>{},T1=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function M1(n){return!!(n&&Kr(n.append)&&n[Cp]==="FormData"&&n[Yl])}const R1=n=>{const e=new Array(10),t=(r,l)=>{if(Xa(r)){if(e.indexOf(r)>=0)return;if(Ya(r))return r;if(!("toJSON"in r)){e[l]=r;const d=sa(r)?[]:{};return Qa(r,(u,b)=>{const p=t(u,l+1);!aa(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},L1=ji("AsyncFunction"),O1=n=>n&&(Xa(n)||Kr(n))&&Kr(n.then)&&Kr(n.catch),Lp=((n,e)=>n?setImmediate:e?((t,r)=>(bs.addEventListener("message",({source:l,data:d})=>{l===bs&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),bs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Kr(bs.postMessage)),I1=typeof queueMicrotask<"u"?queueMicrotask.bind(bs):typeof process<"u"&&process.nextTick||Lp,N1=n=>n!=null&&Kr(n[Yl]),Se={isArray:sa,isArrayBuffer:$p,isBuffer:Ya,isFormData:a1,isArrayBufferView:Zx,isString:Jx,isNumber:Ap,isBoolean:e1,isObject:Xa,isPlainObject:Zl,isEmptyObject:t1,isReadableStream:c1,isRequest:u1,isResponse:h1,isHeaders:d1,isUndefined:aa,isDate:n1,isFile:r1,isBlob:i1,isRegExp:C1,isFunction:Kr,isStream:s1,isURLSearchParams:l1,isTypedArray:w1,isFileList:o1,forEach:Qa,merge:eh,extend:p1,trim:f1,stripBOM:g1,inherits:m1,toFlatObject:v1,kindOf:Xl,kindOfTest:ji,endsWith:y1,toArray:b1,forEachEntry:x1,matchAll:k1,isHTMLForm:S1,hasOwnProperty:Mp,hasOwnProp:Mp,reduceDescriptors:Rp,freezeMethods:$1,toObjectSet:A1,toCamelCase:_1,noop:E1,toFiniteNumber:T1,findKey:Ep,global:bs,isContextDefined:Tp,isSpecCompliantForm:M1,toJSONObject:R1,isAsyncFn:L1,isThenable:O1,setImmediate:Lp,asap:I1,isIterable:N1};function kt(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}Se.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:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const Op=kt.prototype,Ip={};["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(n=>{Ip[n]={value:n}}),Object.defineProperties(kt,Ip),Object.defineProperty(Op,"isAxiosError",{value:!0}),kt.from=(n,e,t,r,l,d)=>{const u=Object.create(Op);Se.toFlatObject(n,u,function(g){return g!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return kt.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const D1=null;function th(n){return Se.isPlainObject(n)||Se.isArray(n)}function Np(n){return Se.endsWith(n,"[]")?n.slice(0,-2):n}function Dp(n,e,t){return n?n.concat(e).map(function(r,l){return r=Np(r),!t&&l?"["+r+"]":r}).join(t?".":""):e}function F1(n){return Se.isArray(n)&&!n.some(th)}const P1=Se.toFlatObject(Se,{},null,function(n){return/^is[A-Z]/.test(n)});function Jl(n,e,t){if(!Se.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Se.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,i){return!Se.isUndefined(i[h])});const r=t.metaTokens,l=t.visitor||g,d=t.dots,u=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Se.isSpecCompliantForm(e);if(!Se.isFunction(l))throw new TypeError("visitor must be a function");function p(h){if(h===null)return"";if(Se.isDate(h))return h.toISOString();if(Se.isBoolean(h))return h.toString();if(!b&&Se.isBlob(h))throw new kt("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(h)||Se.isTypedArray(h)?b&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function g(h,i,a){let m=h;if(h&&!a&&typeof h=="object"){if(Se.endsWith(i,"{}"))i=r?i:i.slice(0,-2),h=JSON.stringify(h);else if(Se.isArray(h)&&F1(h)||(Se.isFileList(h)||Se.endsWith(i,"[]"))&&(m=Se.toArray(h)))return i=Np(i),m.forEach(function(w,x){!(Se.isUndefined(w)||w===null)&&e.append(u===!0?Dp([i],x,d):u===null?i:i+"[]",p(w))}),!1}return th(h)?!0:(e.append(Dp(a,i,d),p(h)),!1)}const o=[],c=Object.assign(P1,{defaultVisitor:g,convertValue:p,isVisitable:th});function f(h,i){if(!Se.isUndefined(h)){if(o.indexOf(h)!==-1)throw Error("Circular reference detected in "+i.join("."));o.push(h),Se.forEach(h,function(a,m){(!(Se.isUndefined(a)||a===null)&&l.call(e,a,Se.isString(m)?m.trim():m,i,c))===!0&&f(a,i?i.concat(m):[m])}),o.pop()}}if(!Se.isObject(n))throw new TypeError("data must be an object");return f(n),e}function Fp(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function nh(n,e){this._pairs=[],n&&Jl(n,this,e)}const Pp=nh.prototype;Pp.append=function(n,e){this._pairs.push([n,e])},Pp.toString=function(n){const e=n?function(t){return n.call(this,t,Fp)}:Fp;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function B1(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bp(n,e,t){if(!e)return n;const r=t&&t.encode||B1;Se.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=Se.isURLSearchParams(e)?e.toString():new nh(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}let jp=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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(t){t!==null&&e(t)})}};const Wp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},j1=typeof URLSearchParams<"u"?URLSearchParams:nh,W1=typeof FormData<"u"?FormData:null,z1=typeof Blob<"u"?Blob:null,H1={isBrowser:!0,classes:{URLSearchParams:j1,FormData:W1,Blob:z1},protocols:["http","https","file","blob","url","data"]},rh=typeof window<"u"&&typeof document<"u",ih=typeof navigator=="object"&&navigator||void 0,U1=rh&&(!ih||["ReactNative","NativeScript","NS"].indexOf(ih.product)<0),q1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",V1=rh&&window.location.href||"http://localhost",K1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rh,hasStandardBrowserEnv:U1,hasStandardBrowserWebWorkerEnv:q1,navigator:ih,origin:V1},Symbol.toStringTag,{value:"Module"})),kr={...K1,...H1};function G1(n,e){return Jl(n,new kr.classes.URLSearchParams,{visitor:function(t,r,l,d){return kr.isNode&&Se.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function Y1(n){return Se.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function X1(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function zp(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&Se.isArray(l)?l.length:u,p?(Se.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!Se.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&Se.isArray(l[u])&&(l[u]=X1(l[u])),!b)}if(Se.isFormData(n)&&Se.isFunction(n.entries)){const t={};return Se.forEachEntry(n,(r,l)=>{e(Y1(r),l,t,0)}),t}return null}function Q1(n,e,t){if(Se.isString(n))try{return(e||JSON.parse)(n),Se.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const Za={transitional:Wp,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,l=Se.isObject(n);if(l&&Se.isHTMLForm(n)&&(n=new FormData(n)),Se.isFormData(n))return r?JSON.stringify(zp(n)):n;if(Se.isArrayBuffer(n)||Se.isBuffer(n)||Se.isStream(n)||Se.isFile(n)||Se.isBlob(n)||Se.isReadableStream(n))return n;if(Se.isArrayBufferView(n))return n.buffer;if(Se.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let d;if(l){if(t.indexOf("application/x-www-form-urlencoded")>-1)return G1(n,this.formSerializer).toString();if((d=Se.isFileList(n))||t.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Jl(d?{"files[]":n}:n,u&&new u,this.formSerializer)}}return l||r?(e.setContentType("application/json",!1),Q1(n)):n}],transformResponse:[function(n){const e=this.transitional||Za.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Se.isResponse(n)||Se.isReadableStream(n))return n;if(n&&Se.isString(n)&&(t&&!this.responseType||r)){const l=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(d){if(l)throw d.name==="SyntaxError"?kt.from(d,kt.ERR_BAD_RESPONSE,this,null,this.response):d}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kr.classes.FormData,Blob:kr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],n=>{Za.headers[n]={}});const Z1=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"]),J1=n=>{const e={};let t,r,l;return n&&n.split(`
3
3
  `).forEach(function(d){l=d.indexOf(":"),t=d.substring(0,l).trim().toLowerCase(),r=d.substring(l+1).trim(),!(!t||e[t]&&Z1[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Hp=Symbol("internals");function Ja(n){return n&&String(n).trim().toLowerCase()}function ec(n){return n===!1||n==null?n:Se.isArray(n)?n.map(ec):String(n)}function ek(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const tk=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function oh(n,e,t,r,l){if(Se.isFunction(r))return r.call(this,e,t);if(l&&(e=t),!!Se.isString(e)){if(Se.isString(r))return e.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(e)}}function nk(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function rk(n,e){const t=Se.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(l,d,u){return this[r].call(this,e,l,d,u)},configurable:!0})})}let Gr=class{constructor(e){e&&this.set(e)}set(e,t,r){const l=this;function d(b,p,g){const o=Ja(p);if(!o)throw new Error("header name must be a non-empty string");const c=Se.findKey(l,o);(!c||l[c]===void 0||g===!0||g===void 0&&l[c]!==!1)&&(l[c||p]=ec(b))}const u=(b,p)=>Se.forEach(b,(g,o)=>d(g,o,p));if(Se.isPlainObject(e)||e instanceof this.constructor)u(e,t);else if(Se.isString(e)&&(e=e.trim())&&!tk(e))u(J1(e),t);else if(Se.isObject(e)&&Se.isIterable(e)){let b={},p,g;for(const o of e){if(!Se.isArray(o))throw TypeError("Object iterator must return a key-value pair");b[g=o[0]]=(p=b[g])?Se.isArray(p)?[...p,o[1]]:[p,o[1]]:o[1]}u(b,t)}else e!=null&&d(t,e,r);return this}get(e,t){if(e=Ja(e),e){const r=Se.findKey(this,e);if(r){const l=this[r];if(!t)return l;if(t===!0)return ek(l);if(Se.isFunction(t))return t.call(this,l,r);if(Se.isRegExp(t))return t.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ja(e),e){const r=Se.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||oh(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let l=!1;function d(u){if(u=Ja(u),u){const b=Se.findKey(r,u);b&&(!t||oh(r,r[b],b,t))&&(delete r[b],l=!0)}}return Se.isArray(e)?e.forEach(d):d(e),l}clear(e){const t=Object.keys(this);let r=t.length,l=!1;for(;r--;){const d=t[r];(!e||oh(this,this[d],d,e,!0))&&(delete this[d],l=!0)}return l}normalize(e){const t=this,r={};return Se.forEach(this,(l,d)=>{const u=Se.findKey(r,d);if(u){t[u]=ec(l),delete t[d];return}const b=e?nk(d):String(d).trim();b!==d&&delete t[d],t[b]=ec(l),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Se.forEach(this,(r,l)=>{r!=null&&r!==!1&&(t[l]=e&&Se.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
4
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,...t){const r=new this(e);return t.forEach(l=>r.set(l)),r}static accessor(e){const t=(this[Hp]=this[Hp]={accessors:{}}).accessors,r=this.prototype;function l(d){const u=Ja(d);t[u]||(rk(r,d),t[u]=!0)}return Se.isArray(e)?e.forEach(l):l(e),this}};Gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(Gr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Se.freezeMethods(Gr);function sh(n,e){const t=this||Za,r=e||t,l=Gr.from(r.headers);let d=r.data;return Se.forEach(n,function(u){d=u.call(t,d,l.normalize(),e?e.status:void 0)}),l.normalize(),d}function Up(n){return!!(n&&n.__CANCEL__)}function la(n,e,t){kt.call(this,n??"canceled",kt.ERR_CANCELED,e,t),this.name="CanceledError"}Se.inherits(la,kt,{__CANCEL__:!0});function qp(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new kt("Request failed with status code "+t.status,[kt.ERR_BAD_REQUEST,kt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function ik(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function ok(n,e){n=n||10;const t=new Array(n),r=new Array(n);let l=0,d=0,u;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];u||(u=p),t[l]=b,r[l]=p;let o=d,c=0;for(;o!==l;)c+=t[o++],o=o%n;if(l=(l+1)%n,l===d&&(d=(d+1)%n),p-u<e)return;const f=g&&p-g;return f?Math.round(c*1e3/f):void 0}}function sk(n,e){let t=0,r=1e3/e,l,d;const u=(b,p=Date.now())=>{t=p,l=null,d&&(clearTimeout(d),d=null),n(...b)};return[(...b)=>{const p=Date.now(),g=p-t;g>=r?u(b,p):(l=b,d||(d=setTimeout(()=>{d=null,u(l)},r-g)))},()=>l&&u(l)]}const tc=(n,e,t=3)=>{let r=0;const l=ok(50,250);return sk(d=>{const u=d.loaded,b=d.lengthComputable?d.total:void 0,p=u-r,g=l(p),o=u<=b;r=u;const c={loaded:u,total:b,progress:b?u/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&o?(b-u)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(c)},t)},Vp=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Kp=n=>(...e)=>Se.asap(()=>n(...e)),ak=kr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,kr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(kr.origin),kr.navigator&&/(msie|trident)/i.test(kr.navigator.userAgent)):()=>!0,lk=kr.hasStandardBrowserEnv?{write(n,e,t,r,l,d,u){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];Se.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),Se.isString(r)&&b.push(`path=${r}`),Se.isString(l)&&b.push(`domain=${l}`),d===!0&&b.push("secure"),Se.isString(u)&&b.push(`SameSite=${u}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function ck(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function uk(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Gp(n,e,t){let r=!ck(e);return n&&(r||t==!1)?uk(n,e):e}const Yp=n=>n instanceof Gr?{...n}:n;function ws(n,e){e=e||{};const t={};function r(g,o,c,f){return Se.isPlainObject(g)&&Se.isPlainObject(o)?Se.merge.call({caseless:f},g,o):Se.isPlainObject(o)?Se.merge({},o):Se.isArray(o)?o.slice():o}function l(g,o,c,f){if(Se.isUndefined(o)){if(!Se.isUndefined(g))return r(void 0,g,c,f)}else return r(g,o,c,f)}function d(g,o){if(!Se.isUndefined(o))return r(void 0,o)}function u(g,o){if(Se.isUndefined(o)){if(!Se.isUndefined(g))return r(void 0,g)}else return r(void 0,o)}function b(g,o,c){if(c in e)return r(g,o);if(c in n)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:b,headers:(g,o,c)=>l(Yp(g),Yp(o),c,!0)};return Se.forEach(Object.keys({...n,...e}),function(g){const o=p[g]||l,c=o(n[g],e[g],g);Se.isUndefined(c)&&o!==b||(t[g]=c)}),t}const Xp=n=>{const e=ws({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:d,headers:u,auth:b}=e;if(e.headers=u=Gr.from(u),e.url=Bp(Gp(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&u.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Se.isFormData(t)){if(kr.hasStandardBrowserEnv||kr.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Se.isFunction(t.getHeaders)){const p=t.getHeaders(),g=["content-type","content-length"];Object.entries(p).forEach(([o,c])=>{g.includes(o.toLowerCase())&&u.set(o,c)})}}if(kr.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(e)),r||r!==!1&&ak(e.url))){const p=l&&d&&lk.read(d);p&&u.set(l,p)}return e},hk=typeof XMLHttpRequest<"u",dk=hk&&function(n){return new Promise(function(e,t){const r=Xp(n);let l=r.data;const d=Gr.from(r.headers).normalize();let{responseType:u,onUploadProgress:b,onDownloadProgress:p}=r,g,o,c,f,h;function i(){f&&f(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let a=new XMLHttpRequest;a.open(r.method.toUpperCase(),r.url,!0),a.timeout=r.timeout;function m(){if(!a)return;const x=Gr.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:x,config:n,request:a};qp(function($){e($),i()},function($){t($),i()},T),a=null}"onloadend"in a?a.onloadend=m:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(m)},a.onabort=function(){a&&(t(new kt("Request aborted",kt.ECONNABORTED,n,a)),a=null)},a.onerror=function(x){const T=x&&x.message?x.message:"Network Error",$=new kt(T,kt.ERR_NETWORK,n,a);$.event=x||null,t($),a=null},a.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Wp;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new kt(x,T.clarifyTimeoutError?kt.ETIMEDOUT:kt.ECONNABORTED,n,a)),a=null},l===void 0&&d.setContentType(null),"setRequestHeader"in a&&Se.forEach(d.toJSON(),function(x,T){a.setRequestHeader(T,x)}),Se.isUndefined(r.withCredentials)||(a.withCredentials=!!r.withCredentials),u&&u!=="json"&&(a.responseType=r.responseType),p&&([c,h]=tc(p,!0),a.addEventListener("progress",c)),b&&a.upload&&([o,f]=tc(b),a.upload.addEventListener("progress",o),a.upload.addEventListener("loadend",f)),(r.cancelToken||r.signal)&&(g=x=>{a&&(t(!x||x.type?new la(null,n,a):x),a.abort(),a=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=ik(r.url);if(w&&kr.protocols.indexOf(w)===-1){t(new kt("Unsupported protocol "+w+":",kt.ERR_BAD_REQUEST,n));return}a.send(l||null)})},fk=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,l;const d=function(g){if(!l){l=!0,b();const o=g instanceof Error?g:this.reason;r.abort(o instanceof kt?o:new la(o instanceof Error?o.message:o))}};let u=e&&setTimeout(()=>{u=null,d(new kt(`timeout ${e} of ms exceeded`,kt.ETIMEDOUT))},e);const b=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),n=null)};n.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Se.asap(b),p}},pk=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,l;for(;r<t;)l=r+e,yield n.slice(r,l),r=l},gk=async function*(n,e){for await(const t of mk(n))yield*pk(t,e)},mk=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Qp=(n,e,t,r)=>{const l=gk(n,e);let d=0,u,b=p=>{u||(u=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:o}=await l.next();if(g){b(),p.close();return}let c=o.byteLength;if(t){let f=d+=c;t(f)}p.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(p){return b(p),l.return()}},{highWaterMark:2})},Zp=64*1024,{isFunction:nc}=Se,vk=(({Request:n,Response:e})=>({Request:n,Response:e}))(Se.global),{ReadableStream:Jp,TextEncoder:eg}=Se.global,tg=(n,...e)=>{try{return!!n(...e)}catch{return!1}},yk=n=>{n=Se.merge.call({skipUndefined:!0},vk,n);const{fetch:e,Request:t,Response:r}=n,l=e?nc(e):typeof fetch=="function",d=nc(t),u=nc(r);if(!l)return!1;const b=l&&nc(Jp),p=l&&(typeof eg=="function"?(i=>a=>i.encode(a))(new eg):async i=>new Uint8Array(await new t(i).arrayBuffer())),g=d&&b&&tg(()=>{let i=!1;const a=new t(kr.origin,{body:new Jp,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!a}),o=u&&b&&tg(()=>Se.isReadableStream(new r("").body)),c={stream:o&&(i=>i.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!c[i]&&(c[i]=(a,m)=>{let w=a&&a[i];if(w)return w.call(a);throw new kt(`Response type '${i}' is not supported`,kt.ERR_NOT_SUPPORT,m)})});const f=async i=>{if(i==null)return 0;if(Se.isBlob(i))return i.size;if(Se.isSpecCompliantForm(i))return(await new t(kr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Se.isArrayBufferView(i)||Se.isArrayBuffer(i))return i.byteLength;if(Se.isURLSearchParams(i)&&(i=i+""),Se.isString(i))return(await p(i)).byteLength},h=async(i,a)=>Se.toFiniteNumber(i.getContentLength())??f(a);return async i=>{let{url:a,method:m,data:w,signal:x,cancelToken:T,timeout:$,onDownloadProgress:S,onUploadProgress:k,responseType:L,headers:N,withCredentials:R="same-origin",fetchOptions:O}=Xp(i),W=e||fetch;L=L?(L+"").toLowerCase():"text";let P=fk([x,T&&T.toAbortSignal()],$),D=null;const A=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let _;try{if(k&&g&&m!=="get"&&m!=="head"&&(_=await h(N,w))!==0){let J=new t(a,{method:"POST",body:w,duplex:"half"}),ae;if(Se.isFormData(w)&&(ae=J.headers.get("content-type"))&&N.setContentType(ae),J.body){const[ne,se]=Vp(_,tc(Kp(k)));w=Qp(J.body,Zp,ne,se)}}Se.isString(R)||(R=R?"include":"omit");const I=d&&"credentials"in t.prototype,j={...O,signal:P,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:I?R:void 0};D=d&&new t(a,j);let U=await(d?W(D,O):W(a,j));const K=o&&(L==="stream"||L==="response");if(o&&(S||K&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=U[ce]});const ae=Se.toFiniteNumber(U.headers.get("content-length")),[ne,se]=S&&Vp(ae,tc(Kp(S),!0))||[];U=new r(Qp(U.body,Zp,ne,()=>{se&&se(),A&&A()}),J)}L=L||"text";let Z=await c[Se.findKey(c,L)||"text"](U,i);return!K&&A&&A(),await new Promise((J,ae)=>{qp(J,ae,{data:Z,headers:Gr.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:D})})}catch(I){throw A&&A(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new kt("Network Error",kt.ERR_NETWORK,i,D),{cause:I.cause||I}):kt.from(I,I&&I.code,i,D)}}},bk=new Map,ng=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:l}=e,d=[r,l,t];let u=d.length,b=u,p,g,o=bk;for(;b--;)p=d[b],g=o.get(p),g===void 0&&o.set(p,g=b?new Map:yk(e)),o=g;return g};ng();const ah={http:D1,xhr:dk,fetch:{get:ng}};Se.forEach(ah,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const rg=n=>`- ${n}`,wk=n=>Se.isFunction(n)||n===null||n===!1;function xk(n,e){n=Se.isArray(n)?n:[n];const{length:t}=n;let r,l;const d={};for(let u=0;u<t;u++){r=n[u];let b;if(l=r,!wk(r)&&(l=ah[(b=String(r)).toLowerCase()],l===void 0))throw new kt(`Unknown adapter '${b}'`);if(l&&(Se.isFunction(l)||(l=l.get(e))))break;d[b||"#"+u]=l}if(!l){const u=Object.entries(d).map(([p,g])=>`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let b=t?u.length>1?`since :
5
5
  `+u.map(rg).join(`
@@ -181,7 +181,7 @@ System.register(["./main-2d24b5c8b84fa9a15ff1.js","vue","single-spa"],function(B
181
181
  `+R,N+=1,L+=1);R.length>i&&(L<i&&N<i?R=R.slice(0,i):(R=`
182
182
  `,L==N?L=N=0:(L=0,N=1)));var U=R+`
183
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!=N||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,N),this.lastSelectionStart=L,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},S.prototype.setHost=function(k){this.host=k},S.prototype.setNumberOfExtraLines=function(k){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,k<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=k},S.prototype.setAriaLabel=function(){var k="";if(this.host.$textInputAriaLabel&&(k+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var L=this.host.session.selection.cursor.row;k+=u("text-input.aria-label","Cursor at row $0",[L+1])}this.text.setAttribute("aria-label",k)},S.prototype.setAriaOptions=function(k){k.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",k.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",k.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),k.role&&this.text.setAttribute("role",k.role),k.setLabel&&(this.text.setAttribute("aria-roledescription",u("text-input.aria-roledescription","editor")),this.setAriaLabel())},S.prototype.focus=function(){var k=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||h||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var L=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var R=[];if(N)for(var O=this.text.parentElement;O&&O.nodeType==1;)R.push(O),O.setAttribute("ace_nocontext","true"),!O.parentElement&&O.getRootNode?O=O.getRootNode().host:O=O.parentElement;this.text.focus({preventScroll:!0}),N&&R.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){k.text.style.position="",k.text.style.top=="0px"&&(k.text.style.top=L)},0)},S.prototype.blur=function(){this.text.blur()},S.prototype.isFocused=function(){return this.$isFocused},S.prototype.setInputHandler=function(k){this.inputHandler=k},S.prototype.getInputHandler=function(){return this.inputHandler},S.prototype.getElement=function(){return this.text},S.prototype.setCommandMode=function(k){this.commandMode=k,this.text.readOnly=!1},S.prototype.setReadOnly=function(k){this.commandMode||(this.text.readOnly=k)},S.prototype.setCopyWithEmptySelection=function(k){},S.prototype.onContextMenu=function(k){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:k}),this.moveToMouse(k,!0)},S.prototype.moveToMouse=function(k,L){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var R=this.host.container.getBoundingClientRect(),O=p.computedStyle(this.host.container),W=R.top+(parseInt(O.borderTopWidth)||0),P=R.left+(parseInt(O.borderLeftWidth)||0),D=R.bottom-W-this.text.clientHeight-2,A=function(_){p.translate(N.text,_.clientX-P-2,Math.min(_.clientY-W-2,D))};A(k),k.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&d.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},S.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},S}();r.TextInput=$,r.$setUserAgentForTests=function(S,k){T=S,w=k}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,l){var d=t("../lib/useragent"),u=0,b=550,p=function(){function c(f){f.$clickSelection=null;var h=f.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(f)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(f)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(f)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(f)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(f));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(a){f[a]=this[a]},this),f.selectByLines=this.extendSelectionBy.bind(f,"getLineRange"),f.selectByWords=this.extendSelectionBy.bind(f,"getWordRange")}return c.prototype.onMouseDown=function(f){var h=f.inSelection(),i=f.getDocumentPosition();this.mousedownEvent=f;var a=this.editor,m=f.getButton();if(m!==0){var w=a.getSelectionRange(),x=w.isEmpty();(x||m==1)&&a.selection.moveToPosition(i),m==2&&(a.textInput.onContextMenu(f.domEvent),d.isMozilla||f.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!a.isFocused()&&(a.focus(),this.$focusTimeout&&!this.$clickSelection&&!a.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(f);return}return this.captureMouse(f),this.startSelect(i,f.domEvent._clicks>1),f.preventDefault()},c.prototype.startSelect=function(f,h){f=f||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(f):h||i.selection.moveToPosition(f),h||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},c.prototype.select=function(){var f,h=this.editor,i=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i);if(a==-1)f=this.$clickSelection.end;else if(a==1)f=this.$clickSelection.start;else{var m=o(this.$clickSelection,i,h.session);i=m.cursor,f=m.anchor}h.selection.setSelectionAnchor(f.row,f.column)}h.selection.selectToPosition(i),h.renderer.scrollCursorIntoView()},c.prototype.extendSelectionBy=function(f){var h,i=this.editor,a=i.renderer.screenToTextCoordinates(this.x,this.y),m=i.selection[f](a.row,a.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)h=this.$clickSelection.end,(m.end.row!=a.row||m.end.column!=a.column)&&(a=m.start);else if(x==1&&w>=0)h=this.$clickSelection.start,(m.start.row!=a.row||m.start.column!=a.column)&&(a=m.end);else if(w==-1&&x==1)a=m.end,h=m.start;else{var T=o(this.$clickSelection,a,i.session);a=T.cursor,h=T.anchor}i.selection.setSelectionAnchor(h.row,h.column)}i.selection.selectToPosition(a),i.renderer.scrollCursorIntoView()},c.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},c.prototype.focusWait=function(){var f=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(f>u||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},c.prototype.onDoubleClick=function(f){var h=f.getDocumentPosition(),i=this.editor,a=i.session,m=a.getBracketRange(h);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=i.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},c.prototype.onTripleClick=function(f){var h=f.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var a=i.getSelectionRange();a.isMultiLine()&&a.contains(h.row,h.column)?(this.$clickSelection=i.selection.getLineRange(a.start.row),this.$clickSelection.end=i.selection.getLineRange(a.end.row).end):this.$clickSelection=i.selection.getLineRange(h.row),this.select()},c.prototype.onQuadClick=function(f){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},c.prototype.onMouseWheel=function(f){if(!f.getAccelKey()){f.getShiftKey()&&f.wheelY&&!f.wheelX&&(f.wheelX=f.wheelY,f.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,a=f.domEvent.timeStamp,m=a-i.t,w=m?f.wheelX/m:i.vx,x=m?f.wheelY/m:i.vy;m<b&&(w=(w+i.vx)/2,x=(x+i.vy)/2);var T=Math.abs(w/x),$=!1;if(T>=1&&h.renderer.isScrollableBy(f.wheelX*f.speed,0)&&($=!0),T<=1&&h.renderer.isScrollableBy(0,f.wheelY*f.speed)&&($=!0),$)i.allowed=a;else if(a-i.allowed<b){var S=Math.abs(w)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);S?($=!0,i.allowed=a):i.allowed=0}if(i.t=a,i.vx=w,i.vy=x,$)return h.renderer.scrollBy(f.wheelX*f.speed,f.wheelY*f.speed),f.stop()}},c}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,r.DefaultHandlers=p;function g(c,f,h,i){return Math.sqrt(Math.pow(h-c,2)+Math.pow(i-f,2))}function o(c,f,h){if(c.start.row==c.end.row)var i=2*f.column-c.start.column-c.end.column;else if(c.start.row==c.end.row-1&&!c.start.column&&!c.end.column)var i=3*f.column-2*h.getLine(c.start.row).length;else var i=2*f.row-c.start.row-c.end.row;return i<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,l){var d=t("../lib/event"),u=t("../lib/useragent"),b=function(){function p(g,o){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=o,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(g,0),c=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-c},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,o=g.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=o.contains(c.row,c.column)}return this.$inSelection},p.prototype.getButton=function(){return d.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return u.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();r.MouseEvent=b}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,l){r.preventParentScroll=function(d){d.stopPropagation();var u=d.currentTarget,b=u.scrollHeight>u.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,l){var d=this&&this.__extends||function(){var a=function(m,w){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,T){x.__proto__=T}||function(x,T){for(var $ in T)Object.prototype.hasOwnProperty.call(T,$)&&(x[$]=T[$])},a(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");a(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),u=this&&this.__values||function(a){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&a[m],x=0;if(w)return w.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&x>=a.length&&(a=void 0),{value:a&&a[x++],done:!a}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("./lib/dom");t("./lib/event");var p=t("./range").Range,g=t("./lib/scroll").preventParentScroll,o="ace_tooltip",c=function(){function a(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return a.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},a.prototype.getElement=function(){return this.$element||this.$init()},a.prototype.setText=function(m){this.getElement().textContent=m},a.prototype.setHtml=function(m){this.getElement().innerHTML=m},a.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},a.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},a.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&b.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&b.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&b.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&b.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},a.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},a.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},a.prototype.getHeight=function(){return this.getElement().offsetHeight},a.prototype.getWidth=function(){return this.getElement().offsetWidth},a.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},a}(),f=function(){function a(){this.popups=[]}return a.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},a.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},a.prototype.updatePopups=function(){var m,w,x,T;this.popups.sort(function(P,D){return D.priority-P.priority});var $=[];try{for(var S=u(this.popups),k=S.next();!k.done;k=S.next()){var L=k.value,N=!0;try{for(var R=(x=void 0,u($)),O=R.next();!O.done;O=R.next()){var W=O.value;if(this.doPopupsOverlap(W,L)){N=!1;break}}}catch(P){x={error:P}}finally{try{O&&!O.done&&(T=R.return)&&T.call(R)}finally{if(x)throw x.error}}N?$.push(L):L.hide()}}catch(P){m={error:P}}finally{try{k&&!k.done&&(w=S.return)&&w.call(S)}finally{if(m)throw m.error}}},a.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),T=w.getElement().getBoundingClientRect();return x.left<T.right&&x.right>T.left&&x.top<T.bottom&&x.bottom>T.top},a}(),h=new f;r.popupManager=h,r.Tooltip=c;var i=function(a){d(m,a);function m(w){w===void 0&&(w=document.body);var x=a.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var T=x.getElement();return T.style.whiteSpace="pre-wrap",T.style.pointerEvents="auto",T.addEventListener("mouseout",x.onMouseOut),T.tabIndex=-1,T.addEventListener("blur",(function(){T.contains(document.activeElement)||this.hide()}).bind(x)),T.addEventListener("wheel",g),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var T=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||T||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||T||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,T=w.getDocumentPosition(),$=x.session.getLine(T.row);if(T.column==$.length){var S=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),k=x.session.documentToScreenPosition(T.row,T.column);if(k.column!=S.column||k.row!=S.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,T,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var S=w.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(S.theme)),this.isOpen=!0,this.range=p.fromPoints(x.start,x.end);var k=S.textToScreenCoordinates(x.start.row,x.start.column),L=S.scroller.getBoundingClientRect();k.pageX<L.left&&(k.pageX=L.left);var N=this.getElement();N.innerHTML="",N.appendChild(T),N.style.maxHeight="",N.style.display="block",this.$setPosition(w,k,!0,x),b.$fixPositionBug(N)}},m.prototype.$setPosition=function(w,x,T,$){var S=10;T&&this.addMarker($,w.session);var k=w.renderer,L=this.getElement(),N=L.offsetHeight,R=L.offsetWidth,O=x.pageY,W=x.pageX,P=window.innerHeight-O-k.lineHeight,D=this.$shouldPlaceAbove(N,O,P-S);L.style.maxHeight=(D?O:P)-S+"px",L.style.top=D?"":O+k.lineHeight+"px",L.style.bottom=D?window.innerHeight-O+"px":"",L.style.left=Math.min(W,window.innerWidth-R-S)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,T){return!(x-w<0&&x<T)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(c);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,l){var d=this&&this.__extends||function(){var i=function(a,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(w[T]=x[T])},i(a,m)};return function(a,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(a,m);function w(){this.constructor=a}a.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),u=this&&this.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,m=a&&i[a],w=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&w>=i.length&&(i=void 0),{value:i&&i[w++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("../lib/dom"),p=t("./mouse_event").MouseEvent,g=t("../tooltip").HoverTooltip,o=t("../config").nls,c=t("../range").Range;function f(i){var a=i.editor,m=a.renderer.$gutterLayer;i.$tooltip=new h(a),i.$tooltip.addToEditor(a),i.$tooltip.setDataProvider(function(w,x){var T=w.getDocumentPosition().row;i.$tooltip.showTooltip(T)}),i.editor.setDefaultHandler("guttermousedown",function(w){if(!(!a.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var T=w.getDocumentPosition().row,$=a.session.selection;if(w.getShiftKey())$.selectTo(T,0);else{if(w.domEvent.detail==2)return a.selectAll(),w.preventDefault();i.$clickSelection=a.selection.getLineRange(T)}return i.setState("selectByLines"),i.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=f;var h=function(i){d(a,i);function a(m){var w=i.call(this,m.container)||this;w.id="gt"+ ++a.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return a.prototype.onDomMouseMove=function(m){var w=new p(m,this.editor);this.onMouseMove(w,this.editor)},a.prototype.onDomMouseOut=function(m){var w=new p(m,this.editor);this.onMouseOut(w)},a.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,m)},a.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,m)},a.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,T=x.$annotations[m],$;T?$={displayText:Array.from(T.displayText),type:Array.from(T.type)}:$={displayText:[],type:[]};var S=x.session.getFoldLine(m);if(S&&x.$showFoldedAnnotations){for(var k={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},N,R=m+1;R<=S.end.row;R++)if(x.$annotations[R])for(var O=0;O<x.$annotations[R].text.length;O++){var W=x.$annotations[R].type[O];k[W].push(x.$annotations[R].text[O]),(!N||L[W]<L[N])&&(N=W)}if(["error","security","warning"].includes(N)){var P="".concat(a.annotationsToSummaryString(k)," in folded code.");$.displayText.push(P),$.type.push(N+"_fold")}}if($.displayText.length===0)return this.hide();for(var D={error:[],security:[],warning:[],info:[],hint:[]},A=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=0;R<$.displayText.length;R++){var _=b.createElement("span"),I=b.createElement("span");(w=I.classList).add.apply(w,["ace_".concat($.type[R]),A]),I.setAttribute("aria-label","".concat(a.annotationLabels[$.type[R].replace("_fold","")].singular)),I.setAttribute("role","img"),I.appendChild(b.createTextNode(" ")),_.appendChild(I),_.appendChild(b.createTextNode($.displayText[R])),_.appendChild(b.createElement("br")),D[$.type[R].replace("_fold","")].push(_)}var j=b.createElement("span");D.error.forEach(function(Z){return j.appendChild(Z)}),D.security.forEach(function(Z){return j.appendChild(Z)}),D.warning.forEach(function(Z){return j.appendChild(Z)}),D.info.forEach(function(Z){return j.appendChild(Z)}),D.hint.forEach(function(Z){return j.appendChild(Z)}),j.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var K=c.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,K,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},a.prototype.$setPosition=function(m,w,x,T){var $=this.$findCellByRow(T.start.row);if($){var S=$&&$.element,k=S&&S.querySelector(".ace_gutter_annotation");if(k){var L=k.getBoundingClientRect();if(L){var N={pageX:L.right,pageY:L.top};return i.prototype.$setPosition.call(this,m,N,!1,T)}}}},a.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},a.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},a.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},a.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),i.prototype.hide.call(this,m)}},a.annotationsToSummaryString=function(m){var w,x,T=[],$=["error","security","warning","info","hint"];try{for(var S=u($),k=S.next();!k.done;k=S.next()){var L=k.value;if(m[L].length){var N=m[L].length===1?a.annotationLabels[L].singular:a.annotationLabels[L].plural;T.push("".concat(m[L].length," ").concat(N))}}}catch(R){w={error:R}}finally{try{k&&!k.done&&(x=S.return)&&x.call(S)}finally{if(w)throw w.error}}return T.join(", ")},a.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},a}(g);h.$uid=0,r.GutterTooltip=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,l){var d=t("../lib/dom"),u=t("../lib/event"),b=t("../lib/useragent"),p=200,g=200,o=5;function c(h){var i=h.editor,a=d.createElement("div");a.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",a.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){h[ne]=this[ne]},this),i.on("mousedown",this.onMouseDown.bind(h));var w=i.container,x,T,$,S,k,L,N=0,R,O,W,P,D;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var se=this;return setTimeout(function(){se.startSelect(),se.captureMouse(ne)},0),ne.preventDefault()}k=i.getSelectionRange();var ce=ne.dataTransfer;ce.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(a),ce.setDragImage&&ce.setDragImage(a,0,0),setTimeout(function(){i.container.removeChild(a)}),ce.clearData(),ce.setData("Text",i.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,O=!1,this.setState(null),!i.getReadOnly()){var se=ne.dataTransfer.dropEffect;!R&&se=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return T=ne.clientX,$=ne.clientY,x||j(),N++,ne.dataTransfer.dropEffect=R=ae(ne),u.preventDefault(ne)},this.onDragOver=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return T=ne.clientX,$=ne.clientY,x||(j(),N++),K!==null&&(K=null),ne.dataTransfer.dropEffect=R=ae(ne),u.preventDefault(ne)},this.onDragLeave=function(ne){if(N--,N<=0&&x)return U(),R=null,u.preventDefault(ne)},this.onDrop=function(ne){if(L){var se=ne.dataTransfer;if(O)switch(R){case"move":k.contains(L.row,L.column)?k={start:L,end:L}:k=i.moveText(k,L);break;case"copy":k=i.moveText(k,L,!0);break}else{var ce=se.getData("Text");k={start:L,end:i.session.insert(L,ce)},i.focus(),R=null}return U(),u.preventDefault(ne)}},u.addListener(w,"dragstart",this.onDragStart.bind(h),i),u.addListener(w,"dragend",this.onDragEnd.bind(h),i),u.addListener(w,"dragenter",this.onDragEnter.bind(h),i),u.addListener(w,"dragover",this.onDragOver.bind(h),i),u.addListener(w,"dragleave",this.onDragLeave.bind(h),i),u.addListener(w,"drop",this.onDrop.bind(h),i);function A(ne,se){var ce=Date.now(),he=!se||ne.row!=se.row,ge=!se||ne.column!=se.column;if(!P||he||ge)i.moveCursorToPosition(ne),P=ce,D={x:T,y:$};else{var Ee=f(D.x,D.y,T,$);Ee>o?P=null:ce-P>=g&&(i.renderer.scrollCursorIntoView(),P=null)}}function _(ne,se){var ce=Date.now(),he=i.renderer.layerConfig.lineHeight,ge=i.renderer.layerConfig.characterWidth,Ee=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:T-Ee.left,right:Ee.right-T},y:{top:$-Ee.top,bottom:Ee.bottom-$}},Re=Math.min(Te.x.left,Te.x.right),Xe=Math.min(Te.y.top,Te.y.bottom),Ke={row:ne.row,column:ne.column};Re/ge<=2&&(Ke.column+=Te.x.left<Te.x.right?-3:2),Xe/he<=1&&(Ke.row+=Te.y.top<Te.y.bottom?-1:1);var dt=ne.row!=Ke.row,rt=ne.column!=Ke.column,gt=!se||ne.row!=se.row;dt||rt&&!gt?W?ce-W>=p&&i.renderer.scrollCursorIntoView(Ke):W=ce:W=null}function I(){var ne=L;L=i.renderer.screenToTextCoordinates(T,$),A(L,ne),_(L,ne)}function j(){k=i.selection.toOrientedRange(),x=i.session.addMarker(k,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),I(),S=setInterval(I,20),N=0,u.addListener(document,"mousemove",Z)}function U(){clearInterval(S),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(k),i.isFocused()&&!O&&i.$resetCursorStyle(),k=null,L=null,N=0,W=null,P=null,u.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function J(ne){var se=ne.types;return!se||Array.prototype.some.call(se,function(ce){return ce=="text/plain"||ce=="Text"})}function ae(ne){var se=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],he=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ee="none";return he&&se.indexOf(ge)>=0?Ee="copy":ce.indexOf(ge)>=0?Ee="move":se.indexOf(ge)>=0&&(Ee="copy"),Ee}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,i=h.container;i.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var a=b.isWin?"default":"move";h.renderer.setCursorStyle(a),this.setState("dragReady")},this.onMouseDrag=function(h){var i=this.editor.container;if(b.isIE&&this.state=="dragReady"){var a=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>3&&i.dragDrop()}if(this.state==="dragWait"){var a=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var i=this.editor,a=h.inSelection(),m=h.getButton(),w=h.domEvent.detail||1;if(w===1&&m===0&&a){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var T=i.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(c.prototype);function f(h,i,a,m){return Math.sqrt(Math.pow(a-h,2)+Math.pow(m-i,2))}r.DragdropHandler=c}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,l){var d=t("./mouse_event").MouseEvent,u=t("../lib/event"),b=t("../lib/dom");r.addTouchListeners=function(p,g){var o="scroll",c,f,h,i,a,m,w=0,x,T=0,$=0,S=0,k,L;function N(){var A=window.navigator&&window.navigator.clipboard,_=!1,I=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(_?["span",!K&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},j=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!_)return _=!_,I();Z=="paste"?A.readText().then(function(J){g.execCommand(Z,J)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",_=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){o="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function R(){if(!g.getOption("enableMobileMenu")){L&&O();return}L||N();var A=g.selection.cursor,_=g.renderer.textToScreenCoordinates(A.row,A.column),I=g.renderer.textToScreenCoordinates(0,0).pageX,j=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=I+j-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",O)}function O(A){L&&(L.style.display="none"),g.off("input",O)}function W(){a=null,clearTimeout(a);var A=g.selection.getRange(),_=A.contains(x.row,x.column);(A.isEmpty()||!_)&&(g.selection.moveToPosition(x),g.selection.selectWord()),o="wait",R()}function P(){a=null,clearTimeout(a),g.selection.moveToPosition(x);var A=T>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),o="wait"}u.addListener(p,"contextmenu",function(A){if(k){var _=g.textInput.getElement();_.focus()}},g),u.addListener(p,"touchstart",function(A){var _=A.touches;if(a||_.length>1){clearTimeout(a),a=null,h=-1,o="zoom";return}k=g.$mouseHandler.isMousePressed=!0;var I=g.renderer.layerConfig.lineHeight,j=g.renderer.layerConfig.lineHeight,U=A.timeStamp;i=U;var K=_[0],Z=K.clientX,J=K.clientY;Math.abs(c-Z)+Math.abs(f-J)>I&&(h=-1),c=A.clientX=Z,f=A.clientY=J,$=S=0;var ae=new d(A,g);if(x=ae.getDocumentPosition(),U-h<500&&_.length==1&&!w)T++,A.preventDefault(),A.button=0,P();else{T=0;var ne=g.selection.cursor,se=g.selection.isEmpty()?ne:g.selection.anchor,ce=g.renderer.$cursorLayer.getPixelPosition(ne,!0),he=g.renderer.$cursorLayer.getPixelPosition(se,!0),ge=g.renderer.scroller.getBoundingClientRect(),Ee=g.renderer.layerConfig.offset,Te=g.renderer.scrollLeft,Re=function(dt,rt){return dt=dt/j,rt=rt/I-.75,dt*dt+rt*rt};if(A.clientX<ge.left){o="zoom";return}var Xe=Re(A.clientX-ge.left-ce.left+Te,A.clientY-ge.top-ce.top+Ee),Ke=Re(A.clientX-ge.left-he.left+Te,A.clientY-ge.top-he.top+Ee);Xe<3.5&&Ke<3.5&&(o=Xe>Ke?"cursor":"anchor"),Ke<3.5?o="anchor":Xe<3.5?o="cursor":o="scroll",a=setTimeout(W,450)}h=U},g),u.addListener(p,"touchend",function(A){k=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),o=="zoom"?(o="",w=0):a?(g.selection.moveToPosition(x),w=0,R()):o=="scroll"?(D(),O()):R(),clearTimeout(a),a=null},g),u.addListener(p,"touchmove",function(A){a&&(clearTimeout(a),a=null);var _=A.touches;if(!(_.length>1||o=="zoom")){var I=_[0],j=c-I.clientX,U=f-I.clientY;if(o=="wait")if(j*j+U*U>4)o="cursor";else return A.preventDefault();c=I.clientX,f=I.clientY,A.clientX=I.clientX,A.clientY=I.clientY;var K=A.timeStamp,Z=K-i;if(i=K,o=="scroll"){var J=new d(A,g);J.speed=1,J.wheelX=j,J.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Z!=0&&($=j/Z,S=U/Z),g._emit("mousewheel",J),J.propagationStopped||($=S=0)}else{var ae=new d(A,g),ne=ae.getDocumentPosition();o=="cursor"?g.selection.moveCursorToPosition(ne):o=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function D(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(S)<.01&&(S=0),w<20&&($=.9*$),w<20&&(S=.9*S);var A=g.session.getScrollTop();g.renderer.scrollBy(10*$,10*S),A==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,r,l){var d=t("../lib/event"),u=t("../lib/useragent"),b=t("./default_handlers").DefaultHandlers,p=t("./default_gutter_handler").GutterHandler,g=t("./mouse_event").MouseEvent,o=t("./dragdrop_handler").DragdropHandler,c=t("./touch_handler").addTouchListeners,f=t("../config"),h=function(){function i(a){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=a,new b(this),new p(this),new o(this);var w=function($){var S=!document.hasFocus||!document.hasFocus()||!a.isFocused()&&document.activeElement==(a.textInput&&a.textInput.getElement());S&&window.focus(),a.focus(),setTimeout(function(){a.isFocused()||a.focus()})},x=a.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),a),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),a),d.addMultiMouseDownListener([x,a.renderer.scrollBarV&&a.renderer.scrollBarV.inner,a.renderer.scrollBarH&&a.renderer.scrollBarH.inner,a.textInput&&a.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",a),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"),a),c(a.container,a);var T=a.renderer.$gutter;d.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),a),d.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),a),d.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),a),d.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),a),d.addListener(x,"mousedown",w,a),d.addListener(T,"mousedown",w,a),u.isIE&&a.renderer.scrollBarV&&(d.addListener(a.renderer.scrollBarV.element,"mousedown",w,a),d.addListener(a.renderer.scrollBarH.element,"mousedown",w,a)),a.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var S=a.renderer.screenToTextCoordinates($.x,$.y),k=a.session.selection.getRange(),L=a.renderer;!k.isEmpty()&&k.insideStart(S.row,S.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},a)}return i.prototype.onMouseEvent=function(a,m){this.editor.session&&this.editor._emit(a,new g(m,this.editor))},i.prototype.onMouseMove=function(a,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(a,new g(m,this.editor))},i.prototype.onMouseWheel=function(a,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(a,w)},i.prototype.setState=function(a){this.state=a},i.prototype.captureMouse=function(a,m){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var T=this,$=!0,S=function(O){if(O){if(u.isWebKit&&!O.which&&T.releaseMouse)return T.releaseMouse();T.x=O.clientX,T.y=O.clientY,m&&m(O),T.mouseEvent=new g(O,T.editor),T.$mouseMoved=!0}},k=function(O){w.off("beforeEndOperation",R),$=!1,w.session&&L(),T[T.state+"End"]&&T[T.state+"End"](O),T.state="",T.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,O&&T.onMouseEvent("mouseup",O),w.endOperation()},L=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1},N=function(){$&&(L(),d.nextFrame(N))};if(u.isOldIE&&a.domEvent.type=="dblclick")return setTimeout(function(){k(a)});var R=function(O){T.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=S,T.releaseMouse=d.capture(this.editor.container,S,k),N()},i.prototype.cancelContextMenu=function(){var a=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",a),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i}();h.prototype.releaseMouse=null,f.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,l){var d=t("../lib/dom"),u=function(){function b(p){p.on("click",function(g){var o=g.getDocumentPosition(),c=p.session,f=c.getFoldAt(o.row,o.column,1);f&&(g.getAccelKey()?c.removeFold(f):c.expandFold(f),g.stop());var h=g.domEvent&&g.domEvent.target;h&&d.hasCssClass(h,"ace_inline_button")&&d.hasCssClass(h,"ace_toggle_wrap")&&(c.setOption("wrap",!c.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(g){var o=p.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var c=g.getDocumentPosition().row,f=p.session;f.foldWidgets&&f.foldWidgets[c]&&p.session.onFoldWidgetClick(c,g),p.isFocused()||p.focus(),g.stop()}}),p.on("gutterdblclick",function(g){var o=p.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var c=g.getDocumentPosition().row,f=p.session,h=f.getParentFoldRangeData(c,!0),i=h.range||h.firstRange;if(i){c=i.start.row;var a=f.getFoldAt(c,f.getLine(c).length,1);a?f.removeFold(a):(f.addFold("...",i),p.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=u}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,l){var d=t("../lib/keys"),u=t("../lib/event"),b=function(){function p(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return p.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},p.prototype.setKeyboardHandler=function(g){var o=this.$handlers;if(o[o.length-1]!=g){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(g,1)}},p.prototype.addKeyboardHandler=function(g,o){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var c=this.$handlers.indexOf(g);c!=-1&&this.$handlers.splice(c,1),o==null?this.$handlers.push(g):this.$handlers.splice(o,0,g),c==-1&&g.attach&&g.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(g){var o=this.$handlers.indexOf(g);return o==-1?!1:(this.$handlers.splice(o,1),g.detach&&g.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var g=this.$data,o=g.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(o,g)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(g,o,c,f){for(var h,i=!1,a=this.$editor.commands,m=this.$handlers.length;m--&&(h=this.$handlers[m].handleKeyboard(this.$data,g,o,c,f),!(!(!h||!h.command)&&(h.command=="null"?i=!0:i=a.exec(h.command,this.$editor,h.args,f),i&&f&&g!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&u.stopEvent(f),i))););return!i&&g==-1&&(h={command:"insertstring"},i=a.exec("insertstring",this.$editor,o)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),i},p.prototype.onCommandKey=function(g,o,c){var f=d.keyCodeToString(c);return this.$callKeyboardHandlers(o,f,c,g)},p.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},p}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,l){var d=0,u=0,b=!1,p=!1,g=!1,o=[[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]],c=[[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]],f=0,h=1,i=0,a=1,m=2,w=3,x=4,T=5,$=6,S=7,k=8,L=9,N=10,R=11,O=12,W=13,P=14,D=15,A=16,_=17,I=18,j=[I,I,I,I,I,I,I,I,I,$,T,$,k,T,I,I,I,I,I,I,I,I,I,I,I,I,I,I,T,T,T,$,k,x,x,R,R,R,x,x,x,x,x,N,L,N,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,I,I,I,I,I,I,T,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,L,x,R,R,R,R,x,x,x,x,i,x,x,I,x,x,R,R,m,m,x,i,x,x,x,m,i,x,x,x,x,x],U=[k,k,k,k,k,k,k,k,k,k,k,I,I,I,i,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,k,T,W,P,D,A,_,L,R,R,R,R,R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,k];function K(ne,se,ce,he){var ge=d?c:o,Ee=null,Te=null,Re=null,Xe=0,Ke=null,dt=null,rt=-1,gt=null,tn=null,Wn=[];if(!he)for(gt=0,he=[];gt<ce;gt++)he[gt]=ae(ne[gt]);for(u=d,b=!1,p=!1,g=!1,tn=0;tn<ce;tn++){if(Ee=Xe,Wn[tn]=Te=J(ne,he,Wn,tn),Xe=ge[Ee][Te],Ke=Xe&240,Xe&=15,se[tn]=Re=ge[Xe][5],Ke>0)if(Ke==16){for(gt=rt;gt<tn;gt++)se[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++)se[gt]=Re;rt=-1}he[tn]==T&&(se[tn]=0),u|=Re}if(g){for(gt=0;gt<ce;gt++)if(he[gt]==$){se[gt]=d;for(var Zt=gt-1;Zt>=0&&he[Zt]==k;Zt--)se[Zt]=d}}}function Z(ne,se,ce){if(!(u<ne)){if(ne==1&&d==h&&!p){ce.reverse();return}for(var he=ce.length,ge=0,Ee,Te,Re,Xe;ge<he;){if(se[ge]>=ne){for(Ee=ge+1;Ee<he&&se[Ee]>=ne;)Ee++;for(Te=ge,Re=Ee-1;Te<Re;Te++,Re--)Xe=ce[Te],ce[Te]=ce[Re],ce[Re]=Xe;ge=Ee}ge++}}}function J(ne,se,ce,he){var ge=se[he],Ee,Te,Re,Xe;switch(ge){case i:case a:b=!1;case x:case w:return ge;case m:return b?w:m;case S:return b=!0,a;case k:return x;case L:return he<1||he+1>=se.length||(Ee=ce[he-1])!=m&&Ee!=w||(Te=se[he+1])!=m&&Te!=w?x:(b&&(Te=w),Te==Ee?Te:x);case N:return Ee=he>0?ce[he-1]:T,Ee==m&&he+1<se.length&&se[he+1]==m?m:x;case R:if(he>0&&ce[he-1]==m)return m;if(b)return x;for(Xe=he+1,Re=se.length;Xe<Re&&se[Xe]==R;)Xe++;return Xe<Re&&se[Xe]==m?m:x;case O:for(Re=se.length,Xe=he+1;Xe<Re&&se[Xe]==O;)Xe++;if(Xe<Re){var Ke=ne[he],dt=Ke>=1425&&Ke<=2303||Ke==64286;if(Ee=se[Xe],dt&&(Ee==a||Ee==S))return a}return he<1||(Ee=se[he-1])==T?x:ce[he-1];case T:return b=!1,p=!0,d;case $:return g=!0,x;case W:case P:case A:case _:case D:b=!1;case I:return x}}function ae(ne){var se=ne.charCodeAt(0),ce=se>>8;return ce==0?se>191?i:j[se]:ce==5?/[\u0591-\u05f4]/.test(ne)?a:i:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?O:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:se==1642?R:/[\u06f0-\u06f9]/.test(ne)?m:S:ce==32&&se<=8287?U[se&255]:ce==254&&se>=65136?S:x}r.L=i,r.R=a,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,se,ce){if(ne.length<2)return{};var he=ne.split(""),ge=new Array(he.length),Ee=new Array(he.length),Te=[];d=ce?h:f,K(he,Te,he.length,se);for(var Re=0;Re<ge.length;ge[Re]=Re,Re++);Z(2,Te,ge),Z(1,Te,ge);for(var Re=0;Re<ge.length-1;Re++)se[Re]===w?Te[Re]=r.AN:Te[Re]===a&&(se[Re]>S&&se[Re]<W||se[Re]===x||se[Re]===I)?Te[Re]=r.ON_R:Re>0&&he[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(he[Re])&&(Te[Re-1]=Te[Re]=r.R_H,Re++);he[he.length-1]===r.DOT&&(Te[he.length-1]=r.B),he[0]==="‫"&&(Te[0]=r.RLE);for(var Re=0;Re<ge.length;Re++)Ee[Re]=Te[ge[Re]];return{logicalFromVisual:ge,bidiLevels:Ee}},r.hasBidiCharacters=function(ne,se){for(var ce=!1,he=0;he<ne.length;he++)se[he]=ae(ne.charAt(he)),!ce&&(se[he]==a||se[he]==S||se[he]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ne,se){for(var ce=0;ce<se.logicalFromVisual.length;ce++)if(se.logicalFromVisual[ce]==ne)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,l){var d=t("./lib/bidiutil"),u=t("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function g(o){this.session=o,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=b.test(o.getValue())}return g.prototype.isBidiRow=function(o,c,f){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(c,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&b.test(o.lines.join(`
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!=N||this.lastSelectionStart!=L||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(L,N),this.lastSelectionStart=L,this.lastSelectionEnd=N}catch{}this.inComposition=!1}},S.prototype.setHost=function(k){this.host=k},S.prototype.setNumberOfExtraLines=function(k){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,k<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=k},S.prototype.setAriaLabel=function(){var k="";if(this.host.$textInputAriaLabel&&(k+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var L=this.host.session.selection.cursor.row;k+=u("text-input.aria-label","Cursor at row $0",[L+1])}this.text.setAttribute("aria-label",k)},S.prototype.setAriaOptions=function(k){k.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",k.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",k.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),k.role&&this.text.setAttribute("role",k.role),k.setLabel&&(this.text.setAttribute("aria-roledescription",u("text-input.aria-roledescription","editor")),this.setAriaLabel())},S.prototype.focus=function(){var k=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||h||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var L=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var N=this.text.getBoundingClientRect().top!=0}catch{return}var R=[];if(N)for(var O=this.text.parentElement;O&&O.nodeType==1;)R.push(O),O.setAttribute("ace_nocontext","true"),!O.parentElement&&O.getRootNode?O=O.getRootNode().host:O=O.parentElement;this.text.focus({preventScroll:!0}),N&&R.forEach(function(W){W.removeAttribute("ace_nocontext")}),setTimeout(function(){k.text.style.position="",k.text.style.top=="0px"&&(k.text.style.top=L)},0)},S.prototype.blur=function(){this.text.blur()},S.prototype.isFocused=function(){return this.$isFocused},S.prototype.setInputHandler=function(k){this.inputHandler=k},S.prototype.getInputHandler=function(){return this.inputHandler},S.prototype.getElement=function(){return this.text},S.prototype.setCommandMode=function(k){this.commandMode=k,this.text.readOnly=!1},S.prototype.setReadOnly=function(k){this.commandMode||(this.text.readOnly=k)},S.prototype.setCopyWithEmptySelection=function(k){},S.prototype.onContextMenu=function(k){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:k}),this.moveToMouse(k,!0)},S.prototype.moveToMouse=function(k,L){var N=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(L?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var R=this.host.container.getBoundingClientRect(),O=p.computedStyle(this.host.container),W=R.top+(parseInt(O.borderTopWidth)||0),P=R.left+(parseInt(O.borderLeftWidth)||0),D=R.bottom-W-this.text.clientHeight-2,A=function(_){p.translate(N.text,_.clientX-P-2,Math.min(_.clientY-W-2,D))};A(k),k.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),b.isWin&&d.capture(this.host.container,A,this.onContextMenuClose.bind(this)))},S.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},S}();r.TextInput=$,r.$setUserAgentForTests=function(S,k){T=S,w=k}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,r,l){var d=t("../lib/useragent"),u=0,b=550,p=function(){function c(f){f.$clickSelection=null;var h=f.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(f)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(f)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(f)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(f)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(f));var i=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];i.forEach(function(a){f[a]=this[a]},this),f.selectByLines=this.extendSelectionBy.bind(f,"getLineRange"),f.selectByWords=this.extendSelectionBy.bind(f,"getWordRange")}return c.prototype.onMouseDown=function(f){var h=f.inSelection(),i=f.getDocumentPosition();this.mousedownEvent=f;var a=this.editor,m=f.getButton();if(m!==0){var w=a.getSelectionRange(),x=w.isEmpty();(x||m==1)&&a.selection.moveToPosition(i),m==2&&(a.textInput.onContextMenu(f.domEvent),d.isMozilla||f.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!a.isFocused()&&(a.focus(),this.$focusTimeout&&!this.$clickSelection&&!a.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(f);return}return this.captureMouse(f),this.startSelect(i,f.domEvent._clicks>1),f.preventDefault()},c.prototype.startSelect=function(f,h){f=f||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(f):h||i.selection.moveToPosition(f),h||this.select(),i.setStyle("ace_selecting"),this.setState("select"))},c.prototype.select=function(){var f,h=this.editor,i=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i);if(a==-1)f=this.$clickSelection.end;else if(a==1)f=this.$clickSelection.start;else{var m=o(this.$clickSelection,i,h.session);i=m.cursor,f=m.anchor}h.selection.setSelectionAnchor(f.row,f.column)}h.selection.selectToPosition(i),h.renderer.scrollCursorIntoView()},c.prototype.extendSelectionBy=function(f){var h,i=this.editor,a=i.renderer.screenToTextCoordinates(this.x,this.y),m=i.selection[f](a.row,a.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(m.start),x=this.$clickSelection.comparePoint(m.end);if(w==-1&&x<=0)h=this.$clickSelection.end,(m.end.row!=a.row||m.end.column!=a.column)&&(a=m.start);else if(x==1&&w>=0)h=this.$clickSelection.start,(m.start.row!=a.row||m.start.column!=a.column)&&(a=m.end);else if(w==-1&&x==1)a=m.end,h=m.start;else{var T=o(this.$clickSelection,a,i.session);a=T.cursor,h=T.anchor}i.selection.setSelectionAnchor(h.row,h.column)}i.selection.selectToPosition(a),i.renderer.scrollCursorIntoView()},c.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},c.prototype.focusWait=function(){var f=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(f>u||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},c.prototype.onDoubleClick=function(f){var h=f.getDocumentPosition(),i=this.editor,a=i.session,m=a.getBracketRange(h);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=i.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},c.prototype.onTripleClick=function(f){var h=f.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var a=i.getSelectionRange();a.isMultiLine()&&a.contains(h.row,h.column)?(this.$clickSelection=i.selection.getLineRange(a.start.row),this.$clickSelection.end=i.selection.getLineRange(a.end.row).end):this.$clickSelection=i.selection.getLineRange(h.row),this.select()},c.prototype.onQuadClick=function(f){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},c.prototype.onMouseWheel=function(f){if(!f.getAccelKey()){f.getShiftKey()&&f.wheelY&&!f.wheelX&&(f.wheelX=f.wheelY,f.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,a=f.domEvent.timeStamp,m=a-i.t,w=m?f.wheelX/m:i.vx,x=m?f.wheelY/m:i.vy;m<b&&(w=(w+i.vx)/2,x=(x+i.vy)/2);var T=Math.abs(w/x),$=!1;if(T>=1&&h.renderer.isScrollableBy(f.wheelX*f.speed,0)&&($=!0),T<=1&&h.renderer.isScrollableBy(0,f.wheelY*f.speed)&&($=!0),$)i.allowed=a;else if(a-i.allowed<b){var S=Math.abs(w)<=1.5*Math.abs(i.vx)&&Math.abs(x)<=1.5*Math.abs(i.vy);S?($=!0,i.allowed=a):i.allowed=0}if(i.t=a,i.vx=w,i.vy=x,$)return h.renderer.scrollBy(f.wheelX*f.speed,f.wheelY*f.speed),f.stop()}},c}();p.prototype.selectEnd=p.prototype.selectByLinesEnd,p.prototype.selectAllEnd=p.prototype.selectByLinesEnd,p.prototype.selectByWordsEnd=p.prototype.selectByLinesEnd,r.DefaultHandlers=p;function g(c,f,h,i){return Math.sqrt(Math.pow(h-c,2)+Math.pow(i-f,2))}function o(c,f,h){if(c.start.row==c.end.row)var i=2*f.column-c.start.column-c.end.column;else if(c.start.row==c.end.row-1&&!c.start.column&&!c.end.column)var i=3*f.column-2*h.getLine(c.start.row).length;else var i=2*f.row-c.start.row-c.end.row;return i<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,r,l){var d=t("../lib/event"),u=t("../lib/useragent"),b=function(){function p(g,o){this.speed,this.wheelX,this.wheelY,this.domEvent=g,this.editor=o,this.x=this.clientX=g.clientX,this.y=this.clientY=g.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return p.prototype.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},p.prototype.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},p.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},p.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},p.prototype.getGutterRow=function(){var g=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(g,0),c=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-c},p.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var g=this.editor,o=g.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=o.contains(c.row,c.column)}return this.$inSelection},p.prototype.getButton=function(){return d.getButton(this.domEvent)},p.prototype.getShiftKey=function(){return this.domEvent.shiftKey},p.prototype.getAccelKey=function(){return u.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},p}();r.MouseEvent=b}),ace.define("ace/lib/scroll",["require","exports","module"],function(t,r,l){r.preventParentScroll=function(d){d.stopPropagation();var u=d.currentTarget,b=u.scrollHeight>u.clientHeight;b||d.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(t,r,l){var d=this&&this.__extends||function(){var a=function(m,w){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,T){x.__proto__=T}||function(x,T){for(var $ in T)Object.prototype.hasOwnProperty.call(T,$)&&(x[$]=T[$])},a(m,w)};return function(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");a(m,w);function x(){this.constructor=m}m.prototype=w===null?Object.create(w):(x.prototype=w.prototype,new x)}}(),u=this&&this.__values||function(a){var m=typeof Symbol=="function"&&Symbol.iterator,w=m&&a[m],x=0;if(w)return w.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&x>=a.length&&(a=void 0),{value:a&&a[x++],done:!a}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("./lib/dom");t("./lib/event");var p=t("./range").Range,g=t("./lib/scroll").preventParentScroll,o="ace_tooltip",c=function(){function a(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return a.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},a.prototype.getElement=function(){return this.$element||this.$init()},a.prototype.setText=function(m){this.getElement().textContent=m},a.prototype.setHtml=function(m){this.getElement().innerHTML=m},a.prototype.setPosition=function(m,w){this.getElement().style.left=m+"px",this.getElement().style.top=w+"px"},a.prototype.setClassName=function(m){b.addCssClass(this.getElement(),m)},a.prototype.setTheme=function(m){this.theme&&(this.theme.isDark&&b.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&b.removeCssClass(this.getElement(),this.theme.cssClass)),m.isDark&&b.addCssClass(this.getElement(),"ace_dark"),m.cssClass&&b.addCssClass(this.getElement(),m.cssClass),this.theme={isDark:m.isDark,cssClass:m.cssClass}},a.prototype.show=function(m,w,x){m!=null&&this.setText(m),w!=null&&x!=null&&this.setPosition(w,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},a.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},a.prototype.getHeight=function(){return this.getElement().offsetHeight},a.prototype.getWidth=function(){return this.getElement().offsetWidth},a.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},a}(),f=function(){function a(){this.popups=[]}return a.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},a.prototype.removePopup=function(m){var w=this.popups.indexOf(m);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},a.prototype.updatePopups=function(){var m,w,x,T;this.popups.sort(function(P,D){return D.priority-P.priority});var $=[];try{for(var S=u(this.popups),k=S.next();!k.done;k=S.next()){var L=k.value,N=!0;try{for(var R=(x=void 0,u($)),O=R.next();!O.done;O=R.next()){var W=O.value;if(this.doPopupsOverlap(W,L)){N=!1;break}}}catch(P){x={error:P}}finally{try{O&&!O.done&&(T=R.return)&&T.call(R)}finally{if(x)throw x.error}}N?$.push(L):L.hide()}}catch(P){m={error:P}}finally{try{k&&!k.done&&(w=S.return)&&w.call(S)}finally{if(m)throw m.error}}},a.prototype.doPopupsOverlap=function(m,w){var x=m.getElement().getBoundingClientRect(),T=w.getElement().getBoundingClientRect();return x.left<T.right&&x.right>T.left&&x.top<T.bottom&&x.bottom>T.top},a}(),h=new f;r.popupManager=h,r.Tooltip=c;var i=function(a){d(m,a);function m(w){w===void 0&&(w=document.body);var x=a.call(this,w)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var T=x.getElement();return T.style.whiteSpace="pre-wrap",T.style.pointerEvents="auto",T.addEventListener("mouseout",x.onMouseOut),T.tabIndex=-1,T.addEventListener("blur",(function(){T.contains(document.activeElement)||this.hide()}).bind(x)),T.addEventListener("wheel",g),x}return m.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide);var x=w.renderer.getMouseEventTarget();x&&typeof x.removeEventListener=="function"&&x.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(w,x){this.lastEvent=w,this.lastT=Date.now();var T=x.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||T||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||T||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var w=Date.now()-this.lastT;if(this.idleTime-w>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-w);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(w){var x=w.editor,T=w.getDocumentPosition(),$=x.session.getLine(T.row);if(T.column==$.length){var S=x.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),k=x.session.documentToScreenPosition(T.row,T.column);if(k.column!=S.column||k.row!=S.row)return!0}return!1},m.prototype.setDataProvider=function(w){this.$gatherData=w},m.prototype.showForRange=function(w,x,T,$){if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var S=w.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(S.theme)),this.isOpen=!0,this.range=p.fromPoints(x.start,x.end);var k=S.textToScreenCoordinates(x.start.row,x.start.column),L=S.scroller.getBoundingClientRect();k.pageX<L.left&&(k.pageX=L.left);var N=this.getElement();N.innerHTML="",N.appendChild(T),N.style.maxHeight="",N.style.display="block",this.$setPosition(w,k,!0,x),b.$fixPositionBug(N)}},m.prototype.$setPosition=function(w,x,T,$){var S=10;T&&this.addMarker($,w.session);var k=w.renderer,L=this.getElement(),N=L.offsetHeight,R=L.offsetWidth,O=x.pageY,W=x.pageX,P=window.innerHeight-O-k.lineHeight,D=this.$shouldPlaceAbove(N,O,P-S);L.style.maxHeight=(D?O:P)-S+"px",L.style.top=D?"":O+k.lineHeight+"px",L.style.bottom=D?window.innerHeight-O+"px":"",L.style.left=Math.min(W,window.innerWidth-R-S)+"px"},m.prototype.$shouldPlaceAbove=function(w,x,T){return!(x-w<0&&x<T)},m.prototype.addMarker=function(w,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(w,"ace_highlight-marker","text")},m.prototype.hide=function(w){w&&this.$fromKeyboard&&w.type=="keydown"&&w.code=="Escape"||!w&&document.activeElement==this.getElement()||w&&w.target&&(w.type!="keydown"||w.ctrlKey||w.metaKey)&&this.$element.contains(w.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,h.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(w){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||w.relatedTarget.classList.contains("ace_content")||this.hide())},m}(c);r.HoverTooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(t,r,l){var d=this&&this.__extends||function(){var i=function(a,m){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,x){w.__proto__=x}||function(w,x){for(var T in x)Object.prototype.hasOwnProperty.call(x,T)&&(w[T]=x[T])},i(a,m)};return function(a,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");i(a,m);function w(){this.constructor=a}a.prototype=m===null?Object.create(m):(w.prototype=m.prototype,new w)}}(),u=this&&this.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,m=a&&i[a],w=0;if(m)return m.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&w>=i.length&&(i=void 0),{value:i&&i[w++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},b=t("../lib/dom"),p=t("./mouse_event").MouseEvent,g=t("../tooltip").HoverTooltip,o=t("../config").nls,c=t("../range").Range;function f(i){var a=i.editor,m=a.renderer.$gutterLayer;i.$tooltip=new h(a),i.$tooltip.addToEditor(a),i.$tooltip.setDataProvider(function(w,x){var T=w.getDocumentPosition().row;i.$tooltip.showTooltip(T)}),i.editor.setDefaultHandler("guttermousedown",function(w){if(!(!a.isFocused()||w.getButton()!=0)){var x=m.getRegion(w);if(x!="foldWidgets"){var T=w.getDocumentPosition().row,$=a.session.selection;if(w.getShiftKey())$.selectTo(T,0);else{if(w.domEvent.detail==2)return a.selectAll(),w.preventDefault();i.$clickSelection=a.selection.getLineRange(T)}return i.setState("selectByLines"),i.captureMouse(w),w.preventDefault()}}})}r.GutterHandler=f;var h=function(i){d(a,i);function a(m){var w=i.call(this,m.container)||this;w.id="gt"+ ++a.$uid,w.editor=m,w.visibleTooltipRow;var x=w.getElement();return x.setAttribute("role","tooltip"),x.setAttribute("id",w.id),x.style.pointerEvents="auto",w.idleTime=50,w.onDomMouseMove=w.onDomMouseMove.bind(w),w.onDomMouseOut=w.onDomMouseOut.bind(w),w.setClassName("ace_gutter-tooltip"),w}return a.prototype.onDomMouseMove=function(m){var w=new p(m,this.editor);this.onMouseMove(w,this.editor)},a.prototype.onDomMouseOut=function(m){var w=new p(m,this.editor);this.onMouseOut(w)},a.prototype.addToEditor=function(m){var w=m.renderer.$gutter;w.addEventListener("mousemove",this.onDomMouseMove),w.addEventListener("mouseout",this.onDomMouseOut),i.prototype.addToEditor.call(this,m)},a.prototype.removeFromEditor=function(m){var w=m.renderer.$gutter;w.removeEventListener("mousemove",this.onDomMouseMove),w.removeEventListener("mouseout",this.onDomMouseOut),i.prototype.removeFromEditor.call(this,m)},a.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),i.prototype.destroy.call(this)},Object.defineProperty(a,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),a.prototype.showTooltip=function(m){var w,x=this.editor.renderer.$gutterLayer,T=x.$annotations[m],$;T?$={displayText:Array.from(T.displayText),type:Array.from(T.type)}:$={displayText:[],type:[]};var S=x.session.getFoldLine(m);if(S&&x.$showFoldedAnnotations){for(var k={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},N,R=m+1;R<=S.end.row;R++)if(x.$annotations[R])for(var O=0;O<x.$annotations[R].text.length;O++){var W=x.$annotations[R].type[O];k[W].push(x.$annotations[R].text[O]),(!N||L[W]<L[N])&&(N=W)}if(["error","security","warning"].includes(N)){var P="".concat(a.annotationsToSummaryString(k)," in folded code.");$.displayText.push(P),$.type.push(N+"_fold")}}if($.displayText.length===0)return this.hide();for(var D={error:[],security:[],warning:[],info:[],hint:[]},A=x.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",R=0;R<$.displayText.length;R++){var _=b.createElement("span"),I=b.createElement("span");(w=I.classList).add.apply(w,["ace_".concat($.type[R]),A]),I.setAttribute("aria-label","".concat(a.annotationLabels[$.type[R].replace("_fold","")].singular)),I.setAttribute("role","img"),I.appendChild(b.createTextNode(" ")),_.appendChild(I),_.appendChild(b.createTextNode($.displayText[R])),_.appendChild(b.createElement("br")),D[$.type[R].replace("_fold","")].push(_)}var j=b.createElement("span");D.error.forEach(function(Z){return j.appendChild(Z)}),D.security.forEach(function(Z){return j.appendChild(Z)}),D.warning.forEach(function(Z){return j.appendChild(Z)}),D.info.forEach(function(Z){return j.appendChild(Z)}),D.hint.forEach(function(Z){return j.appendChild(Z)}),j.setAttribute("aria-live","polite");var U=this.$findLinkedAnnotationNode(m);U&&U.setAttribute("aria-describedby",this.id);var K=c.fromPoints({row:m,column:0},{row:m,column:0});this.showForRange(this.editor,K,j),this.visibleTooltipRow=m,this.editor._signal("showGutterTooltip",this)},a.prototype.$setPosition=function(m,w,x,T){var $=this.$findCellByRow(T.start.row);if($){var S=$&&$.element,k=S&&S.querySelector(".ace_gutter_annotation");if(k){var L=k.getBoundingClientRect();if(L){var N={pageX:L.right,pageY:L.top};return i.prototype.$setPosition.call(this,m,N,!1,T)}}}},a.prototype.$shouldPlaceAbove=function(m,w,x){return x<m},a.prototype.$findLinkedAnnotationNode=function(m){var w=this.$findCellByRow(m);if(w){var x=w.element;if(x.childNodes.length>2)return x.childNodes[2]}},a.prototype.$findCellByRow=function(m){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(w){return w.row===m})},a.prototype.hide=function(m){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var w=this.$findLinkedAnnotationNode(this.visibleTooltipRow);w&&w.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),i.prototype.hide.call(this,m)}},a.annotationsToSummaryString=function(m){var w,x,T=[],$=["error","security","warning","info","hint"];try{for(var S=u($),k=S.next();!k.done;k=S.next()){var L=k.value;if(m[L].length){var N=m[L].length===1?a.annotationLabels[L].singular:a.annotationLabels[L].plural;T.push("".concat(m[L].length," ").concat(N))}}}catch(R){w={error:R}}finally{try{k&&!k.done&&(x=S.return)&&x.call(S)}finally{if(w)throw w.error}}return T.join(", ")},a.prototype.isOutsideOfText=function(m){var w=m.editor,x=w.renderer.$gutter.getBoundingClientRect();return!(m.clientX>=x.left&&m.clientX<=x.right&&m.clientY>=x.top&&m.clientY<=x.bottom)},a}(g);h.$uid=0,r.GutterTooltip=h}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,r,l){var d=t("../lib/dom"),u=t("../lib/event"),b=t("../lib/useragent"),p=200,g=200,o=5;function c(h){var i=h.editor,a=d.createElement("div");a.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",a.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(ne){h[ne]=this[ne]},this),i.on("mousedown",this.onMouseDown.bind(h));var w=i.container,x,T,$,S,k,L,N=0,R,O,W,P,D;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var se=this;return setTimeout(function(){se.startSelect(),se.captureMouse(ne)},0),ne.preventDefault()}k=i.getSelectionRange();var ce=ne.dataTransfer;ce.effectAllowed=i.getReadOnly()?"copy":"copyMove",i.container.appendChild(a),ce.setDragImage&&ce.setDragImage(a,0,0),setTimeout(function(){i.container.removeChild(a)}),ce.clearData(),ce.setData("Text",i.session.getTextRange()),O=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,O=!1,this.setState(null),!i.getReadOnly()){var se=ne.dataTransfer.dropEffect;!R&&se=="move"&&i.session.remove(i.getSelectionRange()),i.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return T=ne.clientX,$=ne.clientY,x||j(),N++,ne.dataTransfer.dropEffect=R=ae(ne),u.preventDefault(ne)},this.onDragOver=function(ne){if(!(i.getReadOnly()||!J(ne.dataTransfer)))return T=ne.clientX,$=ne.clientY,x||(j(),N++),K!==null&&(K=null),ne.dataTransfer.dropEffect=R=ae(ne),u.preventDefault(ne)},this.onDragLeave=function(ne){if(N--,N<=0&&x)return U(),R=null,u.preventDefault(ne)},this.onDrop=function(ne){if(L){var se=ne.dataTransfer;if(O)switch(R){case"move":k.contains(L.row,L.column)?k={start:L,end:L}:k=i.moveText(k,L);break;case"copy":k=i.moveText(k,L,!0);break}else{var ce=se.getData("Text");k={start:L,end:i.session.insert(L,ce)},i.focus(),R=null}return U(),u.preventDefault(ne)}},u.addListener(w,"dragstart",this.onDragStart.bind(h),i),u.addListener(w,"dragend",this.onDragEnd.bind(h),i),u.addListener(w,"dragenter",this.onDragEnter.bind(h),i),u.addListener(w,"dragover",this.onDragOver.bind(h),i),u.addListener(w,"dragleave",this.onDragLeave.bind(h),i),u.addListener(w,"drop",this.onDrop.bind(h),i);function A(ne,se){var ce=Date.now(),he=!se||ne.row!=se.row,ge=!se||ne.column!=se.column;if(!P||he||ge)i.moveCursorToPosition(ne),P=ce,D={x:T,y:$};else{var Ee=f(D.x,D.y,T,$);Ee>o?P=null:ce-P>=g&&(i.renderer.scrollCursorIntoView(),P=null)}}function _(ne,se){var ce=Date.now(),he=i.renderer.layerConfig.lineHeight,ge=i.renderer.layerConfig.characterWidth,Ee=i.renderer.scroller.getBoundingClientRect(),Te={x:{left:T-Ee.left,right:Ee.right-T},y:{top:$-Ee.top,bottom:Ee.bottom-$}},Re=Math.min(Te.x.left,Te.x.right),Xe=Math.min(Te.y.top,Te.y.bottom),Ke={row:ne.row,column:ne.column};Re/ge<=2&&(Ke.column+=Te.x.left<Te.x.right?-3:2),Xe/he<=1&&(Ke.row+=Te.y.top<Te.y.bottom?-1:1);var dt=ne.row!=Ke.row,ot=ne.column!=Ke.column,gt=!se||ne.row!=se.row;dt||ot&&!gt?W?ce-W>=p&&i.renderer.scrollCursorIntoView(Ke):W=ce:W=null}function I(){var ne=L;L=i.renderer.screenToTextCoordinates(T,$),A(L,ne),_(L,ne)}function j(){k=i.selection.toOrientedRange(),x=i.session.addMarker(k,"ace_selection",i.getSelectionStyle()),i.clearSelection(),i.isFocused()&&i.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),I(),S=setInterval(I,20),N=0,u.addListener(document,"mousemove",Z)}function U(){clearInterval(S),i.session.removeMarker(x),x=null,i.selection.fromOrientedRange(k),i.isFocused()&&!O&&i.$resetCursorStyle(),k=null,L=null,N=0,W=null,P=null,u.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&x&&U()},20))}function J(ne){var se=ne.types;return!se||Array.prototype.some.call(se,function(ce){return ce=="text/plain"||ce=="Text"})}function ae(ne){var se=["copy","copymove","all","uninitialized"],ce=["move","copymove","linkmove","all","uninitialized"],he=b.isMac?ne.altKey:ne.ctrlKey,ge="uninitialized";try{ge=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var Ee="none";return he&&se.indexOf(ge)>=0?Ee="copy":ce.indexOf(ge)>=0?Ee="move":se.indexOf(ge)>=0&&(Ee="copy"),Ee}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,i=h.container;i.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var a=b.isWin?"default":"move";h.renderer.setCursorStyle(a),this.setState("dragReady")},this.onMouseDrag=function(h){var i=this.editor.container;if(b.isIE&&this.state=="dragReady"){var a=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>3&&i.dragDrop()}if(this.state==="dragWait"){var a=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>0&&(i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var i=this.editor,a=h.inSelection(),m=h.getButton(),w=h.domEvent.detail||1;if(w===1&&m===0&&a){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var x=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in x&&(x.unselectable="on"),i.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var T=i.container;T.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(c.prototype);function f(h,i,a,m){return Math.sqrt(Math.pow(a-h,2)+Math.pow(m-i,2))}r.DragdropHandler=c}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,r,l){var d=t("./mouse_event").MouseEvent,u=t("../lib/event"),b=t("../lib/dom");r.addTouchListeners=function(p,g){var o="scroll",c,f,h,i,a,m,w=0,x,T=0,$=0,S=0,k,L;function N(){var A=window.navigator&&window.navigator.clipboard,_=!1,I=function(){var K=g.getCopyText(),Z=g.session.getUndoManager().hasUndo();L.replaceChild(b.buildDom(_?["span",!K&&j("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&j("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&j("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],A&&j("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&j("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],j("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],j("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),L.firstChild)},j=function(K){return g.commands.canExecute(K,g)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!_)return _=!_,I();Z=="paste"?A.readText().then(function(J){g.execCommand(Z,J)}):Z&&((Z=="cut"||Z=="copy")&&(A?A.writeText(g.getCopyText()):document.execCommand("copy")),g.execCommand(Z)),L.firstChild.style.display="none",_=!1,Z!="openCommandPalette"&&g.focus()};L=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){o="menu",K.stopPropagation(),K.preventDefault(),g.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],g.container)}function R(){if(!g.getOption("enableMobileMenu")){L&&O();return}L||N();var A=g.selection.cursor,_=g.renderer.textToScreenCoordinates(A.row,A.column),I=g.renderer.textToScreenCoordinates(0,0).pageX,j=g.renderer.scrollLeft,U=g.container.getBoundingClientRect();L.style.top=_.pageY-U.top-3+"px",_.pageX-U.left<U.width-70?(L.style.left="",L.style.right="10px"):(L.style.right="",L.style.left=I+j-U.left+"px"),L.style.display="",L.firstChild.style.display="none",g.on("input",O)}function O(A){L&&(L.style.display="none"),g.off("input",O)}function W(){a=null,clearTimeout(a);var A=g.selection.getRange(),_=A.contains(x.row,x.column);(A.isEmpty()||!_)&&(g.selection.moveToPosition(x),g.selection.selectWord()),o="wait",R()}function P(){a=null,clearTimeout(a),g.selection.moveToPosition(x);var A=T>=2?g.selection.getLineRange(x.row):g.session.getBracketRange(x);A&&!A.isEmpty()?g.selection.setRange(A):g.selection.selectWord(),o="wait"}u.addListener(p,"contextmenu",function(A){if(k){var _=g.textInput.getElement();_.focus()}},g),u.addListener(p,"touchstart",function(A){var _=A.touches;if(a||_.length>1){clearTimeout(a),a=null,h=-1,o="zoom";return}k=g.$mouseHandler.isMousePressed=!0;var I=g.renderer.layerConfig.lineHeight,j=g.renderer.layerConfig.lineHeight,U=A.timeStamp;i=U;var K=_[0],Z=K.clientX,J=K.clientY;Math.abs(c-Z)+Math.abs(f-J)>I&&(h=-1),c=A.clientX=Z,f=A.clientY=J,$=S=0;var ae=new d(A,g);if(x=ae.getDocumentPosition(),U-h<500&&_.length==1&&!w)T++,A.preventDefault(),A.button=0,P();else{T=0;var ne=g.selection.cursor,se=g.selection.isEmpty()?ne:g.selection.anchor,ce=g.renderer.$cursorLayer.getPixelPosition(ne,!0),he=g.renderer.$cursorLayer.getPixelPosition(se,!0),ge=g.renderer.scroller.getBoundingClientRect(),Ee=g.renderer.layerConfig.offset,Te=g.renderer.scrollLeft,Re=function(dt,ot){return dt=dt/j,ot=ot/I-.75,dt*dt+ot*ot};if(A.clientX<ge.left){o="zoom";return}var Xe=Re(A.clientX-ge.left-ce.left+Te,A.clientY-ge.top-ce.top+Ee),Ke=Re(A.clientX-ge.left-he.left+Te,A.clientY-ge.top-he.top+Ee);Xe<3.5&&Ke<3.5&&(o=Xe>Ke?"cursor":"anchor"),Ke<3.5?o="anchor":Xe<3.5?o="cursor":o="scroll",a=setTimeout(W,450)}h=U},g),u.addListener(p,"touchend",function(A){k=g.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),o=="zoom"?(o="",w=0):a?(g.selection.moveToPosition(x),w=0,R()):o=="scroll"?(D(),O()):R(),clearTimeout(a),a=null},g),u.addListener(p,"touchmove",function(A){a&&(clearTimeout(a),a=null);var _=A.touches;if(!(_.length>1||o=="zoom")){var I=_[0],j=c-I.clientX,U=f-I.clientY;if(o=="wait")if(j*j+U*U>4)o="cursor";else return A.preventDefault();c=I.clientX,f=I.clientY,A.clientX=I.clientX,A.clientY=I.clientY;var K=A.timeStamp,Z=K-i;if(i=K,o=="scroll"){var J=new d(A,g);J.speed=1,J.wheelX=j,J.wheelY=U,10*Math.abs(j)<Math.abs(U)&&(j=0),10*Math.abs(U)<Math.abs(j)&&(U=0),Z!=0&&($=j/Z,S=U/Z),g._emit("mousewheel",J),J.propagationStopped||($=S=0)}else{var ae=new d(A,g),ne=ae.getDocumentPosition();o=="cursor"?g.selection.moveCursorToPosition(ne):o=="anchor"&&g.selection.setSelectionAnchor(ne.row,ne.column),g.renderer.scrollCursorIntoView(ne),A.preventDefault()}}},g);function D(){w+=60,m=setInterval(function(){w--<=0&&(clearInterval(m),m=null),Math.abs($)<.01&&($=0),Math.abs(S)<.01&&(S=0),w<20&&($=.9*$),w<20&&(S=.9*S);var A=g.session.getScrollTop();g.renderer.scrollBy(10*$,10*S),A==g.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(t,r,l){var d=t("../lib/event"),u=t("../lib/useragent"),b=t("./default_handlers").DefaultHandlers,p=t("./default_gutter_handler").GutterHandler,g=t("./mouse_event").MouseEvent,o=t("./dragdrop_handler").DragdropHandler,c=t("./touch_handler").addTouchListeners,f=t("../config"),h=function(){function i(a){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=a,new b(this),new p(this),new o(this);var w=function($){var S=!document.hasFocus||!document.hasFocus()||!a.isFocused()&&document.activeElement==(a.textInput&&a.textInput.getElement());S&&window.focus(),a.focus(),setTimeout(function(){a.isFocused()||a.focus()})},x=a.renderer.getMouseEventTarget();d.addListener(x,"click",this.onMouseEvent.bind(this,"click"),a),d.addListener(x,"mousemove",this.onMouseMove.bind(this,"mousemove"),a),d.addMultiMouseDownListener([x,a.renderer.scrollBarV&&a.renderer.scrollBarV.inner,a.renderer.scrollBarH&&a.renderer.scrollBarH.inner,a.textInput&&a.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",a),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"),a),c(a.container,a);var T=a.renderer.$gutter;d.addListener(T,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),a),d.addListener(T,"click",this.onMouseEvent.bind(this,"gutterclick"),a),d.addListener(T,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),a),d.addListener(T,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),a),d.addListener(x,"mousedown",w,a),d.addListener(T,"mousedown",w,a),u.isIE&&a.renderer.scrollBarV&&(d.addListener(a.renderer.scrollBarV.element,"mousedown",w,a),d.addListener(a.renderer.scrollBarH.element,"mousedown",w,a)),a.on("mousemove",function($){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var S=a.renderer.screenToTextCoordinates($.x,$.y),k=a.session.selection.getRange(),L=a.renderer;!k.isEmpty()&&k.insideStart(S.row,S.column)?L.setCursorStyle("default"):L.setCursorStyle("")}},a)}return i.prototype.onMouseEvent=function(a,m){this.editor.session&&this.editor._emit(a,new g(m,this.editor))},i.prototype.onMouseMove=function(a,m){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(a,new g(m,this.editor))},i.prototype.onMouseWheel=function(a,m){var w=new g(m,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=m.wheelX,w.wheelY=m.wheelY,this.editor._emit(a,w)},i.prototype.setState=function(a){this.state=a},i.prototype.captureMouse=function(a,m){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var w=this.editor,x=this.editor.renderer;x.$isMousePressed=!0;var T=this,$=!0,S=function(O){if(O){if(u.isWebKit&&!O.which&&T.releaseMouse)return T.releaseMouse();T.x=O.clientX,T.y=O.clientY,m&&m(O),T.mouseEvent=new g(O,T.editor),T.$mouseMoved=!0}},k=function(O){w.off("beforeEndOperation",R),$=!1,w.session&&L(),T[T.state+"End"]&&T[T.state+"End"](O),T.state="",T.isMousePressed=x.$isMousePressed=!1,x.$keepTextAreaAtCursor&&x.$moveTextAreaToCursor(),T.$onCaptureMouseMove=T.releaseMouse=null,O&&T.onMouseEvent("mouseup",O),w.endOperation()},L=function(){T[T.state]&&T[T.state](),T.$mouseMoved=!1},N=function(){$&&(L(),d.nextFrame(N))};if(u.isOldIE&&a.domEvent.type=="dblclick")return setTimeout(function(){k(a)});var R=function(O){T.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(T[T.state+"End"]&&T[T.state+"End"](),T.state="",T.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),T.$onCaptureMouseMove=S,T.releaseMouse=d.capture(this.editor.container,S,k),N()},i.prototype.cancelContextMenu=function(){var a=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",a),m&&m.domEvent&&d.stopEvent(m.domEvent))}).bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)},i.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},i}();h.prototype.releaseMouse=null,f.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(t,r,l){var d=t("../lib/dom"),u=function(){function b(p){p.on("click",function(g){var o=g.getDocumentPosition(),c=p.session,f=c.getFoldAt(o.row,o.column,1);f&&(g.getAccelKey()?c.removeFold(f):c.expandFold(f),g.stop());var h=g.domEvent&&g.domEvent.target;h&&d.hasCssClass(h,"ace_inline_button")&&d.hasCssClass(h,"ace_toggle_wrap")&&(c.setOption("wrap",!c.getUseWrapMode()),p.renderer.scrollCursorIntoView())}),p.on("gutterclick",function(g){var o=p.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var c=g.getDocumentPosition().row,f=p.session;f.foldWidgets&&f.foldWidgets[c]&&p.session.onFoldWidgetClick(c,g),p.isFocused()||p.focus(),g.stop()}}),p.on("gutterdblclick",function(g){var o=p.renderer.$gutterLayer.getRegion(g);if(o=="foldWidgets"){var c=g.getDocumentPosition().row,f=p.session,h=f.getParentFoldRangeData(c,!0),i=h.range||h.firstRange;if(i){c=i.start.row;var a=f.getFoldAt(c,f.getLine(c).length,1);a?f.removeFold(a):(f.addFold("...",i),p.renderer.scrollCursorIntoView({row:i.start.row,column:0}))}g.stop()}})}return b}();r.FoldHandler=u}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(t,r,l){var d=t("../lib/keys"),u=t("../lib/event"),b=function(){function p(g){this.$editor=g,this.$data={editor:g},this.$handlers=[],this.setDefaultHandler(g.commands)}return p.prototype.setDefaultHandler=function(g){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=g,this.addKeyboardHandler(g,0)},p.prototype.setKeyboardHandler=function(g){var o=this.$handlers;if(o[o.length-1]!=g){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(g,1)}},p.prototype.addKeyboardHandler=function(g,o){if(g){typeof g=="function"&&!g.handleKeyboard&&(g.handleKeyboard=g);var c=this.$handlers.indexOf(g);c!=-1&&this.$handlers.splice(c,1),o==null?this.$handlers.push(g):this.$handlers.splice(o,0,g),c==-1&&g.attach&&g.attach(this.$editor)}},p.prototype.removeKeyboardHandler=function(g){var o=this.$handlers.indexOf(g);return o==-1?!1:(this.$handlers.splice(o,1),g.detach&&g.detach(this.$editor),!0)},p.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},p.prototype.getStatusText=function(){var g=this.$data,o=g.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(o,g)||""}).filter(Boolean).join(" ")},p.prototype.$callKeyboardHandlers=function(g,o,c,f){for(var h,i=!1,a=this.$editor.commands,m=this.$handlers.length;m--&&(h=this.$handlers[m].handleKeyboard(this.$data,g,o,c,f),!(!(!h||!h.command)&&(h.command=="null"?i=!0:i=a.exec(h.command,this.$editor,h.args,f),i&&f&&g!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&u.stopEvent(f),i))););return!i&&g==-1&&(h={command:"insertstring"},i=a.exec("insertstring",this.$editor,o)),i&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),i},p.prototype.onCommandKey=function(g,o,c){var f=d.keyCodeToString(c);return this.$callKeyboardHandlers(o,f,c,g)},p.prototype.onTextInput=function(g){return this.$callKeyboardHandlers(-1,g)},p}();r.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(t,r,l){var d=0,u=0,b=!1,p=!1,g=!1,o=[[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]],c=[[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]],f=0,h=1,i=0,a=1,m=2,w=3,x=4,T=5,$=6,S=7,k=8,L=9,N=10,R=11,O=12,W=13,P=14,D=15,A=16,_=17,I=18,j=[I,I,I,I,I,I,I,I,I,$,T,$,k,T,I,I,I,I,I,I,I,I,I,I,I,I,I,I,T,T,T,$,k,x,x,R,R,R,x,x,x,x,x,N,L,N,L,L,m,m,m,m,m,m,m,m,m,m,L,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,x,x,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,x,x,x,x,I,I,I,I,I,I,T,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,L,x,R,R,R,R,x,x,x,x,i,x,x,I,x,x,R,R,m,m,x,i,x,x,x,m,i,x,x,x,x,x],U=[k,k,k,k,k,k,k,k,k,k,k,I,I,I,i,a,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,k,T,W,P,D,A,_,L,R,R,R,R,R,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,L,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,k];function K(ne,se,ce,he){var ge=d?c:o,Ee=null,Te=null,Re=null,Xe=0,Ke=null,dt=null,ot=-1,gt=null,tn=null,Wn=[];if(!he)for(gt=0,he=[];gt<ce;gt++)he[gt]=ae(ne[gt]);for(u=d,b=!1,p=!1,g=!1,tn=0;tn<ce;tn++){if(Ee=Xe,Wn[tn]=Te=J(ne,he,Wn,tn),Xe=ge[Ee][Te],Ke=Xe&240,Xe&=15,se[tn]=Re=ge[Xe][5],Ke>0)if(Ke==16){for(gt=ot;gt<tn;gt++)se[gt]=1;ot=-1}else ot=-1;if(dt=ge[Xe][6],dt)ot==-1&&(ot=tn);else if(ot>-1){for(gt=ot;gt<tn;gt++)se[gt]=Re;ot=-1}he[tn]==T&&(se[tn]=0),u|=Re}if(g){for(gt=0;gt<ce;gt++)if(he[gt]==$){se[gt]=d;for(var Zt=gt-1;Zt>=0&&he[Zt]==k;Zt--)se[Zt]=d}}}function Z(ne,se,ce){if(!(u<ne)){if(ne==1&&d==h&&!p){ce.reverse();return}for(var he=ce.length,ge=0,Ee,Te,Re,Xe;ge<he;){if(se[ge]>=ne){for(Ee=ge+1;Ee<he&&se[Ee]>=ne;)Ee++;for(Te=ge,Re=Ee-1;Te<Re;Te++,Re--)Xe=ce[Te],ce[Te]=ce[Re],ce[Re]=Xe;ge=Ee}ge++}}}function J(ne,se,ce,he){var ge=se[he],Ee,Te,Re,Xe;switch(ge){case i:case a:b=!1;case x:case w:return ge;case m:return b?w:m;case S:return b=!0,a;case k:return x;case L:return he<1||he+1>=se.length||(Ee=ce[he-1])!=m&&Ee!=w||(Te=se[he+1])!=m&&Te!=w?x:(b&&(Te=w),Te==Ee?Te:x);case N:return Ee=he>0?ce[he-1]:T,Ee==m&&he+1<se.length&&se[he+1]==m?m:x;case R:if(he>0&&ce[he-1]==m)return m;if(b)return x;for(Xe=he+1,Re=se.length;Xe<Re&&se[Xe]==R;)Xe++;return Xe<Re&&se[Xe]==m?m:x;case O:for(Re=se.length,Xe=he+1;Xe<Re&&se[Xe]==O;)Xe++;if(Xe<Re){var Ke=ne[he],dt=Ke>=1425&&Ke<=2303||Ke==64286;if(Ee=se[Xe],dt&&(Ee==a||Ee==S))return a}return he<1||(Ee=se[he-1])==T?x:ce[he-1];case T:return b=!1,p=!0,d;case $:return g=!0,x;case W:case P:case A:case _:case D:b=!1;case I:return x}}function ae(ne){var se=ne.charCodeAt(0),ce=se>>8;return ce==0?se>191?i:j[se]:ce==5?/[\u0591-\u05f4]/.test(ne)?a:i:ce==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?O:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:se==1642?R:/[\u06f0-\u06f9]/.test(ne)?m:S:ce==32&&se<=8287?U[se&255]:ce==254&&se>=65136?S:x}r.L=i,r.R=a,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,se,ce){if(ne.length<2)return{};var he=ne.split(""),ge=new Array(he.length),Ee=new Array(he.length),Te=[];d=ce?h:f,K(he,Te,he.length,se);for(var Re=0;Re<ge.length;ge[Re]=Re,Re++);Z(2,Te,ge),Z(1,Te,ge);for(var Re=0;Re<ge.length-1;Re++)se[Re]===w?Te[Re]=r.AN:Te[Re]===a&&(se[Re]>S&&se[Re]<W||se[Re]===x||se[Re]===I)?Te[Re]=r.ON_R:Re>0&&he[Re-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(he[Re])&&(Te[Re-1]=Te[Re]=r.R_H,Re++);he[he.length-1]===r.DOT&&(Te[he.length-1]=r.B),he[0]==="‫"&&(Te[0]=r.RLE);for(var Re=0;Re<ge.length;Re++)Ee[Re]=Te[ge[Re]];return{logicalFromVisual:ge,bidiLevels:Ee}},r.hasBidiCharacters=function(ne,se){for(var ce=!1,he=0;he<ne.length;he++)se[he]=ae(ne.charAt(he)),!ce&&(se[he]==a||se[he]==S||se[he]==w)&&(ce=!0);return ce},r.getVisualFromLogicalIdx=function(ne,se){for(var ce=0;ce<se.logicalFromVisual.length;ce++)if(se.logicalFromVisual[ce]==ne)return ce;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(t,r,l){var d=t("./lib/bidiutil"),u=t("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,p=function(){function g(o){this.session=o,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=b.test(o.getValue())}return g.prototype.isBidiRow=function(o,c,f){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(c,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},g.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&b.test(o.lines.join(`
185
185
  `))&&(this.seenBidi=!0,this.currentRow=null)},g.prototype.getDocumentRow=function(){var o=0,c=this.session.$screenRowCache;if(c.length){var f=this.session.$getRowCacheIndex(c,this.currentRow);f>=0&&(o=this.session.$docRowCache[f])}return o},g.prototype.getSplitIndex=function(){var o=0,c=this.session.$screenRowCache;if(c.length)for(var f,h=this.session.$getRowCacheIndex(c,this.currentRow);this.currentRow-o>0&&(f=this.session.$getRowCacheIndex(c,this.currentRow-o-1),f===h);)h=f,o++;else o=this.currentRow;return o},g.prototype.updateRowLine=function(o,c){o===void 0&&(o=this.getDocumentRow());var f=o===this.session.getLength()-1,h=f?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var i=this.session.$wrapData[o];i&&(c===void 0&&(c=this.getSplitIndex()),c>0&&i.length?(this.wrapIndent=i.indent,this.wrapOffset=this.wrapIndent*this.charWidths[d.L],this.line=c<i.length?this.line.substring(i[c-1],i[c]):this.line.substring(i[i.length-1])):this.line=this.line.substring(0,i[c]),c==i.length&&(this.line+=this.showInvisibles?h:d.DOT))}else this.line+=this.showInvisibles?h:d.DOT;var a=this.session,m=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(x,T){return x===" "||a.isFullWidth(x.charCodeAt(0))?(w=x===" "?a.getScreenTabSize(T+m):2,m+=w-1,u.stringRepeat(d.DOT,w)):x}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==d.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},g.prototype.updateBidiMap=function(){var o=[];d.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=d.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},g.prototype.markAsDirty=function(){this.currentRow=null},g.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var c=this.characterWidth=o.$characterSize.width,f=o.$measureCharWidth("ה");this.charWidths[d.L]=this.charWidths[d.EN]=this.charWidths[d.ON_R]=c,this.charWidths[d.R]=this.charWidths[d.AN]=f,this.charWidths[d.R_H]=f*.45,this.charWidths[d.B]=this.charWidths[d.RLE]=0,this.currentRow=null}},g.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},g.prototype.setEolChar=function(o){this.EOL=o},g.prototype.setContentWidth=function(o){this.contentWidth=o},g.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},g.prototype.setRtlDirection=function(o,c){for(var f=o.getCursorPosition(),h=o.selection.getSelectionAnchor().row;h<=f.row;h++)!c&&o.session.getLine(h).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(h,0,1):c&&o.session.getLine(h).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:h},o.session.$bidiHandler.RLE)},g.prototype.getPosLeft=function(o){o-=this.wrapIndent;var c=this.line.charAt(0)===this.RLE?1:0,f=o>c?this.session.getOverwrite()?o:o-1:c,h=d.getVisualFromLogicalIdx(f,this.bidiMap),i=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&o<=c&&i[h]%2!==0&&h++;for(var m=0;m<h;m++)a+=this.charWidths[i[m]];return!this.session.getOverwrite()&&o>c&&i[h]%2===0&&(a+=this.charWidths[i[h]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},g.prototype.getSelections=function(o,c){var f=this.bidiMap,h=f.bidiLevels,i,a=[],m=0,w=Math.min(o,c)-this.wrapIndent,x=Math.max(o,c)-this.wrapIndent,T=!1,$=!1,S=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var k,L=0;L<h.length;L++)k=f.logicalFromVisual[L],i=h[L],T=k>=w&&k<x,T&&!$?S=m:!T&&$&&a.push({left:S,width:m-S}),m+=this.charWidths[i],$=T;if(T&&L===h.length&&a.push({left:S,width:m-S}),this.isRtlDir)for(var N=0;N<a.length;N++)a[N].left+=this.rtlLineOffset;return a},g.prototype.offsetToCol=function(f){this.isRtlDir&&(f-=this.rtlLineOffset);var c=0,f=Math.max(f,0),h=0,i=0,a=this.bidiMap.bidiLevels,m=this.charWidths[a[i]];for(this.wrapIndent&&(f-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);f>h+m/2;){if(h+=m,i===a.length-1){m=0;break}m=this.charWidths[a[++i]]}return i>0&&a[i-1]%2!==0&&a[i]%2===0?(f<h&&i--,c=this.bidiMap.logicalFromVisual[i]):i>0&&a[i-1]%2===0&&a[i]%2!==0?c=1+(f>h?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===a.length-1&&m===0&&a[i-1]%2===0||!this.isRtlDir&&i===0&&a[i]%2!==0?c=1+this.bidiMap.logicalFromVisual[i]:(i>0&&a[i-1]%2!==0&&m!==0&&i--,c=this.bidiMap.logicalFromVisual[i]),c===0&&this.isRtlDir&&c++,c+this.wrapIndent},g}();r.BidiHandler=p}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,r,l){var d=t("./lib/oop"),u=t("./lib/lang"),b=t("./lib/event_emitter").EventEmitter,p=t("./range").Range,g=function(){function o(c){this.session=c,this.doc=c.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var f=this;this.cursor.on("change",function(h){f.$cursorChanged=!0,f.$silent||f._emit("changeCursor"),!f.$isEmpty&&!f.$silent&&f._emit("changeSelection"),!f.$keepDesiredColumnOnChange&&h.old.column!=h.value.column&&(f.$desiredColumn=null)}),this.anchor.on("change",function(){f.$anchorChanged=!0,!f.$isEmpty&&!f.$silent&&f._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(c,f){this.$isEmpty=!1,this.anchor.setPosition(c,f)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var c=this.anchor,f=this.lead;return c.row>f.row||c.row==f.row&&c.column>f.column},o.prototype.getRange=function(){var c=this.anchor,f=this.lead;return this.$isEmpty?p.fromPoints(f,f):this.isBackwards()?p.fromPoints(f,c):p.fromPoints(c,f)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(c,f){var h=f?c.end:c.start,i=f?c.start:c.end;this.$setSelection(h.row,h.column,i.row,i.column)},o.prototype.$setSelection=function(c,f,h,i){if(!this.$silent){var a=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(c,f),this.cursor.setPosition(h,i),this.$isEmpty=!p.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||a!=this.$isEmpty||m)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(c){var f=this.lead;this.$isEmpty&&this.setSelectionAnchor(f.row,f.column),c.call(this)},o.prototype.selectTo=function(c,f){this.$moveSelection(function(){this.moveCursorTo(c,f)})},o.prototype.selectToPosition=function(c){this.$moveSelection(function(){this.moveCursorToPosition(c)})},o.prototype.moveTo=function(c,f){this.clearSelection(),this.moveCursorTo(c,f)},o.prototype.moveToPosition=function(c){this.clearSelection(),this.moveCursorToPosition(c)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(c,f){if(typeof f>"u"){var h=c||this.lead;c=h.row,f=h.column}return this.session.getWordRange(c,f)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var c=this.getCursor(),f=this.session.getAWordRange(c.row,c.column);this.setSelectionRange(f)},o.prototype.getLineRange=function(c,f){var h=typeof c=="number"?c:this.lead.row,i,a=this.session.getFoldLine(h);return a?(h=a.start.row,i=a.end.row):i=h,f===!0?new p(h,0,i,this.session.getLine(i).length):new p(h,0,i+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(c,f,h){var i=c.column,a=c.column+f;return h<0&&(i=c.column-f,a=c.column),this.session.isTabStop(c)&&this.doc.getLine(c.row).slice(i,a).split(" ").length-1==f},o.prototype.moveCursorLeft=function(){var c=this.lead.getPosition(),f;if(f=this.session.getFoldAt(c.row,c.column,-1))this.moveCursorTo(f.start.row,f.start.column);else if(c.column===0)c.row>0&&this.moveCursorTo(c.row-1,this.doc.getLine(c.row-1).length);else{var h=this.session.getTabSize();this.wouldMoveIntoSoftTab(c,h,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-h):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var c=this.lead.getPosition(),f;if(f=this.session.getFoldAt(c.row,c.column,1))this.moveCursorTo(f.end.row,f.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var h=this.session.getTabSize(),c=this.lead;this.wouldMoveIntoSoftTab(c,h,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,h):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var c=this.lead.row,f=this.lead.column,h=this.session.documentToScreenRow(c,f),i=this.session.screenToDocumentPosition(h,0),a=this.session.getDisplayLine(c,null,i.row,i.column),m=a.match(/^\s*/);m[0].length!=f&&!this.session.$useEmacsStyleLineStart&&(i.column+=m[0].length),this.moveCursorToPosition(i)},o.prototype.moveCursorLineEnd=function(){var c=this.lead,f=this.session.getDocumentLastRowColumnPosition(c.row,c.column);if(this.lead.column==f.column){var h=this.session.getLine(f.row);if(f.column==h.length){var i=h.search(/\s+$/);i>0&&(f.column=i)}}this.moveCursorTo(f.row,f.column)},o.prototype.moveCursorFileEnd=function(){var c=this.doc.getLength()-1,f=this.doc.getLine(c).length;this.moveCursorTo(c,f)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var c=this.lead.row,f=this.lead.column,h=this.doc.getLine(c),i=h.substring(f);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var a=this.session.getFoldAt(c,f,1);if(a){this.moveCursorTo(a.end.row,a.end.column);return}if(this.session.nonTokenRe.exec(i)&&(f+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=h.substring(f)),f>=h.length){this.moveCursorTo(c,h.length),this.moveCursorRight(),c<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(i)&&(f+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,f)},o.prototype.moveCursorLongWordLeft=function(){var c=this.lead.row,f=this.lead.column,h;if(h=this.session.getFoldAt(c,f,-1)){this.moveCursorTo(h.start.row,h.start.column);return}var i=this.session.getFoldStringAt(c,f,-1);i==null&&(i=this.doc.getLine(c).substring(0,f));var a=u.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(a)&&(f-=this.session.nonTokenRe.lastIndex,a=a.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),f<=0){this.moveCursorTo(c,0),this.moveCursorLeft(),c>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(a)&&(f-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(c,f)},o.prototype.$shortWordEndIndex=function(c){var f=0,h,i=/\s/,a=this.session.tokenRe;if(a.lastIndex=0,this.session.tokenRe.exec(c))f=this.session.tokenRe.lastIndex;else{for(;(h=c[f])&&i.test(h);)f++;if(f<1){for(a.lastIndex=0;(h=c[f])&&!a.test(h);)if(a.lastIndex=0,f++,i.test(h))if(f>2){f--;break}else{for(;(h=c[f])&&i.test(h);)f++;if(f>2)break}}}return a.lastIndex=0,f},o.prototype.moveCursorShortWordRight=function(){var c=this.lead.row,f=this.lead.column,h=this.doc.getLine(c),i=h.substring(f),a=this.session.getFoldAt(c,f,1);if(a)return this.moveCursorTo(a.end.row,a.end.column);if(f==h.length){var m=this.doc.getLength();do c++,i=this.doc.getLine(c);while(c<m&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),f=0}var w=this.$shortWordEndIndex(i);this.moveCursorTo(c,f+w)},o.prototype.moveCursorShortWordLeft=function(){var c=this.lead.row,f=this.lead.column,h;if(h=this.session.getFoldAt(c,f,-1))return this.moveCursorTo(h.start.row,h.start.column);var i=this.session.getLine(c).substring(0,f);if(f===0){do c--,i=this.doc.getLine(c);while(c>0&&/^\s*$/.test(i));f=i.length,/\s+$/.test(i)||(i="")}var a=u.stringReverse(i),m=this.$shortWordEndIndex(a);return this.moveCursorTo(c,f-m)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(c,f){var h=this.session.documentToScreenPosition(this.lead.row,this.lead.column),i;if(f===0&&(c!==0&&(this.session.$bidiHandler.isBidiRow(h.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(h.column),h.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=h.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?h.column=this.$desiredColumn:this.$desiredColumn=h.column),c!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var a=this.session.lineWidgets[this.lead.row];c<0?c-=a.rowsAbove||0:c>0&&(c+=a.rowCount-(a.rowsAbove||0))}var m=this.session.screenToDocumentPosition(h.row+c,h.column,i);c!==0&&f===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+f,f===0)},o.prototype.moveCursorToPosition=function(c){this.moveCursorTo(c.row,c.column)},o.prototype.moveCursorTo=function(c,f,h){var i=this.session.getFoldAt(c,f,1);i&&(c=i.start.row,f=i.start.column),this.$keepDesiredColumnOnChange=!0;var a=this.session.getLine(c);/[\uDC00-\uDFFF]/.test(a.charAt(f))&&a.charAt(f-1)&&(this.lead.row==c&&this.lead.column==f+1?f=f-1:f=f+1),this.lead.setPosition(c,f),this.$keepDesiredColumnOnChange=!1,h||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(c,f,h){var i=this.session.screenToDocumentPosition(c,f);this.moveCursorTo(i.row,i.column,h)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(c){this.setSelectionRange(c,c.cursor==c.start),this.$desiredColumn=c.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(c){var f=this.getRange();return c?(c.start.column=f.start.column,c.start.row=f.start.row,c.end.column=f.end.column,c.end.row=f.end.row):c=f,c.cursor=this.isBackwards()?c.start:c.end,c.desiredColumn=this.$desiredColumn,c},o.prototype.getRangeOfMovements=function(c){var f=this.getCursor();try{c(this);var h=this.getCursor();return p.fromPoints(f,h)}catch{return p.fromPoints(f,f)}finally{this.moveCursorToPosition(f)}},o.prototype.toJSON=function(){if(this.rangeCount)var c=this.ranges.map(function(f){var h=f.clone();return h.isBackwards=f.cursor==f.start,h});else{var c=this.getRange();c.isBackwards=this.isBackwards()}return c},o.prototype.fromJSON=function(c){if(c.start==null)if(this.rangeList&&c.length>1){this.toSingleRange(c[0]);for(var f=c.length;f--;){var h=p.fromPoints(c[f].start,c[f].end);c[f].isBackwards&&(h.cursor=h.start),this.addRange(h,!0)}return}else c=c[0];this.rangeList&&this.toSingleRange(c),this.setSelectionRange(c,c.isBackwards)},o.prototype.isEqual=function(c){if((c.length||this.rangeCount)&&c.length!=this.rangeCount)return!1;if(!c.length||!this.ranges)return this.getRange().isEqual(c);for(var f=this.ranges.length;f--;)if(!this.ranges[f].isEqual(c[f]))return!1;return!0},o}();g.prototype.setSelectionAnchor=g.prototype.setAnchor,g.prototype.getSelectionAnchor=g.prototype.getAnchor,g.prototype.setSelectionRange=g.prototype.setRange,d.implement(g.prototype,b),r.Selection=g}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(t,r,l){var d=t("./lib/report_error").reportError,u=2e3,b=function(){function p(g){this.splitRegex,this.states=g,this.regExps={},this.matchMappings={};for(var o in this.states){for(var c=this.states[o],f=[],h=0,i=this.matchMappings[o]={defaultToken:"text"},a="g",m=[],w=0;w<c.length;w++){var x=c[w];if(x.defaultToken&&(i.defaultToken=x.defaultToken),x.caseInsensitive&&a.indexOf("i")===-1&&(a+="i"),x.unicode&&a.indexOf("u")===-1&&(a+="u"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var T=x.regex,$=new RegExp("(?:("+T+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||$==1?x.token=x.token[0]:$-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:$-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&($>1?x.onMatch=this.$applyToken:x.onMatch=x.token),$>1&&(/\\\d/.test(x.regex)?T=x.regex.replace(/\\([0-9]+)/g,function(S,k){return"\\"+(parseInt(k,10)+h+1)}):($=1,T=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&m.push(x)),i[h]=w,h+=$,f.push(T),x.onMatch||(x.onMatch=null)}}f.length||(i[0]=0,f.push("$")),m.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,a)},this),this.regExps[o]=new RegExp("("+f.join(")|(")+")|($)",a)}}return p.prototype.$setMaxTokenCount=function(g){u=g|0},p.prototype.$applyToken=function(g){var o=this.splitRegex.exec(g).slice(1),c=this.token.apply(this,o);if(typeof c=="string")return[{type:c,value:g}];for(var f=[],h=0,i=c.length;h<i;h++)o[h]&&(f[f.length]={type:c[h],value:o[h]});return f},p.prototype.$arrayTokens=function(g){if(!g)return[];var o=this.splitRegex.exec(g);if(!o)return"text";for(var c=[],f=this.tokenArray,h=0,i=f.length;h<i;h++)o[h+1]&&(c[c.length]={type:f[h],value:o[h+1]});return c},p.prototype.removeCapturingGroups=function(g){var o=g.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(c,f){return f?"(?:":c});return o},p.prototype.createSplitterRegexp=function(g,o){if(g.indexOf("(?=")!=-1){var c=0,f=!1,h={};g.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(i,a,m,w,x,T){return f?f=x!="]":x?f=!0:w?(c==h.stack&&(h.end=T+1,h.stack=-1),c--):m&&(c++,m.length!=1&&(h.stack=c,h.start=T)),i}),h.end!=null&&/^\)*$/.test(g.substr(h.end))&&(g=g.substring(0,h.start)+g.substr(h.end))}return g.charAt(0)!="^"&&(g="^"+g),g.charAt(g.length-1)!="$"&&(g+="$"),new RegExp(g,(o||"").replace("g",""))},p.prototype.getLineTokens=function(g,o){if(o&&typeof o!="string"){var c=o.slice(0);o=c[0],o==="#tmp"&&(c.shift(),o=c.shift())}else var c=[];var f=o||"start",h=this.states[f];h||(f="start",h=this.states[f]);var i=this.matchMappings[f],a=this.regExps[f];a.lastIndex=0;for(var m,w=[],x=0,T=0,$={type:null,value:""};m=a.exec(g);){var S=i.defaultToken,k=null,L=m[0],N=a.lastIndex;if(N-L.length>x){var R=g.substring(x,N-L.length);$.type==S?$.value+=R:($.type&&w.push($),$={type:S,value:R})}for(var O=0;O<m.length-2;O++)if(m[O+1]!==void 0){k=h[i[O]],k.onMatch?S=k.onMatch(L,f,c,g):S=k.token,k.next&&(typeof k.next=="string"?f=k.next:f=k.next(f,c),h=this.states[f],h||(this.reportError("state doesn't exist",f),f="start",h=this.states[f]),i=this.matchMappings[f],x=N,a=this.regExps[f],a.lastIndex=N),k.consumeLineEnd&&(x=N);break}if(L){if(typeof S=="string")(!k||k.merge!==!1)&&$.type===S?$.value+=L:($.type&&w.push($),$={type:S,value:L});else if(S){$.type&&w.push($),$={type:null,value:""};for(var O=0;O<S.length;O++)w.push(S[O])}}if(x==g.length)break;if(x=N,T++>u){for(T>2*g.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:g});x<g.length;)$.type&&w.push($),$={value:g.substring(x,x+=500),type:"overflow"};f="start",c=[];break}}return $.type&&w.push($),c.length>1&&c[0]!==f&&c.unshift("#tmp",f),{tokens:w,state:c.length?c:f}},p}();b.prototype.reportError=d,r.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(t,r,l){var d=t("../lib/deep_copy").deepCopy,u;u=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(g,o){if(!o){for(var c in g)this.$rules[c]=g[c];return}for(var c in g){for(var f=g[c],h=0;h<f.length;h++){var i=f[h];(i.next||i.onMatch)&&(typeof i.next=="string"&&i.next.indexOf(o)!==0&&(i.next=o+i.next),i.nextState&&i.nextState.indexOf(o)!==0&&(i.nextState=o+i.nextState))}this.$rules[o+c]=f}},this.getRules=function(){return this.$rules},this.embedRules=function(g,o,c,f,h){var i=typeof g=="function"?new g().getRules():g;if(f)for(var a=0;a<f.length;a++)f[a]=o+f[a];else{f=[];for(var m in i)f.push(o+m)}if(this.addRules(i,o),c)for(var w=Array.prototype[h?"push":"unshift"],a=0;a<f.length;a++)w.apply(this.$rules[f[a]],d(c));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var b=function(g,o){return(g!="start"||o.length)&&o.unshift(this.nextState,g),this.nextState},p=function(g,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var g=0,o=this.$rules;function c(f){var h=o[f];h.processed=!0;for(var i=0;i<h.length;i++){var a=h[i],m=null;Array.isArray(a)&&(m=a,a={}),!a.regex&&a.start&&(a.regex=a.start,a.next||(a.next=[]),a.next.push({defaultToken:a.token},{token:a.token+".end",regex:a.end||a.start,next:"pop"}),a.token=a.token+".start",a.push=!0);var w=a.next||a.push;if(w&&Array.isArray(w)){var x=a.stateName;x||(x=a.token,typeof x!="string"&&(x=x[0]||""),o[x]&&(x+=g++)),o[x]=w,a.next=x,c(x)}else w=="pop"&&(a.next=p);if(a.push&&(a.nextState=a.next||a.push,a.next=b,delete a.push),a.rules)for(var T in a.rules)o[T]?o[T].push&&o[T].push.apply(o[T],a.rules[T]):o[T]=a.rules[T];var $=typeof a=="string"?a:a.include;if($&&($==="$self"&&($="start"),Array.isArray($)?m=$.map(function(k){return o[k]}):m=o[$]),m){var S=[i,1].concat(m);a.noEscape&&(S=S.filter(function(k){return!k.next})),h.splice.apply(h,S),i--}a.keywordMap&&(a.token=this.createKeywordMapper(a.keywordMap,a.defaultToken||"text",a.caseInsensitive),delete a.defaultToken)}}Object.keys(o).forEach(c,this)},this.createKeywordMapper=function(g,o,c,f){var h=Object.create(null);return this.$keywordList=[],Object.keys(g).forEach(function(i){for(var a=g[i],m=a.split(f||"|"),w=m.length;w--;){var x=m[w];this.$keywordList.push(x),c&&(x=x.toLowerCase()),h[x]=i}},this),g=null,c?function(i){return h[i.toLowerCase()]||o}:function(i){return h[i]||o}},this.getKeywords=function(){return this.$keywords}}).call(u.prototype),r.TextHighlightRules=u}),ace.define("ace/mode/behaviour",["require","exports","module"],function(t,r,l){var d;d=function(){this.$behaviours={}},(function(){this.add=function(u,b,p){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[u]:this.$behaviours[u]={}}this.$behaviours[u][b]=p},this.addBehaviours=function(u){for(var b in u)for(var p in u[b])this.add(b,p,u[b][p])},this.remove=function(u){this.$behaviours&&this.$behaviours[u]&&delete this.$behaviours[u]},this.inherit=function(u,b){if(typeof u=="function")var p=new u().getBehaviours(b);else var p=u.getBehaviours(b);this.addBehaviours(p)},this.getBehaviours=function(u){if(u){for(var b={},p=0;p<u.length;p++)this.$behaviours[u[p]]&&(b[u[p]]=this.$behaviours[u[p]]);return b}else return this.$behaviours}}).call(d.prototype),r.Behaviour=d}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(t,r,l){var d=t("./range").Range,u=function(){function b(p,g,o){this.$session=p,this.$row=g,this.$rowTokens=p.getTokens(g);var c=p.getTokenAt(g,o);this.$tokenIndex=c?c.index:-1}return b.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]},b.prototype.stepForward=function(){this.$tokenIndex+=1;for(var p;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,p||(p=this.$session.getLength()),this.$row>=p)return this.$row=p-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var p=this.$rowTokens,g=this.$tokenIndex,o=p[g].start;if(o!==void 0)return o;for(o=0;g>0;)g-=1,o+=p[g].value.length;return o},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var p=this.$rowTokens[this.$tokenIndex],g=this.getCurrentTokenColumn();return new d(this.$row,g,this.$row,g+p.value.length)},b}();r.TokenIterator=u}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,r,l){var d=t("../../lib/oop"),u=t("../behaviour").Behaviour,b=t("../../token_iterator").TokenIterator,p=t("../../lib/lang"),g=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],c,f={},h={'"':'"',"'":"'"},i=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,f.rangeCount!=w.multiSelect.rangeCount&&(f={rangeCount:w.multiSelect.rangeCount})),f[x])return c=f[x];c=f[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},a=function(w,x,T,$){var S=w.end.row-w.start.row;return{text:T+x+$,selection:[0,w.start.column+1,S,w.end.column+(S?0:1)]}},m;m=function(w){w=w||{},this.add("braces","insertion",function(x,T,$,S,k){var L=$.getCursorPosition(),N=S.doc.getLine(L.row);if(k=="{"){i($);var R=$.getSelectionRange(),O=S.doc.getTextRange(R),W=S.getTokenAt(L.row,L.column);if(O!==""&&O!=="{"&&$.getWrapBehavioursEnabled())return a(R,O,"{","}");if(W&&/(?:string)\.quasi|\.xml/.test(W.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(W.type)})||/(string)\.quasi/.test(W.type)&&W.value[L.column-W.start-1]!=="$"?void 0:(m.recordAutoInsert($,S,"}"),{text:"{}",selection:[1,1]})}else if(m.isSaneInsertion($,S))return/[\]\}\)]/.test(N[L.column])||$.inMultiSelectMode||w.braces?(m.recordAutoInsert($,S,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert($,S,"{"),{text:"{",selection:[1,1]})}else if(k=="}"){i($);var D=N.substring(L.column,L.column+1);if(D=="}"){var A=S.$findOpeningBracket("}",{column:L.column+1,row:L.row});if(A!==null&&m.isAutoInsertedClosing(L,N,k))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(k==`
186
186
  `||k==`\r
187
187
  `){i($);var _="";m.isMaybeInsertedClosing(L,N)&&(_=p.stringRepeat("}",c.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var D=N.substring(L.column,L.column+1);if(D==="}"){var I=S.findMatchingBracket({row:L.row,column:L.column+1},"}");if(!I)return null;var j=this.$getIndent(S.getLine(I.row))}else if(_)var j=this.$getIndent(N);else{m.clearMaybeInsertedClosing();return}var U=j+S.getTabString();return{text:`
@@ -988,7 +988,7 @@ System.register(["./main-2d24b5c8b84fa9a15ff1.js","vue","single-spa"],function(B
988
988
  border-left-color: transparent!important;
989
989
  top: -5px;
990
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(t,r,l){t("./loader_build")(r);var d=t("./lib/dom"),u=t("./range").Range,b=t("./editor").Editor,p=t("./edit_session").EditSession,g=t("./undomanager").UndoManager,o=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(f,h){if(typeof f=="string"){var i=f;if(f=document.getElementById(i),!f)throw new Error("ace.edit can't find div #"+i)}if(f&&f.env&&f.env.editor instanceof b)return f.env.editor;var a="";if(f&&/input|textarea/i.test(f.tagName)){var m=f;a=m.value,f=d.createElement("pre"),m.parentNode.replaceChild(f,m)}else f&&(a=f.textContent,f.innerHTML="");var w=r.createEditSession(a),x=new b(new o(f),w,h),T={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(T.textarea=m),x.on("destroy",function(){T.editor.container.env=null}),x.container.env=x.env=T,x},r.createEditSession=function(f,h){var i=new p(f,h);return i.setUndoManager(new g),i},r.Range=u,r.Editor=b,r.EditSession=p,r.UndoManager=g,r.VirtualRenderer=o;var c=r.config.version;r.version=c}),function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var l in t)t.hasOwnProperty(l)&&(r.ace[l]=t[l]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}($g)),$g.exports}var Nr=ES(),Eg={exports:{}},Tg;function TS(){return Tg||(Tg=1,function(n,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var p=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},c=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},f=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},h=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},a=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",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",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":T,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),k=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:k},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:k},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},a,{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\\?(?:"+k+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},f,h,b,p,i,g,o,c,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,R,O){var W=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",P=N.split(this.splitRegex);return O.push(W,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,R,O){return N===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,R,O){return N===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,R,O){return this.next="",N=="}"&&O.length>1&&O[1]!="start"&&(O.shift(),this.next=O.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"string"}},{token:"constant.language.escape",regex:k},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:k},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,R,O){return O.length&&N[0]===L[O[0]]?(O.shift(),this.next=O.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,u),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,l){var d=t("../range").Range,u=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),o=g.match(/^(\s*\})/);if(!o)return 0;var c=o[1].length,f=b.findMatchingBracket({row:p,column:c});if(!f||f.row==p)return 0;var h=this.$getIndent(b.getLine(f.row));b.replace(new d(p,0,p,c-1),h)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(u.prototype),r.MatchingBraceOutdent=u}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,l){var d=t("../../lib/oop"),u=t("./fold_mode").FoldMode,b=t("../../range").Range,p=t("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,u),(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(o,c,f){var h=o.getLine(f),i=this.foldingStartMarker.test(h),a=this.foldingStopMarker.test(h);if(i&&!a){var m=h.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(h)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(h)===!1)||m[1]=="when"&&/\sthen\s/.test(h)===!0)return;if(o.getTokenAt(f,m.index+2).type==="keyword")return"start"}else if(!m[3]||o.getTokenAt(f,m.index+1).type==="comment.multiline")return"start"}if(c!="markbeginend"||!a||i&&a)return"";var m=h.match(this.foldingStopMarker);if(m[3]==="end"){if(o.getTokenAt(f,m.index+1).type==="keyword")return"end"}else if(!m[1]||o.getTokenAt(f,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,c,f){var h=o.doc.getLine(f),i=this.foldingStartMarker.exec(h);if(i)return i[1]||i[3]?this.rubyBlock(o,f,i.index+2):this.openingBracketBlock(o,"{",f,i.index);var i=this.foldingStopMarker.exec(h);if(i)return i[3]==="end"&&o.getTokenAt(f,i.index+1).type==="keyword"?this.rubyBlock(o,f,i.index+1):i[1]==="=end"&&o.getTokenAt(f,i.index+1).type==="comment.multiline"?this.rubyBlock(o,f,i.index+1):this.closingBracketBlock(o,"}",f,i.index+i[0].length)},this.rubyBlock=function(o,c,f,h){var i=new p(o,c,f),a=i.getCurrentToken();if(!(!a||a.type!="keyword"&&a.type!="comment.multiline")){var m=a.value,w=o.getLine(c);switch(a.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+a.value);if(!x.test(w))return;var T=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var T=1;break;case"else":var x=new RegExp("^\\s*"+a.value+"\\s*$");if(!x.test(w))return;var T=1;break;default:var T=this.indentKeywords[m]}var $=[m];if(T){var S=T===-1?o.getLine(c-1).length:o.getLine(c).length,k=c,L=[];if(L.push(i.getCurrentTokenRange()),i.step=T===-1?i.stepBackward:i.stepForward,a.type=="comment.multiline"){for(;a=i.step();)if(a.type==="comment.multiline"){if(T==1){if(S=6,a.value=="=end")break}else if(a.value=="=begin")break}}else for(;a=i.step();){var N=!1;if(a.type==="keyword"){var R=T*this.indentKeywords[a.value];switch(w=o.getLine(i.getCurrentTokenRow()),a.value){case"do":for(var O=i.$tokenIndex-1;O>=0;O--){var W=i.$rowTokens[O];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){R=0;break}}break;case"else":var x=new RegExp("^\\s*"+a.value+"\\s*$");(!x.test(w)||m=="case")&&(R=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+a.value);x.test(w)||(R=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(R=0,N=!0)}if(R>0)$.unshift(a.value);else if(R<=0&&N===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&a.value!="do"||a.value=="do"&&T==-1&&R!=0||a.value!="do"))break;R===0&&$.unshift(a.value)}}}if(!a)return null;if(h)return L.push(i.getCurrentTokenRange()),L;var c=i.getCurrentTokenRow();if(T===-1){if(a.type==="comment.multiline")var P=6;else var P=o.getLine(c).length;return new b(c,P,k-1,S)}return new b(k,S,c-1,o.getLine(c-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(t,r,l){var d=t("../lib/oop"),u=t("./text").Mode,b=t("./ruby_highlight_rules").RubyHighlightRules,p=t("./matching_brace_outdent").MatchingBraceOutdent,g=t("../range").Range,o=t("./folding/ruby").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(c,u),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(f,h,i){var a=this.$getIndent(h),m=this.getTokenizer().getLineTokens(h,f),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return a;if(f=="start"){var x=h.match(/^.*[\{\(\[]\s*$/),T=h.match(/^\s*(class|def|module)\s.*$/),$=h.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=h.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||T||$||S)&&(a+=i)}return a},this.checkOutdent=function(f,h,i){return/^\s+(end|else|rescue|ensure)$/.test(h+i)||this.$outdent.checkOutdent(h,i)},this.autoOutdent=function(f,h,i){var a=h.getLine(i);if(/}/.test(a))return this.$outdent.autoOutdent(h,i);var m=this.$getIndent(a),w=h.getLine(i-1),x=this.$getIndent(w),T=h.getTabString();x.length<=m.length&&m.slice(-T.length)==T&&h.remove(new g(i,m.length-T.length,i,m.length))},this.getMatching=function(f,h,i){if(h==null){var a=f.selection.lead;i=a.column,h=a.row}var m=f.getTokenAt(h,i);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(f,h,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/ruby"],function(t){n&&(n.exports=t)})}()}(Eg)),Eg.exports}TS();var Mg={exports:{}},Rg;function MS(){return Rg||(Rg=1,function(n,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=function(){var p="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",o="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",c=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":o,"variable.language":"self|cls","constant.language":g,keyword:p},"identifier"),f="[uU]?",h="[rR]",i="[fF]",a="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",T="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+T+")",S="(?:[eE][+-]?\\d+)",k="(?:\\.\\d+)",L="(?:\\d+)",N="(?:(?:"+L+"?"+k+")|(?:"+L+"\\.))",R="(?:(?:"+N+"|"+L+")"+S+")",O="(?:"+R+"|"+N+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}',next:"qqstring3"},{token:"string",regex:f+'"(?=.)',next:"qqstring"},{token:"string",regex:f+"'{3}",next:"qstring3"},{token:"string",regex:f+"'(?=.)",next:"qstring"},{token:"string",regex:h+'"{3}',next:"rawqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rawqqstring"},{token:"string",regex:h+"'{3}",next:"rawqstring3"},{token:"string",regex:h+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:a+'"{3}',next:"rfqqstring3"},{token:"string",regex:a+'"(?=.)',next:"rfqqstring"},{token:"string",regex:a+"'{3}",next:"rfqstring3"},{token:"string",regex:a+"'(?=.)",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:"(?:"+O+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:O},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:c,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(b,u),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,l){var d=t("../../lib/oop"),u=t("./fold_mode").FoldMode,b=r.FoldMode=function(p){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+p+")(?:\\s*)(?:#.*)?$")};d.inherits(b,u),(function(){this.getFoldWidgetRange=function(p,g,o){var c=p.getLine(o),f=c.match(this.foldingStartMarker);if(f)return f[1]?this.openingBracketBlock(p,f[1],o,f.index):f[2]?this.indentationBlock(p,o,f.index+f[2].length):this.indentationBlock(p,o)}}).call(b.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(t,r,l){var d=t("../lib/oop"),u=t("./text").Mode,b=t("./python_highlight_rules").PythonHighlightRules,p=t("./folding/pythonic").FoldMode,g=t("../range").Range,o=function(){this.HighlightRules=b,this.foldingRules=new p("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(o,u),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(f,h,i){var a=this.$getIndent(h),m=this.getTokenizer().getLineTokens(h,f),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return a;if(f=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(a+=i)}return a};var c={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(f,h,i){if(i!==`\r
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(t,r,l){t("./loader_build")(r);var d=t("./lib/dom"),u=t("./range").Range,b=t("./editor").Editor,p=t("./edit_session").EditSession,g=t("./undomanager").UndoManager,o=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),r.config=t("./config"),r.edit=function(f,h){if(typeof f=="string"){var i=f;if(f=document.getElementById(i),!f)throw new Error("ace.edit can't find div #"+i)}if(f&&f.env&&f.env.editor instanceof b)return f.env.editor;var a="";if(f&&/input|textarea/i.test(f.tagName)){var m=f;a=m.value,f=d.createElement("pre"),m.parentNode.replaceChild(f,m)}else f&&(a=f.textContent,f.innerHTML="");var w=r.createEditSession(a),x=new b(new o(f),w,h),T={document:w,editor:x,onResize:x.resize.bind(x,null)};return m&&(T.textarea=m),x.on("destroy",function(){T.editor.container.env=null}),x.container.env=x.env=T,x},r.createEditSession=function(f,h){var i=new p(f,h);return i.setUndoManager(new g),i},r.Range=u,r.Editor=b,r.EditSession=p,r.UndoManager=g,r.VirtualRenderer=o;var c=r.config.version;r.version=c}),function(){ace.require(["ace/ace"],function(t){t&&(t.config.init(!0),t.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=t);for(var l in t)t.hasOwnProperty(l)&&(r.ace[l]=t[l]);r.ace.default=r.ace,n&&(n.exports=r.ace)})}()}($g)),$g.exports}var Nr=Si("b",ES()),Eg={exports:{}},Tg;function TS(){return Tg||(Tg=1,function(n,e){ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=r.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};r.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},r.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},r.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var p=r.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},g=r.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},o=r.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},c=r.constantNumericOctal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},f=r.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},h=r.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},i=r.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},a=r.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},m=function(){var w="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",x="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",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",$="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",S=this.$keywords=this.createKeywordMapper({keyword:x,"constant.language":T,"variable.language":$,"support.function":w,"invalid.deprecated":"debugger"},"identifier"),k=`\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})`,L={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:k},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:k},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(N,R,O){O.length&&(O=[]);var W=N[N.length-1];return O.unshift(W,R),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},a,{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\\?(?:"+k+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},f,h,b,p,i,g,o,c,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:S,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(N,R,O){var W=N[2]=="-"||N[2]=="~"?"indentedHeredoc":"heredoc",P=N.split(this.splitRegex);return O.push(W,P[3]),[{type:"constant",value:P[1]},{type:"string",value:P[2]},{type:"support.class",value:P[3]},{type:"string",value:P[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(N,R,O){return N===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(N,R,O){return N===O[1]?(O.shift(),O.shift(),this.next=O[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(N,R){return R[0]==="heredoc"||R[0]==="indentedHeredoc"?R[0]:N}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(N,R,O){return this.next="",N=="}"&&O.length>1&&O[1]!="start"&&(O.shift(),this.next=O.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"string"}},{token:"constant.language.escape",regex:k},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:k},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(N,R,O){return O.length&&N===L[O[0]]?(O.shift(),this.next=O.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(N,R,O){return O.length&&N===O[0]?(O.unshift(N,R),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(N,R,O){return O.length&&N[0]===L[O[0]]?(O.shift(),this.next=O.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,u),r.RubyHighlightRules=m}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,l){var d=t("../range").Range,u=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),o=g.match(/^(\s*\})/);if(!o)return 0;var c=o[1].length,f=b.findMatchingBracket({row:p,column:c});if(!f||f.row==p)return 0;var h=this.$getIndent(b.getLine(f.row));b.replace(new d(p,0,p,c-1),h)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(u.prototype),r.MatchingBraceOutdent=u}),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(t,r,l){var d=t("../../lib/oop"),u=t("./fold_mode").FoldMode,b=t("../../range").Range,p=t("../../token_iterator").TokenIterator,g=r.FoldMode=function(){};d.inherits(g,u),(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(o,c,f){var h=o.getLine(f),i=this.foldingStartMarker.test(h),a=this.foldingStopMarker.test(h);if(i&&!a){var m=h.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(h)===!1||/^\s*(?:if|else|while|until|unless)\s*/.test(h)===!1)||m[1]=="when"&&/\sthen\s/.test(h)===!0)return;if(o.getTokenAt(f,m.index+2).type==="keyword")return"start"}else if(!m[3]||o.getTokenAt(f,m.index+1).type==="comment.multiline")return"start"}if(c!="markbeginend"||!a||i&&a)return"";var m=h.match(this.foldingStopMarker);if(m[3]==="end"){if(o.getTokenAt(f,m.index+1).type==="keyword")return"end"}else if(!m[1]||o.getTokenAt(f,m.index+1).type==="comment.multiline")return"end"},this.getFoldWidgetRange=function(o,c,f){var h=o.doc.getLine(f),i=this.foldingStartMarker.exec(h);if(i)return i[1]||i[3]?this.rubyBlock(o,f,i.index+2):this.openingBracketBlock(o,"{",f,i.index);var i=this.foldingStopMarker.exec(h);if(i)return i[3]==="end"&&o.getTokenAt(f,i.index+1).type==="keyword"?this.rubyBlock(o,f,i.index+1):i[1]==="=end"&&o.getTokenAt(f,i.index+1).type==="comment.multiline"?this.rubyBlock(o,f,i.index+1):this.closingBracketBlock(o,"}",f,i.index+i[0].length)},this.rubyBlock=function(o,c,f,h){var i=new p(o,c,f),a=i.getCurrentToken();if(!(!a||a.type!="keyword"&&a.type!="comment.multiline")){var m=a.value,w=o.getLine(c);switch(a.value){case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+a.value);if(!x.test(w))return;var T=this.indentKeywords[m];break;case"when":if(/\sthen\s/.test(w))return;case"elsif":case"rescue":case"ensure":var T=1;break;case"else":var x=new RegExp("^\\s*"+a.value+"\\s*$");if(!x.test(w))return;var T=1;break;default:var T=this.indentKeywords[m]}var $=[m];if(T){var S=T===-1?o.getLine(c-1).length:o.getLine(c).length,k=c,L=[];if(L.push(i.getCurrentTokenRange()),i.step=T===-1?i.stepBackward:i.stepForward,a.type=="comment.multiline"){for(;a=i.step();)if(a.type==="comment.multiline"){if(T==1){if(S=6,a.value=="=end")break}else if(a.value=="=begin")break}}else for(;a=i.step();){var N=!1;if(a.type==="keyword"){var R=T*this.indentKeywords[a.value];switch(w=o.getLine(i.getCurrentTokenRow()),a.value){case"do":for(var O=i.$tokenIndex-1;O>=0;O--){var W=i.$rowTokens[O];if(W&&(W.value=="while"||W.value=="until"||W.value=="for")){R=0;break}}break;case"else":var x=new RegExp("^\\s*"+a.value+"\\s*$");(!x.test(w)||m=="case")&&(R=0,N=!0);break;case"if":case"unless":case"while":case"until":var x=new RegExp("^\\s*"+a.value);x.test(w)||(R=0,N=!0);break;case"when":(/\sthen\s/.test(w)||m=="case")&&(R=0,N=!0)}if(R>0)$.unshift(a.value);else if(R<=0&&N===!1){if($.shift(),!$.length&&((m=="while"||m=="until"||m=="for")&&a.value!="do"||a.value=="do"&&T==-1&&R!=0||a.value!="do"))break;R===0&&$.unshift(a.value)}}}if(!a)return null;if(h)return L.push(i.getCurrentTokenRange()),L;var c=i.getCurrentTokenRow();if(T===-1){if(a.type==="comment.multiline")var P=6;else var P=o.getLine(c).length;return new b(c,P,k-1,S)}return new b(k,S,c-1,o.getLine(c-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(t,r,l){var d=t("../lib/oop"),u=t("./text").Mode,b=t("./ruby_highlight_rules").RubyHighlightRules,p=t("./matching_brace_outdent").MatchingBraceOutdent,g=t("../range").Range,o=t("./folding/ruby").FoldMode,c=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new o,this.indentKeywords=this.foldingRules.indentKeywords};d.inherits(c,u),(function(){this.lineCommentStart="#",this.getNextLineIndent=function(f,h,i){var a=this.$getIndent(h),m=this.getTokenizer().getLineTokens(h,f),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return a;if(f=="start"){var x=h.match(/^.*[\{\(\[]\s*$/),T=h.match(/^\s*(class|def|module)\s.*$/),$=h.match(/.*do(\s*|\s+\|.*\|\s*)$/),S=h.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(x||T||$||S)&&(a+=i)}return a},this.checkOutdent=function(f,h,i){return/^\s+(end|else|rescue|ensure)$/.test(h+i)||this.$outdent.checkOutdent(h,i)},this.autoOutdent=function(f,h,i){var a=h.getLine(i);if(/}/.test(a))return this.$outdent.autoOutdent(h,i);var m=this.$getIndent(a),w=h.getLine(i-1),x=this.$getIndent(w),T=h.getTabString();x.length<=m.length&&m.slice(-T.length)==T&&h.remove(new g(i,m.length-T.length,i,m.length))},this.getMatching=function(f,h,i){if(h==null){var a=f.selection.lead;i=a.column,h=a.row}var m=f.getTokenAt(h,i);if(m&&m.value in this.indentKeywords)return this.foldingRules.rubyBlock(f,h,i,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/ruby"],function(t){n&&(n.exports=t)})}()}(Eg)),Eg.exports}TS();var Mg={exports:{}},Rg;function MS(){return Rg||(Rg=1,function(n,e){ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=function(){var p="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield|async|await|nonlocal",g="True|False|None|NotImplemented|Ellipsis|__debug__",o="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",c=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":o,"variable.language":"self|cls","constant.language":g,keyword:p},"identifier"),f="[uU]?",h="[rR]",i="[fF]",a="(?:[rR][fF]|[fF][rR])",m="(?:(?:[1-9]\\d*)|(?:0))",w="(?:0[oO]?[0-7]+)",x="(?:0[xX][\\dA-Fa-f]+)",T="(?:0[bB][01]+)",$="(?:"+m+"|"+w+"|"+x+"|"+T+")",S="(?:[eE][+-]?\\d+)",k="(?:\\.\\d+)",L="(?:\\d+)",N="(?:(?:"+L+"?"+k+")|(?:"+L+"\\.))",R="(?:(?:"+N+"|"+L+")"+S+")",O="(?:"+R+"|"+N+")",W=`\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})`;this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}',next:"qqstring3"},{token:"string",regex:f+'"(?=.)',next:"qqstring"},{token:"string",regex:f+"'{3}",next:"qstring3"},{token:"string",regex:f+"'(?=.)",next:"qstring"},{token:"string",regex:h+'"{3}',next:"rawqqstring3"},{token:"string",regex:h+'"(?=.)',next:"rawqqstring"},{token:"string",regex:h+"'{3}",next:"rawqstring3"},{token:"string",regex:h+"'(?=.)",next:"rawqstring"},{token:"string",regex:i+'"{3}',next:"fqqstring3"},{token:"string",regex:i+'"(?=.)',next:"fqqstring"},{token:"string",regex:i+"'{3}",next:"fqstring3"},{token:"string",regex:i+"'(?=.)",next:"fqstring"},{token:"string",regex:a+'"{3}',next:"rfqqstring3"},{token:"string",regex:a+'"(?=.)',next:"rfqqstring"},{token:"string",regex:a+"'{3}",next:"rfqstring3"},{token:"string",regex:a+"'(?=.)",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:"(?:"+O+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:O},{token:"constant.numeric",regex:$+"[lL]\\b"},{token:"constant.numeric",regex:$+"\\b"},{token:["punctuation","function.support"],regex:"(\\.)([a-zA-Z_]+)\\b"},{token:c,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}]},this.normalizeRules()};d.inherits(b,u),r.PythonHighlightRules=b}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(t,r,l){var d=t("../../lib/oop"),u=t("./fold_mode").FoldMode,b=r.FoldMode=function(p){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+p+")(?:\\s*)(?:#.*)?$")};d.inherits(b,u),(function(){this.getFoldWidgetRange=function(p,g,o){var c=p.getLine(o),f=c.match(this.foldingStartMarker);if(f)return f[1]?this.openingBracketBlock(p,f[1],o,f.index):f[2]?this.indentationBlock(p,o,f.index+f[2].length):this.indentationBlock(p,o)}}).call(b.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(t,r,l){var d=t("../lib/oop"),u=t("./text").Mode,b=t("./python_highlight_rules").PythonHighlightRules,p=t("./folding/pythonic").FoldMode,g=t("../range").Range,o=function(){this.HighlightRules=b,this.foldingRules=new p("\\:"),this.$behaviour=this.$defaultBehaviour};d.inherits(o,u),(function(){this.lineCommentStart="#",this.$pairQuotesAfter={"'":/[ruf]/i,'"':/[ruf]/i},this.getNextLineIndent=function(f,h,i){var a=this.$getIndent(h),m=this.getTokenizer().getLineTokens(h,f),w=m.tokens;if(w.length&&w[w.length-1].type=="comment")return a;if(f=="start"){var x=h.match(/^.*[\{\(\[:]\s*$/);x&&(a+=i)}return a};var c={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(f,h,i){if(i!==`\r
992
992
  `&&i!=="\r"&&i!==`
993
993
  `)return!1;var a=this.getTokenizer().getLineTokens(h.trim(),f).tokens;if(!a)return!1;do var m=a.pop();while(m&&(m.type=="comment"||m.type=="text"&&m.value.match(/^\s+$/)));return m?m.type=="keyword"&&c[m.value]:!1},this.autoOutdent=function(f,h,i){i+=1;var a=this.$getIndent(h.getLine(i)),m=h.getTabString();a.slice(-m.length)==m&&h.remove(new g(i,a.length-m.length,i,a.length))},this.$id="ace/mode/python",this.snippetFileId="ace/snippets/python"}).call(o.prototype),r.Mode=o}),function(){ace.require(["ace/mode/python"],function(t){n&&(n.exports=t)})}()}(Mg)),Mg.exports}MS();var Lg={exports:{}},Og;function RS(){return Og||(Og=1,function(n,e){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=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(b,u),r.JsonHighlightRules=b}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,l){var d=t("../range").Range,u=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),o=g.match(/^(\s*\})/);if(!o)return 0;var c=o[1].length,f=b.findMatchingBracket({row:p,column:c});if(!f||f.row==p)return 0;var h=this.$getIndent(b.getLine(f.row));b.replace(new d(p,0,p,c-1),h)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(u.prototype),r.MatchingBraceOutdent=u}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(t,r,l){var d=t("../../lib/oop"),u=t("../../range").Range,b=t("./fold_mode").FoldMode,p=r.FoldMode=function(g){g&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+g.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+g.end)))};d.inherits(p,b),(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,o,c){var f=g.getLine(c);if(this.singleLineBlockCommentRe.test(f)&&!this.startRegionRe.test(f)&&!this.tripleStarBlockCommentRe.test(f))return"";var h=this._getFoldWidgetBase(g,o,c);return!h&&this.startRegionRe.test(f)?"start":h},this.getFoldWidgetRange=function(g,o,c,f){var h=g.getLine(c);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(g,h,c);var i=h.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(g,i[1],c,a);var m=g.getCommentFoldRange(c,a+i[0].length,1);return m&&!m.isMultiLine()&&(f?m=this.getSectionRange(g,c):o!="all"&&(m=null)),m}if(o!=="markbegin"){var i=h.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(g,i[1],c,a):g.getCommentFoldRange(c,a,-1)}}},this.getSectionRange=function(g,o){var c=g.getLine(o),f=c.search(/\S/),h=o,i=c.length;o+=1;for(var a=o,m=g.getLength();++o<m;){c=g.getLine(o);var w=c.search(/\S/);if(w!==-1){if(f>w)break;var x=this.getFoldWidgetRange(g,"all",o);if(x){if(x.start.row<=h)break;if(x.isMultiLine())o=x.end.row;else if(f==w)break}a=o}}return new u(h,i,a,g.getLine(a).length)},this.getCommentRegionBlock=function(g,o,c){for(var f=o.search(/\s*$/),h=g.getLength(),i=c,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,m=1;++c<h;){o=g.getLine(c);var w=a.exec(o);if(w&&(w[1]?m--:m++,!m))break}var x=c;if(x>i)return new u(i,f,x,o.length)}}).call(p.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(t,r,l){var d=t("../lib/oop"),u=t("./text").Mode,b=t("./json_highlight_rules").JsonHighlightRules,p=t("./matching_brace_outdent").MatchingBraceOutdent,g=t("./folding/cstyle").FoldMode,o=t("../worker/worker_client").WorkerClient,c=function(){this.HighlightRules=b,this.$outdent=new p,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new g};d.inherits(c,u),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,h,i){var a=this.$getIndent(h);if(f=="start"){var m=h.match(/^.*[\{\(\[]\s*$/);m&&(a+=i)}return a},this.checkOutdent=function(f,h,i){return this.$outdent.checkOutdent(h,i)},this.autoOutdent=function(f,h,i){this.$outdent.autoOutdent(h,i)},this.createWorker=function(f){var h=new o(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(f.getDocument()),h.on("annotate",function(i){f.setAnnotations(i.data)}),h.on("terminate",function(){f.clearAnnotations()}),h},this.$id="ace/mode/json"}).call(c.prototype),r.Mode=c}),function(){ace.require(["ace/mode/json"],function(t){n&&(n.exports=t)})}()}(Lg)),Lg.exports}RS();var Ig={exports:{}},Ng;function LS(){return Ng||(Ng=1,function(n,e){ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop");t("../lib/lang");var u=t("./text_highlight_rules").TextHighlightRules,b=r.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",p=r.supportFunction="rgb|rgba|url|attr|counter|counters",g=r.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",o=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",c=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",f=r.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=r.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i=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",a=function(){var m=this.createKeywordMapper({"support.function":p,"support.constant":g,"support.type":b,"support.constant.color":o,"support.constant.fonts":c},"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:f},{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:"("+f+")(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:f},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{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(a,u),r.CssHighlightRules=a}),ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=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|$)"},b.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}],"doc-syntax":[{token:"operator.doc",regex:/[|:]/},{token:"paren.doc",regex:/[\[\]]/}]},this.normalizeRules()};d.inherits(b,u),b.getTagRule=function(p){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},b.getStartRule=function(p){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:p}},b.getEndRule=function(p){return{token:"comment.doc",regex:"\\*\\/",next:p}},r.JsDocCommentHighlightRules=b}),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(t,r,l){function d(){var f=o.replace("\\d","\\d\\-"),h={onMatch:function(a,m,w){var x=a.charAt(1)=="/"?2:1;return x==1?(m!=this.nextState?w.unshift(this.next,this.nextState,0):w.unshift(this.next),w[2]++):x==2&&m==this.nextState&&(w[1]--,(!w[1]||w[1]<0)&&(w.shift(),w.shift())),[{type:"meta.tag.punctuation."+(x==1?"":"end-")+"tag-open.xml",value:a.slice(0,x)},{type:"meta.tag.tag-name.xml",value:a.substr(x)}]},regex:"</?(?:"+f+"|(?=>))",next:"jsxAttributes",nextState:"jsx"};this.$rules.start.unshift(h);var i={regex:"{",token:"paren.quasi.start",push:"start"};this.$rules.jsx=[i,h,{include:"reference"},{defaultToken:"string.xml"}],this.$rules.jsxAttributes=[{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",onMatch:function(a,m,w){return m==w[0]&&w.shift(),a.length==2&&(w[0]==this.nextState&&w[1]--,(!w[1]||w[1]<0)&&w.splice(0,2)),this.next=w[0]||"start",[{type:this.token,value:a}]},nextState:"jsx"},i,u("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:f},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},h],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function u(f){return[{token:"comment",regex:/\/\*/,next:[p.getTagRule(),{token:"comment",regex:"\\*\\/",next:f||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[p.getTagRule(),{token:"comment",regex:"$|^",next:f||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var b=t("../lib/oop"),p=t("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules,g=t("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",c=function(f){var h={"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},i=this.createKeywordMapper(h,"identifier"),a="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",m="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)",w="(function)(\\s*)(\\*?)",x={token:["identifier","text","paren.lparen"],regex:"(\\b(?!"+Object.values(h).join("|")+"\\b)"+o+")(\\s*)(\\()"};this.$rules={no_regex:[p.getStartRule("doc-start"),u("no_regex"),x,{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)"+w+"(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+a+")\\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:i,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:"keyword.operator",regex:/=/},{token:["storage.type","text","storage.type","text","paren.lparen"],regex:w+"(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","storage.type","text","text","entity.name.function","text","paren.lparen"],regex:"(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:"prototype"},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[p.getStartRule("doc-start"),u("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:[u("function_arguments"),{token:"variable.parameter",regex:o},{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"}]},(!f||!f.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(T,$,S){if(this.next=T=="{"?this.nextState:"",T=="{"&&S.length)S.unshift("start",$);else if(T=="}"&&S.length&&(S.shift(),this.next=S.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:"("+o+")(\\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"}),(!f||f.jsx!=0)&&d.call(this)),this.embedRules(p,"doc-",[p.getEndRule("no_regex")]),this.normalizeRules()};b.inherits(c,g),r.JavaScriptHighlightRules=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,r,l){var d=t("../lib/oop"),u=t("./text_highlight_rules").TextHighlightRules,b=function(p){var g="[_:a-zA-ZÀ-￿][-_:.a-zA-Z0-9À-￿]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+g+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"</"},{token:"text.tag-open.xml",regex:"<"},{include:"reference"},{defaultToken:"text.xml"}],processing_instruction:[{token:"entity.other.attribute-name.decl-attribute-name.xml",regex:g},{token:"keyword.operator.decl-attribute-equals.xml",regex:"="},{include:"whitespace"},{include:"string"},{token:"punctuation.xml-decl.xml",regex:"\\?>",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+g+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(</))((?:"+g+":)?"+g+")",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:g},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===b&&this.normalizeRules()};(function(){this.embedTagRules=function(p,g,o){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(<)("+o+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:g+"start"}]}),this.$rules[o+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(c,f,h){return h.splice(0),this.token}}],this.embedRules(p,g,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+o+".tag-name.xml"],regex:"(</)("+o+"(?=\\s|>|$))",next:o+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(u.prototype),d.inherits(b,u),r.XmlHighlightRules=b}),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(t,r,l){var d=t("../lib/oop"),u=t("../lib/lang"),b=t("./css_highlight_rules").CssHighlightRules,p=t("./javascript_highlight_rules").JavaScriptHighlightRules,g=t("./xml_highlight_rules").XmlHighlightRules,o=u.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"}),c=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(f,h){var i=o[h];return["meta.tag.punctuation."+(f=="<"?"":"end-")+"tag-open.xml","meta.tag"+(i?"."+i:"")+".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(b,"css-","style"),this.embedTagRules(new p({jsx:!1}).getRules(),"js-","script"),this.constructor===c&&this.normalizeRules()};d.inherits(c,g),r.HtmlHighlightRules=c}),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(t,r,l){var d=t("../config").$modes,u=t("../lib/oop"),b=t("../lib/lang"),p=t("./text_highlight_rules").TextHighlightRules,g=t("./html_highlight_rules").HtmlHighlightRules,o=function(f){return"(?:[^"+b.escapeRegExp(f)+"\\\\]|\\\\.)*"},c=function(){g.call(this);var f={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(i,a,m,w){var x=i.match(/^(\s*)([`~]+)(.*)/),T=/[\w-]+|$/.exec(x[3])[0];return d[T]||(T=""),m.unshift("githubblock",[],[x[1],x[2],T],a),this.token},next:"githubblock"},h=[{token:"support.function",regex:".*",onMatch:function(i,a,m,w){var x=m[1],T=m[2][0],$=m[2][1],S=m[2][2],k=/^(\s*)(`+|~+)\s*$/.exec(i);if(k&&k[1].length<T.length+3&&k[2].length>=$.length&&k[2][0]==$[0])return m.splice(0,3),this.next=m.shift(),this.token;if(this.next="",S&&d[S]){var L=d[S].getTokenizer().getLineTokens(i,x.slice(0));return m[1]=L.state,L.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(i){return"markup.heading."+i.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},f,{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:"(\\[)("+o("]")+")(\\]\\s*\\[)("+o("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+o("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+o('"')+'"\\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},f,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:h}),this.normalizeRules()};u.inherits(c,p),r.MarkdownHighlightRules=c}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(t,r,l){var d=t("../../lib/oop"),u=t("./fold_mode").FoldMode,b=t("../../range").Range,p=r.FoldMode=function(){};d.inherits(p,u),(function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(g,o,c){var f=g.getLine(c);return this.foldingStartMarker.test(f)?f[0]=="`"&&g.bgTokenizer.getState(c)=="start"?"end":"start":""},this.getFoldWidgetRange=function(g,o,c){function f(N){return T=g.getTokens(N)[0],T&&T.type.lastIndexOf($,0)===0}function h(){var N=T.value[0];return N=="="?6:N=="-"?5:7-T.value.search(/[^#]|$/)}var i=g.getLine(c),a=i.length,m=g.getLength(),w=c,x=c;if(i.match(this.foldingStartMarker)){if(i[0]=="`"){if(g.bgTokenizer.getState(c)!=="start"){for(;++c<m&&(i=g.getLine(c),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(w,a,c,0)}for(;c-- >0&&(i=g.getLine(c),!(i[0]=="`"&i.substring(0,3)=="```")););return new b(c,i.length,w,0)}var T,$="markup.heading";if(f(c)){for(var S=h();++c<m;)if(f(c)){var k=h();if(k>=S)break}if(x=c-(!T||["=","-"].indexOf(T.value[0])==-1?1:2),x>w)for(;x>w&&/^\s*$/.test(g.getLine(x));)x--;if(x>w){var L=g.getLine(x).length;return new b(w,a,x,L)}}}}}).call(p.prototype)}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,r,l){var d=t("../range").Range,u=function(){};(function(){this.checkOutdent=function(b,p){return/^\s+$/.test(b)?/^\s*\}/.test(p):!1},this.autoOutdent=function(b,p){var g=b.getLine(p),o=g.match(/^(\s*\})/);if(!o)return 0;var c=o[1].length,f=b.findMatchingBracket({row:p,column:c});if(!f||f.row==p)return 0;var h=this.$getIndent(b.getLine(f.row));b.replace(new d(p,0,p,c-1),h)},this.$getIndent=function(b){return b.match(/^\s*/)[0]}}).call(u.prototype),r.MatchingBraceOutdent=u}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"],function(t,r,l){function d(o,c){return o&&o.type.lastIndexOf(c+".xml")>-1}var u=t("../../lib/oop"),b=t("../behaviour").Behaviour,p=t("../../token_iterator").TokenIterator,g=function(){this.add("string_dquotes","insertion",function(o,c,f,h,i){if(i=='"'||i=="'"){var a=i,m=h.doc.getTextRange(f.getSelectionRange());if(m!==""&&m!=="'"&&m!='"'&&f.getWrapBehavioursEnabled())return{text:a+m+a,selection:!1};var w=f.getCursorPosition(),x=h.doc.getLine(w.row),T=x.substring(w.column,w.column+1),$=new p(h,w.row,w.column),S=$.getCurrentToken();if(T==a&&(d(S,"attribute-value")||d(S,"string")))return{text:"",selection:[1,1]};if(S||(S=$.stepBackward()),!S)return;for(;d(S,"tag-whitespace")||d(S,"whitespace");)S=$.stepBackward();var k=!T||T.match(/\s/);if(d(S,"attribute-equals")&&(k||T==">")||d(S,"decl-attribute-equals")&&(k||T=="?"))return{text:a+a,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(o,c,f,h,i){var a=h.doc.getTextRange(i);if(!i.isMultiLine()&&(a=='"'||a=="'")){var m=h.doc.getLine(i.start.row),w=m.substring(i.start.column+1,i.start.column+2);if(w==a)return i.end.column++,i}}),this.add("autoclosing","insertion",function(o,c,f,h,i){if(i==">"){var a=f.getSelectionRange().start,m=new p(h,a.row,a.column),w=m.getCurrentToken()||m.stepBackward();if(!w||!(d(w,"tag-name")||d(w,"tag-whitespace")||d(w,"attribute-name")||d(w,"attribute-equals")||d(w,"attribute-value"))||d(w,"reference.attribute-value"))return;if(d(w,"attribute-value")){var x=m.getCurrentTokenColumn()+w.value.length;if(a.column<x)return;if(a.column==x){var T=m.stepForward();if(T&&d(T,"attribute-value"))return;m.stepBackward()}}if(/^\s*>/.test(h.getLine(a.row).slice(a.column)))return;for(;!d(w,"tag-name");)if(w=m.stepBackward(),w.value=="<"){w=m.stepForward();break}var $=m.getCurrentTokenRow(),S=m.getCurrentTokenColumn();if(d(m.stepBackward(),"end-tag-open"))return;var k=w.value;return $==a.row&&(k=k.substring(0,a.column-S)),this.voidElements&&this.voidElements.hasOwnProperty(k.toLowerCase())?void 0:{text:"></"+k+">",selection:[1,1]}}}),this.add("autoindent","insertion",function(o,c,f,h,i){if(i==`
994
994
  `){var a=f.getCursorPosition(),m=h.getLine(a.row),w=new p(h,a.row,a.column),x=w.getCurrentToken();if(d(x,"")&&x.type.indexOf("tag-close")!==-1){if(x.value=="/>")return;for(;x&&x.type.indexOf("tag-name")===-1;)x=w.stepBackward();if(!x)return;var T=x.value,$=w.getCurrentTokenRow();if(x=w.stepBackward(),!x||x.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[T]||!this.voidElements){var S=h.getTokenAt(a.row,a.column+1),m=h.getLine($),k=this.$getIndent(m),L=k+h.getTabString();return S&&S.value==="</"?{text:`
@@ -1400,15 +1400,15 @@ System.register(["./main-2d24b5c8b84fa9a15ff1.js","vue","single-spa"],function(B
1400
1400
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...e){const t=new this(n);return e.forEach(r=>t.set(r)),t}static accessor(n){const e=(this[am]=this[am]={accessors:{}}).accessors,t=this.prototype;function r(l){const d=sl(l);e[d]||(U_(t,l),e[d]=!0)}return _e.isArray(n)?n.forEach(r):r(n),this}};Xr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Xr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),_e.freezeMethods(Xr);function Sh(n,e){const t=this||ol,r=e||t,l=Xr.from(r.headers);let d=r.data;return _e.forEach(n,function(u){d=u.call(t,d,l.normalize(),e?e.status:void 0)}),l.normalize(),d}function lm(n){return!!(n&&n.__CANCEL__)}function pa(n,e,t){St.call(this,n??"canceled",St.ERR_CANCELED,e,t),this.name="CanceledError"}_e.inherits(pa,St,{__CANCEL__:!0});function cm(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new St("Request failed with status code "+t.status,[St.ERR_BAD_REQUEST,St.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function q_(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function V_(n,e){n=n||10;const t=new Array(n),r=new Array(n);let l=0,d=0,u;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];u||(u=p),t[l]=b,r[l]=p;let o=d,c=0;for(;o!==l;)c+=t[o++],o=o%n;if(l=(l+1)%n,l===d&&(d=(d+1)%n),p-u<e)return;const f=g&&p-g;return f?Math.round(c*1e3/f):void 0}}function K_(n,e){let t=0,r=1e3/e,l,d;const u=(b,p=Date.now())=>{t=p,l=null,d&&(clearTimeout(d),d=null),n(...b)};return[(...b)=>{const p=Date.now(),g=p-t;g>=r?u(b,p):(l=b,d||(d=setTimeout(()=>{d=null,u(l)},r-g)))},()=>l&&u(l)]}const mc=(n,e,t=3)=>{let r=0;const l=V_(50,250);return K_(d=>{const u=d.loaded,b=d.lengthComputable?d.total:void 0,p=u-r,g=l(p),o=u<=b;r=u;const c={loaded:u,total:b,progress:b?u/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&o?(b-u)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(c)},t)},um=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},hm=n=>(...e)=>_e.asap(()=>n(...e)),G_=Sr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Sr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Sr.origin),Sr.navigator&&/(msie|trident)/i.test(Sr.navigator.userAgent)):()=>!0,Y_=Sr.hasStandardBrowserEnv?{write(n,e,t,r,l,d,u){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];_e.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),_e.isString(r)&&b.push(`path=${r}`),_e.isString(l)&&b.push(`domain=${l}`),d===!0&&b.push("secure"),_e.isString(u)&&b.push(`SameSite=${u}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function X_(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Q_(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function dm(n,e,t){let r=!X_(e);return n&&(r||t==!1)?Q_(n,e):e}const fm=n=>n instanceof Xr?{...n}:n;function $s(n,e){e=e||{};const t={};function r(g,o,c,f){return _e.isPlainObject(g)&&_e.isPlainObject(o)?_e.merge.call({caseless:f},g,o):_e.isPlainObject(o)?_e.merge({},o):_e.isArray(o)?o.slice():o}function l(g,o,c,f){if(_e.isUndefined(o)){if(!_e.isUndefined(g))return r(void 0,g,c,f)}else return r(g,o,c,f)}function d(g,o){if(!_e.isUndefined(o))return r(void 0,o)}function u(g,o){if(_e.isUndefined(o)){if(!_e.isUndefined(g))return r(void 0,g)}else return r(void 0,o)}function b(g,o,c){if(c in e)return r(g,o);if(c in n)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:b,headers:(g,o,c)=>l(fm(g),fm(o),c,!0)};return _e.forEach(Object.keys({...n,...e}),function(g){const o=p[g]||l,c=o(n[g],e[g],g);_e.isUndefined(c)&&o!==b||(t[g]=c)}),t}const pm=n=>{const e=$s({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:d,headers:u,auth:b}=e;if(e.headers=u=Xr.from(u),e.url=rm(dm(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&u.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),_e.isFormData(t)){if(Sr.hasStandardBrowserEnv||Sr.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(_e.isFunction(t.getHeaders)){const p=t.getHeaders(),g=["content-type","content-length"];Object.entries(p).forEach(([o,c])=>{g.includes(o.toLowerCase())&&u.set(o,c)})}}if(Sr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(e)),r||r!==!1&&G_(e.url))){const p=l&&d&&Y_.read(d);p&&u.set(l,p)}return e},Z_=typeof XMLHttpRequest<"u",J_=Z_&&function(n){return new Promise(function(e,t){const r=pm(n);let l=r.data;const d=Xr.from(r.headers).normalize();let{responseType:u,onUploadProgress:b,onDownloadProgress:p}=r,g,o,c,f,h;function i(){f&&f(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let a=new XMLHttpRequest;a.open(r.method.toUpperCase(),r.url,!0),a.timeout=r.timeout;function m(){if(!a)return;const x=Xr.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:x,config:n,request:a};cm(function($){e($),i()},function($){t($),i()},T),a=null}"onloadend"in a?a.onloadend=m:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(m)},a.onabort=function(){a&&(t(new St("Request aborted",St.ECONNABORTED,n,a)),a=null)},a.onerror=function(x){const T=x&&x.message?x.message:"Network Error",$=new St(T,St.ERR_NETWORK,n,a);$.event=x||null,t($),a=null},a.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||om;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new St(x,T.clarifyTimeoutError?St.ETIMEDOUT:St.ECONNABORTED,n,a)),a=null},l===void 0&&d.setContentType(null),"setRequestHeader"in a&&_e.forEach(d.toJSON(),function(x,T){a.setRequestHeader(T,x)}),_e.isUndefined(r.withCredentials)||(a.withCredentials=!!r.withCredentials),u&&u!=="json"&&(a.responseType=r.responseType),p&&([c,h]=mc(p,!0),a.addEventListener("progress",c)),b&&a.upload&&([o,f]=mc(b),a.upload.addEventListener("progress",o),a.upload.addEventListener("loadend",f)),(r.cancelToken||r.signal)&&(g=x=>{a&&(t(!x||x.type?new pa(null,n,a):x),a.abort(),a=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=q_(r.url);if(w&&Sr.protocols.indexOf(w)===-1){t(new St("Unsupported protocol "+w+":",St.ERR_BAD_REQUEST,n));return}a.send(l||null)})},eC=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,l;const d=function(g){if(!l){l=!0,b();const o=g instanceof Error?g:this.reason;r.abort(o instanceof St?o:new pa(o instanceof Error?o.message:o))}};let u=e&&setTimeout(()=>{u=null,d(new St(`timeout ${e} of ms exceeded`,St.ETIMEDOUT))},e);const b=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),n=null)};n.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>_e.asap(b),p}},tC=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,l;for(;r<t;)l=r+e,yield n.slice(r,l),r=l},nC=async function*(n,e){for await(const t of rC(n))yield*tC(t,e)},rC=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},gm=(n,e,t,r)=>{const l=nC(n,e);let d=0,u,b=p=>{u||(u=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:o}=await l.next();if(g){b(),p.close();return}let c=o.byteLength;if(t){let f=d+=c;t(f)}p.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(p){return b(p),l.return()}},{highWaterMark:2})},mm=64*1024,{isFunction:vc}=_e,iC=(({Request:n,Response:e})=>({Request:n,Response:e}))(_e.global),{ReadableStream:vm,TextEncoder:ym}=_e.global,bm=(n,...e)=>{try{return!!n(...e)}catch{return!1}},oC=n=>{n=_e.merge.call({skipUndefined:!0},iC,n);const{fetch:e,Request:t,Response:r}=n,l=e?vc(e):typeof fetch=="function",d=vc(t),u=vc(r);if(!l)return!1;const b=l&&vc(vm),p=l&&(typeof ym=="function"?(i=>a=>i.encode(a))(new ym):async i=>new Uint8Array(await new t(i).arrayBuffer())),g=d&&b&&bm(()=>{let i=!1;const a=new t(Sr.origin,{body:new vm,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!a}),o=u&&b&&bm(()=>_e.isReadableStream(new r("").body)),c={stream:o&&(i=>i.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!c[i]&&(c[i]=(a,m)=>{let w=a&&a[i];if(w)return w.call(a);throw new St(`Response type '${i}' is not supported`,St.ERR_NOT_SUPPORT,m)})});const f=async i=>{if(i==null)return 0;if(_e.isBlob(i))return i.size;if(_e.isSpecCompliantForm(i))return(await new t(Sr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(i)||_e.isArrayBuffer(i))return i.byteLength;if(_e.isURLSearchParams(i)&&(i=i+""),_e.isString(i))return(await p(i)).byteLength},h=async(i,a)=>_e.toFiniteNumber(i.getContentLength())??f(a);return async i=>{let{url:a,method:m,data:w,signal:x,cancelToken:T,timeout:$,onDownloadProgress:S,onUploadProgress:k,responseType:L,headers:N,withCredentials:R="same-origin",fetchOptions:O}=pm(i),W=e||fetch;L=L?(L+"").toLowerCase():"text";let P=eC([x,T&&T.toAbortSignal()],$),D=null;const A=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let _;try{if(k&&g&&m!=="get"&&m!=="head"&&(_=await h(N,w))!==0){let J=new t(a,{method:"POST",body:w,duplex:"half"}),ae;if(_e.isFormData(w)&&(ae=J.headers.get("content-type"))&&N.setContentType(ae),J.body){const[ne,se]=um(_,mc(hm(k)));w=gm(J.body,mm,ne,se)}}_e.isString(R)||(R=R?"include":"omit");const I=d&&"credentials"in t.prototype,j={...O,signal:P,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:I?R:void 0};D=d&&new t(a,j);let U=await(d?W(D,O):W(a,j));const K=o&&(L==="stream"||L==="response");if(o&&(S||K&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=U[ce]});const ae=_e.toFiniteNumber(U.headers.get("content-length")),[ne,se]=S&&um(ae,mc(hm(S),!0))||[];U=new r(gm(U.body,mm,ne,()=>{se&&se(),A&&A()}),J)}L=L||"text";let Z=await c[_e.findKey(c,L)||"text"](U,i);return!K&&A&&A(),await new Promise((J,ae)=>{cm(J,ae,{data:Z,headers:Xr.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:D})})}catch(I){throw A&&A(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new St("Network Error",St.ERR_NETWORK,i,D),{cause:I.cause||I}):St.from(I,I&&I.code,i,D)}}},sC=new Map,wm=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:l}=e,d=[r,l,t];let u=d.length,b=u,p,g,o=sC;for(;b--;)p=d[b],g=o.get(p),g===void 0&&o.set(p,g=b?new Map:oC(e)),o=g;return g};wm();const _h={http:S_,xhr:J_,fetch:{get:wm}};_e.forEach(_h,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const xm=n=>`- ${n}`,aC=n=>_e.isFunction(n)||n===null||n===!1;function lC(n,e){n=_e.isArray(n)?n:[n];const{length:t}=n;let r,l;const d={};for(let u=0;u<t;u++){r=n[u];let b;if(l=r,!aC(r)&&(l=_h[(b=String(r)).toLowerCase()],l===void 0))throw new St(`Unknown adapter '${b}'`);if(l&&(_e.isFunction(l)||(l=l.get(e))))break;d[b||"#"+u]=l}if(!l){const u=Object.entries(d).map(([p,g])=>`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let b=t?u.length>1?`since :
1401
1401
  `+u.map(xm).join(`
1402
1402
  `):" "+xm(u[0]):"as no adapter specified";throw new St("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return l}const km={getAdapter:lC,adapters:_h};function Ch(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new pa(null,n)}function Sm(n){return Ch(n),n.headers=Xr.from(n.headers),n.data=Sh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),km.getAdapter(n.adapter||ol.adapter,n)(n).then(function(e){return Ch(n),e.data=Sh.call(n,n.transformResponse,e),e.headers=Xr.from(e.headers),e},function(e){return lm(e)||(Ch(n),e&&e.response&&(e.response.data=Sh.call(n,n.transformResponse,e.response),e.response.headers=Xr.from(e.response.headers))),Promise.reject(e)})}const _m="1.13.2",yc={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{yc[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Cm={};yc.transitional=function(n,e,t){function r(l,d){return"[Axios v"+_m+"] Transitional option '"+l+"'"+d+(t?". "+t:"")}return(l,d,u)=>{if(n===!1)throw new St(r(d," has been removed"+(e?" in "+e:"")),St.ERR_DEPRECATED);return e&&!Cm[d]&&(Cm[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(l,d,u):!0}},yc.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function cC(n,e,t){if(typeof n!="object")throw new St("options must be an object",St.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let l=r.length;for(;l-- >0;){const d=r[l],u=e[d];if(u){const b=n[d],p=b===void 0||u(b,d,n);if(p!==!0)throw new St("option "+d+" must be "+p,St.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new St("Unknown option "+d,St.ERR_BAD_OPTION)}}const bc={assertOptions:cC,validators:yc},ao=bc.validators;let As=class{constructor(n){this.defaults=n||{},this.interceptors={request:new im,response:new im}}async request(n,e){try{return await this._request(n,e)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const l=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?l&&!String(t.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(t.stack+=`
1403
- `+l):t.stack=l}catch{}}throw t}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=$s(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:l}=e;t!==void 0&&bc.assertOptions(t,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),r!=null&&(_e.isFunction(r)?e.paramsSerializer={serialize:r}: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=l&&_e.merge(l.common,l[e.method]);l&&_e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete l[h]}),e.headers=Xr.concat(d,l);const u=[];let b=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(b=b&&h.synchronous,u.unshift(h.fulfilled,h.rejected))});const p=[];this.interceptors.response.forEach(function(h){p.push(h.fulfilled,h.rejected)});let g,o=0,c;if(!b){const h=[Sm.bind(this),void 0];for(h.unshift(...u),h.push(...p),c=h.length,g=Promise.resolve(e);o<c;)g=g.then(h[o++],h[o++]);return g}c=u.length;let f=e;for(;o<c;){const h=u[o++],i=u[o++];try{f=h(f)}catch(a){i.call(this,a);break}}try{g=Sm.call(this,f)}catch(h){return Promise.reject(h)}for(o=0,c=p.length;o<c;)g=g.then(p[o++],p[o++]);return g}getUri(n){n=$s(this.defaults,n);const e=dm(n.baseURL,n.url,n.allowAbsoluteUrls);return rm(e,n.params,n.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){As.prototype[n]=function(e,t){return this.request($s(t||{},{method:n,url:e,data:(t||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function e(t){return function(r,l,d){return this.request($s(d||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}As.prototype[n]=e(),As.prototype[n+"Form"]=e(!0)});let uC=class Vx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(l){t=l});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(l,d,u){r.reason||(r.reason=new pa(l,d,u),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Vx(function(t){e=t}),cancel:e}}};function hC(n){return function(e){return n.apply(null,e)}}function dC(n){return _e.isObject(n)&&n.isAxiosError===!0}const $h={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($h).forEach(([n,e])=>{$h[e]=n});function $m(n){const e=new As(n),t=zg(As.prototype.request,e);return _e.extend(t,As.prototype,e,{allOwnKeys:!0}),_e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return $m($s(n,r))},t}const Fn=$m(ol);Fn.Axios=As,Fn.CanceledError=pa,Fn.CancelToken=uC,Fn.isCancel=lm,Fn.VERSION=_m,Fn.toFormData=pc,Fn.AxiosError=St,Fn.Cancel=Fn.CanceledError,Fn.all=function(n){return Promise.all(n)},Fn.spread=hC,Fn.isAxiosError=dC,Fn.mergeConfig=$s,Fn.AxiosHeaders=Xr,Fn.formToJSON=n=>sm(_e.isHTMLForm(n)?new FormData(n):n),Fn.getAdapter=km.getAdapter,Fn.HttpStatusCode=$h,Fn.default=Fn;const{Axios:UB,AxiosError:qB,CanceledError:VB,isCancel:KB,CancelToken:GB,VERSION:YB,all:XB,Cancel:QB,isAxiosError:ZB,spread:JB,toFormData:ej,AxiosHeaders:tj,HttpStatusCode:nj,formToJSON:rj,getAdapter:ij,mergeConfig:oj}=Fn,Ah=Fn.create({baseURL:location.origin,timeout:6e4,params:{}});Ah.interceptors.response.use(n=>n,n=>{var e,t,r,l,d,u,b,p,g,o,c;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(i){i&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let f=`HTTP ${n.response.status} - `;(e=n.response)!=null&&e.statusText&&(f+=`${n.response.statusText} `),(r=(t=n.response)==null?void 0:t.config)!=null&&r.data&&(f+=`${n.response.config.data} `),(d=(l=n.response)==null?void 0:l.data)!=null&&d.message?f+=`${n.response.data.message}`:(b=(u=n.response)==null?void 0:u.data)!=null&&b.exception?f+=`${n.response.data.exception}`:(o=(g=(p=n.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&o.message?(n.response.data.error.class&&(f+=`${n.response.data.error.class} `),f+=`${n.response.data.error.message}`):f+=`${(c=n.response)==null?void 0:c.data}`;const{$cosmosNotify:h}=window;throw h&&h.serious({title:"Network error",body:f}),n}else throw n});const wc=async function(n,e,{data:t,params:r={},headers:l,noAuth:d=!1,noScope:u=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}l.Authorization=localStorage.openc3Token}return l.manual=!0,!u&&!r.scope&&(r.scope=window.openc3Scope),Ah({method:n,url:e,data:t,params:r,headers:l,onUploadProgress:b})},Eh={Accept:"application/json"},Am={...Eh,"Content-Type":"application/json"},sj=Bi("F",{get:function(n,{params:e,headers:t=Eh,noScope:r,noAuth:l,onUploadProgress:d}={}){return wc("get",n,{params:e,headers:t,noScope:r,noAuth:l,onUploadProgress:d})},put:function(n,{data:e,params:t,headers:r=Am,noScope:l,noAuth:d,onUploadProgress:u}={}){return wc("put",n,{data:e,params:t,headers:r,noScope:l,noAuth:d,onUploadProgress:u})},post:function(n,{data:e,params:t,headers:r=Am,noScope:l,noAuth:d,onUploadProgress:u}={}){return wc("post",n,{data:e,params:t,headers:r,noScope:l,noAuth:d,onUploadProgress:u})},delete:function(n,{params:e,headers:t=Eh,noScope:r,noAuth:l,onUploadProgress:d}={}){return wc("delete",n,{params:e,headers:t,noScope:r,noAuth:l,onUploadProgress:d})}});let xc=()=>({emit(n,...e){for(let t=this.events[n]||[],r=0,l=t.length;r<l;r++)t[r](...e)},events:{},on(n,e){var t;return((t=this.events)[n]||(t[n]=[])).push(e),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(l=>e!==l)}}});class al extends Error{constructor(e,t){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=t,this.name="ReasonError"}}class Th extends al{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class fC extends al{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class zi extends al{constructor(e,t){t?super(e,t):super("Disconnected",e),this.name="DisconnectedError"}}class pC extends zi{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Em(n){return n?`{${Object.keys(n).sort().filter(e=>n[e]!==void 0).map(e=>{let t=JSON.stringify(n[e]);return`${JSON.stringify(e)}:${t}`}).join(",")}}`:""}class gC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,t){if(!this._info)return this._info={id:e,info:t},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((t,{id:r,info:l})=>(t[r]=l,t),{})}}const Es=Symbol("state");class Tm{constructor(e={}){this.emitter=xc(),this.params=Object.freeze(e),this.presence=new gC(this),this.initialConnect=!0,this[Es]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Em({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,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,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,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,t)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(e,t){this.emit("message",e,t)}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});return r}emit(e,...t){return this.emitter.emit(e,...t)}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,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(l=>l()),e()})),r.push(this.on("close",l=>{r.forEach(d=>d()),t(l||new al("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class mC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let t=this.channels.indexOf(e);t>-1&&this.channels.splice(t,1)}notify(e,...t){this.state=e==="restored"?"connected":e,t.length===1?this.channels.forEach(r=>r[e](t[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let t=this._pendings[0];return!t||t.intent!==e?Promise.resolve():t.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 t,r={promise:new Promise(d=>{t=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},l=this._pendingTop;return this._pendings.push(r),l&&await l.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 t=this._pendingTop;return!t||t.acquired||t.intent!==e?!1:(this._pendings.pop(),t.canceled=!0,!0)}}class vC{constructor(){this.queue=[]}async acquire(e,t){t==="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 yC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new vC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:t,unsubscribe:r}){let l=this._subscriptions[e]=new mC(e);return l.remoteId=this._localToRemote[e],l.subscriber=t,l.unsubscriber=r,l.gvl=this.glv,l}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,t){this._localToRemote[e]=t;let r=this.get(e);r&&(r.remoteId=t)}}class bC{constructor(e={}){this.subscriptions=new yC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,t){this._remoteToLocal[t]=e,this.subscriptions.storeRemoteId(e,t),this.flush(t)}unsubscribe(e){let t=this.subscriptions.get(e);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,t,r){let l=this._remoteToLocal[e];if(!l){this._pendingMessages.push([e,t,r]);return}let d=this.subscriptions.get(l);d&&d.channels.forEach(u=>{u.receive(t,r)})}notify(e,t,r){let l=this._remoteToLocal[e];if(!l)return;let d=this.subscriptions.get(l);d&&d.channels.forEach(u=>u.emit(t,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 t=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}}const Mm={debug:0,info:1,warn:2,error:3};class Rm{constructor(e){this.level=e||"warn"}log(e,t,r){Mm[e]<Mm[this.level]||this.writeLogEntry(e,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}}class ll extends Rm{writeLogEntry(){}}class wC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let xC=0;class Lm{constructor(e={}){let{logger:t}=e;this.logger=t||new ll,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,t){let r={channel:e};t&&Object.assign(r,t);let l=Em(r);if(this.pendingUnsubscriptions[l]){let u=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${u}`,l),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,t))},u)})}if(this.pendingSubscriptions[l])return this.logger.warn("subscription is already pending, skipping",l),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((u,b)=>{let p=++xC;this.pendingSubscriptions[l]={resolve:u,reject:b,id:p},this.cable.send(this.buildSubscribeRequest(l)),this.maybeRetrySubscribe(p,l,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,t,r){setTimeout(()=>{let l=this.pendingSubscriptions[t];l&&l.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(e,t,r))},r)}maybeExpireSubscribe(e,t,r){setTimeout(()=>{let l=this.pendingSubscriptions[t];l&&l.id===e&&(delete this.pendingSubscriptions[t],l.reject(new fC(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},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,t,r){return t==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=t,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,t){return this.cable.send({command:"whisper",identifier:e,data:t}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:l,reason:d,reconnect:u}=e;if(t==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(t==="disconnect"){let b=new zi(d);this.reset(b),u===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(t==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(t==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Th)):this.logger.error("subscription not found",{type:t,identifier:r})}if(l)return{identifier:r,message:l};this.logger.warn(`unknown message type: ${t}`,{message:e})}reset(e){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Om=()=>Date.now()/1e3|0;class kC extends Lm{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=Om()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let t in this.pendingPresence)this.pendingPresence[t].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:l}=e;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(t==="reject_subscription")return super.receive(e);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(t==="ping")return this.restoreSince&&(this.restoreSince=Om()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(t==="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 u of d)this.cable.send({identifier:u,command:"history",history:this.historyRequestFor(u)}),this.presenceInfo[u]&&this.cable.send({identifier:u,command:"join",presence:this.presenceInfo[u]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(t==="presence"){let d=l.type;if(d==="info"){let u=this.pendingPresence[r];u&&(delete this.pendingPresence[r],u.resolve(l))}else if(d==="error"){let u=this.pendingPresence[r];u&&(delete this.pendingPresence[r],u.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:l}}if(l){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:l,meta:d}}this.logger.warn(`unknown message type: ${t}`,{message:e})}perform(e,t,r){switch(t){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,t,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let t=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(t.history=r,this.pendingHistory[e]=!0);let l=this.presenceInfo[e];return l&&(t.presence=l),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let t={},r=!1;if(this.subscriptionStreams[e])for(let l of this.subscriptionStreams[e]){let d=this.streamsPositions[l];d&&(r=!0,t[l]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(e,t,r,l){if(!(!t||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(t),this.streamsPositions[t]={epoch:r,offset:l},{stream:t,epoch:r,offset:l}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,t){return this.presenceInfo[e]=t,this.cable.send({command:"join",identifier:e,presence:t}),Promise.resolve()}async leave(e,t){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:t}),Promise.resolve()}presence(e,t){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,l)=>{this.pendingPresence[e]={resolve:r,reject:l},this.cable.send({command:"presence",identifier:e,data:t})})}}class SC extends al{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Mh extends Tm{constructor(e,t){super(t),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}cc(Mh,"identifier","__ghost__");const _C="$pubsub";class Rh extends Tm{async perform(e,t){if(e.startsWith("$"))return super.perform(e,t);throw Error("not implemented")}}cc(Rh,"identifier",_C);const Ts=Symbol("state");let CC=class{constructor({transport:n,protocol:e,encoder:t,logger:r,lazy:l,hubOptions:d,performFailures:u,transportConfigurator:b}){this.emitter=xc(),this.transport=n,this.encoder=t,this.logger=r||new ll,this.protocol=e,this.performFailures=u||"throw",this.protocol.attached(this),this.hub=new bC(d||{}),this[Ts]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,l===!1&&this.connect().catch(()=>{})}get state(){return this[Ts]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[Ts]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(t){this.handleClose(t)}return e}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Ts]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new zi("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[Ts]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new zi("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,t=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}notify(n,e,t){e&&typeof e!="string"&&(t=e,e=void 0),e?this.hub.notify(e,"info",{type:n,data:t}):this.emit("info",{type:n,data:t})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new zi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[Ts]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let e;n&&(e=n instanceof zi?n:new zi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[Ts]="closed";let t=e||new zi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",t)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(n);if(e===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",e);let t=this.protocol.receive(e);if(t){this.logger.debug("processed incoming message",t);let{type:r,identifier:l,message:d,meta:u}=t;r?this.hub.notify(l,r,d):this.hub.transmit(l,d,u)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(n);if(e===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(e)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let e=new Rh({stream_name:n});return this.subscribe(e)}streamFromSigned(n){let e=new Rh({signed_stream_name:n});return this.subscribe(e)}subscribeTo(n,e){let t,r;return typeof n=="string"&&(r=n,n=Mh),t=r?new n(r,e):new n(e),this.subscribe(t)}subscribe(n){if(!n.attached(this))return n;let e=n.identifier;n.connecting();let t=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return t.add(n),t.intent==="subscribed"&&t.state==="connected"&&n.connected(),t.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,e,t){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let l=await n.acquire("subscribed");if(l.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),l.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),l.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),l.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),l.release();return}let d={identifier:e,params:t};this.logger.debug("subscribing",d);try{let u=await this.protocol.subscribe(e,t);this.hub.subscribe(r,u),this.logger.debug("subscribed",{...d,remoteId:u}),n.notify("connected")}catch(u){if(u){if(u instanceof Th&&this.logger.warn("rejected",d),u instanceof zi){this.logger.debug("disconnected during subscription; will retry on connect",d),l.release();return}this.logger.error("failed to subscribe",{error:u,...d})}n.close(u),this.hub.unsubscribe(r)}l.release()}unsubscribe(n){let e=n.identifier,t=this.hub.subscriptions.get(e);if(!t)throw Error(`Subscription not found: ${e}`);t.remove(n),n.closed(),t.maybeUnsubscribe()}async _unsubscribe(n){let e=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let t=await n.acquire("unsubscribed");if(t.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),t.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:n.intent}),t.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:e}),t.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),n.close(),this.hub.unsubscribe(e),t.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(l){l&&(l instanceof zi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:l}):this.logger.error("unsubscribe failed",{id:e,error:l}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(e)):n.state="closed",t.release()}async perform(n,e,t){if(this.performFailures==="throw")return this._perform(n,e,t);try{return await this._perform(n,e,t)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,e,t){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new SC;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let l=r.remoteId,d={id:l,action:e,payload:t};this.logger.debug("perform",d);try{let u=await this.protocol.perform(l,e,t);return u&&this.logger.debug("perform result",{message:u,request:d}),u}catch(u){throw this.logger.error("perform failed",{error:u,request:d}),u}}on(n,e){return this.emitter.on(n,e)}once(n,e){let t=this.emitter.on(n,(...r)=>{t(),e(...r)});return t}emit(n,...e){return this.emitter.emit(n,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,e)=>{let t=[()=>delete this._pendingConnect];t.push(this.on("connect",()=>{t.forEach(r=>r()),n()})),t.push(this.on("close",r=>{t.forEach(l=>l()),e(r)})),t.push(this.on("disconnect",r=>{t.forEach(l=>l()),e(r)}))}),this._pendingConnect)}};const $C={maxMissingPings:2,maxReconnectAttempts:1/0},ga=()=>Date.now(),Im=(n,e)=>{e=e||{};let{backoffRate:t,jitterRatio:r,maxInterval:l}=e;return t=t||2,r===void 0&&(r=.5),d=>{let u=n*t**d,b=u*t,p=u+(b-u)*Math.random(),g=2*(Math.random()-.5)*r;return p=p*(1+g),l&&l<p&&(p=l),p}};let Nm=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},$C,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new ll,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ga()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ga(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ga(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ga(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ga()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=ga()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new pC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class AC{constructor(e,t={}){this.transports=e,this.transport=null,this.emitter=xc(),this.unbind=[],this.logger=t.logger||new ll}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let t=this.transports[e];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.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,t){this.transports.forEach(r=>{r.setParam(e,t)})}setToken(e,t){this.transports.forEach(r=>{r.setToken(e,t)})}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});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 EC{constructor(e,t={}){this.url=e;let r=t.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=xc();let{format:l,subprotocol:d,authStrategy:u}=t;this.format=l||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=u||"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((t,r)=>{let l=[];l.push(this.once("open",()=>{l.forEach(d=>d()),t()})),l.push(this.once("close",()=>{l.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,t){let r=new URL(this.url);r.searchParams.set(e,t);let l=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(l)}setToken(e,t="jid"){if(this.authStrategy==="param")this.setParam(t,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(l=>l.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,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});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 t=e.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},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 Dm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function TC(n,e){if(typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),e=e||{},!n&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Dm,e);let{protocol:t,websocketImplementation:r,websocketFormat:l,websocketOptions:d,websocketAuthStrategy:u,fallbacks:b,logLevel:p,logger:g,transport:o,encoder:c,lazy:f,monitor:h,pingInterval:i,reconnectStrategy:a,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:T,historyTimestamp:$,protocolOptions:S,concurrentSubscribes:k,performFailures:L,transportConfigurator:N,auth:R}=e;if(g=g||new ll(p),typeof t=="string"){x=x||t;let P=t.substring(0,t.lastIndexOf("-")),D=t.substring(t.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")t=new Lm({logger:g,...S});else if(P==="actioncable-v1-ext")t=new kC({logger:g,historyTimestamp:$,...S});else throw Error(`Protocol is not supported yet: ${t}`);if(D==="json")c=c||new wC,l=l||"text";else if(D==="msgpack"){if(l="binary",!c)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(l=l||"binary",!c)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: ${t}`)}if(!t)throw Error("Protocol must be specified");o=o||new EC(n,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:u,format:l}),b&&(o=new AC([o,...b],{logger:g})),R&&R.token&&o.setToken(R.token,R.param||"jid"),a=a||Im(i),h!==!1&&(h=h||new Nm({pingInterval:i,reconnectStrategy:a,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let O={concurrentSubscribes:k},W=new CC({protocol:t,transport:o,encoder:c,logger:g,lazy:f,hubOptions:O,performFailures:L,transportConfigurator:N});return h&&(h.watch(W),W.monitor=h),T&&MC(W,async()=>{try{await T(o)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return W.connect().catch(()=>{}),!0}),W}function MC(n,e){let t=!1;n.on("connect",()=>t=!1),n.on("close",async r=>{if(r){if(t){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await e())}})}class RC{constructor(e){this.channel=e}notify(e,...t){typeof this[e]=="function"&&this[e](...t)}perform(e,t={}){this.channel.perform(e,t)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class LC extends Mh{constructor(e,t,r){super(e,t),this.subscription=new RC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:l})=>this.subscription.notify("connected",{reconnected:l})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",l=>this.subscription.notify("received",l)),this.on("close",l=>{l&&l instanceof Th?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class OC{constructor(e){this.cable=e}create(e,t){let r,l;typeof e=="object"?(r=e.channel,delete e.channel,l=e):(r=e,l={});let d=new LC(r,l,t);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(t=>t.identifier===e).map(t=>t.subscription)}}class IC{constructor(e){this.cable=e,this.subscriptions=new OC(e)}}class NC extends Rm{writeLogEntry(e,t,r){r?console[e](t,r):console[e](t)}}class DC extends Nm{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")},t=l=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:l})},r=()=>this.disconnect(new zi("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!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 FC=["cable","action-cable"],PC="/cable",kc=(n,e)=>{for(let t of FC){let r=n.head.querySelector(`meta[name='${t}-${e}']`);if(r)return r.getAttribute("content")}},Fm=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,BC=()=>{if(typeof document<"u"&&document.head){let n=kc(document,"url");if(n)return Fm(n)}return Fm(PC)},jC=()=>{if(typeof document<"u"&&document.head){let n=kc(document,"history-timestamp");if(n)return n|0}},WC=()=>{if(typeof document<"u"&&document.head)return kc(document,"token")},zC=()=>{if(typeof document<"u"&&document.head)return kc(document,"token-param")};function HC(n,e){typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),n=n||BC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=jC());let t=WC();if(t){let g=zC();e.auth=Object.assign({token:t,param:g},e.auth||{})}e=Object.assign({},Dm,e);let{logLevel:r,logger:l,pingInterval:d,reconnectStrategy:u,maxMissingPings:b,maxReconnectAttempts:p}=e;return l=e.logger=e.logger||new NC(r),u=e.reconnectStrategy=e.reconnectStrategy||Im(d),e.monitor!==!1&&(e.monitor=e.monitor||new DC({pingInterval:d,reconnectStrategy:u,maxMissingPings:b,maxReconnectAttempts:p,logger:l})),TC(n,e)}function UC(n,e){let t=HC(n,e);return new IC(t)}class qC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,t,r={},l={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let u=this._url+"?scope="+encodeURIComponent(t)+"&authorization="+encodeURIComponent(localStorage.openc3Token);u=new URL(u,document.baseURI).href,this._cable=UC(u)}return this._cable.subscriptions.create({channel:e,...l},r)})}recordPing(){}}Bi("P",qC);class VC{constructor(e,t,r="",l=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=t,this.usage=r,this.url=l}}Bi("k",VC);function cl(n){return KC.test(n)}const KC=/^-?[0-9]+$/;function Pm(n){return GC.test(n)}const GC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Bm(n,e){if(cl(n))return Number.isSafeInteger(Number.parseInt(n,10));const t=Number.parseFloat(n),r=String(t);if(n===r)return!0;const l=jm(n),d=jm(r);return!!(l===d||(e==null?void 0:e.approx)===!0&&!cl(n)&&d.length>=14&&l.startsWith(d.substring(0,14)))}let ul=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function YC(n){if(Bm(n,{approx:!1}))return;if(cl(n))return ul.truncate_integer;const e=Number.parseFloat(n);return Number.isFinite(e)?e===0?ul.underflow:ul.truncate_float:ul.overflow}function jm(n){const{start:e,end:t}=XC(n),r=n.substring(e,t),l=r.indexOf(".");return l===-1?r:r.substring(0,l)+r.substring(l+1)}function XC(n){let e=0;for(n[0]==="-"&&e++;n[e]==="0"||n[e]===".";)e++;let t=n.lastIndexOf("e");for(t===-1&&(t=n.lastIndexOf("E")),t===-1&&(t=n.length);(n[t-1]==="0"||n[t-1]===".")&&t>e;)t--;return{start:e,end:t}}class QC{constructor(e){if(cc(this,"isLosslessNumber",!0),!Pm(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=YC(this.value);if(e===void 0||e===ul.truncate_float)return Number.parseFloat(this.value);if(cl(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function ZC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function JC(n){return new QC(n)}function e$(n,e){return Lh({"":n},"",n,e)}function Lh(n,e,t,r){return Array.isArray(t)?r.call(n,e,n$(t,r)):t&&typeof t=="object"&&!ZC(t)?r.call(n,e,t$(t,r)):r.call(n,e,t)}function t$(n,e){for(const t of Object.keys(n)){const r=Lh(n,t,n[t],e);r!==void 0?n[t]=r:delete n[t]}return n}function n$(n,e){for(let t=0;t<n.length;t++)n[t]=Lh(n,String(t),n[t],e);return n}function r$(n,e,t){const r=typeof t=="function"?{parseNumber:t}:t,l=(r==null?void 0:r.parseNumber)??JC,d=(r==null?void 0:r.onDuplicateKey)??L;let u=0;const b=o();return w(b),T(),e?e$(b,e):b;function p(){if(n.charCodeAt(u)===c$){u++,f();const j={};let U=!0;for(;u<n.length&&n.charCodeAt(u)!==zm;){U?U=!1:(a(),f());const K=u,Z=h();if(Z===void 0){k();return}f(),m();const J=o();if(J===void 0){P();return}if(Object.prototype.hasOwnProperty.call(j,Z)&&!Oh(J,j[Z])){const ae=d({key:Z,position:K+1,oldValue:j[Z],newValue:J});ae!==void 0&&(j[Z]=ae)}else j[Z]=J}return n.charCodeAt(u)!==zm&&N(),u++,j}}function g(){if(n.charCodeAt(u)===u$){u++,f();const j=[];let U=!0;for(;u<n.length&&n.charCodeAt(u)!==Hm;){U?U=!1:a();const K=o();x(K),j.push(K)}return n.charCodeAt(u)!==Hm&&R(),u++,j}}function o(){f();const j=h()??i()??p()??g()??c("true",!0)??c("false",!1)??c("null",null);return f(),j}function c(j,U){if(n.slice(u,u+j.length)===j)return u+=j.length,U}function f(){for(;i$(n.charCodeAt(u));)u++}function h(){if(n.charCodeAt(u)===Ih){u++;let j="";for(;u<n.length&&n.charCodeAt(u)!==Ih;){if(n.charCodeAt(u)===l$){const U=n[u+1],K=a$[U];K!==void 0?(j+=K,u++):U==="u"?Sc(n.charCodeAt(u+2))&&Sc(n.charCodeAt(u+3))&&Sc(n.charCodeAt(u+4))&&Sc(n.charCodeAt(u+5))?(j+=String.fromCharCode(Number.parseInt(n.slice(u+2,u+6),16)),u+=5):D(u):W(u)}else s$(n.charCodeAt(u))?j+=n[u]:O(n[u]);u++}return S(),u++,j}}function i(){const j=u;if(n.charCodeAt(u)===Um&&(u++,$(j)),n.charCodeAt(u)===Nh)u++;else if(o$(n.charCodeAt(u)))for(u++;_c(n.charCodeAt(u));)u++;if(n.charCodeAt(u)===y$)for(u++,$(j);_c(n.charCodeAt(u));)u++;if(n.charCodeAt(u)===S$||n.charCodeAt(u)===k$)for(u++,(n.charCodeAt(u)===Um||n.charCodeAt(u)===g$)&&u++,$(j);_c(n.charCodeAt(u));)u++;if(u>j)return l(n.slice(j,u))}function a(){if(n.charCodeAt(u)!==v$)throw new SyntaxError(`Comma ',' expected after value ${I()}`);u++}function m(){if(n.charCodeAt(u)!==b$)throw new SyntaxError(`Colon ':' expected after property name ${I()}`);u++}function w(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${I()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${I()}`)}function T(){if(u<n.length)throw new SyntaxError(`Expected end of input ${I()}`)}function $(j){if(!_c(n.charCodeAt(u))){const U=n.slice(j,u);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${I()}`)}}function S(){if(n.charCodeAt(u)!==Ih)throw new SyntaxError(`End of string '"' expected ${I()}`)}function k(){throw new SyntaxError(`Quoted object key expected ${I()}`)}function L(j){let{key:U,position:K}=j;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${K}`)}function N(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${I()}`)}function R(){throw new SyntaxError(`Array item or end of array ']' expected ${I()}`)}function O(j){throw new SyntaxError(`Invalid character '${j}' ${A()}`)}function W(j){const U=n.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${U}' ${A()}`)}function P(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(j){const U=n.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${U}' ${A()}`)}function A(){return`at position ${u}`}function _(){return u<n.length?`but got '${n[u]}'`:"but reached end of input"}function I(){return`${_()} ${A()}`}}function i$(n){return n===h$||n===d$||n===f$||n===p$}function Sc(n){return n>=Nh&&n<=Dh||n>=w$&&n<=_$||n>=x$&&n<=C$}function _c(n){return n>=Nh&&n<=Dh}function o$(n){return n>=m$&&n<=Dh}function s$(n){return n>=32&&n<=1114111}function Oh(n,e){return n===e?!0:Array.isArray(n)&&Array.isArray(e)?n.length===e.length&&n.every((t,r)=>Oh(t,e[r])):Wm(n)&&Wm(e)?[...new Set([...Object.keys(n),...Object.keys(e)])].every(t=>Oh(n[t],e[t])):!1}function Wm(n){return typeof n=="object"&&n!==null}const a$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1404
- `,r:"\r",t:" "},l$=92,c$=123,zm=125,u$=91,Hm=93,h$=32,d$=10,f$=9,p$=13,Ih=34,g$=43,Um=45,Nh=48,m$=49,Dh=57,v$=44,y$=46,b$=58,w$=65,x$=97,k$=69,S$=101,_$=70,C$=102;function qm(n,e,t,r){return l(n);function l(p,g){if(Array.isArray(r)){const o=r.find(c=>c.test(p));if(o){const c=o.stringify(p);if(typeof c!="string"||!Pm(c))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${c})`);return c}}if(typeof p=="boolean"||typeof p=="number"||typeof p=="string"||p===null||p instanceof Date||p instanceof Boolean||p instanceof Number||p instanceof String)return JSON.stringify(p);if(p!=null&&p.isLosslessNumber||typeof p=="bigint")return p.toString();if(Array.isArray(p))return d(p);if(p&&typeof p=="object")return u(p)}function d(p,g){if(p.length===0)return"[]";let o="[";for(let c=0;c<p.length;c++){const f=p[c];typeof f<"u"&&typeof f!="function"?o+=l(f):o+="null",c<p.length-1&&(o+=",")}return o+="]",o}function u(p,g){if(typeof p.toJSON=="function")return qm(p.toJSON(),e,t,void 0);const o=Array.isArray(e)?e.map(String):Object.keys(p);if(o.length===0)return"{}";let c=!0,f="{";for(const h of o){const i=p[h];if(b(h,i)){c?c=!1:f+=",";const a=JSON.stringify(h);f+=`${a}:`,f+=l(i)}}return f+="}",f}function b(p,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function $$(n){return cl(n)&&!Bm(n)?BigInt(n):parseFloat(n)}class Vm{constructor(){cc(this,"id",1)}async exec(e,t,r={},l={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,l.manual=!0,(await Ah.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...l},timeout:d,transformRequest:[(u,b)=>qm(u)],transformResponse:[u=>r$(u,void 0,$$)]})).data.result}catch(u){let b=new Error;throw u.response?(b.name=u.response.data.error.data.class,b.message=u.response.data.error.data.message,b.object=u.response.data.error):u.request?(b.name="Request error",b.message="Request error, no response received"):b=u,b}}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,t,r,l,d){return this.exec("map_target_to_interface",[e,t],{cmd_only:r,tlm_only:l,unmap_old:d})}unmap_target_from_interface(e,t,r,l){return this.exec("unmap_target_from_interface",[e,t],{cmd_only:r,tlm_only:l})}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...r){return this.exec("interface_cmd",[e,t,...r])}interface_target_enable(e,t,r=!1,l=!1){return this.exec("interface_target_enable",[e,t],{cmd_only:r,tlm_only:l})}interface_target_disable(e,t,r=!1,l=!1){return this.exec("interface_target_disable",[e,t],{cmd_only:r,tlm_only:l})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,t,r,l,d){return this.exec("map_target_to_router",[e,t],{cmd_only:r,tlm_only:l,unmap_old:d})}unmap_target_from_router(e,t,r,l){return this.exec("unmap_target_from_router",[e,t],{cmd_only:r,tlm_only:l})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,t,r=!1,l=!1){return this.exec("router_target_enable",[e,t],{cmd_only:r,tlm_only:l})}router_target_disable(e,t,r=!1,l=!1){return this.exec("router_target_disable",[e,t],{cmd_only:r,tlm_only:l})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,r){return this.exec("get_item",[e,t,r])}get_param(e,t,r){return this.exec("get_param",[e,t,r])}get_parameter(e,t,r){return this.exec("get_param",[e,t,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,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_tlm",[e,t])}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,t=!1){return this.exec("get_all_tlm_names",[e],{hidden:t})}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,t,r,l=30){const d=await this.exec("get_tlm_packet",[e,t],{type:r,stale_time:l});if(d!=null){let u=d.length,b=null;for(let p=0;p<u;p++)b=this.decode_openc3_type(d[p][1]),b!==null&&(d[p][1]=b)}return d}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,t=30,r=null,l=null,d=null){let u={stale_time:t};r!==null&&(u.cache_timeout=r),l!==null&&(u.start_time=l.toISOString()),d!==null&&(u.end_time=d.toISOString());const b=await this.exec("get_tlm_values",[e],u,{},1e4);if(b&&b.length>0){let p=b.length,g=null;for(let o=0;o<p;o++)g=this.decode_openc3_type(b[o][0]),g!==null&&(b[o][0]=g)}return b}get_limits(e,t,r){return this.exec("get_limits",[e,t,r])}async tlm(e,t,r,l="CONVERTED"){let d=null;if(t===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t))d=await this.exec("tlm",[e],{type:t});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else d=await this.exec("tlm",[e,t,r],{type:l});let u=this.decode_openc3_type(d);return u!==null&&(d=u),d}async inject_tlm(e,t,r=null,l="CONVERTED"){await this.exec("inject_tlm",[e,t,r],{type:l})}set_tlm(e,t,r,l){return this.exec("set_tlm",[e,t,r],{type:l})}override_tlm(e,t,r,l){return this.exec("override_tlm",[e,t,r],{type:l})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,r,l){return this.exec("normalize_tlm",[e,t,r],{type:l})}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,t=!1){return this.exec("get_all_cmd_names",[e],{hidden:t})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_cmd",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,r,l="CONVERTED"){return this.exec("get_cmd_value",[e,t,r,l])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,r,l,d,u={}){let b=null;for(let p in l)Object.prototype.hasOwnProperty.call(l,p)&&(b=this.encode_openc3_type(l[p]),b!==null&&(l[p]=b));return this.exec(e,[t,r,l],u,d)}get_cmd_hazardous(e,t,r,l={}){return t===void 0?this.exec("get_cmd_hazardous",e,{},l):this._cmd("get_cmd_hazardous",e,t,r,l)}cmd(e,t,r,l={},d={}){return t===void 0?this.exec("cmd",e,d,l):this._cmd("cmd",e,t,r,l,d)}cmd_no_range_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_range_check",e,d,l):this._cmd("cmd_no_range_check",e,t,r,l,d)}cmd_raw(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw",e,d,l):this._cmd("cmd_raw",e,t,r,l,d)}cmd_raw_no_range_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_range_check",e,d,l):this._cmd("cmd_raw_no_range_check",e,t,r,l,d)}cmd_no_hazardous_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_hazardous_check",e,d,l):this._cmd("cmd_no_hazardous_check",e,t,r,l,d)}cmd_no_checks(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_checks",e,d,l):this._cmd("cmd_no_checks",e,t,r,l,d)}cmd_raw_no_hazardous_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",e,d,l):this._cmd("cmd_raw_no_hazardous_check",e,t,r,l,d)}cmd_raw_no_checks(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_checks",e,d,l):this._cmd("cmd_raw_no_checks",e,t,r,l,d)}build_cmd(e,t,r,l={},d={}){return t===void 0?this.exec("build_cmd",e,d,l):this._cmd("build_cmd",e,t,r,l,d)}build_command(e,t,r,l={},d={}){return t===void 0?this.exec("build_cmd",e,d,l):this._cmd("build_cmd",e,t,r,l,d)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,r){return this.exec("save_config",[e,t,r])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,r){return this.exec("enable_limits",[e,t,r])}disable_limits(e,t,r){return this.exec("disable_limits",[e,t,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,t){return this.exec("get_setting",[e],t)}get_settings(e,t){return this.exec("get_settings",e,t)}set_setting(e,t){return this.exec("set_setting",[e,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,t){return this.exec("set_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t),l=new Uint8Array(r);return Array.from(l).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Bi("B",Vm);var Km={exports:{}},Gm;function A$(){return Gm||(Gm=1,function(n,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,l){function d(g,o){function c(R,O,W){if(!(R.length<O)){var P=R.slice(0,O),D=R.slice(O),A=/^(?:(\s+)|(\S+)(\s+))/.exec(D),_=/(?:(\s+)|(\s+)(\S+))$/.exec(P),I=0,j=0;if(_&&!_[2]&&(I=O-_[1].length,j=O),A&&!A[2]&&(I||(I=O),j=O+A[1].length),I)return{start:I,end:j};if(_&&_[2]&&_.index>W)return{start:_.index,end:_.index+_[2].length};if(A&&A[2])return I=O+A[2].length,{start:I,end:I+A[3].length}}}for(var f=o.column||g.getOption("printMarginColumn"),h=o.allowMerge!=0,i=Math.min(o.startRow,o.endRow),a=Math.max(o.startRow,o.endRow),m=g.session;i<=a;){var w=m.getLine(i);if(w.length>f){var x=c(w,f,5);if(x){var T=/^\s*/.exec(w)[0];m.replace(new b(i,x.start,i,x.end),`
1405
- `+T)}a++}else if(h&&/\S/.test(w)&&i!=a){var $=m.getLine(i+1);if($&&/\S/.test($)){var S=w.replace(/\s+$/,""),k=$.replace(/^\s+/,""),L=S+" "+k,x=c(L,f,5);if(x&&x.start>S.length||L.length<f){var N=new b(i,S.length,i+1,$.length-k.length);m.replace(N," "),i--,a--}else S.length<w.length&&m.remove(new b(i,S.length,i,w.length))}}i++}}function u(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var o=g.editor,c=o.selection.cursor;if(c.column<=o.renderer.$printMarginColumn)return;var f=o.session.$undoManager.$lastDelta;d(o,{startRow:c.row,endRow:c.row,allowMerge:!1}),f!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var b=t("../range").Range,p=t("../editor").Editor;t("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",u):this.commands.off("afterExec",u)},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(t,r,l){function d(y){return{row:y.line,column:y.ch}}function u(y){return new De(y.row,y.column)}function b(y,E,C){if(E.line===C.line&&E.ch>=C.ch-1){var F=y.getLine(E.line),B=F.charCodeAt(E.ch);55296<=B&&B<=55551&&(C.ch+=1)}return{start:E,end:C}}function p(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),Be.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",ss),L(y),Be.on(y.getInputField(),"paste",o(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",ss),Be.off(y.getInputField(),"paste",o(y)),y.state.vim=null,fr&&clearTimeout(fr)}function o(y){var E=y.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(y.setCursor(ge(y.getCursor(),0,1)),On.enterInsertMode(y,{},E))}),E.onPasteFn}function c(y,E){return E>=y.firstLine()&&E<=y.lastLine()}function f(y){return/^[a-z]$/.test(y)}function h(y){return"()[]{}".indexOf(y)!=-1}function i(y){return ja.test(y)}function a(y){return Xt.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,E){for(var C=0;C<E.length;C++)if(E[C]==y)return!0;return!1}function T(y,E,C,F,B){if(E===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(C||(C="string"),Bt[y]={type:C,defaultValue:E,callback:B},F)for(var z=0;z<F.length;z++)Bt[F[z]]=Bt[y];E&&$(y,E)}function $(y,E,C,F){var B=Bt[y];F=F||{};var z=F.scope;if(!B)return new Error("Unknown option: "+y);if(B.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+y+"="+E);E!==!1&&(E=!0)}B.callback?(z!=="local"&&B.callback(E,void 0),z!=="global"&&C&&B.callback(E,C)):(z!=="local"&&(B.value=B.type=="boolean"?!!E:E),z!=="global"&&C&&(C.state.vim.options[y]={value:E}))}function S(y,E,C){var F=Bt[y];C=C||{};var B=C.scope;if(!F)return new Error("Unknown option: "+y);if(F.callback){var z=E&&F.callback(void 0,E);return B!=="global"&&z!==void 0?z:B!=="local"?F.callback():void 0}var z=B!=="global"&&E&&E.state.vim.options[y];return(z||B!=="local"&&F||{}).value}function k(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Rn()}function L(y){return y.state.vim||(y.state.vim={inputState:new A,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function N(){We={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Mi(),macroModeState:new k,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Bt){var E=Bt[y];E.value=E.defaultValue}}function R(y){function E(Y){typeof Y=="string"?mn.value=Y:mn=null}if(y[0]=="<"){var C=y.toLowerCase().slice(1,-1),F=C.split("-");if(C=F.pop()||"",C=="lt")y="<";else if(C=="space")y=" ";else if(C=="cr")y=`
1406
- `;else if(Ri[C]){var B=mn.value,z={key:Ri[C],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};mn.onKeyDown&&mn.onKeyDown(z,mn.value,E),mn&&mn.onKeyUp&&mn.onKeyUp(z,mn.value,E);return}}if(y==`
1403
+ `+l):t.stack=l}catch{}}throw t}}_request(n,e){typeof n=="string"?(e=e||{},e.url=n):e=n||{},e=$s(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:l}=e;t!==void 0&&bc.assertOptions(t,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),r!=null&&(_e.isFunction(r)?e.paramsSerializer={serialize:r}: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=l&&_e.merge(l.common,l[e.method]);l&&_e.forEach(["delete","get","head","post","put","patch","common"],h=>{delete l[h]}),e.headers=Xr.concat(d,l);const u=[];let b=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(e)===!1||(b=b&&h.synchronous,u.unshift(h.fulfilled,h.rejected))});const p=[];this.interceptors.response.forEach(function(h){p.push(h.fulfilled,h.rejected)});let g,o=0,c;if(!b){const h=[Sm.bind(this),void 0];for(h.unshift(...u),h.push(...p),c=h.length,g=Promise.resolve(e);o<c;)g=g.then(h[o++],h[o++]);return g}c=u.length;let f=e;for(;o<c;){const h=u[o++],i=u[o++];try{f=h(f)}catch(a){i.call(this,a);break}}try{g=Sm.call(this,f)}catch(h){return Promise.reject(h)}for(o=0,c=p.length;o<c;)g=g.then(p[o++],p[o++]);return g}getUri(n){n=$s(this.defaults,n);const e=dm(n.baseURL,n.url,n.allowAbsoluteUrls);return rm(e,n.params,n.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){As.prototype[n]=function(e,t){return this.request($s(t||{},{method:n,url:e,data:(t||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function e(t){return function(r,l,d){return this.request($s(d||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}As.prototype[n]=e(),As.prototype[n+"Form"]=e(!0)});let uC=class Vx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(l){t=l});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(l,d,u){r.reason||(r.reason=new pa(l,d,u),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Vx(function(t){e=t}),cancel:e}}};function hC(n){return function(e){return n.apply(null,e)}}function dC(n){return _e.isObject(n)&&n.isAxiosError===!0}const $h={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries($h).forEach(([n,e])=>{$h[e]=n});function $m(n){const e=new As(n),t=zg(As.prototype.request,e);return _e.extend(t,As.prototype,e,{allOwnKeys:!0}),_e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return $m($s(n,r))},t}const Fn=$m(ol);Fn.Axios=As,Fn.CanceledError=pa,Fn.CancelToken=uC,Fn.isCancel=lm,Fn.VERSION=_m,Fn.toFormData=pc,Fn.AxiosError=St,Fn.Cancel=Fn.CanceledError,Fn.all=function(n){return Promise.all(n)},Fn.spread=hC,Fn.isAxiosError=dC,Fn.mergeConfig=$s,Fn.AxiosHeaders=Xr,Fn.formToJSON=n=>sm(_e.isHTMLForm(n)?new FormData(n):n),Fn.getAdapter=km.getAdapter,Fn.HttpStatusCode=$h,Fn.default=Fn;const{Axios:UB,AxiosError:qB,CanceledError:VB,isCancel:KB,CancelToken:GB,VERSION:YB,all:XB,Cancel:QB,isAxiosError:ZB,spread:JB,toFormData:ej,AxiosHeaders:tj,HttpStatusCode:nj,formToJSON:rj,getAdapter:ij,mergeConfig:oj}=Fn,Ah=Fn.create({baseURL:location.origin,timeout:6e4,params:{}});Ah.interceptors.response.use(n=>n,n=>{var e,t,r,l,d,u,b,p,g,o,c;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(i){i&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let f=`HTTP ${n.response.status} - `;(e=n.response)!=null&&e.statusText&&(f+=`${n.response.statusText} `),(r=(t=n.response)==null?void 0:t.config)!=null&&r.data&&(f+=`${n.response.config.data} `),(d=(l=n.response)==null?void 0:l.data)!=null&&d.message?f+=`${n.response.data.message}`:(b=(u=n.response)==null?void 0:u.data)!=null&&b.exception?f+=`${n.response.data.exception}`:(o=(g=(p=n.response)==null?void 0:p.data)==null?void 0:g.error)!=null&&o.message?(n.response.data.error.class&&(f+=`${n.response.data.error.class} `),f+=`${n.response.data.error.message}`):f+=`${(c=n.response)==null?void 0:c.data}`;const{$cosmosNotify:h}=window;throw h&&h.serious({title:"Network error",body:f}),n}else throw n});const wc=async function(n,e,{data:t,params:r={},headers:l,noAuth:d=!1,noScope:u=!1,onUploadProgress:b=!1}={}){if(!d){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}l.Authorization=localStorage.openc3Token}return l.manual=!0,!u&&!r.scope&&(r.scope=window.openc3Scope),Ah({method:n,url:e,data:t,params:r,headers:l,onUploadProgress:b})},Eh={Accept:"application/json"},Am={...Eh,"Content-Type":"application/json"},sj=Si("F",{get:function(n,{params:e,headers:t=Eh,noScope:r,noAuth:l,onUploadProgress:d}={}){return wc("get",n,{params:e,headers:t,noScope:r,noAuth:l,onUploadProgress:d})},put:function(n,{data:e,params:t,headers:r=Am,noScope:l,noAuth:d,onUploadProgress:u}={}){return wc("put",n,{data:e,params:t,headers:r,noScope:l,noAuth:d,onUploadProgress:u})},post:function(n,{data:e,params:t,headers:r=Am,noScope:l,noAuth:d,onUploadProgress:u}={}){return wc("post",n,{data:e,params:t,headers:r,noScope:l,noAuth:d,onUploadProgress:u})},delete:function(n,{params:e,headers:t=Eh,noScope:r,noAuth:l,onUploadProgress:d}={}){return wc("delete",n,{params:e,headers:t,noScope:r,noAuth:l,onUploadProgress:d})}});let xc=()=>({emit(n,...e){for(let t=this.events[n]||[],r=0,l=t.length;r<l;r++)t[r](...e)},events:{},on(n,e){var t;return((t=this.events)[n]||(t[n]=[])).push(e),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(l=>e!==l)}}});class al extends Error{constructor(e,t){e instanceof Error?(super(e.message),this.cause=e):super(e),this.reason=t,this.name="ReasonError"}}class Th extends al{constructor(e){super("Rejected",e),this.name="SubscriptionRejectedError"}}class fC extends al{constructor(e){super(e||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class zi extends al{constructor(e,t){t?super(e,t):super("Disconnected",e),this.name="DisconnectedError"}}class pC extends zi{constructor(e){super(e,"stale_connection"),this.name="StaleConnectionError"}}function Em(n){return n?`{${Object.keys(n).sort().filter(e=>n[e]!==void 0).map(e=>{let t=JSON.stringify(n[e]);return`${JSON.stringify(e)}:${t}`}).join(",")}}`:""}class gC{constructor(e){this.channel=e,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",e=>{if(e.type==="info"){this._state||(this._state=this.stateFromInfo(e));return}this._state&&(e.type==="join"?this._state[e.id]=e.info:e.type==="leave"&&delete this._state[e.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(e=>e()),this.listeners.length=0}async join(e,t){if(!this._info)return this._info={id:e,info:t},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((t,{id:r,info:l})=>(t[r]=l,t),{})}}const Es=Symbol("state");class Tm{constructor(e={}){this.emitter=xc(),this.params=Object.freeze(e),this.presence=new gC(this),this.initialConnect=!0,this[Es]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Em({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,t=!0;this.initialConnect=!1,this.emit("connect",{reconnect:t,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,t){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,e,t)}async send(e){return this.perform(void 0,e)}async whisper(e){try{await this.perform("$whisper",e)}catch(t){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",t)}}receive(e,t){this.emit("message",e,t)}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});return r}emit(e,...t){return this.emitter.emit(e,...t)}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,t)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(l=>l()),e()})),r.push(this.on("close",l=>{r.forEach(d=>d()),t(l||new al("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class mC{constructor(e){this.id=e,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(e){this.channels.includes(e)||this.channels.push(e)}remove(e){let t=this.channels.indexOf(e);t>-1&&this.channels.splice(t,1)}notify(e,...t){this.state=e==="restored"?"connected":e,t.length===1?this.channels.forEach(r=>r[e](t[0])):this.channels.forEach(r=>r[e]())}pending(e){this._checkIntent(e);let t=this._pendings[0];return!t||t.intent!==e?Promise.resolve():t.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 t,r={promise:new Promise(d=>{t=d}),intent:e,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),t(r)},canceled:!1,acquired:!1},l=this._pendingTop;return this._pendings.push(r),l&&await l.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 t=this._pendingTop;return!t||t.acquired||t.intent!==e?!1:(this._pendings.pop(),t.canceled=!0,!0)}}class vC{constructor(){this.queue=[]}async acquire(e,t){t==="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 yC{constructor(e){e.concurrentSubscribes===!1&&(this.glv=new vC),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(e){return this._subscriptions[e]}create(e,{subscribe:t,unsubscribe:r}){let l=this._subscriptions[e]=new mC(e);return l.remoteId=this._localToRemote[e],l.subscriber=t,l.unsubscriber=r,l.gvl=this.glv,l}remove(e){delete this._subscriptions[e],delete this._localToRemote[e]}storeRemoteId(e,t){this._localToRemote[e]=t;let r=this.get(e);r&&(r.remoteId=t)}}class bC{constructor(e={}){this.subscriptions=new yC(e),this._pendingMessages=[],this._remoteToLocal={}}subscribe(e,t){this._remoteToLocal[t]=e,this.subscriptions.storeRemoteId(e,t),this.flush(t)}unsubscribe(e){let t=this.subscriptions.get(e);if(!t)return;let r=t.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(e)}transmit(e,t,r){let l=this._remoteToLocal[e];if(!l){this._pendingMessages.push([e,t,r]);return}let d=this.subscriptions.get(l);d&&d.channels.forEach(u=>{u.receive(t,r)})}notify(e,t,r){let l=this._remoteToLocal[e];if(!l)return;let d=this.subscriptions.get(l);d&&d.channels.forEach(u=>u.emit(t,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 t=[];for(let r of this._pendingMessages)r[0]===e?this.transmit(r[0],r[1],r[2]):t.push(r);this._pendingMessages=t}}const Mm={debug:0,info:1,warn:2,error:3};class Rm{constructor(e){this.level=e||"warn"}log(e,t,r){Mm[e]<Mm[this.level]||this.writeLogEntry(e,t,r)}writeLogEntry(){throw Error("Not implemented")}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}}class ll extends Rm{writeLogEntry(){}}class wC{encode(e){return JSON.stringify(e)}decode(e){try{return JSON.parse(e)}catch{}}}let xC=0;class Lm{constructor(e={}){let{logger:t}=e;this.logger=t||new ll,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=e.subscribeCooldownInterval||250,this.subscribeRetryInterval=e.subscribeRetryInterval||5e3}attached(e){this.cable=e}subscribe(e,t){let r={channel:e};t&&Object.assign(r,t);let l=Em(r);if(this.pendingUnsubscriptions[l]){let u=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${u}`,l),new Promise(b=>{setTimeout(()=>{b(this.subscribe(e,t))},u)})}if(this.pendingSubscriptions[l])return this.logger.warn("subscription is already pending, skipping",l),Promise.reject(Error("Already subscribing"));let d=this.subscribeRetryInterval;return new Promise((u,b)=>{let p=++xC;this.pendingSubscriptions[l]={resolve:u,reject:b,id:p},this.cable.send(this.buildSubscribeRequest(l)),this.maybeRetrySubscribe(p,l,d)})}buildSubscribeRequest(e){return{command:"subscribe",identifier:e}}maybeRetrySubscribe(e,t,r){setTimeout(()=>{let l=this.pendingSubscriptions[t];l&&l.id===e&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,t),this.cable.send(this.buildSubscribeRequest(t)),this.maybeExpireSubscribe(e,t,r))},r)}maybeExpireSubscribe(e,t,r){setTimeout(()=>{let l=this.pendingSubscriptions[t];l&&l.id===e&&(delete this.pendingSubscriptions[t],l.reject(new fC(`Haven't received subscription ack in ${r*2}ms for ${t}`)))},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,t,r){return t==="$whisper"?this.whisper(e,r):(r||(r={}),r.action=t,this.cable.send({command:"message",identifier:e,data:JSON.stringify(r)}),Promise.resolve())}whisper(e,t){return this.cable.send({command:"whisper",identifier:e,data:t}),Promise.resolve()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:l,reason:d,reconnect:u}=e;if(t==="ping")return this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="welcome"){let b=e.sid;return b&&this.cable.setSessionId(b),this.cable.connected()}if(t==="disconnect"){let b=new zi(d);this.reset(b),u===!1?this.cable.closed(b):this.cable.disconnected(b);return}if(t==="confirm_subscription"){let b=this.pendingSubscriptions[r];if(!b){this.logger.error("subscription not found, unsubscribing",{type:t,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],b.resolve(r)}if(t==="reject_subscription"){let b=this.pendingSubscriptions[r];return b?(delete this.pendingSubscriptions[r],b.reject(new Th)):this.logger.error("subscription not found",{type:t,identifier:r})}if(l)return{identifier:r,message:l};this.logger.warn(`unknown message type: ${t}`,{message:e})}reset(e){for(let t in this.pendingSubscriptions)this.pendingSubscriptions[t].reject(e);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Om=()=>Date.now()/1e3|0;class kC extends Lm{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=Om()),this.sessionId=void 0,this.sendPongs=e.pongs}reset(e){for(let t in this.pendingPresence)this.pendingPresence[t].reject(e);return this.pendingPresence={},super.reset()}receive(e){if(typeof e!="object"){this.logger.error("unsupported message format",{message:e});return}let{type:t,identifier:r,message:l}=e;if(t==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(e);if(t==="reject_subscription")return super.receive(e);if(t==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(e);if(t==="ping")return this.restoreSince&&(this.restoreSince=Om()),this.sendPongs&&this.sendPong(),this.cable.keepalive(e.message);if(this.cable.keepalive(),t==="confirm_history"){this.logger.debug("history result received",e),this.cable.notify("history_received",r);return}if(t==="reject_history"){this.logger.warn("failed to retrieve history",e),this.cable.notify("history_not_found",r);return}if(t==="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 u of d)this.cable.send({identifier:u,command:"history",history:this.historyRequestFor(u)}),this.presenceInfo[u]&&this.cable.send({identifier:u,command:"join",presence:this.presenceInfo[u]});return this.cable.restored(d)}return this.cable.connected(this.sessionId)}if(t==="presence"){let d=l.type;if(d==="info"){let u=this.pendingPresence[r];u&&(delete this.pendingPresence[r],u.resolve(l))}else if(d==="error"){let u=this.pendingPresence[r];u&&(delete this.pendingPresence[r],u.reject(new Error("failed to retrieve presence")))}return{type:t,identifier:r,message:l}}if(l){let d=this.trackStreamPosition(r,e.stream_id,e.epoch,e.offset);return{identifier:r,message:l,meta:d}}this.logger.warn(`unknown message type: ${t}`,{message:e})}perform(e,t,r){switch(t){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,t,r)}unsubscribe(e){return delete this.presenceInfo[e],super.unsubscribe(e)}buildSubscribeRequest(e){let t=super.buildSubscribeRequest(e),r=this.historyRequestFor(e);r&&(t.history=r,this.pendingHistory[e]=!0);let l=this.presenceInfo[e];return l&&(t.presence=l),t}recoverableClosure(){return!!this.sessionId}historyRequestFor(e){let t={},r=!1;if(this.subscriptionStreams[e])for(let l of this.subscriptionStreams[e]){let d=this.streamsPositions[l];d&&(r=!0,t[l]=d)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:t}}trackStreamPosition(e,t,r,l){if(!(!t||!r))return this.subscriptionStreams[e]||(this.subscriptionStreams[e]=new Set),this.subscriptionStreams[e].add(t),this.streamsPositions[t]={epoch:r,offset:l},{stream:t,epoch:r,offset:l}}async sendPong(){await new Promise(e=>setTimeout(e,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(e,t){return this.presenceInfo[e]=t,this.cable.send({command:"join",identifier:e,presence:t}),Promise.resolve()}async leave(e,t){return delete this.presenceInfo[e],this.cable.send({command:"leave",identifier:e,presence:t}),Promise.resolve()}presence(e,t){return this.pendingPresence[e]?(this.logger.warn("presence is already pending, skipping",e),Promise.reject(Error("presence request is already pending"))):new Promise((r,l)=>{this.pendingPresence[e]={resolve:r,reject:l},this.cable.send({command:"presence",identifier:e,data:t})})}}class SC extends al{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class Mh extends Tm{constructor(e,t){super(t),this.channelId=e}set channelId(e){this._channelId=e}get channelId(){return this._channelId}}cc(Mh,"identifier","__ghost__");const _C="$pubsub";class Rh extends Tm{async perform(e,t){if(e.startsWith("$"))return super.perform(e,t);throw Error("not implemented")}}cc(Rh,"identifier",_C);const Ts=Symbol("state");let CC=class{constructor({transport:n,protocol:e,encoder:t,logger:r,lazy:l,hubOptions:d,performFailures:u,transportConfigurator:b}){this.emitter=xc(),this.transport=n,this.encoder=t,this.logger=r||new ll,this.protocol=e,this.performFailures=u||"throw",this.protocol.attached(this),this.hub=new bC(d||{}),this[Ts]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=b,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,l===!1&&this.connect().catch(()=>{})}get state(){return this[Ts]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[Ts]="connecting";let e=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(t){this.handleClose(t)}return e}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[Ts]="connected",this.recovering&&this.hub.subscriptions.all().forEach(e=>e.notify("disconnected",new zi("recovery_failed"))),this.hub.subscriptions.all().forEach(e=>this._resubscribe(e));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[Ts]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new zi("recovery_failed")),this._resubscribe(r))});let e=!this.initialConnect,t=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}notify(n,e,t){e&&typeof e!="string"&&(t=e,e=void 0),e?this.hub.notify(e,"info",{type:n,data:t}):this.emit("info",{type:n,data:t})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new zi(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[Ts]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(e=>e.notify("connecting")):this.hub.subscriptions.all().forEach(e=>{e.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let e;n&&(e=n instanceof zi?n:new zi(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[Ts]="closed";let t=e||new zi("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",t)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",e)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let e=this.encoder.decode(n);if(e===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",e);let t=this.protocol.receive(e);if(t){this.logger.debug("processed incoming message",t);let{type:r,identifier:l,message:d,meta:u}=t;r?this.hub.notify(l,r,d):this.hub.transmit(l,d,u)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let e=this.encoder.encode(n);if(e===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(e)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let e=new Rh({stream_name:n});return this.subscribe(e)}streamFromSigned(n){let e=new Rh({signed_stream_name:n});return this.subscribe(e)}subscribeTo(n,e){let t,r;return typeof n=="string"&&(r=n,n=Mh),t=r?new n(r,e):new n(e),this.subscribe(t)}subscribe(n){if(!n.attached(this))return n;let e=n.identifier;n.connecting();let t=this.hub.subscriptions.get(e)||this.hub.subscriptions.create(e,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return t.add(n),t.intent==="subscribed"&&t.state==="connected"&&n.connected(),t.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,e,t){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let l=await n.acquire("subscribed");if(l.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),l.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),l.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),l.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),l.release();return}let d={identifier:e,params:t};this.logger.debug("subscribing",d);try{let u=await this.protocol.subscribe(e,t);this.hub.subscribe(r,u),this.logger.debug("subscribed",{...d,remoteId:u}),n.notify("connected")}catch(u){if(u){if(u instanceof Th&&this.logger.warn("rejected",d),u instanceof zi){this.logger.debug("disconnected during subscription; will retry on connect",d),l.release();return}this.logger.error("failed to subscribe",{error:u,...d})}n.close(u),this.hub.unsubscribe(r)}l.release()}unsubscribe(n){let e=n.identifier,t=this.hub.subscriptions.get(e);if(!t)throw Error(`Subscription not found: ${e}`);t.remove(n),n.closed(),t.maybeUnsubscribe()}async _unsubscribe(n){let e=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:e});let t=await n.acquire("unsubscribed");if(t.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:e}),t.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:e}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:e,intent:n.intent}),t.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:e}),t.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:e}),n.close(),this.hub.unsubscribe(e),t.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:e})}catch(l){l&&(l instanceof zi?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:e,error:l}):this.logger.error("unsubscribe failed",{id:e,error:l}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(e)):n.state="closed",t.release()}async perform(n,e,t){if(this.performFailures==="throw")return this._perform(n,e,t);try{return await this._perform(n,e,t)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,e,t){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new SC;let r=this.hub.subscriptions.get(n);if(!r)throw Error(`Subscription not found: ${n}`);if(await r.pending("subscribed"),r.intent!=="subscribed")throw Error(`Subscription is closed: ${n}`);let l=r.remoteId,d={id:l,action:e,payload:t};this.logger.debug("perform",d);try{let u=await this.protocol.perform(l,e,t);return u&&this.logger.debug("perform result",{message:u,request:d}),u}catch(u){throw this.logger.error("perform failed",{error:u,request:d}),u}}on(n,e){return this.emitter.on(n,e)}once(n,e){let t=this.emitter.on(n,(...r)=>{t(),e(...r)});return t}emit(n,...e){return this.emitter.emit(n,...e)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,e)=>{let t=[()=>delete this._pendingConnect];t.push(this.on("connect",()=>{t.forEach(r=>r()),n()})),t.push(this.on("close",r=>{t.forEach(l=>l()),e(r)})),t.push(this.on("disconnect",r=>{t.forEach(l=>l()),e(r)}))}),this._pendingConnect)}};const $C={maxMissingPings:2,maxReconnectAttempts:1/0},ga=()=>Date.now(),Im=(n,e)=>{e=e||{};let{backoffRate:t,jitterRatio:r,maxInterval:l}=e;return t=t||2,r===void 0&&(r=.5),d=>{let u=n*t**d,b=u*t,p=u+(b-u)*Math.random(),g=2*(Math.random()-.5)*r;return p=p*(1+g),l&&l<p&&(p=l),p}};let Nm=class{constructor({pingInterval:n,...e}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(e=Object.assign({},$C,e),this.strategy=e.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=e.maxMissingPings,this.maxReconnectAttempts=e.maxReconnectAttempts,this.logger=e.logger||new ll,this.state="pending_connect",this.attempts=0,this.disconnectedAt=ga()}watch(n){this.target=n,this.initListeners()}reconnectNow(){return this.state==="connected"||this.state==="pending_connect"||this.state==="closed"?!1:(this.cancelReconnect(),this.state="pending_connect",this.target.connect().catch(n=>{this.logger.info("Failed at reconnecting: "+n)}),!0)}initListeners(){this.unbind=[],this.unbind.push(this.target.on("connect",()=>{this.attempts=0,this.pingedAt=ga(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=ga(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=ga(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=ga()})),this.unbind.push(()=>{this.cancelReconnect(),this.stopPolling()})}dispose(){delete this.target,this.unbind&&this.unbind.forEach(n=>n()),delete this.unbind}startPolling(){this.pollId&&clearTimeout(this.pollId);let n=this.pingInterval+(Math.random()-.5)*this.pingInterval*.5;this.pollId=setTimeout(()=>{this.checkStale(),this.state==="connected"&&this.startPolling()},n)}stopPolling(){this.pollId&&clearTimeout(this.pollId)}checkStale(){let n=ga()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new pC))}scheduleReconnect(){if(this.attempts>=this.maxReconnectAttempts){this.target.close();return}let n=this.strategy(this.attempts);this.attempts++,this.logger.info(`Reconnecting in ${n}ms (${this.attempts} attempt)`),this.state="pending_reconnect",this.reconnnectId=setTimeout(()=>this.reconnectNow(),n)}cancelReconnect(){this.reconnnectId&&(clearTimeout(this.reconnnectId),delete this.reconnnectId)}};class AC{constructor(e,t={}){this.transports=e,this.transport=null,this.emitter=xc(),this.unbind=[],this.logger=t.logger||new ll}displayName(){return"fallbacked transport"}async open(){for(let e=0;e<this.transports.length;e++){let t=this.transports[e];try{this.transport=t,this.resetListeners(),this.logger.debug(`Trying to connect via ${t.displayName()}`),await t.open(),this.logger.debug(`Connected via ${t.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${t.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,t){this.transports.forEach(r=>{r.setParam(e,t)})}setToken(e,t){this.transports.forEach(r=>{r.setToken(e,t)})}on(e,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});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 EC{constructor(e,t={}){this.url=e;let r=t.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=xc();let{format:l,subprotocol:d,authStrategy:u}=t;this.format=l||"text",this.connectionOptions=t.websocketOptions,this.authStrategy=u||"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((t,r)=>{let l=[];l.push(this.once("open",()=>{l.forEach(d=>d()),t()})),l.push(this.once("close",()=>{l.forEach(d=>d()),r(Error("WS connection closed"))}))})}setURL(e){this.url=e}setParam(e,t){let r=new URL(this.url);r.searchParams.set(e,t);let l=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(l)}setToken(e,t="jid"){if(this.authStrategy==="param")this.setParam(t,e);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${t}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(l=>l.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,t){return this.emitter.on(e,t)}once(e,t){let r=this.emitter.on(e,(...l)=>{r(),t(...l)});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 t=e.data;this.format==="binary"&&(t=new Uint8Array(t)),this.emitter.emit("data",t)},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 Dm={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function TC(n,e){if(typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),e=e||{},!n&&!e.transport)throw Error("URL or transport must be specified");e=Object.assign({},Dm,e);let{protocol:t,websocketImplementation:r,websocketFormat:l,websocketOptions:d,websocketAuthStrategy:u,fallbacks:b,logLevel:p,logger:g,transport:o,encoder:c,lazy:f,monitor:h,pingInterval:i,reconnectStrategy:a,maxMissingPings:m,maxReconnectAttempts:w,subprotocol:x,tokenRefresher:T,historyTimestamp:$,protocolOptions:S,concurrentSubscribes:k,performFailures:L,transportConfigurator:N,auth:R}=e;if(g=g||new ll(p),typeof t=="string"){x=x||t;let P=t.substring(0,t.lastIndexOf("-")),D=t.substring(t.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")t=new Lm({logger:g,...S});else if(P==="actioncable-v1-ext")t=new kC({logger:g,historyTimestamp:$,...S});else throw Error(`Protocol is not supported yet: ${t}`);if(D==="json")c=c||new wC,l=l||"text";else if(D==="msgpack"){if(l="binary",!c)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(D==="protobuf"){if(l=l||"binary",!c)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: ${t}`)}if(!t)throw Error("Protocol must be specified");o=o||new EC(n,{websocketImplementation:r,websocketOptions:d,subprotocol:x,authStrategy:u,format:l}),b&&(o=new AC([o,...b],{logger:g})),R&&R.token&&o.setToken(R.token,R.param||"jid"),a=a||Im(i),h!==!1&&(h=h||new Nm({pingInterval:i,reconnectStrategy:a,maxMissingPings:m,maxReconnectAttempts:w,logger:g}));let O={concurrentSubscribes:k},W=new CC({protocol:t,transport:o,encoder:c,logger:g,lazy:f,hubOptions:O,performFailures:L,transportConfigurator:N});return h&&(h.watch(W),W.monitor=h),T&&MC(W,async()=>{try{await T(o)}catch(P){return g.error("Failed to refresh authentication token: "+P),!1}return W.connect().catch(()=>{}),!0}),W}function MC(n,e){let t=!1;n.on("connect",()=>t=!1),n.on("close",async r=>{if(r){if(t){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(t=!0,await e())}})}class RC{constructor(e){this.channel=e}notify(e,...t){typeof this[e]=="function"&&this[e](...t)}perform(e,t={}){this.channel.perform(e,t)}send(e){this.channel.send(e)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class LC extends Mh{constructor(e,t,r){super(e,t),this.subscription=new RC(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:l})=>this.subscription.notify("connected",{reconnected:l})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",l=>this.subscription.notify("received",l)),this.on("close",l=>{l&&l instanceof Th?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class OC{constructor(e){this.cable=e}create(e,t){let r,l;typeof e=="object"?(r=e.channel,delete e.channel,l=e):(r=e,l={});let d=new LC(r,l,t);return d.subscription.notify("initialized"),this.cable.subscribe(d),d.subscription}findAll(e){return this.cable.hub.channels.filter(t=>t.identifier===e).map(t=>t.subscription)}}class IC{constructor(e){this.cable=e,this.subscriptions=new OC(e)}}class NC extends Rm{writeLogEntry(e,t,r){r?console[e](t,r):console[e](t)}}class DC extends Nm{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")},t=l=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:l})},r=()=>this.disconnect(new zi("page_frozen"));document.addEventListener("visibilitychange",e,!1),window.addEventListener("focus",t,!1),window.addEventListener("online",t,!1),window.addEventListener("resume",t,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",e,!1),window.removeEventListener("focus",t,!1),window.removeEventListener("online",t,!1),window.removeEventListener("resume",t,!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 FC=["cable","action-cable"],PC="/cable",kc=(n,e)=>{for(let t of FC){let r=n.head.querySelector(`meta[name='${t}-${e}']`);if(r)return r.getAttribute("content")}},Fm=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,BC=()=>{if(typeof document<"u"&&document.head){let n=kc(document,"url");if(n)return Fm(n)}return Fm(PC)},jC=()=>{if(typeof document<"u"&&document.head){let n=kc(document,"history-timestamp");if(n)return n|0}},WC=()=>{if(typeof document<"u"&&document.head)return kc(document,"token")},zC=()=>{if(typeof document<"u"&&document.head)return kc(document,"token-param")};function HC(n,e){typeof n=="object"&&typeof e>"u"&&(e=n,n=void 0),n=n||BC(),e=e||{},e.historyTimestamp||(e.historyTimestamp=jC());let t=WC();if(t){let g=zC();e.auth=Object.assign({token:t,param:g},e.auth||{})}e=Object.assign({},Dm,e);let{logLevel:r,logger:l,pingInterval:d,reconnectStrategy:u,maxMissingPings:b,maxReconnectAttempts:p}=e;return l=e.logger=e.logger||new NC(r),u=e.reconnectStrategy=e.reconnectStrategy||Im(d),e.monitor!==!1&&(e.monitor=e.monitor||new DC({pingInterval:d,reconnectStrategy:u,maxMissingPings:b,maxReconnectAttempts:p,logger:l})),TC(n,e)}function UC(n,e){let t=HC(n,e);return new IC(t)}class qC{constructor(e="/openc3-api/cable"){this._cable=null,this._url=e}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(e,t,r={},l={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(d=>{if(d&&OpenC3Auth.setTokens(),this._cable==null){let u=this._url+"?scope="+encodeURIComponent(t)+"&authorization="+encodeURIComponent(localStorage.openc3Token);u=new URL(u,document.baseURI).href,this._cable=UC(u)}return this._cable.subscriptions.create({channel:e,...l},r)})}recordPing(){}}Si("P",qC);class VC{constructor(e,t,r="",l=""){this.keyword=e.keyword,this.parameters=e.parameters,this.filename=e.filename,this.line=e.line,this.lineNumber=e.lineNumber,this.message=t,this.usage=r,this.url=l}}Si("k",VC);function cl(n){return KC.test(n)}const KC=/^-?[0-9]+$/;function Pm(n){return GC.test(n)}const GC=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Bm(n,e){if(cl(n))return Number.isSafeInteger(Number.parseInt(n,10));const t=Number.parseFloat(n),r=String(t);if(n===r)return!0;const l=jm(n),d=jm(r);return!!(l===d||(e==null?void 0:e.approx)===!0&&!cl(n)&&d.length>=14&&l.startsWith(d.substring(0,14)))}let ul=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function YC(n){if(Bm(n,{approx:!1}))return;if(cl(n))return ul.truncate_integer;const e=Number.parseFloat(n);return Number.isFinite(e)?e===0?ul.underflow:ul.truncate_float:ul.overflow}function jm(n){const{start:e,end:t}=XC(n),r=n.substring(e,t),l=r.indexOf(".");return l===-1?r:r.substring(0,l)+r.substring(l+1)}function XC(n){let e=0;for(n[0]==="-"&&e++;n[e]==="0"||n[e]===".";)e++;let t=n.lastIndexOf("e");for(t===-1&&(t=n.lastIndexOf("E")),t===-1&&(t=n.length);(n[t-1]==="0"||n[t-1]===".")&&t>e;)t--;return{start:e,end:t}}class QC{constructor(e){if(cc(this,"isLosslessNumber",!0),!Pm(e))throw new Error(`Invalid number (value: "${e}")`);this.value=e}valueOf(){const e=YC(this.value);if(e===void 0||e===ul.truncate_float)return Number.parseFloat(this.value);if(cl(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${e} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function ZC(n){return n&&typeof n=="object"&&n.isLosslessNumber||!1}function JC(n){return new QC(n)}function e$(n,e){return Lh({"":n},"",n,e)}function Lh(n,e,t,r){return Array.isArray(t)?r.call(n,e,n$(t,r)):t&&typeof t=="object"&&!ZC(t)?r.call(n,e,t$(t,r)):r.call(n,e,t)}function t$(n,e){for(const t of Object.keys(n)){const r=Lh(n,t,n[t],e);r!==void 0?n[t]=r:delete n[t]}return n}function n$(n,e){for(let t=0;t<n.length;t++)n[t]=Lh(n,String(t),n[t],e);return n}function r$(n,e,t){const r=typeof t=="function"?{parseNumber:t}:t,l=(r==null?void 0:r.parseNumber)??JC,d=(r==null?void 0:r.onDuplicateKey)??L;let u=0;const b=o();return w(b),T(),e?e$(b,e):b;function p(){if(n.charCodeAt(u)===c$){u++,f();const j={};let U=!0;for(;u<n.length&&n.charCodeAt(u)!==zm;){U?U=!1:(a(),f());const K=u,Z=h();if(Z===void 0){k();return}f(),m();const J=o();if(J===void 0){P();return}if(Object.prototype.hasOwnProperty.call(j,Z)&&!Oh(J,j[Z])){const ae=d({key:Z,position:K+1,oldValue:j[Z],newValue:J});ae!==void 0&&(j[Z]=ae)}else j[Z]=J}return n.charCodeAt(u)!==zm&&N(),u++,j}}function g(){if(n.charCodeAt(u)===u$){u++,f();const j=[];let U=!0;for(;u<n.length&&n.charCodeAt(u)!==Hm;){U?U=!1:a();const K=o();x(K),j.push(K)}return n.charCodeAt(u)!==Hm&&R(),u++,j}}function o(){f();const j=h()??i()??p()??g()??c("true",!0)??c("false",!1)??c("null",null);return f(),j}function c(j,U){if(n.slice(u,u+j.length)===j)return u+=j.length,U}function f(){for(;i$(n.charCodeAt(u));)u++}function h(){if(n.charCodeAt(u)===Ih){u++;let j="";for(;u<n.length&&n.charCodeAt(u)!==Ih;){if(n.charCodeAt(u)===l$){const U=n[u+1],K=a$[U];K!==void 0?(j+=K,u++):U==="u"?Sc(n.charCodeAt(u+2))&&Sc(n.charCodeAt(u+3))&&Sc(n.charCodeAt(u+4))&&Sc(n.charCodeAt(u+5))?(j+=String.fromCharCode(Number.parseInt(n.slice(u+2,u+6),16)),u+=5):D(u):W(u)}else s$(n.charCodeAt(u))?j+=n[u]:O(n[u]);u++}return S(),u++,j}}function i(){const j=u;if(n.charCodeAt(u)===Um&&(u++,$(j)),n.charCodeAt(u)===Nh)u++;else if(o$(n.charCodeAt(u)))for(u++;_c(n.charCodeAt(u));)u++;if(n.charCodeAt(u)===y$)for(u++,$(j);_c(n.charCodeAt(u));)u++;if(n.charCodeAt(u)===S$||n.charCodeAt(u)===k$)for(u++,(n.charCodeAt(u)===Um||n.charCodeAt(u)===g$)&&u++,$(j);_c(n.charCodeAt(u));)u++;if(u>j)return l(n.slice(j,u))}function a(){if(n.charCodeAt(u)!==v$)throw new SyntaxError(`Comma ',' expected after value ${I()}`);u++}function m(){if(n.charCodeAt(u)!==b$)throw new SyntaxError(`Colon ':' expected after property name ${I()}`);u++}function w(j){if(j===void 0)throw new SyntaxError(`JSON value expected ${I()}`)}function x(j){if(j===void 0)throw new SyntaxError(`Array item expected ${I()}`)}function T(){if(u<n.length)throw new SyntaxError(`Expected end of input ${I()}`)}function $(j){if(!_c(n.charCodeAt(u))){const U=n.slice(j,u);throw new SyntaxError(`Invalid number '${U}', expecting a digit ${I()}`)}}function S(){if(n.charCodeAt(u)!==Ih)throw new SyntaxError(`End of string '"' expected ${I()}`)}function k(){throw new SyntaxError(`Quoted object key expected ${I()}`)}function L(j){let{key:U,position:K}=j;throw new SyntaxError(`Duplicate key '${U}' encountered at position ${K}`)}function N(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${I()}`)}function R(){throw new SyntaxError(`Array item or end of array ']' expected ${I()}`)}function O(j){throw new SyntaxError(`Invalid character '${j}' ${A()}`)}function W(j){const U=n.slice(j,j+2);throw new SyntaxError(`Invalid escape character '${U}' ${A()}`)}function P(){throw new SyntaxError(`Object value expected after ':' ${A()}`)}function D(j){const U=n.slice(j,j+6);throw new SyntaxError(`Invalid unicode character '${U}' ${A()}`)}function A(){return`at position ${u}`}function _(){return u<n.length?`but got '${n[u]}'`:"but reached end of input"}function I(){return`${_()} ${A()}`}}function i$(n){return n===h$||n===d$||n===f$||n===p$}function Sc(n){return n>=Nh&&n<=Dh||n>=w$&&n<=_$||n>=x$&&n<=C$}function _c(n){return n>=Nh&&n<=Dh}function o$(n){return n>=m$&&n<=Dh}function s$(n){return n>=32&&n<=1114111}function Oh(n,e){return n===e?!0:Array.isArray(n)&&Array.isArray(e)?n.length===e.length&&n.every((t,r)=>Oh(t,e[r])):Wm(n)&&Wm(e)?[...new Set([...Object.keys(n),...Object.keys(e)])].every(t=>Oh(n[t],e[t])):!1}function Wm(n){return typeof n=="object"&&n!==null}const a$={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1404
+ `,r:"\r",t:" "},l$=92,c$=123,zm=125,u$=91,Hm=93,h$=32,d$=10,f$=9,p$=13,Ih=34,g$=43,Um=45,Nh=48,m$=49,Dh=57,v$=44,y$=46,b$=58,w$=65,x$=97,k$=69,S$=101,_$=70,C$=102;function qm(n,e,t,r){return l(n);function l(p,g){if(Array.isArray(r)){const o=r.find(c=>c.test(p));if(o){const c=o.stringify(p);if(typeof c!="string"||!Pm(c))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${c})`);return c}}if(typeof p=="boolean"||typeof p=="number"||typeof p=="string"||p===null||p instanceof Date||p instanceof Boolean||p instanceof Number||p instanceof String)return JSON.stringify(p);if(p!=null&&p.isLosslessNumber||typeof p=="bigint")return p.toString();if(Array.isArray(p))return d(p);if(p&&typeof p=="object")return u(p)}function d(p,g){if(p.length===0)return"[]";let o="[";for(let c=0;c<p.length;c++){const f=p[c];typeof f<"u"&&typeof f!="function"?o+=l(f):o+="null",c<p.length-1&&(o+=",")}return o+="]",o}function u(p,g){if(typeof p.toJSON=="function")return qm(p.toJSON(),e,t,void 0);const o=Array.isArray(e)?e.map(String):Object.keys(p);if(o.length===0)return"{}";let c=!0,f="{";for(const h of o){const i=p[h];if(b(h,i)){c?c=!1:f+=",";const a=JSON.stringify(h);f+=`${a}:`,f+=l(i)}}return f+="}",f}function b(p,g){return typeof g<"u"&&typeof g!="function"&&typeof g!="symbol"}}function $$(n){return cl(n)&&!Bm(n)?BigInt(n):parseFloat(n)}class Vm{constructor(){cc(this,"id",1)}async exec(e,t,r={},l={},d=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,l.manual=!0,(await Ah.post("/openc3-api/api",{jsonrpc:"2.0",method:e,params:t,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...l},timeout:d,transformRequest:[(u,b)=>qm(u)],transformResponse:[u=>r$(u,void 0,$$)]})).data.result}catch(u){let b=new Error;throw u.response?(b.name=u.response.data.error.data.class,b.message=u.response.data.error.data.message,b.object=u.response.data.error):u.request?(b.name="Request error",b.message="Request error, no response received"):b=u,b}}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,t,r,l,d){return this.exec("map_target_to_interface",[e,t],{cmd_only:r,tlm_only:l,unmap_old:d})}unmap_target_from_interface(e,t,r,l){return this.exec("unmap_target_from_interface",[e,t],{cmd_only:r,tlm_only:l})}connect_interface(e,...t){return t.length>0?this.exec("connect_interface",[e,...t]):this.exec("connect_interface",[e])}disconnect_interface(e){return this.exec("disconnect_interface",[e])}interface_cmd(e,t,...r){return this.exec("interface_cmd",[e,t,...r])}interface_target_enable(e,t,r=!1,l=!1){return this.exec("interface_target_enable",[e,t],{cmd_only:r,tlm_only:l})}interface_target_disable(e,t,r=!1,l=!1){return this.exec("interface_target_disable",[e,t],{cmd_only:r,tlm_only:l})}interface_details(e){return this.exec("interface_details",[e])}get_all_router_info(){return this.exec("get_all_router_info",[])}map_target_to_router(e,t,r,l,d){return this.exec("map_target_to_router",[e,t],{cmd_only:r,tlm_only:l,unmap_old:d})}unmap_target_from_router(e,t,r,l){return this.exec("unmap_target_from_router",[e,t],{cmd_only:r,tlm_only:l})}connect_router(e){return this.exec("connect_router",[e])}disconnect_router(e){return this.exec("disconnect_router",[e])}router_target_enable(e,t,r=!1,l=!1){return this.exec("router_target_enable",[e,t],{cmd_only:r,tlm_only:l})}router_target_disable(e,t,r=!1,l=!1){return this.exec("router_target_disable",[e,t],{cmd_only:r,tlm_only:l})}router_details(e){return this.exec("router_details",[e])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(e){return this.exec("get_tlm_cnts",[e])}get_item(e,t,r){return this.exec("get_item",[e,t,r])}get_param(e,t,r){return this.exec("get_param",[e,t,r])}get_parameter(e,t,r){return this.exec("get_param",[e,t,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,t){return this.exec("get_tlm",[e,t])}get_telemetry(e,t){return this.exec("get_tlm",[e,t])}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,t=!1){return this.exec("get_all_tlm_names",[e],{hidden:t})}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,t,r,l=30){const d=await this.exec("get_tlm_packet",[e,t],{type:r,stale_time:l});if(d!=null){let u=d.length,b=null;for(let p=0;p<u;p++)b=this.decode_openc3_type(d[p][1]),b!==null&&(d[p][1]=b)}return d}get_packet_derived_items(e,t){return this.exec("get_packet_derived_items",[e,t])}get_tlm_buffer(e,t){return this.exec("get_tlm_buffer",[e,t])}get_tlm_available(e){return this.exec("get_tlm_available",[e])}async get_tlm_values(e,t=30,r=null,l=null,d=null){let u={stale_time:t};r!==null&&(u.cache_timeout=r),l!==null&&(u.start_time=l.toISOString()),d!==null&&(u.end_time=d.toISOString());const b=await this.exec("get_tlm_values",[e],u,{},1e4);if(b&&b.length>0){let p=b.length,g=null;for(let o=0;o<p;o++)g=this.decode_openc3_type(b[o][0]),g!==null&&(b[o][0]=g)}return b}get_limits(e,t,r){return this.exec("get_limits",[e,t,r])}async tlm(e,t,r,l="CONVERTED"){let d=null;if(t===void 0)d=await this.exec("tlm",[e]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(t))d=await this.exec("tlm",[e],{type:t});else{let b=new Error;throw b.name="TypeError",b.message=`Invalid data type ${t}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,b}else d=await this.exec("tlm",[e,t,r],{type:l});let u=this.decode_openc3_type(d);return u!==null&&(d=u),d}async inject_tlm(e,t,r=null,l="CONVERTED"){await this.exec("inject_tlm",[e,t,r],{type:l})}set_tlm(e,t,r,l){return this.exec("set_tlm",[e,t,r],{type:l})}override_tlm(e,t,r,l){return this.exec("override_tlm",[e,t,r],{type:l})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(e,t,r,l){return this.exec("normalize_tlm",[e,t,r],{type:l})}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,t=!1){return this.exec("get_all_cmd_names",[e],{hidden:t})}get_all_command_names(e){return this.exec("get_all_cmd_names",[e])}get_cmd(e,t){return this.exec("get_cmd",[e,t])}get_command(e,t){return this.exec("get_cmd",[e,t])}get_cmd_cnts(e){return this.exec("get_cmd_cnts",[e])}get_cmd_value(e,t,r,l="CONVERTED"){return this.exec("get_cmd_value",[e,t,r,l])}get_cmd_buffer(e,t){return this.exec("get_cmd_buffer",[e,t])}_cmd(e,t,r,l,d,u={}){let b=null;for(let p in l)Object.prototype.hasOwnProperty.call(l,p)&&(b=this.encode_openc3_type(l[p]),b!==null&&(l[p]=b));return this.exec(e,[t,r,l],u,d)}get_cmd_hazardous(e,t,r,l={}){return t===void 0?this.exec("get_cmd_hazardous",e,{},l):this._cmd("get_cmd_hazardous",e,t,r,l)}cmd(e,t,r,l={},d={}){return t===void 0?this.exec("cmd",e,d,l):this._cmd("cmd",e,t,r,l,d)}cmd_no_range_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_range_check",e,d,l):this._cmd("cmd_no_range_check",e,t,r,l,d)}cmd_raw(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw",e,d,l):this._cmd("cmd_raw",e,t,r,l,d)}cmd_raw_no_range_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_range_check",e,d,l):this._cmd("cmd_raw_no_range_check",e,t,r,l,d)}cmd_no_hazardous_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_hazardous_check",e,d,l):this._cmd("cmd_no_hazardous_check",e,t,r,l,d)}cmd_no_checks(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_no_checks",e,d,l):this._cmd("cmd_no_checks",e,t,r,l,d)}cmd_raw_no_hazardous_check(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_hazardous_check",e,d,l):this._cmd("cmd_raw_no_hazardous_check",e,t,r,l,d)}cmd_raw_no_checks(e,t,r,l={},d={}){return t===void 0?this.exec("cmd_raw_no_checks",e,d,l):this._cmd("cmd_raw_no_checks",e,t,r,l,d)}build_cmd(e,t,r,l={},d={}){return t===void 0?this.exec("build_cmd",e,d,l):this._cmd("build_cmd",e,t,r,l,d)}build_command(e,t,r,l={},d={}){return t===void 0?this.exec("build_cmd",e,d,l):this._cmd("build_cmd",e,t,r,l,d)}get_interface_names(){return this.exec("get_interface_names",[])}get_router_names(){return this.exec("get_router_names",[])}send_raw(e,t){return this.exec("send_raw",[e,t])}list_configs(e){return this.exec("list_configs",[e])}load_config(e,t){return this.exec("load_config",[e,t])}save_config(e,t,r){return this.exec("save_config",[e,t,r])}delete_config(e,t){return this.exec("delete_config",[e,t])}enable_limits(e,t,r){return this.exec("enable_limits",[e,t,r])}disable_limits(e,t,r){return this.exec("disable_limits",[e,t,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,t){return this.exec("get_setting",[e],t)}get_settings(e,t){return this.exec("get_settings",e,t)}set_setting(e,t){return this.exec("set_setting",[e,t])}update_news(){return this.exec("update_news",[])}update_plugin_store(){return this.exec("update_plugin_store",[])}save_setting(e,t){return this.exec("set_setting",[e,t])}get_metrics(){return this.exec("get_metrics",[])}async hashString(e){if(window.isSecureContext){const t=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",t),l=new Uint8Array(r);return Array.from(l).map(d=>d.toString(16).padStart(2,"0")).join("")}}}Si("B",Vm);var Km={exports:{}},Gm;function A$(){return Gm||(Gm=1,function(n,e){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(t,r,l){function d(g,o){function c(R,O,W){if(!(R.length<O)){var P=R.slice(0,O),D=R.slice(O),A=/^(?:(\s+)|(\S+)(\s+))/.exec(D),_=/(?:(\s+)|(\s+)(\S+))$/.exec(P),I=0,j=0;if(_&&!_[2]&&(I=O-_[1].length,j=O),A&&!A[2]&&(I||(I=O),j=O+A[1].length),I)return{start:I,end:j};if(_&&_[2]&&_.index>W)return{start:_.index,end:_.index+_[2].length};if(A&&A[2])return I=O+A[2].length,{start:I,end:I+A[3].length}}}for(var f=o.column||g.getOption("printMarginColumn"),h=o.allowMerge!=0,i=Math.min(o.startRow,o.endRow),a=Math.max(o.startRow,o.endRow),m=g.session;i<=a;){var w=m.getLine(i);if(w.length>f){var x=c(w,f,5);if(x){var T=/^\s*/.exec(w)[0];m.replace(new b(i,x.start,i,x.end),`
1405
+ `+T)}a++}else if(h&&/\S/.test(w)&&i!=a){var $=m.getLine(i+1);if($&&/\S/.test($)){var S=w.replace(/\s+$/,""),k=$.replace(/^\s+/,""),L=S+" "+k,x=c(L,f,5);if(x&&x.start>S.length||L.length<f){var N=new b(i,S.length,i+1,$.length-k.length);m.replace(N," "),i--,a--}else S.length<w.length&&m.remove(new b(i,S.length,i,w.length))}}i++}}function u(g){if(g.command.name=="insertstring"&&/\S/.test(g.args)){var o=g.editor,c=o.selection.cursor;if(c.column<=o.renderer.$printMarginColumn)return;var f=o.session.$undoManager.$lastDelta;d(o,{startRow:c.row,endRow:c.row,allowMerge:!1}),f!=o.session.$undoManager.$lastDelta&&o.session.markUndoGroup()}}var b=t("../range").Range,p=t("../editor").Editor;t("../config").defineOptions(p.prototype,"editor",{hardWrap:{set:function(g){g?this.commands.on("afterExec",u):this.commands.off("afterExec",u)},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(t,r,l){function d(y){return{row:y.line,column:y.ch}}function u(y){return new De(y.row,y.column)}function b(y,E,C){if(E.line===C.line&&E.ch>=C.ch-1){var F=y.getLine(E.line),B=F.charCodeAt(E.ch);55296<=B&&B<=55551&&(C.ch+=1)}return{start:E,end:C}}function p(y){y.setOption("disableInput",!0),y.setOption("showCursorWhenSelecting",!1),Be.signal(y,"vim-mode-change",{mode:"normal"}),y.on("cursorActivity",ss),L(y),Be.on(y.getInputField(),"paste",o(y))}function g(y){y.setOption("disableInput",!1),y.off("cursorActivity",ss),Be.off(y.getInputField(),"paste",o(y)),y.state.vim=null,fr&&clearTimeout(fr)}function o(y){var E=y.state.vim;return E.onPasteFn||(E.onPasteFn=function(){E.insertMode||(y.setCursor(ge(y.getCursor(),0,1)),On.enterInsertMode(y,{},E))}),E.onPasteFn}function c(y,E){return E>=y.firstLine()&&E<=y.lastLine()}function f(y){return/^[a-z]$/.test(y)}function h(y){return"()[]{}".indexOf(y)!=-1}function i(y){return ja.test(y)}function a(y){return Xt.test(y)}function m(y){return/^\s*$/.test(y)}function w(y){return".?!".indexOf(y)!=-1}function x(y,E){for(var C=0;C<E.length;C++)if(E[C]==y)return!0;return!1}function T(y,E,C,F,B){if(E===void 0&&!B)throw Error("defaultValue is required unless callback is provided");if(C||(C="string"),Bt[y]={type:C,defaultValue:E,callback:B},F)for(var z=0;z<F.length;z++)Bt[F[z]]=Bt[y];E&&$(y,E)}function $(y,E,C,F){var B=Bt[y];F=F||{};var z=F.scope;if(!B)return new Error("Unknown option: "+y);if(B.type=="boolean"){if(E&&E!==!0)return new Error("Invalid argument: "+y+"="+E);E!==!1&&(E=!0)}B.callback?(z!=="local"&&B.callback(E,void 0),z!=="global"&&C&&B.callback(E,C)):(z!=="local"&&(B.value=B.type=="boolean"?!!E:E),z!=="global"&&C&&(C.state.vim.options[y]={value:E}))}function S(y,E,C){var F=Bt[y];C=C||{};var B=C.scope;if(!F)return new Error("Unknown option: "+y);if(F.callback){var z=E&&F.callback(void 0,E);return B!=="global"&&z!==void 0?z:B!=="local"?F.callback():void 0}var z=B!=="global"&&E&&E.state.vim.options[y];return(z||B!=="local"&&F||{}).value}function k(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Rn()}function L(y){return y.state.vim||(y.state.vim={inputState:new A,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),y.state.vim}function N(){We={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:Ri(),macroModeState:new k,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var y in Bt){var E=Bt[y];E.value=E.defaultValue}}function R(y){function E(Y){typeof Y=="string"?mn.value=Y:mn=null}if(y[0]=="<"){var C=y.toLowerCase().slice(1,-1),F=C.split("-");if(C=F.pop()||"",C=="lt")y="<";else if(C=="space")y=" ";else if(C=="cr")y=`
1406
+ `;else if(Li[C]){var B=mn.value,z={key:Li[C],target:{value:B,selectionEnd:B.length,selectionStart:B.length}};mn.onKeyDown&&mn.onKeyDown(z,mn.value,E),mn&&mn.onKeyUp&&mn.onKeyUp(z,mn.value,E);return}}if(y==`
1407
1407
  `){var V=mn;mn=null,V.onClose&&V.onClose(V.value)}else mn.value=(mn.value||"")+y}function O(y,E,C){var F=sn;if(C){if(jr.indexOf(C)!=-1)return;jr.push(C),sn=C.noremap!=0}try{for(var B=L(y),z=/<(?:[CSMA]-)*\w+>|./gi,V;V=z.exec(E);){var Y=V[0],Q=B.insertMode;if(mn){R(Y);continue}var re=mt.handleKey(y,Y,"mapping");if(!re&&Q&&B.insertMode){if(Y[0]=="<"){var le=Y.toLowerCase().slice(1,-1),ye=le.split("-");if(le=ye.pop()||"",le=="lt")Y="<";else if(le=="space")Y=" ";else if(le=="cr")Y=`
1408
- `;else{if(Ri.hasOwnProperty(le)){Y=Ri[le],ls(y,Y);continue}Y=Y[0],z.lastIndex=V.index+1}}y.replaceSelection(Y)}}}finally{if(jr.pop(),sn=jr.length?F:!1,!jr.length&&mn){var ke=mn;mn=null,Mr(y,ke)}}}function W(y,E){var C=y.key;if(!Wr[C]){C.length>1&&C[0]=="n"&&(C=C.replace("Numpad","")),C=Zn[C]||C;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),Be.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||C.length>1)&&y.shiftKey&&(F+="S-"),E&&!E.expectLiteralNext&&C.length==1){if(Un.keymap&&C in Un.keymap)(Un.remapCtrl!=0||!F)&&(C=Un.keymap[C]);else if(C.charCodeAt(0)>255){var B=y.code&&y.code.slice(-1)||"";y.shiftKey||(B=B.toLowerCase()),B&&(C=B)}}return F+=C,F.length>1&&(F="<"+F+">"),F}}function P(y,E){Un.string!==y&&(Un=D(y)),Un.remapCtrl=E}function D(y){function E(F){return F.split(/\\?(.)/).filter(Boolean)}var C={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var B=F.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var z=E(B[1]),V=E(B[2]);if(z.length!==V.length)return;for(var Y=0;Y<z.length;++Y)C[z[Y]]=V[Y]}else if(B.length==1){var Q=E(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)C[Q[Y]]=Q[Y+1]}}}),{keymap:C,string:y}):{keymap:C,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(y,E){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,Be.signal(y,"vim-command-done",E)}function I(){this.removed=[],this.inserted=""}function j(y,E,C){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!C}function U(y,E){var C=We.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");C[y]=E,Yt.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new j,y["."]=new j,y[":"]=new j,y["/"]=new j,y["+"]=new j}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function J(y,E){ri[y]=E}function ae(y,E){for(var C=[],F=0;F<E;F++)C.push(y);return C}function ne(y,E){ds[y]=E}function se(y,E){On[y]=E}function ce(y,E,C){var F=y.state.vim,B=F.insertMode||F.visualMode,z=Math.min(Math.max(y.firstLine(),E.line),y.lastLine()),V=y.getLine(z),Y=V.length-1+ +!!B,Q=Math.min(Math.max(0,E.ch),Y),re=V.charCodeAt(Q);if(56320<=re&&re<=57343){var le=1;C&&C.line==z&&C.ch>Q&&(le=-1),Q+=le,Q>Y&&(Q-=2)}return new De(z,Q)}function he(y){var E={};for(var C in y)y.hasOwnProperty(C)&&(E[C]=y[C]);return E}function ge(y,E,C){return typeof E=="object"&&(C=E.ch,E=E.line),new De(y.line+E,y.ch+C)}function Ee(y,E,C,F){F.operator&&(C="operatorPending");for(var B,z=[],V=[],Y=sn?E.length-No:0,Q=Y;Q<E.length;Q++){var re=E[Q];C=="insert"&&re.context!="insert"||re.context&&re.context!=C||F.operator&&re.type=="action"||!(B=Te(y,re.keys))||(B=="partial"&&z.push(re),B=="full"&&V.push(re))}return{partial:z.length&&z,full:V.length&&V}}function Te(y,E){var C=E.slice(-11)=="<character>",F=E.slice(-10)=="<register>";if(C||F){var B=E.length-(C?11:10),z=y.slice(0,B),V=E.slice(0,B);return z==V&&y.length>B?"full":V.indexOf(z)==0?"partial":!1}return y==E?"full":E.indexOf(y)==0?"partial":!1}function Re(y){var E=/^.*(<[^>]+>)$/.exec(y),C=E?E[1]:y.slice(-1);if(C.length>1)switch(C){case"<CR>":C=`
1409
- `;break;case"<Space>":C=" ";break;default:C=""}return C}function Xe(y,E,C){return function(){for(var F=0;F<C;F++)E(y)}}function Ke(y){return new De(y.line,y.ch)}function dt(y,E){return y.ch==E.ch&&y.line==E.line}function rt(y,E){return y.line<E.line?!0:y.line==E.line&&y.ch<E.ch}function gt(y,E){return arguments.length>2&&(E=gt.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(y,E)?y:E}function tn(y,E){return arguments.length>2&&(E=tn.apply(void 0,Array.prototype.slice.call(arguments,1))),rt(y,E)?E:y}function Wn(y,E,C){var F=rt(y,E),B=rt(E,C);return F&&B}function Zt(y,E){return y.getLine(E).length}function hi(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function _n(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xn(y,E,C){var F=Zt(y,E),B=new Array(C-F+1).join(" ");y.setCursor(new De(E,F)),y.replaceRange(B,y.getCursor())}function ur(y,E){var C=[],F=y.listSelections(),B=Ke(y.clipPos(E)),z=!dt(E,B),V=y.getCursor("head"),Y=yt(F,V),Q=dt(F[Y].head,F[Y].anchor),re=F.length-1,le=re-Y>Y?re:0,ye=F[le].anchor,ke=Math.min(ye.line,B.line),me=Math.max(ye.line,B.line),be=ye.ch,Ne=B.ch,Ie=F[le].head.ch-be,He=Ne-be;Ie>0&&He<=0?(be++,z||Ne--):Ie<0&&He>=0?(be--,Q||Ne++):Ie<0&&He==-1&&(be--,Ne++);for(var st=ke;st<=me;st++){var Ye={anchor:new De(st,be),head:new De(st,Ne)};C.push(Ye)}return y.setSelections(C),E.ch=Ne,ye.ch=be,ye}function Pr(y,E,C){for(var F=[],B=0;B<C;B++){var z=ge(E,B,0);F.push({anchor:z,head:z})}y.setSelections(F,0)}function yt(y,E,C){for(var F=0;F<y.length;F++){var B=dt(y[F].anchor,E),z=dt(y[F].head,E);if(B||z)return F}return-1}function qe(y,E){var C=E.lastSelection,F=function(){var z=y.listSelections(),V=z[0],Y=z[z.length-1],Q=rt(V.anchor,V.head)?V.anchor:V.head,re=rt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var z=y.getCursor(),V=y.getCursor(),Y=C.visualBlock;if(Y){var Q=Y.width,re=Y.height;V=new De(z.line+re,z.ch+Q);for(var le=[],ye=z.line;ye<V.line;ye++){var ke=new De(ye,z.ch),me=new De(ye,V.ch),be={anchor:ke,head:me};le.push(be)}y.setSelections(le)}else{var Ne=C.anchorMark.find(),Ie=C.headMark.find(),He=Ie.line-Ne.line,st=Ie.ch-Ne.ch;V={line:V.line+He,ch:He?V.ch:st+V.ch},C.visualLine&&(z=new De(z.line,0),V=new De(V.line,Zt(y,V.line))),y.setSelection(z,V)}return[z,V]};return E.visualMode?F():B()}function qt(y,E){var C=E.sel.anchor,F=E.sel.head;E.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(C)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:y.setBookmark(C),headMark:y.setBookmark(F),anchor:Ke(C),head:Ke(F),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function gn(y,E,C,F){var B=y.state.vim.sel,z=F?E:B.head,V=F?E:B.anchor,Y;return rt(C,E)&&(Y=C,C=E,E=Y),rt(z,V)?(z=gt(E,z),V=tn(V,C)):(V=gt(E,V),z=tn(z,C),z=ge(z,0,-1),z.ch==-1&&z.line!=y.firstLine()&&(z=new De(z.line-1,Zt(y,z.line-1)))),[V,z]}function Qn(y,E,B){var F=y.state.vim;E=E||F.sel;var B=B||F.visualLine?"line":F.visualBlock?"block":"char",z=Br(y,E,B);y.setSelections(z.ranges,z.primary)}function Br(y,E,C,F){var B=Ke(E.head),z=Ke(E.anchor);if(C=="char"){var V=!F&&!rt(E.head,E.anchor)?1:0,Y=rt(E.head,E.anchor)?1:0;return B=ge(E.head,0,V),z=ge(E.anchor,0,Y),{ranges:[{anchor:z,head:B}],primary:0}}if(C=="line"){if(rt(E.head,E.anchor))B.ch=0,z.ch=Zt(y,z.line);else{z.ch=0;var Q=y.lastLine();B.line>Q&&(B.line=Q),B.ch=Zt(y,B.line)}return{ranges:[{anchor:z,head:B}],primary:0}}if(C=="block"){var re=Math.min(z.line,B.line),le=z.ch,ye=Math.max(z.line,B.line),ke=B.ch;le<ke?ke+=1:le+=1;for(var me=ye-re+1,be=B.line==re?0:me-1,Ne=[],Ie=0;Ie<me;Ie++)Ne.push({anchor:new De(re+Ie,le),head:new De(re+Ie,ke)});return{ranges:Ne,primary:be}}}function Ar(y){var E=y.getCursor("head");return y.getSelection().length==1&&(E=gt(E,y.getCursor("anchor"))),E}function Cn(y,E){var C=y.state.vim;E!==!1&&y.setCursor(ce(y,C.sel.head)),qt(y,C),C.visualMode=!1,C.visualLine=!1,C.visualBlock=!1,C.insertMode||Be.signal(y,"vim-mode-change",{mode:"normal"})}function ir(y,E,C){var F=y.getRange(E,C);if(/\n\s*$/.test(F)){var B=F.split(`
1410
- `);B.pop();for(var z,z=B.pop();B.length>0&&z&&m(z);z=B.pop())C.line--,C.ch=0;z?(C.line--,C.ch=Zt(y,C.line)):C.ch=0}}function hr(y,E,C){E.ch=0,C.ch=0,C.line++}function nn(y){if(!y)return 0;var E=y.search(/\S/);return E==-1?y.length:E}function or(y,E,C){var F=E.inclusive,B=E.innerWord,z=E.bigWord,V=E.noSymbol,Y=E.multiline,Q=C||Ar(y),re=y.getLine(Q.line),le=re,ye=Q.line,ke=ye,me=Q.ch,be,Ne=V?Do[0]:Ti[0];if(B&&/\s/.test(re.charAt(me)))Ne=function(fn){return/\s/.test(fn)};else{for(;!Ne(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=Ao(y,Q,!0,z,!0);break}z?Ne=Ti[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++,be)Ie=be.to,ke=be.line,le=y.getLine(ke),!le&&Ie==0&&Ie++;else for(;Ne(re.charAt(Ie))&&Ie<re.length;)Ie++;if(F){var st=Ie,Ye=Q.ch<=He&&/\s/.test(re.charAt(Q.ch));if(!Ye)for(;/\s/.test(le.charAt(Ie))&&Ie<le.length;)Ie++;if(st==Ie||Ye){for(var tt=He;/\s/.test(re.charAt(He-1))&&He>0;)He--;!He&&!Ye&&(He=tt)}}return{start:new De(ye,He),end:new De(ke,Ie)}}function $o(y,E,C){var F=E;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:F,end:F};var B=Be.findMatchingTag(y,E)||Be.findEnclosingTag(y,E);return!B||!B.open||!B.close?{start:F,end:F}:C?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Gi(y,E,C){dt(E,C)||We.jumpList.add(y,E,C)}function Yi(y,E){We.lastCharacterSearch.increment=y,We.lastCharacterSearch.forward=E.forward,We.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function Xi(y,E,C,F){var B=Ke(y.getCursor()),z=C?1:-1,V=C?y.lineCount():-1,Y=B.ch,Q=B.line,re=y.getLine(Q),le={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(C?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:C,depth:0,curMoveThrough:!1},ye=gi[F];if(!ye)return B;var ke=mi[ye].init,me=mi[ye].isComplete;for(ke&&ke(le);Q!==V&&E;){if(le.index+=z,le.nextCh=le.lineText.charAt(le.index),!le.nextCh){if(Q+=z,le.lineText=y.getLine(Q)||"",z>0)le.index=0;else{var be=le.lineText.length;le.index=be>0?be-1:0}le.nextCh=le.lineText.charAt(le.index)}me(le)&&(B.line=Q,B.ch=le.index,E--)}return le.nextCh||le.curMoveThrough?new De(Q,le.index):B}function Ao(y,E,C,F,B){var z=E.line,V=E.ch,Y=y.getLine(z),Q=C?1:-1,re=F?Ti:Do;if(B&&Y==""){if(z+=Q,Y=y.getLine(z),!c(y,z))return null;V=C?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:z};for(var le=Q>0?Y.length:-1,ye=le,ke=le;V!=le;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(V))){for(ye=V;V!=le&&re[be](Y.charAt(V));)V+=Q;if(ke=V,me=ye!=ke,ye==E.ch&&z==E.line&&ke==ye+Q)continue;return{from:Math.min(ye,ke+1),to:Math.max(ye,ke),line:z}}me||(V+=Q)}if(z+=Q,!c(y,z))return null;Y=y.getLine(z),V=Q>0?0:Y.length}}function vr(y,E,C,F,B,z){var V=Ke(E),Y=[];(F&&!B||!F&&B)&&C++;for(var Q=!F||!B,re=0;re<C;re++){var le=Ao(y,E,F,z,Q);if(!le){var ye=Zt(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(le),E=new De(le.line,F?le.to-1:le.from)}var ke=Y.length!=C,me=Y[0],be=Y.pop();return F&&!B?(!ke&&(me.from!=V.ch||me.line!=V.line)&&(be=Y.pop()),new De(be.line,be.from)):F&&B?new De(be.line,be.to-1):!F&&B?(!ke&&(me.to!=V.ch||me.line!=V.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function Eo(y,E,C,F,B){var z=E,V=new De(z.line+C.repeat-1,1/0),Y=y.clipPos(V);return Y.ch--,B||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),V}function ts(y,E,C,F,B){for(var z=B||y.getCursor(),V=z.ch,Y,Q=0;Q<E;Q++){var re=y.getLine(z.line);if(Y=Rl(V,re,F,C),Y==-1)return null;V=Y}return new De(y.getCursor().line,Y)}function Ml(y,E){var C=y.getCursor().line;return ce(y,new De(C,E-1))}function di(y,E,C,F){!x(C,bo)&&!Vt.test(C)||(E.marks[C]&&E.marks[C].clear(),E.marks[C]=y.setBookmark(F))}function Rl(y,E,C,F,B){var z;return F?(z=E.indexOf(C,y+1),z!=-1):(z=E.lastIndexOf(C,y-1),z!=-1),z}function zs(y,E,C,F,B){function z(He){return!/\S/.test(y.getLine(He))}function V(He,st,Ye){return Ye?z(He)!=z(He+st):!z(He)&&z(He+st)}function Y(He){F=F>0?1:-1;var st=y.ace.session.getFoldLine(He);st&&He+F>st.start.row&&He+F<st.end.row&&(F=(F>0?st.end.row:st.start.row)-He)}var Q=E.line,re=y.firstLine(),le=y.lastLine(),ye,ke,me=Q;if(F){for(;re<=me&&me<=le&&C>0;)Y(me),V(me,F)&&C--,me+=F;return new De(me,0)}var be=y.state.vim;if(be.visualLine&&V(Q,1,!0)){var Ne=be.sel.anchor;V(Ne.line,-1,!0)&&(!B||Ne.line!=Q)&&(Q+=1)}var Ie=z(Q);for(me=Q;me<=le&&C;me++)V(me,1,!0)&&(!B||z(me)!=Ie)&&C--;for(ke=new De(me,0),me>le&&!Ie?Ie=!0:B=!1,me=Q;me>re&&!((!B||z(me)==Ie||me==Q)&&V(me,-1,!0));me--);return ye=new De(me,0),{start:ye,end:ke}}function Oa(y,E,C,F,B){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function V(re,le,ye,ke){var me=re.getLine(le),be={line:me,ln:le,pos:ye,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Ne=be.pos;for(z(be);be.line!==null;){if(Ne=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(z(be);be.line!==null&&m(be.line[be.pos]);)Ne=be.pos,z(be);return{ln:be.ln,pos:Ne+1}}z(be)}return{ln:be.ln,pos:Ne+1}}function Y(re,le,ye,ke){var me=re.getLine(le),be={line:me,ln:le,pos:ye,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Ne=be.pos;for(z(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Ne=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Ne}:{ln:be.ln,pos:Ne};z(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Ne}}for(var Q={ln:E.line,pos:E.ch};C>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=V(y,Q.ln,Q.pos,F),C--;return new De(Q.ln,Q.pos)}function Qi(y,E,C,F){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!c(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 z(Q,re,le,ye){var Ie=Q.getLine(re),ke=Ie==="",me={line:Ie,ln:re,pos:le,dir:ye},be={ln:me.ln,pos:me.pos},Ne=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.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};w(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(be.ln);be.pos=0;for(var He=Ie.length-1;He>=0;--He)if(!m(Ie[He])){be.pos=He;break}return be}function V(Q,re,le,ye){var Ne=Q.getLine(re),ke={line:Ne,ln:re,pos:le,dir:ye},me={ln:ke.ln,pos:null},be=ke.line==="";for(B(Q,ke);ke.line!==null;){if(ke.line===""&&!be)return me.pos!==null?me:{ln:ke.ln,pos:ke.pos};if(!(!w(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])&&(be=!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:E.line,pos:E.ch};C>0;)F<0?Y=V(y,Y.ln,Y.pos,F):Y=z(y,Y.ln,Y.pos,F),C--;return new De(Y.ln,Y.pos)}function zn(y,E,C,F){var B=E,z,V,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[C],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[C],re=y.getLine(B.line).charAt(B.ch),le=re===Q?1:0;if(z=y.scanForBracket(new De(B.line,B.ch+le),-1,void 0,{bracketRegex:Y}),V=y.scanForBracket(new De(B.line,B.ch+le),1,void 0,{bracketRegex:Y}),!z||!V)return null;if(z=z.pos,V=V.pos,z.line==V.line&&z.ch>V.ch||z.line>V.line){var ye=z;z=V,V=ye}return F?V.ch+=1:z.ch+=1,{start:z,end:V}}function Er(y,E,C,F){var B=Ke(E),z=y.getLine(B.line),V=z.split(""),Y,Q,re,le,ye=V.indexOf(C);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&V[B.ch]==C){var ke=/string/.test(y.getTokenTypeAt(ge(E,0,1))),me=/string/.test(y.getTokenTypeAt(E)),be=ke&&!me;be||(Q=B.ch,--B.ch)}if(V[B.ch]==C&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)V[re]==C&&(Y=re+1);if(Y&&!Q)for(re=Y,le=V.length;re<le&&!Q;re++)V[re]==C&&(Q=re);return!Y||!Q?{start:B,end:B}:(F&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function Zi(){}function $n(y){var E=y.state.vim;return E.searchState_||(E.searchState_=new Zi)}function Tr(y){return Ji(y,"/")}function po(y){return Hs(y,"/")}function Ji(y,E){var C=Hs(y,E)||[];if(!C.length)return[];var F=[];if(C[0]===0){for(var B=0;B<C.length;B++)typeof C[B]=="number"&&F.push(y.substring(C[B]+1,C[B+1]));return F}}function Hs(y,E){E||(E="/");for(var C=!1,F=[],B=0;B<y.length;B++){var z=y.charAt(B);!C&&z==E&&F.push(B),C=!C&&z=="\\"}return F}function Ia(y){for(var E="|(){",C="}",F=!1,B=[],z=-1;z<y.length;z++){var V=y.charAt(z)||"",Y=y.charAt(z+1)||"",Q=Y&&E.indexOf(Y)!=-1;F?((V!=="\\"||!Q)&&B.push(V),F=!1):V==="\\"?(F=!0,Y&&C.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(V)):(B.push(V),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Ll(y){for(var E=!1,C=[],F=-1;F<y.length;F++){var B=y.charAt(F)||"",z=y.charAt(F+1)||"";Li[B+z]?(C.push(Li[B+z]),F++):E?(C.push(B),E=!1):B==="\\"?(E=!0,i(z)||z==="$"?C.push("$"):z!=="/"&&z!=="\\"&&C.push("\\")):(B==="$"&&C.push("$"),C.push(B),z==="/"&&C.push("\\"))}return C.join("")}function Ol(y){for(var E=new Be.StringStream(y),C=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)C.push(E.next());var F=!1;for(var B in dr)if(E.match(B,!0)){F=!0,C.push(dr[B]);break}F||C.push(E.next())}return C.join("")}function eo(y,E,C){var F=We.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var B=po(y),z,V;if(!B.length)z=y;else{z=y.substring(0,B[0]);var Y=y.substring(B[0]);V=Y.indexOf("i")!=-1}if(!z)return null;S("pcre")||(z=Ia(z)),C&&(E=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,E||V?"im":"m");return Q}function fi(y){typeof y=="string"&&(y=document.createElement(y));for(var E,C=1;C<arguments.length;C++)if(E=arguments[C])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)y.appendChild(E);else for(var F in E)Object.prototype.hasOwnProperty.call(E,F)&&(F[0]==="$"?y.style[F.slice(1)]=E[F]:y.setAttribute(F,E[F]));return y}function Pt(y,E){var C=fi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);y.openNotification?y.openNotification(C,{bottom:!0,duration:5e3}):alert(C.innerText)}function Na(y,E){return fi("div",{$display:"flex"},fi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,fi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&fi("span",{$color:"#888"},E))}function Mr(y,E){if(jr.length){E.value||(E.value=""),mn=E;return}var C=Na(E.prefix,E.desc);if(y.openDialog)y.openDialog(C,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var F="";typeof E.prefix!="string"&&E.prefix&&(F+=E.prefix.textContent),E.desc&&(F+=" "+E.desc),E.onClose(prompt(F,""))}}function Hn(y,E){if(y instanceof RegExp&&E instanceof RegExp){for(var C=["global","multiline","ignoreCase","source"],F=0;F<C.length;F++){var B=C[F];if(y[B]!==E[B])return!1}return!0}return!1}function hn(y,E,C,F){if(E){var B=$n(y),z=eo(E,!!C,!!F);if(z)return $i(y,z),Hn(z,B.getQuery())||B.setQuery(z),z}}function Mn(y){if(y.source.charAt(0)=="^")var E=!0;return{token:function(C){if(E&&!C.sol()){C.skipToEnd();return}var F=C.match(y,!1);if(F)return F[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!y.exec(C.next()+F[0]))?(C.next(),null):(C.match(y),"searching");for(;!C.eol()&&(C.next(),!C.match(y,!1)););},query:y}}function $i(y,E){clearTimeout(fr);var C=$n(y);C.highlightTimeout=fr,fr=setTimeout(function(){if(y.state.vim){var F=$n(y);F.highlightTimeout=null;var B=F.getOverlay();(!B||E!=B.query)&&(B&&y.removeOverlay(B),B=Mn(E),y.addOverlay(B),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(E))),F.setOverlay(B))}},50)}function Rr(y,E,C,F){return F===void 0&&(F=1),y.operation(function(){for(var B=y.getCursor(),z=y.getSearchCursor(C,B),V=0;V<F;V++){var Y=z.find(E);if(V==0&&Y&&dt(z.from(),B)){var Q=E?z.from():z.to();Y=z.find(E),Y&&!Y[0]&&dt(z.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=z.find(E))}if(!Y&&(z=y.getSearchCursor(C,E?new De(y.lastLine()):new De(y.firstLine(),0)),!z.find(E)))return}return z.from()})}function Ai(y,E,C,F,B){return F===void 0&&(F=1),y.operation(function(){var z=y.getCursor(),V=y.getSearchCursor(C,z),Y=V.find(!E);!B.visualMode&&Y&&dt(V.from(),z)&&V.find(!E);for(var Q=0;Q<F;Q++)if(Y=V.find(E),!Y&&(V=y.getSearchCursor(C,E?new De(y.lastLine()):new De(y.firstLine(),0)),!V.find(E)))return;return[V.from(),V.to()]})}function ns(y){var E=$n(y);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),y.removeOverlay($n(y).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function Us(y,E,C){return typeof y!="number"&&(y=y.line),E instanceof Array?x(y,E):typeof C=="number"?y>=E&&y<=C:y==E}function go(y){var E=y.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function ti(y,E,C){if(C=="'"||C=="`")return We.jumpList.find(y,-1)||new De(0,0);if(C==".")return To(y);var F=E.marks[C];return F&&F.find()}function To(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var E=y.doc.history.done,C=E.length;C--;)if(E[C].changes)return Ke(E[C].changes[0].to)}function rs(y,E,C,F,B,z,V,Y,Q){function re(){y.operation(function(){for(;!Ne;)le(),ke();me()})}function le(){var Ye=y.getRange(z.from(),z.to()),tt=Ye.replace(V,Y),fn=z.to().line;z.replace(tt),He=z.to().line,B+=He-fn,st=He<fn}function ye(){var Ye=Ie&&Ke(z.to()),tt=z.findNext();return tt&&!tt[0]&&Ye&&dt(z.from(),Ye)&&(tt=z.findNext()),tt}function ke(){for(;ye()&&Us(z.from(),F,B);)if(!(!C&&z.from().line==He&&!st)){y.scrollIntoView(z.from(),30),y.setSelection(z.from(),z.to()),Ie=z.from(),Ne=!1;return}Ne=!0}function me(Ye){if(Ye&&Ye(),y.focus(),Ie){y.setCursor(Ie);var tt=y.state.vim;tt.exMode=!1,tt.lastHPos=tt.lastHSPos=Ie.ch}Q&&Q()}function be(Ye,tt,fn){Be.e_stop(Ye);var lt=W(Ye);switch(lt){case"y":le(),ke();break;case"n":ke();break;case"a":var yn=Q;Q=void 0,y.operation(re),Q=yn;break;case"l":le();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(fn)}return Ne&&me(fn),!0}y.state.vim.exMode=!0;var Ne=!1,Ie,He,st;if(ke(),Ne){Pt(y,"No matches for "+V.source);return}if(!E){re(),Q&&Q();return}Mr(y,{prefix:fi("span","replace with ",fi("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function ni(y,E){var C=y.state.vim,F=We.macroModeState,B=We.registerController.getRegister("."),z=F.isPlaying,V=F.lastInsertModeChanges;z||(y.off("change",Mo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=null,Be.off(y.getInputField(),"keydown",Gs)),!z&&C.insertModeRepeat>1&&(Da(y,C,C.insertModeRepeat-1,!0),C.lastEditInputState.repeatOverride=C.insertModeRepeat),delete C.insertModeRepeat,C.insertMode=!1,E||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),B.setText(V.changes.join("")),Be.signal(y,"vim-mode-change",{mode:"normal"}),F.isRecording&&sr(F)}function is(y){An.unshift(y)}function qs(y,E,C,F,B){var z={keys:y,type:E};z[E]=C,z[E+"Args"]=F;for(var V in B)z[V]=B[V];is(z)}function Vs(y,E,C,F){var B=We.registerController.getRegister(F);if(F==":"){B.keyBuffer[0]&&br.processCommand(y,B.keyBuffer[0]),C.isPlaying=!1;return}var z=B.keyBuffer,V=0;C.isPlaying=!0,C.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,le;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),le=re[0],Q=Q.substring(re.index+le.length),mt.handleKey(y,le,"macro"),E.insertMode){var ye=B.insertModeChanges[V++].changes;We.macroModeState.lastInsertModeChanges.changes=ye,cs(y,ye,1),ni(y)}C.isPlaying=!1}function os(y,E){if(!y.isPlaying){var C=y.latestRegister,F=We.registerController.getRegister(C);F&&F.pushText(E)}}function sr(y){if(!y.isPlaying){var E=y.latestRegister,C=We.registerController.getRegister(E);C&&C.pushInsertModeChanges&&C.pushInsertModeChanges(y.lastInsertModeChanges)}}function Ks(y,E){if(!y.isPlaying){var C=y.latestRegister,F=We.registerController.getRegister(C);F&&F.pushSearchQuery&&F.pushSearchQuery(E)}}function Mo(y,E){var C=We.macroModeState,F=C.lastInsertModeChanges;if(!C.isPlaying)for(var B=y.state.vim;E;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var z=y.listSelections().length;z>1&&(F.ignoreCount=z);var V=E.text.join(`
1411
- `);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),V)if(y.state.overwrite&&!/\n/.test(V))F.changes.push([V]);else{if(V.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<V.length&&(F.changes.push([V,re]),V="")}}V&&F.changes.push(V)}}E=E.next}}function ss(y){var E=y.state.vim;if(E.insertMode){var C=We.macroModeState;if(C.isPlaying)return;var F=C.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||as(y,E)}function as(y,E,C){var F=y.getCursor("anchor"),B=y.getCursor("head");if(E.visualMode&&!y.somethingSelected()?Cn(y,!1):!E.visualMode&&!E.insertMode&&y.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,Be.signal(y,"vim-mode-change",{mode:"visual"})),E.visualMode){var z=rt(B,F)?0:-1,V=rt(B,F)?-1:0;B=ge(B,0,z),F=ge(F,0,V),E.sel={anchor:F,head:B},di(y,E,"<",gt(B,F)),di(y,E,">",tn(B,F))}else!E.insertMode&&!C&&(E.lastHPos=y.getCursor().ch)}function mo(y,E){this.keyName=y,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function Gs(y){var E=We.macroModeState,C=E.lastInsertModeChanges,F=Be.keyName?Be.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(C.maybeReset&&(C.changes=[],C.maybeReset=!1),C.changes.push(new mo(F,y)))}function Da(y,E,C,F){function B(){Y?Ln.processAction(y,E,E.lastEditActionCommand):Ln.evalInput(y,E)}function z(le){if(V.lastInsertModeChanges.changes.length>0){le=E.lastEditActionCommand?le:1;var ye=V.lastInsertModeChanges;cs(y,ye.changes,le)}}var V=We.macroModeState;V.isPlaying=!0;var Y=!!E.lastEditActionCommand,Q=E.inputState;if(E.inputState=E.lastEditInputState,Y&&E.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<C;re++)B(),z(1);else F||B(),z(C);E.inputState=Q,E.insertMode&&!F&&ni(y),V.isPlaying=!1}function ls(y,E){Be.lookupKey(E,"vim-insert",function(C){return typeof C=="string"?Be.commands[C](y):C(y),!0})}function cs(y,E,C){var F=y.getCursor("head"),B=We.macroModeState.lastInsertModeChanges.visualBlock;B&&(Pr(y,F,B+1),C=y.listSelections().length,y.setCursor(F));for(var z=0;z<C;z++){B&&y.setCursor(ge(F,z,0));for(var V=0;V<E.length;V++){var Y=E[V];if(Y instanceof mo)ls(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}B&&y.setCursor(ge(F,0,1))}function Ys(y,E,C,F){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=Lr[E]||E;var B="";if(C.ctrlKey&&(B+="C-"),C.altKey&&(B+="A-"),(B||E.length>1)&&C.shiftKey&&(B+="S-"),F&&!F.expectLiteralNext&&E.length==1){if(Un.keymap&&E in Un.keymap)(Un.remapCtrl!==!1||!B)&&(E=Un.keymap[E]);else if(E.charCodeAt(0)>255){var z=C.code&&C.code.slice(-1)||"";C.shiftKey||(z=z.toLowerCase()),z&&(E=z)}}return B+=E,B.length>1&&(B="<"+B+">"),B}function us(y){var E=new y.constructor;return Object.keys(y).forEach(function(C){if(C!="insertEnd"){var F=y[C];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=us(F)),E[C]=F}}),y.sel&&(E.sel={head:y.sel.head&&Ke(y.sel.head),anchor:y.sel.anchor&&Ke(y.sel.anchor)}),E}function Ro(y,E,C){var F=!1,B=mt.maybeInitVimState_(y),z=B.visualBlock||B.wasInVisualBlock,V=y.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!V?B.wasInVisualBlock=!1:V&&B.visualBlock&&(B.wasInVisualBlock=!0),E=="<Esc>"&&!B.insertMode&&!B.visualMode&&V)y.ace.exitMultiSelectMode();else if(z||!V||y.ace.inVirtualSelectionMode)F=mt.handleKey(y,E,C);else{var Y=us(B),Q=B.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var le=y.ace.selection;y.state.vim.lastHPos=le.$desiredColumn==null?le.lead.column:le.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),ke=y.getCursor("anchor"),me=rt(ye,ke)?0:-1,be=rt(ye,ke)?-1:0;ye=ge(ye,0,me),ke=ge(ke,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=ke,F=vi(y,E,C),le.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=us(Y)),re++}),y.curOp.cursorActivity&&!F&&(y.curOp.cursorActivity=!1),B.status=y.state.vim.status,y.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return F&&!B.visualMode&&!B.insert&&B.visualMode!=y.somethingSelected()&&as(y,B,!0),F}function Ei(y,E){E.off("beforeEndOperation",Ei);var C=E.state.cm.vimCmd;C&&E.execCommand(C.exec?C:C.name,C.args),E.curOp=E.prevOp}var ar=t("../range").Range,vo=t("../lib/event_emitter").EventEmitter,to=t("../lib/dom"),Fa=t("../lib/oop"),Il=t("../lib/keys"),Lo=t("../lib/event"),no=t("../search").Search,Oo=t("../lib/useragent"),hs=t("../search_highlight").SearchHighlight,Io=t("../commands/multi_select_commands"),Pa=t("../mode/text").Mode.prototype.tokenRe,yo=t("../ext/hardwrap").hardWrap;t("../multi_select");var Be=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(y,E){if(!(this instanceof De))return new De(y,E);this.line=y,this.ch=E},Be.defineOption=function(y,E,C){},Be.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1408
+ `;else{if(Li.hasOwnProperty(le)){Y=Li[le],ls(y,Y);continue}Y=Y[0],z.lastIndex=V.index+1}}y.replaceSelection(Y)}}}finally{if(jr.pop(),sn=jr.length?F:!1,!jr.length&&mn){var ke=mn;mn=null,Mr(y,ke)}}}function W(y,E){var C=y.key;if(!Wr[C]){C.length>1&&C[0]=="n"&&(C=C.replace("Numpad","")),C=Zn[C]||C;var F="";if(y.ctrlKey&&(F+="C-"),y.altKey&&(F+="A-"),y.metaKey&&(F+="M-"),Be.isMac&&y.altKey&&!y.metaKey&&!y.ctrlKey&&(F=F.slice(2)),(F||C.length>1)&&y.shiftKey&&(F+="S-"),E&&!E.expectLiteralNext&&C.length==1){if(Un.keymap&&C in Un.keymap)(Un.remapCtrl!=0||!F)&&(C=Un.keymap[C]);else if(C.charCodeAt(0)>255){var B=y.code&&y.code.slice(-1)||"";y.shiftKey||(B=B.toLowerCase()),B&&(C=B)}}return F+=C,F.length>1&&(F="<"+F+">"),F}}function P(y,E){Un.string!==y&&(Un=D(y)),Un.remapCtrl=E}function D(y){function E(F){return F.split(/\\?(.)/).filter(Boolean)}var C={};return y?(y.split(/((?:[^\\,]|\\.)+),/).map(function(F){if(F){var B=F.split(/((?:[^\\;]|\\.)+);/);if(B.length==3){var z=E(B[1]),V=E(B[2]);if(z.length!==V.length)return;for(var Y=0;Y<z.length;++Y)C[z[Y]]=V[Y]}else if(B.length==1){var Q=E(F);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)C[Q[Y]]=Q[Y+1]}}}),{keymap:C,string:y}):{keymap:C,string:""}}function A(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function _(y,E){y.state.vim.inputState=new A,y.state.vim.expectLiteralNext=!1,Be.signal(y,"vim-command-done",E)}function I(){this.removed=[],this.inserted=""}function j(y,E,C){this.clear(),this.keyBuffer=[y||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!E,this.blockwise=!!C}function U(y,E){var C=We.registerController.registers;if(!y||y.length!=1)throw Error("Register name must be 1 character");C[y]=E,Yt.push(y)}function K(y){this.registers=y,this.unnamedRegister=y['"']=new j,y["."]=new j,y[":"]=new j,y["/"]=new j,y["+"]=new j}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function J(y,E){ri[y]=E}function ae(y,E){for(var C=[],F=0;F<E;F++)C.push(y);return C}function ne(y,E){ds[y]=E}function se(y,E){On[y]=E}function ce(y,E,C){var F=y.state.vim,B=F.insertMode||F.visualMode,z=Math.min(Math.max(y.firstLine(),E.line),y.lastLine()),V=y.getLine(z),Y=V.length-1+ +!!B,Q=Math.min(Math.max(0,E.ch),Y),re=V.charCodeAt(Q);if(56320<=re&&re<=57343){var le=1;C&&C.line==z&&C.ch>Q&&(le=-1),Q+=le,Q>Y&&(Q-=2)}return new De(z,Q)}function he(y){var E={};for(var C in y)y.hasOwnProperty(C)&&(E[C]=y[C]);return E}function ge(y,E,C){return typeof E=="object"&&(C=E.ch,E=E.line),new De(y.line+E,y.ch+C)}function Ee(y,E,C,F){F.operator&&(C="operatorPending");for(var B,z=[],V=[],Y=sn?E.length-No:0,Q=Y;Q<E.length;Q++){var re=E[Q];C=="insert"&&re.context!="insert"||re.context&&re.context!=C||F.operator&&re.type=="action"||!(B=Te(y,re.keys))||(B=="partial"&&z.push(re),B=="full"&&V.push(re))}return{partial:z.length&&z,full:V.length&&V}}function Te(y,E){var C=E.slice(-11)=="<character>",F=E.slice(-10)=="<register>";if(C||F){var B=E.length-(C?11:10),z=y.slice(0,B),V=E.slice(0,B);return z==V&&y.length>B?"full":V.indexOf(z)==0?"partial":!1}return y==E?"full":E.indexOf(y)==0?"partial":!1}function Re(y){var E=/^.*(<[^>]+>)$/.exec(y),C=E?E[1]:y.slice(-1);if(C.length>1)switch(C){case"<CR>":C=`
1409
+ `;break;case"<Space>":C=" ";break;default:C=""}return C}function Xe(y,E,C){return function(){for(var F=0;F<C;F++)E(y)}}function Ke(y){return new De(y.line,y.ch)}function dt(y,E){return y.ch==E.ch&&y.line==E.line}function ot(y,E){return y.line<E.line?!0:y.line==E.line&&y.ch<E.ch}function gt(y,E){return arguments.length>2&&(E=gt.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(y,E)?y:E}function tn(y,E){return arguments.length>2&&(E=tn.apply(void 0,Array.prototype.slice.call(arguments,1))),ot(y,E)?E:y}function Wn(y,E,C){var F=ot(y,E),B=ot(E,C);return F&&B}function Zt(y,E){return y.getLine(E).length}function hi(y){return y.trim?y.trim():y.replace(/^\s+|\s+$/g,"")}function _n(y){return y.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Xn(y,E,C){var F=Zt(y,E),B=new Array(C-F+1).join(" ");y.setCursor(new De(E,F)),y.replaceRange(B,y.getCursor())}function ur(y,E){var C=[],F=y.listSelections(),B=Ke(y.clipPos(E)),z=!dt(E,B),V=y.getCursor("head"),Y=yt(F,V),Q=dt(F[Y].head,F[Y].anchor),re=F.length-1,le=re-Y>Y?re:0,ye=F[le].anchor,ke=Math.min(ye.line,B.line),me=Math.max(ye.line,B.line),be=ye.ch,Ne=B.ch,Ie=F[le].head.ch-be,He=Ne-be;Ie>0&&He<=0?(be++,z||Ne--):Ie<0&&He>=0?(be--,Q||Ne++):Ie<0&&He==-1&&(be--,Ne++);for(var at=ke;at<=me;at++){var Ye={anchor:new De(at,be),head:new De(at,Ne)};C.push(Ye)}return y.setSelections(C),E.ch=Ne,ye.ch=be,ye}function Pr(y,E,C){for(var F=[],B=0;B<C;B++){var z=ge(E,B,0);F.push({anchor:z,head:z})}y.setSelections(F,0)}function yt(y,E,C){for(var F=0;F<y.length;F++){var B=dt(y[F].anchor,E),z=dt(y[F].head,E);if(B||z)return F}return-1}function qe(y,E){var C=E.lastSelection,F=function(){var z=y.listSelections(),V=z[0],Y=z[z.length-1],Q=ot(V.anchor,V.head)?V.anchor:V.head,re=ot(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},B=function(){var z=y.getCursor(),V=y.getCursor(),Y=C.visualBlock;if(Y){var Q=Y.width,re=Y.height;V=new De(z.line+re,z.ch+Q);for(var le=[],ye=z.line;ye<V.line;ye++){var ke=new De(ye,z.ch),me=new De(ye,V.ch),be={anchor:ke,head:me};le.push(be)}y.setSelections(le)}else{var Ne=C.anchorMark.find(),Ie=C.headMark.find(),He=Ie.line-Ne.line,at=Ie.ch-Ne.ch;V={line:V.line+He,ch:He?V.ch:at+V.ch},C.visualLine&&(z=new De(z.line,0),V=new De(V.line,Zt(y,V.line))),y.setSelection(z,V)}return[z,V]};return E.visualMode?F():B()}function qt(y,E){var C=E.sel.anchor,F=E.sel.head;E.lastPastedText&&(F=y.posFromIndex(y.indexFromPos(C)+E.lastPastedText.length),E.lastPastedText=null),E.lastSelection={anchorMark:y.setBookmark(C),headMark:y.setBookmark(F),anchor:Ke(C),head:Ke(F),visualMode:E.visualMode,visualLine:E.visualLine,visualBlock:E.visualBlock}}function gn(y,E,C,F){var B=y.state.vim.sel,z=F?E:B.head,V=F?E:B.anchor,Y;return ot(C,E)&&(Y=C,C=E,E=Y),ot(z,V)?(z=gt(E,z),V=tn(V,C)):(V=gt(E,V),z=tn(z,C),z=ge(z,0,-1),z.ch==-1&&z.line!=y.firstLine()&&(z=new De(z.line-1,Zt(y,z.line-1)))),[V,z]}function Qn(y,E,B){var F=y.state.vim;E=E||F.sel;var B=B||F.visualLine?"line":F.visualBlock?"block":"char",z=Br(y,E,B);y.setSelections(z.ranges,z.primary)}function Br(y,E,C,F){var B=Ke(E.head),z=Ke(E.anchor);if(C=="char"){var V=!F&&!ot(E.head,E.anchor)?1:0,Y=ot(E.head,E.anchor)?1:0;return B=ge(E.head,0,V),z=ge(E.anchor,0,Y),{ranges:[{anchor:z,head:B}],primary:0}}if(C=="line"){if(ot(E.head,E.anchor))B.ch=0,z.ch=Zt(y,z.line);else{z.ch=0;var Q=y.lastLine();B.line>Q&&(B.line=Q),B.ch=Zt(y,B.line)}return{ranges:[{anchor:z,head:B}],primary:0}}if(C=="block"){var re=Math.min(z.line,B.line),le=z.ch,ye=Math.max(z.line,B.line),ke=B.ch;le<ke?ke+=1:le+=1;for(var me=ye-re+1,be=B.line==re?0:me-1,Ne=[],Ie=0;Ie<me;Ie++)Ne.push({anchor:new De(re+Ie,le),head:new De(re+Ie,ke)});return{ranges:Ne,primary:be}}}function Ar(y){var E=y.getCursor("head");return y.getSelection().length==1&&(E=gt(E,y.getCursor("anchor"))),E}function Cn(y,E){var C=y.state.vim;E!==!1&&y.setCursor(ce(y,C.sel.head)),qt(y,C),C.visualMode=!1,C.visualLine=!1,C.visualBlock=!1,C.insertMode||Be.signal(y,"vim-mode-change",{mode:"normal"})}function ir(y,E,C){var F=y.getRange(E,C);if(/\n\s*$/.test(F)){var B=F.split(`
1410
+ `);B.pop();for(var z,z=B.pop();B.length>0&&z&&m(z);z=B.pop())C.line--,C.ch=0;z?(C.line--,C.ch=Zt(y,C.line)):C.ch=0}}function hr(y,E,C){E.ch=0,C.ch=0,C.line++}function nn(y){if(!y)return 0;var E=y.search(/\S/);return E==-1?y.length:E}function or(y,E,C){var F=E.inclusive,B=E.innerWord,z=E.bigWord,V=E.noSymbol,Y=E.multiline,Q=C||Ar(y),re=y.getLine(Q.line),le=re,ye=Q.line,ke=ye,me=Q.ch,be,Ne=V?Do[0]:Mi[0];if(B&&/\s/.test(re.charAt(me)))Ne=function(fn){return/\s/.test(fn)};else{for(;!Ne(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,be=Ao(y,Q,!0,z,!0);break}z?Ne=Mi[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++,be)Ie=be.to,ke=be.line,le=y.getLine(ke),!le&&Ie==0&&Ie++;else for(;Ne(re.charAt(Ie))&&Ie<re.length;)Ie++;if(F){var at=Ie,Ye=Q.ch<=He&&/\s/.test(re.charAt(Q.ch));if(!Ye)for(;/\s/.test(le.charAt(Ie))&&Ie<le.length;)Ie++;if(at==Ie||Ye){for(var tt=He;/\s/.test(re.charAt(He-1))&&He>0;)He--;!He&&!Ye&&(He=tt)}}return{start:new De(ye,He),end:new De(ke,Ie)}}function $o(y,E,C){var F=E;if(!Be.findMatchingTag||!Be.findEnclosingTag)return{start:F,end:F};var B=Be.findMatchingTag(y,E)||Be.findEnclosingTag(y,E);return!B||!B.open||!B.close?{start:F,end:F}:C?{start:B.open.from,end:B.close.to}:{start:B.open.to,end:B.close.from}}function Gi(y,E,C){dt(E,C)||We.jumpList.add(y,E,C)}function Yi(y,E){We.lastCharacterSearch.increment=y,We.lastCharacterSearch.forward=E.forward,We.lastCharacterSearch.selectedCharacter=E.selectedCharacter}function Xi(y,E,C,F){var B=Ke(y.getCursor()),z=C?1:-1,V=C?y.lineCount():-1,Y=B.ch,Q=B.line,re=y.getLine(Q),le={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:F,reverseSymb:(C?{")":"(","}":"{"}:{"(":")","{":"}"})[F],forward:C,depth:0,curMoveThrough:!1},ye=gi[F];if(!ye)return B;var ke=mi[ye].init,me=mi[ye].isComplete;for(ke&&ke(le);Q!==V&&E;){if(le.index+=z,le.nextCh=le.lineText.charAt(le.index),!le.nextCh){if(Q+=z,le.lineText=y.getLine(Q)||"",z>0)le.index=0;else{var be=le.lineText.length;le.index=be>0?be-1:0}le.nextCh=le.lineText.charAt(le.index)}me(le)&&(B.line=Q,B.ch=le.index,E--)}return le.nextCh||le.curMoveThrough?new De(Q,le.index):B}function Ao(y,E,C,F,B){var z=E.line,V=E.ch,Y=y.getLine(z),Q=C?1:-1,re=F?Mi:Do;if(B&&Y==""){if(z+=Q,Y=y.getLine(z),!c(y,z))return null;V=C?0:Y.length}for(;;){if(B&&Y=="")return{from:0,to:0,line:z};for(var le=Q>0?Y.length:-1,ye=le,ke=le;V!=le;){for(var me=!1,be=0;be<re.length&&!me;++be)if(re[be](Y.charAt(V))){for(ye=V;V!=le&&re[be](Y.charAt(V));)V+=Q;if(ke=V,me=ye!=ke,ye==E.ch&&z==E.line&&ke==ye+Q)continue;return{from:Math.min(ye,ke+1),to:Math.max(ye,ke),line:z}}me||(V+=Q)}if(z+=Q,!c(y,z))return null;Y=y.getLine(z),V=Q>0?0:Y.length}}function vr(y,E,C,F,B,z){var V=Ke(E),Y=[];(F&&!B||!F&&B)&&C++;for(var Q=!F||!B,re=0;re<C;re++){var le=Ao(y,E,F,z,Q);if(!le){var ye=Zt(y,y.lastLine());Y.push(F?{line:y.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(le),E=new De(le.line,F?le.to-1:le.from)}var ke=Y.length!=C,me=Y[0],be=Y.pop();return F&&!B?(!ke&&(me.from!=V.ch||me.line!=V.line)&&(be=Y.pop()),new De(be.line,be.from)):F&&B?new De(be.line,be.to-1):!F&&B?(!ke&&(me.to!=V.ch||me.line!=V.line)&&(be=Y.pop()),new De(be.line,be.to)):new De(be.line,be.from)}function Eo(y,E,C,F,B){var z=E,V=new De(z.line+C.repeat-1,1/0),Y=y.clipPos(V);return Y.ch--,B||(F.lastHPos=1/0,F.lastHSPos=y.charCoords(Y,"div").left),V}function ts(y,E,C,F,B){for(var z=B||y.getCursor(),V=z.ch,Y,Q=0;Q<E;Q++){var re=y.getLine(z.line);if(Y=Rl(V,re,F,C),Y==-1)return null;V=Y}return new De(y.getCursor().line,Y)}function Ml(y,E){var C=y.getCursor().line;return ce(y,new De(C,E-1))}function di(y,E,C,F){!x(C,bo)&&!Vt.test(C)||(E.marks[C]&&E.marks[C].clear(),E.marks[C]=y.setBookmark(F))}function Rl(y,E,C,F,B){var z;return F?(z=E.indexOf(C,y+1),z!=-1):(z=E.lastIndexOf(C,y-1),z!=-1),z}function zs(y,E,C,F,B){function z(He){return!/\S/.test(y.getLine(He))}function V(He,at,Ye){return Ye?z(He)!=z(He+at):!z(He)&&z(He+at)}function Y(He){F=F>0?1:-1;var at=y.ace.session.getFoldLine(He);at&&He+F>at.start.row&&He+F<at.end.row&&(F=(F>0?at.end.row:at.start.row)-He)}var Q=E.line,re=y.firstLine(),le=y.lastLine(),ye,ke,me=Q;if(F){for(;re<=me&&me<=le&&C>0;)Y(me),V(me,F)&&C--,me+=F;return new De(me,0)}var be=y.state.vim;if(be.visualLine&&V(Q,1,!0)){var Ne=be.sel.anchor;V(Ne.line,-1,!0)&&(!B||Ne.line!=Q)&&(Q+=1)}var Ie=z(Q);for(me=Q;me<=le&&C;me++)V(me,1,!0)&&(!B||z(me)!=Ie)&&C--;for(ke=new De(me,0),me>le&&!Ie?Ie=!0:B=!1,me=Q;me>re&&!((!B||z(me)==Ie||me==Q)&&V(me,-1,!0));me--);return ye=new De(me,0),{start:ye,end:ke}}function Oa(y,E,C,F,B){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function V(re,le,ye,ke){var me=re.getLine(le),be={line:me,ln:le,pos:ye,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Ne=be.pos;for(z(be);be.line!==null;){if(Ne=be.pos,w(be.line[be.pos])){if(!B)return{ln:be.ln,pos:be.pos+1};for(z(be);be.line!==null&&m(be.line[be.pos]);)Ne=be.pos,z(be);return{ln:be.ln,pos:Ne+1}}z(be)}return{ln:be.ln,pos:Ne+1}}function Y(re,le,ye,ke){var me=re.getLine(le),be={line:me,ln:le,pos:ye,dir:ke};if(be.line==="")return{ln:be.ln,pos:be.pos};var Ne=be.pos;for(z(be);be.line!==null;){if(!m(be.line[be.pos])&&!w(be.line[be.pos]))Ne=be.pos;else if(w(be.line[be.pos]))return B?m(be.line[be.pos+1])?{ln:be.ln,pos:be.pos+1}:{ln:be.ln,pos:Ne}:{ln:be.ln,pos:Ne};z(be)}return be.line=me,B&&m(be.line[be.pos])?{ln:be.ln,pos:be.pos}:{ln:be.ln,pos:Ne}}for(var Q={ln:E.line,pos:E.ch};C>0;)F<0?Q=Y(y,Q.ln,Q.pos,F):Q=V(y,Q.ln,Q.pos,F),C--;return new De(Q.ln,Q.pos)}function Qi(y,E,C,F){function B(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!c(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 z(Q,re,le,ye){var Ie=Q.getLine(re),ke=Ie==="",me={line:Ie,ln:re,pos:le,dir:ye},be={ln:me.ln,pos:me.pos},Ne=me.line==="";for(B(Q,me);me.line!==null;){if(be.ln=me.ln,be.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};w(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(be.ln);be.pos=0;for(var He=Ie.length-1;He>=0;--He)if(!m(Ie[He])){be.pos=He;break}return be}function V(Q,re,le,ye){var Ne=Q.getLine(re),ke={line:Ne,ln:re,pos:le,dir:ye},me={ln:ke.ln,pos:null},be=ke.line==="";for(B(Q,ke);ke.line!==null;){if(ke.line===""&&!be)return me.pos!==null?me:{ln:ke.ln,pos:ke.pos};if(!(!w(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])&&(be=!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:E.line,pos:E.ch};C>0;)F<0?Y=V(y,Y.ln,Y.pos,F):Y=z(y,Y.ln,Y.pos,F),C--;return new De(Y.ln,Y.pos)}function zn(y,E,C,F){var B=E,z,V,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[C],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[C],re=y.getLine(B.line).charAt(B.ch),le=re===Q?1:0;if(z=y.scanForBracket(new De(B.line,B.ch+le),-1,void 0,{bracketRegex:Y}),V=y.scanForBracket(new De(B.line,B.ch+le),1,void 0,{bracketRegex:Y}),!z||!V)return null;if(z=z.pos,V=V.pos,z.line==V.line&&z.ch>V.ch||z.line>V.line){var ye=z;z=V,V=ye}return F?V.ch+=1:z.ch+=1,{start:z,end:V}}function Er(y,E,C,F){var B=Ke(E),z=y.getLine(B.line),V=z.split(""),Y,Q,re,le,ye=V.indexOf(C);if(B.ch<ye)B.ch=ye;else if(ye<B.ch&&V[B.ch]==C){var ke=/string/.test(y.getTokenTypeAt(ge(E,0,1))),me=/string/.test(y.getTokenTypeAt(E)),be=ke&&!me;be||(Q=B.ch,--B.ch)}if(V[B.ch]==C&&!Q)Y=B.ch+1;else for(re=B.ch;re>-1&&!Y;re--)V[re]==C&&(Y=re+1);if(Y&&!Q)for(re=Y,le=V.length;re<le&&!Q;re++)V[re]==C&&(Q=re);return!Y||!Q?{start:B,end:B}:(F&&(--Y,++Q),{start:new De(B.line,Y),end:new De(B.line,Q)})}function Zi(){}function $n(y){var E=y.state.vim;return E.searchState_||(E.searchState_=new Zi)}function Tr(y){return Ji(y,"/")}function po(y){return Hs(y,"/")}function Ji(y,E){var C=Hs(y,E)||[];if(!C.length)return[];var F=[];if(C[0]===0){for(var B=0;B<C.length;B++)typeof C[B]=="number"&&F.push(y.substring(C[B]+1,C[B+1]));return F}}function Hs(y,E){E||(E="/");for(var C=!1,F=[],B=0;B<y.length;B++){var z=y.charAt(B);!C&&z==E&&F.push(B),C=!C&&z=="\\"}return F}function Ia(y){for(var E="|(){",C="}",F=!1,B=[],z=-1;z<y.length;z++){var V=y.charAt(z)||"",Y=y.charAt(z+1)||"",Q=Y&&E.indexOf(Y)!=-1;F?((V!=="\\"||!Q)&&B.push(V),F=!1):V==="\\"?(F=!0,Y&&C.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&B.push(V)):(B.push(V),Q&&Y!=="\\"&&B.push("\\"))}return B.join("")}function Ll(y){for(var E=!1,C=[],F=-1;F<y.length;F++){var B=y.charAt(F)||"",z=y.charAt(F+1)||"";Oi[B+z]?(C.push(Oi[B+z]),F++):E?(C.push(B),E=!1):B==="\\"?(E=!0,i(z)||z==="$"?C.push("$"):z!=="/"&&z!=="\\"&&C.push("\\")):(B==="$"&&C.push("$"),C.push(B),z==="/"&&C.push("\\"))}return C.join("")}function Ol(y){for(var E=new Be.StringStream(y),C=[];!E.eol();){for(;E.peek()&&E.peek()!="\\";)C.push(E.next());var F=!1;for(var B in dr)if(E.match(B,!0)){F=!0,C.push(dr[B]);break}F||C.push(E.next())}return C.join("")}function eo(y,E,C){var F=We.registerController.getRegister("/");if(F.setText(y),y instanceof RegExp)return y;var B=po(y),z,V;if(!B.length)z=y;else{z=y.substring(0,B[0]);var Y=y.substring(B[0]);V=Y.indexOf("i")!=-1}if(!z)return null;S("pcre")||(z=Ia(z)),C&&(E=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,E||V?"im":"m");return Q}function fi(y){typeof y=="string"&&(y=document.createElement(y));for(var E,C=1;C<arguments.length;C++)if(E=arguments[C])if(typeof E!="object"&&(E=document.createTextNode(E)),E.nodeType)y.appendChild(E);else for(var F in E)Object.prototype.hasOwnProperty.call(E,F)&&(F[0]==="$"?y.style[F.slice(1)]=E[F]:y.setAttribute(F,E[F]));return y}function Pt(y,E){var C=fi("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},E);y.openNotification?y.openNotification(C,{bottom:!0,duration:5e3}):alert(C.innerText)}function Na(y,E){return fi("div",{$display:"flex"},fi("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},y,fi("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),E&&fi("span",{$color:"#888"},E))}function Mr(y,E){if(jr.length){E.value||(E.value=""),mn=E;return}var C=Na(E.prefix,E.desc);if(y.openDialog)y.openDialog(C,E.onClose,{onKeyDown:E.onKeyDown,onKeyUp:E.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:E.value});else{var F="";typeof E.prefix!="string"&&E.prefix&&(F+=E.prefix.textContent),E.desc&&(F+=" "+E.desc),E.onClose(prompt(F,""))}}function Hn(y,E){if(y instanceof RegExp&&E instanceof RegExp){for(var C=["global","multiline","ignoreCase","source"],F=0;F<C.length;F++){var B=C[F];if(y[B]!==E[B])return!1}return!0}return!1}function hn(y,E,C,F){if(E){var B=$n(y),z=eo(E,!!C,!!F);if(z)return Ai(y,z),Hn(z,B.getQuery())||B.setQuery(z),z}}function Mn(y){if(y.source.charAt(0)=="^")var E=!0;return{token:function(C){if(E&&!C.sol()){C.skipToEnd();return}var F=C.match(y,!1);if(F)return F[0].length==0?(C.next(),"searching"):!C.sol()&&(C.backUp(1),!y.exec(C.next()+F[0]))?(C.next(),null):(C.match(y),"searching");for(;!C.eol()&&(C.next(),!C.match(y,!1)););},query:y}}function Ai(y,E){clearTimeout(fr);var C=$n(y);C.highlightTimeout=fr,fr=setTimeout(function(){if(y.state.vim){var F=$n(y);F.highlightTimeout=null;var B=F.getOverlay();(!B||E!=B.query)&&(B&&y.removeOverlay(B),B=Mn(E),y.addOverlay(B),y.showMatchesOnScrollbar&&(F.getScrollbarAnnotate()&&F.getScrollbarAnnotate().clear(),F.setScrollbarAnnotate(y.showMatchesOnScrollbar(E))),F.setOverlay(B))}},50)}function Rr(y,E,C,F){return F===void 0&&(F=1),y.operation(function(){for(var B=y.getCursor(),z=y.getSearchCursor(C,B),V=0;V<F;V++){var Y=z.find(E);if(V==0&&Y&&dt(z.from(),B)){var Q=E?z.from():z.to();Y=z.find(E),Y&&!Y[0]&&dt(z.from(),Q)&&y.getLine(Q.line).length==Q.ch&&(Y=z.find(E))}if(!Y&&(z=y.getSearchCursor(C,E?new De(y.lastLine()):new De(y.firstLine(),0)),!z.find(E)))return}return z.from()})}function Ei(y,E,C,F,B){return F===void 0&&(F=1),y.operation(function(){var z=y.getCursor(),V=y.getSearchCursor(C,z),Y=V.find(!E);!B.visualMode&&Y&&dt(V.from(),z)&&V.find(!E);for(var Q=0;Q<F;Q++)if(Y=V.find(E),!Y&&(V=y.getSearchCursor(C,E?new De(y.lastLine()):new De(y.firstLine(),0)),!V.find(E)))return;return[V.from(),V.to()]})}function ns(y){var E=$n(y);E.highlightTimeout&&(clearTimeout(E.highlightTimeout),E.highlightTimeout=null),y.removeOverlay($n(y).getOverlay()),E.setOverlay(null),E.getScrollbarAnnotate()&&(E.getScrollbarAnnotate().clear(),E.setScrollbarAnnotate(null))}function Us(y,E,C){return typeof y!="number"&&(y=y.line),E instanceof Array?x(y,E):typeof C=="number"?y>=E&&y<=C:y==E}function go(y){var E=y.ace.renderer;return{top:E.getFirstFullyVisibleRow(),bottom:E.getLastFullyVisibleRow()}}function ti(y,E,C){if(C=="'"||C=="`")return We.jumpList.find(y,-1)||new De(0,0);if(C==".")return To(y);var F=E.marks[C];return F&&F.find()}function To(y){if(y.getLastEditEnd)return y.getLastEditEnd();for(var E=y.doc.history.done,C=E.length;C--;)if(E[C].changes)return Ke(E[C].changes[0].to)}function rs(y,E,C,F,B,z,V,Y,Q){function re(){y.operation(function(){for(;!Ne;)le(),ke();me()})}function le(){var Ye=y.getRange(z.from(),z.to()),tt=Ye.replace(V,Y),fn=z.to().line;z.replace(tt),He=z.to().line,B+=He-fn,at=He<fn}function ye(){var Ye=Ie&&Ke(z.to()),tt=z.findNext();return tt&&!tt[0]&&Ye&&dt(z.from(),Ye)&&(tt=z.findNext()),tt}function ke(){for(;ye()&&Us(z.from(),F,B);)if(!(!C&&z.from().line==He&&!at)){y.scrollIntoView(z.from(),30),y.setSelection(z.from(),z.to()),Ie=z.from(),Ne=!1;return}Ne=!0}function me(Ye){if(Ye&&Ye(),y.focus(),Ie){y.setCursor(Ie);var tt=y.state.vim;tt.exMode=!1,tt.lastHPos=tt.lastHSPos=Ie.ch}Q&&Q()}function be(Ye,tt,fn){Be.e_stop(Ye);var lt=W(Ye);switch(lt){case"y":le(),ke();break;case"n":ke();break;case"a":var yn=Q;Q=void 0,y.operation(re),Q=yn;break;case"l":le();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(fn)}return Ne&&me(fn),!0}y.state.vim.exMode=!0;var Ne=!1,Ie,He,at;if(ke(),Ne){Pt(y,"No matches for "+V.source);return}if(!E){re(),Q&&Q();return}Mr(y,{prefix:fi("span","replace with ",fi("strong",Y)," (y/n/a/q/l)"),onKeyDown:be})}function ni(y,E){var C=y.state.vim,F=We.macroModeState,B=We.registerController.getRegister("."),z=F.isPlaying,V=F.lastInsertModeChanges;z||(y.off("change",Mo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=null,Be.off(y.getInputField(),"keydown",Gs)),!z&&C.insertModeRepeat>1&&(Da(y,C,C.insertModeRepeat-1,!0),C.lastEditInputState.repeatOverride=C.insertModeRepeat),delete C.insertModeRepeat,C.insertMode=!1,E||y.setCursor(y.getCursor().line,y.getCursor().ch-1),y.setOption("keyMap","vim"),y.setOption("disableInput",!0),y.toggleOverwrite(!1),B.setText(V.changes.join("")),Be.signal(y,"vim-mode-change",{mode:"normal"}),F.isRecording&&sr(F)}function is(y){An.unshift(y)}function qs(y,E,C,F,B){var z={keys:y,type:E};z[E]=C,z[E+"Args"]=F;for(var V in B)z[V]=B[V];is(z)}function Vs(y,E,C,F){var B=We.registerController.getRegister(F);if(F==":"){B.keyBuffer[0]&&br.processCommand(y,B.keyBuffer[0]),C.isPlaying=!1;return}var z=B.keyBuffer,V=0;C.isPlaying=!0,C.replaySearchQueries=B.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,le;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),le=re[0],Q=Q.substring(re.index+le.length),mt.handleKey(y,le,"macro"),E.insertMode){var ye=B.insertModeChanges[V++].changes;We.macroModeState.lastInsertModeChanges.changes=ye,cs(y,ye,1),ni(y)}C.isPlaying=!1}function os(y,E){if(!y.isPlaying){var C=y.latestRegister,F=We.registerController.getRegister(C);F&&F.pushText(E)}}function sr(y){if(!y.isPlaying){var E=y.latestRegister,C=We.registerController.getRegister(E);C&&C.pushInsertModeChanges&&C.pushInsertModeChanges(y.lastInsertModeChanges)}}function Ks(y,E){if(!y.isPlaying){var C=y.latestRegister,F=We.registerController.getRegister(C);F&&F.pushSearchQuery&&F.pushSearchQuery(E)}}function Mo(y,E){var C=We.macroModeState,F=C.lastInsertModeChanges;if(!C.isPlaying)for(var B=y.state.vim;E;){if(F.expectCursorActivityForChange=!0,F.ignoreCount>1)F.ignoreCount--;else if(E.origin=="+input"||E.origin=="paste"||E.origin===void 0){var z=y.listSelections().length;z>1&&(F.ignoreCount=z);var V=E.text.join(`
1411
+ `);if(F.maybeReset&&(F.changes=[],F.maybeReset=!1),V)if(y.state.overwrite&&!/\n/.test(V))F.changes.push([V]);else{if(V.length>1){var Y=B&&B.insertEnd&&B.insertEnd.find(),Q=y.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<V.length&&(F.changes.push([V,re]),V="")}}V&&F.changes.push(V)}}E=E.next}}function ss(y){var E=y.state.vim;if(E.insertMode){var C=We.macroModeState;if(C.isPlaying)return;var F=C.lastInsertModeChanges;F.expectCursorActivityForChange?F.expectCursorActivityForChange=!1:(F.maybeReset=!0,E.insertEnd&&E.insertEnd.clear(),E.insertEnd=y.setBookmark(y.getCursor(),{insertLeft:!0}))}else y.curOp.isVimOp||as(y,E)}function as(y,E,C){var F=y.getCursor("anchor"),B=y.getCursor("head");if(E.visualMode&&!y.somethingSelected()?Cn(y,!1):!E.visualMode&&!E.insertMode&&y.somethingSelected()&&(E.visualMode=!0,E.visualLine=!1,Be.signal(y,"vim-mode-change",{mode:"visual"})),E.visualMode){var z=ot(B,F)?0:-1,V=ot(B,F)?-1:0;B=ge(B,0,z),F=ge(F,0,V),E.sel={anchor:F,head:B},di(y,E,"<",gt(B,F)),di(y,E,">",tn(B,F))}else!E.insertMode&&!C&&(E.lastHPos=y.getCursor().ch)}function mo(y,E){this.keyName=y,this.key=E.key,this.ctrlKey=E.ctrlKey,this.altKey=E.altKey,this.metaKey=E.metaKey,this.shiftKey=E.shiftKey}function Gs(y){var E=We.macroModeState,C=E.lastInsertModeChanges,F=Be.keyName?Be.keyName(y):y.key;F&&(F.indexOf("Delete")!=-1||F.indexOf("Backspace")!=-1)&&(C.maybeReset&&(C.changes=[],C.maybeReset=!1),C.changes.push(new mo(F,y)))}function Da(y,E,C,F){function B(){Y?Ln.processAction(y,E,E.lastEditActionCommand):Ln.evalInput(y,E)}function z(le){if(V.lastInsertModeChanges.changes.length>0){le=E.lastEditActionCommand?le:1;var ye=V.lastInsertModeChanges;cs(y,ye.changes,le)}}var V=We.macroModeState;V.isPlaying=!0;var Y=!!E.lastEditActionCommand,Q=E.inputState;if(E.inputState=E.lastEditInputState,Y&&E.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<C;re++)B(),z(1);else F||B(),z(C);E.inputState=Q,E.insertMode&&!F&&ni(y),V.isPlaying=!1}function ls(y,E){Be.lookupKey(E,"vim-insert",function(C){return typeof C=="string"?Be.commands[C](y):C(y),!0})}function cs(y,E,C){var F=y.getCursor("head"),B=We.macroModeState.lastInsertModeChanges.visualBlock;B&&(Pr(y,F,B+1),C=y.listSelections().length,y.setCursor(F));for(var z=0;z<C;z++){B&&y.setCursor(ge(F,z,0));for(var V=0;V<E.length;V++){var Y=E[V];if(Y instanceof mo)ls(y,Y.keyName);else if(typeof Y=="string")y.replaceSelection(Y);else{var Q=y.getCursor(),re=ge(Q,0,Y[0].length-(Y[1]||0));y.replaceRange(Y[0],Q,Y[1]?Q:re),y.setCursor(re)}}}B&&y.setCursor(ge(F,0,1))}function Ys(y,E,C,F){E.length>1&&E[0]=="n"&&(E=E.replace("numpad","")),E=Lr[E]||E;var B="";if(C.ctrlKey&&(B+="C-"),C.altKey&&(B+="A-"),(B||E.length>1)&&C.shiftKey&&(B+="S-"),F&&!F.expectLiteralNext&&E.length==1){if(Un.keymap&&E in Un.keymap)(Un.remapCtrl!==!1||!B)&&(E=Un.keymap[E]);else if(E.charCodeAt(0)>255){var z=C.code&&C.code.slice(-1)||"";C.shiftKey||(z=z.toLowerCase()),z&&(E=z)}}return B+=E,B.length>1&&(B="<"+B+">"),B}function us(y){var E=new y.constructor;return Object.keys(y).forEach(function(C){if(C!="insertEnd"){var F=y[C];Array.isArray(F)?F=F.slice():F&&typeof F=="object"&&F.constructor!=Object&&(F=us(F)),E[C]=F}}),y.sel&&(E.sel={head:y.sel.head&&Ke(y.sel.head),anchor:y.sel.anchor&&Ke(y.sel.anchor)}),E}function Ro(y,E,C){var F=!1,B=mt.maybeInitVimState_(y),z=B.visualBlock||B.wasInVisualBlock,V=y.ace.inMultiSelectMode;if(B.wasInVisualBlock&&!V?B.wasInVisualBlock=!1:V&&B.visualBlock&&(B.wasInVisualBlock=!0),E=="<Esc>"&&!B.insertMode&&!B.visualMode&&V)y.ace.exitMultiSelectMode();else if(z||!V||y.ace.inVirtualSelectionMode)F=mt.handleKey(y,E,C);else{var Y=us(B),Q=B.inputState.changeQueueList||[];y.operation(function(){y.curOp.isVimOp=!0;var re=0;y.ace.forEachSelection(function(){var le=y.ace.selection;y.state.vim.lastHPos=le.$desiredColumn==null?le.lead.column:le.$desiredColumn,y.state.vim.inputState.changeQueue=Q[re];var ye=y.getCursor("head"),ke=y.getCursor("anchor"),me=ot(ye,ke)?0:-1,be=ot(ye,ke)?-1:0;ye=ge(ye,0,me),ke=ge(ke,0,be),y.state.vim.sel.head=ye,y.state.vim.sel.anchor=ke,F=vi(y,E,C),le.$desiredColumn=y.state.vim.lastHPos==-1?null:y.state.vim.lastHPos,y.ace.inVirtualSelectionMode&&(Q[re]=y.state.vim.inputState.changeQueue),y.virtualSelectionMode()&&(y.state.vim=us(Y)),re++}),y.curOp.cursorActivity&&!F&&(y.curOp.cursorActivity=!1),B.status=y.state.vim.status,y.state.vim=B,B.inputState.changeQueueList=Q,B.inputState.changeQueue=null},!0)}return F&&!B.visualMode&&!B.insert&&B.visualMode!=y.somethingSelected()&&as(y,B,!0),F}function Ti(y,E){E.off("beforeEndOperation",Ti);var C=E.state.cm.vimCmd;C&&E.execCommand(C.exec?C:C.name,C.args),E.curOp=E.prevOp}var ar=t("../range").Range,vo=t("../lib/event_emitter").EventEmitter,to=t("../lib/dom"),Fa=t("../lib/oop"),Il=t("../lib/keys"),Lo=t("../lib/event"),no=t("../search").Search,Oo=t("../lib/useragent"),hs=t("../search_highlight").SearchHighlight,Io=t("../commands/multi_select_commands"),Pa=t("../mode/text").Mode.prototype.tokenRe,yo=t("../ext/hardwrap").hardWrap;t("../multi_select");var Be=function(y){this.ace=y,this.state={},this.marks={},this.options={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};Be.Pos=function(y,E){if(!(this instanceof De))return new De(y,E);this.line=y,this.ch=E},Be.defineOption=function(y,E,C){},Be.commands={redo:function(y){y.ace.redo()},undo:function(y){y.ace.undo()},newlineAndIndent:function(y){y.ace.insert(`
1412
1412
  `)},goLineLeft:function(y){y.ace.selection.moveCursorLineStart()},goLineRight:function(y){y.ace.selection.moveCursorLineEnd()}},Be.keyMap={},Be.addClass=Be.rmClass=function(){},Be.e_stop=Be.e_preventDefault=Lo.stopEvent,Be.keyName=function(y){var E=Il[y.keyCode]||y.key||"";return E.length==1&&(E=E.toUpperCase()),E=Lo.getModifierString(y).replace(/(^|-)\w/g,function(C){return C.toUpperCase()})+E,E},Be.keyMap.default=function(y){return function(E){var C=E.ace.commands.commandKeyBinding[y.toLowerCase()];return C&&E.ace.execCommand(C)!==!1}},Be.lookupKey=function y(E,C,F){C||(C="default"),typeof C=="string"&&(C=Be.keyMap[C]||Be.keyMap.default);var B=typeof C=="function"?C(E):C[E];if(B===!1)return"nothing";if(B==="...")return"multi";if(B!=null&&F(B))return"handled";if(C.fallthrough){if(!Array.isArray(C.fallthrough))return y(E,C.fallthrough,F);for(var z=0;z<C.fallthrough.length;z++){var V=y(E,C.fallthrough[z],F);if(V)return V}}},Be.findMatchingTag=function(y,E){return y.findMatchingTag(E)},Be.findEnclosingTag=function(y,E){},Be.signal=function(y,E,C){return y._signal(E,C)},Be.on=Lo.addListener,Be.off=Lo.removeListener,Be.isWordChar=function(y){return y<""?/^\w$/.test(y):(Pa.lastIndex=0,Pa.test(y))},(function(){Fa.implement(Be.prototype,vo),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(C){this.$lineHandleChanges&&this.$lineHandleChanges.push(C);var F={text:C.action[0]=="i"?C.lines:[]},B=this.curOp=this.curOp||{};B.changeHandlers||(B.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),B.lastChange?B.lastChange.next=B.lastChange=F:B.lastChange=B.change=F,this.$updateMarkers(C)},this.onSelectionChange=function(){var C=this.curOp=this.curOp||{};C.cursorActivityHandlers||(C.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(Io.keyboardHandler)},this.operation=function(C,F){if(!F&&this.curOp||F&&this.curOp&&this.curOp.force)return C();if((F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var B=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=F;var V=C();return this.ace.curOp&&this.ace.curOp.command.name=="vim"&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=this.ace.curOp.vimDialogScroll),this.ace.endOperation(),!z.cursorActivity&&!z.lastChange&&B&&(this.ace.prevOp=B)),(F||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),V},this.onBeforeEndOperation=function(){var C=this.curOp;C&&(C.change&&this.signal("change",C.change,C),C&&C.cursorActivity&&this.signal("cursorActivity",null,C),this.curOp=null)},this.signal=function(C,F,B){var z=B?B[C+"Handlers"]:(this._eventRegistry||{})[C];if(z){z=z.slice();for(var V=0;V<z.length;V++)z[V](this,F)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(C,F){typeof C=="object"&&(F=C.ch,C=C.line);var B=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:C,column:F}),this.ace.selection.moveTo(C,F),B&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(C){var F=this.ace.selection,B=C=="anchor"?F.isEmpty()?F.lead:F.anchor:C=="head"||!C?F.lead:F.getRange()[C];return u(B)},this.listSelections=function(C){var F=this.ace.multiSelect.rangeList.ranges;return!F.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:F.map(function(B){return{anchor:this.clipPos(u(B.cursor==B.end?B.start:B.end)),head:this.clipPos(u(B.cursor))}},this)},this.setSelections=function(C,F){var B=this.ace.multiSelect,z=C.map(function(re){var le=d(re.anchor),ye=d(re.head),ke=ar.comparePoints(le,ye)<0?new ar.fromPoints(le,ye):new ar.fromPoints(ye,le);return ke.cursor=ar.comparePoints(ke.start,ye)?ke.end:ke.start,ke});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}F?z[F]&&z.push(z.splice(F,1)[0]):z=z.reverse(),B.toSingleRange(z[0].clone());for(var V=this.ace.session,Y=0;Y<z.length;Y++){var Q=V.$clipRangeToDocument(z[Y]);B.addRange(Q)}},this.setSelection=function(C,F,B){var z=this.ace.selection;z.moveTo(C.line,C.ch),z.selectTo(F.line,F.ch),B&&B.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(C){return!this.ace.selection.isEmpty()},this.clipPos=function(C){var F=this.ace.session.$clipPositionToDocument(C.line,C.ch);return u(F)},this.foldCode=function(C){this.ace.session.$toggleFoldWidget(C.line,{})},this.markText=function(C){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(C){var F=C.action=="insert",B=C.start,z=C.end,V=(z.row-B.row)*(F?1:-1),Y=(z.column-B.column)*(F?1:-1);F&&(z=B);for(var Q in this.marks){var re=this.marks[Q],le=ar.comparePoints(re,B);if(!(le<0)){if(le===0&&F)if(!re.$insertRight)le=1;else{if(re.bias!=1){re.bias=-1;continue}le=1}var ye=F?le:ar.comparePoints(re,z);if(ye>0){re.row+=V,re.column+=re.row==z.row?Y:0;continue}!F&&ye<=0&&(re.row=B.row,re.column=B.column,ye===0&&(re.bias=1))}}};var y=function(C,F,B,z){this.cm=C,this.id=F,this.row=B,this.column=z,C.marks[this.id]=this};y.prototype.clear=function(){delete this.cm.marks[this.id]},y.prototype.find=function(){return u(this)},this.setBookmark=function(C,F){var B=new y(this,this.$uid++,C.line,C.ch);return(!F||!F.insertLeft)&&(B.$insertRight=!0),this.marks[B.id]=B,B},this.moveH=function(C,F){if(F=="char"){var B=this.ace.selection;B.clearSelection(),B.moveCursorBy(0,C)}},this.findPosV=function(C,F,B,z){if(B=="page"){var V=this.ace.renderer,Y=V.layerConfig;F*=Math.floor(Y.height/Y.lineHeight),B="line"}if(B=="line"){var Q=this.ace.session.documentToScreenPosition(C.line,C.ch);z!=null&&(Q.column=z),Q.row+=F,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 u(re)}debugger},this.charCoords=function(C,F){if(F=="div"||!F){var B=this.ace.session.documentToScreenPosition(C.line,C.ch);return{left:B.column,top:B.row}}if(F=="local"){var z=this.ace.renderer,B=this.ace.session.documentToScreenPosition(C.line,C.ch),V=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=V*B.row;return{left:B.column*Y,top:Q,bottom:Q+V}}},this.coordsChar=function(C,F){var B=this.ace.renderer;if(F=="local"){var z=Math.max(0,Math.floor(C.top/B.lineHeight)),V=Math.max(0,Math.floor(C.left/B.characterWidth)),Y=B.session.screenToDocumentPosition(z,V);return u(Y)}if(F=="div")throw"not implemented"},this.getSearchCursor=function(C,F,B){var z=!1,V=!1;C instanceof RegExp&&!C.global&&(z=!C.ignoreCase,C=C.source,V=!0),C=="\\n"&&(C=`
1413
1413
  `,V=!1);var Y=new no;F.ch==null&&(F.ch=Number.MAX_VALUE);var Q={row:F.line,column:F.ch},re=this,le=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:C,caseSensitive:z,wrap:!1,backwards:ye,regExp:V,start:le||Q});var ke=Y.find(re.ace.session);return le=ke,le&&[!le.isEmpty()]},from:function(){return le&&u(le.start)},to:function(){return le&&u(le.end)},replace:function(ye){le&&(le.end=re.ace.session.doc.replace(le,ye))}}},this.scrollTo=function(C,F){var B=this.ace.renderer,z=B.layerConfig,V=z.maxHeight;V-=(B.$size.scrollerHeight-B.lineHeight)*B.$scrollPastEnd,F!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(F,V))),C!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(C,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(C,F){if(C){var B=this.ace.renderer,z={top:0,bottom:F};B.scrollCursorIntoView(d(C),B.lineHeight*2/B.$size.scrollerHeight,z)}},this.getLine=function(C){return this.ace.session.getLine(C)},this.getRange=function(C,F){return this.ace.session.getTextRange(new ar(C.line,C.ch,F.line,F.ch))},this.replaceRange=function(C,F,B){B||(B=F);var z=new ar(F.line,F.ch,B.line,B.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,C)},this.replaceSelection=this.replaceSelections=function(C){var F=Array.isArray(C)&&C,B=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(B.getRange(),F?C[0]||"":C);return}B.inVirtualSelectionMode=!0;var z=B.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var V=z.length;V--;)this.ace.session.replace(z[V],F?C[V]||"":C);B.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(C){return this.getRange(C.anchor,C.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var E={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(C,F){switch(this.state[C]=F,C){case"indentWithTabs":C=E[C],F=!F;break;case"keyMap":this.state.$keyMap=F;return;default:C=E[C]}C&&this.ace.setOption(C,F)},this.getOption=function(C){var F,B=E[C];switch(B&&(F=this.ace.getOption(B)),C){case"indentWithTabs":return C=E[C],!F;case"keyMap":return this.state.$keyMap||"vim"}return B?F:this.state[C]},this.toggleOverwrite=function(C){return this.state.overwrite=C,this.ace.setOverwrite(C)},this.addOverlay=function(C){if(!this.$searchHighlight||!this.$searchHighlight.session){var F=new hs(null,"ace_highlight-marker","text"),B=this.ace.session.addDynamicMarker(F);F.id=B.id,F.session=this.ace.session,F.destroy=function(V){F.session.off("change",F.updateOnChange),F.session.off("changeEditor",F.destroy),F.session.removeMarker(F.id),F.session=null},F.updateOnChange=function(V){var Y=V.start.row;Y==V.end.row?F.cache[Y]=void 0:F.cache.splice(Y,F.cache.length)},F.session.on("changeEditor",F.destroy),F.session.on("change",F.updateOnChange)}var z=new RegExp(C.query.source,"gmi");this.$searchHighlight=C.highlight=F,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(C){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var C=this.ace.renderer,F=C.layerConfig;return{left:C.scrollLeft,top:C.scrollTop,height:F.maxHeight,width:F.width,clientHeight:F.height,clientWidth:F.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(C){return this.ace.setValue(C,-1)},this.getTokenTypeAt=function(C){var F=this.ace.session.getTokenAt(C.line,C.ch);return F&&/comment|string/.test(F.type)?"string":""},this.findMatchingBracket=function(C){var F=this.ace.session.findMatchingBracket(d(C));return{to:F&&u(F)}},this.findMatchingTag=function(C){var F=this.ace.session.getMatchingTags(d(C));if(F)return{open:{from:u(F.openTag.start),to:u(F.openTag.end)},close:{from:u(F.closeTag.start),to:u(F.closeTag.end)}}},this.indentLine=function(C,F){F===!0?this.ace.session.indentRows(C,C," "):F===!1&&this.ace.session.outdentRows(new ar(C,0,C,0))},this.indexFromPos=function(C){return this.ace.session.doc.positionToIndex(d(C))},this.posFromIndex=function(C){return u(this.ace.session.doc.indexToPosition(C))},this.focus=function(C){return this.ace.textInput.focus()},this.blur=function(C){return this.ace.blur()},this.defaultTextHeight=function(C){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(C,F,B,z){var V=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(F==1)var Q=this.ace.session.$findClosingBracket(V.slice(1,2),d(C),Y);else{var Q=this.ace.session.$findOpeningBracket(V.slice(-2,-1),{row:C.line,column:C.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(C.line)[C.ch-1])&&(Q={row:C.line,column:C.ch-1})}return Q&&{pos:u(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(C){if(Be.commands.hasOwnProperty(C))return Be.commands[C](this);if(C=="indentAuto")return this.ace.execCommand("autoindent");console.log(C+" is not implemented")},this.getLineNumber=function(C){var F=this.$lineHandleChanges;if(!F)return null;for(var B=C.row,z=0;z<F.length;z++){var V=F[z];if(V.start.row!=V.end.row){if(V.action[0]=="i")V.start.row<B&&(B+=V.end.row-V.start.row);else if(V.start.row<B){if(B<V.end.row||B==V.end.row&&V.start.column>0)return null;B-=V.end.row-V.start.row}}}return B},this.getLineHandle=function(C){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(C),row:C}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var C=this.ace.session.$undoManager;if(C&&C.$lastDelta)return u(C.$lastDelta.end)}}).call(Be.prototype);var Ba=Be.StringStream=function(y,E){this.pos=this.start=0,this.string=y,this.tabSize=E||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Ba.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(y){var E=this.string.charAt(this.pos);if(typeof y=="string")var C=E==y;else var C=E&&(y.test?y.test(E):y(E));if(C)return++this.pos,E},eatWhile:function(y){for(var E=this.pos;this.eat(y););return this.pos>E},eatSpace:function(){for(var y=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>y},skipToEnd:function(){this.pos=this.string.length},skipTo:function(y){var E=this.string.indexOf(y,this.pos);if(E>-1)return this.pos=E,!0},backUp:function(y){this.pos-=y},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(y,E,C){if(typeof y!="string"){var F=this.string.slice(this.pos).match(y);return F&&F.index>0?null:(F&&E!==!1&&(this.pos+=F[0].length),F)}var B=function(V){return C?V.toLowerCase():V},z=this.string.substr(this.pos,y.length);if(B(z)==B(y))return E!==!1&&(this.pos+=y.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(y,E){this.lineStart+=y;try{return E()}finally{this.lineStart-=y}}},Be.defineExtension=function(y,E){Be.prototype[y]=E},to.importCssString(`.normal-mode .ace_cursor{
1414
1414
  border: none;
@@ -1443,38 +1443,38 @@ System.register(["./main-2d24b5c8b84fa9a15ff1.js","vue","single-spa"],function(B
1443
1443
  width: 20em;
1444
1444
  color: inherit;
1445
1445
  font-family: monospace;
1446
- }`,"vimMode",!1),function(){function y(C,F,B){var z=C.ace.container,V;return V=z.appendChild(document.createElement("div")),B?V.className="ace_dialog ace_dialog-bottom":V.className="ace_dialog ace_dialog-top",typeof F=="string"?V.innerHTML=F:V.appendChild(F),V}function E(C,F){C.state.currentNotificationClose&&C.state.currentNotificationClose(),C.state.currentNotificationClose=F}Be.defineExtension("openDialog",function(C,F,B){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==V&&(Q.state.dialog=null,Q.focus()),Y=!0,V.remove(),B.onClose&&B.onClose(V);var 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={}),E(this,null);var V=y(this,C,B.bottom),Y=!1,Q=this;this.state.dialog=V;var re=V.getElementsByTagName("input")[0],le;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&Be.on(re,"input",function(ye){B.onInput(ye,re.value,z)}),B.onKeyUp&&Be.on(re,"keyup",function(ye){B.onKeyUp(ye,re.value,z)}),Be.on(re,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&F(re.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(Be.e_stop(ye),z()))}),B.closeOnBlur!==!1&&Be.on(re,"blur",z),re.focus()):(le=V.getElementsByTagName("button")[0])&&(Be.on(le,"click",function(){z(),Q.focus()}),B.closeOnBlur!==!1&&Be.on(le,"blur",z),le.focus()),z}}),Be.defineExtension("openNotification",function(C,F){function B(){V||(V=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){E(this,B);var z=y(this,C,F&&F.bottom),V=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Be.on(z,"click",function(re){Be.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var De=Be.Pos,An=[{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=An.length,pi=[{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"}],Un=D(""),ja=/[\d]/,Do=[Be.isWordChar,function(y){return y&&!Be.isWordChar(y)&&!/\s/.test(y)}],Ti=[function(y){return/\S/.test(y)}],bo=["<",">"],Yt=["-",'"',".",":","_","/","+"],Vt=/^\w$/,Xt;try{Xt=new RegExp("^[\\p{Lu}]$","u")}catch{Xt=/^[A-Z]$/}var Bt={};T("filetype",void 0,"string",["ft"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.getOption("mode");return C=="null"?"":C}var C=y==""?"null":y;E.setOption("mode",C)}}),T("textwidth",80,"number",["tw"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.getOption("textwidth");return C}var F=Math.round(y);F>1&&E.setOption("textwidth",F)}});var Mi=function(){function y(Q,re,le){function ye(Ne){var Ie=++B%F,He=Y[Ie];He&&He.clear(),Y[Ie]=Q.setBookmark(Ne)}var ke=B%F,me=Y[ke];if(me){var be=me.find();be&&!dt(be,re)&&ye(re)}else ye(re);ye(le),z=B,V=B-F+1,V<0&&(V=0)}function E(Q,re){B+=re,B>z?B=z:B<V&&(B=V);var le=Y[(F+B)%F];if(le&&!le.find()){var ye=re>0?1:-1,ke,me=Q.getCursor();do if(B+=ye,le=Y[(F+B)%F],le&&(ke=le.find())&&!dt(me,ke))break;while(B<z&&B>V)}return le}function C(Q,re){var le=B,ye=E(Q,re);return B=le,ye&&ye.find()}var F=100,B=-1,z=0,V=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:C,move:E}},Rn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};k.prototype={exitMacroRecordMode:function(){var y=We.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,E){var C=We.registerController.getRegister(E);if(C){if(C.clear(),this.latestRegister=E,y.openDialog){var F=fi("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var We,dn,mt={enterVimMode:p,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return We},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:mo,map:function(y,E,C){br.map(y,E,C)},unmap:function(y,E){return br.unmap(y,E)},noremap:function(y,E,C){br.map(y,E,C,!0)},mapclear:function(y){var E=An.length,C=No,F=An.slice(0,E-C);if(An=An.slice(E-C),y)for(var B=F.length-1;B>=0;B--){var z=F[B];if(y!==z.context)if(z.context)this._mapCommand(z);else{var V=["normal","insert","visual"];for(var Y in V)if(V[Y]!==y){var Q={};for(var re in z)Q[re]=z[re];Q.context=V[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:W,setOption:$,getOption:S,defineOption:T,defineEx:function(y,E,C){if(!E)E=y;else if(y.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+y+'", command not registered');Xs[y]=C,br.commandMap_[E]={name:y,shortName:E,type:"api"}},handleKey:function(y,E,C){var F=this.findKey(y,E,C);if(typeof F=="function")return F()},multiSelectHandleKey:Ro,findKey:function(y,E,C){function F(){var re=We.macroModeState;if(re.isRecording){if(E=="q")return re.exitMacroRecordMode(),_(y),!0;C!="mapping"&&os(re,E)}}function B(){if(E=="<Esc>"){if(Y.visualMode)Cn(y);else{if(!Y.insertMode)return;ni(y)}return _(y),!0}}function z(){if(B())return!0;Y.inputState.keyBuffer.push(E);var re=Y.inputState.keyBuffer.join(""),le=E.length==1,ye=Ln.matchCommand(re,An,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(ye.type=="none")return _(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),dn&&window.clearTimeout(dn),dn=le&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&_(y)},S("insertModeEscKeysTimeout")),le){var me=y.listSelections();(!ke||ke.removed.length!=me.length)&&(ke=Y.inputState.changeQueue=new I),ke.inserted+=E;for(var be=0;be<me.length;be++){var Ne=gt(me[be].anchor,me[be].head),Ie=tn(me[be].anchor,me[be].head),He=y.getRange(Ne,y.state.overwrite?ge(Ie,0,1):Ie);ke.removed[be]=(ke.removed[be]||"")+He}}return!le}if(Y.expectLiteralNext=!1,dn&&window.clearTimeout(dn),ye.command&&ke){for(var me=y.listSelections(),be=0;be<me.length;be++){var st=me[be].head;y.replaceRange(ke.removed[be]||"",ge(st,0,-ke.inserted.length),st,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||_(y),ye.command}function V(){if(F()||B())return!0;Y.inputState.keyBuffer.push(E);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var le=/^(\d*)(.*)$/.exec(re);if(!le)return _(y),!1;var ye=Y.visualMode?"visual":"normal",ke=le[2]||le[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var me=Ln.matchCommand(ke,An,Y.inputState,ye);return me.type=="none"?(_(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(_(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,le=/^(\d*)(.*)$/.exec(re),le[1]&&le[1]!="0"&&Y.inputState.pushRepeatDigit(le[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=z():Q=V(),Q===!1?!Y.insertMode&&E.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?O(y,Q.toKeys,Q):Ln.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),mt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,E){br.processCommand(y,E)},defineMotion:J,defineAction:se,defineOperator:ne,mapCommand:qs,_mapCommand:is,defineRegister:U,exitVisualMode:Cn,exitInsertMode:ni},jr=[],sn=!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},Ri={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Zn)).forEach(function(y){Ri[(Zn[y]||"").toLowerCase()]=Ri[y.toLowerCase()]=y}),T("langmap",void 0,"string",["lmap"],function(y,E){if(y===void 0)return Un.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},j.prototype={setText:function(y,E,C){this.keyBuffer=[y||""],this.linewise=!!E,this.blockwise=!!C},pushText:function(y,E){E&&(this.linewise||this.keyBuffer.push(`
1446
+ }`,"vimMode",!1),function(){function y(C,F,B){var z=C.ace.container,V;return V=z.appendChild(document.createElement("div")),B?V.className="ace_dialog ace_dialog-bottom":V.className="ace_dialog ace_dialog-top",typeof F=="string"?V.innerHTML=F:V.appendChild(F),V}function E(C,F){C.state.currentNotificationClose&&C.state.currentNotificationClose(),C.state.currentNotificationClose=F}Be.defineExtension("openDialog",function(C,F,B){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==V&&(Q.state.dialog=null,Q.focus()),Y=!0,V.remove(),B.onClose&&B.onClose(V);var 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={}),E(this,null);var V=y(this,C,B.bottom),Y=!1,Q=this;this.state.dialog=V;var re=V.getElementsByTagName("input")[0],le;return re?(B.value&&(re.value=B.value,B.selectValueOnOpen!==!1&&re.select()),B.onInput&&Be.on(re,"input",function(ye){B.onInput(ye,re.value,z)}),B.onKeyUp&&Be.on(re,"keyup",function(ye){B.onKeyUp(ye,re.value,z)}),Be.on(re,"keydown",function(ye){B&&B.onKeyDown&&B.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&F(re.value),(ye.keyCode==27||B.closeOnEnter!==!1&&ye.keyCode==13)&&(Be.e_stop(ye),z()))}),B.closeOnBlur!==!1&&Be.on(re,"blur",z),re.focus()):(le=V.getElementsByTagName("button")[0])&&(Be.on(le,"click",function(){z(),Q.focus()}),B.closeOnBlur!==!1&&Be.on(le,"blur",z),le.focus()),z}}),Be.defineExtension("openNotification",function(C,F){function B(){V||(V=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){E(this,B);var z=y(this,C,F&&F.bottom),V=!1,Y,Q=F&&typeof F.duration<"u"?F.duration:5e3;return Be.on(z,"click",function(re){Be.e_preventDefault(re),B()}),Q&&(Y=setTimeout(B,Q)),B}})}();var De=Be.Pos,An=[{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=An.length,pi=[{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"}],Un=D(""),ja=/[\d]/,Do=[Be.isWordChar,function(y){return y&&!Be.isWordChar(y)&&!/\s/.test(y)}],Mi=[function(y){return/\S/.test(y)}],bo=["<",">"],Yt=["-",'"',".",":","_","/","+"],Vt=/^\w$/,Xt;try{Xt=new RegExp("^[\\p{Lu}]$","u")}catch{Xt=/^[A-Z]$/}var Bt={};T("filetype",void 0,"string",["ft"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.getOption("mode");return C=="null"?"":C}var C=y==""?"null":y;E.setOption("mode",C)}}),T("textwidth",80,"number",["tw"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.getOption("textwidth");return C}var F=Math.round(y);F>1&&E.setOption("textwidth",F)}});var Ri=function(){function y(Q,re,le){function ye(Ne){var Ie=++B%F,He=Y[Ie];He&&He.clear(),Y[Ie]=Q.setBookmark(Ne)}var ke=B%F,me=Y[ke];if(me){var be=me.find();be&&!dt(be,re)&&ye(re)}else ye(re);ye(le),z=B,V=B-F+1,V<0&&(V=0)}function E(Q,re){B+=re,B>z?B=z:B<V&&(B=V);var le=Y[(F+B)%F];if(le&&!le.find()){var ye=re>0?1:-1,ke,me=Q.getCursor();do if(B+=ye,le=Y[(F+B)%F],le&&(ke=le.find())&&!dt(me,ke))break;while(B<z&&B>V)}return le}function C(Q,re){var le=B,ye=E(Q,re);return B=le,ye&&ye.find()}var F=100,B=-1,z=0,V=0,Y=new Array(F);return{cachedCursor:void 0,add:y,find:C,move:E}},Rn=function(y){return y?{changes:y.changes,expectCursorActivityForChange:y.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};k.prototype={exitMacroRecordMode:function(){var y=We.macroModeState;y.onRecordingDone&&y.onRecordingDone(),y.onRecordingDone=void 0,y.isRecording=!1},enterMacroRecordMode:function(y,E){var C=We.registerController.getRegister(E);if(C){if(C.clear(),this.latestRegister=E,y.openDialog){var F=fi("span",{class:"cm-vim-message"},"recording @"+E);this.onRecordingDone=y.openDialog(F,null,{bottom:!0})}this.isRecording=!0}}};var We,dn,mt={enterVimMode:p,leaveVimMode:g,buildKeyMap:function(){},getRegisterController:function(){return We.registerController},resetVimGlobalState_:N,getVimGlobalState_:function(){return We},maybeInitVimState_:L,suppressErrorLogging:!1,InsertModeKey:mo,map:function(y,E,C){br.map(y,E,C)},unmap:function(y,E){return br.unmap(y,E)},noremap:function(y,E,C){br.map(y,E,C,!0)},mapclear:function(y){var E=An.length,C=No,F=An.slice(0,E-C);if(An=An.slice(E-C),y)for(var B=F.length-1;B>=0;B--){var z=F[B];if(y!==z.context)if(z.context)this._mapCommand(z);else{var V=["normal","insert","visual"];for(var Y in V)if(V[Y]!==y){var Q={};for(var re in z)Q[re]=z[re];Q.context=V[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:W,setOption:$,getOption:S,defineOption:T,defineEx:function(y,E,C){if(!E)E=y;else if(y.indexOf(E)!==0)throw new Error('(Vim.defineEx) "'+E+'" is not a prefix of "'+y+'", command not registered');Xs[y]=C,br.commandMap_[E]={name:y,shortName:E,type:"api"}},handleKey:function(y,E,C){var F=this.findKey(y,E,C);if(typeof F=="function")return F()},multiSelectHandleKey:Ro,findKey:function(y,E,C){function F(){var re=We.macroModeState;if(re.isRecording){if(E=="q")return re.exitMacroRecordMode(),_(y),!0;C!="mapping"&&os(re,E)}}function B(){if(E=="<Esc>"){if(Y.visualMode)Cn(y);else{if(!Y.insertMode)return;ni(y)}return _(y),!0}}function z(){if(B())return!0;Y.inputState.keyBuffer.push(E);var re=Y.inputState.keyBuffer.join(""),le=E.length==1,ye=Ln.matchCommand(re,An,Y.inputState,"insert"),ke=Y.inputState.changeQueue;if(ye.type=="none")return _(y),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),dn&&window.clearTimeout(dn),dn=le&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&_(y)},S("insertModeEscKeysTimeout")),le){var me=y.listSelections();(!ke||ke.removed.length!=me.length)&&(ke=Y.inputState.changeQueue=new I),ke.inserted+=E;for(var be=0;be<me.length;be++){var Ne=gt(me[be].anchor,me[be].head),Ie=tn(me[be].anchor,me[be].head),He=y.getRange(Ne,y.state.overwrite?ge(Ie,0,1):Ie);ke.removed[be]=(ke.removed[be]||"")+He}}return!le}if(Y.expectLiteralNext=!1,dn&&window.clearTimeout(dn),ye.command&&ke){for(var me=y.listSelections(),be=0;be<me.length;be++){var at=me[be].head;y.replaceRange(ke.removed[be]||"",ge(at,0,-ke.inserted.length),at,"+input")}We.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||_(y),ye.command}function V(){if(F()||B())return!0;Y.inputState.keyBuffer.push(E);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var le=/^(\d*)(.*)$/.exec(re);if(!le)return _(y),!1;var ye=Y.visualMode?"visual":"normal",ke=le[2]||le[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==ke&&(ke=Y.inputState.operatorShortcut);var me=Ln.matchCommand(ke,An,Y.inputState,ye);return me.type=="none"?(_(y),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(_(y),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,le=/^(\d*)(.*)$/.exec(re),le[1]&&le[1]!="0"&&Y.inputState.pushRepeatDigit(le[1]),me.command)}var Y=L(y),Q;return Y.insertMode?Q=z():Q=V(),Q===!1?!Y.insertMode&&E.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&y.getOption("readOnly")))return y.operation(function(){y.curOp.isVimOp=!0;try{Q.type=="keyToKey"?O(y,Q.toKeys,Q):Ln.processCommand(y,Y,Q)}catch(re){throw y.state.vim=void 0,L(y),mt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(y,E){br.processCommand(y,E)},defineMotion:J,defineAction:se,defineOperator:ne,mapCommand:qs,_mapCommand:is,defineRegister:U,exitVisualMode:Cn,exitInsertMode:ni},jr=[],sn=!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},Li={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Zn)).forEach(function(y){Li[(Zn[y]||"").toLowerCase()]=Li[y.toLowerCase()]=y}),T("langmap",void 0,"string",["lmap"],function(y,E){if(y===void 0)return Un.string;P(y)}),A.prototype.pushRepeatDigit=function(y){this.operator?this.motionRepeat=this.motionRepeat.concat(y):this.prefixRepeat=this.prefixRepeat.concat(y)},A.prototype.getRepeat=function(){var y=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(y=1,this.prefixRepeat.length>0&&(y*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(y*=parseInt(this.motionRepeat.join(""),10))),y},j.prototype={setText:function(y,E,C){this.keyBuffer=[y||""],this.linewise=!!E,this.blockwise=!!C},pushText:function(y,E){E&&(this.linewise||this.keyBuffer.push(`
1447
1447
  `),this.linewise=!0),this.keyBuffer.push(y)},pushInsertModeChanges:function(y){this.insertModeChanges.push(Rn(y))},pushSearchQuery:function(y){this.searchQueries.push(y)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(y,E,C,F,B){if(y!=="_"){F&&C.charAt(C.length-1)!==`
1448
1448
  `&&(C+=`
1449
1449
  `);var z=this.isValidRegister(y)?this.getRegister(y):null;if(!z){switch(E){case"yank":this.registers[0]=new j(C,F,B);break;case"delete":case"change":C.indexOf(`
1450
- `)==-1?this.registers["-"]=new j(C,F):(this.shiftNumericRegisters_(),this.registers[1]=new j(C,F))}this.unnamedRegister.setText(C,F,B);return}var V=a(y);V?z.pushText(C,F):z.setText(C,F,B),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(C),this.unnamedRegister.setText(z.toString(),F)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new j),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Yt)||Vt.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,E){var C=this.historyBuffer,F=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var B=this.iterator+F;E?B>=0:B<C.length;B+=F)for(var z=C[B],V=0;V<=z.length;V++)if(this.initialPrefix==z.substring(0,V))return this.iterator=B,z;if(B>=C.length)return this.iterator=C.length,this.initialPrefix;if(B<0)return y},pushInput:function(y){var E=this.historyBuffer.indexOf(y);E>-1&&this.historyBuffer.splice(E,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ln={matchCommand:function(y,E,C,F){var B=Ee(y,E,F,C);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var z,V=0;V<B.full.length;V++){var Y=B.full[V];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Re(y);if(!Q||Q.length>1)return{type:"clear"};C.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(y,E,C){switch(E.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(y,E,C);break;case"operator":this.processOperator(y,E,C);break;case"operatorMotion":this.processOperatorMotion(y,E,C);break;case"action":this.processAction(y,E,C);break;case"search":this.processSearch(y,E,C);break;case"ex":case"keyToEx":this.processEx(y,E,C);break}},processMotion:function(y,E,C){E.inputState.motion=C.motion,E.inputState.motionArgs=he(C.motionArgs),this.evalInput(y,E)},processOperator:function(y,E,C){var F=E.inputState;if(F.operator){if(F.operator==C.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,E);return}_(y)}F.operator=C.operator,F.operatorArgs=he(C.operatorArgs),C.keys.length>1&&(F.operatorShortcut=C.keys),C.exitVisualBlock&&(E.visualBlock=!1,Qn(y)),E.visualMode&&this.evalInput(y,E)},processOperatorMotion:function(y,E,C){var F=E.visualMode,B=he(C.operatorMotionArgs);B&&F&&B.visualLine&&(E.visualLine=!0),this.processOperator(y,E,C),F||this.processMotion(y,E,C)},processAction:function(y,E,C){var F=E.inputState,B=F.getRepeat(),z=!!B,V=he(C.actionArgs)||{};F.selectedCharacter&&(V.selectedCharacter=F.selectedCharacter),C.operator&&this.processOperator(y,E,C),C.motion&&this.processMotion(y,E,C),(C.motion||C.operator)&&this.evalInput(y,E),V.repeat=B||1,V.repeatIsExplicit=z,V.registerName=F.registerName,_(y),E.lastMotion=null,C.isEdit&&this.recordLastEdit(E,F,C),On[C.action](y,V,E)},processSearch:function(y,E,C){function F(Ie,He,st){We.searchHistoryController.pushInput(Ie),We.searchHistoryController.reset();try{hn(y,Ie,He,st)}catch{Pt(y,"Invalid regex: "+Ie),_(y);return}Ln.processMotion(y,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function B(Ie){F(Ie,!0,!0);var He=We.macroModeState;He.isRecording&&Ks(He,Ie)}function z(Ie,He,st){var Ye=W(Ie),tt,fn;Ye=="<Up>"||Ye=="<Down>"?(tt=Ye=="<Up>",fn=Ie.target?Ie.target.selectionEnd:0,He=We.searchHistoryController.nextMatch(He,tt)||"",st(He),fn&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(fn,Ie.target.value.length))):Ye&&Ye!="<Left>"&&Ye!="<Right>"&&We.searchHistoryController.reset();var lt;try{lt=hn(y,He,!0,!0)}catch{}lt?y.scrollIntoView(Rr(y,!Y,lt),30):(ns(y),y.scrollTo(ye.left,ye.top))}function V(Ie,He,st){var Ye=W(Ie);Ye=="<Esc>"||Ye=="<C-c>"||Ye=="<C-[>"||Ye=="<BS>"&&He==""?(We.searchHistoryController.pushInput(He),We.searchHistoryController.reset(),hn(y,le),ns(y),y.scrollTo(ye.left,ye.top),Be.e_stop(Ie),_(y),st(),y.focus()):Ye=="<Up>"||Ye=="<Down>"?Be.e_stop(Ie):Ye=="<C-u>"&&(Be.e_stop(Ie),st(""))}if(y.getSearchCursor){var Y=C.searchArgs.forward,Q=C.searchArgs.wholeWordOnly;$n(y).setReversed(!Y);var re=Y?"/":"?",le=$n(y).getQuery(),ye=y.getScrollInfo();switch(C.searchArgs.querySrc){case"prompt":var ke=We.macroModeState;if(ke.isPlaying){var Ne=ke.replaySearchQueries.shift();F(Ne,!0,!1)}else Mr(y,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:V});break;case"wordUnderCursor":var me=or(y,{noSymbol:!0}),be=!0;if(me||(me=or(y,{noSymbol:!1}),be=!1),!me){Pt(y,"No word under cursor"),_(y);return}var Ne=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Ne="\\b"+Ne+"\\b":Ne=_n(Ne),We.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),F(Ne,!0,!1)}}},processEx:function(y,E,C){function F(z){We.exCommandHistoryController.pushInput(z),We.exCommandHistoryController.reset(),br.processCommand(y,z),y.state.vim&&_(y)}function B(z,V,Y){var Q=W(z),re,le;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&V=="")&&(We.exCommandHistoryController.pushInput(V),We.exCommandHistoryController.reset(),Be.e_stop(z),_(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(z),re=Q=="<Up>",le=z.target?z.target.selectionEnd:0,V=We.exCommandHistoryController.nextMatch(V,re)||"",Y(V),le&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(le,z.target.value.length))):Q=="<C-u>"?(Be.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&We.exCommandHistoryController.reset()}C.type=="keyToEx"?br.processCommand(y,C.exArgs.input):E.visualMode?Mr(y,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Mr(y,{onClose:F,prefix:":",onKeyDown:B})},evalInput:function(y,E){var C=E.inputState,F=C.motion,B=C.motionArgs||{},z=C.operator,V=C.operatorArgs||{},Y=C.registerName,Q=E.sel,re=Ke(E.visualMode?ce(y,Q.head):y.getCursor("head")),le=Ke(E.visualMode?ce(y,Q.anchor):y.getCursor("anchor")),ye=Ke(re),ke=Ke(le),me,be,Ne;if(z&&this.recordLastEdit(E,C),C.repeatOverride!==void 0?Ne=C.repeatOverride:Ne=C.getRepeat(),Ne>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Ne===0)&&(Ne=1,B.repeatIsExplicit=!1),C.selectedCharacter&&(B.selectedCharacter=V.selectedCharacter=C.selectedCharacter),B.repeat=Ne,_(y),F){var Ie=ri[F](y,re,B,E,C);if(E.lastMotion=ri[F],!Ie)return;if(B.toJumplist){!z&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var He=We.jumpList,st=He.cachedCursor;st?(Gi(y,st,Ie),delete He.cachedCursor):Gi(y,re,Ie)}Ie instanceof Array?(be=Ie[0],me=Ie[1]):me=Ie,me||(me=Ke(re)),E.visualMode?((!E.visualBlock||me.ch!==1/0)&&(me=ce(y,me,ye)),be&&(be=ce(y,be)),be=be||ke,Q.anchor=be,Q.head=me,Qn(y),di(y,E,"<",rt(be,me)?be:me),di(y,E,">",rt(be,me)?me:be)):z||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ce(y,me,ye),y.setCursor(me.line,me.ch))}if(z){if(V.lastSel){be=ke;var Ye=V.lastSel,tt=Math.abs(Ye.head.line-Ye.anchor.line),fn=Math.abs(Ye.head.ch-Ye.anchor.ch);Ye.visualLine?me=new De(ke.line+tt,ke.ch):Ye.visualBlock?me=new De(ke.line+tt,ke.ch+fn):Ye.head.line==Ye.anchor.line?me=new De(ke.line,ke.ch+fn):me=new De(ke.line+tt,ke.ch),E.visualMode=!0,E.visualLine=Ye.visualLine,E.visualBlock=Ye.visualBlock,Q=E.sel={anchor:be,head:me},Qn(y)}else E.visualMode&&(V.lastSel={anchor:Ke(Q.anchor),head:Ke(Q.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var lt,yn,bt,$t,Jn;if(E.visualMode){lt=gt(Q.head,Q.anchor),yn=tn(Q.head,Q.anchor),bt=E.visualLine||V.linewise,$t=E.visualBlock?"block":bt?"line":"char";var pr=b(y,lt,yn);if(Jn=Br(y,{anchor:pr.start,head:pr.end},$t),bt){var bn=Jn.ranges;if($t=="block")for(var q=0;q<bn.length;q++)bn[q].head.ch=Zt(y,bn[q].head.line);else $t=="line"&&(bn[0].head=new De(bn[0].head.line+1,0))}}else{if(lt=Ke(be||ke),yn=Ke(me||ye),rt(yn,lt)){var X=lt;lt=yn,yn=X}bt=B.linewise||V.linewise,bt?hr(y,lt,yn):B.forward&&ir(y,lt,yn),$t="char";var ie=!B.inclusive||bt,pr=b(y,lt,yn);Jn=Br(y,{anchor:pr.start,head:pr.end},$t,ie)}y.setSelections(Jn.ranges,Jn.primary),E.lastMotion=null,V.repeat=Ne,V.registerName=Y,V.linewise=bt;var oe=ds[z](y,V,Jn.ranges,ke,me);E.visualMode&&Cn(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,E,C){var F=We.macroModeState;F.isPlaying||(y.lastEditInputState=E,y.lastEditActionCommand=C,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},ri={moveToTopLine:function(y,E,C){var F=go(y).top+C.repeat-1;return new De(F,nn(y.getLine(F)))},moveToMiddleLine:function(y){var E=go(y),C=Math.floor((E.top+E.bottom)*.5);return new De(C,nn(y.getLine(C)))},moveToBottomLine:function(y,E,C){var F=go(y).bottom-C.repeat+1;return new De(F,nn(y.getLine(F)))},expandToLine:function(y,E,C){var F=E;return new De(F.line+C.repeat-1,1/0)},findNext:function(y,E,C){var F=$n(y),B=F.getQuery();if(B){var z=!C.forward;return z=F.isReversed()?!z:z,$i(y,B),Rr(y,z,B,C.repeat)}},findAndSelectNextInclusive:function(y,E,C,F,B){var z=$n(y),V=z.getQuery();if(V){var Y=!C.forward;Y=z.isReversed()?!Y:Y;var Q=Ai(y,Y,V,C.repeat,F);if(Q){if(B.operator)return Q;var re=Q[0],le=new De(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=F.sel.anchor;if(ye)return z.isReversed()?C.forward?[ye,re]:[ye,le]:C.forward?[ye,le]:[ye,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[le,re]:[re,le]}}},goToMark:function(y,E,C,F){var B=ti(y,F,C.selectedCharacter);return B?C.linewise?{line:B.line,ch:nn(y.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(y,E,C,F){if(F.visualBlock&&C.sameLine){var B=F.sel;return[ce(y,new De(B.anchor.line,B.head.ch)),ce(y,new De(B.head.line,B.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(y,E,C,F){for(var B=E,z=0;z<C.repeat;z++){var V=B;for(var Y in F.marks)if(f(Y)){var Q=F.marks[Y].find(),re=C.forward?rt(Q,V):rt(V,Q);if(!re&&!(C.linewise&&Q.line==V.line)){var le=dt(V,B),ye=C.forward?Wn(V,Q,B):Wn(B,Q,V);(le||ye)&&(B=Q)}}}return C.linewise&&(B=new De(B.line,nn(y.getLine(B.line)))),B},moveByCharacters:function(y,E,C){var F=E,B=C.repeat,z=C.forward?F.ch+B:F.ch-B;return new De(F.line,z)},moveByLines:function(y,E,C,F){var B=E,z=B.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=F.lastHPos;break;default:F.lastHPos=z}var V=C.repeat+(C.repeatOffset||0),Y=C.forward?B.line+V:B.line-V,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(y,E,C,F);if(Y>re&&B.line==re)return Eo(y,E,C,F,!0);var le=y.ace.session.getFoldLine(Y);return le&&(C.forward?Y>le.start.row&&(Y=le.end.row+1):Y=le.start.row),C.toFirstChar&&(z=nn(y.getLine(Y)),F.lastHPos=z),F.lastHSPos=y.charCoords(new De(Y,z),"div").left,new De(Y,z)},moveByDisplayLines:function(y,E,C,F){var B=E;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=y.charCoords(B,"div").left}var z=C.repeat,Q=y.findPosV(B,C.forward?z:-z,"line",F.lastHSPos);if(Q.hitSide)if(C.forward)var V=y.charCoords(Q,"div"),Y={top:V.top+8,left:F.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=F.lastHSPos,Q=y.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(y,E,C){var F=E,B=C.repeat;return y.findPosV(F,C.forward?B:-B,"page")},moveByParagraph:function(y,E,C){var F=C.forward?1:-1;return zs(y,E,C.repeat,F)},moveBySentence:function(y,E,C){var F=C.forward?1:-1;return Qi(y,E,C.repeat,F)},moveByScroll:function(y,E,C,F){var B=y.getScrollInfo(),z=null,V=C.repeat;V||(V=B.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(E,"local");if(C.repeat=V,z=ri.moveByDisplayLines(y,E,C,F),!z)return null;var Q=y.charCoords(z,"local");return y.scrollTo(null,B.top+Q.top-Y.top),z},moveByWords:function(y,E,C){return vr(y,E,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(y,E,C){var F=C.repeat,B=ts(y,F,C.forward,C.selectedCharacter,E),z=C.forward?-1:1;return Yi(z,C),B?(B.ch+=z,B):null},moveToCharacter:function(y,E,C){var F=C.repeat;return Yi(0,C),ts(y,F,C.forward,C.selectedCharacter,E)||E},moveToSymbol:function(y,E,C){var F=C.repeat;return Xi(y,F,C.forward,C.selectedCharacter)||E},moveToColumn:function(y,E,C,F){var B=C.repeat;return F.lastHPos=B-1,F.lastHSPos=y.charCoords(E,"div").left,Ml(y,B)},moveToEol:function(y,E,C,F){return Eo(y,E,C,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,E){var C=E;return new De(C.line,nn(y.getLine(C.line)))},moveToMatchedSymbol:function(y,E){for(var C=E,F=C.line,B=C.ch,z=y.getLine(F),V;B<z.length;B++)if(V=z.charAt(B),V&&h(V)){var Y=y.getTokenTypeAt(new De(F,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<z.length){var Q=/[<>]/.test(z[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(F,B+1),{bracketRegex:Q});return re.to}return C},moveToStartOfLine:function(y,E){return new De(E.line,0)},moveToLineOrEdgeOfDocument:function(y,E,C){var F=C.forward?y.lastLine():y.firstLine();return C.repeatIsExplicit&&(F=C.repeat-y.getOption("firstLineNumber")),new De(F,nn(y.getLine(F)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var E=y.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(y,E,C,F){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},V=C.selectedCharacter;V=="b"?V="(":V=="B"&&(V="{");var Y=!C.textObjectInner,Q,re;if(B[V]){if(re=!0,Q=zn(y,E,V,Y),!Q){var le=y.getSearchCursor(new RegExp("\\"+V,"g"),E);le.find()&&(Q=zn(y,le.from(),V,Y))}}else if(z[V])re=!0,Q=Er(y,E,V,Y);else if(V==="W"||V==="w")for(var ye=C.repeat||1;ye-- >0;){var ke=or(y,{inclusive:Y,innerWord:!Y,bigWord:V==="W",noSymbol:V==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(V==="p")if(Q=zs(y,E,C.repeat,0,Y),C.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var me=F.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(V==="t")Q=$o(y,E,Y);else if(V==="s"){var be=y.getLine(E.line);E.ch>0&&w(be[E.ch])&&(E.ch-=1);var Ne=Oa(y,E,C.repeat,1,Y),Ie=Oa(y,E,C.repeat,-1,Y);m(y.getLine(Ie.line)[Ie.ch])&&m(y.getLine(Ne.line)[Ne.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),Q={start:Ie,end:Ne}}return Q?y.state.vim.visualMode?gn(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,E,C){var F=We.lastCharacterSearch,B=C.repeat,z=C.forward===F.forward,V=(F.increment?1:0)*(z?-1:1);y.moveH(-V,"char"),C.inclusive=!!z;var Y=ts(y,B,z,F.selectedCharacter);return Y?(Y.ch+=V,Y):(y.moveH(V,"char"),E)}},ds={change:function(y,E,C){var F,B,z=y.state.vim,V=C[0].anchor,Y=C[0].head;if(z.visualMode)if(E.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(V,Y),B=y.getSelection(),y.replaceSelection(""),F=V;else{B=y.getSelection();var Q=ae("",C.length);y.replaceSelections(Q),F=gt(C[0].head,C[0].anchor)}else{B=y.getRange(V,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var le=/\s+$/.exec(B);le&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-le[0].length),B=B.slice(0,-le[0].length))}E.linewise&&(V=new De(V.line,nn(y.getLine(V.line))),Y.line>V.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",V,Y),F=V}We.registerController.pushText(E.registerName,"change",B,E.linewise,C.length>1),On.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,E,C){var F,B,z=y.state.vim;if(z.visualBlock){B=y.getSelection();var V=ae("",C.length);y.replaceSelections(V),F=gt(C[0].head,C[0].anchor)}else{var Y=C[0].anchor,Q=C[0].head;E.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,Zt(y,Y.line-1))),B=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,E.linewise&&(F=ri.moveToFirstNonWhiteSpaceCharacter(y,Y))}return We.registerController.pushText(E.registerName,"delete",B,E.linewise,z.visualBlock),ce(y,F)},indent:function(y,E,C){var F=y.state.vim,B=F.visualMode?E.repeat:1;if(F.visualBlock){for(var z=y.getOption("tabSize"),V=y.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=C.length-1;Q>=0;Q--)if(Y=gt(C[Q].anchor,C[Q].head),E.indentRight)y.replaceRange(V.repeat(B),Y,Y);else{for(var re=y.getLine(Y.line),le=0,ye=0;ye<B;ye++){var ke=re[Y.ch+le];if(ke==" ")le++;else{if(ke!=" ")break;le++;for(var me=1;me<V.length&&(ke=re[Y.ch+le],ke===" ");me++)le++}}y.replaceRange("",Y,ge(Y,0,le))}return Y}if(y.indentMore)for(var ye=0;ye<B;ye++)E.indentRight?y.indentMore():y.indentLess();else{var be=C[0].anchor.line,Ne=F.visualBlock?C[C.length-1].anchor.line:C[0].head.line;E.linewise&&Ne--;for(var Q=be;Q<=Ne;Q++)for(var ye=0;ye<B;ye++)y.indentLine(Q,E.indentRight)}return ri.moveToFirstNonWhiteSpaceCharacter(y,C[0].anchor)},indentAuto:function(y,E,C){return y.execCommand("indentAuto"),ri.moveToFirstNonWhiteSpaceCharacter(y,C[0].anchor)},hardWrap:function(y,E,C,F,B){if(y.hardWrap){var z=C[0].anchor.line,V=C[0].head.line;E.linewise&&V--;var Y=y.hardWrap({from:z,to:V});return Y>z&&E.linewise&&Y--,E.keepCursor?F:new De(Y,0)}},changeCase:function(y,E,C,F,B){for(var z=y.getSelections(),V=[],Y=E.toLower,Q=0;Q<z.length;Q++){var re=z[Q],le="";if(Y===!0)le=re.toLowerCase();else if(Y===!1)le=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var ke=re.charAt(ye);le+=a(ke)?ke.toLowerCase():ke.toUpperCase()}V.push(le)}return y.replaceSelections(V),E.shouldMoveCursor?B:!y.state.vim.visualMode&&E.linewise&&C[0].anchor.line+1==C[0].head.line?ri.moveToFirstNonWhiteSpaceCharacter(y,F):E.linewise?F:gt(C[0].anchor,C[0].head)},yank:function(y,E,C,F){var B=y.state.vim,z=y.getSelection(),V=B.visualMode?gt(B.sel.anchor,B.sel.head,C[0].head,C[0].anchor):F;return We.registerController.pushText(E.registerName,"yank",z,E.linewise,B.visualBlock),V}},On={jumpListWalk:function(y,E,C){if(!C.visualMode){var F=E.repeat,B=E.forward,z=We.jumpList,V=z.move(y,B?F:-F),Y=V?V.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,E,C){if(!C.visualMode){var F=E.repeat||1,B=y.defaultTextHeight(),z=y.getScrollInfo().top,V=B*F,Y=E.forward?z+V:z-V,Q=Ke(y.getCursor()),re=y.charCoords(Q,"local");if(E.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var le=Y+y.getScrollInfo().clientHeight;le<re.bottom?(Q.line-=(re.bottom-le)/B,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,E){var C=y.getCursor().line,F=y.charCoords(new De(C,0),"local"),B=y.getScrollInfo().clientHeight,z=F.top;switch(E.position){case"center":z=F.bottom-B/2;break;case"bottom":var V=new De(C,y.getLine(C).length-1),Y=y.charCoords(V,"local"),Q=Y.bottom-z;z=z-B+Q}y.scrollTo(null,z)},replayMacro:function(y,E,C){var F=E.selectedCharacter,B=E.repeat,z=We.macroModeState;for(F=="@"?F=z.latestRegister:z.latestRegister=F;B--;)Vs(y,C,z,F)},enterMacroRecordMode:function(y,E){var C=We.macroModeState,F=E.selectedCharacter;We.registerController.isValidRegister(F)&&C.enterMacroRecordMode(y,F)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,E,C){if(!y.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=E&&E.repeat||1;var F=E?E.insertAt:null,B=C.sel,z=E.head||y.getCursor("head"),V=y.listSelections().length;if(F=="eol")z=new De(z.line,Zt(y,z.line));else if(F=="bol")z=new De(z.line,0);else if(F=="charAfter"){var Y=b(y,z,ge(z,0,1));z=Y.end}else if(F=="firstNonBlank"){var Y=b(y,z,ri.moveToFirstNonWhiteSpaceCharacter(y,z));z=Y.end}else if(F=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(z=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?z=B.head:z=new De(B.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(z=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?z=ge(B.head,0,1):z=new De(B.anchor.line,0)}else if(F=="inplace"){if(C.visualMode)return}else F=="lastEdit"&&(z=To(y)||z);y.setOption("disableInput",!1),E&&E.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})),We.macroModeState.isPlaying||(y.on("change",Mo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=y.setBookmark(z,{insertLeft:!0}),Be.on(y.getInputField(),"keydown",Gs)),C.visualMode&&Cn(y),Pr(y,z,V)}},toggleVisualMode:function(y,E,C){var F=E.repeat,B=y.getCursor(),z;if(C.visualMode)C.visualLine^E.linewise||C.visualBlock^E.blockwise?(C.visualLine=!!E.linewise,C.visualBlock=!!E.blockwise,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(y)):Cn(y);else{C.visualMode=!0,C.visualLine=!!E.linewise,C.visualBlock=!!E.blockwise,z=ce(y,new De(B.line,B.ch+F-1));var V=b(y,B,z);C.sel={anchor:V.start,head:V.end},Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(y),di(y,C,"<",gt(B,z)),di(y,C,">",tn(B,z))}},reselectLastSelection:function(y,E,C){var F=C.lastSelection;if(C.visualMode&&qt(y,C),F){var B=F.anchorMark.find(),z=F.headMark.find();if(!B||!z)return;C.sel={anchor:B,head:z},C.visualMode=!0,C.visualLine=F.visualLine,C.visualBlock=F.visualBlock,Qn(y),di(y,C,"<",gt(B,z)),di(y,C,">",tn(B,z)),Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(y,E,C){var F,B;if(C.visualMode){if(F=y.getCursor("anchor"),B=y.getCursor("head"),rt(B,F)){var z=B;B=F,F=z}B.ch=Zt(y,B.line)-1}else{var V=Math.max(E.repeat,2);F=y.getCursor(),B=ce(y,new De(F.line+V-1,1/0))}for(var Y=0,Q=F.line;Q<B.line;Q++){Y=Zt(y,F.line);var re="",le=0;if(!E.keepSpaces){var ye=y.getLine(F.line+1);le=ye.search(/\S/),le==-1?le=ye.length:re=" "}y.replaceRange(re,new De(F.line,Y),new De(F.line+1,le))}var ke=ce(y,new De(F.line,Y));C.visualMode&&Cn(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,E,C){C.insertMode=!0;var F=Ke(y.getCursor());if(F.line===y.firstLine()&&!E.after)y.replaceRange(`
1450
+ `)==-1?this.registers["-"]=new j(C,F):(this.shiftNumericRegisters_(),this.registers[1]=new j(C,F))}this.unnamedRegister.setText(C,F,B);return}var V=a(y);V?z.pushText(C,F):z.setText(C,F,B),y==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(C),this.unnamedRegister.setText(z.toString(),F)}},getRegister:function(y){return this.isValidRegister(y)?(y=y.toLowerCase(),this.registers[y]||(this.registers[y]=new j),this.registers[y]):this.unnamedRegister},isValidRegister:function(y){return y&&(x(y,Yt)||Vt.test(y))},shiftNumericRegisters_:function(){for(var y=9;y>=2;y--)this.registers[y]=this.getRegister(""+(y-1))}},Z.prototype={nextMatch:function(y,E){var C=this.historyBuffer,F=E?-1:1;this.initialPrefix===null&&(this.initialPrefix=y);for(var B=this.iterator+F;E?B>=0:B<C.length;B+=F)for(var z=C[B],V=0;V<=z.length;V++)if(this.initialPrefix==z.substring(0,V))return this.iterator=B,z;if(B>=C.length)return this.iterator=C.length,this.initialPrefix;if(B<0)return y},pushInput:function(y){var E=this.historyBuffer.indexOf(y);E>-1&&this.historyBuffer.splice(E,1),y.length&&this.historyBuffer.push(y)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ln={matchCommand:function(y,E,C,F){var B=Ee(y,E,F,C);if(!B.full&&!B.partial)return{type:"none"};if(!B.full&&B.partial)return{type:"partial",expectLiteralNext:B.partial.length==1&&B.partial[0].keys.slice(-11)=="<character>"};for(var z,V=0;V<B.full.length;V++){var Y=B.full[V];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Re(y);if(!Q||Q.length>1)return{type:"clear"};C.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(y,E,C){switch(E.inputState.repeatOverride=C.repeatOverride,C.type){case"motion":this.processMotion(y,E,C);break;case"operator":this.processOperator(y,E,C);break;case"operatorMotion":this.processOperatorMotion(y,E,C);break;case"action":this.processAction(y,E,C);break;case"search":this.processSearch(y,E,C);break;case"ex":case"keyToEx":this.processEx(y,E,C);break}},processMotion:function(y,E,C){E.inputState.motion=C.motion,E.inputState.motionArgs=he(C.motionArgs),this.evalInput(y,E)},processOperator:function(y,E,C){var F=E.inputState;if(F.operator){if(F.operator==C.operator){F.motion="expandToLine",F.motionArgs={linewise:!0},this.evalInput(y,E);return}_(y)}F.operator=C.operator,F.operatorArgs=he(C.operatorArgs),C.keys.length>1&&(F.operatorShortcut=C.keys),C.exitVisualBlock&&(E.visualBlock=!1,Qn(y)),E.visualMode&&this.evalInput(y,E)},processOperatorMotion:function(y,E,C){var F=E.visualMode,B=he(C.operatorMotionArgs);B&&F&&B.visualLine&&(E.visualLine=!0),this.processOperator(y,E,C),F||this.processMotion(y,E,C)},processAction:function(y,E,C){var F=E.inputState,B=F.getRepeat(),z=!!B,V=he(C.actionArgs)||{};F.selectedCharacter&&(V.selectedCharacter=F.selectedCharacter),C.operator&&this.processOperator(y,E,C),C.motion&&this.processMotion(y,E,C),(C.motion||C.operator)&&this.evalInput(y,E),V.repeat=B||1,V.repeatIsExplicit=z,V.registerName=F.registerName,_(y),E.lastMotion=null,C.isEdit&&this.recordLastEdit(E,F,C),On[C.action](y,V,E)},processSearch:function(y,E,C){function F(Ie,He,at){We.searchHistoryController.pushInput(Ie),We.searchHistoryController.reset();try{hn(y,Ie,He,at)}catch{Pt(y,"Invalid regex: "+Ie),_(y);return}Ln.processMotion(y,E,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:C.searchArgs.toJumplist}})}function B(Ie){F(Ie,!0,!0);var He=We.macroModeState;He.isRecording&&Ks(He,Ie)}function z(Ie,He,at){var Ye=W(Ie),tt,fn;Ye=="<Up>"||Ye=="<Down>"?(tt=Ye=="<Up>",fn=Ie.target?Ie.target.selectionEnd:0,He=We.searchHistoryController.nextMatch(He,tt)||"",at(He),fn&&Ie.target&&(Ie.target.selectionEnd=Ie.target.selectionStart=Math.min(fn,Ie.target.value.length))):Ye&&Ye!="<Left>"&&Ye!="<Right>"&&We.searchHistoryController.reset();var lt;try{lt=hn(y,He,!0,!0)}catch{}lt?y.scrollIntoView(Rr(y,!Y,lt),30):(ns(y),y.scrollTo(ye.left,ye.top))}function V(Ie,He,at){var Ye=W(Ie);Ye=="<Esc>"||Ye=="<C-c>"||Ye=="<C-[>"||Ye=="<BS>"&&He==""?(We.searchHistoryController.pushInput(He),We.searchHistoryController.reset(),hn(y,le),ns(y),y.scrollTo(ye.left,ye.top),Be.e_stop(Ie),_(y),at(),y.focus()):Ye=="<Up>"||Ye=="<Down>"?Be.e_stop(Ie):Ye=="<C-u>"&&(Be.e_stop(Ie),at(""))}if(y.getSearchCursor){var Y=C.searchArgs.forward,Q=C.searchArgs.wholeWordOnly;$n(y).setReversed(!Y);var re=Y?"/":"?",le=$n(y).getQuery(),ye=y.getScrollInfo();switch(C.searchArgs.querySrc){case"prompt":var ke=We.macroModeState;if(ke.isPlaying){var Ne=ke.replaySearchQueries.shift();F(Ne,!0,!1)}else Mr(y,{onClose:B,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:V});break;case"wordUnderCursor":var me=or(y,{noSymbol:!0}),be=!0;if(me||(me=or(y,{noSymbol:!1}),be=!1),!me){Pt(y,"No word under cursor"),_(y);return}var Ne=y.getLine(me.start.line).substring(me.start.ch,me.end.ch);be&&Q?Ne="\\b"+Ne+"\\b":Ne=_n(Ne),We.jumpList.cachedCursor=y.getCursor(),y.setCursor(me.start),F(Ne,!0,!1)}}},processEx:function(y,E,C){function F(z){We.exCommandHistoryController.pushInput(z),We.exCommandHistoryController.reset(),br.processCommand(y,z),y.state.vim&&_(y)}function B(z,V,Y){var Q=W(z),re,le;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&V=="")&&(We.exCommandHistoryController.pushInput(V),We.exCommandHistoryController.reset(),Be.e_stop(z),_(y),Y(),y.focus()),Q=="<Up>"||Q=="<Down>"?(Be.e_stop(z),re=Q=="<Up>",le=z.target?z.target.selectionEnd:0,V=We.exCommandHistoryController.nextMatch(V,re)||"",Y(V),le&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(le,z.target.value.length))):Q=="<C-u>"?(Be.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&We.exCommandHistoryController.reset()}C.type=="keyToEx"?br.processCommand(y,C.exArgs.input):E.visualMode?Mr(y,{onClose:F,prefix:":",value:"'<,'>",onKeyDown:B,selectValueOnOpen:!1}):Mr(y,{onClose:F,prefix:":",onKeyDown:B})},evalInput:function(y,E){var C=E.inputState,F=C.motion,B=C.motionArgs||{},z=C.operator,V=C.operatorArgs||{},Y=C.registerName,Q=E.sel,re=Ke(E.visualMode?ce(y,Q.head):y.getCursor("head")),le=Ke(E.visualMode?ce(y,Q.anchor):y.getCursor("anchor")),ye=Ke(re),ke=Ke(le),me,be,Ne;if(z&&this.recordLastEdit(E,C),C.repeatOverride!==void 0?Ne=C.repeatOverride:Ne=C.getRepeat(),Ne>0&&B.explicitRepeat?B.repeatIsExplicit=!0:(B.noRepeat||!B.explicitRepeat&&Ne===0)&&(Ne=1,B.repeatIsExplicit=!1),C.selectedCharacter&&(B.selectedCharacter=V.selectedCharacter=C.selectedCharacter),B.repeat=Ne,_(y),F){var Ie=ri[F](y,re,B,E,C);if(E.lastMotion=ri[F],!Ie)return;if(B.toJumplist){!z&&y.ace.curOp!=null&&(y.ace.curOp.command.scrollIntoView="center-animate");var He=We.jumpList,at=He.cachedCursor;at?(Gi(y,at,Ie),delete He.cachedCursor):Gi(y,re,Ie)}Ie instanceof Array?(be=Ie[0],me=Ie[1]):me=Ie,me||(me=Ke(re)),E.visualMode?((!E.visualBlock||me.ch!==1/0)&&(me=ce(y,me,ye)),be&&(be=ce(y,be)),be=be||ke,Q.anchor=be,Q.head=me,Qn(y),di(y,E,"<",ot(be,me)?be:me),di(y,E,">",ot(be,me)?me:be)):z||(y.ace.curOp&&(y.ace.curOp.vimDialogScroll="center-animate"),me=ce(y,me,ye),y.setCursor(me.line,me.ch))}if(z){if(V.lastSel){be=ke;var Ye=V.lastSel,tt=Math.abs(Ye.head.line-Ye.anchor.line),fn=Math.abs(Ye.head.ch-Ye.anchor.ch);Ye.visualLine?me=new De(ke.line+tt,ke.ch):Ye.visualBlock?me=new De(ke.line+tt,ke.ch+fn):Ye.head.line==Ye.anchor.line?me=new De(ke.line,ke.ch+fn):me=new De(ke.line+tt,ke.ch),E.visualMode=!0,E.visualLine=Ye.visualLine,E.visualBlock=Ye.visualBlock,Q=E.sel={anchor:be,head:me},Qn(y)}else E.visualMode&&(V.lastSel={anchor:Ke(Q.anchor),head:Ke(Q.head),visualBlock:E.visualBlock,visualLine:E.visualLine});var lt,yn,bt,$t,Jn;if(E.visualMode){lt=gt(Q.head,Q.anchor),yn=tn(Q.head,Q.anchor),bt=E.visualLine||V.linewise,$t=E.visualBlock?"block":bt?"line":"char";var pr=b(y,lt,yn);if(Jn=Br(y,{anchor:pr.start,head:pr.end},$t),bt){var bn=Jn.ranges;if($t=="block")for(var q=0;q<bn.length;q++)bn[q].head.ch=Zt(y,bn[q].head.line);else $t=="line"&&(bn[0].head=new De(bn[0].head.line+1,0))}}else{if(lt=Ke(be||ke),yn=Ke(me||ye),ot(yn,lt)){var X=lt;lt=yn,yn=X}bt=B.linewise||V.linewise,bt?hr(y,lt,yn):B.forward&&ir(y,lt,yn),$t="char";var ie=!B.inclusive||bt,pr=b(y,lt,yn);Jn=Br(y,{anchor:pr.start,head:pr.end},$t,ie)}y.setSelections(Jn.ranges,Jn.primary),E.lastMotion=null,V.repeat=Ne,V.registerName=Y,V.linewise=bt;var oe=ds[z](y,V,Jn.ranges,ke,me);E.visualMode&&Cn(y,oe!=null),oe&&y.setCursor(oe)}},recordLastEdit:function(y,E,C){var F=We.macroModeState;F.isPlaying||(y.lastEditInputState=E,y.lastEditActionCommand=C,F.lastInsertModeChanges.changes=[],F.lastInsertModeChanges.expectCursorActivityForChange=!1,F.lastInsertModeChanges.visualBlock=y.visualBlock?y.sel.head.line-y.sel.anchor.line:0)}},ri={moveToTopLine:function(y,E,C){var F=go(y).top+C.repeat-1;return new De(F,nn(y.getLine(F)))},moveToMiddleLine:function(y){var E=go(y),C=Math.floor((E.top+E.bottom)*.5);return new De(C,nn(y.getLine(C)))},moveToBottomLine:function(y,E,C){var F=go(y).bottom-C.repeat+1;return new De(F,nn(y.getLine(F)))},expandToLine:function(y,E,C){var F=E;return new De(F.line+C.repeat-1,1/0)},findNext:function(y,E,C){var F=$n(y),B=F.getQuery();if(B){var z=!C.forward;return z=F.isReversed()?!z:z,Ai(y,B),Rr(y,z,B,C.repeat)}},findAndSelectNextInclusive:function(y,E,C,F,B){var z=$n(y),V=z.getQuery();if(V){var Y=!C.forward;Y=z.isReversed()?!Y:Y;var Q=Ei(y,Y,V,C.repeat,F);if(Q){if(B.operator)return Q;var re=Q[0],le=new De(Q[1].line,Q[1].ch-1);if(F.visualMode){(F.visualLine||F.visualBlock)&&(F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""}));var ye=F.sel.anchor;if(ye)return z.isReversed()?C.forward?[ye,re]:[ye,le]:C.forward?[ye,le]:[ye,re]}else F.visualMode=!0,F.visualLine=!1,F.visualBlock=!1,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:""});return Y?[le,re]:[re,le]}}},goToMark:function(y,E,C,F){var B=ti(y,F,C.selectedCharacter);return B?C.linewise?{line:B.line,ch:nn(y.getLine(B.line))}:B:null},moveToOtherHighlightedEnd:function(y,E,C,F){if(F.visualBlock&&C.sameLine){var B=F.sel;return[ce(y,new De(B.anchor.line,B.head.ch)),ce(y,new De(B.head.line,B.anchor.ch))]}return[F.sel.head,F.sel.anchor]},jumpToMark:function(y,E,C,F){for(var B=E,z=0;z<C.repeat;z++){var V=B;for(var Y in F.marks)if(f(Y)){var Q=F.marks[Y].find(),re=C.forward?ot(Q,V):ot(V,Q);if(!re&&!(C.linewise&&Q.line==V.line)){var le=dt(V,B),ye=C.forward?Wn(V,Q,B):Wn(B,Q,V);(le||ye)&&(B=Q)}}}return C.linewise&&(B=new De(B.line,nn(y.getLine(B.line)))),B},moveByCharacters:function(y,E,C){var F=E,B=C.repeat,z=C.forward?F.ch+B:F.ch-B;return new De(F.line,z)},moveByLines:function(y,E,C,F){var B=E,z=B.ch;switch(F.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=F.lastHPos;break;default:F.lastHPos=z}var V=C.repeat+(C.repeatOffset||0),Y=C.forward?B.line+V:B.line-V,Q=y.firstLine(),re=y.lastLine();if(Y<Q&&B.line==Q)return this.moveToStartOfLine(y,E,C,F);if(Y>re&&B.line==re)return Eo(y,E,C,F,!0);var le=y.ace.session.getFoldLine(Y);return le&&(C.forward?Y>le.start.row&&(Y=le.end.row+1):Y=le.start.row),C.toFirstChar&&(z=nn(y.getLine(Y)),F.lastHPos=z),F.lastHSPos=y.charCoords(new De(Y,z),"div").left,new De(Y,z)},moveByDisplayLines:function(y,E,C,F){var B=E;switch(F.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:F.lastHSPos=y.charCoords(B,"div").left}var z=C.repeat,Q=y.findPosV(B,C.forward?z:-z,"line",F.lastHSPos);if(Q.hitSide)if(C.forward)var V=y.charCoords(Q,"div"),Y={top:V.top+8,left:F.lastHSPos},Q=y.coordsChar(Y,"div");else{var re=y.charCoords(new De(y.firstLine(),0),"div");re.left=F.lastHSPos,Q=y.coordsChar(re,"div")}return F.lastHPos=Q.ch,Q},moveByPage:function(y,E,C){var F=E,B=C.repeat;return y.findPosV(F,C.forward?B:-B,"page")},moveByParagraph:function(y,E,C){var F=C.forward?1:-1;return zs(y,E,C.repeat,F)},moveBySentence:function(y,E,C){var F=C.forward?1:-1;return Qi(y,E,C.repeat,F)},moveByScroll:function(y,E,C,F){var B=y.getScrollInfo(),z=null,V=C.repeat;V||(V=B.clientHeight/(2*y.defaultTextHeight()));var Y=y.charCoords(E,"local");if(C.repeat=V,z=ri.moveByDisplayLines(y,E,C,F),!z)return null;var Q=y.charCoords(z,"local");return y.scrollTo(null,B.top+Q.top-Y.top),z},moveByWords:function(y,E,C){return vr(y,E,C.repeat,!!C.forward,!!C.wordEnd,!!C.bigWord)},moveTillCharacter:function(y,E,C){var F=C.repeat,B=ts(y,F,C.forward,C.selectedCharacter,E),z=C.forward?-1:1;return Yi(z,C),B?(B.ch+=z,B):null},moveToCharacter:function(y,E,C){var F=C.repeat;return Yi(0,C),ts(y,F,C.forward,C.selectedCharacter,E)||E},moveToSymbol:function(y,E,C){var F=C.repeat;return Xi(y,F,C.forward,C.selectedCharacter)||E},moveToColumn:function(y,E,C,F){var B=C.repeat;return F.lastHPos=B-1,F.lastHSPos=y.charCoords(E,"div").left,Ml(y,B)},moveToEol:function(y,E,C,F){return Eo(y,E,C,F,!1)},moveToFirstNonWhiteSpaceCharacter:function(y,E){var C=E;return new De(C.line,nn(y.getLine(C.line)))},moveToMatchedSymbol:function(y,E){for(var C=E,F=C.line,B=C.ch,z=y.getLine(F),V;B<z.length;B++)if(V=z.charAt(B),V&&h(V)){var Y=y.getTokenTypeAt(new De(F,B+1));if(Y!=="string"&&Y!=="comment")break}if(B<z.length){var Q=/[<>]/.test(z[B])?/[(){}[\]<>]/:/[(){}[\]]/,re=y.findMatchingBracket(new De(F,B+1),{bracketRegex:Q});return re.to}return C},moveToStartOfLine:function(y,E){return new De(E.line,0)},moveToLineOrEdgeOfDocument:function(y,E,C){var F=C.forward?y.lastLine():y.firstLine();return C.repeatIsExplicit&&(F=C.repeat-y.getOption("firstLineNumber")),new De(F,nn(y.getLine(F)))},moveToStartOfDisplayLine:function(y){return y.execCommand("goLineLeft"),y.getCursor()},moveToEndOfDisplayLine:function(y){y.execCommand("goLineRight");var E=y.getCursor();return E.sticky=="before"&&E.ch--,E},textObjectManipulation:function(y,E,C,F){var B={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},V=C.selectedCharacter;V=="b"?V="(":V=="B"&&(V="{");var Y=!C.textObjectInner,Q,re;if(B[V]){if(re=!0,Q=zn(y,E,V,Y),!Q){var le=y.getSearchCursor(new RegExp("\\"+V,"g"),E);le.find()&&(Q=zn(y,le.from(),V,Y))}}else if(z[V])re=!0,Q=Er(y,E,V,Y);else if(V==="W"||V==="w")for(var ye=C.repeat||1;ye-- >0;){var ke=or(y,{inclusive:Y,innerWord:!Y,bigWord:V==="W",noSymbol:V==="W",multiline:!0},Q&&Q.end);ke&&(Q||(Q=ke),Q.end=ke.end)}else if(V==="p")if(Q=zs(y,E,C.repeat,0,Y),C.linewise=!0,F.visualMode)F.visualLine||(F.visualLine=!0);else{var me=F.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(V==="t")Q=$o(y,E,Y);else if(V==="s"){var be=y.getLine(E.line);E.ch>0&&w(be[E.ch])&&(E.ch-=1);var Ne=Oa(y,E,C.repeat,1,Y),Ie=Oa(y,E,C.repeat,-1,Y);m(y.getLine(Ie.line)[Ie.ch])&&m(y.getLine(Ne.line)[Ne.ch-1])&&(Ie={line:Ie.line,ch:Ie.ch+1}),Q={start:Ie,end:Ne}}return Q?y.state.vim.visualMode?gn(y,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(y,E,C){var F=We.lastCharacterSearch,B=C.repeat,z=C.forward===F.forward,V=(F.increment?1:0)*(z?-1:1);y.moveH(-V,"char"),C.inclusive=!!z;var Y=ts(y,B,z,F.selectedCharacter);return Y?(Y.ch+=V,Y):(y.moveH(V,"char"),E)}},ds={change:function(y,E,C){var F,B,z=y.state.vim,V=C[0].anchor,Y=C[0].head;if(z.visualMode)if(E.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,y.setSelection(V,Y),B=y.getSelection(),y.replaceSelection(""),F=V;else{B=y.getSelection();var Q=ae("",C.length);y.replaceSelections(Q),F=gt(C[0].head,C[0].anchor)}else{B=y.getRange(V,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!m(B)){var le=/\s+$/.exec(B);le&&re.motionArgs&&re.motionArgs.forward&&(Y=ge(Y,0,-le[0].length),B=B.slice(0,-le[0].length))}E.linewise&&(V=new De(V.line,nn(y.getLine(V.line))),Y.line>V.line&&(Y=new De(Y.line-1,Number.MAX_VALUE))),y.replaceRange("",V,Y),F=V}We.registerController.pushText(E.registerName,"change",B,E.linewise,C.length>1),On.enterInsertMode(y,{head:F},y.state.vim)},delete:function(y,E,C){var F,B,z=y.state.vim;if(z.visualBlock){B=y.getSelection();var V=ae("",C.length);y.replaceSelections(V),F=gt(C[0].head,C[0].anchor)}else{var Y=C[0].anchor,Q=C[0].head;E.linewise&&Q.line!=y.firstLine()&&Y.line==y.lastLine()&&Y.line==Q.line-1&&(Y.line==y.firstLine()?Y.ch=0:Y=new De(Y.line-1,Zt(y,Y.line-1))),B=y.getRange(Y,Q),y.replaceRange("",Y,Q),F=Y,E.linewise&&(F=ri.moveToFirstNonWhiteSpaceCharacter(y,Y))}return We.registerController.pushText(E.registerName,"delete",B,E.linewise,z.visualBlock),ce(y,F)},indent:function(y,E,C){var F=y.state.vim,B=F.visualMode?E.repeat:1;if(F.visualBlock){for(var z=y.getOption("tabSize"),V=y.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=C.length-1;Q>=0;Q--)if(Y=gt(C[Q].anchor,C[Q].head),E.indentRight)y.replaceRange(V.repeat(B),Y,Y);else{for(var re=y.getLine(Y.line),le=0,ye=0;ye<B;ye++){var ke=re[Y.ch+le];if(ke==" ")le++;else{if(ke!=" ")break;le++;for(var me=1;me<V.length&&(ke=re[Y.ch+le],ke===" ");me++)le++}}y.replaceRange("",Y,ge(Y,0,le))}return Y}if(y.indentMore)for(var ye=0;ye<B;ye++)E.indentRight?y.indentMore():y.indentLess();else{var be=C[0].anchor.line,Ne=F.visualBlock?C[C.length-1].anchor.line:C[0].head.line;E.linewise&&Ne--;for(var Q=be;Q<=Ne;Q++)for(var ye=0;ye<B;ye++)y.indentLine(Q,E.indentRight)}return ri.moveToFirstNonWhiteSpaceCharacter(y,C[0].anchor)},indentAuto:function(y,E,C){return y.execCommand("indentAuto"),ri.moveToFirstNonWhiteSpaceCharacter(y,C[0].anchor)},hardWrap:function(y,E,C,F,B){if(y.hardWrap){var z=C[0].anchor.line,V=C[0].head.line;E.linewise&&V--;var Y=y.hardWrap({from:z,to:V});return Y>z&&E.linewise&&Y--,E.keepCursor?F:new De(Y,0)}},changeCase:function(y,E,C,F,B){for(var z=y.getSelections(),V=[],Y=E.toLower,Q=0;Q<z.length;Q++){var re=z[Q],le="";if(Y===!0)le=re.toLowerCase();else if(Y===!1)le=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var ke=re.charAt(ye);le+=a(ke)?ke.toLowerCase():ke.toUpperCase()}V.push(le)}return y.replaceSelections(V),E.shouldMoveCursor?B:!y.state.vim.visualMode&&E.linewise&&C[0].anchor.line+1==C[0].head.line?ri.moveToFirstNonWhiteSpaceCharacter(y,F):E.linewise?F:gt(C[0].anchor,C[0].head)},yank:function(y,E,C,F){var B=y.state.vim,z=y.getSelection(),V=B.visualMode?gt(B.sel.anchor,B.sel.head,C[0].head,C[0].anchor):F;return We.registerController.pushText(E.registerName,"yank",z,E.linewise,B.visualBlock),V}},On={jumpListWalk:function(y,E,C){if(!C.visualMode){var F=E.repeat,B=E.forward,z=We.jumpList,V=z.move(y,B?F:-F),Y=V?V.find():void 0;Y=Y||y.getCursor(),y.setCursor(Y),y.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(y,E,C){if(!C.visualMode){var F=E.repeat||1,B=y.defaultTextHeight(),z=y.getScrollInfo().top,V=B*F,Y=E.forward?z+V:z-V,Q=Ke(y.getCursor()),re=y.charCoords(Q,"local");if(E.forward)Y>re.top?(Q.line+=(Y-re.top)/B,Q.line=Math.ceil(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.top)):y.scrollTo(null,Y);else{var le=Y+y.getScrollInfo().clientHeight;le<re.bottom?(Q.line-=(re.bottom-le)/B,Q.line=Math.floor(Q.line),y.setCursor(Q),re=y.charCoords(Q,"local"),y.scrollTo(null,re.bottom-y.getScrollInfo().clientHeight)):y.scrollTo(null,Y)}}},scrollToCursor:function(y,E){var C=y.getCursor().line,F=y.charCoords(new De(C,0),"local"),B=y.getScrollInfo().clientHeight,z=F.top;switch(E.position){case"center":z=F.bottom-B/2;break;case"bottom":var V=new De(C,y.getLine(C).length-1),Y=y.charCoords(V,"local"),Q=Y.bottom-z;z=z-B+Q}y.scrollTo(null,z)},replayMacro:function(y,E,C){var F=E.selectedCharacter,B=E.repeat,z=We.macroModeState;for(F=="@"?F=z.latestRegister:z.latestRegister=F;B--;)Vs(y,C,z,F)},enterMacroRecordMode:function(y,E){var C=We.macroModeState,F=E.selectedCharacter;We.registerController.isValidRegister(F)&&C.enterMacroRecordMode(y,F)},toggleOverwrite:function(y){y.state.overwrite?(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})):(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(y,E,C){if(!y.getOption("readOnly")){C.insertMode=!0,C.insertModeRepeat=E&&E.repeat||1;var F=E?E.insertAt:null,B=C.sel,z=E.head||y.getCursor("head"),V=y.listSelections().length;if(F=="eol")z=new De(z.line,Zt(y,z.line));else if(F=="bol")z=new De(z.line,0);else if(F=="charAfter"){var Y=b(y,z,ge(z,0,1));z=Y.end}else if(F=="firstNonBlank"){var Y=b(y,z,ri.moveToFirstNonWhiteSpaceCharacter(y,z));z=Y.end}else if(F=="startOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(z=new De(Math.min(B.head.line,B.anchor.line),Math.min(B.head.ch,B.anchor.ch)),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line<B.anchor.line?z=B.head:z=new De(B.anchor.line,0)}else if(F=="endOfSelectedArea"){if(!C.visualMode)return;C.visualBlock?(z=new De(Math.min(B.head.line,B.anchor.line),Math.max(B.head.ch,B.anchor.ch)+1),V=Math.abs(B.head.line-B.anchor.line)+1):B.head.line>=B.anchor.line?z=ge(B.head,0,1):z=new De(B.anchor.line,0)}else if(F=="inplace"){if(C.visualMode)return}else F=="lastEdit"&&(z=To(y)||z);y.setOption("disableInput",!1),E&&E.replace?(y.toggleOverwrite(!0),y.setOption("keyMap","vim-replace"),Be.signal(y,"vim-mode-change",{mode:"replace"})):(y.toggleOverwrite(!1),y.setOption("keyMap","vim-insert"),Be.signal(y,"vim-mode-change",{mode:"insert"})),We.macroModeState.isPlaying||(y.on("change",Mo),C.insertEnd&&C.insertEnd.clear(),C.insertEnd=y.setBookmark(z,{insertLeft:!0}),Be.on(y.getInputField(),"keydown",Gs)),C.visualMode&&Cn(y),Pr(y,z,V)}},toggleVisualMode:function(y,E,C){var F=E.repeat,B=y.getCursor(),z;if(C.visualMode)C.visualLine^E.linewise||C.visualBlock^E.blockwise?(C.visualLine=!!E.linewise,C.visualBlock=!!E.blockwise,Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(y)):Cn(y);else{C.visualMode=!0,C.visualLine=!!E.linewise,C.visualBlock=!!E.blockwise,z=ce(y,new De(B.line,B.ch+F-1));var V=b(y,B,z);C.sel={anchor:V.start,head:V.end},Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""}),Qn(y),di(y,C,"<",gt(B,z)),di(y,C,">",tn(B,z))}},reselectLastSelection:function(y,E,C){var F=C.lastSelection;if(C.visualMode&&qt(y,C),F){var B=F.anchorMark.find(),z=F.headMark.find();if(!B||!z)return;C.sel={anchor:B,head:z},C.visualMode=!0,C.visualLine=F.visualLine,C.visualBlock=F.visualBlock,Qn(y),di(y,C,"<",gt(B,z)),di(y,C,">",tn(B,z)),Be.signal(y,"vim-mode-change",{mode:"visual",subMode:C.visualLine?"linewise":C.visualBlock?"blockwise":""})}},joinLines:function(y,E,C){var F,B;if(C.visualMode){if(F=y.getCursor("anchor"),B=y.getCursor("head"),ot(B,F)){var z=B;B=F,F=z}B.ch=Zt(y,B.line)-1}else{var V=Math.max(E.repeat,2);F=y.getCursor(),B=ce(y,new De(F.line+V-1,1/0))}for(var Y=0,Q=F.line;Q<B.line;Q++){Y=Zt(y,F.line);var re="",le=0;if(!E.keepSpaces){var ye=y.getLine(F.line+1);le=ye.search(/\S/),le==-1?le=ye.length:re=" "}y.replaceRange(re,new De(F.line,Y),new De(F.line+1,le))}var ke=ce(y,new De(F.line,Y));C.visualMode&&Cn(y,!1),y.setCursor(ke)},newLineAndEnterInsertMode:function(y,E,C){C.insertMode=!0;var F=Ke(y.getCursor());if(F.line===y.firstLine()&&!E.after)y.replaceRange(`
1451
1451
  `,new De(y.firstLine(),0)),y.setCursor(y.firstLine(),0);else{F.line=E.after?F.line:F.line-1,F.ch=Zt(y,F.line),y.setCursor(F);var B=Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent;B(y)}this.enterInsertMode(y,{repeat:E.repeat},C)},paste:function(y,E,C){var F=this,B=We.registerController.getRegister(E.registerName),z=function(){var V=B.toString();F.continuePaste(y,E,C,V,B)};E.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(V){F.continuePaste(y,E,C,V,B)},function(){z()}):z()},continuePaste:function(y,E,C,F,B){var z=Ke(y.getCursor());if(F){if(E.matchIndent){var V=y.getOption("tabSize"),Y=function(bn){var q=bn.split(" ").length-1,X=bn.split(" ").length-1;return q*V+X*1},Q=y.getLine(y.getCursor().line),re=Y(Q.match(/^\s*/)[0]),le=F.replace(/\n$/,""),ye=F!==le,ke=Y(F.match(/^\s*/)[0]),F=le.replace(/^\s*/gm,function(bn){var q=re+(Y(bn)-ke);if(q<0)return"";if(y.getOption("indentWithTabs")){var X=Math.floor(q/V);return Array(X+1).join(" ")}return Array(q+1).join(" ")});F+=ye?`
1452
1452
  `:""}if(E.repeat>1)var F=Array(E.repeat+1).join(F);var me=B.linewise,be=B.blockwise;if(be){F=F.split(`
1453
1453
  `),me&&F.pop();for(var Ne=0;Ne<F.length;Ne++)F[Ne]=F[Ne]==""?" ":F[Ne];z.ch+=E.after?1:0,z.ch=Math.min(Zt(y,z.line),z.ch)}else me?C.visualMode?F=C.visualLine?F.slice(0,-1):`
1454
1454
  `+F.slice(0,F.length-1)+`
1455
1455
  `:E.after?(F=`
1456
- `+F.slice(0,F.length-1),z.ch=Zt(y,z.line)):z.ch=0:z.ch+=E.after?1:0;var Ie;if(C.visualMode){C.lastPastedText=F;var He,st=qe(y,C),Ye=st[0],tt=st[1],fn=y.getSelection(),lt=y.listSelections(),yn=new Array(lt.length).join("1").split("1");C.lastSelection&&(He=C.lastSelection.headMark.find()),We.registerController.unnamedRegister.setText(fn),be?(y.replaceSelections(yn),tt=new De(Ye.line+F.length-1,Ye.ch),y.setCursor(Ye),ur(y,tt),y.replaceSelections(F),Ie=Ye):C.visualBlock?(y.replaceSelections(yn),y.setCursor(Ye),y.replaceRange(F,Ye,Ye),Ie=Ye):(y.replaceRange(F,Ye,tt),Ie=y.posFromIndex(y.indexFromPos(Ye)+F.length-1)),He&&(C.lastSelection.headMark=y.setBookmark(He)),me&&(Ie.ch=0)}else if(be){y.setCursor(z);for(var Ne=0;Ne<F.length;Ne++){var bt=z.line+Ne;bt>y.lastLine()&&y.replaceRange(`
1456
+ `+F.slice(0,F.length-1),z.ch=Zt(y,z.line)):z.ch=0:z.ch+=E.after?1:0;var Ie;if(C.visualMode){C.lastPastedText=F;var He,at=qe(y,C),Ye=at[0],tt=at[1],fn=y.getSelection(),lt=y.listSelections(),yn=new Array(lt.length).join("1").split("1");C.lastSelection&&(He=C.lastSelection.headMark.find()),We.registerController.unnamedRegister.setText(fn),be?(y.replaceSelections(yn),tt=new De(Ye.line+F.length-1,Ye.ch),y.setCursor(Ye),ur(y,tt),y.replaceSelections(F),Ie=Ye):C.visualBlock?(y.replaceSelections(yn),y.setCursor(Ye),y.replaceRange(F,Ye,Ye),Ie=Ye):(y.replaceRange(F,Ye,tt),Ie=y.posFromIndex(y.indexFromPos(Ye)+F.length-1)),He&&(C.lastSelection.headMark=y.setBookmark(He)),me&&(Ie.ch=0)}else if(be){y.setCursor(z);for(var Ne=0;Ne<F.length;Ne++){var bt=z.line+Ne;bt>y.lastLine()&&y.replaceRange(`
1457
1457
  `,new De(bt,0));var $t=Zt(y,bt);$t<z.ch&&Xn(y,bt,z.ch)}y.setCursor(z),ur(y,new De(z.line+F.length-1,z.ch)),y.replaceSelections(F),Ie=z}else if(y.replaceRange(F,z),me){var bt=E.after?z.line+1:z.line;Ie=new De(bt,nn(y.getLine(bt)))}else Ie=Ke(z),/\n/.test(F)||(Ie.ch+=F.length-(E.after?1:0));C.visualMode&&Cn(y,!1),y.setCursor(Ie)}},undo:function(y,E){y.operation(function(){Xe(y,Be.commands.undo,E.repeat)(),y.setCursor(ce(y,y.getCursor("start")))})},redo:function(y,E){Xe(y,Be.commands.redo,E.repeat)()},setRegister:function(y,E,C){C.inputState.registerName=E.selectedCharacter},insertRegister:function(y,E,C){var F=E.selectedCharacter,B=We.registerController.getRegister(F),z=B&&B.toString();z&&y.replaceSelection(z)},oneNormalCommand:function(y,E,C){ni(y,!0),C.insertModeReturn=!0,Be.on(y,"vim-command-done",function F(){C.visualMode||(C.insertModeReturn&&(C.insertModeReturn=!1,C.insertMode||On.enterInsertMode(y,{},C)),Be.off(y,"vim-command-done",F))})},setMark:function(y,E,C){var F=E.selectedCharacter;di(y,C,F,y.getCursor())},replace:function(y,E,C){var F=E.selectedCharacter,B=y.getCursor(),z,V,Y=y.listSelections();if(C.visualMode)B=y.getCursor("start"),V=y.getCursor("end");else{var Q=y.getLine(B.line);z=B.ch+E.repeat,z>Q.length&&(z=Q.length),V=new De(B.line,z)}var re=b(y,B,V);if(B=re.start,V=re.end,F==`
1458
1458
  `)C.visualMode||y.replaceRange("",B,V),(Be.commands.newlineAndIndentContinueComment||Be.commands.newlineAndIndent)(y);else{var le=y.getRange(B,V);if(le=le.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),le=le.replace(/[^\n]/g,F),C.visualBlock){var ye=new Array(y.getOption("tabSize")+1).join(" ");le=y.getSelection(),le=le.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,F),le=le.replace(/\t/g,ye).replace(/[^\n]/g,F).split(`
1459
- `),y.replaceSelections(le)}else y.replaceRange(le,B,V);C.visualMode?(B=rt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(B),Cn(y,!1)):y.setCursor(ge(V,0,-1))}},incrementNumberToken:function(y,E){for(var C=y.getCursor(),F=y.getLine(C.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,V,Y,Q;(z=B.exec(F))!==null&&(V=z.index,Y=V+z[0].length,!(C.ch<Y)););if(!(!E.backtrack&&Y<=C.ch)&&z){var re=z[2]||z[4],le=z[3]||z[5],ye=E.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(z[1]+le,ke)+ye*E.repeat;Q=me.toString(ke);var be=re?new Array(le.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Ne=new De(C.line,V),Ie=new De(C.line,Y);y.replaceRange(Q,Ne,Ie),y.setCursor(new De(C.line,V+Q.length-1))}},repeatLastEdit:function(y,E,C){var F=C.lastEditInputState;if(F){var B=E.repeat;B&&E.repeatIsExplicit?C.lastEditInputState.repeatOverride=B:B=C.lastEditInputState.repeatOverride||B,Da(y,C,B,!1)}},indent:function(y,E){y.indentLine(y.getCursor().line,E.indentRight)},exitInsertMode:ni},gi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},mi={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var E=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,E}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var E=y.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(E==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(E==="else"&&y.depth===0)return!0}return!1}}};T("pcre",!0,"boolean"),Zi.prototype={getQuery:function(){return We.query},setQuery:function(y){We.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return We.isReversed},setReversed:function(y){We.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Li={"\\n":`
1459
+ `),y.replaceSelections(le)}else y.replaceRange(le,B,V);C.visualMode?(B=ot(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,y.setCursor(B),Cn(y,!1)):y.setCursor(ge(V,0,-1))}},incrementNumberToken:function(y,E){for(var C=y.getCursor(),F=y.getLine(C.line),B=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,V,Y,Q;(z=B.exec(F))!==null&&(V=z.index,Y=V+z[0].length,!(C.ch<Y)););if(!(!E.backtrack&&Y<=C.ch)&&z){var re=z[2]||z[4],le=z[3]||z[5],ye=E.increase?1:-1,ke={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(z[1]+le,ke)+ye*E.repeat;Q=me.toString(ke);var be=re?new Array(le.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+be+Q.substr(1):Q=re+be+Q;var Ne=new De(C.line,V),Ie=new De(C.line,Y);y.replaceRange(Q,Ne,Ie),y.setCursor(new De(C.line,V+Q.length-1))}},repeatLastEdit:function(y,E,C){var F=C.lastEditInputState;if(F){var B=E.repeat;B&&E.repeatIsExplicit?C.lastEditInputState.repeatOverride=B:B=C.lastEditInputState.repeatOverride||B,Da(y,C,B,!1)}},indent:function(y,E){y.indentLine(y.getCursor().line,E.indentRight)},exitInsertMode:ni},gi={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},mi={bracket:{isComplete:function(y){if(y.nextCh===y.symb){if(y.depth++,y.depth>=1)return!0}else y.nextCh===y.reverseSymb&&y.depth--;return!1}},section:{init:function(y){y.curMoveThrough=!0,y.symb=(y.forward?"]":"[")===y.symb?"{":"}"},isComplete:function(y){return y.index===0&&y.nextCh===y.symb}},comment:{isComplete:function(y){var E=y.lastCh==="*"&&y.nextCh==="/";return y.lastCh=y.nextCh,E}},method:{init:function(y){y.symb=y.symb==="m"?"{":"}",y.reverseSymb=y.symb==="{"?"}":"{"},isComplete:function(y){return y.nextCh===y.symb}},preprocess:{init:function(y){y.index=0},isComplete:function(y){if(y.nextCh==="#"){var E=y.lineText.match(/^#(\w+)/)[1];if(E==="endif"){if(y.forward&&y.depth===0)return!0;y.depth++}else if(E==="if"){if(!y.forward&&y.depth===0)return!0;y.depth--}if(E==="else"&&y.depth===0)return!0}return!1}}};T("pcre",!0,"boolean"),Zi.prototype={getQuery:function(){return We.query},setQuery:function(y){We.query=y},getOverlay:function(){return this.searchOverlay},setOverlay:function(y){this.searchOverlay=y},isReversed:function(){return We.isReversed},setReversed:function(y){We.isReversed=y},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(y){this.annotate=y}};var Oi={"\\n":`
1460
1460
  `,"\\r":"\r","\\t":" "},dr={"\\/":"/","\\\\":"\\","\\n":`
1461
1461
  `,"\\r":"\r","\\t":" ","\\&":"&"},fr=0,yr=function(){this.buildCommandMap_()};yr.prototype={processCommand:function(y,E,C){var F=this;y.operation(function(){y.curOp.isVimOp=!0,F._processCommand(y,E,C)})},_processCommand:function(y,E,C){var F=y.state.vim,B=We.registerController.getRegister(":"),z=B.toString(),V=new Be.StringStream(E);B.setText(E);var Y=C||{};Y.input=E;try{this.parseInput_(y,V,Y)}catch(le){throw Pt(y,le.toString()),le}F.visualMode&&Cn(y);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(z),this.parseCommandArgs_(V,Y,Q),Q.type=="exToKey"){O(y,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(y,Q.toInput);return}}if(!re){Pt(y,'Not an editor command ":'+E+'"');return}try{Xs[re](y,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(le){throw Pt(y,le.toString()),le}},parseInput_:function(y,E,C){if(E.eatWhile(":"),E.eat("%")?(C.line=y.firstLine(),C.lineEnd=y.lastLine()):(C.line=this.parseLineSpec_(y,E),C.line!==void 0&&E.eat(",")&&(C.lineEnd=this.parseLineSpec_(y,E))),C.line==null)if(y.state.vim.visualMode){var F=ti(y,y.state.vim,"<");C.selectionLine=F&&F.line,F=ti(y,y.state.vim,">"),C.selectionLineEnd=F&&F.line}else C.selectionLine=y.getCursor().line;else C.selectionLine=C.line,C.selectionLineEnd=C.lineEnd;var B=E.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return B?C.commandName=B[1]:C.commandName=E.match(/.*/)[0],C},parseLineSpec_:function(y,E){var C=E.match(/^(\d+)/);if(C)return parseInt(C[1],10)-1;switch(E.next()){case".":return this.parseLineSpecOffset_(E,y.getCursor().line);case"$":return this.parseLineSpecOffset_(E,y.lastLine());case"'":var F=E.next(),B=ti(y,y.state.vim,F);if(!B)throw new Error("Mark not set");return this.parseLineSpecOffset_(E,B.line);case"-":case"+":return E.backUp(1),this.parseLineSpecOffset_(E,y.getCursor().line);default:return E.backUp(1),void 0}},parseLineSpecOffset_:function(y,E){var C=y.match(/^([+-])?(\d+)/);if(C){var F=parseInt(C[2],10);C[1]=="-"?E-=F:E+=F}return E},parseCommandArgs_:function(y,E,C){if(!y.eol()){E.argString=y.match(/.*/)[0];var F=C.argDelimiter||/\s+/,B=hi(E.argString).split(F);B.length&&B[0]&&(E.args=B)}},matchCommand_:function(y){for(var E=y.length;E>0;E--){var C=y.substring(0,E);if(this.commandMap_[C]){var F=this.commandMap_[C];if(F.name.indexOf(y)===0)return F}}return null},buildCommandMap_:function(){this.commandMap_={};for(var y=0;y<pi.length;y++){var E=pi[y],C=E.shortName||E.name;this.commandMap_[C]=E}},map:function(y,E,C,F){if(y!=":"&&y.charAt(0)==":"){if(C)throw Error("Mode not supported for ex mappings");var B=y.substring(1);E!=":"&&E.charAt(0)==":"?this.commandMap_[B]={name:B,type:"exToEx",toInput:E.substring(1),user:!0}:this.commandMap_[B]={name:B,type:"exToKey",toKeys:E,user:!0}}else{var z={keys:y,type:"keyToKey",toKeys:E,noremap:!!F};C&&(z.context=C),An.unshift(z)}},unmap:function(y,E){if(y!=":"&&y.charAt(0)==":"){if(E)throw Error("Mode not supported for ex mappings");var C=y.substring(1);if(this.commandMap_[C]&&this.commandMap_[C].user)return delete this.commandMap_[C],!0}else for(var F=y,B=0;B<An.length;B++)if(F==An[B].keys&&An[B].context===E)return An.splice(B,1),!0}};var Xs={colorscheme:function(y,E){if(!E.args||E.args.length<1){Pt(y,y.getOption("theme"));return}y.setOption("theme",E.args[0])},map:function(y,E,C,F){var B=E.args;if(!B||B.length<2){y&&Pt(y,"Invalid mapping: "+E.input);return}br.map(B[0],B[1],C,F)},imap:function(y,E){this.map(y,E,"insert")},nmap:function(y,E){this.map(y,E,"normal")},vmap:function(y,E){this.map(y,E,"visual")},omap:function(y,E){this.map(y,E,"operatorPending")},noremap:function(y,E){this.map(y,E,void 0,!0)},inoremap:function(y,E){this.map(y,E,"insert",!0)},nnoremap:function(y,E){this.map(y,E,"normal",!0)},vnoremap:function(y,E){this.map(y,E,"visual",!0)},onoremap:function(y,E){this.map(y,E,"operatorPending",!0)},unmap:function(y,E,C){var F=E.args;(!F||F.length<1||!br.unmap(F[0],C))&&y&&Pt(y,"No such mapping: "+E.input)},mapclear:function(y,E){mt.mapclear()},imapclear:function(y,E){mt.mapclear("insert")},nmapclear:function(y,E){mt.mapclear("normal")},vmapclear:function(y,E){mt.mapclear("visual")},omapclear:function(y,E){mt.mapclear("operatorPending")},move:function(y,E){Ln.processCommand(y,y.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:E.line+1})},set:function(y,E){var C=E.args,F=E.setCfg||{};if(!C||C.length<1){y&&Pt(y,"Invalid mapping: "+E.input);return}var B=C[0].split("="),z=B[0],V=B[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(V)throw Error("Trailing characters: "+E.argString);z=z.substring(0,z.length-1),Y=!0}else z.charAt(z.length-1)=="!"&&(z=z.substring(0,z.length-1),Q=!0);V===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),V=!1);var re=Bt[z]&&Bt[z].type=="boolean";if(re&&(Q?V=!S(z,y,F):V==null&&(V=!0)),!re&&V===void 0||Y){var le=S(z,y,F);le instanceof Error?Pt(y,le.message):le===!0||le===!1?Pt(y," "+(le?"":"no")+z):Pt(y," "+z+"="+le)}else{var ye=$(z,V,y,F);ye instanceof Error&&Pt(y,ye.message)}},setlocal:function(y,E){E.setCfg={scope:"local"},this.set(y,E)},setglobal:function(y,E){E.setCfg={scope:"global"},this.set(y,E)},registers:function(y,E){var C=E.args,F=We.registerController.registers,B=`----------Registers----------
1462
1462
 
1463
1463
  `;if(C){var z;C=C.join("");for(var V=0;V<C.length;V++)if(z=C.charAt(V),!!We.registerController.isValidRegister(z)){var Y=F[z]||new j;B+='"'+z+" "+Y.toString()+`
1464
1464
  `}}else for(var z in F){var Q=F[z].toString();Q.length&&(B+='"'+z+" "+Q+`
1465
1465
  `)}Pt(y,B)},sort:function(y,E){function C(){if(E.argString){var bt=new Be.StringStream(E.argString);if(bt.eat("!")&&(z=!0),bt.eol())return;if(!bt.eatSpace())return"Invalid arguments";var $t=bt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!$t&&!bt.eol())return"Invalid arguments";if($t[1]){V=$t[1].indexOf("i")!=-1,Y=$t[1].indexOf("u")!=-1;var Jn=$t[1].indexOf("d")!=-1||$t[1].indexOf("n")!=-1&&1,pr=$t[1].indexOf("x")!=-1&&1,bn=$t[1].indexOf("o")!=-1&&1;if(Jn+pr+bn>1)return"Invalid arguments";Q=Jn&&"decimal"||pr&&"hex"||bn&&"octal"}$t[2]&&(re=new RegExp($t[2].substr(1,$t[2].length-2),V?"i":""))}}function F(bt,$t){if(z){var Jn;Jn=bt,bt=$t,$t=Jn}V&&(bt=bt.toLowerCase(),$t=$t.toLowerCase());var pr=Q&&Ie.exec(bt),bn=Q&&Ie.exec($t);return pr?(pr=parseInt((pr[1]+pr[2]).toLowerCase(),He),bn=parseInt((bn[1]+bn[2]).toLowerCase(),He),pr-bn):bt<$t?-1:1}function B(bt,$t){if(z){var Jn;Jn=bt,bt=$t,$t=Jn}return V&&(bt[0]=bt[0].toLowerCase(),$t[0]=$t[0].toLowerCase()),bt[0]<$t[0]?-1:1}var z,V,Y,Q,re,le=C();if(le){Pt(y,le+": "+E.argString);return}var ye=E.line||y.firstLine(),ke=E.lineEnd||E.line||y.lastLine();if(ye!=ke){var me=new De(ye,0),be=new De(ke,Zt(y,ke)),Ne=y.getRange(me,be).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 tt=0;tt<Ne.length;tt++){var fn=re?Ne[tt].match(re):null;fn&&fn[0]!=""?st.push(fn):!re&&Ie.exec(Ne[tt])?st.push(Ne[tt]):Ye.push(Ne[tt])}else Ye=Ne;if(st.sort(re?B:F),re)for(var tt=0;tt<st.length;tt++)st[tt]=st[tt].input;else Q||Ye.sort(F);if(Ne=z?st.concat(Ye):Ye.concat(st),Y){var lt=Ne,yn;Ne=[];for(var tt=0;tt<lt.length;tt++)lt[tt]!=yn&&Ne.push(lt[tt]),yn=lt[tt]}y.replaceRange(Ne.join(`
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,at=[],Ye=[];if(Q||re)for(var tt=0;tt<Ne.length;tt++){var fn=re?Ne[tt].match(re):null;fn&&fn[0]!=""?at.push(fn):!re&&Ie.exec(Ne[tt])?at.push(Ne[tt]):Ye.push(Ne[tt])}else Ye=Ne;if(at.sort(re?B:F),re)for(var tt=0;tt<at.length;tt++)at[tt]=at[tt].input;else Q||Ye.sort(F);if(Ne=z?at.concat(Ye):Ye.concat(at),Y){var lt=Ne,yn;Ne=[];for(var tt=0;tt<lt.length;tt++)lt[tt]!=yn&&Ne.push(lt[tt]),yn=lt[tt]}y.replaceRange(Ne.join(`
1467
1467
  `),me,be)}},vglobal:function(y,E){this.global(y,E)},normal:function(y,E){var C=E.argString;if(C&&C[0]=="!"&&(C=C.slice(1),sn=!0),C=C.trimStart(),!C){Pt(y,"Argument is required.");return}var F=E.line;if(typeof F=="number")for(var B=isNaN(E.lineEnd)?F:E.lineEnd,z=F;z<=B;z++)y.setCursor(z,0),O(y,E.argString.trimStart()),y.state.vim.insertMode&&ni(y,!0);else O(y,E.argString.trimStart()),y.state.vim.insertMode&&ni(y,!0)},global:function(y,E){var C=E.argString;if(!C){Pt(y,"Regular Expression missing from global");return}var F=E.commandName[0]==="v";C[0]==="!"&&E.commandName[0]==="g"&&(F=!0,C=C.slice(1));var B=E.line!==void 0?E.line:y.firstLine(),z=E.lineEnd||E.line||y.lastLine(),V=Tr(C),Y=C,Q;if(V.length&&(Y=V[0],Q=V.slice(1,V.length).join("/")),Y)try{hn(y,Y,!0,!0)}catch{Pt(y,"Invalid regex: "+Y);return}for(var re=$n(y).getQuery(),le=[],ye=B;ye<=z;ye++){var ke=y.getLine(ye),me=re.test(ke);me!==F&&le.push(Q?y.getLineHandle(ye):ke)}if(!Q){Pt(y,le.join(`
1468
- `));return}var be=0,Ne=function(){if(be<le.length){var Ie=le[be++],He=y.getLineNumber(Ie);if(He==null){Ne();return}var st=He+1+Q;br.processCommand(y,st,{callback:Ne})}else y.releaseLineHandles&&y.releaseLineHandles()};Ne()},substitute:function(y,E){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=E.argString,F=C?Ji(C,C[0]):[],B,z="",V,Y,Q,re=!1,le=!1;if(F.length)B=F[0],S("pcre")&&B!==""&&(B=new RegExp(B).source),z=F[1],z!==void 0&&(S("pcre")?z=Ol(z.replace(/([^\\])&/g,"$1$$&")):z=Ll(z),We.lastSubstituteReplacePart=z),V=F[2]?F[2].split(" "):[];else if(C&&C.length){Pt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(V&&(Y=V[0],Q=parseInt(V[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(le=!0),S("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{hn(y,B,!0,!0)}catch{Pt(y,"Invalid regex: "+B);return}if(z=z||We.lastSubstituteReplacePart,z===void 0){Pt(y,"No previous substitute regular expression");return}var ye=$n(y),ke=ye.getQuery(),me=E.line!==void 0?E.line:y.getCursor().line,be=E.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Ne=ce(y,new De(me,0)),Ie=y.getSearchCursor(ke,Ne);rs(y,re,le,me,be,Ie,ke,z,E.callback)},startinsert:function(y,E){O(y,E.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(y){Be.commands.save?Be.commands.save(y):y.save&&y.save()},nohlsearch:function(y){ns(y)},yank:function(y){var E=Ke(y.getCursor()),C=E.line,F=y.getLine(C);We.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,E){var C=E.selectionLine,F=isNaN(E.selectionLineEnd)?C:E.selectionLineEnd;ds.delete(y,{linewise:!0},[{anchor:new De(C,0),head:new De(F+1,0)}])},join:function(y,E){var C=E.selectionLine,F=isNaN(E.selectionLineEnd)?C:E.selectionLineEnd;y.setCursor(new De(C,0)),On.joinLines(y,{repeat:F-C},y.state.vim)},delmarks:function(y,E){if(!E.argString||!hi(E.argString)){Pt(y,"Argument required");return}for(var C=y.state.vim,F=new Be.StringStream(hi(E.argString));!F.eol();){F.eatSpace();var B=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Pt(y,"Invalid argument: "+E.argString.substring(B));return}var z=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Pt(y,"Invalid argument: "+E.argString.substring(B));return}var V=z,Y=F.next();if(!(f(V)&&f(Y)||a(V)&&a(Y))){Pt(y,"Invalid argument: "+V+"-");return}var Q=V.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Pt(y,"Invalid argument: "+E.argString.substring(B));return}for(var le=0;le<=re-Q;le++){var ye=String.fromCharCode(Q+le);delete C.marks[ye]}}else delete C.marks[z]}}},br=new yr;T("insertModeEscKeysTimeout",200,"number"),Be.Vim=mt;var Lr={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"},vi=mt.handleKey.bind(mt);mt.handleKey=function(y,E,C){return y.operation(function(){return vi(y,E,C)},!0)},N(),r.CodeMirror=Be;var yi=mt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,E,C,F,B){var z=this.state.vim||{},V=C.characterWidth,Y=C.lineHeight,Q=E.top,re=E.left;if(!z.insertMode){var le=F.cursor?ar.comparePoints(F.cursor,F.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!le&&re>V&&(re-=V)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),to.translate(y,re,Q),to.setStyle(y.style,"width",V+"px"),to.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var E=y.state.cm,C=yi(E);if(!C.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,E,C,F,B){var z=y.editor,V=z.state.cm,Y=yi(V);if(F!=-1){if(Y.insertMode||(E==-1?(C.charCodeAt(0)>255&&y.inputKey&&(C=y.inputKey,C&&y.inputHash==4&&(C=C.toUpperCase())),y.inputChar=C):E==4||E==0?y.inputKey==C&&y.inputHash==E&&y.inputChar?(C=y.inputChar,E=-1):(y.inputChar=null,y.inputKey=C,y.inputHash=E):y.inputChar=y.inputKey=null),V.state.overwrite&&Y.insertMode&&C=="backspace"&&E==0)return{command:"gotoleft"};if(C=="c"&&E==1&&!Oo.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():V.operation(function(){Cn(V)})}),{command:"null",passEvent:!0};if(C=="esc"&&!Y.insertMode&&!Y.visualMode&&!V.ace.inMultiSelectMode){var Q=$n(V),re=Q.getOverlay();re&&V.removeOverlay(re)}if(E==-1||E&1||E===0&&C.length>1){var le=Y.insertMode,ye=Ys(E,C,B||{},Y);Y.status==null&&(Y.status="");var ke=Ro(V,ye,"user");return Y=yi(V),ke&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),V._signal("changeStatus"),!ke&&(E!=-1||le)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function E(){var F=yi(C).insertMode;C.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var C=new Be(y);y.state.cm=C,y.$vimModeHandler=this,p(C),yi(C).status=null,C.on("vim-command-done",function(){C.virtualSelectionMode()||(yi(C).status=null,C.ace._signal("changeStatus"),C.ace.session.markUndoGroup())}),C.on("changeStatus",function(){C.ace.renderer.updateCursor(),C.ace._signal("changeStatus")}),C.on("vim-mode-change",function(){C.virtualSelectionMode()||(E(),C._signal("changeStatus"))}),E(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(C)},detach:function(y){var E=y.state.cm;g(E),E.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var E=y.state.cm,C=yi(E);if(C.insertMode)return"INSERT";var F="";return C.visualMode&&(F+="VISUAL",C.visualLine&&(F+=" LINE"),C.visualBlock&&(F+=" BLOCK")),C.status&&(F+=(F?" ":"")+C.status),F}},mt.defineOption({name:"wrap",set:function(y,E){E&&E.ace.setOption("wrap",y)},type:"boolean"},!1),mt.defineEx("write","w",function(){console.log(":write is not implemented")}),An.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"}}),An.push({keys:"gq",type:"operator",operator:"hardWrap"}),mt.defineOperator("hardWrap",function(y,E,C,F,B){var z=C[0].anchor.line,V=C[0].head.line;return E.linewise&&V--,yo(y.ace,{startRow:z,endRow:V}),De(V,0)}),T("textwidth",void 0,"number",["tw"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.ace.getOption("printMarginColumn");return C}var F=Math.round(y);F>1&&E.ace.setOption("printMarginColumn",F)}}),On.aceCommand=function(y,E,C){y.vimCmd=E,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ei):Ei(null,y.ace)},On.fold=function(y,E,C){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},No=An.length,r.handler.defaultKeymap=An,r.handler.actions=On,r.Vim=mt}),function(){ace.require(["ace/keyboard/vim"],function(t){n&&(n.exports=t)})}()}(Km)),Km.exports}A$();var Ym={},Xm;function E$(){return Xm||(Xm=1,function(n){(function(){var e={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(b){return l(u(b),arguments)}function r(b,p){return t.apply(null,[b].concat(p||[]))}function l(b,p){var g=1,o=b.length,c,f="",h,i,a,m,w,x,T,$;for(h=0;h<o;h++)if(typeof b[h]=="string")f+=b[h];else if(typeof b[h]=="object"){if(a=b[h],a.keys)for(c=p[g],i=0;i<a.keys.length;i++){if(c==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[i],a.keys[i-1]));c=c[a.keys[i]]}else a.param_no?c=p[a.param_no]:c=p[g++];if(e.not_type.test(a.type)&&e.not_primitive.test(a.type)&&c instanceof Function&&(c=c()),e.numeric_arg.test(a.type)&&typeof c!="number"&&isNaN(c))throw new TypeError(t("[sprintf] expecting number but found %T",c));switch(e.number.test(a.type)&&(T=c>=0),a.type){case"b":c=parseInt(c,10).toString(2);break;case"c":c=String.fromCharCode(parseInt(c,10));break;case"d":case"i":c=parseInt(c,10);break;case"j":c=JSON.stringify(c,null,a.width?parseInt(a.width):0);break;case"e":c=a.precision?parseFloat(c).toExponential(a.precision):parseFloat(c).toExponential();break;case"f":c=a.precision?parseFloat(c).toFixed(a.precision):parseFloat(c);break;case"g":c=a.precision?String(Number(c.toPrecision(a.precision))):parseFloat(c);break;case"o":c=(parseInt(c,10)>>>0).toString(8);break;case"s":c=String(c),c=a.precision?c.substring(0,a.precision):c;break;case"t":c=String(!!c),c=a.precision?c.substring(0,a.precision):c;break;case"T":c=Object.prototype.toString.call(c).slice(8,-1).toLowerCase(),c=a.precision?c.substring(0,a.precision):c;break;case"u":c=parseInt(c,10)>>>0;break;case"v":c=c.valueOf(),c=a.precision?c.substring(0,a.precision):c;break;case"x":c=(parseInt(c,10)>>>0).toString(16);break;case"X":c=(parseInt(c,10)>>>0).toString(16).toUpperCase();break}e.json.test(a.type)?f+=c:(e.number.test(a.type)&&(!T||a.sign)?($=T?"+":"-",c=c.toString().replace(e.sign,"")):$="",w=a.pad_char?a.pad_char==="0"?"0":a.pad_char.charAt(1):" ",x=a.width-($+c).length,m=a.width&&x>0?w.repeat(x):"",f+=a.align?$+c+m:w==="0"?$+m+c:m+$+c)}return f}var d=Object.create(null);function u(b){if(d[b])return d[b];for(var p=b,g,o=[],c=0;p;){if((g=e.text.exec(p))!==null)o.push(g[0]);else if((g=e.modulo.exec(p))!==null)o.push("%");else if((g=e.placeholder.exec(p))!==null){if(g[2]){c|=1;var f=[],h=g[2],i=[];if((i=e.key.exec(h))!==null)for(f.push(i[1]);(h=h.substring(i[0].length))!=="";)if((i=e.key_access.exec(h))!==null)f.push(i[1]);else if((i=e.index_access.exec(h))!==null)f.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=f}else c|=2;if(c===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(g[0].length)}return d[b]=o}n.sprintf=t,n.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()}(Ym)),Ym}E$();var Cc={exports:{}};/**
1468
+ `));return}var be=0,Ne=function(){if(be<le.length){var Ie=le[be++],He=y.getLineNumber(Ie);if(He==null){Ne();return}var at=He+1+Q;br.processCommand(y,at,{callback:Ne})}else y.releaseLineHandles&&y.releaseLineHandles()};Ne()},substitute:function(y,E){if(!y.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var C=E.argString,F=C?Ji(C,C[0]):[],B,z="",V,Y,Q,re=!1,le=!1;if(F.length)B=F[0],S("pcre")&&B!==""&&(B=new RegExp(B).source),z=F[1],z!==void 0&&(S("pcre")?z=Ol(z.replace(/([^\\])&/g,"$1$$&")):z=Ll(z),We.lastSubstituteReplacePart=z),V=F[2]?F[2].split(" "):[];else if(C&&C.length){Pt(y,"Substitutions should be of the form :s/pattern/replace/");return}if(V&&(Y=V[0],Q=parseInt(V[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(le=!0),S("pcre")?B=B+"/"+Y:B=B.replace(/\//g,"\\/")+"/"+Y)),B)try{hn(y,B,!0,!0)}catch{Pt(y,"Invalid regex: "+B);return}if(z=z||We.lastSubstituteReplacePart,z===void 0){Pt(y,"No previous substitute regular expression");return}var ye=$n(y),ke=ye.getQuery(),me=E.line!==void 0?E.line:y.getCursor().line,be=E.lineEnd||me;me==y.firstLine()&&be==y.lastLine()&&(be=1/0),Q&&(me=be,be=me+Q-1);var Ne=ce(y,new De(me,0)),Ie=y.getSearchCursor(ke,Ne);rs(y,re,le,me,be,Ie,ke,z,E.callback)},startinsert:function(y,E){O(y,E.argString=="!"?"A":"i",{})},redo:Be.commands.redo,undo:Be.commands.undo,write:function(y){Be.commands.save?Be.commands.save(y):y.save&&y.save()},nohlsearch:function(y){ns(y)},yank:function(y){var E=Ke(y.getCursor()),C=E.line,F=y.getLine(C);We.registerController.pushText("0","yank",F,!0,!0)},delete:function(y,E){var C=E.selectionLine,F=isNaN(E.selectionLineEnd)?C:E.selectionLineEnd;ds.delete(y,{linewise:!0},[{anchor:new De(C,0),head:new De(F+1,0)}])},join:function(y,E){var C=E.selectionLine,F=isNaN(E.selectionLineEnd)?C:E.selectionLineEnd;y.setCursor(new De(C,0)),On.joinLines(y,{repeat:F-C},y.state.vim)},delmarks:function(y,E){if(!E.argString||!hi(E.argString)){Pt(y,"Argument required");return}for(var C=y.state.vim,F=new Be.StringStream(hi(E.argString));!F.eol();){F.eatSpace();var B=F.pos;if(!F.match(/[a-zA-Z]/,!1)){Pt(y,"Invalid argument: "+E.argString.substring(B));return}var z=F.next();if(F.match("-",!0)){if(!F.match(/[a-zA-Z]/,!1)){Pt(y,"Invalid argument: "+E.argString.substring(B));return}var V=z,Y=F.next();if(!(f(V)&&f(Y)||a(V)&&a(Y))){Pt(y,"Invalid argument: "+V+"-");return}var Q=V.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){Pt(y,"Invalid argument: "+E.argString.substring(B));return}for(var le=0;le<=re-Q;le++){var ye=String.fromCharCode(Q+le);delete C.marks[ye]}}else delete C.marks[z]}}},br=new yr;T("insertModeEscKeysTimeout",200,"number"),Be.Vim=mt;var Lr={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"},vi=mt.handleKey.bind(mt);mt.handleKey=function(y,E,C){return y.operation(function(){return vi(y,E,C)},!0)},N(),r.CodeMirror=Be;var yi=mt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(y,E,C,F,B){var z=this.state.vim||{},V=C.characterWidth,Y=C.lineHeight,Q=E.top,re=E.left;if(!z.insertMode){var le=F.cursor?ar.comparePoints(F.cursor,F.start)<=0:B.selection.isBackwards()||B.selection.isEmpty();!le&&re>V&&(re-=V)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),to.translate(y,re,Q),to.setStyle(y.style,"width",V+"px"),to.setStyle(y.style,"height",Y+"px")},$getDirectionForHighlight:function(y){var E=y.state.cm,C=yi(E);if(!C.insertMode)return y.session.selection.isBackwards()||y.session.selection.isEmpty()},handleKeyboard:function(y,E,C,F,B){var z=y.editor,V=z.state.cm,Y=yi(V);if(F!=-1){if(Y.insertMode||(E==-1?(C.charCodeAt(0)>255&&y.inputKey&&(C=y.inputKey,C&&y.inputHash==4&&(C=C.toUpperCase())),y.inputChar=C):E==4||E==0?y.inputKey==C&&y.inputHash==E&&y.inputChar?(C=y.inputChar,E=-1):(y.inputChar=null,y.inputKey=C,y.inputHash=E):y.inputChar=y.inputKey=null),V.state.overwrite&&Y.insertMode&&C=="backspace"&&E==0)return{command:"gotoleft"};if(C=="c"&&E==1&&!Oo.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():V.operation(function(){Cn(V)})}),{command:"null",passEvent:!0};if(C=="esc"&&!Y.insertMode&&!Y.visualMode&&!V.ace.inMultiSelectMode){var Q=$n(V),re=Q.getOverlay();re&&V.removeOverlay(re)}if(E==-1||E&1||E===0&&C.length>1){var le=Y.insertMode,ye=Ys(E,C,B||{},Y);Y.status==null&&(Y.status="");var ke=Ro(V,ye,"user");return Y=yi(V),ke&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),V._signal("changeStatus"),!ke&&(E!=-1||le)?void 0:{command:"null",passEvent:!ke}}}},attach:function(y){function E(){var F=yi(C).insertMode;C.ace.renderer.setStyle("normal-mode",!F),y.textInput.setCommandMode(!F),y.renderer.$keepTextAreaAtCursor=F,y.renderer.$blockCursor=!F}y.state||(y.state={});var C=new Be(y);y.state.cm=C,y.$vimModeHandler=this,p(C),yi(C).status=null,C.on("vim-command-done",function(){C.virtualSelectionMode()||(yi(C).status=null,C.ace._signal("changeStatus"),C.ace.session.markUndoGroup())}),C.on("changeStatus",function(){C.ace.renderer.updateCursor(),C.ace._signal("changeStatus")}),C.on("vim-mode-change",function(){C.virtualSelectionMode()||(E(),C._signal("changeStatus"))}),E(),y.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(C)},detach:function(y){var E=y.state.cm;g(E),E.destroy(),y.state.cm=null,y.$vimModeHandler=null,y.renderer.$cursorLayer.drawCursor=null,y.renderer.setStyle("normal-mode",!1),y.textInput.setCommandMode(!1),y.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(y){var E=y.state.cm,C=yi(E);if(C.insertMode)return"INSERT";var F="";return C.visualMode&&(F+="VISUAL",C.visualLine&&(F+=" LINE"),C.visualBlock&&(F+=" BLOCK")),C.status&&(F+=(F?" ":"")+C.status),F}},mt.defineOption({name:"wrap",set:function(y,E){E&&E.ace.setOption("wrap",y)},type:"boolean"},!1),mt.defineEx("write","w",function(){console.log(":write is not implemented")}),An.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"}}),An.push({keys:"gq",type:"operator",operator:"hardWrap"}),mt.defineOperator("hardWrap",function(y,E,C,F,B){var z=C[0].anchor.line,V=C[0].head.line;return E.linewise&&V--,yo(y.ace,{startRow:z,endRow:V}),De(V,0)}),T("textwidth",void 0,"number",["tw"],function(y,E){if(E!==void 0){if(y===void 0){var C=E.ace.getOption("printMarginColumn");return C}var F=Math.round(y);F>1&&E.ace.setOption("printMarginColumn",F)}}),On.aceCommand=function(y,E,C){y.vimCmd=E,y.ace.inVirtualSelectionMode?y.ace.on("beforeEndOperation",Ti):Ti(null,y.ace)},On.fold=function(y,E,C){y.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(E.all?2:0)+(E.open?1:0)])},No=An.length,r.handler.defaultKeymap=An,r.handler.actions=On,r.Vim=mt}),function(){ace.require(["ace/keyboard/vim"],function(t){n&&(n.exports=t)})}()}(Km)),Km.exports}A$();var Ym={},Xm;function E$(){return Xm||(Xm=1,function(n){(function(){var e={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(b){return l(u(b),arguments)}function r(b,p){return t.apply(null,[b].concat(p||[]))}function l(b,p){var g=1,o=b.length,c,f="",h,i,a,m,w,x,T,$;for(h=0;h<o;h++)if(typeof b[h]=="string")f+=b[h];else if(typeof b[h]=="object"){if(a=b[h],a.keys)for(c=p[g],i=0;i<a.keys.length;i++){if(c==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[i],a.keys[i-1]));c=c[a.keys[i]]}else a.param_no?c=p[a.param_no]:c=p[g++];if(e.not_type.test(a.type)&&e.not_primitive.test(a.type)&&c instanceof Function&&(c=c()),e.numeric_arg.test(a.type)&&typeof c!="number"&&isNaN(c))throw new TypeError(t("[sprintf] expecting number but found %T",c));switch(e.number.test(a.type)&&(T=c>=0),a.type){case"b":c=parseInt(c,10).toString(2);break;case"c":c=String.fromCharCode(parseInt(c,10));break;case"d":case"i":c=parseInt(c,10);break;case"j":c=JSON.stringify(c,null,a.width?parseInt(a.width):0);break;case"e":c=a.precision?parseFloat(c).toExponential(a.precision):parseFloat(c).toExponential();break;case"f":c=a.precision?parseFloat(c).toFixed(a.precision):parseFloat(c);break;case"g":c=a.precision?String(Number(c.toPrecision(a.precision))):parseFloat(c);break;case"o":c=(parseInt(c,10)>>>0).toString(8);break;case"s":c=String(c),c=a.precision?c.substring(0,a.precision):c;break;case"t":c=String(!!c),c=a.precision?c.substring(0,a.precision):c;break;case"T":c=Object.prototype.toString.call(c).slice(8,-1).toLowerCase(),c=a.precision?c.substring(0,a.precision):c;break;case"u":c=parseInt(c,10)>>>0;break;case"v":c=c.valueOf(),c=a.precision?c.substring(0,a.precision):c;break;case"x":c=(parseInt(c,10)>>>0).toString(16);break;case"X":c=(parseInt(c,10)>>>0).toString(16).toUpperCase();break}e.json.test(a.type)?f+=c:(e.number.test(a.type)&&(!T||a.sign)?($=T?"+":"-",c=c.toString().replace(e.sign,"")):$="",w=a.pad_char?a.pad_char==="0"?"0":a.pad_char.charAt(1):" ",x=a.width-($+c).length,m=a.width&&x>0?w.repeat(x):"",f+=a.align?$+c+m:w==="0"?$+m+c:m+$+c)}return f}var d=Object.create(null);function u(b){if(d[b])return d[b];for(var p=b,g,o=[],c=0;p;){if((g=e.text.exec(p))!==null)o.push(g[0]);else if((g=e.modulo.exec(p))!==null)o.push("%");else if((g=e.placeholder.exec(p))!==null){if(g[2]){c|=1;var f=[],h=g[2],i=[];if((i=e.key.exec(h))!==null)for(f.push(i[1]);(h=h.substring(i[0].length))!=="";)if((i=e.key_access.exec(h))!==null)f.push(i[1]);else if((i=e.index_access.exec(h))!==null)f.push(i[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=f}else c|=2;if(c===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(g[0].length)}return d[b]=o}n.sprintf=t,n.vsprintf=r,typeof window<"u"&&(window.sprintf=t,window.vsprintf=r)})()}(Ym)),Ym}E$();var Cc={exports:{}};/**
1469
1469
  * @license
1470
1470
  * Lodash <https://lodash.com/>
1471
1471
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1472
1472
  * Released under MIT license <https://lodash.com/license>
1473
1473
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1474
1474
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1475
- */var T$=Cc.exports,Qm;function M$(){return Qm||(Qm=1,function(n,e){(function(){var t,r="4.17.21",l=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",b="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,o="__lodash_placeholder__",c=1,f=2,h=4,i=1,a=2,m=1,w=2,x=4,T=8,$=16,S=32,k=64,L=128,N=256,R=512,O=30,W="...",P=800,D=16,A=1,_=2,I=3,j=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,J=4294967295,ae=J-1,ne=J>>>1,se=[["ary",L],["bind",m],["bindKey",w],["curry",T],["curryRight",$],["flip",R],["partial",S],["partialRight",k],["rearg",N]],ce="[object Arguments]",he="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Te="[object Date]",Re="[object DOMException]",Xe="[object Error]",Ke="[object Function]",dt="[object GeneratorFunction]",rt="[object Map]",gt="[object Number]",tn="[object Null]",Wn="[object Object]",Zt="[object Promise]",hi="[object Proxy]",_n="[object RegExp]",Xn="[object Set]",ur="[object String]",Pr="[object Symbol]",yt="[object Undefined]",qe="[object WeakMap]",qt="[object WeakSet]",gn="[object ArrayBuffer]",Qn="[object DataView]",Br="[object Float32Array]",Ar="[object Float64Array]",Cn="[object Int8Array]",ir="[object Int16Array]",hr="[object Int32Array]",nn="[object Uint8Array]",or="[object Uint8ClampedArray]",$o="[object Uint16Array]",Gi="[object Uint32Array]",Yi=/\b__p \+= '';/g,Xi=/\b(__p \+=) '' \+/g,Ao=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vr=/&(?:amp|lt|gt|quot|#39);/g,Eo=/[&<>"']/g,ts=RegExp(vr.source),Ml=RegExp(Eo.source),di=/<%-([\s\S]+?)%>/g,Rl=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Oa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/,zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/[\\^$.*+?()[\]{}|]/g,Zi=RegExp(Er.source),$n=/^\s+/,Tr=/\s/,po=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ll=/[()=,{}\[\]\/\s]/,Ol=/\\(\\)?/g,eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fi=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,Na=/^0b[01]+$/i,Mr=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,hn=/^(?:0|[1-9]\d*)$/,Mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$i=/($^)/,Rr=/['\n\r\u2028\u2029\\]/g,Ai="\\ud800-\\udfff",ns="\\u0300-\\u036f",Us="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",ti=ns+Us+go,To="\\u2700-\\u27bf",rs="a-z\\xdf-\\xf6\\xf8-\\xff",ni="\\xac\\xb1\\xd7\\xf7",is="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Vs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",os="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",Ks=ni+is+qs+Vs,Mo="['’]",ss="["+Ai+"]",as="["+Ks+"]",mo="["+ti+"]",Gs="\\d+",Da="["+To+"]",ls="["+rs+"]",cs="[^"+Ai+Ks+Gs+To+rs+os+"]",Ys="\\ud83c[\\udffb-\\udfff]",us="(?:"+mo+"|"+Ys+")",Ro="[^"+Ai+"]",Ei="(?:\\ud83c[\\udde6-\\uddff]){2}",ar="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+os+"]",to="\\u200d",Fa="(?:"+ls+"|"+cs+")",Il="(?:"+vo+"|"+cs+")",Lo="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Oo=us+"?",hs="["+sr+"]?",Io="(?:"+to+"(?:"+[Ro,Ei,ar].join("|")+")"+hs+Oo+")*",Pa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=hs+Oo+Io,Ba="(?:"+[Da,Ei,ar].join("|")+")"+Be,De="(?:"+[Ro+mo+"?",mo,Ei,ar,ss].join("|")+")",An=RegExp(Mo,"g"),No=RegExp(mo,"g"),pi=RegExp(Ys+"(?="+Ys+")|"+De+Be,"g"),Un=RegExp([vo+"?"+ls+"+"+Lo+"(?="+[as,vo,"$"].join("|")+")",Il+"+"+no+"(?="+[as,vo+Fa,"$"].join("|")+")",vo+"?"+Fa+"+"+Lo,vo+"+"+no,yo,Pa,Gs,Ba].join("|"),"g"),ja=RegExp("["+to+Ai+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 ]/,Ti=["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"],bo=-1,Yt={};Yt[Br]=Yt[Ar]=Yt[Cn]=Yt[ir]=Yt[hr]=Yt[nn]=Yt[or]=Yt[$o]=Yt[Gi]=!0,Yt[ce]=Yt[he]=Yt[gn]=Yt[Ee]=Yt[Qn]=Yt[Te]=Yt[Xe]=Yt[Ke]=Yt[rt]=Yt[gt]=Yt[Wn]=Yt[_n]=Yt[Xn]=Yt[ur]=Yt[qe]=!1;var Vt={};Vt[ce]=Vt[he]=Vt[gn]=Vt[Qn]=Vt[Ee]=Vt[Te]=Vt[Br]=Vt[Ar]=Vt[Cn]=Vt[ir]=Vt[hr]=Vt[rt]=Vt[gt]=Vt[Wn]=Vt[_n]=Vt[Xn]=Vt[ur]=Vt[Pr]=Vt[nn]=Vt[or]=Vt[$o]=Vt[Gi]=!0,Vt[Xe]=Vt[Ke]=Vt[qe]=!1;var Xt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Mi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Rn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,dn=parseInt,mt=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo,jr=typeof self=="object"&&self&&self.Object===Object&&self,sn=mt||jr||Function("return this")(),mn=e&&!e.nodeType&&e,Zn=mn&&!0&&n&&!n.nodeType&&n,Wr=Zn&&Zn.exports===mn,Ri=Wr&&mt.process,Ln=function(){try{var fe=Zn&&Zn.require&&Zn.require("util").types;return fe||Ri&&Ri.binding&&Ri.binding("util")}catch{}}(),ri=Ln&&Ln.isArrayBuffer,ds=Ln&&Ln.isDate,On=Ln&&Ln.isMap,gi=Ln&&Ln.isRegExp,mi=Ln&&Ln.isSet,Li=Ln&&Ln.isTypedArray;function dr(fe,Ae,xe){switch(xe.length){case 0:return fe.call(Ae);case 1:return fe.call(Ae,xe[0]);case 2:return fe.call(Ae,xe[0],xe[1]);case 3:return fe.call(Ae,xe[0],xe[1],xe[2])}return fe.apply(Ae,xe)}function fr(fe,Ae,xe,ze){for(var ct=-1,At=fe==null?0:fe.length;++ct<At;){var Ht=fe[ct];Ae(ze,Ht,xe(Ht),fe)}return ze}function yr(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze&&Ae(fe[xe],xe,fe)!==!1;);return fe}function Xs(fe,Ae){for(var xe=fe==null?0:fe.length;xe--&&Ae(fe[xe],xe,fe)!==!1;);return fe}function br(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze;)if(!Ae(fe[xe],xe,fe))return!1;return!0}function Lr(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length,ct=0,At=[];++xe<ze;){var Ht=fe[xe];Ae(Ht,xe,fe)&&(At[ct++]=Ht)}return At}function vi(fe,Ae){var xe=fe==null?0:fe.length;return!!xe&&le(fe,Ae,0)>-1}function yi(fe,Ae,xe){for(var ze=-1,ct=fe==null?0:fe.length;++ze<ct;)if(xe(Ae,fe[ze]))return!0;return!1}function y(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length,ct=Array(ze);++xe<ze;)ct[xe]=Ae(fe[xe],xe,fe);return ct}function E(fe,Ae){for(var xe=-1,ze=Ae.length,ct=fe.length;++xe<ze;)fe[ct+xe]=Ae[xe];return fe}function C(fe,Ae,xe,ze){var ct=-1,At=fe==null?0:fe.length;for(ze&&At&&(xe=fe[++ct]);++ct<At;)xe=Ae(xe,fe[ct],ct,fe);return xe}function F(fe,Ae,xe,ze){var ct=fe==null?0:fe.length;for(ze&&ct&&(xe=fe[--ct]);ct--;)xe=Ae(xe,fe[ct],ct,fe);return xe}function B(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze;)if(Ae(fe[xe],xe,fe))return!0;return!1}var z=be("length");function V(fe){return fe.split("")}function Y(fe){return fe.match(Ia)||[]}function Q(fe,Ae,xe){var ze;return xe(fe,function(ct,At,Ht){if(Ae(ct,At,Ht))return ze=At,!1}),ze}function re(fe,Ae,xe,ze){for(var ct=fe.length,At=xe+(ze?1:-1);ze?At--:++At<ct;)if(Ae(fe[At],At,fe))return At;return-1}function le(fe,Ae,xe){return Ae===Ae?Qe(fe,Ae,xe):re(fe,ke,xe)}function ye(fe,Ae,xe,ze){for(var ct=xe-1,At=fe.length;++ct<At;)if(ze(fe[ct],Ae))return ct;return-1}function ke(fe){return fe!==fe}function me(fe,Ae){var xe=fe==null?0:fe.length;return xe?st(fe,Ae)/xe:Z}function be(fe){return function(Ae){return Ae==null?t:Ae[fe]}}function Ne(fe){return function(Ae){return fe==null?t:fe[Ae]}}function Ie(fe,Ae,xe,ze,ct){return ct(fe,function(At,Ht,Mt){xe=ze?(ze=!1,At):Ae(xe,At,Ht,Mt)}),xe}function He(fe,Ae){var xe=fe.length;for(fe.sort(Ae);xe--;)fe[xe]=fe[xe].value;return fe}function st(fe,Ae){for(var xe,ze=-1,ct=fe.length;++ze<ct;){var At=Ae(fe[ze]);At!==t&&(xe=xe===t?At:xe+At)}return xe}function Ye(fe,Ae){for(var xe=-1,ze=Array(fe);++xe<fe;)ze[xe]=Ae(xe);return ze}function tt(fe,Ae){return y(Ae,function(xe){return[xe,fe[xe]]})}function fn(fe){return fe&&fe.slice(0,Lt(fe)+1).replace($n,"")}function lt(fe){return function(Ae){return fe(Ae)}}function yn(fe,Ae){return y(Ae,function(xe){return fe[xe]})}function bt(fe,Ae){return fe.has(Ae)}function $t(fe,Ae){for(var xe=-1,ze=fe.length;++xe<ze&&le(Ae,fe[xe],0)>-1;);return xe}function Jn(fe,Ae){for(var xe=fe.length;xe--&&le(Ae,fe[xe],0)>-1;);return xe}function pr(fe,Ae){for(var xe=fe.length,ze=0;xe--;)fe[xe]===Ae&&++ze;return ze}var bn=Ne(Xt),q=Ne(Bt);function X(fe){return"\\"+Rn[fe]}function ie(fe,Ae){return fe==null?t:fe[Ae]}function oe(fe){return ja.test(fe)}function pe(fe){return Do.test(fe)}function we(fe){for(var Ae,xe=[];!(Ae=fe.next()).done;)xe.push(Ae.value);return xe}function Me(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze,ct){xe[++Ae]=[ct,ze]}),xe}function Pe(fe,Ae){return function(xe){return fe(Ae(xe))}}function je(fe,Ae){for(var xe=-1,ze=fe.length,ct=0,At=[];++xe<ze;){var Ht=fe[xe];(Ht===Ae||Ht===o)&&(fe[xe]=o,At[ct++]=xe)}return At}function Ue(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze){xe[++Ae]=ze}),xe}function Ge(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze){xe[++Ae]=[ze,ze]}),xe}function Qe(fe,Ae,xe){for(var ze=xe-1,ct=fe.length;++ze<ct;)if(fe[ze]===Ae)return ze;return-1}function vt(fe,Ae,xe){for(var ze=xe+1;ze--;)if(fe[ze]===Ae)return ze;return ze}function It(fe){return oe(fe)?it(fe):z(fe)}function wt(fe){return oe(fe)?un(fe):V(fe)}function Lt(fe){for(var Ae=fe.length;Ae--&&Tr.test(fe.charAt(Ae)););return Ae}var ut=Ne(Mi);function it(fe){for(var Ae=pi.lastIndex=0;pi.test(fe);)++Ae;return Ae}function un(fe){return fe.match(pi)||[]}function wn(fe){return fe.match(Un)||[]}var er=function fe(Ae){Ae=Ae==null?sn:Wt.defaults(sn.Object(),Ae,Wt.pick(sn,Ti));var xe=Ae.Array,ze=Ae.Date,ct=Ae.Error,At=Ae.Function,Ht=Ae.Math,Mt=Ae.Object,zr=Ae.RegExp,Oi=Ae.String,an=Ae.TypeError,gr=xe.prototype,Fo=At.prototype,In=Mt.prototype,Qs=Ae["__core-js_shared__"],fu=Fo.toString,rn=In.hasOwnProperty,wI=0,n0=function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pu=In.toString,xI=fu.call(Mt),kI=sn._,SI=zr("^"+fu.call(rn).replace(Er,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gu=Wr?Ae.Buffer:t,fs=Ae.Symbol,mu=Ae.Uint8Array,r0=gu?gu.allocUnsafe:t,vu=Pe(Mt.getPrototypeOf,Mt),i0=Mt.create,o0=In.propertyIsEnumerable,yu=gr.splice,s0=fs?fs.isConcatSpreadable:t,Nl=fs?fs.iterator:t,Zs=fs?fs.toStringTag:t,bu=function(){try{var s=ra(Mt,"defineProperty");return s({},"",{}),s}catch{}}(),_I=Ae.clearTimeout!==sn.clearTimeout&&Ae.clearTimeout,CI=ze&&ze.now!==sn.Date.now&&ze.now,$I=Ae.setTimeout!==sn.setTimeout&&Ae.setTimeout,wu=Ht.ceil,xu=Ht.floor,$f=Mt.getOwnPropertySymbols,AI=gu?gu.isBuffer:t,a0=Ae.isFinite,EI=gr.join,TI=Pe(Mt.keys,Mt),lr=Ht.max,Or=Ht.min,MI=ze.now,RI=Ae.parseInt,l0=Ht.random,LI=gr.reverse,Af=ra(Ae,"DataView"),Dl=ra(Ae,"Map"),Ef=ra(Ae,"Promise"),Wa=ra(Ae,"Set"),Fl=ra(Ae,"WeakMap"),Pl=ra(Mt,"create"),ku=Fl&&new Fl,za={},OI=ia(Af),II=ia(Dl),NI=ia(Ef),DI=ia(Wa),FI=ia(Fl),Su=fs?fs.prototype:t,Bl=Su?Su.valueOf:t,c0=Su?Su.toString:t;function ee(s){if(Nn(s)&&!xt(s)&&!(s instanceof jt)){if(s instanceof Ii)return s;if(rn.call(s,"__wrapped__"))return ux(s)}return new Ii(s)}var Ha=function(){function s(){}return function(v){if(!En(v))return{};if(i0)return i0(v);s.prototype=v;var M=new s;return s.prototype=t,M}}();function _u(){}function Ii(s,v){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=t}ee.templateSettings={escape:di,evaluate:Rl,interpolate:zs,variable:"",imports:{_:ee}},ee.prototype=_u.prototype,ee.prototype.constructor=ee,Ii.prototype=Ha(_u.prototype),Ii.prototype.constructor=Ii;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function PI(){var s=new jt(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 BI(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function jI(){var s=this.__wrapped__.value(),v=this.__dir__,M=xt(s),H=v<0,G=M?s.length:0,te=Z2(0,G,this.__views__),ue=te.start,de=te.end,ve=de-ue,Le=H?de:ue-1,Oe=this.__iteratees__,Fe=Oe.length,Ve=0,nt=Or(ve,this.__takeCount__);if(!M||!H&&G==ve&&nt==ve)return O0(s,this.__actions__);var ft=[];e:for(;ve--&&Ve<nt;){Le+=v;for(var Rt=-1,pt=s[Le];++Rt<Fe;){var Nt=Oe[Rt],zt=Nt.iteratee,xi=Nt.type,qr=zt(pt);if(xi==_)pt=qr;else if(!qr){if(xi==A)continue e;break e}}ft[Ve++]=pt}return ft}jt.prototype=Ha(_u.prototype),jt.prototype.constructor=jt;function Js(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function WI(){this.__data__=Pl?Pl(null):{},this.size=0}function zI(s){var v=this.has(s)&&delete this.__data__[s];return this.size-=v?1:0,v}function HI(s){var v=this.__data__;if(Pl){var M=v[s];return M===p?t:M}return rn.call(v,s)?v[s]:t}function UI(s){var v=this.__data__;return Pl?v[s]!==t:rn.call(v,s)}function qI(s,v){var M=this.__data__;return this.size+=this.has(s)?0:1,M[s]=Pl&&v===t?p:v,this}Js.prototype.clear=WI,Js.prototype.delete=zI,Js.prototype.get=HI,Js.prototype.has=UI,Js.prototype.set=qI;function Po(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function VI(){this.__data__=[],this.size=0}function KI(s){var v=this.__data__,M=Cu(v,s);if(M<0)return!1;var H=v.length-1;return M==H?v.pop():yu.call(v,M,1),--this.size,!0}function GI(s){var v=this.__data__,M=Cu(v,s);return M<0?t:v[M][1]}function YI(s){return Cu(this.__data__,s)>-1}function XI(s,v){var M=this.__data__,H=Cu(M,s);return H<0?(++this.size,M.push([s,v])):M[H][1]=v,this}Po.prototype.clear=VI,Po.prototype.delete=KI,Po.prototype.get=GI,Po.prototype.has=YI,Po.prototype.set=XI;function Bo(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function QI(){this.size=0,this.__data__={hash:new Js,map:new(Dl||Po),string:new Js}}function ZI(s){var v=Fu(this,s).delete(s);return this.size-=v?1:0,v}function JI(s){return Fu(this,s).get(s)}function e2(s){return Fu(this,s).has(s)}function t2(s,v){var M=Fu(this,s),H=M.size;return M.set(s,v),this.size+=M.size==H?0:1,this}Bo.prototype.clear=QI,Bo.prototype.delete=ZI,Bo.prototype.get=JI,Bo.prototype.has=e2,Bo.prototype.set=t2;function ea(s){var v=-1,M=s==null?0:s.length;for(this.__data__=new Bo;++v<M;)this.add(s[v])}function n2(s){return this.__data__.set(s,p),this}function r2(s){return this.__data__.has(s)}ea.prototype.add=ea.prototype.push=n2,ea.prototype.has=r2;function ro(s){var v=this.__data__=new Po(s);this.size=v.size}function i2(){this.__data__=new Po,this.size=0}function o2(s){var v=this.__data__,M=v.delete(s);return this.size=v.size,M}function s2(s){return this.__data__.get(s)}function a2(s){return this.__data__.has(s)}function l2(s,v){var M=this.__data__;if(M instanceof Po){var H=M.__data__;if(!Dl||H.length<l-1)return H.push([s,v]),this.size=++M.size,this;M=this.__data__=new Bo(H)}return M.set(s,v),this.size=M.size,this}ro.prototype.clear=i2,ro.prototype.delete=o2,ro.prototype.get=s2,ro.prototype.has=a2,ro.prototype.set=l2;function u0(s,v){var M=xt(s),H=!M&&oa(s),G=!M&&!H&&ys(s),te=!M&&!H&&!G&&Ka(s),ue=M||H||G||te,de=ue?Ye(s.length,Oi):[],ve=de.length;for(var Le in s)(v||rn.call(s,Le))&&!(ue&&(Le=="length"||G&&(Le=="offset"||Le=="parent")||te&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Ho(Le,ve)))&&de.push(Le);return de}function h0(s){var v=s.length;return v?s[Bf(0,v-1)]:t}function c2(s,v){return Pu(ii(s),ta(v,0,s.length))}function u2(s){return Pu(ii(s))}function Tf(s,v,M){(M!==t&&!io(s[v],M)||M===t&&!(v in s))&&jo(s,v,M)}function jl(s,v,M){var H=s[v];(!(rn.call(s,v)&&io(H,M))||M===t&&!(v in s))&&jo(s,v,M)}function Cu(s,v){for(var M=s.length;M--;)if(io(s[M][0],v))return M;return-1}function h2(s,v,M,H){return ps(s,function(G,te,ue){v(H,G,M(G),ue)}),H}function d0(s,v){return s&&xo(v,mr(v),s)}function d2(s,v){return s&&xo(v,si(v),s)}function jo(s,v,M){v=="__proto__"&&bu?bu(s,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):s[v]=M}function Mf(s,v){for(var M=-1,H=v.length,G=xe(H),te=s==null;++M<H;)G[M]=te?t:up(s,v[M]);return G}function ta(s,v,M){return s===s&&(M!==t&&(s=s<=M?s:M),v!==t&&(s=s>=v?s:v)),s}function Ni(s,v,M,H,G,te){var ue,de=v&c,ve=v&f,Le=v&h;if(M&&(ue=G?M(s,H,G,te):M(s)),ue!==t)return ue;if(!En(s))return s;var Oe=xt(s);if(Oe){if(ue=eN(s),!de)return ii(s,ue)}else{var Fe=Ir(s),Ve=Fe==Ke||Fe==dt;if(ys(s))return D0(s,de);if(Fe==Wn||Fe==ce||Ve&&!G){if(ue=ve||Ve?{}:tx(s),!de)return ve?H2(s,d2(ue,s)):z2(s,d0(ue,s))}else{if(!Vt[Fe])return G?s:{};ue=tN(s,Fe,de)}}te||(te=new ro);var nt=te.get(s);if(nt)return nt;te.set(s,ue),Mx(s)?s.forEach(function(pt){ue.add(Ni(pt,v,M,pt,s,te))}):Ex(s)&&s.forEach(function(pt,Nt){ue.set(Nt,Ni(pt,v,M,Nt,s,te))});var ft=Le?ve?Xf:Yf:ve?si:mr,Rt=Oe?t:ft(s);return yr(Rt||s,function(pt,Nt){Rt&&(Nt=pt,pt=s[Nt]),jl(ue,Nt,Ni(pt,v,M,Nt,s,te))}),ue}function f2(s){var v=mr(s);return function(M){return f0(M,s,v)}}function f0(s,v,M){var H=M.length;if(s==null)return!H;for(s=Mt(s);H--;){var G=M[H],te=v[G],ue=s[G];if(ue===t&&!(G in s)||!te(ue))return!1}return!0}function p0(s,v,M){if(typeof s!="function")throw new an(u);return Kl(function(){s.apply(t,M)},v)}function Wl(s,v,M,H){var G=-1,te=vi,ue=!0,de=s.length,ve=[],Le=v.length;if(!de)return ve;M&&(v=y(v,lt(M))),H?(te=yi,ue=!1):v.length>=l&&(te=bt,ue=!1,v=new ea(v));e:for(;++G<de;){var Oe=s[G],Fe=M==null?Oe:M(Oe);if(Oe=H||Oe!==0?Oe:0,ue&&Fe===Fe){for(var Ve=Le;Ve--;)if(v[Ve]===Fe)continue e;ve.push(Oe)}else te(v,Fe,H)||ve.push(Oe)}return ve}var ps=W0(wo),g0=W0(Lf,!0);function p2(s,v){var M=!0;return ps(s,function(H,G,te){return M=!!v(H,G,te),M}),M}function $u(s,v,M){for(var H=-1,G=s.length;++H<G;){var te=s[H],ue=v(te);if(ue!=null&&(de===t?ue===ue&&!wi(ue):M(ue,de)))var de=ue,ve=te}return ve}function g2(s,v,M,H){var G=s.length;for(M=Et(M),M<0&&(M=-M>G?0:G+M),H=H===t||H>G?G:Et(H),H<0&&(H+=G),H=M>H?0:Lx(H);M<H;)s[M++]=v;return s}function m0(s,v){var M=[];return ps(s,function(H,G,te){v(H,G,te)&&M.push(H)}),M}function wr(s,v,M,H,G){var te=-1,ue=s.length;for(M||(M=rN),G||(G=[]);++te<ue;){var de=s[te];v>0&&M(de)?v>1?wr(de,v-1,M,H,G):E(G,de):H||(G[G.length]=de)}return G}var Rf=z0(),v0=z0(!0);function wo(s,v){return s&&Rf(s,v,mr)}function Lf(s,v){return s&&v0(s,v,mr)}function Au(s,v){return Lr(v,function(M){return Uo(s[M])})}function na(s,v){v=ms(v,s);for(var M=0,H=v.length;s!=null&&M<H;)s=s[ko(v[M++])];return M&&M==H?s:t}function y0(s,v,M){var H=v(s);return xt(s)?H:E(H,M(s))}function Hr(s){return s==null?s===t?yt:tn:Zs&&Zs in Mt(s)?Q2(s):uN(s)}function Of(s,v){return s>v}function m2(s,v){return s!=null&&rn.call(s,v)}function v2(s,v){return s!=null&&v in Mt(s)}function y2(s,v,M){return s>=Or(v,M)&&s<lr(v,M)}function If(s,v,M){for(var H=M?yi:vi,G=s[0].length,te=s.length,ue=te,de=xe(te),ve=1/0,Le=[];ue--;){var Oe=s[ue];ue&&v&&(Oe=y(Oe,lt(v))),ve=Or(Oe.length,ve),de[ue]=!M&&(v||G>=120&&Oe.length>=120)?new ea(ue&&Oe):t}Oe=s[0];var Fe=-1,Ve=de[0];e:for(;++Fe<G&&Le.length<ve;){var nt=Oe[Fe],ft=v?v(nt):nt;if(nt=M||nt!==0?nt:0,!(Ve?bt(Ve,ft):H(Le,ft,M))){for(ue=te;--ue;){var Rt=de[ue];if(!(Rt?bt(Rt,ft):H(s[ue],ft,M)))continue e}Ve&&Ve.push(ft),Le.push(nt)}}return Le}function b2(s,v,M,H){return wo(s,function(G,te,ue){v(H,M(G),te,ue)}),H}function zl(s,v,M){v=ms(v,s),s=ox(s,v);var H=s==null?s:s[ko(Fi(v))];return H==null?t:dr(H,s,M)}function b0(s){return Nn(s)&&Hr(s)==ce}function w2(s){return Nn(s)&&Hr(s)==gn}function x2(s){return Nn(s)&&Hr(s)==Te}function Hl(s,v,M,H,G){return s===v?!0:s==null||v==null||!Nn(s)&&!Nn(v)?s!==s&&v!==v:k2(s,v,M,H,Hl,G)}function k2(s,v,M,H,G,te){var ue=xt(s),de=xt(v),ve=ue?he:Ir(s),Le=de?he:Ir(v);ve=ve==ce?Wn:ve,Le=Le==ce?Wn:Le;var Oe=ve==Wn,Fe=Le==Wn,Ve=ve==Le;if(Ve&&ys(s)){if(!ys(v))return!1;ue=!0,Oe=!1}if(Ve&&!Oe)return te||(te=new ro),ue||Ka(s)?Z0(s,v,M,H,G,te):Y2(s,v,ve,M,H,G,te);if(!(M&i)){var nt=Oe&&rn.call(s,"__wrapped__"),ft=Fe&&rn.call(v,"__wrapped__");if(nt||ft){var Rt=nt?s.value():s,pt=ft?v.value():v;return te||(te=new ro),G(Rt,pt,M,H,te)}}return Ve?(te||(te=new ro),X2(s,v,M,H,G,te)):!1}function S2(s){return Nn(s)&&Ir(s)==rt}function Nf(s,v,M,H){var G=M.length,te=G,ue=!H;if(s==null)return!te;for(s=Mt(s);G--;){var de=M[G];if(ue&&de[2]?de[1]!==s[de[0]]:!(de[0]in s))return!1}for(;++G<te;){de=M[G];var ve=de[0],Le=s[ve],Oe=de[1];if(ue&&de[2]){if(Le===t&&!(ve in s))return!1}else{var Fe=new ro;if(H)var Ve=H(Le,Oe,ve,s,v,Fe);if(!(Ve===t?Hl(Oe,Le,i|a,H,Fe):Ve))return!1}}return!0}function w0(s){if(!En(s)||oN(s))return!1;var v=Uo(s)?SI:Mr;return v.test(ia(s))}function _2(s){return Nn(s)&&Hr(s)==_n}function C2(s){return Nn(s)&&Ir(s)==Xn}function $2(s){return Nn(s)&&Uu(s.length)&&!!Yt[Hr(s)]}function x0(s){return typeof s=="function"?s:s==null?ai:typeof s=="object"?xt(s)?_0(s[0],s[1]):S0(s):Hx(s)}function Df(s){if(!Vl(s))return TI(s);var v=[];for(var M in Mt(s))rn.call(s,M)&&M!="constructor"&&v.push(M);return v}function A2(s){if(!En(s))return cN(s);var v=Vl(s),M=[];for(var H in s)H=="constructor"&&(v||!rn.call(s,H))||M.push(H);return M}function Ff(s,v){return s<v}function k0(s,v){var M=-1,H=oi(s)?xe(s.length):[];return ps(s,function(G,te,ue){H[++M]=v(G,te,ue)}),H}function S0(s){var v=Zf(s);return v.length==1&&v[0][2]?rx(v[0][0],v[0][1]):function(M){return M===s||Nf(M,s,v)}}function _0(s,v){return ep(s)&&nx(v)?rx(ko(s),v):function(M){var H=up(M,s);return H===t&&H===v?hp(M,s):Hl(v,H,i|a)}}function Eu(s,v,M,H,G){s!==v&&Rf(v,function(te,ue){if(G||(G=new ro),En(te))E2(s,v,ue,M,Eu,H,G);else{var de=H?H(np(s,ue),te,ue+"",s,v,G):t;de===t&&(de=te),Tf(s,ue,de)}},si)}function E2(s,v,M,H,G,te,ue){var de=np(s,M),ve=np(v,M),Le=ue.get(ve);if(Le){Tf(s,M,Le);return}var Oe=te?te(de,ve,M+"",s,v,ue):t,Fe=Oe===t;if(Fe){var Ve=xt(ve),nt=!Ve&&ys(ve),ft=!Ve&&!nt&&Ka(ve);Oe=ve,Ve||nt||ft?xt(de)?Oe=de:qn(de)?Oe=ii(de):nt?(Fe=!1,Oe=D0(ve,!0)):ft?(Fe=!1,Oe=F0(ve,!0)):Oe=[]:Gl(ve)||oa(ve)?(Oe=de,oa(de)?Oe=Ox(de):(!En(de)||Uo(de))&&(Oe=tx(ve))):Fe=!1}Fe&&(ue.set(ve,Oe),G(Oe,ve,H,te,ue),ue.delete(ve)),Tf(s,M,Oe)}function C0(s,v){var M=s.length;if(M)return v+=v<0?M:0,Ho(v,M)?s[v]:t}function $0(s,v,M){v.length?v=y(v,function(te){return xt(te)?function(ue){return na(ue,te.length===1?te[0]:te)}:te}):v=[ai];var H=-1;v=y(v,lt(ht()));var G=k0(s,function(te,ue,de){var ve=y(v,function(Le){return Le(te)});return{criteria:ve,index:++H,value:te}});return He(G,function(te,ue){return W2(te,ue,M)})}function T2(s,v){return A0(s,v,function(M,H){return hp(s,H)})}function A0(s,v,M){for(var H=-1,G=v.length,te={};++H<G;){var ue=v[H],de=na(s,ue);M(de,ue)&&Ul(te,ms(ue,s),de)}return te}function M2(s){return function(v){return na(v,s)}}function Pf(s,v,M,H){var G=H?ye:le,te=-1,ue=v.length,de=s;for(s===v&&(v=ii(v)),M&&(de=y(s,lt(M)));++te<ue;)for(var ve=0,Le=v[te],Oe=M?M(Le):Le;(ve=G(de,Oe,ve,H))>-1;)de!==s&&yu.call(de,ve,1),yu.call(s,ve,1);return s}function E0(s,v){for(var M=s?v.length:0,H=M-1;M--;){var G=v[M];if(M==H||G!==te){var te=G;Ho(G)?yu.call(s,G,1):zf(s,G)}}return s}function Bf(s,v){return s+xu(l0()*(v-s+1))}function R2(s,v,M,H){for(var G=-1,te=lr(wu((v-s)/(M||1)),0),ue=xe(te);te--;)ue[H?te:++G]=s,s+=M;return ue}function jf(s,v){var M="";if(!s||v<1||v>U)return M;do v%2&&(M+=s),v=xu(v/2),v&&(s+=s);while(v);return M}function Ot(s,v){return rp(ix(s,v,ai),s+"")}function L2(s){return h0(Ga(s))}function O2(s,v){var M=Ga(s);return Pu(M,ta(v,0,M.length))}function Ul(s,v,M,H){if(!En(s))return s;v=ms(v,s);for(var G=-1,te=v.length,ue=te-1,de=s;de!=null&&++G<te;){var ve=ko(v[G]),Le=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return s;if(G!=ue){var Oe=de[ve];Le=H?H(Oe,ve,de):t,Le===t&&(Le=En(Oe)?Oe:Ho(v[G+1])?[]:{})}jl(de,ve,Le),de=de[ve]}return s}var T0=ku?function(s,v){return ku.set(s,v),s}:ai,I2=bu?function(s,v){return bu(s,"toString",{configurable:!0,enumerable:!1,value:fp(v),writable:!0})}:ai;function N2(s){return Pu(Ga(s))}function Di(s,v,M){var H=-1,G=s.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var te=xe(G);++H<G;)te[H]=s[H+v];return te}function D2(s,v){var M;return ps(s,function(H,G,te){return M=v(H,G,te),!M}),!!M}function Tu(s,v,M){var H=0,G=s==null?H:s.length;if(typeof v=="number"&&v===v&&G<=ne){for(;H<G;){var te=H+G>>>1,ue=s[te];ue!==null&&!wi(ue)&&(M?ue<=v:ue<v)?H=te+1:G=te}return G}return Wf(s,v,ai,M)}function Wf(s,v,M,H){var G=0,te=s==null?0:s.length;if(te===0)return 0;v=M(v);for(var ue=v!==v,de=v===null,ve=wi(v),Le=v===t;G<te;){var Oe=xu((G+te)/2),Fe=M(s[Oe]),Ve=Fe!==t,nt=Fe===null,ft=Fe===Fe,Rt=wi(Fe);if(ue)var pt=H||ft;else Le?pt=ft&&(H||Ve):de?pt=ft&&Ve&&(H||!nt):ve?pt=ft&&Ve&&!nt&&(H||!Rt):nt||Rt?pt=!1:pt=H?Fe<=v:Fe<v;pt?G=Oe+1:te=Oe}return Or(te,ae)}function M0(s,v){for(var M=-1,H=s.length,G=0,te=[];++M<H;){var ue=s[M],de=v?v(ue):ue;if(!M||!io(de,ve)){var ve=de;te[G++]=ue===0?0:ue}}return te}function R0(s){return typeof s=="number"?s:wi(s)?Z:+s}function bi(s){if(typeof s=="string")return s;if(xt(s))return y(s,bi)+"";if(wi(s))return c0?c0.call(s):"";var v=s+"";return v=="0"&&1/s==-j?"-0":v}function gs(s,v,M){var H=-1,G=vi,te=s.length,ue=!0,de=[],ve=de;if(M)ue=!1,G=yi;else if(te>=l){var Le=v?null:K2(s);if(Le)return Ue(Le);ue=!1,G=bt,ve=new ea}else ve=v?[]:de;e:for(;++H<te;){var Oe=s[H],Fe=v?v(Oe):Oe;if(Oe=M||Oe!==0?Oe:0,ue&&Fe===Fe){for(var Ve=ve.length;Ve--;)if(ve[Ve]===Fe)continue e;v&&ve.push(Fe),de.push(Oe)}else G(ve,Fe,M)||(ve!==de&&ve.push(Fe),de.push(Oe))}return de}function zf(s,v){return v=ms(v,s),s=ox(s,v),s==null||delete s[ko(Fi(v))]}function L0(s,v,M,H){return Ul(s,v,M(na(s,v)),H)}function Mu(s,v,M,H){for(var G=s.length,te=H?G:-1;(H?te--:++te<G)&&v(s[te],te,s););return M?Di(s,H?0:te,H?te+1:G):Di(s,H?te+1:0,H?G:te)}function O0(s,v){var M=s;return M instanceof jt&&(M=M.value()),C(v,function(H,G){return G.func.apply(G.thisArg,E([H],G.args))},M)}function Hf(s,v,M){var H=s.length;if(H<2)return H?gs(s[0]):[];for(var G=-1,te=xe(H);++G<H;)for(var ue=s[G],de=-1;++de<H;)de!=G&&(te[G]=Wl(te[G]||ue,s[de],v,M));return gs(wr(te,1),v,M)}function I0(s,v,M){for(var H=-1,G=s.length,te=v.length,ue={};++H<G;){var de=H<te?v[H]:t;M(ue,s[H],de)}return ue}function Uf(s){return qn(s)?s:[]}function qf(s){return typeof s=="function"?s:ai}function ms(s,v){return xt(s)?s:ep(s,v)?[s]:cx(Jt(s))}var F2=Ot;function vs(s,v,M){var H=s.length;return M=M===t?H:M,!v&&M>=H?s:Di(s,v,M)}var N0=_I||function(s){return sn.clearTimeout(s)};function D0(s,v){if(v)return s.slice();var M=s.length,H=r0?r0(M):new s.constructor(M);return s.copy(H),H}function Vf(s){var v=new s.constructor(s.byteLength);return new mu(v).set(new mu(s)),v}function P2(s,v){var M=v?Vf(s.buffer):s.buffer;return new s.constructor(M,s.byteOffset,s.byteLength)}function B2(s){var v=new s.constructor(s.source,fi.exec(s));return v.lastIndex=s.lastIndex,v}function j2(s){return Bl?Mt(Bl.call(s)):{}}function F0(s,v){var M=v?Vf(s.buffer):s.buffer;return new s.constructor(M,s.byteOffset,s.length)}function P0(s,v){if(s!==v){var M=s!==t,H=s===null,G=s===s,te=wi(s),ue=v!==t,de=v===null,ve=v===v,Le=wi(v);if(!de&&!Le&&!te&&s>v||te&&ue&&ve&&!de&&!Le||H&&ue&&ve||!M&&ve||!G)return 1;if(!H&&!te&&!Le&&s<v||Le&&M&&G&&!H&&!te||de&&M&&G||!ue&&G||!ve)return-1}return 0}function W2(s,v,M){for(var H=-1,G=s.criteria,te=v.criteria,ue=G.length,de=M.length;++H<ue;){var ve=P0(G[H],te[H]);if(ve){if(H>=de)return ve;var Le=M[H];return ve*(Le=="desc"?-1:1)}}return s.index-v.index}function B0(s,v,M,H){for(var G=-1,te=s.length,ue=M.length,de=-1,ve=v.length,Le=lr(te-ue,0),Oe=xe(ve+Le),Fe=!H;++de<ve;)Oe[de]=v[de];for(;++G<ue;)(Fe||G<te)&&(Oe[M[G]]=s[G]);for(;Le--;)Oe[de++]=s[G++];return Oe}function j0(s,v,M,H){for(var G=-1,te=s.length,ue=-1,de=M.length,ve=-1,Le=v.length,Oe=lr(te-de,0),Fe=xe(Oe+Le),Ve=!H;++G<Oe;)Fe[G]=s[G];for(var nt=G;++ve<Le;)Fe[nt+ve]=v[ve];for(;++ue<de;)(Ve||G<te)&&(Fe[nt+M[ue]]=s[G++]);return Fe}function ii(s,v){var M=-1,H=s.length;for(v||(v=xe(H));++M<H;)v[M]=s[M];return v}function xo(s,v,M,H){var G=!M;M||(M={});for(var te=-1,ue=v.length;++te<ue;){var de=v[te],ve=H?H(M[de],s[de],de,M,s):t;ve===t&&(ve=s[de]),G?jo(M,de,ve):jl(M,de,ve)}return M}function z2(s,v){return xo(s,Jf(s),v)}function H2(s,v){return xo(s,J0(s),v)}function Ru(s,v){return function(M,H){var G=xt(M)?fr:h2,te=v?v():{};return G(M,s,ht(H,2),te)}}function Ua(s){return Ot(function(v,M){var H=-1,G=M.length,te=G>1?M[G-1]:t,ue=G>2?M[2]:t;for(te=s.length>3&&typeof te=="function"?(G--,te):t,ue&&Ur(M[0],M[1],ue)&&(te=G<3?t:te,G=1),v=Mt(v);++H<G;){var de=M[H];de&&s(v,de,H,te)}return v})}function W0(s,v){return function(M,H){if(M==null)return M;if(!oi(M))return s(M,H);for(var G=M.length,te=v?G:-1,ue=Mt(M);(v?te--:++te<G)&&H(ue[te],te,ue)!==!1;);return M}}function z0(s){return function(v,M,H){for(var G=-1,te=Mt(v),ue=H(v),de=ue.length;de--;){var ve=ue[s?de:++G];if(M(te[ve],ve,te)===!1)break}return v}}function U2(s,v,M){var H=v&m,G=ql(s);function te(){var ue=this&&this!==sn&&this instanceof te?G:s;return ue.apply(H?M:this,arguments)}return te}function H0(s){return function(v){v=Jt(v);var M=oe(v)?wt(v):t,H=M?M[0]:v.charAt(0),G=M?vs(M,1).join(""):v.slice(1);return H[s]()+G}}function qa(s){return function(v){return C(Wx(jx(v).replace(An,"")),s,"")}}function ql(s){return function(){var v=arguments;switch(v.length){case 0:return new s;case 1:return new s(v[0]);case 2:return new s(v[0],v[1]);case 3:return new s(v[0],v[1],v[2]);case 4:return new s(v[0],v[1],v[2],v[3]);case 5:return new s(v[0],v[1],v[2],v[3],v[4]);case 6:return new s(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new s(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=Ha(s.prototype),H=s.apply(M,v);return En(H)?H:M}}function q2(s,v,M){var H=ql(s);function G(){for(var te=arguments.length,ue=xe(te),de=te,ve=Va(G);de--;)ue[de]=arguments[de];var Le=te<3&&ue[0]!==ve&&ue[te-1]!==ve?[]:je(ue,ve);if(te-=Le.length,te<M)return G0(s,v,Lu,G.placeholder,t,ue,Le,t,t,M-te);var Oe=this&&this!==sn&&this instanceof G?H:s;return dr(Oe,this,ue)}return G}function U0(s){return function(v,M,H){var G=Mt(v);if(!oi(v)){var te=ht(M,3);v=mr(v),M=function(de){return te(G[de],de,G)}}var ue=s(v,M,H);return ue>-1?G[te?v[ue]:ue]:t}}function q0(s){return zo(function(v){var M=v.length,H=M,G=Ii.prototype.thru;for(s&&v.reverse();H--;){var te=v[H];if(typeof te!="function")throw new an(u);if(G&&!ue&&Du(te)=="wrapper")var ue=new Ii([],!0)}for(H=ue?H:M;++H<M;){te=v[H];var de=Du(te),ve=de=="wrapper"?Qf(te):t;ve&&tp(ve[0])&&ve[1]==(L|T|S|N)&&!ve[4].length&&ve[9]==1?ue=ue[Du(ve[0])].apply(ue,ve[3]):ue=te.length==1&&tp(te)?ue[de]():ue.thru(te)}return function(){var Le=arguments,Oe=Le[0];if(ue&&Le.length==1&&xt(Oe))return ue.plant(Oe).value();for(var Fe=0,Ve=M?v[Fe].apply(this,Le):Oe;++Fe<M;)Ve=v[Fe].call(this,Ve);return Ve}})}function Lu(s,v,M,H,G,te,ue,de,ve,Le){var Oe=v&L,Fe=v&m,Ve=v&w,nt=v&(T|$),ft=v&R,Rt=Ve?t:ql(s);function pt(){for(var Nt=arguments.length,zt=xe(Nt),xi=Nt;xi--;)zt[xi]=arguments[xi];if(nt)var qr=Va(pt),ki=pr(zt,qr);if(H&&(zt=B0(zt,H,G,nt)),te&&(zt=j0(zt,te,ue,nt)),Nt-=ki,nt&&Nt<Le){var Vn=je(zt,qr);return G0(s,v,Lu,pt.placeholder,M,zt,Vn,de,ve,Le-Nt)}var oo=Fe?M:this,Vo=Ve?oo[s]:s;return Nt=zt.length,de?zt=hN(zt,de):ft&&Nt>1&&zt.reverse(),Oe&&ve<Nt&&(zt.length=ve),this&&this!==sn&&this instanceof pt&&(Vo=Rt||ql(Vo)),Vo.apply(oo,zt)}return pt}function V0(s,v){return function(M,H){return b2(M,s,v(H),{})}}function Ou(s,v){return function(M,H){var G;if(M===t&&H===t)return v;if(M!==t&&(G=M),H!==t){if(G===t)return H;typeof M=="string"||typeof H=="string"?(M=bi(M),H=bi(H)):(M=R0(M),H=R0(H)),G=s(M,H)}return G}}function Kf(s){return zo(function(v){return v=y(v,lt(ht())),Ot(function(M){var H=this;return s(v,function(G){return dr(G,H,M)})})})}function Iu(s,v){v=v===t?" ":bi(v);var M=v.length;if(M<2)return M?jf(v,s):v;var H=jf(v,wu(s/It(v)));return oe(v)?vs(wt(H),0,s).join(""):H.slice(0,s)}function V2(s,v,M,H){var G=v&m,te=ql(s);function ue(){for(var de=-1,ve=arguments.length,Le=-1,Oe=H.length,Fe=xe(Oe+ve),Ve=this&&this!==sn&&this instanceof ue?te:s;++Le<Oe;)Fe[Le]=H[Le];for(;ve--;)Fe[Le++]=arguments[++de];return dr(Ve,G?M:this,Fe)}return ue}function K0(s){return function(v,M,H){return H&&typeof H!="number"&&Ur(v,M,H)&&(M=H=t),v=qo(v),M===t?(M=v,v=0):M=qo(M),H=H===t?v<M?1:-1:qo(H),R2(v,M,H,s)}}function Nu(s){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Pi(v),M=Pi(M)),s(v,M)}}function G0(s,v,M,H,G,te,ue,de,ve,Le){var Oe=v&T,Fe=Oe?ue:t,Ve=Oe?t:ue,nt=Oe?te:t,ft=Oe?t:te;v|=Oe?S:k,v&=~(Oe?k:S),v&x||(v&=-4);var Rt=[s,v,G,nt,Fe,ft,Ve,de,ve,Le],pt=M.apply(t,Rt);return tp(s)&&sx(pt,Rt),pt.placeholder=H,ax(pt,s,v)}function Gf(s){var v=Ht[s];return function(M,H){if(M=Pi(M),H=H==null?0:Or(Et(H),292),H&&a0(M)){var G=(Jt(M)+"e").split("e"),te=v(G[0]+"e"+(+G[1]+H));return G=(Jt(te)+"e").split("e"),+(G[0]+"e"+(+G[1]-H))}return v(M)}}var K2=Wa&&1/Ue(new Wa([,-0]))[1]==j?function(s){return new Wa(s)}:mp;function Y0(s){return function(v){var M=Ir(v);return M==rt?Me(v):M==Xn?Ge(v):tt(v,s(v))}}function Wo(s,v,M,H,G,te,ue,de){var ve=v&w;if(!ve&&typeof s!="function")throw new an(u);var Le=H?H.length:0;if(Le||(v&=-97,H=G=t),ue=ue===t?ue:lr(Et(ue),0),de=de===t?de:Et(de),Le-=G?G.length:0,v&k){var Oe=H,Fe=G;H=G=t}var Ve=ve?t:Qf(s),nt=[s,v,M,H,G,Oe,Fe,te,ue,de];if(Ve&&lN(nt,Ve),s=nt[0],v=nt[1],M=nt[2],H=nt[3],G=nt[4],de=nt[9]=nt[9]===t?ve?0:s.length:lr(nt[9]-Le,0),!de&&v&(T|$)&&(v&=-25),!v||v==m)var ft=U2(s,v,M);else v==T||v==$?ft=q2(s,v,de):(v==S||v==(m|S))&&!G.length?ft=V2(s,v,M,H):ft=Lu.apply(t,nt);var Rt=Ve?T0:sx;return ax(Rt(ft,nt),s,v)}function X0(s,v,M,H){return s===t||io(s,In[M])&&!rn.call(H,M)?v:s}function Q0(s,v,M,H,G,te){return En(s)&&En(v)&&(te.set(v,s),Eu(s,v,t,Q0,te),te.delete(v)),s}function G2(s){return Gl(s)?t:s}function Z0(s,v,M,H,G,te){var ue=M&i,de=s.length,ve=v.length;if(de!=ve&&!(ue&&ve>de))return!1;var Le=te.get(s),Oe=te.get(v);if(Le&&Oe)return Le==v&&Oe==s;var Fe=-1,Ve=!0,nt=M&a?new ea:t;for(te.set(s,v),te.set(v,s);++Fe<de;){var ft=s[Fe],Rt=v[Fe];if(H)var pt=ue?H(Rt,ft,Fe,v,s,te):H(ft,Rt,Fe,s,v,te);if(pt!==t){if(pt)continue;Ve=!1;break}if(nt){if(!B(v,function(Nt,zt){if(!bt(nt,zt)&&(ft===Nt||G(ft,Nt,M,H,te)))return nt.push(zt)})){Ve=!1;break}}else if(!(ft===Rt||G(ft,Rt,M,H,te))){Ve=!1;break}}return te.delete(s),te.delete(v),Ve}function Y2(s,v,M,H,G,te,ue){switch(M){case Qn:if(s.byteLength!=v.byteLength||s.byteOffset!=v.byteOffset)return!1;s=s.buffer,v=v.buffer;case gn:return!(s.byteLength!=v.byteLength||!te(new mu(s),new mu(v)));case Ee:case Te:case gt:return io(+s,+v);case Xe:return s.name==v.name&&s.message==v.message;case _n:case ur:return s==v+"";case rt:var de=Me;case Xn:var ve=H&i;if(de||(de=Ue),s.size!=v.size&&!ve)return!1;var Le=ue.get(s);if(Le)return Le==v;H|=a,ue.set(s,v);var Oe=Z0(de(s),de(v),H,G,te,ue);return ue.delete(s),Oe;case Pr:if(Bl)return Bl.call(s)==Bl.call(v)}return!1}function X2(s,v,M,H,G,te){var ue=M&i,de=Yf(s),ve=de.length,Le=Yf(v),Oe=Le.length;if(ve!=Oe&&!ue)return!1;for(var Fe=ve;Fe--;){var Ve=de[Fe];if(!(ue?Ve in v:rn.call(v,Ve)))return!1}var nt=te.get(s),ft=te.get(v);if(nt&&ft)return nt==v&&ft==s;var Rt=!0;te.set(s,v),te.set(v,s);for(var pt=ue;++Fe<ve;){Ve=de[Fe];var Nt=s[Ve],zt=v[Ve];if(H)var xi=ue?H(zt,Nt,Ve,v,s,te):H(Nt,zt,Ve,s,v,te);if(!(xi===t?Nt===zt||G(Nt,zt,M,H,te):xi)){Rt=!1;break}pt||(pt=Ve=="constructor")}if(Rt&&!pt){var qr=s.constructor,ki=v.constructor;qr!=ki&&"constructor"in s&&"constructor"in v&&!(typeof qr=="function"&&qr instanceof qr&&typeof ki=="function"&&ki instanceof ki)&&(Rt=!1)}return te.delete(s),te.delete(v),Rt}function zo(s){return rp(ix(s,t,fx),s+"")}function Yf(s){return y0(s,mr,Jf)}function Xf(s){return y0(s,si,J0)}var Qf=ku?function(s){return ku.get(s)}:mp;function Du(s){for(var v=s.name+"",M=za[v],H=rn.call(za,v)?M.length:0;H--;){var G=M[H],te=G.func;if(te==null||te==s)return G.name}return v}function Va(s){var v=rn.call(ee,"placeholder")?ee:s;return v.placeholder}function ht(){var s=ee.iteratee||pp;return s=s===pp?x0:s,arguments.length?s(arguments[0],arguments[1]):s}function Fu(s,v){var M=s.__data__;return iN(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Zf(s){for(var v=mr(s),M=v.length;M--;){var H=v[M],G=s[H];v[M]=[H,G,nx(G)]}return v}function ra(s,v){var M=ie(s,v);return w0(M)?M:t}function Q2(s){var v=rn.call(s,Zs),M=s[Zs];try{s[Zs]=t;var H=!0}catch{}var G=pu.call(s);return H&&(v?s[Zs]=M:delete s[Zs]),G}var Jf=$f?function(s){return s==null?[]:(s=Mt(s),Lr($f(s),function(v){return o0.call(s,v)}))}:vp,J0=$f?function(s){for(var v=[];s;)E(v,Jf(s)),s=vu(s);return v}:vp,Ir=Hr;(Af&&Ir(new Af(new ArrayBuffer(1)))!=Qn||Dl&&Ir(new Dl)!=rt||Ef&&Ir(Ef.resolve())!=Zt||Wa&&Ir(new Wa)!=Xn||Fl&&Ir(new Fl)!=qe)&&(Ir=function(s){var v=Hr(s),M=v==Wn?s.constructor:t,H=M?ia(M):"";if(H)switch(H){case OI:return Qn;case II:return rt;case NI:return Zt;case DI:return Xn;case FI:return qe}return v});function Z2(s,v,M){for(var H=-1,G=M.length;++H<G;){var te=M[H],ue=te.size;switch(te.type){case"drop":s+=ue;break;case"dropRight":v-=ue;break;case"take":v=Or(v,s+ue);break;case"takeRight":s=lr(s,v-ue);break}}return{start:s,end:v}}function J2(s){var v=s.match(Ji);return v?v[1].split(Hs):[]}function ex(s,v,M){v=ms(v,s);for(var H=-1,G=v.length,te=!1;++H<G;){var ue=ko(v[H]);if(!(te=s!=null&&M(s,ue)))break;s=s[ue]}return te||++H!=G?te:(G=s==null?0:s.length,!!G&&Uu(G)&&Ho(ue,G)&&(xt(s)||oa(s)))}function eN(s){var v=s.length,M=new s.constructor(v);return v&&typeof s[0]=="string"&&rn.call(s,"index")&&(M.index=s.index,M.input=s.input),M}function tx(s){return typeof s.constructor=="function"&&!Vl(s)?Ha(vu(s)):{}}function tN(s,v,M){var H=s.constructor;switch(v){case gn:return Vf(s);case Ee:case Te:return new H(+s);case Qn:return P2(s,M);case Br:case Ar:case Cn:case ir:case hr:case nn:case or:case $o:case Gi:return F0(s,M);case rt:return new H;case gt:case ur:return new H(s);case _n:return B2(s);case Xn:return new H;case Pr:return j2(s)}}function nN(s,v){var M=v.length;if(!M)return s;var H=M-1;return v[H]=(M>1?"& ":"")+v[H],v=v.join(M>2?", ":" "),s.replace(po,`{
1475
+ */var T$=Cc.exports,Qm;function M$(){return Qm||(Qm=1,function(n,e){(function(){var t,r="4.17.21",l=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",b="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",g=500,o="__lodash_placeholder__",c=1,f=2,h=4,i=1,a=2,m=1,w=2,x=4,T=8,$=16,S=32,k=64,L=128,N=256,R=512,O=30,W="...",P=800,D=16,A=1,_=2,I=3,j=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,J=4294967295,ae=J-1,ne=J>>>1,se=[["ary",L],["bind",m],["bindKey",w],["curry",T],["curryRight",$],["flip",R],["partial",S],["partialRight",k],["rearg",N]],ce="[object Arguments]",he="[object Array]",ge="[object AsyncFunction]",Ee="[object Boolean]",Te="[object Date]",Re="[object DOMException]",Xe="[object Error]",Ke="[object Function]",dt="[object GeneratorFunction]",ot="[object Map]",gt="[object Number]",tn="[object Null]",Wn="[object Object]",Zt="[object Promise]",hi="[object Proxy]",_n="[object RegExp]",Xn="[object Set]",ur="[object String]",Pr="[object Symbol]",yt="[object Undefined]",qe="[object WeakMap]",qt="[object WeakSet]",gn="[object ArrayBuffer]",Qn="[object DataView]",Br="[object Float32Array]",Ar="[object Float64Array]",Cn="[object Int8Array]",ir="[object Int16Array]",hr="[object Int32Array]",nn="[object Uint8Array]",or="[object Uint8ClampedArray]",$o="[object Uint16Array]",Gi="[object Uint32Array]",Yi=/\b__p \+= '';/g,Xi=/\b(__p \+=) '' \+/g,Ao=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vr=/&(?:amp|lt|gt|quot|#39);/g,Eo=/[&<>"']/g,ts=RegExp(vr.source),Ml=RegExp(Eo.source),di=/<%-([\s\S]+?)%>/g,Rl=/<%([\s\S]+?)%>/g,zs=/<%=([\s\S]+?)%>/g,Oa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qi=/^\w*$/,zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Er=/[\\^$.*+?()[\]{}|]/g,Zi=RegExp(Er.source),$n=/^\s+/,Tr=/\s/,po=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ji=/\{\n\/\* \[wrapped with (.+)\] \*/,Hs=/,? & /,Ia=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ll=/[()=,{}\[\]\/\s]/,Ol=/\\(\\)?/g,eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fi=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,Na=/^0b[01]+$/i,Mr=/^\[object .+?Constructor\]$/,Hn=/^0o[0-7]+$/i,hn=/^(?:0|[1-9]\d*)$/,Mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ai=/($^)/,Rr=/['\n\r\u2028\u2029\\]/g,Ei="\\ud800-\\udfff",ns="\\u0300-\\u036f",Us="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",ti=ns+Us+go,To="\\u2700-\\u27bf",rs="a-z\\xdf-\\xf6\\xf8-\\xff",ni="\\xac\\xb1\\xd7\\xf7",is="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Vs=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",os="A-Z\\xc0-\\xd6\\xd8-\\xde",sr="\\ufe0e\\ufe0f",Ks=ni+is+qs+Vs,Mo="['’]",ss="["+Ei+"]",as="["+Ks+"]",mo="["+ti+"]",Gs="\\d+",Da="["+To+"]",ls="["+rs+"]",cs="[^"+Ei+Ks+Gs+To+rs+os+"]",Ys="\\ud83c[\\udffb-\\udfff]",us="(?:"+mo+"|"+Ys+")",Ro="[^"+Ei+"]",Ti="(?:\\ud83c[\\udde6-\\uddff]){2}",ar="[\\ud800-\\udbff][\\udc00-\\udfff]",vo="["+os+"]",to="\\u200d",Fa="(?:"+ls+"|"+cs+")",Il="(?:"+vo+"|"+cs+")",Lo="(?:"+Mo+"(?:d|ll|m|re|s|t|ve))?",no="(?:"+Mo+"(?:D|LL|M|RE|S|T|VE))?",Oo=us+"?",hs="["+sr+"]?",Io="(?:"+to+"(?:"+[Ro,Ti,ar].join("|")+")"+hs+Oo+")*",Pa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Be=hs+Oo+Io,Ba="(?:"+[Da,Ti,ar].join("|")+")"+Be,De="(?:"+[Ro+mo+"?",mo,Ti,ar,ss].join("|")+")",An=RegExp(Mo,"g"),No=RegExp(mo,"g"),pi=RegExp(Ys+"(?="+Ys+")|"+De+Be,"g"),Un=RegExp([vo+"?"+ls+"+"+Lo+"(?="+[as,vo,"$"].join("|")+")",Il+"+"+no+"(?="+[as,vo+Fa,"$"].join("|")+")",vo+"?"+Fa+"+"+Lo,vo+"+"+no,yo,Pa,Gs,Ba].join("|"),"g"),ja=RegExp("["+to+Ei+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 ]/,Mi=["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"],bo=-1,Yt={};Yt[Br]=Yt[Ar]=Yt[Cn]=Yt[ir]=Yt[hr]=Yt[nn]=Yt[or]=Yt[$o]=Yt[Gi]=!0,Yt[ce]=Yt[he]=Yt[gn]=Yt[Ee]=Yt[Qn]=Yt[Te]=Yt[Xe]=Yt[Ke]=Yt[ot]=Yt[gt]=Yt[Wn]=Yt[_n]=Yt[Xn]=Yt[ur]=Yt[qe]=!1;var Vt={};Vt[ce]=Vt[he]=Vt[gn]=Vt[Qn]=Vt[Ee]=Vt[Te]=Vt[Br]=Vt[Ar]=Vt[Cn]=Vt[ir]=Vt[hr]=Vt[ot]=Vt[gt]=Vt[Wn]=Vt[_n]=Vt[Xn]=Vt[ur]=Vt[Pr]=Vt[nn]=Vt[or]=Vt[$o]=Vt[Gi]=!0,Vt[Xe]=Vt[Ke]=Vt[qe]=!1;var Xt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ri={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Rn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},We=parseFloat,dn=parseInt,mt=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo,jr=typeof self=="object"&&self&&self.Object===Object&&self,sn=mt||jr||Function("return this")(),mn=e&&!e.nodeType&&e,Zn=mn&&!0&&n&&!n.nodeType&&n,Wr=Zn&&Zn.exports===mn,Li=Wr&&mt.process,Ln=function(){try{var fe=Zn&&Zn.require&&Zn.require("util").types;return fe||Li&&Li.binding&&Li.binding("util")}catch{}}(),ri=Ln&&Ln.isArrayBuffer,ds=Ln&&Ln.isDate,On=Ln&&Ln.isMap,gi=Ln&&Ln.isRegExp,mi=Ln&&Ln.isSet,Oi=Ln&&Ln.isTypedArray;function dr(fe,Ae,xe){switch(xe.length){case 0:return fe.call(Ae);case 1:return fe.call(Ae,xe[0]);case 2:return fe.call(Ae,xe[0],xe[1]);case 3:return fe.call(Ae,xe[0],xe[1],xe[2])}return fe.apply(Ae,xe)}function fr(fe,Ae,xe,ze){for(var ct=-1,At=fe==null?0:fe.length;++ct<At;){var Ht=fe[ct];Ae(ze,Ht,xe(Ht),fe)}return ze}function yr(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze&&Ae(fe[xe],xe,fe)!==!1;);return fe}function Xs(fe,Ae){for(var xe=fe==null?0:fe.length;xe--&&Ae(fe[xe],xe,fe)!==!1;);return fe}function br(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze;)if(!Ae(fe[xe],xe,fe))return!1;return!0}function Lr(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length,ct=0,At=[];++xe<ze;){var Ht=fe[xe];Ae(Ht,xe,fe)&&(At[ct++]=Ht)}return At}function vi(fe,Ae){var xe=fe==null?0:fe.length;return!!xe&&le(fe,Ae,0)>-1}function yi(fe,Ae,xe){for(var ze=-1,ct=fe==null?0:fe.length;++ze<ct;)if(xe(Ae,fe[ze]))return!0;return!1}function y(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length,ct=Array(ze);++xe<ze;)ct[xe]=Ae(fe[xe],xe,fe);return ct}function E(fe,Ae){for(var xe=-1,ze=Ae.length,ct=fe.length;++xe<ze;)fe[ct+xe]=Ae[xe];return fe}function C(fe,Ae,xe,ze){var ct=-1,At=fe==null?0:fe.length;for(ze&&At&&(xe=fe[++ct]);++ct<At;)xe=Ae(xe,fe[ct],ct,fe);return xe}function F(fe,Ae,xe,ze){var ct=fe==null?0:fe.length;for(ze&&ct&&(xe=fe[--ct]);ct--;)xe=Ae(xe,fe[ct],ct,fe);return xe}function B(fe,Ae){for(var xe=-1,ze=fe==null?0:fe.length;++xe<ze;)if(Ae(fe[xe],xe,fe))return!0;return!1}var z=be("length");function V(fe){return fe.split("")}function Y(fe){return fe.match(Ia)||[]}function Q(fe,Ae,xe){var ze;return xe(fe,function(ct,At,Ht){if(Ae(ct,At,Ht))return ze=At,!1}),ze}function re(fe,Ae,xe,ze){for(var ct=fe.length,At=xe+(ze?1:-1);ze?At--:++At<ct;)if(Ae(fe[At],At,fe))return At;return-1}function le(fe,Ae,xe){return Ae===Ae?Qe(fe,Ae,xe):re(fe,ke,xe)}function ye(fe,Ae,xe,ze){for(var ct=xe-1,At=fe.length;++ct<At;)if(ze(fe[ct],Ae))return ct;return-1}function ke(fe){return fe!==fe}function me(fe,Ae){var xe=fe==null?0:fe.length;return xe?at(fe,Ae)/xe:Z}function be(fe){return function(Ae){return Ae==null?t:Ae[fe]}}function Ne(fe){return function(Ae){return fe==null?t:fe[Ae]}}function Ie(fe,Ae,xe,ze,ct){return ct(fe,function(At,Ht,Mt){xe=ze?(ze=!1,At):Ae(xe,At,Ht,Mt)}),xe}function He(fe,Ae){var xe=fe.length;for(fe.sort(Ae);xe--;)fe[xe]=fe[xe].value;return fe}function at(fe,Ae){for(var xe,ze=-1,ct=fe.length;++ze<ct;){var At=Ae(fe[ze]);At!==t&&(xe=xe===t?At:xe+At)}return xe}function Ye(fe,Ae){for(var xe=-1,ze=Array(fe);++xe<fe;)ze[xe]=Ae(xe);return ze}function tt(fe,Ae){return y(Ae,function(xe){return[xe,fe[xe]]})}function fn(fe){return fe&&fe.slice(0,Lt(fe)+1).replace($n,"")}function lt(fe){return function(Ae){return fe(Ae)}}function yn(fe,Ae){return y(Ae,function(xe){return fe[xe]})}function bt(fe,Ae){return fe.has(Ae)}function $t(fe,Ae){for(var xe=-1,ze=fe.length;++xe<ze&&le(Ae,fe[xe],0)>-1;);return xe}function Jn(fe,Ae){for(var xe=fe.length;xe--&&le(Ae,fe[xe],0)>-1;);return xe}function pr(fe,Ae){for(var xe=fe.length,ze=0;xe--;)fe[xe]===Ae&&++ze;return ze}var bn=Ne(Xt),q=Ne(Bt);function X(fe){return"\\"+Rn[fe]}function ie(fe,Ae){return fe==null?t:fe[Ae]}function oe(fe){return ja.test(fe)}function pe(fe){return Do.test(fe)}function we(fe){for(var Ae,xe=[];!(Ae=fe.next()).done;)xe.push(Ae.value);return xe}function Me(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze,ct){xe[++Ae]=[ct,ze]}),xe}function Pe(fe,Ae){return function(xe){return fe(Ae(xe))}}function je(fe,Ae){for(var xe=-1,ze=fe.length,ct=0,At=[];++xe<ze;){var Ht=fe[xe];(Ht===Ae||Ht===o)&&(fe[xe]=o,At[ct++]=xe)}return At}function Ue(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze){xe[++Ae]=ze}),xe}function Ge(fe){var Ae=-1,xe=Array(fe.size);return fe.forEach(function(ze){xe[++Ae]=[ze,ze]}),xe}function Qe(fe,Ae,xe){for(var ze=xe-1,ct=fe.length;++ze<ct;)if(fe[ze]===Ae)return ze;return-1}function vt(fe,Ae,xe){for(var ze=xe+1;ze--;)if(fe[ze]===Ae)return ze;return ze}function It(fe){return oe(fe)?st(fe):z(fe)}function wt(fe){return oe(fe)?un(fe):V(fe)}function Lt(fe){for(var Ae=fe.length;Ae--&&Tr.test(fe.charAt(Ae)););return Ae}var ut=Ne(Ri);function st(fe){for(var Ae=pi.lastIndex=0;pi.test(fe);)++Ae;return Ae}function un(fe){return fe.match(pi)||[]}function wn(fe){return fe.match(Un)||[]}var er=function fe(Ae){Ae=Ae==null?sn:Wt.defaults(sn.Object(),Ae,Wt.pick(sn,Mi));var xe=Ae.Array,ze=Ae.Date,ct=Ae.Error,At=Ae.Function,Ht=Ae.Math,Mt=Ae.Object,zr=Ae.RegExp,Ii=Ae.String,an=Ae.TypeError,gr=xe.prototype,Fo=At.prototype,In=Mt.prototype,Qs=Ae["__core-js_shared__"],fu=Fo.toString,rn=In.hasOwnProperty,wI=0,n0=function(){var s=/[^.]+$/.exec(Qs&&Qs.keys&&Qs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pu=In.toString,xI=fu.call(Mt),kI=sn._,SI=zr("^"+fu.call(rn).replace(Er,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gu=Wr?Ae.Buffer:t,fs=Ae.Symbol,mu=Ae.Uint8Array,r0=gu?gu.allocUnsafe:t,vu=Pe(Mt.getPrototypeOf,Mt),i0=Mt.create,o0=In.propertyIsEnumerable,yu=gr.splice,s0=fs?fs.isConcatSpreadable:t,Nl=fs?fs.iterator:t,Zs=fs?fs.toStringTag:t,bu=function(){try{var s=ra(Mt,"defineProperty");return s({},"",{}),s}catch{}}(),_I=Ae.clearTimeout!==sn.clearTimeout&&Ae.clearTimeout,CI=ze&&ze.now!==sn.Date.now&&ze.now,$I=Ae.setTimeout!==sn.setTimeout&&Ae.setTimeout,wu=Ht.ceil,xu=Ht.floor,$f=Mt.getOwnPropertySymbols,AI=gu?gu.isBuffer:t,a0=Ae.isFinite,EI=gr.join,TI=Pe(Mt.keys,Mt),lr=Ht.max,Or=Ht.min,MI=ze.now,RI=Ae.parseInt,l0=Ht.random,LI=gr.reverse,Af=ra(Ae,"DataView"),Dl=ra(Ae,"Map"),Ef=ra(Ae,"Promise"),Wa=ra(Ae,"Set"),Fl=ra(Ae,"WeakMap"),Pl=ra(Mt,"create"),ku=Fl&&new Fl,za={},OI=ia(Af),II=ia(Dl),NI=ia(Ef),DI=ia(Wa),FI=ia(Fl),Su=fs?fs.prototype:t,Bl=Su?Su.valueOf:t,c0=Su?Su.toString:t;function ee(s){if(Nn(s)&&!xt(s)&&!(s instanceof jt)){if(s instanceof Ni)return s;if(rn.call(s,"__wrapped__"))return ux(s)}return new Ni(s)}var Ha=function(){function s(){}return function(v){if(!En(v))return{};if(i0)return i0(v);s.prototype=v;var M=new s;return s.prototype=t,M}}();function _u(){}function Ni(s,v){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=t}ee.templateSettings={escape:di,evaluate:Rl,interpolate:zs,variable:"",imports:{_:ee}},ee.prototype=_u.prototype,ee.prototype.constructor=ee,Ni.prototype=Ha(_u.prototype),Ni.prototype.constructor=Ni;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function PI(){var s=new jt(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 BI(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function jI(){var s=this.__wrapped__.value(),v=this.__dir__,M=xt(s),H=v<0,G=M?s.length:0,te=Z2(0,G,this.__views__),ue=te.start,de=te.end,ve=de-ue,Le=H?de:ue-1,Oe=this.__iteratees__,Fe=Oe.length,Ve=0,rt=Or(ve,this.__takeCount__);if(!M||!H&&G==ve&&rt==ve)return O0(s,this.__actions__);var ft=[];e:for(;ve--&&Ve<rt;){Le+=v;for(var Rt=-1,pt=s[Le];++Rt<Fe;){var Nt=Oe[Rt],zt=Nt.iteratee,xi=Nt.type,qr=zt(pt);if(xi==_)pt=qr;else if(!qr){if(xi==A)continue e;break e}}ft[Ve++]=pt}return ft}jt.prototype=Ha(_u.prototype),jt.prototype.constructor=jt;function Js(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function WI(){this.__data__=Pl?Pl(null):{},this.size=0}function zI(s){var v=this.has(s)&&delete this.__data__[s];return this.size-=v?1:0,v}function HI(s){var v=this.__data__;if(Pl){var M=v[s];return M===p?t:M}return rn.call(v,s)?v[s]:t}function UI(s){var v=this.__data__;return Pl?v[s]!==t:rn.call(v,s)}function qI(s,v){var M=this.__data__;return this.size+=this.has(s)?0:1,M[s]=Pl&&v===t?p:v,this}Js.prototype.clear=WI,Js.prototype.delete=zI,Js.prototype.get=HI,Js.prototype.has=UI,Js.prototype.set=qI;function Po(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function VI(){this.__data__=[],this.size=0}function KI(s){var v=this.__data__,M=Cu(v,s);if(M<0)return!1;var H=v.length-1;return M==H?v.pop():yu.call(v,M,1),--this.size,!0}function GI(s){var v=this.__data__,M=Cu(v,s);return M<0?t:v[M][1]}function YI(s){return Cu(this.__data__,s)>-1}function XI(s,v){var M=this.__data__,H=Cu(M,s);return H<0?(++this.size,M.push([s,v])):M[H][1]=v,this}Po.prototype.clear=VI,Po.prototype.delete=KI,Po.prototype.get=GI,Po.prototype.has=YI,Po.prototype.set=XI;function Bo(s){var v=-1,M=s==null?0:s.length;for(this.clear();++v<M;){var H=s[v];this.set(H[0],H[1])}}function QI(){this.size=0,this.__data__={hash:new Js,map:new(Dl||Po),string:new Js}}function ZI(s){var v=Fu(this,s).delete(s);return this.size-=v?1:0,v}function JI(s){return Fu(this,s).get(s)}function e2(s){return Fu(this,s).has(s)}function t2(s,v){var M=Fu(this,s),H=M.size;return M.set(s,v),this.size+=M.size==H?0:1,this}Bo.prototype.clear=QI,Bo.prototype.delete=ZI,Bo.prototype.get=JI,Bo.prototype.has=e2,Bo.prototype.set=t2;function ea(s){var v=-1,M=s==null?0:s.length;for(this.__data__=new Bo;++v<M;)this.add(s[v])}function n2(s){return this.__data__.set(s,p),this}function r2(s){return this.__data__.has(s)}ea.prototype.add=ea.prototype.push=n2,ea.prototype.has=r2;function ro(s){var v=this.__data__=new Po(s);this.size=v.size}function i2(){this.__data__=new Po,this.size=0}function o2(s){var v=this.__data__,M=v.delete(s);return this.size=v.size,M}function s2(s){return this.__data__.get(s)}function a2(s){return this.__data__.has(s)}function l2(s,v){var M=this.__data__;if(M instanceof Po){var H=M.__data__;if(!Dl||H.length<l-1)return H.push([s,v]),this.size=++M.size,this;M=this.__data__=new Bo(H)}return M.set(s,v),this.size=M.size,this}ro.prototype.clear=i2,ro.prototype.delete=o2,ro.prototype.get=s2,ro.prototype.has=a2,ro.prototype.set=l2;function u0(s,v){var M=xt(s),H=!M&&oa(s),G=!M&&!H&&ys(s),te=!M&&!H&&!G&&Ka(s),ue=M||H||G||te,de=ue?Ye(s.length,Ii):[],ve=de.length;for(var Le in s)(v||rn.call(s,Le))&&!(ue&&(Le=="length"||G&&(Le=="offset"||Le=="parent")||te&&(Le=="buffer"||Le=="byteLength"||Le=="byteOffset")||Ho(Le,ve)))&&de.push(Le);return de}function h0(s){var v=s.length;return v?s[Bf(0,v-1)]:t}function c2(s,v){return Pu(ii(s),ta(v,0,s.length))}function u2(s){return Pu(ii(s))}function Tf(s,v,M){(M!==t&&!io(s[v],M)||M===t&&!(v in s))&&jo(s,v,M)}function jl(s,v,M){var H=s[v];(!(rn.call(s,v)&&io(H,M))||M===t&&!(v in s))&&jo(s,v,M)}function Cu(s,v){for(var M=s.length;M--;)if(io(s[M][0],v))return M;return-1}function h2(s,v,M,H){return ps(s,function(G,te,ue){v(H,G,M(G),ue)}),H}function d0(s,v){return s&&xo(v,mr(v),s)}function d2(s,v){return s&&xo(v,si(v),s)}function jo(s,v,M){v=="__proto__"&&bu?bu(s,v,{configurable:!0,enumerable:!0,value:M,writable:!0}):s[v]=M}function Mf(s,v){for(var M=-1,H=v.length,G=xe(H),te=s==null;++M<H;)G[M]=te?t:up(s,v[M]);return G}function ta(s,v,M){return s===s&&(M!==t&&(s=s<=M?s:M),v!==t&&(s=s>=v?s:v)),s}function Di(s,v,M,H,G,te){var ue,de=v&c,ve=v&f,Le=v&h;if(M&&(ue=G?M(s,H,G,te):M(s)),ue!==t)return ue;if(!En(s))return s;var Oe=xt(s);if(Oe){if(ue=eN(s),!de)return ii(s,ue)}else{var Fe=Ir(s),Ve=Fe==Ke||Fe==dt;if(ys(s))return D0(s,de);if(Fe==Wn||Fe==ce||Ve&&!G){if(ue=ve||Ve?{}:tx(s),!de)return ve?H2(s,d2(ue,s)):z2(s,d0(ue,s))}else{if(!Vt[Fe])return G?s:{};ue=tN(s,Fe,de)}}te||(te=new ro);var rt=te.get(s);if(rt)return rt;te.set(s,ue),Mx(s)?s.forEach(function(pt){ue.add(Di(pt,v,M,pt,s,te))}):Ex(s)&&s.forEach(function(pt,Nt){ue.set(Nt,Di(pt,v,M,Nt,s,te))});var ft=Le?ve?Xf:Yf:ve?si:mr,Rt=Oe?t:ft(s);return yr(Rt||s,function(pt,Nt){Rt&&(Nt=pt,pt=s[Nt]),jl(ue,Nt,Di(pt,v,M,Nt,s,te))}),ue}function f2(s){var v=mr(s);return function(M){return f0(M,s,v)}}function f0(s,v,M){var H=M.length;if(s==null)return!H;for(s=Mt(s);H--;){var G=M[H],te=v[G],ue=s[G];if(ue===t&&!(G in s)||!te(ue))return!1}return!0}function p0(s,v,M){if(typeof s!="function")throw new an(u);return Kl(function(){s.apply(t,M)},v)}function Wl(s,v,M,H){var G=-1,te=vi,ue=!0,de=s.length,ve=[],Le=v.length;if(!de)return ve;M&&(v=y(v,lt(M))),H?(te=yi,ue=!1):v.length>=l&&(te=bt,ue=!1,v=new ea(v));e:for(;++G<de;){var Oe=s[G],Fe=M==null?Oe:M(Oe);if(Oe=H||Oe!==0?Oe:0,ue&&Fe===Fe){for(var Ve=Le;Ve--;)if(v[Ve]===Fe)continue e;ve.push(Oe)}else te(v,Fe,H)||ve.push(Oe)}return ve}var ps=W0(wo),g0=W0(Lf,!0);function p2(s,v){var M=!0;return ps(s,function(H,G,te){return M=!!v(H,G,te),M}),M}function $u(s,v,M){for(var H=-1,G=s.length;++H<G;){var te=s[H],ue=v(te);if(ue!=null&&(de===t?ue===ue&&!wi(ue):M(ue,de)))var de=ue,ve=te}return ve}function g2(s,v,M,H){var G=s.length;for(M=Et(M),M<0&&(M=-M>G?0:G+M),H=H===t||H>G?G:Et(H),H<0&&(H+=G),H=M>H?0:Lx(H);M<H;)s[M++]=v;return s}function m0(s,v){var M=[];return ps(s,function(H,G,te){v(H,G,te)&&M.push(H)}),M}function wr(s,v,M,H,G){var te=-1,ue=s.length;for(M||(M=rN),G||(G=[]);++te<ue;){var de=s[te];v>0&&M(de)?v>1?wr(de,v-1,M,H,G):E(G,de):H||(G[G.length]=de)}return G}var Rf=z0(),v0=z0(!0);function wo(s,v){return s&&Rf(s,v,mr)}function Lf(s,v){return s&&v0(s,v,mr)}function Au(s,v){return Lr(v,function(M){return Uo(s[M])})}function na(s,v){v=ms(v,s);for(var M=0,H=v.length;s!=null&&M<H;)s=s[ko(v[M++])];return M&&M==H?s:t}function y0(s,v,M){var H=v(s);return xt(s)?H:E(H,M(s))}function Hr(s){return s==null?s===t?yt:tn:Zs&&Zs in Mt(s)?Q2(s):uN(s)}function Of(s,v){return s>v}function m2(s,v){return s!=null&&rn.call(s,v)}function v2(s,v){return s!=null&&v in Mt(s)}function y2(s,v,M){return s>=Or(v,M)&&s<lr(v,M)}function If(s,v,M){for(var H=M?yi:vi,G=s[0].length,te=s.length,ue=te,de=xe(te),ve=1/0,Le=[];ue--;){var Oe=s[ue];ue&&v&&(Oe=y(Oe,lt(v))),ve=Or(Oe.length,ve),de[ue]=!M&&(v||G>=120&&Oe.length>=120)?new ea(ue&&Oe):t}Oe=s[0];var Fe=-1,Ve=de[0];e:for(;++Fe<G&&Le.length<ve;){var rt=Oe[Fe],ft=v?v(rt):rt;if(rt=M||rt!==0?rt:0,!(Ve?bt(Ve,ft):H(Le,ft,M))){for(ue=te;--ue;){var Rt=de[ue];if(!(Rt?bt(Rt,ft):H(s[ue],ft,M)))continue e}Ve&&Ve.push(ft),Le.push(rt)}}return Le}function b2(s,v,M,H){return wo(s,function(G,te,ue){v(H,M(G),te,ue)}),H}function zl(s,v,M){v=ms(v,s),s=ox(s,v);var H=s==null?s:s[ko(Pi(v))];return H==null?t:dr(H,s,M)}function b0(s){return Nn(s)&&Hr(s)==ce}function w2(s){return Nn(s)&&Hr(s)==gn}function x2(s){return Nn(s)&&Hr(s)==Te}function Hl(s,v,M,H,G){return s===v?!0:s==null||v==null||!Nn(s)&&!Nn(v)?s!==s&&v!==v:k2(s,v,M,H,Hl,G)}function k2(s,v,M,H,G,te){var ue=xt(s),de=xt(v),ve=ue?he:Ir(s),Le=de?he:Ir(v);ve=ve==ce?Wn:ve,Le=Le==ce?Wn:Le;var Oe=ve==Wn,Fe=Le==Wn,Ve=ve==Le;if(Ve&&ys(s)){if(!ys(v))return!1;ue=!0,Oe=!1}if(Ve&&!Oe)return te||(te=new ro),ue||Ka(s)?Z0(s,v,M,H,G,te):Y2(s,v,ve,M,H,G,te);if(!(M&i)){var rt=Oe&&rn.call(s,"__wrapped__"),ft=Fe&&rn.call(v,"__wrapped__");if(rt||ft){var Rt=rt?s.value():s,pt=ft?v.value():v;return te||(te=new ro),G(Rt,pt,M,H,te)}}return Ve?(te||(te=new ro),X2(s,v,M,H,G,te)):!1}function S2(s){return Nn(s)&&Ir(s)==ot}function Nf(s,v,M,H){var G=M.length,te=G,ue=!H;if(s==null)return!te;for(s=Mt(s);G--;){var de=M[G];if(ue&&de[2]?de[1]!==s[de[0]]:!(de[0]in s))return!1}for(;++G<te;){de=M[G];var ve=de[0],Le=s[ve],Oe=de[1];if(ue&&de[2]){if(Le===t&&!(ve in s))return!1}else{var Fe=new ro;if(H)var Ve=H(Le,Oe,ve,s,v,Fe);if(!(Ve===t?Hl(Oe,Le,i|a,H,Fe):Ve))return!1}}return!0}function w0(s){if(!En(s)||oN(s))return!1;var v=Uo(s)?SI:Mr;return v.test(ia(s))}function _2(s){return Nn(s)&&Hr(s)==_n}function C2(s){return Nn(s)&&Ir(s)==Xn}function $2(s){return Nn(s)&&Uu(s.length)&&!!Yt[Hr(s)]}function x0(s){return typeof s=="function"?s:s==null?ai:typeof s=="object"?xt(s)?_0(s[0],s[1]):S0(s):Hx(s)}function Df(s){if(!Vl(s))return TI(s);var v=[];for(var M in Mt(s))rn.call(s,M)&&M!="constructor"&&v.push(M);return v}function A2(s){if(!En(s))return cN(s);var v=Vl(s),M=[];for(var H in s)H=="constructor"&&(v||!rn.call(s,H))||M.push(H);return M}function Ff(s,v){return s<v}function k0(s,v){var M=-1,H=oi(s)?xe(s.length):[];return ps(s,function(G,te,ue){H[++M]=v(G,te,ue)}),H}function S0(s){var v=Zf(s);return v.length==1&&v[0][2]?rx(v[0][0],v[0][1]):function(M){return M===s||Nf(M,s,v)}}function _0(s,v){return ep(s)&&nx(v)?rx(ko(s),v):function(M){var H=up(M,s);return H===t&&H===v?hp(M,s):Hl(v,H,i|a)}}function Eu(s,v,M,H,G){s!==v&&Rf(v,function(te,ue){if(G||(G=new ro),En(te))E2(s,v,ue,M,Eu,H,G);else{var de=H?H(np(s,ue),te,ue+"",s,v,G):t;de===t&&(de=te),Tf(s,ue,de)}},si)}function E2(s,v,M,H,G,te,ue){var de=np(s,M),ve=np(v,M),Le=ue.get(ve);if(Le){Tf(s,M,Le);return}var Oe=te?te(de,ve,M+"",s,v,ue):t,Fe=Oe===t;if(Fe){var Ve=xt(ve),rt=!Ve&&ys(ve),ft=!Ve&&!rt&&Ka(ve);Oe=ve,Ve||rt||ft?xt(de)?Oe=de:qn(de)?Oe=ii(de):rt?(Fe=!1,Oe=D0(ve,!0)):ft?(Fe=!1,Oe=F0(ve,!0)):Oe=[]:Gl(ve)||oa(ve)?(Oe=de,oa(de)?Oe=Ox(de):(!En(de)||Uo(de))&&(Oe=tx(ve))):Fe=!1}Fe&&(ue.set(ve,Oe),G(Oe,ve,H,te,ue),ue.delete(ve)),Tf(s,M,Oe)}function C0(s,v){var M=s.length;if(M)return v+=v<0?M:0,Ho(v,M)?s[v]:t}function $0(s,v,M){v.length?v=y(v,function(te){return xt(te)?function(ue){return na(ue,te.length===1?te[0]:te)}:te}):v=[ai];var H=-1;v=y(v,lt(ht()));var G=k0(s,function(te,ue,de){var ve=y(v,function(Le){return Le(te)});return{criteria:ve,index:++H,value:te}});return He(G,function(te,ue){return W2(te,ue,M)})}function T2(s,v){return A0(s,v,function(M,H){return hp(s,H)})}function A0(s,v,M){for(var H=-1,G=v.length,te={};++H<G;){var ue=v[H],de=na(s,ue);M(de,ue)&&Ul(te,ms(ue,s),de)}return te}function M2(s){return function(v){return na(v,s)}}function Pf(s,v,M,H){var G=H?ye:le,te=-1,ue=v.length,de=s;for(s===v&&(v=ii(v)),M&&(de=y(s,lt(M)));++te<ue;)for(var ve=0,Le=v[te],Oe=M?M(Le):Le;(ve=G(de,Oe,ve,H))>-1;)de!==s&&yu.call(de,ve,1),yu.call(s,ve,1);return s}function E0(s,v){for(var M=s?v.length:0,H=M-1;M--;){var G=v[M];if(M==H||G!==te){var te=G;Ho(G)?yu.call(s,G,1):zf(s,G)}}return s}function Bf(s,v){return s+xu(l0()*(v-s+1))}function R2(s,v,M,H){for(var G=-1,te=lr(wu((v-s)/(M||1)),0),ue=xe(te);te--;)ue[H?te:++G]=s,s+=M;return ue}function jf(s,v){var M="";if(!s||v<1||v>U)return M;do v%2&&(M+=s),v=xu(v/2),v&&(s+=s);while(v);return M}function Ot(s,v){return rp(ix(s,v,ai),s+"")}function L2(s){return h0(Ga(s))}function O2(s,v){var M=Ga(s);return Pu(M,ta(v,0,M.length))}function Ul(s,v,M,H){if(!En(s))return s;v=ms(v,s);for(var G=-1,te=v.length,ue=te-1,de=s;de!=null&&++G<te;){var ve=ko(v[G]),Le=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return s;if(G!=ue){var Oe=de[ve];Le=H?H(Oe,ve,de):t,Le===t&&(Le=En(Oe)?Oe:Ho(v[G+1])?[]:{})}jl(de,ve,Le),de=de[ve]}return s}var T0=ku?function(s,v){return ku.set(s,v),s}:ai,I2=bu?function(s,v){return bu(s,"toString",{configurable:!0,enumerable:!1,value:fp(v),writable:!0})}:ai;function N2(s){return Pu(Ga(s))}function Fi(s,v,M){var H=-1,G=s.length;v<0&&(v=-v>G?0:G+v),M=M>G?G:M,M<0&&(M+=G),G=v>M?0:M-v>>>0,v>>>=0;for(var te=xe(G);++H<G;)te[H]=s[H+v];return te}function D2(s,v){var M;return ps(s,function(H,G,te){return M=v(H,G,te),!M}),!!M}function Tu(s,v,M){var H=0,G=s==null?H:s.length;if(typeof v=="number"&&v===v&&G<=ne){for(;H<G;){var te=H+G>>>1,ue=s[te];ue!==null&&!wi(ue)&&(M?ue<=v:ue<v)?H=te+1:G=te}return G}return Wf(s,v,ai,M)}function Wf(s,v,M,H){var G=0,te=s==null?0:s.length;if(te===0)return 0;v=M(v);for(var ue=v!==v,de=v===null,ve=wi(v),Le=v===t;G<te;){var Oe=xu((G+te)/2),Fe=M(s[Oe]),Ve=Fe!==t,rt=Fe===null,ft=Fe===Fe,Rt=wi(Fe);if(ue)var pt=H||ft;else Le?pt=ft&&(H||Ve):de?pt=ft&&Ve&&(H||!rt):ve?pt=ft&&Ve&&!rt&&(H||!Rt):rt||Rt?pt=!1:pt=H?Fe<=v:Fe<v;pt?G=Oe+1:te=Oe}return Or(te,ae)}function M0(s,v){for(var M=-1,H=s.length,G=0,te=[];++M<H;){var ue=s[M],de=v?v(ue):ue;if(!M||!io(de,ve)){var ve=de;te[G++]=ue===0?0:ue}}return te}function R0(s){return typeof s=="number"?s:wi(s)?Z:+s}function bi(s){if(typeof s=="string")return s;if(xt(s))return y(s,bi)+"";if(wi(s))return c0?c0.call(s):"";var v=s+"";return v=="0"&&1/s==-j?"-0":v}function gs(s,v,M){var H=-1,G=vi,te=s.length,ue=!0,de=[],ve=de;if(M)ue=!1,G=yi;else if(te>=l){var Le=v?null:K2(s);if(Le)return Ue(Le);ue=!1,G=bt,ve=new ea}else ve=v?[]:de;e:for(;++H<te;){var Oe=s[H],Fe=v?v(Oe):Oe;if(Oe=M||Oe!==0?Oe:0,ue&&Fe===Fe){for(var Ve=ve.length;Ve--;)if(ve[Ve]===Fe)continue e;v&&ve.push(Fe),de.push(Oe)}else G(ve,Fe,M)||(ve!==de&&ve.push(Fe),de.push(Oe))}return de}function zf(s,v){return v=ms(v,s),s=ox(s,v),s==null||delete s[ko(Pi(v))]}function L0(s,v,M,H){return Ul(s,v,M(na(s,v)),H)}function Mu(s,v,M,H){for(var G=s.length,te=H?G:-1;(H?te--:++te<G)&&v(s[te],te,s););return M?Fi(s,H?0:te,H?te+1:G):Fi(s,H?te+1:0,H?G:te)}function O0(s,v){var M=s;return M instanceof jt&&(M=M.value()),C(v,function(H,G){return G.func.apply(G.thisArg,E([H],G.args))},M)}function Hf(s,v,M){var H=s.length;if(H<2)return H?gs(s[0]):[];for(var G=-1,te=xe(H);++G<H;)for(var ue=s[G],de=-1;++de<H;)de!=G&&(te[G]=Wl(te[G]||ue,s[de],v,M));return gs(wr(te,1),v,M)}function I0(s,v,M){for(var H=-1,G=s.length,te=v.length,ue={};++H<G;){var de=H<te?v[H]:t;M(ue,s[H],de)}return ue}function Uf(s){return qn(s)?s:[]}function qf(s){return typeof s=="function"?s:ai}function ms(s,v){return xt(s)?s:ep(s,v)?[s]:cx(Jt(s))}var F2=Ot;function vs(s,v,M){var H=s.length;return M=M===t?H:M,!v&&M>=H?s:Fi(s,v,M)}var N0=_I||function(s){return sn.clearTimeout(s)};function D0(s,v){if(v)return s.slice();var M=s.length,H=r0?r0(M):new s.constructor(M);return s.copy(H),H}function Vf(s){var v=new s.constructor(s.byteLength);return new mu(v).set(new mu(s)),v}function P2(s,v){var M=v?Vf(s.buffer):s.buffer;return new s.constructor(M,s.byteOffset,s.byteLength)}function B2(s){var v=new s.constructor(s.source,fi.exec(s));return v.lastIndex=s.lastIndex,v}function j2(s){return Bl?Mt(Bl.call(s)):{}}function F0(s,v){var M=v?Vf(s.buffer):s.buffer;return new s.constructor(M,s.byteOffset,s.length)}function P0(s,v){if(s!==v){var M=s!==t,H=s===null,G=s===s,te=wi(s),ue=v!==t,de=v===null,ve=v===v,Le=wi(v);if(!de&&!Le&&!te&&s>v||te&&ue&&ve&&!de&&!Le||H&&ue&&ve||!M&&ve||!G)return 1;if(!H&&!te&&!Le&&s<v||Le&&M&&G&&!H&&!te||de&&M&&G||!ue&&G||!ve)return-1}return 0}function W2(s,v,M){for(var H=-1,G=s.criteria,te=v.criteria,ue=G.length,de=M.length;++H<ue;){var ve=P0(G[H],te[H]);if(ve){if(H>=de)return ve;var Le=M[H];return ve*(Le=="desc"?-1:1)}}return s.index-v.index}function B0(s,v,M,H){for(var G=-1,te=s.length,ue=M.length,de=-1,ve=v.length,Le=lr(te-ue,0),Oe=xe(ve+Le),Fe=!H;++de<ve;)Oe[de]=v[de];for(;++G<ue;)(Fe||G<te)&&(Oe[M[G]]=s[G]);for(;Le--;)Oe[de++]=s[G++];return Oe}function j0(s,v,M,H){for(var G=-1,te=s.length,ue=-1,de=M.length,ve=-1,Le=v.length,Oe=lr(te-de,0),Fe=xe(Oe+Le),Ve=!H;++G<Oe;)Fe[G]=s[G];for(var rt=G;++ve<Le;)Fe[rt+ve]=v[ve];for(;++ue<de;)(Ve||G<te)&&(Fe[rt+M[ue]]=s[G++]);return Fe}function ii(s,v){var M=-1,H=s.length;for(v||(v=xe(H));++M<H;)v[M]=s[M];return v}function xo(s,v,M,H){var G=!M;M||(M={});for(var te=-1,ue=v.length;++te<ue;){var de=v[te],ve=H?H(M[de],s[de],de,M,s):t;ve===t&&(ve=s[de]),G?jo(M,de,ve):jl(M,de,ve)}return M}function z2(s,v){return xo(s,Jf(s),v)}function H2(s,v){return xo(s,J0(s),v)}function Ru(s,v){return function(M,H){var G=xt(M)?fr:h2,te=v?v():{};return G(M,s,ht(H,2),te)}}function Ua(s){return Ot(function(v,M){var H=-1,G=M.length,te=G>1?M[G-1]:t,ue=G>2?M[2]:t;for(te=s.length>3&&typeof te=="function"?(G--,te):t,ue&&Ur(M[0],M[1],ue)&&(te=G<3?t:te,G=1),v=Mt(v);++H<G;){var de=M[H];de&&s(v,de,H,te)}return v})}function W0(s,v){return function(M,H){if(M==null)return M;if(!oi(M))return s(M,H);for(var G=M.length,te=v?G:-1,ue=Mt(M);(v?te--:++te<G)&&H(ue[te],te,ue)!==!1;);return M}}function z0(s){return function(v,M,H){for(var G=-1,te=Mt(v),ue=H(v),de=ue.length;de--;){var ve=ue[s?de:++G];if(M(te[ve],ve,te)===!1)break}return v}}function U2(s,v,M){var H=v&m,G=ql(s);function te(){var ue=this&&this!==sn&&this instanceof te?G:s;return ue.apply(H?M:this,arguments)}return te}function H0(s){return function(v){v=Jt(v);var M=oe(v)?wt(v):t,H=M?M[0]:v.charAt(0),G=M?vs(M,1).join(""):v.slice(1);return H[s]()+G}}function qa(s){return function(v){return C(Wx(jx(v).replace(An,"")),s,"")}}function ql(s){return function(){var v=arguments;switch(v.length){case 0:return new s;case 1:return new s(v[0]);case 2:return new s(v[0],v[1]);case 3:return new s(v[0],v[1],v[2]);case 4:return new s(v[0],v[1],v[2],v[3]);case 5:return new s(v[0],v[1],v[2],v[3],v[4]);case 6:return new s(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new s(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var M=Ha(s.prototype),H=s.apply(M,v);return En(H)?H:M}}function q2(s,v,M){var H=ql(s);function G(){for(var te=arguments.length,ue=xe(te),de=te,ve=Va(G);de--;)ue[de]=arguments[de];var Le=te<3&&ue[0]!==ve&&ue[te-1]!==ve?[]:je(ue,ve);if(te-=Le.length,te<M)return G0(s,v,Lu,G.placeholder,t,ue,Le,t,t,M-te);var Oe=this&&this!==sn&&this instanceof G?H:s;return dr(Oe,this,ue)}return G}function U0(s){return function(v,M,H){var G=Mt(v);if(!oi(v)){var te=ht(M,3);v=mr(v),M=function(de){return te(G[de],de,G)}}var ue=s(v,M,H);return ue>-1?G[te?v[ue]:ue]:t}}function q0(s){return zo(function(v){var M=v.length,H=M,G=Ni.prototype.thru;for(s&&v.reverse();H--;){var te=v[H];if(typeof te!="function")throw new an(u);if(G&&!ue&&Du(te)=="wrapper")var ue=new Ni([],!0)}for(H=ue?H:M;++H<M;){te=v[H];var de=Du(te),ve=de=="wrapper"?Qf(te):t;ve&&tp(ve[0])&&ve[1]==(L|T|S|N)&&!ve[4].length&&ve[9]==1?ue=ue[Du(ve[0])].apply(ue,ve[3]):ue=te.length==1&&tp(te)?ue[de]():ue.thru(te)}return function(){var Le=arguments,Oe=Le[0];if(ue&&Le.length==1&&xt(Oe))return ue.plant(Oe).value();for(var Fe=0,Ve=M?v[Fe].apply(this,Le):Oe;++Fe<M;)Ve=v[Fe].call(this,Ve);return Ve}})}function Lu(s,v,M,H,G,te,ue,de,ve,Le){var Oe=v&L,Fe=v&m,Ve=v&w,rt=v&(T|$),ft=v&R,Rt=Ve?t:ql(s);function pt(){for(var Nt=arguments.length,zt=xe(Nt),xi=Nt;xi--;)zt[xi]=arguments[xi];if(rt)var qr=Va(pt),ki=pr(zt,qr);if(H&&(zt=B0(zt,H,G,rt)),te&&(zt=j0(zt,te,ue,rt)),Nt-=ki,rt&&Nt<Le){var Vn=je(zt,qr);return G0(s,v,Lu,pt.placeholder,M,zt,Vn,de,ve,Le-Nt)}var oo=Fe?M:this,Vo=Ve?oo[s]:s;return Nt=zt.length,de?zt=hN(zt,de):ft&&Nt>1&&zt.reverse(),Oe&&ve<Nt&&(zt.length=ve),this&&this!==sn&&this instanceof pt&&(Vo=Rt||ql(Vo)),Vo.apply(oo,zt)}return pt}function V0(s,v){return function(M,H){return b2(M,s,v(H),{})}}function Ou(s,v){return function(M,H){var G;if(M===t&&H===t)return v;if(M!==t&&(G=M),H!==t){if(G===t)return H;typeof M=="string"||typeof H=="string"?(M=bi(M),H=bi(H)):(M=R0(M),H=R0(H)),G=s(M,H)}return G}}function Kf(s){return zo(function(v){return v=y(v,lt(ht())),Ot(function(M){var H=this;return s(v,function(G){return dr(G,H,M)})})})}function Iu(s,v){v=v===t?" ":bi(v);var M=v.length;if(M<2)return M?jf(v,s):v;var H=jf(v,wu(s/It(v)));return oe(v)?vs(wt(H),0,s).join(""):H.slice(0,s)}function V2(s,v,M,H){var G=v&m,te=ql(s);function ue(){for(var de=-1,ve=arguments.length,Le=-1,Oe=H.length,Fe=xe(Oe+ve),Ve=this&&this!==sn&&this instanceof ue?te:s;++Le<Oe;)Fe[Le]=H[Le];for(;ve--;)Fe[Le++]=arguments[++de];return dr(Ve,G?M:this,Fe)}return ue}function K0(s){return function(v,M,H){return H&&typeof H!="number"&&Ur(v,M,H)&&(M=H=t),v=qo(v),M===t?(M=v,v=0):M=qo(M),H=H===t?v<M?1:-1:qo(H),R2(v,M,H,s)}}function Nu(s){return function(v,M){return typeof v=="string"&&typeof M=="string"||(v=Bi(v),M=Bi(M)),s(v,M)}}function G0(s,v,M,H,G,te,ue,de,ve,Le){var Oe=v&T,Fe=Oe?ue:t,Ve=Oe?t:ue,rt=Oe?te:t,ft=Oe?t:te;v|=Oe?S:k,v&=~(Oe?k:S),v&x||(v&=-4);var Rt=[s,v,G,rt,Fe,ft,Ve,de,ve,Le],pt=M.apply(t,Rt);return tp(s)&&sx(pt,Rt),pt.placeholder=H,ax(pt,s,v)}function Gf(s){var v=Ht[s];return function(M,H){if(M=Bi(M),H=H==null?0:Or(Et(H),292),H&&a0(M)){var G=(Jt(M)+"e").split("e"),te=v(G[0]+"e"+(+G[1]+H));return G=(Jt(te)+"e").split("e"),+(G[0]+"e"+(+G[1]-H))}return v(M)}}var K2=Wa&&1/Ue(new Wa([,-0]))[1]==j?function(s){return new Wa(s)}:mp;function Y0(s){return function(v){var M=Ir(v);return M==ot?Me(v):M==Xn?Ge(v):tt(v,s(v))}}function Wo(s,v,M,H,G,te,ue,de){var ve=v&w;if(!ve&&typeof s!="function")throw new an(u);var Le=H?H.length:0;if(Le||(v&=-97,H=G=t),ue=ue===t?ue:lr(Et(ue),0),de=de===t?de:Et(de),Le-=G?G.length:0,v&k){var Oe=H,Fe=G;H=G=t}var Ve=ve?t:Qf(s),rt=[s,v,M,H,G,Oe,Fe,te,ue,de];if(Ve&&lN(rt,Ve),s=rt[0],v=rt[1],M=rt[2],H=rt[3],G=rt[4],de=rt[9]=rt[9]===t?ve?0:s.length:lr(rt[9]-Le,0),!de&&v&(T|$)&&(v&=-25),!v||v==m)var ft=U2(s,v,M);else v==T||v==$?ft=q2(s,v,de):(v==S||v==(m|S))&&!G.length?ft=V2(s,v,M,H):ft=Lu.apply(t,rt);var Rt=Ve?T0:sx;return ax(Rt(ft,rt),s,v)}function X0(s,v,M,H){return s===t||io(s,In[M])&&!rn.call(H,M)?v:s}function Q0(s,v,M,H,G,te){return En(s)&&En(v)&&(te.set(v,s),Eu(s,v,t,Q0,te),te.delete(v)),s}function G2(s){return Gl(s)?t:s}function Z0(s,v,M,H,G,te){var ue=M&i,de=s.length,ve=v.length;if(de!=ve&&!(ue&&ve>de))return!1;var Le=te.get(s),Oe=te.get(v);if(Le&&Oe)return Le==v&&Oe==s;var Fe=-1,Ve=!0,rt=M&a?new ea:t;for(te.set(s,v),te.set(v,s);++Fe<de;){var ft=s[Fe],Rt=v[Fe];if(H)var pt=ue?H(Rt,ft,Fe,v,s,te):H(ft,Rt,Fe,s,v,te);if(pt!==t){if(pt)continue;Ve=!1;break}if(rt){if(!B(v,function(Nt,zt){if(!bt(rt,zt)&&(ft===Nt||G(ft,Nt,M,H,te)))return rt.push(zt)})){Ve=!1;break}}else if(!(ft===Rt||G(ft,Rt,M,H,te))){Ve=!1;break}}return te.delete(s),te.delete(v),Ve}function Y2(s,v,M,H,G,te,ue){switch(M){case Qn:if(s.byteLength!=v.byteLength||s.byteOffset!=v.byteOffset)return!1;s=s.buffer,v=v.buffer;case gn:return!(s.byteLength!=v.byteLength||!te(new mu(s),new mu(v)));case Ee:case Te:case gt:return io(+s,+v);case Xe:return s.name==v.name&&s.message==v.message;case _n:case ur:return s==v+"";case ot:var de=Me;case Xn:var ve=H&i;if(de||(de=Ue),s.size!=v.size&&!ve)return!1;var Le=ue.get(s);if(Le)return Le==v;H|=a,ue.set(s,v);var Oe=Z0(de(s),de(v),H,G,te,ue);return ue.delete(s),Oe;case Pr:if(Bl)return Bl.call(s)==Bl.call(v)}return!1}function X2(s,v,M,H,G,te){var ue=M&i,de=Yf(s),ve=de.length,Le=Yf(v),Oe=Le.length;if(ve!=Oe&&!ue)return!1;for(var Fe=ve;Fe--;){var Ve=de[Fe];if(!(ue?Ve in v:rn.call(v,Ve)))return!1}var rt=te.get(s),ft=te.get(v);if(rt&&ft)return rt==v&&ft==s;var Rt=!0;te.set(s,v),te.set(v,s);for(var pt=ue;++Fe<ve;){Ve=de[Fe];var Nt=s[Ve],zt=v[Ve];if(H)var xi=ue?H(zt,Nt,Ve,v,s,te):H(Nt,zt,Ve,s,v,te);if(!(xi===t?Nt===zt||G(Nt,zt,M,H,te):xi)){Rt=!1;break}pt||(pt=Ve=="constructor")}if(Rt&&!pt){var qr=s.constructor,ki=v.constructor;qr!=ki&&"constructor"in s&&"constructor"in v&&!(typeof qr=="function"&&qr instanceof qr&&typeof ki=="function"&&ki instanceof ki)&&(Rt=!1)}return te.delete(s),te.delete(v),Rt}function zo(s){return rp(ix(s,t,fx),s+"")}function Yf(s){return y0(s,mr,Jf)}function Xf(s){return y0(s,si,J0)}var Qf=ku?function(s){return ku.get(s)}:mp;function Du(s){for(var v=s.name+"",M=za[v],H=rn.call(za,v)?M.length:0;H--;){var G=M[H],te=G.func;if(te==null||te==s)return G.name}return v}function Va(s){var v=rn.call(ee,"placeholder")?ee:s;return v.placeholder}function ht(){var s=ee.iteratee||pp;return s=s===pp?x0:s,arguments.length?s(arguments[0],arguments[1]):s}function Fu(s,v){var M=s.__data__;return iN(v)?M[typeof v=="string"?"string":"hash"]:M.map}function Zf(s){for(var v=mr(s),M=v.length;M--;){var H=v[M],G=s[H];v[M]=[H,G,nx(G)]}return v}function ra(s,v){var M=ie(s,v);return w0(M)?M:t}function Q2(s){var v=rn.call(s,Zs),M=s[Zs];try{s[Zs]=t;var H=!0}catch{}var G=pu.call(s);return H&&(v?s[Zs]=M:delete s[Zs]),G}var Jf=$f?function(s){return s==null?[]:(s=Mt(s),Lr($f(s),function(v){return o0.call(s,v)}))}:vp,J0=$f?function(s){for(var v=[];s;)E(v,Jf(s)),s=vu(s);return v}:vp,Ir=Hr;(Af&&Ir(new Af(new ArrayBuffer(1)))!=Qn||Dl&&Ir(new Dl)!=ot||Ef&&Ir(Ef.resolve())!=Zt||Wa&&Ir(new Wa)!=Xn||Fl&&Ir(new Fl)!=qe)&&(Ir=function(s){var v=Hr(s),M=v==Wn?s.constructor:t,H=M?ia(M):"";if(H)switch(H){case OI:return Qn;case II:return ot;case NI:return Zt;case DI:return Xn;case FI:return qe}return v});function Z2(s,v,M){for(var H=-1,G=M.length;++H<G;){var te=M[H],ue=te.size;switch(te.type){case"drop":s+=ue;break;case"dropRight":v-=ue;break;case"take":v=Or(v,s+ue);break;case"takeRight":s=lr(s,v-ue);break}}return{start:s,end:v}}function J2(s){var v=s.match(Ji);return v?v[1].split(Hs):[]}function ex(s,v,M){v=ms(v,s);for(var H=-1,G=v.length,te=!1;++H<G;){var ue=ko(v[H]);if(!(te=s!=null&&M(s,ue)))break;s=s[ue]}return te||++H!=G?te:(G=s==null?0:s.length,!!G&&Uu(G)&&Ho(ue,G)&&(xt(s)||oa(s)))}function eN(s){var v=s.length,M=new s.constructor(v);return v&&typeof s[0]=="string"&&rn.call(s,"index")&&(M.index=s.index,M.input=s.input),M}function tx(s){return typeof s.constructor=="function"&&!Vl(s)?Ha(vu(s)):{}}function tN(s,v,M){var H=s.constructor;switch(v){case gn:return Vf(s);case Ee:case Te:return new H(+s);case Qn:return P2(s,M);case Br:case Ar:case Cn:case ir:case hr:case nn:case or:case $o:case Gi:return F0(s,M);case ot:return new H;case gt:case ur:return new H(s);case _n:return B2(s);case Xn:return new H;case Pr:return j2(s)}}function nN(s,v){var M=v.length;if(!M)return s;var H=M-1;return v[H]=(M>1?"& ":"")+v[H],v=v.join(M>2?", ":" "),s.replace(po,`{
1476
1476
  /* [wrapped with `+v+`] */
1477
- `)}function rN(s){return xt(s)||oa(s)||!!(s0&&s&&s[s0])}function Ho(s,v){var M=typeof s;return v=v??U,!!v&&(M=="number"||M!="symbol"&&hn.test(s))&&s>-1&&s%1==0&&s<v}function Ur(s,v,M){if(!En(M))return!1;var H=typeof v;return(H=="number"?oi(M)&&Ho(v,M.length):H=="string"&&v in M)?io(M[v],s):!1}function ep(s,v){if(xt(s))return!1;var M=typeof s;return M=="number"||M=="symbol"||M=="boolean"||s==null||wi(s)?!0:Qi.test(s)||!Oa.test(s)||v!=null&&s in Mt(v)}function iN(s){var v=typeof s;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?s!=="__proto__":s===null}function tp(s){var v=Du(s),M=ee[v];if(typeof M!="function"||!(v in jt.prototype))return!1;if(s===M)return!0;var H=Qf(M);return!!H&&s===H[0]}function oN(s){return!!n0&&n0 in s}var sN=Qs?Uo:yp;function Vl(s){var v=s&&s.constructor,M=typeof v=="function"&&v.prototype||In;return s===M}function nx(s){return s===s&&!En(s)}function rx(s,v){return function(M){return M==null?!1:M[s]===v&&(v!==t||s in Mt(M))}}function aN(s){var v=zu(s,function(H){return M.size===g&&M.clear(),H}),M=v.cache;return v}function lN(s,v){var M=s[1],H=v[1],G=M|H,te=G<(m|w|L),ue=H==L&&M==T||H==L&&M==N&&s[7].length<=v[8]||H==(L|N)&&v[7].length<=v[8]&&M==T;if(!(te||ue))return s;H&m&&(s[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=s[3];s[3]=ve?B0(ve,de,v[4]):de,s[4]=ve?je(s[3],o):v[4]}return de=v[5],de&&(ve=s[5],s[5]=ve?j0(ve,de,v[6]):de,s[6]=ve?je(s[5],o):v[6]),de=v[7],de&&(s[7]=de),H&L&&(s[8]=s[8]==null?v[8]:Or(s[8],v[8])),s[9]==null&&(s[9]=v[9]),s[0]=v[0],s[1]=G,s}function cN(s){var v=[];if(s!=null)for(var M in Mt(s))v.push(M);return v}function uN(s){return pu.call(s)}function ix(s,v,M){return v=lr(v===t?s.length-1:v,0),function(){for(var H=arguments,G=-1,te=lr(H.length-v,0),ue=xe(te);++G<te;)ue[G]=H[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=H[G];return de[v]=M(ue),dr(s,this,de)}}function ox(s,v){return v.length<2?s:na(s,Di(v,0,-1))}function hN(s,v){for(var M=s.length,H=Or(v.length,M),G=ii(s);H--;){var te=v[H];s[H]=Ho(te,M)?G[te]:t}return s}function np(s,v){if(!(v==="constructor"&&typeof s[v]=="function")&&v!="__proto__")return s[v]}var sx=lx(T0),Kl=$I||function(s,v){return sn.setTimeout(s,v)},rp=lx(I2);function ax(s,v,M){var H=v+"";return rp(s,nN(H,dN(J2(H),M)))}function lx(s){var v=0,M=0;return function(){var H=MI(),G=D-(H-M);if(M=H,G>0){if(++v>=P)return arguments[0]}else v=0;return s.apply(t,arguments)}}function Pu(s,v){var M=-1,H=s.length,G=H-1;for(v=v===t?H:v;++M<v;){var te=Bf(M,G),ue=s[te];s[te]=s[M],s[M]=ue}return s.length=v,s}var cx=aN(function(s){var v=[];return s.charCodeAt(0)===46&&v.push(""),s.replace(zn,function(M,H,G,te){v.push(G?te.replace(Ol,"$1"):H||M)}),v});function ko(s){if(typeof s=="string"||wi(s))return s;var v=s+"";return v=="0"&&1/s==-j?"-0":v}function ia(s){if(s!=null){try{return fu.call(s)}catch{}try{return s+""}catch{}}return""}function dN(s,v){return yr(se,function(M){var H="_."+M[0];v&M[1]&&!vi(s,H)&&s.push(H)}),s.sort()}function ux(s){if(s instanceof jt)return s.clone();var v=new Ii(s.__wrapped__,s.__chain__);return v.__actions__=ii(s.__actions__),v.__index__=s.__index__,v.__values__=s.__values__,v}function fN(s,v,M){(M?Ur(s,v,M):v===t)?v=1:v=lr(Et(v),0);var H=s==null?0:s.length;if(!H||v<1)return[];for(var G=0,te=0,ue=xe(wu(H/v));G<H;)ue[te++]=Di(s,G,G+=v);return ue}function pN(s){for(var v=-1,M=s==null?0:s.length,H=0,G=[];++v<M;){var te=s[v];te&&(G[H++]=te)}return G}function gN(){var s=arguments.length;if(!s)return[];for(var v=xe(s-1),M=arguments[0],H=s;H--;)v[H-1]=arguments[H];return E(xt(M)?ii(M):[M],wr(v,1))}var mN=Ot(function(s,v){return qn(s)?Wl(s,wr(v,1,qn,!0)):[]}),vN=Ot(function(s,v){var M=Fi(v);return qn(M)&&(M=t),qn(s)?Wl(s,wr(v,1,qn,!0),ht(M,2)):[]}),yN=Ot(function(s,v){var M=Fi(v);return qn(M)&&(M=t),qn(s)?Wl(s,wr(v,1,qn,!0),t,M):[]});function bN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),Di(s,v<0?0:v,H)):[]}function wN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),v=H-v,Di(s,0,v<0?0:v)):[]}function xN(s,v){return s&&s.length?Mu(s,ht(v,3),!0,!0):[]}function kN(s,v){return s&&s.length?Mu(s,ht(v,3),!0):[]}function SN(s,v,M,H){var G=s==null?0:s.length;return G?(M&&typeof M!="number"&&Ur(s,v,M)&&(M=0,H=G),g2(s,v,M,H)):[]}function hx(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=M==null?0:Et(M);return G<0&&(G=lr(H+G,0)),re(s,ht(v,3),G)}function dx(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=H-1;return M!==t&&(G=Et(M),G=M<0?lr(H+G,0):Or(G,H-1)),re(s,ht(v,3),G,!0)}function fx(s){var v=s==null?0:s.length;return v?wr(s,1):[]}function _N(s){var v=s==null?0:s.length;return v?wr(s,j):[]}function CN(s,v){var M=s==null?0:s.length;return M?(v=v===t?1:Et(v),wr(s,v)):[]}function $N(s){for(var v=-1,M=s==null?0:s.length,H={};++v<M;){var G=s[v];H[G[0]]=G[1]}return H}function px(s){return s&&s.length?s[0]:t}function AN(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=M==null?0:Et(M);return G<0&&(G=lr(H+G,0)),le(s,v,G)}function EN(s){var v=s==null?0:s.length;return v?Di(s,0,-1):[]}var TN=Ot(function(s){var v=y(s,Uf);return v.length&&v[0]===s[0]?If(v):[]}),MN=Ot(function(s){var v=Fi(s),M=y(s,Uf);return v===Fi(M)?v=t:M.pop(),M.length&&M[0]===s[0]?If(M,ht(v,2)):[]}),RN=Ot(function(s){var v=Fi(s),M=y(s,Uf);return v=typeof v=="function"?v:t,v&&M.pop(),M.length&&M[0]===s[0]?If(M,t,v):[]});function LN(s,v){return s==null?"":EI.call(s,v)}function Fi(s){var v=s==null?0:s.length;return v?s[v-1]:t}function ON(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=H;return M!==t&&(G=Et(M),G=G<0?lr(H+G,0):Or(G,H-1)),v===v?vt(s,v,G):re(s,ke,G,!0)}function IN(s,v){return s&&s.length?C0(s,Et(v)):t}var NN=Ot(gx);function gx(s,v){return s&&s.length&&v&&v.length?Pf(s,v):s}function DN(s,v,M){return s&&s.length&&v&&v.length?Pf(s,v,ht(M,2)):s}function FN(s,v,M){return s&&s.length&&v&&v.length?Pf(s,v,t,M):s}var PN=zo(function(s,v){var M=s==null?0:s.length,H=Mf(s,v);return E0(s,y(v,function(G){return Ho(G,M)?+G:G}).sort(P0)),H});function BN(s,v){var M=[];if(!(s&&s.length))return M;var H=-1,G=[],te=s.length;for(v=ht(v,3);++H<te;){var ue=s[H];v(ue,H,s)&&(M.push(ue),G.push(H))}return E0(s,G),M}function ip(s){return s==null?s:LI.call(s)}function jN(s,v,M){var H=s==null?0:s.length;return H?(M&&typeof M!="number"&&Ur(s,v,M)?(v=0,M=H):(v=v==null?0:Et(v),M=M===t?H:Et(M)),Di(s,v,M)):[]}function WN(s,v){return Tu(s,v)}function zN(s,v,M){return Wf(s,v,ht(M,2))}function HN(s,v){var M=s==null?0:s.length;if(M){var H=Tu(s,v);if(H<M&&io(s[H],v))return H}return-1}function UN(s,v){return Tu(s,v,!0)}function qN(s,v,M){return Wf(s,v,ht(M,2),!0)}function VN(s,v){var M=s==null?0:s.length;if(M){var H=Tu(s,v,!0)-1;if(io(s[H],v))return H}return-1}function KN(s){return s&&s.length?M0(s):[]}function GN(s,v){return s&&s.length?M0(s,ht(v,2)):[]}function YN(s){var v=s==null?0:s.length;return v?Di(s,1,v):[]}function XN(s,v,M){return s&&s.length?(v=M||v===t?1:Et(v),Di(s,0,v<0?0:v)):[]}function QN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),v=H-v,Di(s,v<0?0:v,H)):[]}function ZN(s,v){return s&&s.length?Mu(s,ht(v,3),!1,!0):[]}function JN(s,v){return s&&s.length?Mu(s,ht(v,3)):[]}var eD=Ot(function(s){return gs(wr(s,1,qn,!0))}),tD=Ot(function(s){var v=Fi(s);return qn(v)&&(v=t),gs(wr(s,1,qn,!0),ht(v,2))}),nD=Ot(function(s){var v=Fi(s);return v=typeof v=="function"?v:t,gs(wr(s,1,qn,!0),t,v)});function rD(s){return s&&s.length?gs(s):[]}function iD(s,v){return s&&s.length?gs(s,ht(v,2)):[]}function oD(s,v){return v=typeof v=="function"?v:t,s&&s.length?gs(s,t,v):[]}function op(s){if(!(s&&s.length))return[];var v=0;return s=Lr(s,function(M){if(qn(M))return v=lr(M.length,v),!0}),Ye(v,function(M){return y(s,be(M))})}function mx(s,v){if(!(s&&s.length))return[];var M=op(s);return v==null?M:y(M,function(H){return dr(v,t,H)})}var sD=Ot(function(s,v){return qn(s)?Wl(s,v):[]}),aD=Ot(function(s){return Hf(Lr(s,qn))}),lD=Ot(function(s){var v=Fi(s);return qn(v)&&(v=t),Hf(Lr(s,qn),ht(v,2))}),cD=Ot(function(s){var v=Fi(s);return v=typeof v=="function"?v:t,Hf(Lr(s,qn),t,v)}),uD=Ot(op);function hD(s,v){return I0(s||[],v||[],jl)}function dD(s,v){return I0(s||[],v||[],Ul)}var fD=Ot(function(s){var v=s.length,M=v>1?s[v-1]:t;return M=typeof M=="function"?(s.pop(),M):t,mx(s,M)});function vx(s){var v=ee(s);return v.__chain__=!0,v}function pD(s,v){return v(s),s}function Bu(s,v){return v(s)}var gD=zo(function(s){var v=s.length,M=v?s[0]:0,H=this.__wrapped__,G=function(te){return Mf(te,s)};return v>1||this.__actions__.length||!(H instanceof jt)||!Ho(M)?this.thru(G):(H=H.slice(M,+M+(v?1:0)),H.__actions__.push({func:Bu,args:[G],thisArg:t}),new Ii(H,this.__chain__).thru(function(te){return v&&!te.length&&te.push(t),te}))});function mD(){return vx(this)}function vD(){return new Ii(this.value(),this.__chain__)}function yD(){this.__values__===t&&(this.__values__=Rx(this.value()));var s=this.__index__>=this.__values__.length,v=s?t:this.__values__[this.__index__++];return{done:s,value:v}}function bD(){return this}function wD(s){for(var v,M=this;M instanceof _u;){var H=ux(M);H.__index__=0,H.__values__=t,v?G.__wrapped__=H:v=H;var G=H;M=M.__wrapped__}return G.__wrapped__=s,v}function xD(){var s=this.__wrapped__;if(s instanceof jt){var v=s;return this.__actions__.length&&(v=new jt(this)),v=v.reverse(),v.__actions__.push({func:Bu,args:[ip],thisArg:t}),new Ii(v,this.__chain__)}return this.thru(ip)}function kD(){return O0(this.__wrapped__,this.__actions__)}var SD=Ru(function(s,v,M){rn.call(s,M)?++s[M]:jo(s,M,1)});function _D(s,v,M){var H=xt(s)?br:p2;return M&&Ur(s,v,M)&&(v=t),H(s,ht(v,3))}function CD(s,v){var M=xt(s)?Lr:m0;return M(s,ht(v,3))}var $D=U0(hx),AD=U0(dx);function ED(s,v){return wr(ju(s,v),1)}function TD(s,v){return wr(ju(s,v),j)}function MD(s,v,M){return M=M===t?1:Et(M),wr(ju(s,v),M)}function yx(s,v){var M=xt(s)?yr:ps;return M(s,ht(v,3))}function bx(s,v){var M=xt(s)?Xs:g0;return M(s,ht(v,3))}var RD=Ru(function(s,v,M){rn.call(s,M)?s[M].push(v):jo(s,M,[v])});function LD(s,v,M,H){s=oi(s)?s:Ga(s),M=M&&!H?Et(M):0;var G=s.length;return M<0&&(M=lr(G+M,0)),qu(s)?M<=G&&s.indexOf(v,M)>-1:!!G&&le(s,v,M)>-1}var OD=Ot(function(s,v,M){var H=-1,G=typeof v=="function",te=oi(s)?xe(s.length):[];return ps(s,function(ue){te[++H]=G?dr(v,ue,M):zl(ue,v,M)}),te}),ID=Ru(function(s,v,M){jo(s,M,v)});function ju(s,v){var M=xt(s)?y:k0;return M(s,ht(v,3))}function ND(s,v,M,H){return s==null?[]:(xt(v)||(v=v==null?[]:[v]),M=H?t:M,xt(M)||(M=M==null?[]:[M]),$0(s,v,M))}var DD=Ru(function(s,v,M){s[M?0:1].push(v)},function(){return[[],[]]});function FD(s,v,M){var H=xt(s)?C:Ie,G=arguments.length<3;return H(s,ht(v,4),M,G,ps)}function PD(s,v,M){var H=xt(s)?F:Ie,G=arguments.length<3;return H(s,ht(v,4),M,G,g0)}function BD(s,v){var M=xt(s)?Lr:m0;return M(s,Hu(ht(v,3)))}function jD(s){var v=xt(s)?h0:L2;return v(s)}function WD(s,v,M){(M?Ur(s,v,M):v===t)?v=1:v=Et(v);var H=xt(s)?c2:O2;return H(s,v)}function zD(s){var v=xt(s)?u2:N2;return v(s)}function HD(s){if(s==null)return 0;if(oi(s))return qu(s)?It(s):s.length;var v=Ir(s);return v==rt||v==Xn?s.size:Df(s).length}function UD(s,v,M){var H=xt(s)?B:D2;return M&&Ur(s,v,M)&&(v=t),H(s,ht(v,3))}var qD=Ot(function(s,v){if(s==null)return[];var M=v.length;return M>1&&Ur(s,v[0],v[1])?v=[]:M>2&&Ur(v[0],v[1],v[2])&&(v=[v[0]]),$0(s,wr(v,1),[])}),Wu=CI||function(){return sn.Date.now()};function VD(s,v){if(typeof v!="function")throw new an(u);return s=Et(s),function(){if(--s<1)return v.apply(this,arguments)}}function wx(s,v,M){return v=M?t:v,v=s&&v==null?s.length:v,Wo(s,L,t,t,t,t,v)}function xx(s,v){var M;if(typeof v!="function")throw new an(u);return s=Et(s),function(){return--s>0&&(M=v.apply(this,arguments)),s<=1&&(v=t),M}}var sp=Ot(function(s,v,M){var H=m;if(M.length){var G=je(M,Va(sp));H|=S}return Wo(s,H,v,M,G)}),kx=Ot(function(s,v,M){var H=m|w;if(M.length){var G=je(M,Va(kx));H|=S}return Wo(v,H,s,M,G)});function Sx(s,v,M){v=M?t:v;var H=Wo(s,T,t,t,t,t,t,v);return H.placeholder=Sx.placeholder,H}function _x(s,v,M){v=M?t:v;var H=Wo(s,$,t,t,t,t,t,v);return H.placeholder=_x.placeholder,H}function Cx(s,v,M){var H,G,te,ue,de,ve,Le=0,Oe=!1,Fe=!1,Ve=!0;if(typeof s!="function")throw new an(u);v=Pi(v)||0,En(M)&&(Oe=!!M.leading,Fe="maxWait"in M,te=Fe?lr(Pi(M.maxWait)||0,v):te,Ve="trailing"in M?!!M.trailing:Ve);function nt(Vn){var oo=H,Vo=G;return H=G=t,Le=Vn,ue=s.apply(Vo,oo),ue}function ft(Vn){return Le=Vn,de=Kl(Nt,v),Oe?nt(Vn):ue}function Rt(Vn){var oo=Vn-ve,Vo=Vn-Le,Ux=v-oo;return Fe?Or(Ux,te-Vo):Ux}function pt(Vn){var oo=Vn-ve,Vo=Vn-Le;return ve===t||oo>=v||oo<0||Fe&&Vo>=te}function Nt(){var Vn=Wu();if(pt(Vn))return zt(Vn);de=Kl(Nt,Rt(Vn))}function zt(Vn){return de=t,Ve&&H?nt(Vn):(H=G=t,ue)}function xi(){de!==t&&N0(de),Le=0,H=ve=G=de=t}function qr(){return de===t?ue:zt(Wu())}function ki(){var Vn=Wu(),oo=pt(Vn);if(H=arguments,G=this,ve=Vn,oo){if(de===t)return ft(ve);if(Fe)return N0(de),de=Kl(Nt,v),nt(ve)}return de===t&&(de=Kl(Nt,v)),ue}return ki.cancel=xi,ki.flush=qr,ki}var KD=Ot(function(s,v){return p0(s,1,v)}),GD=Ot(function(s,v,M){return p0(s,Pi(v)||0,M)});function YD(s){return Wo(s,R)}function zu(s,v){if(typeof s!="function"||v!=null&&typeof v!="function")throw new an(u);var M=function(){var H=arguments,G=v?v.apply(this,H):H[0],te=M.cache;if(te.has(G))return te.get(G);var ue=s.apply(this,H);return M.cache=te.set(G,ue)||te,ue};return M.cache=new(zu.Cache||Bo),M}zu.Cache=Bo;function Hu(s){if(typeof s!="function")throw new an(u);return function(){var v=arguments;switch(v.length){case 0:return!s.call(this);case 1:return!s.call(this,v[0]);case 2:return!s.call(this,v[0],v[1]);case 3:return!s.call(this,v[0],v[1],v[2])}return!s.apply(this,v)}}function XD(s){return xx(2,s)}var QD=F2(function(s,v){v=v.length==1&&xt(v[0])?y(v[0],lt(ht())):y(wr(v,1),lt(ht()));var M=v.length;return Ot(function(H){for(var G=-1,te=Or(H.length,M);++G<te;)H[G]=v[G].call(this,H[G]);return dr(s,this,H)})}),ap=Ot(function(s,v){var M=je(v,Va(ap));return Wo(s,S,t,v,M)}),$x=Ot(function(s,v){var M=je(v,Va($x));return Wo(s,k,t,v,M)}),ZD=zo(function(s,v){return Wo(s,N,t,t,t,v)});function JD(s,v){if(typeof s!="function")throw new an(u);return v=v===t?v:Et(v),Ot(s,v)}function eF(s,v){if(typeof s!="function")throw new an(u);return v=v==null?0:lr(Et(v),0),Ot(function(M){var H=M[v],G=vs(M,0,v);return H&&E(G,H),dr(s,this,G)})}function tF(s,v,M){var H=!0,G=!0;if(typeof s!="function")throw new an(u);return En(M)&&(H="leading"in M?!!M.leading:H,G="trailing"in M?!!M.trailing:G),Cx(s,v,{leading:H,maxWait:v,trailing:G})}function nF(s){return wx(s,1)}function rF(s,v){return ap(qf(v),s)}function iF(){if(!arguments.length)return[];var s=arguments[0];return xt(s)?s:[s]}function oF(s){return Ni(s,h)}function sF(s,v){return v=typeof v=="function"?v:t,Ni(s,h,v)}function aF(s){return Ni(s,c|h)}function lF(s,v){return v=typeof v=="function"?v:t,Ni(s,c|h,v)}function cF(s,v){return v==null||f0(s,v,mr(v))}function io(s,v){return s===v||s!==s&&v!==v}var uF=Nu(Of),hF=Nu(function(s,v){return s>=v}),oa=b0(function(){return arguments}())?b0:function(s){return Nn(s)&&rn.call(s,"callee")&&!o0.call(s,"callee")},xt=xe.isArray,dF=ri?lt(ri):w2;function oi(s){return s!=null&&Uu(s.length)&&!Uo(s)}function qn(s){return Nn(s)&&oi(s)}function fF(s){return s===!0||s===!1||Nn(s)&&Hr(s)==Ee}var ys=AI||yp,pF=ds?lt(ds):x2;function gF(s){return Nn(s)&&s.nodeType===1&&!Gl(s)}function mF(s){if(s==null)return!0;if(oi(s)&&(xt(s)||typeof s=="string"||typeof s.splice=="function"||ys(s)||Ka(s)||oa(s)))return!s.length;var v=Ir(s);if(v==rt||v==Xn)return!s.size;if(Vl(s))return!Df(s).length;for(var M in s)if(rn.call(s,M))return!1;return!0}function vF(s,v){return Hl(s,v)}function yF(s,v,M){M=typeof M=="function"?M:t;var H=M?M(s,v):t;return H===t?Hl(s,v,t,M):!!H}function lp(s){if(!Nn(s))return!1;var v=Hr(s);return v==Xe||v==Re||typeof s.message=="string"&&typeof s.name=="string"&&!Gl(s)}function bF(s){return typeof s=="number"&&a0(s)}function Uo(s){if(!En(s))return!1;var v=Hr(s);return v==Ke||v==dt||v==ge||v==hi}function Ax(s){return typeof s=="number"&&s==Et(s)}function Uu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function En(s){var v=typeof s;return s!=null&&(v=="object"||v=="function")}function Nn(s){return s!=null&&typeof s=="object"}var Ex=On?lt(On):S2;function wF(s,v){return s===v||Nf(s,v,Zf(v))}function xF(s,v,M){return M=typeof M=="function"?M:t,Nf(s,v,Zf(v),M)}function kF(s){return Tx(s)&&s!=+s}function SF(s){if(sN(s))throw new ct(d);return w0(s)}function _F(s){return s===null}function CF(s){return s==null}function Tx(s){return typeof s=="number"||Nn(s)&&Hr(s)==gt}function Gl(s){if(!Nn(s)||Hr(s)!=Wn)return!1;var v=vu(s);if(v===null)return!0;var M=rn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&fu.call(M)==xI}var cp=gi?lt(gi):_2;function $F(s){return Ax(s)&&s>=-U&&s<=U}var Mx=mi?lt(mi):C2;function qu(s){return typeof s=="string"||!xt(s)&&Nn(s)&&Hr(s)==ur}function wi(s){return typeof s=="symbol"||Nn(s)&&Hr(s)==Pr}var Ka=Li?lt(Li):$2;function AF(s){return s===t}function EF(s){return Nn(s)&&Ir(s)==qe}function TF(s){return Nn(s)&&Hr(s)==qt}var MF=Nu(Ff),RF=Nu(function(s,v){return s<=v});function Rx(s){if(!s)return[];if(oi(s))return qu(s)?wt(s):ii(s);if(Nl&&s[Nl])return we(s[Nl]());var v=Ir(s),M=v==rt?Me:v==Xn?Ue:Ga;return M(s)}function qo(s){if(!s)return s===0?s:0;if(s=Pi(s),s===j||s===-j){var v=s<0?-1:1;return v*K}return s===s?s:0}function Et(s){var v=qo(s),M=v%1;return v===v?M?v-M:v:0}function Lx(s){return s?ta(Et(s),0,J):0}function Pi(s){if(typeof s=="number")return s;if(wi(s))return Z;if(En(s)){var v=typeof s.valueOf=="function"?s.valueOf():s;s=En(v)?v+"":v}if(typeof s!="string")return s===0?s:+s;s=fn(s);var M=Na.test(s);return M||Hn.test(s)?dn(s.slice(2),M?2:8):Pt.test(s)?Z:+s}function Ox(s){return xo(s,si(s))}function LF(s){return s?ta(Et(s),-U,U):s===0?s:0}function Jt(s){return s==null?"":bi(s)}var OF=Ua(function(s,v){if(Vl(v)||oi(v)){xo(v,mr(v),s);return}for(var M in v)rn.call(v,M)&&jl(s,M,v[M])}),Ix=Ua(function(s,v){xo(v,si(v),s)}),Vu=Ua(function(s,v,M,H){xo(v,si(v),s,H)}),IF=Ua(function(s,v,M,H){xo(v,mr(v),s,H)}),NF=zo(Mf);function DF(s,v){var M=Ha(s);return v==null?M:d0(M,v)}var FF=Ot(function(s,v){s=Mt(s);var M=-1,H=v.length,G=H>2?v[2]:t;for(G&&Ur(v[0],v[1],G)&&(H=1);++M<H;)for(var te=v[M],ue=si(te),de=-1,ve=ue.length;++de<ve;){var Le=ue[de],Oe=s[Le];(Oe===t||io(Oe,In[Le])&&!rn.call(s,Le))&&(s[Le]=te[Le])}return s}),PF=Ot(function(s){return s.push(t,Q0),dr(Nx,t,s)});function BF(s,v){return Q(s,ht(v,3),wo)}function jF(s,v){return Q(s,ht(v,3),Lf)}function WF(s,v){return s==null?s:Rf(s,ht(v,3),si)}function zF(s,v){return s==null?s:v0(s,ht(v,3),si)}function HF(s,v){return s&&wo(s,ht(v,3))}function UF(s,v){return s&&Lf(s,ht(v,3))}function qF(s){return s==null?[]:Au(s,mr(s))}function VF(s){return s==null?[]:Au(s,si(s))}function up(s,v,M){var H=s==null?t:na(s,v);return H===t?M:H}function KF(s,v){return s!=null&&ex(s,v,m2)}function hp(s,v){return s!=null&&ex(s,v,v2)}var GF=V0(function(s,v,M){v!=null&&typeof v.toString!="function"&&(v=pu.call(v)),s[v]=M},fp(ai)),YF=V0(function(s,v,M){v!=null&&typeof v.toString!="function"&&(v=pu.call(v)),rn.call(s,v)?s[v].push(M):s[v]=[M]},ht),XF=Ot(zl);function mr(s){return oi(s)?u0(s):Df(s)}function si(s){return oi(s)?u0(s,!0):A2(s)}function QF(s,v){var M={};return v=ht(v,3),wo(s,function(H,G,te){jo(M,v(H,G,te),H)}),M}function ZF(s,v){var M={};return v=ht(v,3),wo(s,function(H,G,te){jo(M,G,v(H,G,te))}),M}var JF=Ua(function(s,v,M){Eu(s,v,M)}),Nx=Ua(function(s,v,M,H){Eu(s,v,M,H)}),eP=zo(function(s,v){var M={};if(s==null)return M;var H=!1;v=y(v,function(te){return te=ms(te,s),H||(H=te.length>1),te}),xo(s,Xf(s),M),H&&(M=Ni(M,c|f|h,G2));for(var G=v.length;G--;)zf(M,v[G]);return M});function tP(s,v){return Dx(s,Hu(ht(v)))}var nP=zo(function(s,v){return s==null?{}:T2(s,v)});function Dx(s,v){if(s==null)return{};var M=y(Xf(s),function(H){return[H]});return v=ht(v),A0(s,M,function(H,G){return v(H,G[0])})}function rP(s,v,M){v=ms(v,s);var H=-1,G=v.length;for(G||(G=1,s=t);++H<G;){var te=s==null?t:s[ko(v[H])];te===t&&(H=G,te=M),s=Uo(te)?te.call(s):te}return s}function iP(s,v,M){return s==null?s:Ul(s,v,M)}function oP(s,v,M,H){return H=typeof H=="function"?H:t,s==null?s:Ul(s,v,M,H)}var Fx=Y0(mr),Px=Y0(si);function sP(s,v,M){var H=xt(s),G=H||ys(s)||Ka(s);if(v=ht(v,4),M==null){var te=s&&s.constructor;G?M=H?new te:[]:En(s)?M=Uo(te)?Ha(vu(s)):{}:M={}}return(G?yr:wo)(s,function(ue,de,ve){return v(M,ue,de,ve)}),M}function aP(s,v){return s==null?!0:zf(s,v)}function lP(s,v,M){return s==null?s:L0(s,v,qf(M))}function cP(s,v,M,H){return H=typeof H=="function"?H:t,s==null?s:L0(s,v,qf(M),H)}function Ga(s){return s==null?[]:yn(s,mr(s))}function uP(s){return s==null?[]:yn(s,si(s))}function hP(s,v,M){return M===t&&(M=v,v=t),M!==t&&(M=Pi(M),M=M===M?M:0),v!==t&&(v=Pi(v),v=v===v?v:0),ta(Pi(s),v,M)}function dP(s,v,M){return v=qo(v),M===t?(M=v,v=0):M=qo(M),s=Pi(s),y2(s,v,M)}function fP(s,v,M){if(M&&typeof M!="boolean"&&Ur(s,v,M)&&(v=M=t),M===t&&(typeof v=="boolean"?(M=v,v=t):typeof s=="boolean"&&(M=s,s=t)),s===t&&v===t?(s=0,v=1):(s=qo(s),v===t?(v=s,s=0):v=qo(v)),s>v){var H=s;s=v,v=H}if(M||s%1||v%1){var G=l0();return Or(s+G*(v-s+We("1e-"+((G+"").length-1))),v)}return Bf(s,v)}var pP=qa(function(s,v,M){return v=v.toLowerCase(),s+(M?Bx(v):v)});function Bx(s){return dp(Jt(s).toLowerCase())}function jx(s){return s=Jt(s),s&&s.replace(Mn,bn).replace(No,"")}function gP(s,v,M){s=Jt(s),v=bi(v);var H=s.length;M=M===t?H:ta(Et(M),0,H);var G=M;return M-=v.length,M>=0&&s.slice(M,G)==v}function mP(s){return s=Jt(s),s&&Ml.test(s)?s.replace(Eo,q):s}function vP(s){return s=Jt(s),s&&Zi.test(s)?s.replace(Er,"\\$&"):s}var yP=qa(function(s,v,M){return s+(M?"-":"")+v.toLowerCase()}),bP=qa(function(s,v,M){return s+(M?" ":"")+v.toLowerCase()}),wP=H0("toLowerCase");function xP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;if(!v||H>=v)return s;var G=(v-H)/2;return Iu(xu(G),M)+s+Iu(wu(G),M)}function kP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;return v&&H<v?s+Iu(v-H,M):s}function SP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;return v&&H<v?Iu(v-H,M)+s:s}function _P(s,v,M){return M||v==null?v=0:v&&(v=+v),RI(Jt(s).replace($n,""),v||0)}function CP(s,v,M){return(M?Ur(s,v,M):v===t)?v=1:v=Et(v),jf(Jt(s),v)}function $P(){var s=arguments,v=Jt(s[0]);return s.length<3?v:v.replace(s[1],s[2])}var AP=qa(function(s,v,M){return s+(M?"_":"")+v.toLowerCase()});function EP(s,v,M){return M&&typeof M!="number"&&Ur(s,v,M)&&(v=M=t),M=M===t?J:M>>>0,M?(s=Jt(s),s&&(typeof v=="string"||v!=null&&!cp(v))&&(v=bi(v),!v&&oe(s))?vs(wt(s),0,M):s.split(v,M)):[]}var TP=qa(function(s,v,M){return s+(M?" ":"")+dp(v)});function MP(s,v,M){return s=Jt(s),M=M==null?0:ta(Et(M),0,s.length),v=bi(v),s.slice(M,M+v.length)==v}function RP(s,v,M){var H=ee.templateSettings;M&&Ur(s,v,M)&&(v=t),s=Jt(s),v=Vu({},v,H,X0);var G=Vu({},v.imports,H.imports,X0),te=mr(G),ue=yn(G,te),de,ve,Le=0,Oe=v.interpolate||$i,Fe="__p += '",Ve=zr((v.escape||$i).source+"|"+Oe.source+"|"+(Oe===zs?eo:$i).source+"|"+(v.evaluate||$i).source+"|$","g"),nt="//# sourceURL="+(rn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bo+"]")+`
1477
+ `)}function rN(s){return xt(s)||oa(s)||!!(s0&&s&&s[s0])}function Ho(s,v){var M=typeof s;return v=v??U,!!v&&(M=="number"||M!="symbol"&&hn.test(s))&&s>-1&&s%1==0&&s<v}function Ur(s,v,M){if(!En(M))return!1;var H=typeof v;return(H=="number"?oi(M)&&Ho(v,M.length):H=="string"&&v in M)?io(M[v],s):!1}function ep(s,v){if(xt(s))return!1;var M=typeof s;return M=="number"||M=="symbol"||M=="boolean"||s==null||wi(s)?!0:Qi.test(s)||!Oa.test(s)||v!=null&&s in Mt(v)}function iN(s){var v=typeof s;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?s!=="__proto__":s===null}function tp(s){var v=Du(s),M=ee[v];if(typeof M!="function"||!(v in jt.prototype))return!1;if(s===M)return!0;var H=Qf(M);return!!H&&s===H[0]}function oN(s){return!!n0&&n0 in s}var sN=Qs?Uo:yp;function Vl(s){var v=s&&s.constructor,M=typeof v=="function"&&v.prototype||In;return s===M}function nx(s){return s===s&&!En(s)}function rx(s,v){return function(M){return M==null?!1:M[s]===v&&(v!==t||s in Mt(M))}}function aN(s){var v=zu(s,function(H){return M.size===g&&M.clear(),H}),M=v.cache;return v}function lN(s,v){var M=s[1],H=v[1],G=M|H,te=G<(m|w|L),ue=H==L&&M==T||H==L&&M==N&&s[7].length<=v[8]||H==(L|N)&&v[7].length<=v[8]&&M==T;if(!(te||ue))return s;H&m&&(s[2]=v[2],G|=M&m?0:x);var de=v[3];if(de){var ve=s[3];s[3]=ve?B0(ve,de,v[4]):de,s[4]=ve?je(s[3],o):v[4]}return de=v[5],de&&(ve=s[5],s[5]=ve?j0(ve,de,v[6]):de,s[6]=ve?je(s[5],o):v[6]),de=v[7],de&&(s[7]=de),H&L&&(s[8]=s[8]==null?v[8]:Or(s[8],v[8])),s[9]==null&&(s[9]=v[9]),s[0]=v[0],s[1]=G,s}function cN(s){var v=[];if(s!=null)for(var M in Mt(s))v.push(M);return v}function uN(s){return pu.call(s)}function ix(s,v,M){return v=lr(v===t?s.length-1:v,0),function(){for(var H=arguments,G=-1,te=lr(H.length-v,0),ue=xe(te);++G<te;)ue[G]=H[v+G];G=-1;for(var de=xe(v+1);++G<v;)de[G]=H[G];return de[v]=M(ue),dr(s,this,de)}}function ox(s,v){return v.length<2?s:na(s,Fi(v,0,-1))}function hN(s,v){for(var M=s.length,H=Or(v.length,M),G=ii(s);H--;){var te=v[H];s[H]=Ho(te,M)?G[te]:t}return s}function np(s,v){if(!(v==="constructor"&&typeof s[v]=="function")&&v!="__proto__")return s[v]}var sx=lx(T0),Kl=$I||function(s,v){return sn.setTimeout(s,v)},rp=lx(I2);function ax(s,v,M){var H=v+"";return rp(s,nN(H,dN(J2(H),M)))}function lx(s){var v=0,M=0;return function(){var H=MI(),G=D-(H-M);if(M=H,G>0){if(++v>=P)return arguments[0]}else v=0;return s.apply(t,arguments)}}function Pu(s,v){var M=-1,H=s.length,G=H-1;for(v=v===t?H:v;++M<v;){var te=Bf(M,G),ue=s[te];s[te]=s[M],s[M]=ue}return s.length=v,s}var cx=aN(function(s){var v=[];return s.charCodeAt(0)===46&&v.push(""),s.replace(zn,function(M,H,G,te){v.push(G?te.replace(Ol,"$1"):H||M)}),v});function ko(s){if(typeof s=="string"||wi(s))return s;var v=s+"";return v=="0"&&1/s==-j?"-0":v}function ia(s){if(s!=null){try{return fu.call(s)}catch{}try{return s+""}catch{}}return""}function dN(s,v){return yr(se,function(M){var H="_."+M[0];v&M[1]&&!vi(s,H)&&s.push(H)}),s.sort()}function ux(s){if(s instanceof jt)return s.clone();var v=new Ni(s.__wrapped__,s.__chain__);return v.__actions__=ii(s.__actions__),v.__index__=s.__index__,v.__values__=s.__values__,v}function fN(s,v,M){(M?Ur(s,v,M):v===t)?v=1:v=lr(Et(v),0);var H=s==null?0:s.length;if(!H||v<1)return[];for(var G=0,te=0,ue=xe(wu(H/v));G<H;)ue[te++]=Fi(s,G,G+=v);return ue}function pN(s){for(var v=-1,M=s==null?0:s.length,H=0,G=[];++v<M;){var te=s[v];te&&(G[H++]=te)}return G}function gN(){var s=arguments.length;if(!s)return[];for(var v=xe(s-1),M=arguments[0],H=s;H--;)v[H-1]=arguments[H];return E(xt(M)?ii(M):[M],wr(v,1))}var mN=Ot(function(s,v){return qn(s)?Wl(s,wr(v,1,qn,!0)):[]}),vN=Ot(function(s,v){var M=Pi(v);return qn(M)&&(M=t),qn(s)?Wl(s,wr(v,1,qn,!0),ht(M,2)):[]}),yN=Ot(function(s,v){var M=Pi(v);return qn(M)&&(M=t),qn(s)?Wl(s,wr(v,1,qn,!0),t,M):[]});function bN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),Fi(s,v<0?0:v,H)):[]}function wN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),v=H-v,Fi(s,0,v<0?0:v)):[]}function xN(s,v){return s&&s.length?Mu(s,ht(v,3),!0,!0):[]}function kN(s,v){return s&&s.length?Mu(s,ht(v,3),!0):[]}function SN(s,v,M,H){var G=s==null?0:s.length;return G?(M&&typeof M!="number"&&Ur(s,v,M)&&(M=0,H=G),g2(s,v,M,H)):[]}function hx(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=M==null?0:Et(M);return G<0&&(G=lr(H+G,0)),re(s,ht(v,3),G)}function dx(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=H-1;return M!==t&&(G=Et(M),G=M<0?lr(H+G,0):Or(G,H-1)),re(s,ht(v,3),G,!0)}function fx(s){var v=s==null?0:s.length;return v?wr(s,1):[]}function _N(s){var v=s==null?0:s.length;return v?wr(s,j):[]}function CN(s,v){var M=s==null?0:s.length;return M?(v=v===t?1:Et(v),wr(s,v)):[]}function $N(s){for(var v=-1,M=s==null?0:s.length,H={};++v<M;){var G=s[v];H[G[0]]=G[1]}return H}function px(s){return s&&s.length?s[0]:t}function AN(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=M==null?0:Et(M);return G<0&&(G=lr(H+G,0)),le(s,v,G)}function EN(s){var v=s==null?0:s.length;return v?Fi(s,0,-1):[]}var TN=Ot(function(s){var v=y(s,Uf);return v.length&&v[0]===s[0]?If(v):[]}),MN=Ot(function(s){var v=Pi(s),M=y(s,Uf);return v===Pi(M)?v=t:M.pop(),M.length&&M[0]===s[0]?If(M,ht(v,2)):[]}),RN=Ot(function(s){var v=Pi(s),M=y(s,Uf);return v=typeof v=="function"?v:t,v&&M.pop(),M.length&&M[0]===s[0]?If(M,t,v):[]});function LN(s,v){return s==null?"":EI.call(s,v)}function Pi(s){var v=s==null?0:s.length;return v?s[v-1]:t}function ON(s,v,M){var H=s==null?0:s.length;if(!H)return-1;var G=H;return M!==t&&(G=Et(M),G=G<0?lr(H+G,0):Or(G,H-1)),v===v?vt(s,v,G):re(s,ke,G,!0)}function IN(s,v){return s&&s.length?C0(s,Et(v)):t}var NN=Ot(gx);function gx(s,v){return s&&s.length&&v&&v.length?Pf(s,v):s}function DN(s,v,M){return s&&s.length&&v&&v.length?Pf(s,v,ht(M,2)):s}function FN(s,v,M){return s&&s.length&&v&&v.length?Pf(s,v,t,M):s}var PN=zo(function(s,v){var M=s==null?0:s.length,H=Mf(s,v);return E0(s,y(v,function(G){return Ho(G,M)?+G:G}).sort(P0)),H});function BN(s,v){var M=[];if(!(s&&s.length))return M;var H=-1,G=[],te=s.length;for(v=ht(v,3);++H<te;){var ue=s[H];v(ue,H,s)&&(M.push(ue),G.push(H))}return E0(s,G),M}function ip(s){return s==null?s:LI.call(s)}function jN(s,v,M){var H=s==null?0:s.length;return H?(M&&typeof M!="number"&&Ur(s,v,M)?(v=0,M=H):(v=v==null?0:Et(v),M=M===t?H:Et(M)),Fi(s,v,M)):[]}function WN(s,v){return Tu(s,v)}function zN(s,v,M){return Wf(s,v,ht(M,2))}function HN(s,v){var M=s==null?0:s.length;if(M){var H=Tu(s,v);if(H<M&&io(s[H],v))return H}return-1}function UN(s,v){return Tu(s,v,!0)}function qN(s,v,M){return Wf(s,v,ht(M,2),!0)}function VN(s,v){var M=s==null?0:s.length;if(M){var H=Tu(s,v,!0)-1;if(io(s[H],v))return H}return-1}function KN(s){return s&&s.length?M0(s):[]}function GN(s,v){return s&&s.length?M0(s,ht(v,2)):[]}function YN(s){var v=s==null?0:s.length;return v?Fi(s,1,v):[]}function XN(s,v,M){return s&&s.length?(v=M||v===t?1:Et(v),Fi(s,0,v<0?0:v)):[]}function QN(s,v,M){var H=s==null?0:s.length;return H?(v=M||v===t?1:Et(v),v=H-v,Fi(s,v<0?0:v,H)):[]}function ZN(s,v){return s&&s.length?Mu(s,ht(v,3),!1,!0):[]}function JN(s,v){return s&&s.length?Mu(s,ht(v,3)):[]}var eD=Ot(function(s){return gs(wr(s,1,qn,!0))}),tD=Ot(function(s){var v=Pi(s);return qn(v)&&(v=t),gs(wr(s,1,qn,!0),ht(v,2))}),nD=Ot(function(s){var v=Pi(s);return v=typeof v=="function"?v:t,gs(wr(s,1,qn,!0),t,v)});function rD(s){return s&&s.length?gs(s):[]}function iD(s,v){return s&&s.length?gs(s,ht(v,2)):[]}function oD(s,v){return v=typeof v=="function"?v:t,s&&s.length?gs(s,t,v):[]}function op(s){if(!(s&&s.length))return[];var v=0;return s=Lr(s,function(M){if(qn(M))return v=lr(M.length,v),!0}),Ye(v,function(M){return y(s,be(M))})}function mx(s,v){if(!(s&&s.length))return[];var M=op(s);return v==null?M:y(M,function(H){return dr(v,t,H)})}var sD=Ot(function(s,v){return qn(s)?Wl(s,v):[]}),aD=Ot(function(s){return Hf(Lr(s,qn))}),lD=Ot(function(s){var v=Pi(s);return qn(v)&&(v=t),Hf(Lr(s,qn),ht(v,2))}),cD=Ot(function(s){var v=Pi(s);return v=typeof v=="function"?v:t,Hf(Lr(s,qn),t,v)}),uD=Ot(op);function hD(s,v){return I0(s||[],v||[],jl)}function dD(s,v){return I0(s||[],v||[],Ul)}var fD=Ot(function(s){var v=s.length,M=v>1?s[v-1]:t;return M=typeof M=="function"?(s.pop(),M):t,mx(s,M)});function vx(s){var v=ee(s);return v.__chain__=!0,v}function pD(s,v){return v(s),s}function Bu(s,v){return v(s)}var gD=zo(function(s){var v=s.length,M=v?s[0]:0,H=this.__wrapped__,G=function(te){return Mf(te,s)};return v>1||this.__actions__.length||!(H instanceof jt)||!Ho(M)?this.thru(G):(H=H.slice(M,+M+(v?1:0)),H.__actions__.push({func:Bu,args:[G],thisArg:t}),new Ni(H,this.__chain__).thru(function(te){return v&&!te.length&&te.push(t),te}))});function mD(){return vx(this)}function vD(){return new Ni(this.value(),this.__chain__)}function yD(){this.__values__===t&&(this.__values__=Rx(this.value()));var s=this.__index__>=this.__values__.length,v=s?t:this.__values__[this.__index__++];return{done:s,value:v}}function bD(){return this}function wD(s){for(var v,M=this;M instanceof _u;){var H=ux(M);H.__index__=0,H.__values__=t,v?G.__wrapped__=H:v=H;var G=H;M=M.__wrapped__}return G.__wrapped__=s,v}function xD(){var s=this.__wrapped__;if(s instanceof jt){var v=s;return this.__actions__.length&&(v=new jt(this)),v=v.reverse(),v.__actions__.push({func:Bu,args:[ip],thisArg:t}),new Ni(v,this.__chain__)}return this.thru(ip)}function kD(){return O0(this.__wrapped__,this.__actions__)}var SD=Ru(function(s,v,M){rn.call(s,M)?++s[M]:jo(s,M,1)});function _D(s,v,M){var H=xt(s)?br:p2;return M&&Ur(s,v,M)&&(v=t),H(s,ht(v,3))}function CD(s,v){var M=xt(s)?Lr:m0;return M(s,ht(v,3))}var $D=U0(hx),AD=U0(dx);function ED(s,v){return wr(ju(s,v),1)}function TD(s,v){return wr(ju(s,v),j)}function MD(s,v,M){return M=M===t?1:Et(M),wr(ju(s,v),M)}function yx(s,v){var M=xt(s)?yr:ps;return M(s,ht(v,3))}function bx(s,v){var M=xt(s)?Xs:g0;return M(s,ht(v,3))}var RD=Ru(function(s,v,M){rn.call(s,M)?s[M].push(v):jo(s,M,[v])});function LD(s,v,M,H){s=oi(s)?s:Ga(s),M=M&&!H?Et(M):0;var G=s.length;return M<0&&(M=lr(G+M,0)),qu(s)?M<=G&&s.indexOf(v,M)>-1:!!G&&le(s,v,M)>-1}var OD=Ot(function(s,v,M){var H=-1,G=typeof v=="function",te=oi(s)?xe(s.length):[];return ps(s,function(ue){te[++H]=G?dr(v,ue,M):zl(ue,v,M)}),te}),ID=Ru(function(s,v,M){jo(s,M,v)});function ju(s,v){var M=xt(s)?y:k0;return M(s,ht(v,3))}function ND(s,v,M,H){return s==null?[]:(xt(v)||(v=v==null?[]:[v]),M=H?t:M,xt(M)||(M=M==null?[]:[M]),$0(s,v,M))}var DD=Ru(function(s,v,M){s[M?0:1].push(v)},function(){return[[],[]]});function FD(s,v,M){var H=xt(s)?C:Ie,G=arguments.length<3;return H(s,ht(v,4),M,G,ps)}function PD(s,v,M){var H=xt(s)?F:Ie,G=arguments.length<3;return H(s,ht(v,4),M,G,g0)}function BD(s,v){var M=xt(s)?Lr:m0;return M(s,Hu(ht(v,3)))}function jD(s){var v=xt(s)?h0:L2;return v(s)}function WD(s,v,M){(M?Ur(s,v,M):v===t)?v=1:v=Et(v);var H=xt(s)?c2:O2;return H(s,v)}function zD(s){var v=xt(s)?u2:N2;return v(s)}function HD(s){if(s==null)return 0;if(oi(s))return qu(s)?It(s):s.length;var v=Ir(s);return v==ot||v==Xn?s.size:Df(s).length}function UD(s,v,M){var H=xt(s)?B:D2;return M&&Ur(s,v,M)&&(v=t),H(s,ht(v,3))}var qD=Ot(function(s,v){if(s==null)return[];var M=v.length;return M>1&&Ur(s,v[0],v[1])?v=[]:M>2&&Ur(v[0],v[1],v[2])&&(v=[v[0]]),$0(s,wr(v,1),[])}),Wu=CI||function(){return sn.Date.now()};function VD(s,v){if(typeof v!="function")throw new an(u);return s=Et(s),function(){if(--s<1)return v.apply(this,arguments)}}function wx(s,v,M){return v=M?t:v,v=s&&v==null?s.length:v,Wo(s,L,t,t,t,t,v)}function xx(s,v){var M;if(typeof v!="function")throw new an(u);return s=Et(s),function(){return--s>0&&(M=v.apply(this,arguments)),s<=1&&(v=t),M}}var sp=Ot(function(s,v,M){var H=m;if(M.length){var G=je(M,Va(sp));H|=S}return Wo(s,H,v,M,G)}),kx=Ot(function(s,v,M){var H=m|w;if(M.length){var G=je(M,Va(kx));H|=S}return Wo(v,H,s,M,G)});function Sx(s,v,M){v=M?t:v;var H=Wo(s,T,t,t,t,t,t,v);return H.placeholder=Sx.placeholder,H}function _x(s,v,M){v=M?t:v;var H=Wo(s,$,t,t,t,t,t,v);return H.placeholder=_x.placeholder,H}function Cx(s,v,M){var H,G,te,ue,de,ve,Le=0,Oe=!1,Fe=!1,Ve=!0;if(typeof s!="function")throw new an(u);v=Bi(v)||0,En(M)&&(Oe=!!M.leading,Fe="maxWait"in M,te=Fe?lr(Bi(M.maxWait)||0,v):te,Ve="trailing"in M?!!M.trailing:Ve);function rt(Vn){var oo=H,Vo=G;return H=G=t,Le=Vn,ue=s.apply(Vo,oo),ue}function ft(Vn){return Le=Vn,de=Kl(Nt,v),Oe?rt(Vn):ue}function Rt(Vn){var oo=Vn-ve,Vo=Vn-Le,Ux=v-oo;return Fe?Or(Ux,te-Vo):Ux}function pt(Vn){var oo=Vn-ve,Vo=Vn-Le;return ve===t||oo>=v||oo<0||Fe&&Vo>=te}function Nt(){var Vn=Wu();if(pt(Vn))return zt(Vn);de=Kl(Nt,Rt(Vn))}function zt(Vn){return de=t,Ve&&H?rt(Vn):(H=G=t,ue)}function xi(){de!==t&&N0(de),Le=0,H=ve=G=de=t}function qr(){return de===t?ue:zt(Wu())}function ki(){var Vn=Wu(),oo=pt(Vn);if(H=arguments,G=this,ve=Vn,oo){if(de===t)return ft(ve);if(Fe)return N0(de),de=Kl(Nt,v),rt(ve)}return de===t&&(de=Kl(Nt,v)),ue}return ki.cancel=xi,ki.flush=qr,ki}var KD=Ot(function(s,v){return p0(s,1,v)}),GD=Ot(function(s,v,M){return p0(s,Bi(v)||0,M)});function YD(s){return Wo(s,R)}function zu(s,v){if(typeof s!="function"||v!=null&&typeof v!="function")throw new an(u);var M=function(){var H=arguments,G=v?v.apply(this,H):H[0],te=M.cache;if(te.has(G))return te.get(G);var ue=s.apply(this,H);return M.cache=te.set(G,ue)||te,ue};return M.cache=new(zu.Cache||Bo),M}zu.Cache=Bo;function Hu(s){if(typeof s!="function")throw new an(u);return function(){var v=arguments;switch(v.length){case 0:return!s.call(this);case 1:return!s.call(this,v[0]);case 2:return!s.call(this,v[0],v[1]);case 3:return!s.call(this,v[0],v[1],v[2])}return!s.apply(this,v)}}function XD(s){return xx(2,s)}var QD=F2(function(s,v){v=v.length==1&&xt(v[0])?y(v[0],lt(ht())):y(wr(v,1),lt(ht()));var M=v.length;return Ot(function(H){for(var G=-1,te=Or(H.length,M);++G<te;)H[G]=v[G].call(this,H[G]);return dr(s,this,H)})}),ap=Ot(function(s,v){var M=je(v,Va(ap));return Wo(s,S,t,v,M)}),$x=Ot(function(s,v){var M=je(v,Va($x));return Wo(s,k,t,v,M)}),ZD=zo(function(s,v){return Wo(s,N,t,t,t,v)});function JD(s,v){if(typeof s!="function")throw new an(u);return v=v===t?v:Et(v),Ot(s,v)}function eF(s,v){if(typeof s!="function")throw new an(u);return v=v==null?0:lr(Et(v),0),Ot(function(M){var H=M[v],G=vs(M,0,v);return H&&E(G,H),dr(s,this,G)})}function tF(s,v,M){var H=!0,G=!0;if(typeof s!="function")throw new an(u);return En(M)&&(H="leading"in M?!!M.leading:H,G="trailing"in M?!!M.trailing:G),Cx(s,v,{leading:H,maxWait:v,trailing:G})}function nF(s){return wx(s,1)}function rF(s,v){return ap(qf(v),s)}function iF(){if(!arguments.length)return[];var s=arguments[0];return xt(s)?s:[s]}function oF(s){return Di(s,h)}function sF(s,v){return v=typeof v=="function"?v:t,Di(s,h,v)}function aF(s){return Di(s,c|h)}function lF(s,v){return v=typeof v=="function"?v:t,Di(s,c|h,v)}function cF(s,v){return v==null||f0(s,v,mr(v))}function io(s,v){return s===v||s!==s&&v!==v}var uF=Nu(Of),hF=Nu(function(s,v){return s>=v}),oa=b0(function(){return arguments}())?b0:function(s){return Nn(s)&&rn.call(s,"callee")&&!o0.call(s,"callee")},xt=xe.isArray,dF=ri?lt(ri):w2;function oi(s){return s!=null&&Uu(s.length)&&!Uo(s)}function qn(s){return Nn(s)&&oi(s)}function fF(s){return s===!0||s===!1||Nn(s)&&Hr(s)==Ee}var ys=AI||yp,pF=ds?lt(ds):x2;function gF(s){return Nn(s)&&s.nodeType===1&&!Gl(s)}function mF(s){if(s==null)return!0;if(oi(s)&&(xt(s)||typeof s=="string"||typeof s.splice=="function"||ys(s)||Ka(s)||oa(s)))return!s.length;var v=Ir(s);if(v==ot||v==Xn)return!s.size;if(Vl(s))return!Df(s).length;for(var M in s)if(rn.call(s,M))return!1;return!0}function vF(s,v){return Hl(s,v)}function yF(s,v,M){M=typeof M=="function"?M:t;var H=M?M(s,v):t;return H===t?Hl(s,v,t,M):!!H}function lp(s){if(!Nn(s))return!1;var v=Hr(s);return v==Xe||v==Re||typeof s.message=="string"&&typeof s.name=="string"&&!Gl(s)}function bF(s){return typeof s=="number"&&a0(s)}function Uo(s){if(!En(s))return!1;var v=Hr(s);return v==Ke||v==dt||v==ge||v==hi}function Ax(s){return typeof s=="number"&&s==Et(s)}function Uu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=U}function En(s){var v=typeof s;return s!=null&&(v=="object"||v=="function")}function Nn(s){return s!=null&&typeof s=="object"}var Ex=On?lt(On):S2;function wF(s,v){return s===v||Nf(s,v,Zf(v))}function xF(s,v,M){return M=typeof M=="function"?M:t,Nf(s,v,Zf(v),M)}function kF(s){return Tx(s)&&s!=+s}function SF(s){if(sN(s))throw new ct(d);return w0(s)}function _F(s){return s===null}function CF(s){return s==null}function Tx(s){return typeof s=="number"||Nn(s)&&Hr(s)==gt}function Gl(s){if(!Nn(s)||Hr(s)!=Wn)return!1;var v=vu(s);if(v===null)return!0;var M=rn.call(v,"constructor")&&v.constructor;return typeof M=="function"&&M instanceof M&&fu.call(M)==xI}var cp=gi?lt(gi):_2;function $F(s){return Ax(s)&&s>=-U&&s<=U}var Mx=mi?lt(mi):C2;function qu(s){return typeof s=="string"||!xt(s)&&Nn(s)&&Hr(s)==ur}function wi(s){return typeof s=="symbol"||Nn(s)&&Hr(s)==Pr}var Ka=Oi?lt(Oi):$2;function AF(s){return s===t}function EF(s){return Nn(s)&&Ir(s)==qe}function TF(s){return Nn(s)&&Hr(s)==qt}var MF=Nu(Ff),RF=Nu(function(s,v){return s<=v});function Rx(s){if(!s)return[];if(oi(s))return qu(s)?wt(s):ii(s);if(Nl&&s[Nl])return we(s[Nl]());var v=Ir(s),M=v==ot?Me:v==Xn?Ue:Ga;return M(s)}function qo(s){if(!s)return s===0?s:0;if(s=Bi(s),s===j||s===-j){var v=s<0?-1:1;return v*K}return s===s?s:0}function Et(s){var v=qo(s),M=v%1;return v===v?M?v-M:v:0}function Lx(s){return s?ta(Et(s),0,J):0}function Bi(s){if(typeof s=="number")return s;if(wi(s))return Z;if(En(s)){var v=typeof s.valueOf=="function"?s.valueOf():s;s=En(v)?v+"":v}if(typeof s!="string")return s===0?s:+s;s=fn(s);var M=Na.test(s);return M||Hn.test(s)?dn(s.slice(2),M?2:8):Pt.test(s)?Z:+s}function Ox(s){return xo(s,si(s))}function LF(s){return s?ta(Et(s),-U,U):s===0?s:0}function Jt(s){return s==null?"":bi(s)}var OF=Ua(function(s,v){if(Vl(v)||oi(v)){xo(v,mr(v),s);return}for(var M in v)rn.call(v,M)&&jl(s,M,v[M])}),Ix=Ua(function(s,v){xo(v,si(v),s)}),Vu=Ua(function(s,v,M,H){xo(v,si(v),s,H)}),IF=Ua(function(s,v,M,H){xo(v,mr(v),s,H)}),NF=zo(Mf);function DF(s,v){var M=Ha(s);return v==null?M:d0(M,v)}var FF=Ot(function(s,v){s=Mt(s);var M=-1,H=v.length,G=H>2?v[2]:t;for(G&&Ur(v[0],v[1],G)&&(H=1);++M<H;)for(var te=v[M],ue=si(te),de=-1,ve=ue.length;++de<ve;){var Le=ue[de],Oe=s[Le];(Oe===t||io(Oe,In[Le])&&!rn.call(s,Le))&&(s[Le]=te[Le])}return s}),PF=Ot(function(s){return s.push(t,Q0),dr(Nx,t,s)});function BF(s,v){return Q(s,ht(v,3),wo)}function jF(s,v){return Q(s,ht(v,3),Lf)}function WF(s,v){return s==null?s:Rf(s,ht(v,3),si)}function zF(s,v){return s==null?s:v0(s,ht(v,3),si)}function HF(s,v){return s&&wo(s,ht(v,3))}function UF(s,v){return s&&Lf(s,ht(v,3))}function qF(s){return s==null?[]:Au(s,mr(s))}function VF(s){return s==null?[]:Au(s,si(s))}function up(s,v,M){var H=s==null?t:na(s,v);return H===t?M:H}function KF(s,v){return s!=null&&ex(s,v,m2)}function hp(s,v){return s!=null&&ex(s,v,v2)}var GF=V0(function(s,v,M){v!=null&&typeof v.toString!="function"&&(v=pu.call(v)),s[v]=M},fp(ai)),YF=V0(function(s,v,M){v!=null&&typeof v.toString!="function"&&(v=pu.call(v)),rn.call(s,v)?s[v].push(M):s[v]=[M]},ht),XF=Ot(zl);function mr(s){return oi(s)?u0(s):Df(s)}function si(s){return oi(s)?u0(s,!0):A2(s)}function QF(s,v){var M={};return v=ht(v,3),wo(s,function(H,G,te){jo(M,v(H,G,te),H)}),M}function ZF(s,v){var M={};return v=ht(v,3),wo(s,function(H,G,te){jo(M,G,v(H,G,te))}),M}var JF=Ua(function(s,v,M){Eu(s,v,M)}),Nx=Ua(function(s,v,M,H){Eu(s,v,M,H)}),eP=zo(function(s,v){var M={};if(s==null)return M;var H=!1;v=y(v,function(te){return te=ms(te,s),H||(H=te.length>1),te}),xo(s,Xf(s),M),H&&(M=Di(M,c|f|h,G2));for(var G=v.length;G--;)zf(M,v[G]);return M});function tP(s,v){return Dx(s,Hu(ht(v)))}var nP=zo(function(s,v){return s==null?{}:T2(s,v)});function Dx(s,v){if(s==null)return{};var M=y(Xf(s),function(H){return[H]});return v=ht(v),A0(s,M,function(H,G){return v(H,G[0])})}function rP(s,v,M){v=ms(v,s);var H=-1,G=v.length;for(G||(G=1,s=t);++H<G;){var te=s==null?t:s[ko(v[H])];te===t&&(H=G,te=M),s=Uo(te)?te.call(s):te}return s}function iP(s,v,M){return s==null?s:Ul(s,v,M)}function oP(s,v,M,H){return H=typeof H=="function"?H:t,s==null?s:Ul(s,v,M,H)}var Fx=Y0(mr),Px=Y0(si);function sP(s,v,M){var H=xt(s),G=H||ys(s)||Ka(s);if(v=ht(v,4),M==null){var te=s&&s.constructor;G?M=H?new te:[]:En(s)?M=Uo(te)?Ha(vu(s)):{}:M={}}return(G?yr:wo)(s,function(ue,de,ve){return v(M,ue,de,ve)}),M}function aP(s,v){return s==null?!0:zf(s,v)}function lP(s,v,M){return s==null?s:L0(s,v,qf(M))}function cP(s,v,M,H){return H=typeof H=="function"?H:t,s==null?s:L0(s,v,qf(M),H)}function Ga(s){return s==null?[]:yn(s,mr(s))}function uP(s){return s==null?[]:yn(s,si(s))}function hP(s,v,M){return M===t&&(M=v,v=t),M!==t&&(M=Bi(M),M=M===M?M:0),v!==t&&(v=Bi(v),v=v===v?v:0),ta(Bi(s),v,M)}function dP(s,v,M){return v=qo(v),M===t?(M=v,v=0):M=qo(M),s=Bi(s),y2(s,v,M)}function fP(s,v,M){if(M&&typeof M!="boolean"&&Ur(s,v,M)&&(v=M=t),M===t&&(typeof v=="boolean"?(M=v,v=t):typeof s=="boolean"&&(M=s,s=t)),s===t&&v===t?(s=0,v=1):(s=qo(s),v===t?(v=s,s=0):v=qo(v)),s>v){var H=s;s=v,v=H}if(M||s%1||v%1){var G=l0();return Or(s+G*(v-s+We("1e-"+((G+"").length-1))),v)}return Bf(s,v)}var pP=qa(function(s,v,M){return v=v.toLowerCase(),s+(M?Bx(v):v)});function Bx(s){return dp(Jt(s).toLowerCase())}function jx(s){return s=Jt(s),s&&s.replace(Mn,bn).replace(No,"")}function gP(s,v,M){s=Jt(s),v=bi(v);var H=s.length;M=M===t?H:ta(Et(M),0,H);var G=M;return M-=v.length,M>=0&&s.slice(M,G)==v}function mP(s){return s=Jt(s),s&&Ml.test(s)?s.replace(Eo,q):s}function vP(s){return s=Jt(s),s&&Zi.test(s)?s.replace(Er,"\\$&"):s}var yP=qa(function(s,v,M){return s+(M?"-":"")+v.toLowerCase()}),bP=qa(function(s,v,M){return s+(M?" ":"")+v.toLowerCase()}),wP=H0("toLowerCase");function xP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;if(!v||H>=v)return s;var G=(v-H)/2;return Iu(xu(G),M)+s+Iu(wu(G),M)}function kP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;return v&&H<v?s+Iu(v-H,M):s}function SP(s,v,M){s=Jt(s),v=Et(v);var H=v?It(s):0;return v&&H<v?Iu(v-H,M)+s:s}function _P(s,v,M){return M||v==null?v=0:v&&(v=+v),RI(Jt(s).replace($n,""),v||0)}function CP(s,v,M){return(M?Ur(s,v,M):v===t)?v=1:v=Et(v),jf(Jt(s),v)}function $P(){var s=arguments,v=Jt(s[0]);return s.length<3?v:v.replace(s[1],s[2])}var AP=qa(function(s,v,M){return s+(M?"_":"")+v.toLowerCase()});function EP(s,v,M){return M&&typeof M!="number"&&Ur(s,v,M)&&(v=M=t),M=M===t?J:M>>>0,M?(s=Jt(s),s&&(typeof v=="string"||v!=null&&!cp(v))&&(v=bi(v),!v&&oe(s))?vs(wt(s),0,M):s.split(v,M)):[]}var TP=qa(function(s,v,M){return s+(M?" ":"")+dp(v)});function MP(s,v,M){return s=Jt(s),M=M==null?0:ta(Et(M),0,s.length),v=bi(v),s.slice(M,M+v.length)==v}function RP(s,v,M){var H=ee.templateSettings;M&&Ur(s,v,M)&&(v=t),s=Jt(s),v=Vu({},v,H,X0);var G=Vu({},v.imports,H.imports,X0),te=mr(G),ue=yn(G,te),de,ve,Le=0,Oe=v.interpolate||Ai,Fe="__p += '",Ve=zr((v.escape||Ai).source+"|"+Oe.source+"|"+(Oe===zs?eo:Ai).source+"|"+(v.evaluate||Ai).source+"|$","g"),rt="//# sourceURL="+(rn.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++bo+"]")+`
1478
1478
  `;s.replace(Ve,function(pt,Nt,zt,xi,qr,ki){return zt||(zt=xi),Fe+=s.slice(Le,ki).replace(Rr,X),Nt&&(de=!0,Fe+=`' +
1479
1479
  __e(`+Nt+`) +
1480
1480
  '`),qr&&(ve=!0,Fe+=`';
@@ -1491,16 +1491,16 @@ __p += '`),zt&&(Fe+=`' +
1491
1491
  function print() { __p += __j.call(arguments, '') }
1492
1492
  `:`;
1493
1493
  `)+Fe+`return __p
1494
- }`;var Rt=zx(function(){return At(te,nt+"return "+Fe).apply(t,ue)});if(Rt.source=Fe,lp(Rt))throw Rt;return Rt}function LP(s){return Jt(s).toLowerCase()}function OP(s){return Jt(s).toUpperCase()}function IP(s,v,M){if(s=Jt(s),s&&(M||v===t))return fn(s);if(!s||!(v=bi(v)))return s;var H=wt(s),G=wt(v),te=$t(H,G),ue=Jn(H,G)+1;return vs(H,te,ue).join("")}function NP(s,v,M){if(s=Jt(s),s&&(M||v===t))return s.slice(0,Lt(s)+1);if(!s||!(v=bi(v)))return s;var H=wt(s),G=Jn(H,wt(v))+1;return vs(H,0,G).join("")}function DP(s,v,M){if(s=Jt(s),s&&(M||v===t))return s.replace($n,"");if(!s||!(v=bi(v)))return s;var H=wt(s),G=$t(H,wt(v));return vs(H,G).join("")}function FP(s,v){var M=O,H=W;if(En(v)){var G="separator"in v?v.separator:G;M="length"in v?Et(v.length):M,H="omission"in v?bi(v.omission):H}s=Jt(s);var te=s.length;if(oe(s)){var ue=wt(s);te=ue.length}if(M>=te)return s;var de=M-It(H);if(de<1)return H;var ve=ue?vs(ue,0,de).join(""):s.slice(0,de);if(G===t)return ve+H;if(ue&&(de+=ve.length-de),cp(G)){if(s.slice(de).search(G)){var Le,Oe=ve;for(G.global||(G=zr(G.source,Jt(fi.exec(G))+"g")),G.lastIndex=0;Le=G.exec(Oe);)var Fe=Le.index;ve=ve.slice(0,Fe===t?de:Fe)}}else if(s.indexOf(bi(G),de)!=de){var Ve=ve.lastIndexOf(G);Ve>-1&&(ve=ve.slice(0,Ve))}return ve+H}function PP(s){return s=Jt(s),s&&ts.test(s)?s.replace(vr,ut):s}var BP=qa(function(s,v,M){return s+(M?" ":"")+v.toUpperCase()}),dp=H0("toUpperCase");function Wx(s,v,M){return s=Jt(s),v=M?t:v,v===t?pe(s)?wn(s):Y(s):s.match(v)||[]}var zx=Ot(function(s,v){try{return dr(s,t,v)}catch(M){return lp(M)?M:new ct(M)}}),jP=zo(function(s,v){return yr(v,function(M){M=ko(M),jo(s,M,sp(s[M],s))}),s});function WP(s){var v=s==null?0:s.length,M=ht();return s=v?y(s,function(H){if(typeof H[1]!="function")throw new an(u);return[M(H[0]),H[1]]}):[],Ot(function(H){for(var G=-1;++G<v;){var te=s[G];if(dr(te[0],this,H))return dr(te[1],this,H)}})}function zP(s){return f2(Ni(s,c))}function fp(s){return function(){return s}}function HP(s,v){return s==null||s!==s?v:s}var UP=q0(),qP=q0(!0);function ai(s){return s}function pp(s){return x0(typeof s=="function"?s:Ni(s,c))}function VP(s){return S0(Ni(s,c))}function KP(s,v){return _0(s,Ni(v,c))}var GP=Ot(function(s,v){return function(M){return zl(M,s,v)}}),YP=Ot(function(s,v){return function(M){return zl(s,M,v)}});function gp(s,v,M){var H=mr(v),G=Au(v,H);M==null&&!(En(v)&&(G.length||!H.length))&&(M=v,v=s,s=this,G=Au(v,mr(v)));var te=!(En(M)&&"chain"in M)||!!M.chain,ue=Uo(s);return yr(G,function(de){var ve=v[de];s[de]=ve,ue&&(s.prototype[de]=function(){var Le=this.__chain__;if(te||Le){var Oe=s(this.__wrapped__),Fe=Oe.__actions__=ii(this.__actions__);return Fe.push({func:ve,args:arguments,thisArg:s}),Oe.__chain__=Le,Oe}return ve.apply(s,E([this.value()],arguments))})}),s}function XP(){return sn._===this&&(sn._=kI),this}function mp(){}function QP(s){return s=Et(s),Ot(function(v){return C0(v,s)})}var ZP=Kf(y),JP=Kf(br),eB=Kf(B);function Hx(s){return ep(s)?be(ko(s)):M2(s)}function tB(s){return function(v){return s==null?t:na(s,v)}}var nB=K0(),rB=K0(!0);function vp(){return[]}function yp(){return!1}function iB(){return{}}function oB(){return""}function sB(){return!0}function aB(s,v){if(s=Et(s),s<1||s>U)return[];var M=J,H=Or(s,J);v=ht(v),s-=J;for(var G=Ye(H,v);++M<s;)v(M);return G}function lB(s){return xt(s)?y(s,ko):wi(s)?[s]:ii(cx(Jt(s)))}function cB(s){var v=++wI;return Jt(s)+v}var uB=Ou(function(s,v){return s+v},0),hB=Gf("ceil"),dB=Ou(function(s,v){return s/v},1),fB=Gf("floor");function pB(s){return s&&s.length?$u(s,ai,Of):t}function gB(s,v){return s&&s.length?$u(s,ht(v,2),Of):t}function mB(s){return me(s,ai)}function vB(s,v){return me(s,ht(v,2))}function yB(s){return s&&s.length?$u(s,ai,Ff):t}function bB(s,v){return s&&s.length?$u(s,ht(v,2),Ff):t}var wB=Ou(function(s,v){return s*v},1),xB=Gf("round"),kB=Ou(function(s,v){return s-v},0);function SB(s){return s&&s.length?st(s,ai):0}function _B(s,v){return s&&s.length?st(s,ht(v,2)):0}return ee.after=VD,ee.ary=wx,ee.assign=OF,ee.assignIn=Ix,ee.assignInWith=Vu,ee.assignWith=IF,ee.at=NF,ee.before=xx,ee.bind=sp,ee.bindAll=jP,ee.bindKey=kx,ee.castArray=iF,ee.chain=vx,ee.chunk=fN,ee.compact=pN,ee.concat=gN,ee.cond=WP,ee.conforms=zP,ee.constant=fp,ee.countBy=SD,ee.create=DF,ee.curry=Sx,ee.curryRight=_x,ee.debounce=Cx,ee.defaults=FF,ee.defaultsDeep=PF,ee.defer=KD,ee.delay=GD,ee.difference=mN,ee.differenceBy=vN,ee.differenceWith=yN,ee.drop=bN,ee.dropRight=wN,ee.dropRightWhile=xN,ee.dropWhile=kN,ee.fill=SN,ee.filter=CD,ee.flatMap=ED,ee.flatMapDeep=TD,ee.flatMapDepth=MD,ee.flatten=fx,ee.flattenDeep=_N,ee.flattenDepth=CN,ee.flip=YD,ee.flow=UP,ee.flowRight=qP,ee.fromPairs=$N,ee.functions=qF,ee.functionsIn=VF,ee.groupBy=RD,ee.initial=EN,ee.intersection=TN,ee.intersectionBy=MN,ee.intersectionWith=RN,ee.invert=GF,ee.invertBy=YF,ee.invokeMap=OD,ee.iteratee=pp,ee.keyBy=ID,ee.keys=mr,ee.keysIn=si,ee.map=ju,ee.mapKeys=QF,ee.mapValues=ZF,ee.matches=VP,ee.matchesProperty=KP,ee.memoize=zu,ee.merge=JF,ee.mergeWith=Nx,ee.method=GP,ee.methodOf=YP,ee.mixin=gp,ee.negate=Hu,ee.nthArg=QP,ee.omit=eP,ee.omitBy=tP,ee.once=XD,ee.orderBy=ND,ee.over=ZP,ee.overArgs=QD,ee.overEvery=JP,ee.overSome=eB,ee.partial=ap,ee.partialRight=$x,ee.partition=DD,ee.pick=nP,ee.pickBy=Dx,ee.property=Hx,ee.propertyOf=tB,ee.pull=NN,ee.pullAll=gx,ee.pullAllBy=DN,ee.pullAllWith=FN,ee.pullAt=PN,ee.range=nB,ee.rangeRight=rB,ee.rearg=ZD,ee.reject=BD,ee.remove=BN,ee.rest=JD,ee.reverse=ip,ee.sampleSize=WD,ee.set=iP,ee.setWith=oP,ee.shuffle=zD,ee.slice=jN,ee.sortBy=qD,ee.sortedUniq=KN,ee.sortedUniqBy=GN,ee.split=EP,ee.spread=eF,ee.tail=YN,ee.take=XN,ee.takeRight=QN,ee.takeRightWhile=ZN,ee.takeWhile=JN,ee.tap=pD,ee.throttle=tF,ee.thru=Bu,ee.toArray=Rx,ee.toPairs=Fx,ee.toPairsIn=Px,ee.toPath=lB,ee.toPlainObject=Ox,ee.transform=sP,ee.unary=nF,ee.union=eD,ee.unionBy=tD,ee.unionWith=nD,ee.uniq=rD,ee.uniqBy=iD,ee.uniqWith=oD,ee.unset=aP,ee.unzip=op,ee.unzipWith=mx,ee.update=lP,ee.updateWith=cP,ee.values=Ga,ee.valuesIn=uP,ee.without=sD,ee.words=Wx,ee.wrap=rF,ee.xor=aD,ee.xorBy=lD,ee.xorWith=cD,ee.zip=uD,ee.zipObject=hD,ee.zipObjectDeep=dD,ee.zipWith=fD,ee.entries=Fx,ee.entriesIn=Px,ee.extend=Ix,ee.extendWith=Vu,gp(ee,ee),ee.add=uB,ee.attempt=zx,ee.camelCase=pP,ee.capitalize=Bx,ee.ceil=hB,ee.clamp=hP,ee.clone=oF,ee.cloneDeep=aF,ee.cloneDeepWith=lF,ee.cloneWith=sF,ee.conformsTo=cF,ee.deburr=jx,ee.defaultTo=HP,ee.divide=dB,ee.endsWith=gP,ee.eq=io,ee.escape=mP,ee.escapeRegExp=vP,ee.every=_D,ee.find=$D,ee.findIndex=hx,ee.findKey=BF,ee.findLast=AD,ee.findLastIndex=dx,ee.findLastKey=jF,ee.floor=fB,ee.forEach=yx,ee.forEachRight=bx,ee.forIn=WF,ee.forInRight=zF,ee.forOwn=HF,ee.forOwnRight=UF,ee.get=up,ee.gt=uF,ee.gte=hF,ee.has=KF,ee.hasIn=hp,ee.head=px,ee.identity=ai,ee.includes=LD,ee.indexOf=AN,ee.inRange=dP,ee.invoke=XF,ee.isArguments=oa,ee.isArray=xt,ee.isArrayBuffer=dF,ee.isArrayLike=oi,ee.isArrayLikeObject=qn,ee.isBoolean=fF,ee.isBuffer=ys,ee.isDate=pF,ee.isElement=gF,ee.isEmpty=mF,ee.isEqual=vF,ee.isEqualWith=yF,ee.isError=lp,ee.isFinite=bF,ee.isFunction=Uo,ee.isInteger=Ax,ee.isLength=Uu,ee.isMap=Ex,ee.isMatch=wF,ee.isMatchWith=xF,ee.isNaN=kF,ee.isNative=SF,ee.isNil=CF,ee.isNull=_F,ee.isNumber=Tx,ee.isObject=En,ee.isObjectLike=Nn,ee.isPlainObject=Gl,ee.isRegExp=cp,ee.isSafeInteger=$F,ee.isSet=Mx,ee.isString=qu,ee.isSymbol=wi,ee.isTypedArray=Ka,ee.isUndefined=AF,ee.isWeakMap=EF,ee.isWeakSet=TF,ee.join=LN,ee.kebabCase=yP,ee.last=Fi,ee.lastIndexOf=ON,ee.lowerCase=bP,ee.lowerFirst=wP,ee.lt=MF,ee.lte=RF,ee.max=pB,ee.maxBy=gB,ee.mean=mB,ee.meanBy=vB,ee.min=yB,ee.minBy=bB,ee.stubArray=vp,ee.stubFalse=yp,ee.stubObject=iB,ee.stubString=oB,ee.stubTrue=sB,ee.multiply=wB,ee.nth=IN,ee.noConflict=XP,ee.noop=mp,ee.now=Wu,ee.pad=xP,ee.padEnd=kP,ee.padStart=SP,ee.parseInt=_P,ee.random=fP,ee.reduce=FD,ee.reduceRight=PD,ee.repeat=CP,ee.replace=$P,ee.result=rP,ee.round=xB,ee.runInContext=fe,ee.sample=jD,ee.size=HD,ee.snakeCase=AP,ee.some=UD,ee.sortedIndex=WN,ee.sortedIndexBy=zN,ee.sortedIndexOf=HN,ee.sortedLastIndex=UN,ee.sortedLastIndexBy=qN,ee.sortedLastIndexOf=VN,ee.startCase=TP,ee.startsWith=MP,ee.subtract=kB,ee.sum=SB,ee.sumBy=_B,ee.template=RP,ee.times=aB,ee.toFinite=qo,ee.toInteger=Et,ee.toLength=Lx,ee.toLower=LP,ee.toNumber=Pi,ee.toSafeInteger=LF,ee.toString=Jt,ee.toUpper=OP,ee.trim=IP,ee.trimEnd=NP,ee.trimStart=DP,ee.truncate=FP,ee.unescape=PP,ee.uniqueId=cB,ee.upperCase=BP,ee.upperFirst=dp,ee.each=yx,ee.eachRight=bx,ee.first=px,gp(ee,function(){var s={};return wo(ee,function(v,M){rn.call(ee.prototype,M)||(s[M]=v)}),s}(),{chain:!1}),ee.VERSION=r,yr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){ee[s].placeholder=ee}),yr(["drop","take"],function(s,v){jt.prototype[s]=function(M){M=M===t?1:lr(Et(M),0);var H=this.__filtered__&&!v?new jt(this):this.clone();return H.__filtered__?H.__takeCount__=Or(M,H.__takeCount__):H.__views__.push({size:Or(M,J),type:s+(H.__dir__<0?"Right":"")}),H},jt.prototype[s+"Right"]=function(M){return this.reverse()[s](M).reverse()}}),yr(["filter","map","takeWhile"],function(s,v){var M=v+1,H=M==A||M==I;jt.prototype[s]=function(G){var te=this.clone();return te.__iteratees__.push({iteratee:ht(G,3),type:M}),te.__filtered__=te.__filtered__||H,te}}),yr(["head","last"],function(s,v){var M="take"+(v?"Right":"");jt.prototype[s]=function(){return this[M](1).value()[0]}}),yr(["initial","tail"],function(s,v){var M="drop"+(v?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[M](1)}}),jt.prototype.compact=function(){return this.filter(ai)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Ot(function(s,v){return typeof s=="function"?new jt(this):this.map(function(M){return zl(M,s,v)})}),jt.prototype.reject=function(s){return this.filter(Hu(ht(s)))},jt.prototype.slice=function(s,v){s=Et(s);var M=this;return M.__filtered__&&(s>0||v<0)?new jt(M):(s<0?M=M.takeRight(-s):s&&(M=M.drop(s)),v!==t&&(v=Et(v),M=v<0?M.dropRight(-v):M.take(v-s)),M)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(J)},wo(jt.prototype,function(s,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),G=ee[H?"take"+(v=="last"?"Right":""):v],te=H||/^find/.test(v);G&&(ee.prototype[v]=function(){var ue=this.__wrapped__,de=H?[1]:arguments,ve=ue instanceof jt,Le=de[0],Oe=ve||xt(ue),Fe=function(Nt){var zt=G.apply(ee,E([Nt],de));return H&&Ve?zt[0]:zt};Oe&&M&&typeof Le=="function"&&Le.length!=1&&(ve=Oe=!1);var Ve=this.__chain__,nt=!!this.__actions__.length,ft=te&&!Ve,Rt=ve&&!nt;if(!te&&Oe){ue=Rt?ue:new jt(this);var pt=s.apply(ue,de);return pt.__actions__.push({func:Bu,args:[Fe],thisArg:t}),new Ii(pt,Ve)}return ft&&Rt?s.apply(this,de):(pt=this.thru(Fe),ft?H?pt.value()[0]:pt.value():pt)})}),yr(["pop","push","shift","sort","splice","unshift"],function(s){var v=gr[s],M=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",H=/^(?:pop|shift)$/.test(s);ee.prototype[s]=function(){var G=arguments;if(H&&!this.__chain__){var te=this.value();return v.apply(xt(te)?te:[],G)}return this[M](function(ue){return v.apply(xt(ue)?ue:[],G)})}}),wo(jt.prototype,function(s,v){var M=ee[v];if(M){var H=M.name+"";rn.call(za,H)||(za[H]=[]),za[H].push({name:v,func:M})}}),za[Lu(t,w).name]=[{name:"wrapper",func:t}],jt.prototype.clone=PI,jt.prototype.reverse=BI,jt.prototype.value=jI,ee.prototype.at=gD,ee.prototype.chain=mD,ee.prototype.commit=vD,ee.prototype.next=yD,ee.prototype.plant=wD,ee.prototype.reverse=xD,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=kD,ee.prototype.first=ee.prototype.head,Nl&&(ee.prototype[Nl]=bD),ee},Wt=er();Zn?((Zn.exports=Wt)._=Wt,mn._=Wt):sn._=Wt}).call(T$)}(Cc,Cc.exports)),Cc.exports}var R$=M$();Bi("O",lc(R$)).debounce(function(){this.rebuildDisplayText()},300);var Zm={exports:{}},Jm;function L$(){return Jm||(Jm=1,function(n,e){(function(){ace.require(["ace/mode/text"],function(t){n&&(n.exports=t)})})()}(Zm)),Zm.exports}L$();const O$=!0,tr="u-",I$="uplot",N$=tr+"hz",D$=tr+"vt",F$=tr+"title",P$=tr+"wrap",B$=tr+"under",j$=tr+"over",W$=tr+"axis",Ms=tr+"off",z$=tr+"select",H$=tr+"cursor-x",U$=tr+"cursor-y",q$=tr+"cursor-pt",V$=tr+"legend",K$=tr+"live",G$=tr+"inline",Y$=tr+"series",X$=tr+"marker",ev=tr+"label",Q$=tr+"value",hl="width",dl="height",fl="top",tv="bottom",ma="left",Fh="right",Ph="#000",nv=Ph+"0",Bh="mousemove",rv="mousedown",jh="mouseup",iv="mouseenter",ov="mouseleave",sv="dblclick",Z$="resize",J$="scroll",av="change",$c="dppxchange",Wh="--",va=typeof window<"u",zh=va?document:null,ya=va?window:null,eA=va?navigator:null;let Kt,Ac;function Hh(){let n=devicePixelRatio;Kt!=n&&(Kt=n,Ac&&Vh(av,Ac,Hh),Ac=matchMedia(`(min-resolution: ${Kt-.001}dppx) and (max-resolution: ${Kt+.001}dppx)`),Rs(av,Ac,Hh),ya.dispatchEvent(new CustomEvent($c)))}function li(n,e){if(e!=null){let t=n.classList;!t.contains(e)&&t.add(e)}}function Uh(n,e){let t=n.classList;t.contains(e)&&t.remove(e)}function pn(n,e,t){n.style[e]=t+"px"}function Hi(n,e,t,r){let l=zh.createElement(n);return e!=null&&li(l,e),t!=null&&t.insertBefore(l,r),l}function _i(n,e){return Hi("div",n,e)}const lv=new WeakMap;function lo(n,e,t,r,l){let d="translate("+e+"px,"+t+"px)",u=lv.get(n);d!=u&&(n.style.transform=d,lv.set(n,d),e<0||t<0||e>r||t>l?li(n,Ms):Uh(n,Ms))}const cv=new WeakMap;function uv(n,e,t){let r=e+t,l=cv.get(n);r!=l&&(cv.set(n,r),n.style.background=e,n.style.borderColor=t)}const hv=new WeakMap;function dv(n,e,t,r){let l=e+""+t,d=hv.get(n);l!=d&&(hv.set(n,l),n.style.height=t+"px",n.style.width=e+"px",n.style.marginLeft=r?-e/2+"px":0,n.style.marginTop=r?-t/2+"px":0)}const qh={passive:!0},tA={...qh,capture:!0};function Rs(n,e,t,r){e.addEventListener(n,t,r?tA:qh)}function Vh(n,e,t,r){e.removeEventListener(n,t,qh)}va&&Hh();function Ui(n,e,t,r){let l;t=t||0,r=r||e.length-1;let d=r<=2147483647;for(;r-t>1;)l=d?t+r>>1:ui((t+r)/2),e[l]<n?t=l:r=l;return n-e[t]<=e[r]-n?t:r}function fv(n){return(e,t,r)=>{let l=-1,d=-1;for(let u=t;u<=r;u++)if(n(e[u])){l=u;break}for(let u=r;u>=t;u--)if(n(e[u])){d=u;break}return[l,d]}}const pv=n=>n!=null,gv=n=>n!=null&&n>0,Ec=fv(pv),nA=fv(gv);function rA(n,e,t,r=0,l=!1){let d=l?nA:Ec,u=l?gv:pv;[e,t]=d(n,e,t);let b=n[e],p=n[e];if(e>-1)if(r==1)b=n[e],p=n[t];else if(r==-1)b=n[t],p=n[e];else for(let g=e;g<=t;g++){let o=n[g];u(o)&&(o<b?b=o:o>p&&(p=o))}return[b??ln,p??-ln]}function Tc(n,e,t,r){let l=yv(n),d=yv(e);n==e&&(l==-1?(n*=t,e/=t):(n/=t,e*=t));let u=t==10?_o:bv,b=l==1?ui:Ci,p=d==1?Ci:ui,g=b(u(nr(n))),o=p(u(nr(e))),c=ba(t,g),f=ba(t,o);return t==10&&(g<0&&(c=cn(c,-g)),o<0&&(f=cn(f,-o))),r||t==2?(n=c*l,e=f*d):(n=$v(n,c),e=Lc(e,f)),[n,e]}function Kh(n,e,t,r){let l=Tc(n,e,t,r);return n==0&&(l[0]=0),e==0&&(l[1]=0),l}const Gh=.1,mv={mode:3,pad:Gh},pl={pad:0,soft:null,mode:0},iA={min:pl,max:pl};function Mc(n,e,t,r){return Oc(t)?vv(n,e,t):(pl.pad=t,pl.soft=r?0:null,pl.mode=r?3:0,vv(n,e,iA))}function Ut(n,e){return n??e}function oA(n,e,t){for(e=Ut(e,0),t=Ut(t,n.length-1);e<=t;){if(n[e]!=null)return!0;e++}return!1}function vv(n,e,t){let r=t.min,l=t.max,d=Ut(r.pad,0),u=Ut(l.pad,0),b=Ut(r.hard,-ln),p=Ut(l.hard,ln),g=Ut(r.soft,ln),o=Ut(l.soft,-ln),c=Ut(r.mode,0),f=Ut(l.mode,0),h=e-n,i=_o(h),a=Dr(nr(n),nr(e)),m=_o(a),w=nr(m-i);(h<1e-24||w>10)&&(h=0,(n==0||e==0)&&(h=1e-24,c==2&&g!=ln&&(d=0),f==2&&o!=-ln&&(u=0)));let x=h||a||1e3,T=_o(x),$=ba(10,ui(T)),S=x*(h==0?n==0?.1:1:d),k=cn($v(n-S,$/10),24),L=n>=g&&(c==1||c==3&&k<=g||c==2&&k>=g)?g:ln,N=Dr(b,k<L&&n>=L?L:qi(L,k)),R=x*(h==0?e==0?.1:1:u),O=cn(Lc(e+R,$/10),24),W=e<=o&&(f==1||f==3&&O>=o||f==2&&O<=o)?o:-ln,P=qi(p,O>W&&e<=W?W:Dr(W,O));return N==P&&N==0&&(P=100),[N,P]}const sA=new Intl.NumberFormat(va?eA.language:"en-US"),Yh=n=>sA.format(n),ci=Math,Rc=ci.PI,nr=ci.abs,ui=ci.floor,rr=ci.round,Ci=ci.ceil,qi=ci.min,Dr=ci.max,ba=ci.pow,yv=ci.sign,_o=ci.log10,bv=ci.log2,aA=(n,e=1)=>ci.sinh(n)*e,Xh=(n,e=1)=>ci.asinh(n/e),ln=1/0;function wv(n){return(_o((n^n>>31)-(n>>31))|0)+1}function Qh(n,e,t){return qi(Dr(n,e),t)}function xv(n){return typeof n=="function"}function Ft(n){return xv(n)?n:()=>n}const lA=()=>{},kv=n=>n,Sv=(n,e)=>e,cA=n=>null,_v=n=>!0,Cv=(n,e)=>n==e,uA=/\.\d*?(?=9{6,}|0{6,})/gm,Ls=n=>{if(Ev(n)||Jo.has(n))return n;const e=`${n}`,t=e.match(uA);if(t==null)return n;let r=t[0].length-1;if(e.indexOf("e-")!=-1){let[l,d]=e.split("e");return+`${Ls(l)}e${d}`}return cn(n,r)};function Os(n,e){return Ls(cn(Ls(n/e))*e)}function Lc(n,e){return Ls(Ci(Ls(n/e))*e)}function $v(n,e){return Ls(ui(Ls(n/e))*e)}function cn(n,e=0){if(Ev(n))return n;let t=10**e,r=n*t*(1+Number.EPSILON);return rr(r)/t}const Jo=new Map;function Av(n){return((""+n).split(".")[1]||"").length}function gl(n,e,t,r){let l=[],d=r.map(Av);for(let u=e;u<t;u++){let b=nr(u),p=cn(ba(n,u),b);for(let g=0;g<r.length;g++){let o=n==10?+`${r[g]}e${u}`:r[g]*p,c=(u>=0?0:b)+(u>=d[g]?0:d[g]),f=n==10?o:cn(o,c);l.push(f),Jo.set(f,c)}}return l}const ml={},Zh=[],wa=[null,null],es=Array.isArray,Ev=Number.isInteger,hA=n=>n===void 0;function Tv(n){return typeof n=="string"}function Oc(n){let e=!1;if(n!=null){let t=n.constructor;e=t==null||t==Object}return e}function dA(n){return n!=null&&typeof n=="object"}const fA=Object.getPrototypeOf(Uint8Array),Mv="__proto__";function xa(n,e=Oc){let t;if(es(n)){let r=n.find(l=>l!=null);if(es(r)||e(r)){t=Array(n.length);for(let l=0;l<n.length;l++)t[l]=xa(n[l],e)}else t=n.slice()}else if(n instanceof fA)t=n.slice();else if(e(n)){t={};for(let r in n)r!=Mv&&(t[r]=xa(n[r],e))}else t=n;return t}function Gn(n){let e=arguments;for(let t=1;t<e.length;t++){let r=e[t];for(let l in r)l!=Mv&&(Oc(n[l])?Gn(n[l],xa(r[l])):n[l]=xa(r[l]))}return n}const pA=0,gA=1,mA=2;function vA(n,e,t){for(let r=0,l,d=-1;r<e.length;r++){let u=e[r];if(u>d){for(l=u-1;l>=0&&n[l]==null;)n[l--]=null;for(l=u+1;l<t&&n[l]==null;)n[d=l++]=null}}}function yA(n,e){if(xA(n)){let u=n[0].slice();for(let b=1;b<n.length;b++)u.push(...n[b].slice(1));return kA(u[0])||(u=wA(u)),u}let t=new Set;for(let u=0;u<n.length;u++){let b=n[u][0],p=b.length;for(let g=0;g<p;g++)t.add(b[g])}let r=[Array.from(t).sort((u,b)=>u-b)],l=r[0].length,d=new Map;for(let u=0;u<l;u++)d.set(r[0][u],u);for(let u=0;u<n.length;u++){let b=n[u],p=b[0];for(let g=1;g<b.length;g++){let o=b[g],c=Array(l).fill(void 0),f=e?e[u][g]:gA,h=[];for(let i=0;i<o.length;i++){let a=o[i],m=d.get(p[i]);a===null?f!=pA&&(c[m]=a,f==mA&&h.push(m)):c[m]=a}vA(c,h,l),r.push(c)}}return r}const bA=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function wA(n){let e=n[0],t=e.length,r=Array(t);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,u)=>e[d]-e[u]);let l=[];for(let d=0;d<n.length;d++){let u=n[d],b=Array(t);for(let p=0;p<t;p++)b[p]=u[r[p]];l.push(b)}return l}function xA(n){let e=n[0][0],t=e.length;for(let r=1;r<n.length;r++){let l=n[r][0];if(l.length!=t)return!1;if(l!=e){for(let d=0;d<t;d++)if(l[d]!=e[d])return!1}}return!0}function kA(n,e=100){const t=n.length;if(t<=1)return!0;let r=0,l=t-1;for(;r<=l&&n[r]==null;)r++;for(;l>=r&&n[l]==null;)l--;if(l<=r)return!0;const d=Dr(1,ui((l-r+1)/e));for(let u=n[r],b=r+d;b<=l;b+=d){const p=n[b];if(p!=null){if(p<=u)return!1;u=p}}return!0}const Rv=["January","February","March","April","May","June","July","August","September","October","November","December"],Lv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ov(n){return n.slice(0,3)}const SA=Lv.map(Ov),_A=Rv.map(Ov),CA={MMMM:Rv,MMM:_A,WWWW:Lv,WWW:SA};function vl(n){return(n<10?"0":"")+n}function $A(n){return(n<10?"00":n<100?"0":"")+n}const AA={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,e)=>e.MMMM[n.getMonth()],MMM:(n,e)=>e.MMM[n.getMonth()],MM:n=>vl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>vl(n.getDate()),D:n=>n.getDate(),WWWW:(n,e)=>e.WWWW[n.getDay()],WWW:(n,e)=>e.WWW[n.getDay()],HH:n=>vl(n.getHours()),H:n=>n.getHours(),h:n=>{let e=n.getHours();return e==0?12:e>12?e-12:e},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>vl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>vl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>$A(n.getMilliseconds())};function Jh(n,e){e=e||CA;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,l;for(;l=r.exec(n);)t.push(l[0][0]=="{"?AA[l[1]]:l[0]);return d=>{let u="";for(let b=0;b<t.length;b++)u+=typeof t[b]=="string"?t[b]:t[b](d,e);return u}}const EA=new Intl.DateTimeFormat().resolvedOptions().timeZone;function TA(n,e){let t;return e=="UTC"||e=="Etc/UTC"?t=new Date(+n+n.getTimezoneOffset()*6e4):e==EA?t=n:(t=new Date(n.toLocaleString("en-US",{timeZone:e})),t.setMilliseconds(n.getMilliseconds())),t}const Iv=n=>n%1==0,Ic=[1,2,2.5,5],MA=gl(10,-32,0,Ic),Nv=gl(10,0,32,Ic),RA=Nv.filter(Iv),Is=MA.concat(Nv),ed=`
1495
- `,Dv="{YYYY}",Fv=ed+Dv,Pv="{M}/{D}",yl=ed+Pv,Nc=yl+"/{YY}",Bv="{aa}",LA="{h}:{mm}",ka=LA+Bv,jv=ed+ka,Wv=":{ss}",Qt=null;function zv(n){let e=n*1e3,t=e*60,r=t*60,l=r*24,d=l*30,u=l*365,b=(n==1?gl(10,0,3,Ic).filter(Iv):gl(10,-3,0,Ic)).concat([e,e*5,e*10,e*15,e*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,l,l*2,l*3,l*4,l*5,l*6,l*7,l*8,l*9,l*10,l*15,d,d*2,d*3,d*4,d*6,u,u*2,u*5,u*10,u*25,u*50,u*100]);const p=[[u,Dv,Qt,Qt,Qt,Qt,Qt,Qt,1],[l*28,"{MMM}",Fv,Qt,Qt,Qt,Qt,Qt,1],[l,Pv,Fv,Qt,Qt,Qt,Qt,Qt,1],[r,"{h}"+Bv,Nc,Qt,yl,Qt,Qt,Qt,1],[t,ka,Nc,Qt,yl,Qt,Qt,Qt,1],[e,Wv,Nc+" "+ka,Qt,yl+" "+ka,Qt,jv,Qt,1],[n,Wv+".{fff}",Nc+" "+ka,Qt,yl+" "+ka,Qt,jv,Qt,1]];function g(o){return(c,f,h,i,a,m)=>{let w=[],x=a>=u,T=a>=d&&a<u,$=o(h),S=cn($*n,3),k=td($.getFullYear(),x?0:$.getMonth(),T||x?1:$.getDate()),L=cn(k*n,3);if(T||x){let N=T?a/d:0,R=x?a/u:0,O=S==L?S:cn(td(k.getFullYear()+R,k.getMonth()+N,1)*n,3),W=new Date(rr(O/n)),P=W.getFullYear(),D=W.getMonth();for(let A=0;O<=i;A++){let _=td(P+R*A,D+N*A,1),I=_-o(cn(_*n,3));O=cn((+_+I)*n,3),O<=i&&w.push(O)}}else{let N=a>=l?l:a,R=ui(h)-ui(S),O=L+R+Lc(S-L,N);w.push(O);let W=o(O),P=W.getHours()+W.getMinutes()/t+W.getSeconds()/r,D=a/r,A=c.axes[f]._space,_=m/A;for(;O=cn(O+a,n==1?0:3),!(O>i);)if(D>1){let I=ui(cn(P+D,6))%24,j=o(O).getHours()-I;j>1&&(j=-1),O-=j*r,P=(P+D)%24;let U=w[w.length-1];cn((O-U)/a,3)*_>=.7&&w.push(O)}else w.push(O)}return w}}return[b,p,g]}const[OA,IA,NA]=zv(1),[DA,FA,PA]=zv(.001);gl(2,-53,53,[1]);function Hv(n,e){return n.map(t=>t.map((r,l)=>l==0||l==8||r==null?r:e(l==1||t[8]==0?r:t[1]+r)))}function Uv(n,e){return(t,r,l,d,u)=>{let b=e.find(i=>u>=i[0])||e[e.length-1],p,g,o,c,f,h;return r.map(i=>{let a=n(i),m=a.getFullYear(),w=a.getMonth(),x=a.getDate(),T=a.getHours(),$=a.getMinutes(),S=a.getSeconds(),k=m!=p&&b[2]||w!=g&&b[3]||x!=o&&b[4]||T!=c&&b[5]||$!=f&&b[6]||S!=h&&b[7]||b[1];return p=m,g=w,o=x,c=T,f=$,h=S,k(a)})}}function BA(n,e){let t=Jh(e);return(r,l,d,u,b)=>l.map(p=>t(n(p)))}function td(n,e,t){return new Date(n,e,t)}function qv(n,e){return e(n)}const jA="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Vv(n,e){return(t,r,l,d)=>d==null?Wh:e(n(r))}function WA(n,e){let t=n.series[e];return t.width?t.stroke(n,e):t.points.width?t.points.stroke(n,e):null}function zA(n,e){return n.series[e].fill(n,e)}const HA={show:!0,live:!0,isolate:!1,mount:lA,markers:{show:!0,width:2,stroke:WA,fill:zA,dash:"solid"},idx:null,idxs:null,values:[]};function UA(n,e){let t=n.cursor.points,r=_i(),l=t.size(n,e);pn(r,hl,l),pn(r,dl,l);let d=l/-2;pn(r,"marginLeft",d),pn(r,"marginTop",d);let u=t.width(n,e,l);return u&&pn(r,"borderWidth",u),r}function qA(n,e){let t=n.series[e].points;return t._fill||t._stroke}function VA(n,e){let t=n.series[e].points;return t._stroke||t._fill}function KA(n,e){return n.series[e].points.size}const nd=[0,0];function GA(n,e,t){return nd[0]=e,nd[1]=t,nd}function Dc(n,e,t,r=!0){return l=>{l.button==0&&(!r||l.target==e)&&t(l)}}function rd(n,e,t,r=!0){return l=>{(!r||l.target==e)&&t(l)}}const YA={show:!0,x:!0,y:!0,lock:!1,move:GA,points:{one:!1,show:UA,size:KA,width:0,stroke:VA,fill:qA},bind:{mousedown:Dc,mouseup:Dc,click:Dc,dblclick:Dc,mousemove:rd,mouseleave:rd,mouseenter:rd},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,e,t,r,l)=>r-l,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Kv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},id=Gn({},Kv,{filter:Sv}),Gv=Gn({},id,{size:10}),Yv=Gn({},Kv,{show:!1}),od='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"',Xv="bold "+od,Qv=1.5,Zv={show:!0,scale:"x",stroke:Ph,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xv,side:2,grid:id,ticks:Gv,border:Yv,font:od,lineGap:Qv,rotate:0},XA="Value",QA="Time",Jv={show:!0,scale:"x",auto:!1,sorted:1,min:ln,max:-ln,idxs:[]};function ZA(n,e,t,r,l){return e.map(d=>d==null?"":Yh(d))}function JA(n,e,t,r,l,d,u){let b=[],p=Jo.get(l)||0;t=u?t:cn(Lc(t,l),p);for(let g=t;g<=r;g=cn(g+l,p))b.push(Object.is(g,-0)?0:g);return b}function sd(n,e,t,r,l,d,u){const b=[],p=n.scales[n.axes[e].scale].log,g=p==10?_o:bv,o=ui(g(t));l=ba(p,o),p==10&&(l=Is[Ui(l,Is)]);let c=t,f=l*p;p==10&&(f=Is[Ui(f,Is)]);do b.push(c),c=c+l,p==10&&!Jo.has(c)&&(c=cn(c,Jo.get(l))),c>=f&&(l=c,f=l*p,p==10&&(f=Is[Ui(f,Is)]));while(c<=r);return b}function eE(n,e,t,r,l,d,u){let b=n.scales[n.axes[e].scale].asinh,p=r>b?sd(n,e,Dr(b,t),r,l):[b],g=r>=0&&t<=0?[0]:[];return(t<-b?sd(n,e,Dr(b,-r),-t,l):[b]).reverse().map(o=>-o).concat(g,p)}const ey=/./,tE=/[12357]/,nE=/[125]/,ty=/1/,ad=(n,e,t,r)=>n.map((l,d)=>e==4&&l==0||d%r==0&&t.test(l.toExponential()[l<0?1:0])?l:null);function rE(n,e,t,r,l){let d=n.axes[t],u=d.scale,b=n.scales[u],p=n.valToPos,g=d._space,o=p(10,u),c=p(9,u)-o>=g?ey:p(7,u)-o>=g?tE:p(5,u)-o>=g?nE:ty;if(c==ty){let f=nr(p(1,u)-o);if(f<g)return ad(e.slice().reverse(),b.distr,c,Ci(g/f)).reverse()}return ad(e,b.distr,c,1)}function iE(n,e,t,r,l){let d=n.axes[t],u=d.scale,b=d._space,p=n.valToPos,g=nr(p(1,u)-p(2,u));return g<b?ad(e.slice().reverse(),3,ey,Ci(b/g)).reverse():e}function oE(n,e,t,r){return r==null?Wh:e==null?"":Yh(e)}const ny={show:!0,scale:"y",stroke:Ph,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xv,side:3,grid:id,ticks:Gv,border:Yv,font:od,lineGap:Qv,rotate:0};function sE(n,e){let t=3+(n||1)*2;return cn(t*e,3)}function aE(n,e){let{scale:t,idxs:r}=n.series[0],l=n._data[0],d=n.valToPos(l[r[0]],t,!0),u=n.valToPos(l[r[1]],t,!0),b=nr(u-d),p=n.series[e],g=b/(p.points.space*Kt);return r[1]-r[0]<=g}const ry={scale:null,auto:!0,sorted:0,min:ln,max:-ln},iy=(n,e,t,r,l)=>l,oy={show:!0,auto:!0,sorted:0,gaps:iy,alpha:1,facets:[Gn({},ry,{scale:"x"}),Gn({},ry,{scale:"y"})]},sy={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:iy,alpha:1,points:{show:aE,filter:null},values:null,min:ln,max:-ln,idxs:[],path:null,clip:null};function lE(n,e,t,r,l){return t/10}const ay={time:O$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},cE=Gn({},ay,{time:!1,ori:1}),ly={};function cy(n,e){let t=ly[n];return t||(t={key:n,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(l=>l!=r)},pub(r,l,d,u,b,p,g){for(let o=0;o<t.plots.length;o++)t.plots[o]!=l&&t.plots[o].pub(r,l,d,u,b,p,g)}},n!=null&&(ly[n]=t)),t}const Sa=1,ld=2;function Ns(n,e,t){const r=n.mode,l=n.series[e],d=r==2?n._data[e]:n._data,u=n.scales,b=n.bbox;let p=d[0],g=r==2?d[1]:d[e],o=r==2?u[l.facets[0].scale]:u[n.series[0].scale],c=r==2?u[l.facets[1].scale]:u[l.scale],f=b.left,h=b.top,i=b.width,a=b.height,m=n.valToPosH,w=n.valToPosV;return o.ori==0?t(l,p,g,o,c,m,w,f,h,i,a,Pc,_a,jc,dy,py):t(l,p,g,o,c,w,m,h,f,a,i,Bc,Ca,hd,fy,gy)}function cd(n,e){let t=0,r=0,l=Ut(n.bands,Zh);for(let d=0;d<l.length;d++){let u=l[d];u.series[0]==e?t=u.dir:u.series[1]==e&&(u.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function uE(n,e,t,r,l){let d=n.mode,u=n.series[e],b=d==2?u.facets[1].scale:u.scale,p=n.scales[b];return l==-1?p.min:l==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Co(n,e,t,r,l,d){return Ns(n,e,(u,b,p,g,o,c,f,h,i,a,m)=>{let w=u.pxRound;const x=g.dir*(g.ori==0?1:-1),T=g.ori==0?_a:Ca;let $,S;x==1?($=t,S=r):($=r,S=t);let k=w(c(b[$],g,a,h)),L=w(f(p[$],o,m,i)),N=w(c(b[S],g,a,h)),R=w(f(d==1?o.max:o.min,o,m,i)),O=new Path2D(l);return T(O,N,R),T(O,k,R),T(O,k,L),O})}function Fc(n,e,t,r,l,d){let u=null;if(n.length>0){u=new Path2D;const b=e==0?jc:hd;let p=t;for(let c=0;c<n.length;c++){let f=n[c];if(f[1]>f[0]){let h=f[0]-p;h>0&&b(u,p,r,h,r+d),p=f[1]}}let g=t+l-p,o=10;g>0&&b(u,p,r-o/2,g,r+d+o)}return u}function hE(n,e,t){let r=n[n.length-1];r&&r[0]==e?r[1]=t:n.push([e,t])}function ud(n,e,t,r,l,d,u){let b=[],p=n.length;for(let g=l==1?t:r;g>=t&&g<=r;g+=l)if(e[g]===null){let o=g,c=g;if(l==1)for(;++g<=r&&e[g]===null;)c=g;else for(;--g>=t&&e[g]===null;)c=g;let f=d(n[o]),h=c==o?f:d(n[c]),i=o-l;f=u<=0&&i>=0&&i<p?d(n[i]):f;let a=c+l;h=u>=0&&a>=0&&a<p?d(n[a]):h,h>=f&&b.push([f,h])}return b}function uy(n){return n==0?kv:n==1?rr:e=>Os(e,n)}function hy(n){let e=n==0?Pc:Bc,t=n==0?(l,d,u,b,p,g)=>{l.arcTo(d,u,b,p,g)}:(l,d,u,b,p,g)=>{l.arcTo(u,d,p,b,g)},r=n==0?(l,d,u,b,p)=>{l.rect(d,u,b,p)}:(l,d,u,b,p)=>{l.rect(u,d,p,b)};return(l,d,u,b,p,g=0,o=0)=>{g==0&&o==0?r(l,d,u,b,p):(g=qi(g,b/2,p/2),o=qi(o,b/2,p/2),e(l,d+g,u),t(l,d+b,u,d+b,u+p,g),t(l,d+b,u+p,d,u+p,o),t(l,d,u+p,d,u,o),t(l,d,u,d+b,u,g),l.closePath())}}const Pc=(n,e,t)=>{n.moveTo(e,t)},Bc=(n,e,t)=>{n.moveTo(t,e)},_a=(n,e,t)=>{n.lineTo(e,t)},Ca=(n,e,t)=>{n.lineTo(t,e)},jc=hy(0),hd=hy(1),dy=(n,e,t,r,l,d)=>{n.arc(e,t,r,l,d)},fy=(n,e,t,r,l,d)=>{n.arc(t,e,r,l,d)},py=(n,e,t,r,l,d,u)=>{n.bezierCurveTo(e,t,r,l,d,u)},gy=(n,e,t,r,l,d,u)=>{n.bezierCurveTo(t,e,l,r,u,d)};function my(n){return(e,t,r,l,d)=>Ns(e,t,(u,b,p,g,o,c,f,h,i,a,m)=>{let{pxRound:w,points:x}=u,T,$;g.ori==0?(T=Pc,$=dy):(T=Bc,$=fy);const S=cn(x.width*Kt,3);let k=(x.size-x.width)/2*Kt,L=cn(k*2,3),N=new Path2D,R=new Path2D,{left:O,top:W,width:P,height:D}=e.bbox;jc(R,O-L,W-L,P+L*2,D+L*2);const A=_=>{if(p[_]!=null){let I=w(c(b[_],g,a,h)),j=w(f(p[_],o,m,i));T(N,I+k,j),$(N,I,j,k,0,Rc*2)}};if(d)d.forEach(A);else for(let _=r;_<=l;_++)A(_);return{stroke:S>0?N:null,fill:N,clip:R,flags:Sa|ld}})}function vy(n){return(e,t,r,l,d,u)=>{r!=l&&(d!=r&&u!=r&&n(e,t,r),d!=l&&u!=l&&n(e,t,l),n(e,t,u))}}const dE=vy(_a),fE=vy(Ca);function yy(n){const e=Ut(n==null?void 0:n.alignGaps,0);return(t,r,l,d)=>Ns(t,r,(u,b,p,g,o,c,f,h,i,a,m)=>{[l,d]=Ec(p,l,d);let w=u.pxRound,x=P=>w(c(P,g,a,h)),T=P=>w(f(P,o,m,i)),$,S;g.ori==0?($=_a,S=dE):($=Ca,S=fE);const k=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Sa},N=L.stroke;let R=!1;if(d-l>=a*4){let P=ae=>t.posToVal(ae,g.key,!0),D=null,A=null,_,I,j,U=x(b[k==1?l:d]),K=x(b[l]),Z=x(b[d]),J=P(k==1?K+1:Z-1);for(let ae=k==1?l:d;ae>=l&&ae<=d;ae+=k){let ne=b[ae],se=(k==1?ne<J:ne>J)?U:x(ne),ce=p[ae];se==U?ce!=null?(I=ce,D==null?($(N,se,T(I)),_=D=A=I):I<D?D=I:I>A&&(A=I)):ce===null&&(R=!0):(D!=null&&S(N,U,T(D),T(A),T(_),T(I)),ce!=null?(I=ce,$(N,se,T(I)),D=A=_=I):(D=A=null,ce===null&&(R=!0)),U=se,J=P(U+k))}D!=null&&D!=A&&j!=U&&S(N,U,T(D),T(A),T(_),T(I))}else for(let P=k==1?l:d;P>=l&&P<=d;P+=k){let D=p[P];D===null?R=!0:D!=null&&$(N,x(b[P]),T(D))}let[O,W]=cd(t,r);if(u.fill!=null||O!=0){let P=L.fill=new Path2D(N),D=u.fillTo(t,r,u.min,u.max,O),A=T(D),_=x(b[l]),I=x(b[d]);k==-1&&([I,_]=[_,I]),$(P,I,A),$(P,_,A)}if(!u.spanGaps){let P=[];R&&P.push(...ud(b,p,l,d,k,x,e)),L.gaps=P=u.gaps(t,r,l,d,P),L.clip=Fc(P,g.ori,h,i,a,m)}return W!=0&&(L.band=W==2?[Co(t,r,l,d,N,-1),Co(t,r,l,d,N,1)]:Co(t,r,l,d,N,W)),L})}function pE(n){const e=Ut(n.align,1),t=Ut(n.ascDesc,!1),r=Ut(n.alignGaps,0),l=Ut(n.extend,!1);return(d,u,b,p)=>Ns(d,u,(g,o,c,f,h,i,a,m,w,x,T)=>{[b,p]=Ec(c,b,p);let $=g.pxRound,{left:S,width:k}=d.bbox,L=Z=>$(i(Z,f,x,m)),N=Z=>$(a(Z,h,T,w)),R=f.ori==0?_a:Ca;const O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Sa},W=O.stroke,P=f.dir*(f.ori==0?1:-1);let D=N(c[P==1?b:p]),A=L(o[P==1?b:p]),_=A,I=A;l&&e==-1&&(I=S,R(W,I,D)),R(W,A,D);for(let Z=P==1?b:p;Z>=b&&Z<=p;Z+=P){let J=c[Z];if(J==null)continue;let ae=L(o[Z]),ne=N(J);e==1?R(W,ae,D):R(W,_,ne),R(W,ae,ne),D=ne,_=ae}let j=_;l&&e==1&&(j=S+k,R(W,j,D));let[U,K]=cd(d,u);if(g.fill!=null||U!=0){let Z=O.fill=new Path2D(W),J=g.fillTo(d,u,g.min,g.max,U),ae=N(J);R(Z,j,ae),R(Z,I,ae)}if(!g.spanGaps){let Z=[];Z.push(...ud(o,c,b,p,P,L,r));let J=g.width*Kt/2,ae=t||e==1?J:-J,ne=t||e==-1?-J:J;Z.forEach(se=>{se[0]+=ae,se[1]+=ne}),O.gaps=Z=g.gaps(d,u,b,p,Z),O.clip=Fc(Z,f.ori,m,w,x,T)}return K!=0&&(O.band=K==2?[Co(d,u,b,p,W,-1),Co(d,u,b,p,W,1)]:Co(d,u,b,p,W,K)),O})}function by(n,e,t,r,l,d,u=ln){if(n.length>1){let b=null;for(let p=0,g=1/0;p<n.length;p++)if(e[p]!==void 0){if(b!=null){let o=nr(n[p]-n[b]);o<g&&(g=o,u=nr(t(n[p],r,l,d)-t(n[b],r,l,d)))}b=p}}return u}function gE(n){n=n||ml;const e=Ut(n.size,[.6,ln,1]),t=n.align||0,r=n.gap||0;let l=n.radius;l=l==null?[0,0]:typeof l=="number"?[l,0]:l;const d=Ft(l),u=1-e[0],b=Ut(e[1],ln),p=Ut(e[2],1),g=Ut(n.disp,ml),o=Ut(n.each,h=>{}),{fill:c,stroke:f}=g;return(h,i,a,m)=>Ns(h,i,(w,x,T,$,S,k,L,N,R,O,W)=>{let P=w.pxRound,D=t,A=r*Kt,_=b*Kt,I=p*Kt,j,U;$.ori==0?[j,U]=d(h,i):[U,j]=d(h,i);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?jc:hd,J=$.ori==0?o:(qe,qt,gn,Qn,Br,Ar,Cn)=>{o(qe,qt,gn,Br,Qn,Cn,Ar)},ae=Ut(h.bands,Zh).find(qe=>qe.series[0]==i),ne=ae!=null?ae.dir:0,se=w.fillTo(h,i,w.min,w.max,ne),ce=P(L(se,S,W,R)),he,ge,Ee,Te=O,Re=P(w.width*Kt),Xe=!1,Ke=null,dt=null,rt=null,gt=null;c!=null&&(Re==0||f!=null)&&(Xe=!0,Ke=c.values(h,i,a,m),dt=new Map,new Set(Ke).forEach(qe=>{qe!=null&&dt.set(qe,new Path2D)}),Re>0&&(rt=f.values(h,i,a,m),gt=new Map,new Set(rt).forEach(qe=>{qe!=null&&gt.set(qe,new Path2D)})));let{x0:tn,size:Wn}=g;if(tn!=null&&Wn!=null){D=1,x=tn.values(h,i,a,m),tn.unit==2&&(x=x.map(qt=>h.posToVal(N+qt*O,$.key,!0)));let qe=Wn.values(h,i,a,m);Wn.unit==2?ge=qe[0]*O:ge=k(qe[0],$,O,N)-k(0,$,O,N),Te=by(x,T,k,$,O,N,Te),Ee=Te-ge+A}else Te=by(x,T,k,$,O,N,Te),Ee=Te*u+A,ge=Te-Ee;Ee<1&&(Ee=0),Re>=ge/2&&(Re=0),Ee<5&&(P=kv);let Zt=Ee>0,hi=Te-Ee-(Zt?Re:0);ge=P(Qh(hi,I,_)),he=(D==0?ge/2:D==K?0:ge)-D*K*((D==0?A/2:0)+(Zt?Re/2:0));const _n={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Xn=Xe?null:new Path2D;let ur=null;if(ae!=null)ur=h.data[ae.series[1]];else{let{y0:qe,y1:qt}=g;qe!=null&&qt!=null&&(T=qt.values(h,i,a,m),ur=qe.values(h,i,a,m))}let Pr=j*ge,yt=U*ge;for(let qe=K==1?a:m;qe>=a&&qe<=m;qe+=K){let qt=T[qe];if(qt==null)continue;if(ur!=null){let nn=ur[qe]??0;if(qt-nn==0)continue;ce=L(nn,S,W,R)}let gn=$.distr!=2||g!=null?x[qe]:qe,Qn=k(gn,$,O,N),Br=L(Ut(qt,se),S,W,R),Ar=P(Qn-he),Cn=P(Dr(Br,ce)),ir=P(qi(Br,ce)),hr=Cn-ir;if(qt!=null){let nn=qt<0?yt:Pr,or=qt<0?Pr:yt;Xe?(Re>0&&rt[qe]!=null&&Z(gt.get(rt[qe]),Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),Ke[qe]!=null&&Z(dt.get(Ke[qe]),Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or)):Z(Xn,Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),J(h,i,qe,Ar-Re/2,ir,ge+Re,hr)}}return Re>0?_n.stroke=Xe?gt:Xn:Xe||(_n._fill=w.width==0?w._fill:w._stroke??w._fill,_n.width=0),_n.fill=Xe?dt:Xn,_n})}function mE(n,e){const t=Ut(e==null?void 0:e.alignGaps,0);return(r,l,d,u)=>Ns(r,l,(b,p,g,o,c,f,h,i,a,m,w)=>{[d,u]=Ec(g,d,u);let x=b.pxRound,T=j=>x(f(j,o,m,i)),$=j=>x(h(j,c,w,a)),S,k,L;o.ori==0?(S=Pc,L=_a,k=py):(S=Bc,L=Ca,k=gy);const N=o.dir*(o.ori==0?1:-1);let R=T(p[N==1?d:u]),O=R,W=[],P=[];for(let j=N==1?d:u;j>=d&&j<=u;j+=N)if(g[j]!=null){let U=p[j],K=T(U);W.push(O=K),P.push($(g[j]))}const D={stroke:n(W,P,S,L,k,x),fill:null,clip:null,band:null,gaps:null,flags:Sa},A=D.stroke;let[_,I]=cd(r,l);if(b.fill!=null||_!=0){let j=D.fill=new Path2D(A),U=b.fillTo(r,l,b.min,b.max,_),K=$(U);L(j,O,K),L(j,R,K)}if(!b.spanGaps){let j=[];j.push(...ud(p,g,d,u,N,T,t)),D.gaps=j=b.gaps(r,l,d,u,j),D.clip=Fc(j,o.ori,i,a,m,w)}return I!=0&&(D.band=I==2?[Co(r,l,d,u,A,-1),Co(r,l,d,u,A,1)]:Co(r,l,d,u,A,I)),D})}function vE(n){return mE(yE,n)}function yE(n,e,t,r,l,d){const u=n.length;if(u<2)return null;const b=new Path2D;if(t(b,n[0],e[0]),u==2)r(b,n[1],e[1]);else{let p=Array(u),g=Array(u-1),o=Array(u-1),c=Array(u-1);for(let f=0;f<u-1;f++)o[f]=e[f+1]-e[f],c[f]=n[f+1]-n[f],g[f]=o[f]/c[f];p[0]=g[0];for(let f=1;f<u-1;f++)g[f]===0||g[f-1]===0||g[f-1]>0!=g[f]>0?p[f]=0:(p[f]=3*(c[f-1]+c[f])/((2*c[f]+c[f-1])/g[f-1]+(c[f]+2*c[f-1])/g[f]),isFinite(p[f])||(p[f]=0));p[u-1]=g[u-2];for(let f=0;f<u-1;f++)l(b,n[f]+c[f]/3,e[f]+p[f]*c[f]/3,n[f+1]-c[f]/3,e[f+1]-p[f+1]*c[f]/3,n[f+1],e[f+1])}return b}const dd=new Set;function wy(){for(let n of dd)n.syncRect(!0)}va&&(Rs(Z$,ya,wy),Rs(J$,ya,wy,!0),Rs($c,ya,()=>{_r.pxRatio=Kt}));const bE=yy(),wE=my();function xy(n,e,t,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((l,d)=>fd(l,d,e,t))}function xE(n,e){return n.map((t,r)=>r==0?{}:Gn({},e,t))}function fd(n,e,t,r){return Gn({},e==0?t:r,n)}function ky(n,e,t){return e==null?wa:[e,t]}const kE=ky;function SE(n,e,t){return e==null?wa:Mc(e,t,Gh,!0)}function Sy(n,e,t,r){return e==null?wa:Tc(e,t,n.scales[r].log,!1)}const _E=Sy;function _y(n,e,t,r){return e==null?wa:Kh(e,t,n.scales[r].log,!1)}const CE=_y;function $E(n,e,t,r,l){let d=Dr(wv(n),wv(e)),u=e-n,b=Ui(l/r*u,t);do{let p=t[b],g=r*p/u;if(g>=l&&d+(p<5?Jo.get(p):0)<=17)return[p,g]}while(++b<t.length);return[0,0]}function Cy(n){let e,t;return n=n.replace(/(\d+)px/,(r,l)=>(e=rr((t=+l)*Kt))+"px"),[n,e,t]}function AE(n){n.show&&[n.font,n.labelFont].forEach(e=>{let t=cn(e[2]*Kt,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t})}function _r(n,e,t){const r={mode:Ut(n.mode,1)},l=r.mode;function d(q,X,ie,oe){let pe=X.valToPct(q);return oe+ie*(X.dir==-1?1-pe:pe)}function u(q,X,ie,oe){let pe=X.valToPct(q);return oe+ie*(X.dir==-1?pe:1-pe)}function b(q,X,ie,oe){return X.ori==0?d(q,X,ie,oe):u(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=u;let p=!1;r.status=0;const g=r.root=_i(I$);if(n.id!=null&&(g.id=n.id),li(g,n.class),n.title){let q=_i(F$,g);q.textContent=n.title}const o=Hi("canvas"),c=r.ctx=o.getContext("2d"),f=_i(P$,g);Rs("click",f,q=>{q.target===i&&(Xt!=Ti||Bt!=bo)&&Rn.click(r,q)},!0);const h=r.under=_i(B$,f);f.appendChild(o);const i=r.over=_i(j$,f);n=xa(n);const a=+Ut(n.pxAlign,1),m=uy(a);(n.plugins||[]).forEach(q=>{q.opts&&(n=q.opts(r,n)||n)});const w=n.ms||.001,x=r.series=l==1?xy(n.series||[],Jv,sy,!1):xE(n.series||[null],oy),T=r.axes=xy(n.axes||[],Zv,ny,!0),$=r.scales={},S=r.bands=n.bands||[];S.forEach(q=>{q.fill=Ft(q.fill||null),q.dir=Ut(q.dir,-1)});const k=l==2?x[1].facets[0].scale:x[0].scale,L={axes:Lo,series:Da},N=(n.drawOrder||["axes","series"]).map(q=>L[q]);function R(q){const X=q.distr==3?ie=>_o(ie>0?ie:q.clamp(r,ie,q.min,q.max,q.key)):q.distr==4?ie=>Xh(ie,q.asinh):q.distr==100?ie=>q.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=q,Me=we-pe;return(oe-pe)/Me}}function O(q){let X=$[q];if(X==null){let ie=(n.scales||ml)[q]||ml;if(ie.from!=null){O(ie.from);let oe=Gn({},$[ie.from],ie,{key:q});oe.valToPct=R(oe),$[q]=oe}else{X=$[q]=Gn({},q==k?ay:cE,ie),X.key=q;let oe=X.time,pe=X.range,we=es(pe);if((q!=k||l==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?mv:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?mv:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&Oc(pe))){let Me=pe;pe=(Pe,je,Ue)=>je==null?wa:Mc(je,Ue,Me)}X.range=Ft(pe||(oe?kE:q==k?X.distr==3?_E:X.distr==4?CE:ky:X.distr==3?Sy:X.distr==4?_y:SE)),X.auto=Ft(we?!1:X.auto),X.clamp=Ft(X.clamp||lE),X._min=X._max=null,X.valToPct=R(X)}}}O("x"),O("y"),l==1&&x.forEach(q=>{O(q.scale)}),T.forEach(q=>{O(q.scale)});for(let q in n.scales)O(q);const W=$[k],P=W.distr;let D,A;W.ori==0?(li(g,N$),D=d,A=u):(li(g,D$),D=u,A=d);const _={};for(let q in $){let X=$[q];(X.min!=null||X.max!=null)&&(_[q]={min:X.min,max:X.max},X.min=X.max=null)}const I=n.tzDate||(q=>new Date(rr(q/w))),j=n.fmtDate||Jh,U=w==1?NA(I):PA(I),K=Uv(I,Hv(w==1?IA:FA,j)),Z=Vv(I,qv(jA,j)),J=[],ae=r.legend=Gn({},HA,n.legend),ne=r.cursor=Gn({},YA,{drag:{y:l==2}},n.cursor),se=ae.show,ce=ne.show,he=ae.markers;ae.idxs=J,he.width=Ft(he.width),he.dash=Ft(he.dash),he.stroke=Ft(he.stroke),he.fill=Ft(he.fill);let ge,Ee,Te,Re=[],Xe=[],Ke,dt=!1,rt={};if(ae.live){const q=x[1]?x[1].values:null;dt=q!=null,Ke=dt?q(r,1,0):{_:0};for(let X in Ke)rt[X]=Wh}if(se)if(ge=Hi("table",V$,g),Te=Hi("tbody",null,ge),ae.mount(r,ge),dt){Ee=Hi("thead",null,ge,Te);let q=Hi("tr",null,Ee);Hi("th",null,q);for(var gt in Ke)Hi("th",ev,q).textContent=gt}else li(ge,G$),ae.live&&li(ge,K$);const tn={show:!0},Wn={show:!1};function Zt(q,X){if(X==0&&(dt||!ae.live||l==2))return wa;let ie=[],oe=Hi("tr",Y$,Te,Te.childNodes[X]);li(oe,q.class),q.show||li(oe,Ms);let pe=Hi("th",null,oe);if(he.show){let Pe=_i(X$,pe);if(X>0){let je=he.width(r,X);je&&(Pe.style.border=je+"px "+he.dash(r,X)+" "+he.stroke(r,X)),Pe.style.background=he.fill(r,X)}}let we=_i(ev,pe);q.label instanceof HTMLElement?we.appendChild(q.label):we.textContent=q.label,X>0&&(he.show||(we.style.color=q.width>0?he.stroke(r,X):he.fill(r,X)),_n("click",pe,Pe=>{if(ne._lock)return;Qi(Pe);let je=x.indexOf(q);if((Pe.ctrlKey||Pe.metaKey)!=ae.isolate){let Ue=x.some((Ge,Qe)=>Qe>0&&Qe!=je&&Ge.show);x.forEach((Ge,Qe)=>{Qe>0&&Wr(Qe,Ue?Qe==je?tn:Wn:tn,!0,lt.setSeries)})}else Wr(je,{show:!q.show},!0,lt.setSeries)},!1),Zi&&_n(iv,pe,Pe=>{ne._lock||(Qi(Pe),Wr(x.indexOf(q),Li,!0,lt.setSeries))},!1));for(var Me in Ke){let Pe=Hi("td",Q$,oe);Pe.textContent="--",ie.push(Pe)}return[oe,ie]}const hi=new Map;function _n(q,X,ie,oe=!0){const pe=hi.get(X)||{},we=ne.bind[q](r,X,ie,oe);we&&(Rs(q,X,pe[q]=we),hi.set(X,pe))}function Xn(q,X,ie){const oe=hi.get(X)||{};for(let pe in oe)(q==null||pe==q)&&(Vh(pe,X,oe[pe]),delete oe[pe]);q==null&&hi.delete(X)}let ur=0,Pr=0,yt=0,qe=0,qt=0,gn=0,Qn=qt,Br=gn,Ar=yt,Cn=qe,ir=0,hr=0,nn=0,or=0;r.bbox={};let $o=!1,Gi=!1,Yi=!1,Xi=!1,Ao=!1,vr=!1;function Eo(q,X,ie){(ie||q!=r.width||X!=r.height)&&ts(q,X),no(!1),Yi=!0,Gi=!0,yo()}function ts(q,X){r.width=ur=yt=q,r.height=Pr=qe=X,qt=gn=0,zs(),Oa();let ie=r.bbox;ir=ie.left=Os(qt*Kt,.5),hr=ie.top=Os(gn*Kt,.5),nn=ie.width=Os(yt*Kt,.5),or=ie.height=Os(qe*Kt,.5)}const Ml=3;function di(){let q=!1,X=0;for(;!q;){X++;let ie=Fa(X),oe=Il(X);q=X==Ml||ie&&oe,q||(ts(r.width,r.height),Gi=!0)}}function Rl({width:q,height:X}){Eo(q,X)}r.setSize=Rl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;T.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Pe}=pe,je=Me%2,Ue=pe.label!=null?pe.labelSize:0,Ge=Pe+Ue;Ge>0&&(je?(yt-=Ge,Me==3?(qt+=Ge,oe=!0):ie=!0):(qe-=Ge,Me==0?(gn+=Ge,q=!0):X=!0))}}),eo[0]=q,eo[1]=ie,eo[2]=X,eo[3]=oe,yt-=Mr[1]+Mr[3],qt+=Mr[3],qe-=Mr[2]+Mr[0],gn+=Mr[0]}function Oa(){let q=qt+yt,X=gn+qe,ie=qt,oe=gn;function pe(we,Me){switch(we){case 1:return q+=Me,q-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}T.forEach((we,Me)=>{if(we.show&&we._show){let Pe=we.side;we._pos=pe(Pe,we._size),we.label!=null&&(we._lpos=pe(Pe,we.labelSize))}})}if(ne.dataIdx==null){let q=ne.hover,X=q.skip=new Set(q.skip??[]);X.add(void 0);let ie=q.prox=Ft(q.prox),oe=q.bias??(q.bias=0);ne.dataIdx=(pe,we,Me,Pe)=>{if(we==0)return Me;let je=Me,Ue=ie(pe,we,Me,Pe)??ln,Ge=Ue>=0&&Ue<ln,Qe=W.ori==0?yt:qe,vt=ne.left,It=e[0],wt=e[we];if(X.has(wt[Me])){je=null;let Lt=null,ut=null,it;if(oe==0||oe==-1)for(it=Me;Lt==null&&it-- >0;)X.has(wt[it])||(Lt=it);if(oe==0||oe==1)for(it=Me;ut==null&&it++<wt.length;)X.has(wt[it])||(ut=it);if(Lt!=null||ut!=null)if(Ge){let un=Lt==null?-1/0:D(It[Lt],W,Qe,0),wn=ut==null?1/0:D(It[ut],W,Qe,0),er=vt-un,Wt=wn-vt;er<=Wt?er<=Ue&&(je=Lt):Wt<=Ue&&(je=ut)}else je=ut==null?Lt:Lt==null?ut:Me-Lt<=ut-Me?Lt:ut}else Ge&&nr(vt-D(It[Me],W,Qe,0))>Ue&&(je=null);return je}}const Qi=q=>{ne.event=q};ne.idxs=J,ne._lock=!1;let zn=ne.points;zn.show=Ft(zn.show),zn.size=Ft(zn.size),zn.stroke=Ft(zn.stroke),zn.width=Ft(zn.width),zn.fill=Ft(zn.fill);const Er=r.focus=Gn({},n.focus||{alpha:.3},ne.focus),Zi=Er.prox>=0,$n=Zi&&zn.one;let Tr=[],po=[],Ji=[];function Hs(q,X){let ie=zn.show(r,X);if(ie instanceof HTMLElement)return li(ie,q$),li(ie,q.class),lo(ie,-10,-10,yt,qe),i.insertBefore(ie,Tr[X]),ie}function Ia(q,X){if(l==1||X>0){let ie=l==1&&$[q.scale].time,oe=q.value;q.value=ie?Tv(oe)?Vv(I,qv(oe,j)):oe||Z:oe||oE,q.label=q.label||(ie?QA:XA)}if($n||X>0){q.width=q.width==null?1:q.width,q.paths=q.paths||bE||cA,q.fillTo=Ft(q.fillTo||uE),q.pxAlign=+Ut(q.pxAlign,a),q.pxRound=uy(q.pxAlign),q.stroke=Ft(q.stroke||null),q.fill=Ft(q.fill||null),q._stroke=q._fill=q._paths=q._focus=null;let ie=sE(Dr(1,q.width),1),oe=q.points=Gn({},{size:ie,width:Dr(1,ie*.2),stroke:q.stroke,space:ie*2,paths:wE,_stroke:null,_fill:null},q.points);oe.show=Ft(oe.show),oe.filter=Ft(oe.filter),oe.fill=Ft(oe.fill),oe.stroke=Ft(oe.stroke),oe.paths=Ft(oe.paths),oe.pxAlign=q.pxAlign}if(se){let ie=Zt(q,X);Re.splice(X,0,ie[0]),Xe.splice(X,0,ie[1]),ae.values.push(null)}if(ce){J.splice(X,0,null);let ie=null;$n?X==0&&(ie=Hs(q,X)):X>0&&(ie=Hs(q,X)),Tr.splice(X,0,ie),po.splice(X,0,0),Ji.splice(X,0,0)}tt("addSeries",X)}function Ll(q,X){X=X??x.length,q=l==1?fd(q,X,Jv,sy):fd(q,X,{},oy),x.splice(X,0,q),Ia(x[X],X)}r.addSeries=Ll;function Ol(q){if(x.splice(q,1),se){ae.values.splice(q,1),Xe.splice(q,1);let X=Re.splice(q,1)[0];Xn(null,X.firstChild),X.remove()}ce&&(J.splice(q,1),Tr.splice(q,1)[0].remove(),po.splice(q,1),Ji.splice(q,1)),tt("delSeries",q)}r.delSeries=Ol;const eo=[!1,!1,!1,!1];function fi(q,X){if(q._show=q.show,q.show){let ie=q.side%2,oe=$[q.scale];oe==null&&(q.scale=ie?x[1].scale:k,oe=$[q.scale]);let pe=oe.time;q.size=Ft(q.size),q.space=Ft(q.space),q.rotate=Ft(q.rotate),es(q.incrs)&&q.incrs.forEach(Me=>{!Jo.has(Me)&&Jo.set(Me,Av(Me))}),q.incrs=Ft(q.incrs||(oe.distr==2?RA:pe?w==1?OA:DA:Is)),q.splits=Ft(q.splits||(pe&&oe.distr==1?U:oe.distr==3?sd:oe.distr==4?eE:JA)),q.stroke=Ft(q.stroke),q.grid.stroke=Ft(q.grid.stroke),q.ticks.stroke=Ft(q.ticks.stroke),q.border.stroke=Ft(q.border.stroke);let we=q.values;q.values=es(we)&&!es(we[0])?Ft(we):pe?es(we)?Uv(I,Hv(we,j)):Tv(we)?BA(I,we):we||K:we||ZA,q.filter=Ft(q.filter||(oe.distr>=3&&oe.log==10?rE:oe.distr==3&&oe.log==2?iE:Sv)),q.font=Cy(q.font),q.labelFont=Cy(q.labelFont),q._size=q.size(r,null,X,0),q._space=q._rotate=q._incrs=q._found=q._splits=q._values=null,q._size>0&&(eo[X]=!0,q._el=_i(W$,f))}}function Pt(q,X,ie,oe){let[pe,we,Me,Pe]=ie,je=X%2,Ue=0;return je==0&&(Pe||we)&&(Ue=X==0&&!pe||X==2&&!Me?rr(Zv.size/3):0),je==1&&(pe||Me)&&(Ue=X==1&&!we||X==3&&!Pe?rr(ny.size/2):0),Ue}const Na=r.padding=(n.padding||[Pt,Pt,Pt,Pt]).map(q=>Ft(Ut(q,Pt))),Mr=r._padding=Na.map((q,X)=>q(r,X,eo,0));let Hn,hn=null,Mn=null;const $i=l==1?x[0].idxs:null;let Rr=null,Ai=!1;function ns(q,X){if(e=q??[],r.data=r._data=e,l==2){Hn=0;for(let ie=1;ie<x.length;ie++)Hn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Rr=e[0],Hn=Rr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Hn);for(let pe=0;pe<Hn;pe++)oe[pe]=pe}r._data=e=ie}if(no(!0),tt("setData"),P==2&&(Yi=!0),X!==!1){let ie=W;ie.auto(r,Ai)?Us():Zn(k,ie.min,ie.max),Xi=Xi||ne.left>=0,vr=!0,yo()}}r.setData=ns;function Us(){Ai=!0;let q,X;l==1&&(Hn>0?(hn=$i[0]=0,Mn=$i[1]=Hn-1,q=e[0][hn],X=e[0][Mn],P==2?(q=hn,X=Mn):q==X&&(P==3?[q,X]=Tc(q,q,W.log,!1):P==4?[q,X]=Kh(q,q,W.log,!1):W.time?X=q+rr(86400/w):[q,X]=Mc(q,X,Gh,!0))):(hn=$i[0]=q=null,Mn=$i[1]=X=null)),Zn(k,q,X)}let go,ti,To,rs,ni,is,qs,Vs,os,sr;function Ks(q,X,ie,oe,pe,we){q??(q=nv),ie??(ie=Zh),oe??(oe="butt"),pe??(pe=nv),we??(we="round"),q!=go&&(c.strokeStyle=go=q),pe!=ti&&(c.fillStyle=ti=pe),X!=To&&(c.lineWidth=To=X),we!=ni&&(c.lineJoin=ni=we),oe!=is&&(c.lineCap=is=oe),ie!=rs&&c.setLineDash(rs=ie)}function Mo(q,X,ie,oe){X!=ti&&(c.fillStyle=ti=X),q!=qs&&(c.font=qs=q),ie!=Vs&&(c.textAlign=Vs=ie),oe!=os&&(c.textBaseline=os=oe)}function ss(q,X,ie,oe,pe=0){if(oe.length>0&&q.auto(r,Ai)&&(X==null||X.min==null)){let we=Ut(hn,0),Me=Ut(Mn,oe.length-1),Pe=ie.min==null?rA(oe,we,Me,pe,q.distr==3):[ie.min,ie.max];q.min=qi(q.min,ie.min=Pe[0]),q.max=Dr(q.max,ie.max=Pe[1])}}const as={min:null,max:null};function mo(){for(let oe in $){let pe=$[oe];_[oe]==null&&(pe.min==null||_[k]!=null&&pe.auto(r,Ai))&&(_[oe]=as)}for(let oe in $){let pe=$[oe];_[oe]==null&&pe.from!=null&&_[pe.from]!=null&&(_[oe]=as)}_[k]!=null&&no(!0);let q={};for(let oe in _){let pe=_[oe];if(pe!=null){let we=q[oe]=xa($[oe],dA);if(pe.min!=null)Gn(we,pe);else if(oe!=k||l==2)if(Hn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=ln,we.max=-ln}}if(Hn>0){x.forEach((oe,pe)=>{if(l==1){let we=oe.scale,Me=_[we];if(Me==null)return;let Pe=q[we];if(pe==0){let je=Pe.range(r,Pe.min,Pe.max,we);Pe.min=je[0],Pe.max=je[1],hn=Ui(Pe.min,e[0]),Mn=Ui(Pe.max,e[0]),Mn-hn>1&&(e[0][hn]<Pe.min&&hn++,e[0][Mn]>Pe.max&&Mn--),oe.min=Rr[hn],oe.max=Rr[Mn]}else oe.show&&oe.auto&&ss(Pe,Me,oe,e[pe],oe.sorted);oe.idxs[0]=hn,oe.idxs[1]=Mn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Pe=we.scale,je=Me.scale,[Ue,Ge]=e[pe],Qe=q[Pe],vt=q[je];Qe!=null&&ss(Qe,_[Pe],we,Ue,we.sorted),vt!=null&&ss(vt,_[je],Me,Ge,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in q){let pe=q[oe],we=_[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==ln?null:pe.min,pe.max==-ln?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in q){let pe=q[oe];if(pe.from!=null){let we=q[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in q){let pe=q[oe],we=$[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?_o(we.min):Me==4?Xh(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?_o(we.max):Me==4?Xh(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{l==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Yi=!0,tt("setScale",oe);ce&&ne.left>=0&&(Xi=vr=!0)}for(let oe in _)_[oe]=null}function Gs(q){let X=Qh(hn-1,0,Hn-1),ie=Qh(Mn+1,0,Hn-1);for(;q[X]==null&&X>0;)X--;for(;q[ie]==null&&ie<Hn-1;)ie++;return[X,ie]}function Da(){if(Hn>0){let q=x.some(X=>X._focus)&&sr!=Er.alpha;q&&(c.globalAlpha=sr=Er.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(ls(ie,!1),ls(ie,!0),X._paths==null)){let oe=sr;sr!=X.alpha&&(c.globalAlpha=sr=X.alpha);let pe=l==2?[0,e[ie][0].length-1]:Gs(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),sr!=oe&&(c.globalAlpha=sr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=sr;sr!=X.alpha&&(c.globalAlpha=sr=X.alpha),X._paths!=null&&cs(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,hn,Mn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,hn,Mn,Me),cs(ie,!0))}sr!=oe&&(c.globalAlpha=sr=oe),tt("drawSeries",ie)}}),q&&(c.globalAlpha=sr=1)}}function ls(q,X){let ie=X?x[q].points:x[q];ie._stroke=ie.stroke(r,q),ie._fill=ie.fill(r,q)}function cs(q,X){let ie=X?x[q].points:x[q],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Pe=ie._stroke,_fill:je=ie._fill,_width:Ue=ie.width}=ie._paths;Ue=cn(Ue*Kt,3);let Ge=null,Qe=Ue%2/2;X&&je==null&&(je=Ue>0?"#fff":Pe);let vt=ie.pxAlign==1&&Qe>0;if(vt&&c.translate(Qe,Qe),!X){let It=ir-Ue/2,wt=hr-Ue/2,Lt=nn+Ue,ut=or+Ue;Ge=new Path2D,Ge.rect(It,wt,Lt,ut)}X?Ro(Pe,Ue,ie.dash,ie.cap,je,oe,pe,Me,we):Ys(q,Pe,Ue,ie.dash,ie.cap,je,oe,pe,Me,Ge,we),vt&&c.translate(-Qe,-Qe)}function Ys(q,X,ie,oe,pe,we,Me,Pe,je,Ue,Ge){let Qe=!1;je!=0&&S.forEach((vt,It)=>{if(vt.series[0]==q){let wt=x[vt.series[1]],Lt=e[vt.series[1]],ut=(wt._paths||ml).band;es(ut)&&(ut=vt.dir==1?ut[0]:ut[1]);let it,un=null;wt.show&&ut&&oA(Lt,hn,Mn)?(un=vt.fill(r,It)||we,it=wt._paths.clip):ut=null,Ro(X,ie,oe,pe,un,Me,Pe,je,Ue,Ge,it,ut),Qe=!0}}),Qe||Ro(X,ie,oe,pe,we,Me,Pe,je,Ue,Ge)}const us=Sa|ld;function Ro(q,X,ie,oe,pe,we,Me,Pe,je,Ue,Ge,Qe){Ks(q,X,ie,oe,pe),(je||Ue||Qe)&&(c.save(),je&&c.clip(je),Ue&&c.clip(Ue)),Qe?(Pe&us)==us?(c.clip(Qe),Ge&&c.clip(Ge),ar(pe,Me),Ei(q,we,X)):Pe&ld?(ar(pe,Me),c.clip(Qe),Ei(q,we,X)):Pe&Sa&&(c.save(),c.clip(Qe),Ge&&c.clip(Ge),ar(pe,Me),c.restore(),Ei(q,we,X)):(ar(pe,Me),Ei(q,we,X)),(je||Ue||Qe)&&c.restore()}function Ei(q,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{c.strokeStyle=go=pe,c.stroke(oe)}):X!=null&&q&&c.stroke(X))}function ar(q,X){X instanceof Map?X.forEach((ie,oe)=>{c.fillStyle=ti=oe,c.fill(ie)}):X!=null&&q&&c.fill(X)}function vo(q,X,ie,oe){let pe=T[q],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,q,X,ie,oe),Pe=pe._incrs=pe.incrs(r,q,X,ie,oe,Me);we=$E(X,ie,Pe,oe,Me)}return pe._found=we}function to(q,X,ie,oe,pe,we,Me,Pe,je,Ue){let Ge=Me%2/2;a==1&&c.translate(Ge,Ge),Ks(Pe,Me,je,Ue,Pe),c.beginPath();let Qe,vt,It,wt,Lt=pe+(oe==0||oe==3?-we:we);ie==0?(vt=pe,wt=Lt):(Qe=pe,It=Lt);for(let ut=0;ut<q.length;ut++)X[ut]!=null&&(ie==0?Qe=It=q[ut]:vt=wt=q[ut],c.moveTo(Qe,vt),c.lineTo(It,wt));c.stroke(),a==1&&c.translate(-Ge,-Ge)}function Fa(q){let X=!0;return T.forEach((ie,oe)=>{if(!ie.show)return;let pe=$[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,no(!1));return}else ie._show||(X=!1,ie._show=!0,no(!1));let we=ie.side,Me=we%2,{min:Pe,max:je}=pe,[Ue,Ge]=vo(oe,Pe,je,Me==0?yt:qe);if(Ge==0)return;let Qe=pe.distr==2,vt=ie._splits=ie.splits(r,oe,Pe,je,Ue,Ge,Qe),It=pe.distr==2?vt.map(it=>Rr[it]):vt,wt=pe.distr==2?Rr[vt[1]]-Rr[vt[0]]:Ue,Lt=ie._values=ie.values(r,ie.filter(r,It,oe,Ge,wt),oe,Ge,wt);ie._rotate=we==2?ie.rotate(r,Lt,oe,Ge):0;let ut=ie._size;ie._size=Ci(ie.size(r,Lt,oe,q)),ut!=null&&ie._size!=ut&&(X=!1)}),X}function Il(q){let X=!0;return Na.forEach((ie,oe)=>{let pe=ie(r,oe,eo,q);pe!=Mr[oe]&&(X=!1),Mr[oe]=pe}),X}function Lo(){for(let q=0;q<T.length;q++){let X=T[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,q),Pe=ie==0||ie==3?-1:1,[je,Ue]=X._found;if(X.label!=null){let an=X.labelGap*Pe,gr=rr((X._lpos+an)*Kt);Mo(X.labelFont[0],Me,"center",ie==2?fl:tv),c.save(),oe==1?(pe=we=0,c.translate(gr,rr(hr+or/2)),c.rotate((ie==3?-Rc:Rc)/2)):(pe=rr(ir+nn/2),we=gr);let Fo=xv(X.label)?X.label(r,q,je,Ue):X.label;c.fillText(Fo,pe,we),c.restore()}if(Ue==0)continue;let Ge=$[X.scale],Qe=oe==0?nn:or,vt=oe==0?ir:hr,It=X._splits,wt=Ge.distr==2?It.map(an=>Rr[an]):It,Lt=Ge.distr==2?Rr[It[1]]-Rr[It[0]]:je,ut=X.ticks,it=X.border,un=ut.show?ut.size:0,wn=rr(un*Kt),er=rr((X.alignTo==2?X._size-un-X.gap:X.gap)*Kt),Wt=X._rotate*-Rc/180,fe=m(X._pos*Kt),Ae=(wn+er)*Pe,xe=fe+Ae;we=oe==0?xe:0,pe=oe==1?xe:0;let ze=X.font[0],ct=X.align==1?ma:X.align==2?Fh:Wt>0?ma:Wt<0?Fh:oe==0?"center":ie==3?Fh:ma,At=Wt||oe==1?"middle":ie==2?fl:tv;Mo(ze,Me,ct,At);let Ht=X.font[1]*X.lineGap,Mt=It.map(an=>m(b(an,Ge,Qe,vt))),zr=X._values;for(let an=0;an<zr.length;an++){let gr=zr[an];if(gr!=null){oe==0?pe=Mt[an]:we=Mt[an],gr=""+gr;let Fo=gr.indexOf(`
1496
- `)==-1?[gr]:gr.split(/\n/gm);for(let In=0;In<Fo.length;In++){let Qs=Fo[In];Wt?(c.save(),c.translate(pe,we+In*Ht),c.rotate(Wt),c.fillText(Qs,0,0),c.restore()):c.fillText(Qs,pe,we+In*Ht)}}}ut.show&&to(Mt,ut.filter(r,wt,q,Ue,Lt),oe,ie,fe,wn,cn(ut.width*Kt,3),ut.stroke(r,q),ut.dash,ut.cap);let Oi=X.grid;Oi.show&&to(Mt,Oi.filter(r,wt,q,Ue,Lt),oe,oe==0?2:1,oe==0?hr:ir,oe==0?or:nn,cn(Oi.width*Kt,3),Oi.stroke(r,q),Oi.dash,Oi.cap),it.show&&to([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?hr:ir,oe==1?or:nn,cn(it.width*Kt,3),it.stroke(r,q),it.dash,it.cap)}tt("drawAxes")}function no(q){x.forEach((X,ie)=>{ie>0&&(X._paths=null,q&&(l==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Oo=!1,hs=!1,Io=[];function Pa(){hs=!1;for(let q=0;q<Io.length;q++)tt(...Io[q]);Io.length=0}function yo(){Oo||(bA(Ba),Oo=!0)}function Be(q,X=!1){Oo=!0,hs=X,q(r),Ba(),X&&Io.length>0&&queueMicrotask(Pa)}r.batch=Be;function Ba(){if($o&&(mo(),$o=!1),Yi&&(di(),Yi=!1),Gi){if(pn(h,ma,qt),pn(h,fl,gn),pn(h,hl,yt),pn(h,dl,qe),pn(i,ma,qt),pn(i,fl,gn),pn(i,hl,yt),pn(i,dl,qe),pn(f,hl,ur),pn(f,dl,Pr),o.width=rr(ur*Kt),o.height=rr(Pr*Kt),T.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:pe})=>{if(q!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;pn(q,Me?"left":"top",oe-we),pn(q,Me?"width":"height",ie),pn(q,Me?"top":"left",Me?gn:qt),pn(q,Me?"height":"width",Me?qe:yt),Uh(q,Ms)}else li(q,Ms)}),go=ti=To=ni=is=qs=Vs=os=rs=null,sr=1,B(!0),qt!=Qn||gn!=Br||yt!=Ar||qe!=Cn){no(!1);let q=yt/Ar,X=qe/Cn;if(ce&&!Xi&&ne.left>=0){ne.left*=q,ne.top*=X,pi&&lo(pi,rr(ne.left),0,yt,qe),Un&&lo(Un,0,rr(ne.top),yt,qe);for(let ie=0;ie<Tr.length;ie++){let oe=Tr[ie];oe!=null&&(po[ie]*=q,Ji[ie]*=X,lo(oe,Ci(po[ie]),Ci(Ji[ie]),yt,qe))}}if(mt.show&&!Ao&&mt.left>=0&&mt.width>0){mt.left*=q,mt.width*=q,mt.top*=X,mt.height*=X;for(let ie in Y)pn(jr,ie,mt[ie])}Qn=qt,Br=gn,Ar=yt,Cn=qe}tt("setSize"),Gi=!1}ur>0&&Pr>0&&(c.clearRect(0,0,o.width,o.height),tt("drawClear"),N.forEach(q=>q()),tt("draw")),mt.show&&Ao&&(sn(mt),Ao=!1),ce&&Xi&&(C(null,!0,!1),Xi=!1),ae.show&&ae.live&&vr&&(y(),vr=!1),p||(p=!0,r.status=1,tt("ready")),Ai=!1,Oo=!1}r.redraw=(q,X)=>{Yi=X||!1,q!==!1?Zn(k,W.min,W.max):yo()};function De(q,X){let ie=$[q];if(ie.from==null){if(Hn==0){let oe=ie.range(r,X.min,X.max,q);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Hn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;q==k&&ie.distr==2&&Hn>0&&(X.min=Ui(X.min,e[0]),X.max=Ui(X.max,e[0]),X.min==X.max&&X.max++),_[q]=X,$o=!0,yo()}}r.setScale=De;let An,No,pi,Un,ja,Do,Ti,bo,Yt,Vt,Xt,Bt,Mi=!1;const Rn=ne.drag;let We=Rn.x,dn=Rn.y;ce&&(ne.x&&(An=_i(H$,i)),ne.y&&(No=_i(U$,i)),W.ori==0?(pi=An,Un=No):(pi=No,Un=An),Xt=ne.left,Bt=ne.top);const mt=r.select=Gn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),jr=mt.show?_i(z$,mt.over?i:h):null;function sn(q,X){if(mt.show){for(let ie in q)mt[ie]=q[ie],ie in Y&&pn(jr,ie,q[ie]);X!==!1&&tt("setSelect")}}r.setSelect=sn;function mn(q){if(x[q].show)se&&Uh(Re[q],Ms);else if(se&&li(Re[q],Ms),ce){let X=$n?Tr[0]:Tr[q];X!=null&&lo(X,-10,-10,yt,qe)}}function Zn(q,X,ie){De(q,{min:X,max:ie})}function Wr(q,X,ie,oe){X.focus!=null&&dr(q),X.show!=null&&x.forEach((pe,we)=>{we>0&&(q==we||q==null)&&(pe.show=X.show,mn(we),l==2?(Zn(pe.facets[0].scale,null,null),Zn(pe.facets[1].scale,null,null)):Zn(pe.scale,null,null),yo())}),ie!==!1&&tt("setSeries",q,X),oe&&$t("setSeries",r,q,X)}r.setSeries=Wr;function Ri(q,X){Gn(S[q],X)}function Ln(q,X){q.fill=Ft(q.fill||null),q.dir=Ut(q.dir,-1),X=X??S.length,S.splice(X,0,q)}function ri(q){q==null?S.length=0:S.splice(q,1)}r.addBand=Ln,r.setBand=Ri,r.delBand=ri;function ds(q,X){x[q].alpha=X,ce&&Tr[q]!=null&&(Tr[q].style.opacity=X),se&&Re[q]&&(Re[q].style.opacity=X)}let On,gi,mi;const Li={focus:!0};function dr(q){if(q!=mi){let X=q==null,ie=Er.alpha!=1;x.forEach((oe,pe)=>{if(l==1||pe>0){let we=X||pe==0||pe==q;oe._focus=X?null:we,ie&&ds(pe,we?1:Er.alpha)}}),mi=q,ie&&yo()}}se&&Zi&&_n(ov,ge,q=>{ne._lock||(Qi(q),mi!=null&&Wr(null,Li,!0,lt.setSeries))});function fr(q,X,ie){let oe=$[X];ie&&(q=q/Kt-(oe.ori==1?gn:qt));let pe=yt;oe.ori==1&&(pe=qe,q=pe-q),oe.dir==-1&&(q=pe-q);let we=oe._min,Me=oe._max,Pe=q/pe,je=we+(Me-we)*Pe,Ue=oe.distr;return Ue==3?ba(10,je):Ue==4?aA(je,oe.asinh):Ue==100?oe.bwd(je):je}function yr(q,X){let ie=fr(q,k,X);return Ui(ie,e[0],hn,Mn)}r.valToIdx=q=>Ui(q,e[0]),r.posToIdx=yr,r.posToVal=fr,r.valToPos=(q,X,ie)=>$[X].ori==0?d(q,$[X],ie?nn:yt,ie?ir:0):u(q,$[X],ie?or:qe,ie?hr:0),r.setCursor=(q,X,ie)=>{Xt=q.left,Bt=q.top,C(null,X,ie)};function Xs(q,X){pn(jr,ma,mt.left=q),pn(jr,hl,mt.width=X)}function br(q,X){pn(jr,fl,mt.top=q),pn(jr,dl,mt.height=X)}let Lr=W.ori==0?Xs:br,vi=W.ori==1?Xs:br;function yi(){if(se&&ae.live)for(let q=l==2?1:0;q<x.length;q++){if(q==0&&dt)continue;let X=ae.values[q],ie=0;for(let oe in X)Xe[q][ie++].firstChild.nodeValue=X[oe]}}function y(q,X){if(q!=null&&(q.idxs?q.idxs.forEach((ie,oe)=>{J[oe]=ie}):hA(q.idx)||J.fill(q.idx),ae.idx=J[0]),se&&ae.live){for(let ie=0;ie<x.length;ie++)(ie>0||l==1&&!dt)&&E(ie,J[ie]);yi()}vr=!1,X!==!1&&tt("setLegend")}r.setLegend=y;function E(q,X){let ie=x[q],oe=q==0&&P==2?Rr:e[q],pe;dt?pe=ie.values(r,q,X)??rt:(pe=ie.value(r,X==null?null:oe[X],q,X),pe=pe==null?rt:{_:pe}),ae.values[q]=pe}function C(q,X,ie){Yt=Xt,Vt=Bt,[Xt,Bt]=ne.move(r,Xt,Bt),ne.left=Xt,ne.top=Bt,ce&&(pi&&lo(pi,rr(Xt),0,yt,qe),Un&&lo(Un,0,rr(Bt),yt,qe));let oe,pe=hn>Mn;On=ln,gi=null;let we=W.ori==0?yt:qe,Me=W.ori==1?yt:qe;if(Xt<0||Hn==0||pe){oe=ne.idx=null;for(let Pe=0;Pe<x.length;Pe++){let je=Tr[Pe];je!=null&&lo(je,-10,-10,yt,qe)}Zi&&Wr(null,Li,!0,q==null&&lt.setSeries),ae.live&&(J.fill(oe),vr=!0)}else{let Pe,je,Ue;l==1&&(Pe=W.ori==0?Xt:Bt,je=fr(Pe,k),oe=ne.idx=Ui(je,e[0],hn,Mn),Ue=D(e[0][oe],W,we,0));let Ge=-10,Qe=-10,vt=0,It=0,wt=!0,Lt="",ut="";for(let it=l==2?1:0;it<x.length;it++){let un=x[it],wn=J[it],er=wn==null?null:l==1?e[it][wn]:e[it][1][wn],Wt=ne.dataIdx(r,it,oe,je),fe=Wt==null?null:l==1?e[it][Wt]:e[it][1][Wt];if(vr=vr||fe!=er||Wt!=wn,J[it]=Wt,it>0&&un.show){let Ae=Wt==null?-10:Wt==oe?Ue:D(l==1?e[0][Wt]:e[it][0][Wt],W,we,0),xe=fe==null?-10:A(fe,l==1?$[un.scale]:$[un.facets[1].scale],Me,0);if(Zi&&fe!=null){let ze=W.ori==1?Xt:Bt,ct=nr(Er.dist(r,it,Wt,xe,ze));if(ct<On){let At=Er.bias;if(At!=0){let Ht=fr(ze,un.scale),Mt=fe>=0?1:-1,zr=Ht>=0?1:-1;zr==Mt&&(zr==1?At==1?fe>=Ht:fe<=Ht:At==1?fe<=Ht:fe>=Ht)&&(On=ct,gi=it)}else On=ct,gi=it}}if(vr||$n){let ze,ct;W.ori==0?(ze=Ae,ct=xe):(ze=xe,ct=Ae);let At,Ht,Mt,zr,Oi,an,gr=!0,Fo=zn.bbox;if(Fo!=null){gr=!1;let In=Fo(r,it);Mt=In.left,zr=In.top,At=In.width,Ht=In.height}else Mt=ze,zr=ct,At=Ht=zn.size(r,it);if(an=zn.fill(r,it),Oi=zn.stroke(r,it),$n)it==gi&&On<=Er.prox&&(Ge=Mt,Qe=zr,vt=At,It=Ht,wt=gr,Lt=an,ut=Oi);else{let In=Tr[it];In!=null&&(po[it]=Mt,Ji[it]=zr,dv(In,At,Ht,gr),uv(In,an,Oi),lo(In,Ci(Mt),Ci(zr),yt,qe))}}}}if($n){let it=Er.prox,un=mi==null?On<=it:On>it||gi!=mi;if(vr||un){let wn=Tr[0];wn!=null&&(po[0]=Ge,Ji[0]=Qe,dv(wn,vt,It,wt),uv(wn,Lt,ut),lo(wn,Ci(Ge),Ci(Qe),yt,qe))}}}if(mt.show&&Mi)if(q!=null){let[Pe,je]=lt.scales,[Ue,Ge]=lt.match,[Qe,vt]=q.cursor.sync.scales,It=q.cursor.drag;if(We=It._x,dn=It._y,We||dn){let{left:wt,top:Lt,width:ut,height:it}=q.select,un=q.scales[Qe].ori,wn=q.posToVal,er,Wt,fe,Ae,xe,ze=Pe!=null&&Ue(Pe,Qe),ct=je!=null&&Ge(je,vt);ze&&We?(un==0?(er=wt,Wt=ut):(er=Lt,Wt=it),fe=$[Pe],Ae=D(wn(er,Qe),fe,we,0),xe=D(wn(er+Wt,Qe),fe,we,0),Lr(qi(Ae,xe),nr(xe-Ae))):Lr(0,we),ct&&dn?(un==1?(er=wt,Wt=ut):(er=Lt,Wt=it),fe=$[je],Ae=A(wn(er,vt),fe,Me,0),xe=A(wn(er+Wt,vt),fe,Me,0),vi(qi(Ae,xe),nr(xe-Ae))):vi(0,Me)}else Q()}else{let Pe=nr(Yt-ja),je=nr(Vt-Do);if(W.ori==1){let vt=Pe;Pe=je,je=vt}We=Rn.x&&Pe>=Rn.dist,dn=Rn.y&&je>=Rn.dist;let Ue=Rn.uni;Ue!=null?We&&dn&&(We=Pe>=Ue,dn=je>=Ue,!We&&!dn&&(je>Pe?dn=!0:We=!0)):Rn.x&&Rn.y&&(We||dn)&&(We=dn=!0);let Ge,Qe;We&&(W.ori==0?(Ge=Ti,Qe=Xt):(Ge=bo,Qe=Bt),Lr(qi(Ge,Qe),nr(Qe-Ge)),dn||vi(0,Me)),dn&&(W.ori==1?(Ge=Ti,Qe=Xt):(Ge=bo,Qe=Bt),vi(qi(Ge,Qe),nr(Qe-Ge)),We||Lr(0,we)),!We&&!dn&&(Lr(0,0),vi(0,0))}if(Rn._x=We,Rn._y=dn,q==null){if(ie){if(yn!=null){let[Pe,je]=lt.scales;lt.values[0]=Pe!=null?fr(W.ori==0?Xt:Bt,Pe):null,lt.values[1]=je!=null?fr(W.ori==1?Xt:Bt,je):null}$t(Bh,r,Xt,Bt,yt,qe,oe)}if(Zi){let Pe=ie&&lt.setSeries,je=Er.prox;mi==null?On<=je&&Wr(gi,Li,!0,Pe):On>je?Wr(null,Li,!0,Pe):gi!=mi&&Wr(gi,Li,!0,Pe)}}vr&&(ae.idx=oe,y()),X!==!1&&tt("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&B(!1),F}});function B(q=!1){q?F=null:(F=i.getBoundingClientRect(),tt("syncRect",F))}function z(q,X,ie,oe,pe,we,Me){ne._lock||Mi&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,pe,we,Me,!1,q!=null),q!=null?C(null,!0,!0):C(X,!0,!1))}function V(q,X,ie,oe,pe,we,Me,Pe,je){if(F==null&&B(!1),Qi(q),q!=null)ie=q.clientX-F.left,oe=q.clientY-F.top;else{if(ie<0||oe<0){Xt=-10,Bt=-10;return}let[Ue,Ge]=lt.scales,Qe=X.cursor.sync,[vt,It]=Qe.values,[wt,Lt]=Qe.scales,[ut,it]=lt.match,un=X.axes[0].side%2==1,wn=W.ori==0?yt:qe,er=W.ori==1?yt:qe,Wt=un?we:pe,fe=un?pe:we,Ae=un?oe:ie,xe=un?ie:oe;if(wt!=null?ie=ut(Ue,wt)?b(vt,$[Ue],wn,0):-10:ie=wn*(Ae/Wt),Lt!=null?oe=it(Ge,Lt)?b(It,$[Ge],er,0):-10:oe=er*(xe/fe),W.ori==1){let ze=ie;ie=oe,oe=ze}}je&&(X==null||X.cursor.event.type==Bh)&&((ie<=1||ie>=yt-1)&&(ie=Os(ie,yt)),(oe<=1||oe>=qe-1)&&(oe=Os(oe,qe))),Pe?(ja=ie,Do=oe,[Ti,bo]=ne.move(r,ie,oe)):(Xt=ie,Bt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){sn(Y,!1)}let re,le,ye,ke;function me(q,X,ie,oe,pe,we,Me){Mi=!0,We=dn=Rn._x=Rn._y=!1,V(q,X,ie,oe,pe,we,Me,!0,!1),q!=null&&(_n(jh,zh,be,!1),$t(rv,r,Ti,bo,yt,qe,null));let{left:Pe,top:je,width:Ue,height:Ge}=mt;re=Pe,le=je,ye=Ue,ke=Ge}function be(q,X,ie,oe,pe,we,Me){Mi=Rn._x=Rn._y=!1,V(q,X,ie,oe,pe,we,Me,!1,!0);let{left:Pe,top:je,width:Ue,height:Ge}=mt,Qe=Ue>0||Ge>0,vt=re!=Pe||le!=je||ye!=Ue||ke!=Ge;if(Qe&&vt&&sn(mt),Rn.setScale&&Qe&&vt){let It=Pe,wt=Ue,Lt=je,ut=Ge;if(W.ori==1&&(It=je,wt=Ge,Lt=Pe,ut=Ue),We&&Zn(k,fr(It,k),fr(It+wt,k)),dn)for(let it in $){let un=$[it];it!=k&&un.from==null&&un.min!=ln&&Zn(it,fr(Lt+ut,it),fr(Lt,it))}Q()}else ne.lock&&(ne._lock=!ne._lock,C(X,!0,q!=null));q!=null&&(Xn(jh,zh),$t(jh,r,Xt,Bt,yt,qe,null))}function Ne(q,X,ie,oe,pe,we,Me){if(ne._lock)return;Qi(q);let Pe=Mi;if(Mi){let je=!0,Ue=!0,Ge=10,Qe,vt;W.ori==0?(Qe=We,vt=dn):(Qe=dn,vt=We),Qe&&vt&&(je=Xt<=Ge||Xt>=yt-Ge,Ue=Bt<=Ge||Bt>=qe-Ge),Qe&&je&&(Xt=Xt<Ti?0:yt),vt&&Ue&&(Bt=Bt<bo?0:qe),C(null,!0,!0),Mi=!1}Xt=-10,Bt=-10,J.fill(null),C(null,!0,!0),Pe&&(Mi=Pe)}function Ie(q,X,ie,oe,pe,we,Me){ne._lock||(Qi(q),Us(),Q(),q!=null&&$t(sv,r,Xt,Bt,yt,qe,null))}function He(){T.forEach(AE),Eo(r.width,r.height,!0)}Rs($c,ya,He);const st={};st.mousedown=me,st.mousemove=z,st.mouseup=be,st.dblclick=Ie,st.setSeries=(q,X,ie,oe)=>{let pe=lt.match[2];ie=pe(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ce&&(_n(rv,i,me),_n(Bh,i,z),_n(iv,i,q=>{Qi(q),B(!1)}),_n(ov,i,Ne),_n(sv,i,Ie),dd.add(r),r.syncRect=B);const Ye=r.hooks=n.hooks||{};function tt(q,X,ie){hs?Io.push([q,X,ie]):q in Ye&&Ye[q].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(q=>{for(let X in q.hooks)Ye[X]=(Ye[X]||[]).concat(q.hooks[X])});const fn=(q,X,ie)=>ie,lt=Gn({key:null,setSeries:!1,filters:{pub:_v,sub:_v},scales:[k,x[1]?x[1].scale:null],match:[Cv,Cv,fn],values:[null,null]},ne.sync);lt.match.length==2&&lt.match.push(fn),ne.sync=lt;const yn=lt.key,bt=cy(yn);function $t(q,X,ie,oe,pe,we,Me){lt.filters.pub(q,X,ie,oe,pe,we,Me)&&bt.pub(q,X,ie,oe,pe,we,Me)}bt.sub(r);function Jn(q,X,ie,oe,pe,we,Me){lt.filters.sub(q,X,ie,oe,pe,we,Me)&&st[q](null,X,ie,oe,pe,we,Me)}r.pub=Jn;function pr(){bt.unsub(r),dd.delete(r),hi.clear(),Vh($c,ya,He),g.remove(),ge==null||ge.remove(),tt("destroy")}r.destroy=pr;function bn(){tt("init",n,e),ns(e||n.data,!1),_[k]?De(k,_[k]):Us(),Ao=mt.show&&(mt.width>0||mt.height>0),Xi=vr=!0,Eo(n.width,n.height)}return x.forEach(Ia),T.forEach(fi),t?t instanceof HTMLElement?(t.appendChild(g),bn()):t(r,bn):bn(),r}_r.assign=Gn,_r.fmtNum=Yh,_r.rangeNum=Mc,_r.rangeLog=Tc,_r.rangeAsinh=Kh,_r.orient=Ns,_r.pxRatio=Kt,_r.join=yA,_r.fmtDate=Jh,_r.tzDate=TA,_r.sync=cy;{_r.addGap=hE,_r.clipGaps=Fc;let n=_r.paths={points:my};n.linear=yy,n.stepped=pE,n.bars=gE,n.spline=vE}var $y,Ay;function EE(){return Ay||(Ay=1,$y=function(n,e,t,r,l){var d,u;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(l===void 0)l=n.length-1;else if(l=l|0,l<r||l>=n.length)throw new RangeError("invalid upper bound");for(;r<=l;)if(d=r+(l-r>>>1),u=+t(n[d],e,d,n),u<0)r=d+1;else if(u>0)l=d-1;else return d;return~r}),$y}var TE=EE();const lj=Bi("a",lc(TE));var pd,Ey;function ME(){if(Ey)return pd;Ey=1;function n(e,t,r){var l=-1,d=e.length;t<0&&(t=-t>d?0:d+t),r=r>d?d:r,r<0&&(r+=d),d=t>r?0:r-t>>>0,t>>>=0;for(var u=Array(d);++l<d;)u[l]=e[l+t];return u}return pd=n,pd}var gd,Ty;function RE(){if(Ty)return gd;Ty=1;var n=ME();function e(t,r,l){var d=t.length;return l=l===void 0?d:l,!r&&l>=d?t:n(t,r,l)}return gd=e,gd}var md,My;function Ry(){if(My)return md;My=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\ufe0e\\ufe0f",u="\\u200d",b=RegExp("["+u+n+l+d+"]");function p(g){return b.test(g)}return md=p,md}var vd,Ly;function LE(){if(Ly)return vd;Ly=1;function n(e){return e.split("")}return vd=n,vd}var yd,Oy;function OE(){if(Oy)return yd;Oy=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\ufe0e\\ufe0f",u="["+n+"]",b="["+l+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+p+")",o="[^"+n+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",i=g+"?",a="["+d+"]?",m="(?:"+h+"(?:"+[o,c,f].join("|")+")"+a+i+")*",w=a+i+m,x="(?:"+[o+b+"?",b,c,f,u].join("|")+")",T=RegExp(p+"(?="+p+")|"+x+w,"g");function $(S){return S.match(T)||[]}return yd=$,yd}var bd,Iy;function IE(){if(Iy)return bd;Iy=1;var n=LE(),e=Ry(),t=OE();function r(l){return e(l)?t(l):n(l)}return bd=r,bd}var wd,Ny;function NE(){if(Ny)return wd;Ny=1;var n=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo;return wd=n,wd}var xd,Dy;function DE(){if(Dy)return xd;Dy=1;var n=NE(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return xd=t,xd}var kd,Fy;function Sd(){if(Fy)return kd;Fy=1;var n=DE(),e=n.Symbol;return kd=e,kd}var _d,Py;function FE(){if(Py)return _d;Py=1;function n(e,t){for(var r=-1,l=e==null?0:e.length,d=Array(l);++r<l;)d[r]=t(e[r],r,e);return d}return _d=n,_d}var Cd,By;function PE(){if(By)return Cd;By=1;var n=Array.isArray;return Cd=n,Cd}var $d,jy;function BE(){if(jy)return $d;jy=1;var n=Sd(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,l=n?n.toStringTag:void 0;function d(u){var b=t.call(u,l),p=u[l];try{u[l]=void 0;var g=!0}catch{}var o=r.call(u);return g&&(b?u[l]=p:delete u[l]),o}return $d=d,$d}var Ad,Wy;function jE(){if(Wy)return Ad;Wy=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Ad=t,Ad}var Ed,zy;function WE(){if(zy)return Ed;zy=1;var n=Sd(),e=BE(),t=jE(),r="[object Null]",l="[object Undefined]",d=n?n.toStringTag:void 0;function u(b){return b==null?b===void 0?l:r:d&&d in Object(b)?e(b):t(b)}return Ed=u,Ed}var Td,Hy;function zE(){if(Hy)return Td;Hy=1;function n(e){return e!=null&&typeof e=="object"}return Td=n,Td}var Md,Uy;function HE(){if(Uy)return Md;Uy=1;var n=WE(),e=zE(),t="[object Symbol]";function r(l){return typeof l=="symbol"||e(l)&&n(l)==t}return Md=r,Md}var Rd,qy;function UE(){if(qy)return Rd;qy=1;var n=Sd(),e=FE(),t=PE(),r=HE(),l=n?n.prototype:void 0,d=l?l.toString:void 0;function u(b){if(typeof b=="string")return b;if(t(b))return e(b,u)+"";if(r(b))return d?d.call(b):"";var p=b+"";return p=="0"&&1/b==-1/0?"-0":p}return Rd=u,Rd}var Ld,Vy;function Wc(){if(Vy)return Ld;Vy=1;var n=UE();function e(t){return t==null?"":n(t)}return Ld=e,Ld}var Od,Ky;function qE(){if(Ky)return Od;Ky=1;var n=RE(),e=Ry(),t=IE(),r=Wc();function l(d){return function(u){u=r(u);var b=e(u)?t(u):void 0,p=b?b[0]:u.charAt(0),g=b?n(b,1).join(""):u.slice(1);return p[d]()+g}}return Od=l,Od}var Id,Gy;function Yy(){if(Gy)return Id;Gy=1;var n=qE(),e=n("toUpperCase");return Id=e,Id}var VE=Yy();const KE=lc(VE);var Nd,Xy;function GE(){if(Xy)return Nd;Xy=1;var n=Wc(),e=Yy();function t(r){return e(n(r).toLowerCase())}return Nd=t,Nd}var Dd,Qy;function YE(){if(Qy)return Dd;Qy=1;function n(e,t,r,l){var d=-1,u=e==null?0:e.length;for(l&&u&&(r=e[++d]);++d<u;)r=t(r,e[d],d,e);return r}return Dd=n,Dd}var Fd,Zy;function XE(){if(Zy)return Fd;Zy=1;function n(e){return function(t){return e==null?void 0:e[t]}}return Fd=n,Fd}var Pd,Jy;function QE(){if(Jy)return Pd;Jy=1;var n=XE(),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"},t=n(e);return Pd=t,Pd}var Bd,eb;function ZE(){if(eb)return Bd;eb=1;var n=QE(),e=Wc(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",u=r+l+d,b="["+u+"]",p=RegExp(b,"g");function g(o){return o=e(o),o&&o.replace(t,n).replace(p,"")}return Bd=g,Bd}var jd,tb;function JE(){if(tb)return jd;tb=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(n)||[]}return jd=e,jd}var Wd,nb;function eT(){if(nb)return Wd;nb=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(t){return n.test(t)}return Wd=e,Wd}var zd,rb;function tT(){if(rb)return zd;rb=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",o=" \\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",c="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",h=b+p+g+o,i="['’]",a="["+h+"]",m="["+l+"]",w="\\d+",x="["+d+"]",T="["+u+"]",$="[^"+n+h+w+d+u+c+"]",S="\\ud83c[\\udffb-\\udfff]",k="(?:"+m+"|"+S+")",L="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",O="["+c+"]",W="\\u200d",P="(?:"+T+"|"+$+")",D="(?:"+O+"|"+$+")",A="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",I=k+"?",j="["+f+"]?",U="(?:"+W+"(?:"+[L,N,R].join("|")+")"+j+I+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J=j+I+U,ae="(?:"+[x,N,R].join("|")+")"+J,ne=RegExp([O+"?"+T+"+"+A+"(?="+[a,O,"$"].join("|")+")",D+"+"+_+"(?="+[a,O+P,"$"].join("|")+")",O+"?"+P+"+"+A,O+"+"+_,Z,K,w,ae].join("|"),"g");function se(ce){return ce.match(ne)||[]}return zd=se,zd}var Hd,ib;function nT(){if(ib)return Hd;ib=1;var n=JE(),e=eT(),t=Wc(),r=tT();function l(d,u,b){return d=t(d),u=b?void 0:u,u===void 0?e(d)?r(d):n(d):d.match(u)||[]}return Hd=l,Hd}var Ud,ob;function rT(){if(ob)return Ud;ob=1;var n=YE(),e=ZE(),t=nT(),r="['’]",l=RegExp(r,"g");function d(u){return function(b){return n(t(e(b).replace(l,"")),u,"")}}return Ud=d,Ud}var qd,sb;function iT(){if(sb)return qd;sb=1;var n=GE(),e=rT(),t=e(function(r,l,d){return l=l.toLowerCase(),r+(d?n(l):l)});return qd=t,qd}var oT=iT();const sT=lc(oT),aT=Object.assign({"./ArrayWidget.vue":()=>ot(()=>at.import("./ArrayWidget-CR7Wpw3N-bda67931d09f4b5f7c30.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>at.import("./ArrayplotWidget-DDEd-jRJ-2857cf0bca6c3de48ff7.js"),void 0),"./BlockWidget.vue":()=>ot(()=>at.import("./BlockWidget-CfFgdNSv-7028a06f0cc004e5ee89.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>at.import("./ButtonWidget-BaSvtElA-a36c46ac75b71019bc0d.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>at.import("./CanvasWidget-DcwDi5Zk-46adec4959a7895b6273.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>at.import("./CanvasdotWidget--awMOWyz-365bcad1f1513e58258c.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>at.import("./CanvasimageWidget-YP1pCtvb-370832b7a527364025f8.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>at.import("./CanvasimagevalueWidget-CjVHb2uj-7a880846dedce7817262.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>at.import("./CanvaslabelWidget-DoMplTTO-88b8aa82b61fafe9e13a.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>at.import("./CanvaslabelvalueWidget-Dyo_ogHn-9fc4f191a6010c872bcd.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>at.import("./CanvaslineWidget-D7W1TIxm-f6f0bc8445fdcd80a702.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>at.import("./CanvaslinevalueWidget-BOZyJuLE-4ddf3264c9d2d79ee8b4.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>at.import("./CheckbuttonWidget-B1E4BC6v-f5c38acb9e75246db2ed.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>at.import("./ComboboxWidget-BExUBH57-d35b9ec50988a44ba5fc.js"),void 0),"./DateWidget.vue":()=>ot(()=>at.import("./DateWidget-_ZmPsi2l-35f631f60083cedfff6c.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>at.import("./DynamicWidget-DHL7pbgW-cf98899d5951f5e5fc10.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>at.import("./FormatvalueWidget-4C0vrL2i-d4d357bf535d0bba7b4a.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>at.import("./HorizontalWidget-DbEQYjFC-b351dfb8b08ccca0a85c.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>at.import("./HorizontalboxWidget-CTomf_Iy-83202384f40b358a6729.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>at.import("./HorizontallineWidget-B7xx7ofY-f8aaf188ce94fa1b6d7d.js"),void 0),"./IframeWidget.vue":()=>ot(()=>at.import("./IframeWidget-DK7rbULe-10c7f6d396585b58b9ca.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>at.import("./ImageviewerWidget-6d6Kl3W_-d0306437582aa895bbdb.js"),void 0),"./LabelWidget.vue":()=>ot(()=>at.import("./LabelWidget-D71FfOSw-dd8eb6360630c1b2c688.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>at.import("./LabelledWidget-D2ir5kVU-a264fee599a49a44bd40.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>at.import("./LabelprogressbarWidget-C4_YbROz-969982be5a60170a801b.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>at.import("./LabelsparklineWidget-CdZ_pM2B-e0a34222efeeab05bd1f.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>at.import("./LabelvalueWidget-BS0EPY5h-7055481f4436d700d9a2.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>at.import("./LabelvaluedescWidget-Cpr8_Voq-ee4389da78b26cf6ca35.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitsbarWidget-DTcYbEQS-c46940073d1cc860b01b.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>at.import("./LabelvaluelimitscolumnWidget-D0ltQ9Ta-1faf2e440d0327b51db7.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>at.import("./LabelvaluerangebarWidget-O8IHjvHs-45b9a376d6288583faed.js"),void 0),"./LedWidget.vue":()=>ot(()=>at.import("./LedWidget-DUvJ2v8k-c05a373ebcefb0e3dbf3.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>at.import("./LimitsbarWidget-BehZv0-k-7d23b1df84cc8e0a2099.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>at.import("./LimitscolorWidget-FXT0ZPPH-9616db9c2433d6de8d00.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>at.import("./LimitscolumnWidget-CjBy-CCI-d9b902ebca3b8f3e8832.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>at.import("./LinegraphWidget-lmu_tFKd-bf0f7aa0b6593cbfbb9b.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>at.import("./MatrixbycolumnsWidget-CCF7rCkV-fade60f5d5ca05d961b9.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>at.import("./ProgressbarWidget-B5WN658S-40fd618f179bbb0a7eed.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>at.import("./RadiobuttonWidget-B_3nys46-9c7cbb117658cc886780.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>at.import("./RadiogroupWidget-BiMIL9li-1b82a5661231447112c1.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>at.import("./RangebarWidget-Dn0GASdi-3a25812b815b630d9213.js"),void 0),"./RollupWidget.vue":()=>ot(()=>at.import("./RollupWidget-b62qcG5K-5c3768b6dbd2bc04d9ac.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>at.import("./ScrollwindowWidget-Dn29gs-U-f27245a971f6c54ef506.js"),void 0),"./SignalWidget.vue":()=>ot(()=>at.import("./SignalWidget-CLi6qask-57417f51fd1e035d59b3.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>at.import("./SpacerWidget-BCA3gdap-5b2a1f1c0f818aa1f56d.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>at.import("./SparklineWidget-D8mb4zLt-f9618c2d29eb071bdab2.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>at.import("./TabbookWidget-Bkt4g02d-6e80590512a18b8aae1b.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>at.import("./TextboxWidget-CR05wO-t-b6b8d573d3fe6dbaee1f.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>at.import("./TextfieldWidget-Be_Pz2bF-2554c151345b9c1f46ca.js"),void 0),"./TimeWidget.vue":()=>ot(()=>at.import("./TimeWidget-Dy8zpkC6-b82291ec0107974a776f.js"),void 0),"./TitleWidget.vue":()=>ot(()=>at.import("./TitleWidget-BcmxUDzM-3d458d5d79dcfd672e0f.js"),void 0),"./ValueWidget.vue":()=>ot(()=>at.import("./ValueWidget-BxWrHkYY-2e27324754692a3f9323.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>at.import("./ValuelimitsbarWidget-BdY02gqc-7894a29d103115a1e2ab.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>at.import("./ValuelimitscolumnWidget-CuJ6rqtC-2e02777baedef6f48063.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>at.import("./ValuerangebarWidget-C5rolGDi-2bc40f657b9e4f4ed1c7.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>at.import("./VerticalWidget-DsnEzKZ2-911d954540212ea4ff53.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>at.import("./VerticalboxWidget-CzDgveBl-2b18d4c4d6cb9610a926.js"),void 0)}),lT=Object.entries(aT).reduce((n,[e,t])=>{e=e.split("/").pop();const r=KE(sT(e.replace(/\.\w+$/,"")));return{...n,[r]:wp(t)}},{}),cj=Bi("U",{components:lT}),cT={methods:{buildLanguageMode(n,e){let t=Nr.require("ace/lib/oop"),r=Object.getOwnPropertyNames(Vm.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),l=new RegExp(`(\\b${r.join("\\b|\\b")}\\b)`),d=function(){n.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:l,token:"support.function"})};t.inherits(d,n);let u=Nr.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,b=Nr.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[t,function(){this.HighlightRules=d,this.$outdent=new u,this.$behaviour=new b,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let t=Nr.require("ace/mode/ruby").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/python_highlight_rules").PythonHighlightRules,Nr.require("ace/mode/folding/pythonic").FoldMode);let t=Nr.require("ace/mode/python").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/json_highlight_rules").JsonHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let t=Nr.require("ace/mode/json").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,Nr.require("ace/mode/folding/markdown").FoldMode);let t=Nr.require("ace/mode/markdown").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},uT={mixins:[cT],props:{content:{type:String,required:!0},type:String,name:String,modelValue:Boolean,filename:{type:String,required:!1}},data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let n=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();n=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const t=this.buildPythonMode();n=new t;break;case"md":const r=this.buildMarkdownMode();n=new r;break;default:const l=this.buildRubyMode();n=new l;break}this.editor.session.setMode(n),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 n=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const t=document.createElement("a");t.href=URL.createObjectURL(n),t.setAttribute("download",e),t.click()}}},hT=["textContent"],dT={class:"mx-2"},fT={ref:"editor",class:"editor"};function pT(n,e,t,r,l,d){const u=Tt("v-spacer"),b=Tt("v-btn"),p=Tt("v-toolbar"),g=Tt("v-card-text"),o=Tt("v-card-actions"),c=Tt("v-card"),f=Tt("v-dialog");return Dt(),xn(f,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=h=>d.show=h),width:"85vw"},{default:Je(()=>[et(c,null,{default:Je(()=>[et(p,{height:"24"},{default:Je(()=>[et(u),cr("span",{textContent:xr(d.title)},null,8,hT),et(u),cr("div",dT,[et(b,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:d.download},null,8,["onClick"])])]),_:1}),et(g,null,{default:Je(()=>[cr("pre",fT,null,512)]),_:1}),et(o,{class:"pr-6 pb-4 pt-0"},{default:Je(()=>[et(u),et(b,{variant:"flat",onClick:e[0]||(e[0]=h=>d.show=!d.show)},{default:Je(()=>[...e[2]||(e[2]=[kn(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const gT=Ku(uT,[["render",pT],["__scopeId","data-v-69e71dd8"]]),mT={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:e}){const t=e,r=kp(!1);function l(){r.value=!1}function d(u){return u.replaceAll(" ","-").toLowerCase()}return(u,b)=>{const p=Tt("v-icon"),g=Tt("v-btn"),o=Tt("v-divider"),c=Tt("v-list-item-title"),f=Tt("v-list-item"),h=Tt("v-list"),i=Tt("v-menu"),a=Tt("v-radio"),m=Tt("v-list-item-action"),w=Tt("v-radio-group"),x=Tt("v-checkbox");return Dt(),xn(i,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=T=>r.value=T),"close-on-content-click":!1},{activator:Je(({props:T})=>[et(g,Yu(T,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":d(`${n.title} ${n.menu.label}`)}),{append:Je(()=>[et(p,{class:"menu-button-icon"},{default:Je(()=>[...b[1]||(b[1]=[kn(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:Je(()=>[et(h,null,{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(n.menu.items,(T,$)=>(Dt(),Vr(So,null,[T.divider?(Dt(),xn(o,{key:$+"-divider"})):T.subMenu&&T.subMenu.length>0?(Dt(),Vr("div",{key:$+"-submenu"},[(Dt(),xn(i,{key:$,"open-on-hover":"",location:"right"},{activator:Je(({props:S})=>[(Dt(),xn(f,Yu({ref_for:!0},S,{key:$,disabled:T.disabled}),Xu({append:Je(()=>[et(p,null,{default:Je(()=>[...b[2]||(b[2]=[kn(" mdi-chevron-right ",-1)])]),_:1})]),default:Je(()=>[!T.radio&&!T.checkbox?(Dt(),xn(c,{key:0,style:Qu("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Je(()=>[kn(xr(T.label),1)]),_:2},1032,["style"])):Si("",!0)]),_:2},[T.icon?{name:"prepend",fn:Je(()=>[et(p,{disabled:T.disabled},{default:Je(()=>[kn(xr(T.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Je(()=>[et(h,null,{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(T.subMenu,(S,k)=>(Dt(),xn(f,{key:k,"prepend-icon":S.icon,onClick:L=>t("submenu-click",S)},{default:Je(()=>[et(c,null,{default:Je(()=>[kn(xr(S.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):T.radioGroup?(Dt(),xn(w,{key:$+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":T.value,"onUpdate:modelValue":T.command},{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(T.choices,(S,k)=>(Dt(),xn(f,{key:k+"-choice"},{default:Je(()=>[et(m,{class:"list-action"},{default:Je(()=>[et(a,{color:"secondary",label:S.label,value:S.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Dt(),xn(f,{key:$+"-list",disabled:T.disabled,"data-test":d(`${n.title} ${n.menu.label} ${T.label}`),onClick:()=>{T.command(T),T.checkbox||l()}},Xu({default:Je(()=>[T.checkbox?(Dt(),xn(m,{key:0,class:"list-action"},{default:Je(()=>[et(x,{modelValue:T.checked,"onUpdate:modelValue":S=>T.checked=S,label:T.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):Si("",!0),!T.radio&&!T.checkbox?(Dt(),xn(c,{key:1,style:Qu("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Je(()=>[kn(xr(T.label),1)]),_:2},1032,["style"])):Si("",!0)]),_:2},[T.icon?{name:"prepend",fn:Je(()=>[et(p,{icon:T.icon,disabled:T.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},vT={components:{TopBarMenu:mT},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},yT={class:"app-title mr-2"};function bT(n,e,t,r,l,d){const u=Tt("v-col"),b=Tt("v-row"),p=Tt("TopBarMenu");return Dt(),xn(xp,{to:"#openc3-menu"},[et(b,{"no-gutters":""},{default:Je(()=>[et(u,{"align-self":"end"},{default:Je(()=>[cr("span",yT,xr(t.title),1)]),_:1})]),_:1}),et(b,{dense:"",class:"flex-nowrap"},{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(t.menus,(g,o)=>(Dt(),xn(p,{key:o+"-top-menu",ref_for:!0,ref:"topmenu",menu:g,title:t.title,onSubmenuClick:d.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const wT=Ku(vT,[["render",bT],["__scopeId","data-v-b6581c4c"]]);function ab(n,e){return function(){return n.apply(e,arguments)}}const{toString:xT}=Object.prototype,{getPrototypeOf:Vd}=Object,{iterator:zc,toStringTag:lb}=Symbol,Hc=(n=>e=>{const t=xT.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Vi=n=>(n=n.toLowerCase(),e=>Hc(e)===n),Uc=n=>e=>typeof e===n,{isArray:$a}=Array,Aa=Uc("undefined");function bl(n){return n!==null&&!Aa(n)&&n.constructor!==null&&!Aa(n.constructor)&&Qr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cb=Vi("ArrayBuffer");function kT(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&cb(n.buffer),e}const ST=Uc("string"),Qr=Uc("function"),ub=Uc("number"),wl=n=>n!==null&&typeof n=="object",_T=n=>n===!0||n===!1,qc=n=>{if(Hc(n)!=="object")return!1;const e=Vd(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lb in n)&&!(zc in n)},CT=n=>{if(!wl(n)||bl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},$T=Vi("Date"),AT=Vi("File"),ET=Vi("Blob"),TT=Vi("FileList"),MT=n=>wl(n)&&Qr(n.pipe),RT=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Qr(n.append)&&((e=Hc(n))==="formdata"||e==="object"&&Qr(n.toString)&&n.toString()==="[object FormData]"))},LT=Vi("URLSearchParams"),[OT,IT,NT,DT]=["ReadableStream","Request","Response","Headers"].map(Vi),FT=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xl(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),$a(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(bl(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function hb(n,e){if(bl(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,db=n=>!Aa(n)&&n!==Ds;function Kd(){const{caseless:n,skipUndefined:e}=db(this)&&this||{},t={},r=(l,d)=>{const u=n&&hb(t,d)||d;qc(t[u])&&qc(l)?t[u]=Kd(t[u],l):qc(l)?t[u]=Kd({},l):$a(l)?t[u]=l.slice():(!e||!Aa(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&xl(arguments[l],r);return t}const PT=(n,e,t,{allOwnKeys:r}={})=>(xl(e,(l,d)=>{t&&Qr(l)?n[d]=ab(l,t):n[d]=l},{allOwnKeys:r}),n),BT=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),jT=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},WT=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&Vd(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},zT=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},HT=n=>{if(!n)return null;if($a(n))return n;let e=n.length;if(!ub(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},UT=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Vd(Uint8Array)),qT=(n,e)=>{const t=(n&&n[zc]).call(n);let r;for(;(r=t.next())&&!r.done;){const l=r.value;e.call(n,l[0],l[1])}},VT=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},KT=Vi("HTMLFormElement"),GT=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),fb=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),YT=Vi("RegExp"),pb=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};xl(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},XT=n=>{pb(n,(e,t)=>{if(Qr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},QT=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return $a(n)?r(n):r(String(n).split(e)),t},ZT=()=>{},JT=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function eM(n){return!!(n&&Qr(n.append)&&n[lb]==="FormData"&&n[zc])}const tM=n=>{const e=new Array(10),t=(r,l)=>{if(wl(r)){if(e.indexOf(r)>=0)return;if(bl(r))return r;if(!("toJSON"in r)){e[l]=r;const d=$a(r)?[]:{};return xl(r,(u,b)=>{const p=t(u,l+1);!Aa(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},nM=Vi("AsyncFunction"),rM=n=>n&&(wl(n)||Qr(n))&&Qr(n.then)&&Qr(n.catch),gb=((n,e)=>n?setImmediate:e?((t,r)=>(Ds.addEventListener("message",({source:l,data:d})=>{l===Ds&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),Ds.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Qr(Ds.postMessage)),iM=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||gb,oM=n=>n!=null&&Qr(n[zc]),Ce={isArray:$a,isArrayBuffer:cb,isBuffer:bl,isFormData:RT,isArrayBufferView:kT,isString:ST,isNumber:ub,isBoolean:_T,isObject:wl,isPlainObject:qc,isEmptyObject:CT,isReadableStream:OT,isRequest:IT,isResponse:NT,isHeaders:DT,isUndefined:Aa,isDate:$T,isFile:AT,isBlob:ET,isRegExp:YT,isFunction:Qr,isStream:MT,isURLSearchParams:LT,isTypedArray:UT,isFileList:TT,forEach:xl,merge:Kd,extend:PT,trim:FT,stripBOM:BT,inherits:jT,toFlatObject:WT,kindOf:Hc,kindOfTest:Vi,endsWith:zT,toArray:HT,forEachEntry:qT,matchAll:VT,isHTMLForm:KT,hasOwnProperty:fb,hasOwnProp:fb,reduceDescriptors:pb,freezeMethods:XT,toObjectSet:QT,toCamelCase:GT,noop:ZT,toFiniteNumber:JT,findKey:hb,global:Ds,isContextDefined:db,isSpecCompliantForm:eM,toJSONObject:tM,isAsyncFn:nM,isThenable:rM,setImmediate:gb,asap:iM,isIterable:oM};function _t(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.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 mb=_t.prototype,vb={};["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(n=>{vb[n]={value:n}}),Object.defineProperties(_t,vb),Object.defineProperty(mb,"isAxiosError",{value:!0}),_t.from=(n,e,t,r,l,d)=>{const u=Object.create(mb);Ce.toFlatObject(n,u,function(g){return g!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return _t.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const sM=null;function Gd(n){return Ce.isPlainObject(n)||Ce.isArray(n)}function yb(n){return Ce.endsWith(n,"[]")?n.slice(0,-2):n}function bb(n,e,t){return n?n.concat(e).map(function(r,l){return r=yb(r),!t&&l?"["+r+"]":r}).join(t?".":""):e}function aM(n){return Ce.isArray(n)&&!n.some(Gd)}const lM=Ce.toFlatObject(Ce,{},null,function(n){return/^is[A-Z]/.test(n)});function Vc(n,e,t){if(!Ce.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Ce.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,i){return!Ce.isUndefined(i[h])});const r=t.metaTokens,l=t.visitor||g,d=t.dots,u=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(e);if(!Ce.isFunction(l))throw new TypeError("visitor must be a function");function p(h){if(h===null)return"";if(Ce.isDate(h))return h.toISOString();if(Ce.isBoolean(h))return h.toString();if(!b&&Ce.isBlob(h))throw new _t("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(h)||Ce.isTypedArray(h)?b&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function g(h,i,a){let m=h;if(h&&!a&&typeof h=="object"){if(Ce.endsWith(i,"{}"))i=r?i:i.slice(0,-2),h=JSON.stringify(h);else if(Ce.isArray(h)&&aM(h)||(Ce.isFileList(h)||Ce.endsWith(i,"[]"))&&(m=Ce.toArray(h)))return i=yb(i),m.forEach(function(w,x){!(Ce.isUndefined(w)||w===null)&&e.append(u===!0?bb([i],x,d):u===null?i:i+"[]",p(w))}),!1}return Gd(h)?!0:(e.append(bb(a,i,d),p(h)),!1)}const o=[],c=Object.assign(lM,{defaultVisitor:g,convertValue:p,isVisitable:Gd});function f(h,i){if(!Ce.isUndefined(h)){if(o.indexOf(h)!==-1)throw Error("Circular reference detected in "+i.join("."));o.push(h),Ce.forEach(h,function(a,m){(!(Ce.isUndefined(a)||a===null)&&l.call(e,a,Ce.isString(m)?m.trim():m,i,c))===!0&&f(a,i?i.concat(m):[m])}),o.pop()}}if(!Ce.isObject(n))throw new TypeError("data must be an object");return f(n),e}function wb(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Yd(n,e){this._pairs=[],n&&Vc(n,this,e)}const xb=Yd.prototype;xb.append=function(n,e){this._pairs.push([n,e])},xb.toString=function(n){const e=n?function(t){return n.call(this,t,wb)}:wb;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function cM(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kb(n,e,t){if(!e)return n;const r=t&&t.encode||cM;Ce.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=Ce.isURLSearchParams(e)?e.toString():new Yd(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}let Sb=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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(t){t!==null&&e(t)})}};const _b={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uM=typeof URLSearchParams<"u"?URLSearchParams:Yd,hM=typeof FormData<"u"?FormData:null,dM=typeof Blob<"u"?Blob:null,fM={isBrowser:!0,classes:{URLSearchParams:uM,FormData:hM,Blob:dM},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",Qd=typeof navigator=="object"&&navigator||void 0,pM=Xd&&(!Qd||["ReactNative","NativeScript","NS"].indexOf(Qd.product)<0),gM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mM=Xd&&window.location.href||"http://localhost",vM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:pM,hasStandardBrowserWebWorkerEnv:gM,navigator:Qd,origin:mM},Symbol.toStringTag,{value:"Module"})),Cr={...vM,...fM};function yM(n,e){return Vc(n,new Cr.classes.URLSearchParams,{visitor:function(t,r,l,d){return Cr.isNode&&Ce.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function bM(n){return Ce.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wM(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function Cb(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&Ce.isArray(l)?l.length:u,p?(Ce.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!Ce.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&Ce.isArray(l[u])&&(l[u]=wM(l[u])),!b)}if(Ce.isFormData(n)&&Ce.isFunction(n.entries)){const t={};return Ce.forEachEntry(n,(r,l)=>{e(bM(r),l,t,0)}),t}return null}function xM(n,e,t){if(Ce.isString(n))try{return(e||JSON.parse)(n),Ce.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const kl={transitional:_b,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,l=Ce.isObject(n);if(l&&Ce.isHTMLForm(n)&&(n=new FormData(n)),Ce.isFormData(n))return r?JSON.stringify(Cb(n)):n;if(Ce.isArrayBuffer(n)||Ce.isBuffer(n)||Ce.isStream(n)||Ce.isFile(n)||Ce.isBlob(n)||Ce.isReadableStream(n))return n;if(Ce.isArrayBufferView(n))return n.buffer;if(Ce.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let d;if(l){if(t.indexOf("application/x-www-form-urlencoded")>-1)return yM(n,this.formSerializer).toString();if((d=Ce.isFileList(n))||t.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Vc(d?{"files[]":n}:n,u&&new u,this.formSerializer)}}return l||r?(e.setContentType("application/json",!1),xM(n)):n}],transformResponse:[function(n){const e=this.transitional||kl.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ce.isResponse(n)||Ce.isReadableStream(n))return n;if(n&&Ce.isString(n)&&(t&&!this.responseType||r)){const l=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(d){if(l)throw d.name==="SyntaxError"?_t.from(d,_t.ERR_BAD_RESPONSE,this,null,this.response):d}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Cr.classes.FormData,Blob:Cr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],n=>{kl.headers[n]={}});const kM=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"]),SM=n=>{const e={};let t,r,l;return n&&n.split(`
1494
+ }`;var Rt=zx(function(){return At(te,rt+"return "+Fe).apply(t,ue)});if(Rt.source=Fe,lp(Rt))throw Rt;return Rt}function LP(s){return Jt(s).toLowerCase()}function OP(s){return Jt(s).toUpperCase()}function IP(s,v,M){if(s=Jt(s),s&&(M||v===t))return fn(s);if(!s||!(v=bi(v)))return s;var H=wt(s),G=wt(v),te=$t(H,G),ue=Jn(H,G)+1;return vs(H,te,ue).join("")}function NP(s,v,M){if(s=Jt(s),s&&(M||v===t))return s.slice(0,Lt(s)+1);if(!s||!(v=bi(v)))return s;var H=wt(s),G=Jn(H,wt(v))+1;return vs(H,0,G).join("")}function DP(s,v,M){if(s=Jt(s),s&&(M||v===t))return s.replace($n,"");if(!s||!(v=bi(v)))return s;var H=wt(s),G=$t(H,wt(v));return vs(H,G).join("")}function FP(s,v){var M=O,H=W;if(En(v)){var G="separator"in v?v.separator:G;M="length"in v?Et(v.length):M,H="omission"in v?bi(v.omission):H}s=Jt(s);var te=s.length;if(oe(s)){var ue=wt(s);te=ue.length}if(M>=te)return s;var de=M-It(H);if(de<1)return H;var ve=ue?vs(ue,0,de).join(""):s.slice(0,de);if(G===t)return ve+H;if(ue&&(de+=ve.length-de),cp(G)){if(s.slice(de).search(G)){var Le,Oe=ve;for(G.global||(G=zr(G.source,Jt(fi.exec(G))+"g")),G.lastIndex=0;Le=G.exec(Oe);)var Fe=Le.index;ve=ve.slice(0,Fe===t?de:Fe)}}else if(s.indexOf(bi(G),de)!=de){var Ve=ve.lastIndexOf(G);Ve>-1&&(ve=ve.slice(0,Ve))}return ve+H}function PP(s){return s=Jt(s),s&&ts.test(s)?s.replace(vr,ut):s}var BP=qa(function(s,v,M){return s+(M?" ":"")+v.toUpperCase()}),dp=H0("toUpperCase");function Wx(s,v,M){return s=Jt(s),v=M?t:v,v===t?pe(s)?wn(s):Y(s):s.match(v)||[]}var zx=Ot(function(s,v){try{return dr(s,t,v)}catch(M){return lp(M)?M:new ct(M)}}),jP=zo(function(s,v){return yr(v,function(M){M=ko(M),jo(s,M,sp(s[M],s))}),s});function WP(s){var v=s==null?0:s.length,M=ht();return s=v?y(s,function(H){if(typeof H[1]!="function")throw new an(u);return[M(H[0]),H[1]]}):[],Ot(function(H){for(var G=-1;++G<v;){var te=s[G];if(dr(te[0],this,H))return dr(te[1],this,H)}})}function zP(s){return f2(Di(s,c))}function fp(s){return function(){return s}}function HP(s,v){return s==null||s!==s?v:s}var UP=q0(),qP=q0(!0);function ai(s){return s}function pp(s){return x0(typeof s=="function"?s:Di(s,c))}function VP(s){return S0(Di(s,c))}function KP(s,v){return _0(s,Di(v,c))}var GP=Ot(function(s,v){return function(M){return zl(M,s,v)}}),YP=Ot(function(s,v){return function(M){return zl(s,M,v)}});function gp(s,v,M){var H=mr(v),G=Au(v,H);M==null&&!(En(v)&&(G.length||!H.length))&&(M=v,v=s,s=this,G=Au(v,mr(v)));var te=!(En(M)&&"chain"in M)||!!M.chain,ue=Uo(s);return yr(G,function(de){var ve=v[de];s[de]=ve,ue&&(s.prototype[de]=function(){var Le=this.__chain__;if(te||Le){var Oe=s(this.__wrapped__),Fe=Oe.__actions__=ii(this.__actions__);return Fe.push({func:ve,args:arguments,thisArg:s}),Oe.__chain__=Le,Oe}return ve.apply(s,E([this.value()],arguments))})}),s}function XP(){return sn._===this&&(sn._=kI),this}function mp(){}function QP(s){return s=Et(s),Ot(function(v){return C0(v,s)})}var ZP=Kf(y),JP=Kf(br),eB=Kf(B);function Hx(s){return ep(s)?be(ko(s)):M2(s)}function tB(s){return function(v){return s==null?t:na(s,v)}}var nB=K0(),rB=K0(!0);function vp(){return[]}function yp(){return!1}function iB(){return{}}function oB(){return""}function sB(){return!0}function aB(s,v){if(s=Et(s),s<1||s>U)return[];var M=J,H=Or(s,J);v=ht(v),s-=J;for(var G=Ye(H,v);++M<s;)v(M);return G}function lB(s){return xt(s)?y(s,ko):wi(s)?[s]:ii(cx(Jt(s)))}function cB(s){var v=++wI;return Jt(s)+v}var uB=Ou(function(s,v){return s+v},0),hB=Gf("ceil"),dB=Ou(function(s,v){return s/v},1),fB=Gf("floor");function pB(s){return s&&s.length?$u(s,ai,Of):t}function gB(s,v){return s&&s.length?$u(s,ht(v,2),Of):t}function mB(s){return me(s,ai)}function vB(s,v){return me(s,ht(v,2))}function yB(s){return s&&s.length?$u(s,ai,Ff):t}function bB(s,v){return s&&s.length?$u(s,ht(v,2),Ff):t}var wB=Ou(function(s,v){return s*v},1),xB=Gf("round"),kB=Ou(function(s,v){return s-v},0);function SB(s){return s&&s.length?at(s,ai):0}function _B(s,v){return s&&s.length?at(s,ht(v,2)):0}return ee.after=VD,ee.ary=wx,ee.assign=OF,ee.assignIn=Ix,ee.assignInWith=Vu,ee.assignWith=IF,ee.at=NF,ee.before=xx,ee.bind=sp,ee.bindAll=jP,ee.bindKey=kx,ee.castArray=iF,ee.chain=vx,ee.chunk=fN,ee.compact=pN,ee.concat=gN,ee.cond=WP,ee.conforms=zP,ee.constant=fp,ee.countBy=SD,ee.create=DF,ee.curry=Sx,ee.curryRight=_x,ee.debounce=Cx,ee.defaults=FF,ee.defaultsDeep=PF,ee.defer=KD,ee.delay=GD,ee.difference=mN,ee.differenceBy=vN,ee.differenceWith=yN,ee.drop=bN,ee.dropRight=wN,ee.dropRightWhile=xN,ee.dropWhile=kN,ee.fill=SN,ee.filter=CD,ee.flatMap=ED,ee.flatMapDeep=TD,ee.flatMapDepth=MD,ee.flatten=fx,ee.flattenDeep=_N,ee.flattenDepth=CN,ee.flip=YD,ee.flow=UP,ee.flowRight=qP,ee.fromPairs=$N,ee.functions=qF,ee.functionsIn=VF,ee.groupBy=RD,ee.initial=EN,ee.intersection=TN,ee.intersectionBy=MN,ee.intersectionWith=RN,ee.invert=GF,ee.invertBy=YF,ee.invokeMap=OD,ee.iteratee=pp,ee.keyBy=ID,ee.keys=mr,ee.keysIn=si,ee.map=ju,ee.mapKeys=QF,ee.mapValues=ZF,ee.matches=VP,ee.matchesProperty=KP,ee.memoize=zu,ee.merge=JF,ee.mergeWith=Nx,ee.method=GP,ee.methodOf=YP,ee.mixin=gp,ee.negate=Hu,ee.nthArg=QP,ee.omit=eP,ee.omitBy=tP,ee.once=XD,ee.orderBy=ND,ee.over=ZP,ee.overArgs=QD,ee.overEvery=JP,ee.overSome=eB,ee.partial=ap,ee.partialRight=$x,ee.partition=DD,ee.pick=nP,ee.pickBy=Dx,ee.property=Hx,ee.propertyOf=tB,ee.pull=NN,ee.pullAll=gx,ee.pullAllBy=DN,ee.pullAllWith=FN,ee.pullAt=PN,ee.range=nB,ee.rangeRight=rB,ee.rearg=ZD,ee.reject=BD,ee.remove=BN,ee.rest=JD,ee.reverse=ip,ee.sampleSize=WD,ee.set=iP,ee.setWith=oP,ee.shuffle=zD,ee.slice=jN,ee.sortBy=qD,ee.sortedUniq=KN,ee.sortedUniqBy=GN,ee.split=EP,ee.spread=eF,ee.tail=YN,ee.take=XN,ee.takeRight=QN,ee.takeRightWhile=ZN,ee.takeWhile=JN,ee.tap=pD,ee.throttle=tF,ee.thru=Bu,ee.toArray=Rx,ee.toPairs=Fx,ee.toPairsIn=Px,ee.toPath=lB,ee.toPlainObject=Ox,ee.transform=sP,ee.unary=nF,ee.union=eD,ee.unionBy=tD,ee.unionWith=nD,ee.uniq=rD,ee.uniqBy=iD,ee.uniqWith=oD,ee.unset=aP,ee.unzip=op,ee.unzipWith=mx,ee.update=lP,ee.updateWith=cP,ee.values=Ga,ee.valuesIn=uP,ee.without=sD,ee.words=Wx,ee.wrap=rF,ee.xor=aD,ee.xorBy=lD,ee.xorWith=cD,ee.zip=uD,ee.zipObject=hD,ee.zipObjectDeep=dD,ee.zipWith=fD,ee.entries=Fx,ee.entriesIn=Px,ee.extend=Ix,ee.extendWith=Vu,gp(ee,ee),ee.add=uB,ee.attempt=zx,ee.camelCase=pP,ee.capitalize=Bx,ee.ceil=hB,ee.clamp=hP,ee.clone=oF,ee.cloneDeep=aF,ee.cloneDeepWith=lF,ee.cloneWith=sF,ee.conformsTo=cF,ee.deburr=jx,ee.defaultTo=HP,ee.divide=dB,ee.endsWith=gP,ee.eq=io,ee.escape=mP,ee.escapeRegExp=vP,ee.every=_D,ee.find=$D,ee.findIndex=hx,ee.findKey=BF,ee.findLast=AD,ee.findLastIndex=dx,ee.findLastKey=jF,ee.floor=fB,ee.forEach=yx,ee.forEachRight=bx,ee.forIn=WF,ee.forInRight=zF,ee.forOwn=HF,ee.forOwnRight=UF,ee.get=up,ee.gt=uF,ee.gte=hF,ee.has=KF,ee.hasIn=hp,ee.head=px,ee.identity=ai,ee.includes=LD,ee.indexOf=AN,ee.inRange=dP,ee.invoke=XF,ee.isArguments=oa,ee.isArray=xt,ee.isArrayBuffer=dF,ee.isArrayLike=oi,ee.isArrayLikeObject=qn,ee.isBoolean=fF,ee.isBuffer=ys,ee.isDate=pF,ee.isElement=gF,ee.isEmpty=mF,ee.isEqual=vF,ee.isEqualWith=yF,ee.isError=lp,ee.isFinite=bF,ee.isFunction=Uo,ee.isInteger=Ax,ee.isLength=Uu,ee.isMap=Ex,ee.isMatch=wF,ee.isMatchWith=xF,ee.isNaN=kF,ee.isNative=SF,ee.isNil=CF,ee.isNull=_F,ee.isNumber=Tx,ee.isObject=En,ee.isObjectLike=Nn,ee.isPlainObject=Gl,ee.isRegExp=cp,ee.isSafeInteger=$F,ee.isSet=Mx,ee.isString=qu,ee.isSymbol=wi,ee.isTypedArray=Ka,ee.isUndefined=AF,ee.isWeakMap=EF,ee.isWeakSet=TF,ee.join=LN,ee.kebabCase=yP,ee.last=Pi,ee.lastIndexOf=ON,ee.lowerCase=bP,ee.lowerFirst=wP,ee.lt=MF,ee.lte=RF,ee.max=pB,ee.maxBy=gB,ee.mean=mB,ee.meanBy=vB,ee.min=yB,ee.minBy=bB,ee.stubArray=vp,ee.stubFalse=yp,ee.stubObject=iB,ee.stubString=oB,ee.stubTrue=sB,ee.multiply=wB,ee.nth=IN,ee.noConflict=XP,ee.noop=mp,ee.now=Wu,ee.pad=xP,ee.padEnd=kP,ee.padStart=SP,ee.parseInt=_P,ee.random=fP,ee.reduce=FD,ee.reduceRight=PD,ee.repeat=CP,ee.replace=$P,ee.result=rP,ee.round=xB,ee.runInContext=fe,ee.sample=jD,ee.size=HD,ee.snakeCase=AP,ee.some=UD,ee.sortedIndex=WN,ee.sortedIndexBy=zN,ee.sortedIndexOf=HN,ee.sortedLastIndex=UN,ee.sortedLastIndexBy=qN,ee.sortedLastIndexOf=VN,ee.startCase=TP,ee.startsWith=MP,ee.subtract=kB,ee.sum=SB,ee.sumBy=_B,ee.template=RP,ee.times=aB,ee.toFinite=qo,ee.toInteger=Et,ee.toLength=Lx,ee.toLower=LP,ee.toNumber=Bi,ee.toSafeInteger=LF,ee.toString=Jt,ee.toUpper=OP,ee.trim=IP,ee.trimEnd=NP,ee.trimStart=DP,ee.truncate=FP,ee.unescape=PP,ee.uniqueId=cB,ee.upperCase=BP,ee.upperFirst=dp,ee.each=yx,ee.eachRight=bx,ee.first=px,gp(ee,function(){var s={};return wo(ee,function(v,M){rn.call(ee.prototype,M)||(s[M]=v)}),s}(),{chain:!1}),ee.VERSION=r,yr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){ee[s].placeholder=ee}),yr(["drop","take"],function(s,v){jt.prototype[s]=function(M){M=M===t?1:lr(Et(M),0);var H=this.__filtered__&&!v?new jt(this):this.clone();return H.__filtered__?H.__takeCount__=Or(M,H.__takeCount__):H.__views__.push({size:Or(M,J),type:s+(H.__dir__<0?"Right":"")}),H},jt.prototype[s+"Right"]=function(M){return this.reverse()[s](M).reverse()}}),yr(["filter","map","takeWhile"],function(s,v){var M=v+1,H=M==A||M==I;jt.prototype[s]=function(G){var te=this.clone();return te.__iteratees__.push({iteratee:ht(G,3),type:M}),te.__filtered__=te.__filtered__||H,te}}),yr(["head","last"],function(s,v){var M="take"+(v?"Right":"");jt.prototype[s]=function(){return this[M](1).value()[0]}}),yr(["initial","tail"],function(s,v){var M="drop"+(v?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[M](1)}}),jt.prototype.compact=function(){return this.filter(ai)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Ot(function(s,v){return typeof s=="function"?new jt(this):this.map(function(M){return zl(M,s,v)})}),jt.prototype.reject=function(s){return this.filter(Hu(ht(s)))},jt.prototype.slice=function(s,v){s=Et(s);var M=this;return M.__filtered__&&(s>0||v<0)?new jt(M):(s<0?M=M.takeRight(-s):s&&(M=M.drop(s)),v!==t&&(v=Et(v),M=v<0?M.dropRight(-v):M.take(v-s)),M)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(J)},wo(jt.prototype,function(s,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),H=/^(?:head|last)$/.test(v),G=ee[H?"take"+(v=="last"?"Right":""):v],te=H||/^find/.test(v);G&&(ee.prototype[v]=function(){var ue=this.__wrapped__,de=H?[1]:arguments,ve=ue instanceof jt,Le=de[0],Oe=ve||xt(ue),Fe=function(Nt){var zt=G.apply(ee,E([Nt],de));return H&&Ve?zt[0]:zt};Oe&&M&&typeof Le=="function"&&Le.length!=1&&(ve=Oe=!1);var Ve=this.__chain__,rt=!!this.__actions__.length,ft=te&&!Ve,Rt=ve&&!rt;if(!te&&Oe){ue=Rt?ue:new jt(this);var pt=s.apply(ue,de);return pt.__actions__.push({func:Bu,args:[Fe],thisArg:t}),new Ni(pt,Ve)}return ft&&Rt?s.apply(this,de):(pt=this.thru(Fe),ft?H?pt.value()[0]:pt.value():pt)})}),yr(["pop","push","shift","sort","splice","unshift"],function(s){var v=gr[s],M=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",H=/^(?:pop|shift)$/.test(s);ee.prototype[s]=function(){var G=arguments;if(H&&!this.__chain__){var te=this.value();return v.apply(xt(te)?te:[],G)}return this[M](function(ue){return v.apply(xt(ue)?ue:[],G)})}}),wo(jt.prototype,function(s,v){var M=ee[v];if(M){var H=M.name+"";rn.call(za,H)||(za[H]=[]),za[H].push({name:v,func:M})}}),za[Lu(t,w).name]=[{name:"wrapper",func:t}],jt.prototype.clone=PI,jt.prototype.reverse=BI,jt.prototype.value=jI,ee.prototype.at=gD,ee.prototype.chain=mD,ee.prototype.commit=vD,ee.prototype.next=yD,ee.prototype.plant=wD,ee.prototype.reverse=xD,ee.prototype.toJSON=ee.prototype.valueOf=ee.prototype.value=kD,ee.prototype.first=ee.prototype.head,Nl&&(ee.prototype[Nl]=bD),ee},Wt=er();Zn?((Zn.exports=Wt)._=Wt,mn._=Wt):sn._=Wt}).call(T$)}(Cc,Cc.exports)),Cc.exports}var R$=M$();Si("O",lc(R$)).debounce(function(){this.rebuildDisplayText()},300);var Zm={exports:{}},Jm;function L$(){return Jm||(Jm=1,function(n,e){(function(){ace.require(["ace/mode/text"],function(t){n&&(n.exports=t)})})()}(Zm)),Zm.exports}L$();const O$=!0,tr="u-",I$="uplot",N$=tr+"hz",D$=tr+"vt",F$=tr+"title",P$=tr+"wrap",B$=tr+"under",j$=tr+"over",W$=tr+"axis",Ms=tr+"off",z$=tr+"select",H$=tr+"cursor-x",U$=tr+"cursor-y",q$=tr+"cursor-pt",V$=tr+"legend",K$=tr+"live",G$=tr+"inline",Y$=tr+"series",X$=tr+"marker",ev=tr+"label",Q$=tr+"value",hl="width",dl="height",fl="top",tv="bottom",ma="left",Fh="right",Ph="#000",nv=Ph+"0",Bh="mousemove",rv="mousedown",jh="mouseup",iv="mouseenter",ov="mouseleave",sv="dblclick",Z$="resize",J$="scroll",av="change",$c="dppxchange",Wh="--",va=typeof window<"u",zh=va?document:null,ya=va?window:null,eA=va?navigator:null;let Kt,Ac;function Hh(){let n=devicePixelRatio;Kt!=n&&(Kt=n,Ac&&Vh(av,Ac,Hh),Ac=matchMedia(`(min-resolution: ${Kt-.001}dppx) and (max-resolution: ${Kt+.001}dppx)`),Rs(av,Ac,Hh),ya.dispatchEvent(new CustomEvent($c)))}function li(n,e){if(e!=null){let t=n.classList;!t.contains(e)&&t.add(e)}}function Uh(n,e){let t=n.classList;t.contains(e)&&t.remove(e)}function pn(n,e,t){n.style[e]=t+"px"}function Hi(n,e,t,r){let l=zh.createElement(n);return e!=null&&li(l,e),t!=null&&t.insertBefore(l,r),l}function Ci(n,e){return Hi("div",n,e)}const lv=new WeakMap;function lo(n,e,t,r,l){let d="translate("+e+"px,"+t+"px)",u=lv.get(n);d!=u&&(n.style.transform=d,lv.set(n,d),e<0||t<0||e>r||t>l?li(n,Ms):Uh(n,Ms))}const cv=new WeakMap;function uv(n,e,t){let r=e+t,l=cv.get(n);r!=l&&(cv.set(n,r),n.style.background=e,n.style.borderColor=t)}const hv=new WeakMap;function dv(n,e,t,r){let l=e+""+t,d=hv.get(n);l!=d&&(hv.set(n,l),n.style.height=t+"px",n.style.width=e+"px",n.style.marginLeft=r?-e/2+"px":0,n.style.marginTop=r?-t/2+"px":0)}const qh={passive:!0},tA={...qh,capture:!0};function Rs(n,e,t,r){e.addEventListener(n,t,r?tA:qh)}function Vh(n,e,t,r){e.removeEventListener(n,t,qh)}va&&Hh();function Ui(n,e,t,r){let l;t=t||0,r=r||e.length-1;let d=r<=2147483647;for(;r-t>1;)l=d?t+r>>1:ui((t+r)/2),e[l]<n?t=l:r=l;return n-e[t]<=e[r]-n?t:r}function fv(n){return(e,t,r)=>{let l=-1,d=-1;for(let u=t;u<=r;u++)if(n(e[u])){l=u;break}for(let u=r;u>=t;u--)if(n(e[u])){d=u;break}return[l,d]}}const pv=n=>n!=null,gv=n=>n!=null&&n>0,Ec=fv(pv),nA=fv(gv);function rA(n,e,t,r=0,l=!1){let d=l?nA:Ec,u=l?gv:pv;[e,t]=d(n,e,t);let b=n[e],p=n[e];if(e>-1)if(r==1)b=n[e],p=n[t];else if(r==-1)b=n[t],p=n[e];else for(let g=e;g<=t;g++){let o=n[g];u(o)&&(o<b?b=o:o>p&&(p=o))}return[b??ln,p??-ln]}function Tc(n,e,t,r){let l=yv(n),d=yv(e);n==e&&(l==-1?(n*=t,e/=t):(n/=t,e*=t));let u=t==10?_o:bv,b=l==1?ui:$i,p=d==1?$i:ui,g=b(u(nr(n))),o=p(u(nr(e))),c=ba(t,g),f=ba(t,o);return t==10&&(g<0&&(c=cn(c,-g)),o<0&&(f=cn(f,-o))),r||t==2?(n=c*l,e=f*d):(n=$v(n,c),e=Lc(e,f)),[n,e]}function Kh(n,e,t,r){let l=Tc(n,e,t,r);return n==0&&(l[0]=0),e==0&&(l[1]=0),l}const Gh=.1,mv={mode:3,pad:Gh},pl={pad:0,soft:null,mode:0},iA={min:pl,max:pl};function Mc(n,e,t,r){return Oc(t)?vv(n,e,t):(pl.pad=t,pl.soft=r?0:null,pl.mode=r?3:0,vv(n,e,iA))}function Ut(n,e){return n??e}function oA(n,e,t){for(e=Ut(e,0),t=Ut(t,n.length-1);e<=t;){if(n[e]!=null)return!0;e++}return!1}function vv(n,e,t){let r=t.min,l=t.max,d=Ut(r.pad,0),u=Ut(l.pad,0),b=Ut(r.hard,-ln),p=Ut(l.hard,ln),g=Ut(r.soft,ln),o=Ut(l.soft,-ln),c=Ut(r.mode,0),f=Ut(l.mode,0),h=e-n,i=_o(h),a=Dr(nr(n),nr(e)),m=_o(a),w=nr(m-i);(h<1e-24||w>10)&&(h=0,(n==0||e==0)&&(h=1e-24,c==2&&g!=ln&&(d=0),f==2&&o!=-ln&&(u=0)));let x=h||a||1e3,T=_o(x),$=ba(10,ui(T)),S=x*(h==0?n==0?.1:1:d),k=cn($v(n-S,$/10),24),L=n>=g&&(c==1||c==3&&k<=g||c==2&&k>=g)?g:ln,N=Dr(b,k<L&&n>=L?L:qi(L,k)),R=x*(h==0?e==0?.1:1:u),O=cn(Lc(e+R,$/10),24),W=e<=o&&(f==1||f==3&&O>=o||f==2&&O<=o)?o:-ln,P=qi(p,O>W&&e<=W?W:Dr(W,O));return N==P&&N==0&&(P=100),[N,P]}const sA=new Intl.NumberFormat(va?eA.language:"en-US"),Yh=n=>sA.format(n),ci=Math,Rc=ci.PI,nr=ci.abs,ui=ci.floor,rr=ci.round,$i=ci.ceil,qi=ci.min,Dr=ci.max,ba=ci.pow,yv=ci.sign,_o=ci.log10,bv=ci.log2,aA=(n,e=1)=>ci.sinh(n)*e,Xh=(n,e=1)=>ci.asinh(n/e),ln=1/0;function wv(n){return(_o((n^n>>31)-(n>>31))|0)+1}function Qh(n,e,t){return qi(Dr(n,e),t)}function xv(n){return typeof n=="function"}function Ft(n){return xv(n)?n:()=>n}const lA=()=>{},kv=n=>n,Sv=(n,e)=>e,cA=n=>null,_v=n=>!0,Cv=(n,e)=>n==e,uA=/\.\d*?(?=9{6,}|0{6,})/gm,Ls=n=>{if(Ev(n)||Jo.has(n))return n;const e=`${n}`,t=e.match(uA);if(t==null)return n;let r=t[0].length-1;if(e.indexOf("e-")!=-1){let[l,d]=e.split("e");return+`${Ls(l)}e${d}`}return cn(n,r)};function Os(n,e){return Ls(cn(Ls(n/e))*e)}function Lc(n,e){return Ls($i(Ls(n/e))*e)}function $v(n,e){return Ls(ui(Ls(n/e))*e)}function cn(n,e=0){if(Ev(n))return n;let t=10**e,r=n*t*(1+Number.EPSILON);return rr(r)/t}const Jo=new Map;function Av(n){return((""+n).split(".")[1]||"").length}function gl(n,e,t,r){let l=[],d=r.map(Av);for(let u=e;u<t;u++){let b=nr(u),p=cn(ba(n,u),b);for(let g=0;g<r.length;g++){let o=n==10?+`${r[g]}e${u}`:r[g]*p,c=(u>=0?0:b)+(u>=d[g]?0:d[g]),f=n==10?o:cn(o,c);l.push(f),Jo.set(f,c)}}return l}const ml={},Zh=[],wa=[null,null],es=Array.isArray,Ev=Number.isInteger,hA=n=>n===void 0;function Tv(n){return typeof n=="string"}function Oc(n){let e=!1;if(n!=null){let t=n.constructor;e=t==null||t==Object}return e}function dA(n){return n!=null&&typeof n=="object"}const fA=Object.getPrototypeOf(Uint8Array),Mv="__proto__";function xa(n,e=Oc){let t;if(es(n)){let r=n.find(l=>l!=null);if(es(r)||e(r)){t=Array(n.length);for(let l=0;l<n.length;l++)t[l]=xa(n[l],e)}else t=n.slice()}else if(n instanceof fA)t=n.slice();else if(e(n)){t={};for(let r in n)r!=Mv&&(t[r]=xa(n[r],e))}else t=n;return t}function Gn(n){let e=arguments;for(let t=1;t<e.length;t++){let r=e[t];for(let l in r)l!=Mv&&(Oc(n[l])?Gn(n[l],xa(r[l])):n[l]=xa(r[l]))}return n}const pA=0,gA=1,mA=2;function vA(n,e,t){for(let r=0,l,d=-1;r<e.length;r++){let u=e[r];if(u>d){for(l=u-1;l>=0&&n[l]==null;)n[l--]=null;for(l=u+1;l<t&&n[l]==null;)n[d=l++]=null}}}function yA(n,e){if(xA(n)){let u=n[0].slice();for(let b=1;b<n.length;b++)u.push(...n[b].slice(1));return kA(u[0])||(u=wA(u)),u}let t=new Set;for(let u=0;u<n.length;u++){let b=n[u][0],p=b.length;for(let g=0;g<p;g++)t.add(b[g])}let r=[Array.from(t).sort((u,b)=>u-b)],l=r[0].length,d=new Map;for(let u=0;u<l;u++)d.set(r[0][u],u);for(let u=0;u<n.length;u++){let b=n[u],p=b[0];for(let g=1;g<b.length;g++){let o=b[g],c=Array(l).fill(void 0),f=e?e[u][g]:gA,h=[];for(let i=0;i<o.length;i++){let a=o[i],m=d.get(p[i]);a===null?f!=pA&&(c[m]=a,f==mA&&h.push(m)):c[m]=a}vA(c,h,l),r.push(c)}}return r}const bA=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function wA(n){let e=n[0],t=e.length,r=Array(t);for(let d=0;d<r.length;d++)r[d]=d;r.sort((d,u)=>e[d]-e[u]);let l=[];for(let d=0;d<n.length;d++){let u=n[d],b=Array(t);for(let p=0;p<t;p++)b[p]=u[r[p]];l.push(b)}return l}function xA(n){let e=n[0][0],t=e.length;for(let r=1;r<n.length;r++){let l=n[r][0];if(l.length!=t)return!1;if(l!=e){for(let d=0;d<t;d++)if(l[d]!=e[d])return!1}}return!0}function kA(n,e=100){const t=n.length;if(t<=1)return!0;let r=0,l=t-1;for(;r<=l&&n[r]==null;)r++;for(;l>=r&&n[l]==null;)l--;if(l<=r)return!0;const d=Dr(1,ui((l-r+1)/e));for(let u=n[r],b=r+d;b<=l;b+=d){const p=n[b];if(p!=null){if(p<=u)return!1;u=p}}return!0}const Rv=["January","February","March","April","May","June","July","August","September","October","November","December"],Lv=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Ov(n){return n.slice(0,3)}const SA=Lv.map(Ov),_A=Rv.map(Ov),CA={MMMM:Rv,MMM:_A,WWWW:Lv,WWW:SA};function vl(n){return(n<10?"0":"")+n}function $A(n){return(n<10?"00":n<100?"0":"")+n}const AA={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,e)=>e.MMMM[n.getMonth()],MMM:(n,e)=>e.MMM[n.getMonth()],MM:n=>vl(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>vl(n.getDate()),D:n=>n.getDate(),WWWW:(n,e)=>e.WWWW[n.getDay()],WWW:(n,e)=>e.WWW[n.getDay()],HH:n=>vl(n.getHours()),H:n=>n.getHours(),h:n=>{let e=n.getHours();return e==0?12:e>12?e-12:e},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>vl(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>vl(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>$A(n.getMilliseconds())};function Jh(n,e){e=e||CA;let t=[],r=/\{([a-z]+)\}|[^{]+/gi,l;for(;l=r.exec(n);)t.push(l[0][0]=="{"?AA[l[1]]:l[0]);return d=>{let u="";for(let b=0;b<t.length;b++)u+=typeof t[b]=="string"?t[b]:t[b](d,e);return u}}const EA=new Intl.DateTimeFormat().resolvedOptions().timeZone;function TA(n,e){let t;return e=="UTC"||e=="Etc/UTC"?t=new Date(+n+n.getTimezoneOffset()*6e4):e==EA?t=n:(t=new Date(n.toLocaleString("en-US",{timeZone:e})),t.setMilliseconds(n.getMilliseconds())),t}const Iv=n=>n%1==0,Ic=[1,2,2.5,5],MA=gl(10,-32,0,Ic),Nv=gl(10,0,32,Ic),RA=Nv.filter(Iv),Is=MA.concat(Nv),ed=`
1495
+ `,Dv="{YYYY}",Fv=ed+Dv,Pv="{M}/{D}",yl=ed+Pv,Nc=yl+"/{YY}",Bv="{aa}",LA="{h}:{mm}",ka=LA+Bv,jv=ed+ka,Wv=":{ss}",Qt=null;function zv(n){let e=n*1e3,t=e*60,r=t*60,l=r*24,d=l*30,u=l*365,b=(n==1?gl(10,0,3,Ic).filter(Iv):gl(10,-3,0,Ic)).concat([e,e*5,e*10,e*15,e*30,t,t*5,t*10,t*15,t*30,r,r*2,r*3,r*4,r*6,r*8,r*12,l,l*2,l*3,l*4,l*5,l*6,l*7,l*8,l*9,l*10,l*15,d,d*2,d*3,d*4,d*6,u,u*2,u*5,u*10,u*25,u*50,u*100]);const p=[[u,Dv,Qt,Qt,Qt,Qt,Qt,Qt,1],[l*28,"{MMM}",Fv,Qt,Qt,Qt,Qt,Qt,1],[l,Pv,Fv,Qt,Qt,Qt,Qt,Qt,1],[r,"{h}"+Bv,Nc,Qt,yl,Qt,Qt,Qt,1],[t,ka,Nc,Qt,yl,Qt,Qt,Qt,1],[e,Wv,Nc+" "+ka,Qt,yl+" "+ka,Qt,jv,Qt,1],[n,Wv+".{fff}",Nc+" "+ka,Qt,yl+" "+ka,Qt,jv,Qt,1]];function g(o){return(c,f,h,i,a,m)=>{let w=[],x=a>=u,T=a>=d&&a<u,$=o(h),S=cn($*n,3),k=td($.getFullYear(),x?0:$.getMonth(),T||x?1:$.getDate()),L=cn(k*n,3);if(T||x){let N=T?a/d:0,R=x?a/u:0,O=S==L?S:cn(td(k.getFullYear()+R,k.getMonth()+N,1)*n,3),W=new Date(rr(O/n)),P=W.getFullYear(),D=W.getMonth();for(let A=0;O<=i;A++){let _=td(P+R*A,D+N*A,1),I=_-o(cn(_*n,3));O=cn((+_+I)*n,3),O<=i&&w.push(O)}}else{let N=a>=l?l:a,R=ui(h)-ui(S),O=L+R+Lc(S-L,N);w.push(O);let W=o(O),P=W.getHours()+W.getMinutes()/t+W.getSeconds()/r,D=a/r,A=c.axes[f]._space,_=m/A;for(;O=cn(O+a,n==1?0:3),!(O>i);)if(D>1){let I=ui(cn(P+D,6))%24,j=o(O).getHours()-I;j>1&&(j=-1),O-=j*r,P=(P+D)%24;let U=w[w.length-1];cn((O-U)/a,3)*_>=.7&&w.push(O)}else w.push(O)}return w}}return[b,p,g]}const[OA,IA,NA]=zv(1),[DA,FA,PA]=zv(.001);gl(2,-53,53,[1]);function Hv(n,e){return n.map(t=>t.map((r,l)=>l==0||l==8||r==null?r:e(l==1||t[8]==0?r:t[1]+r)))}function Uv(n,e){return(t,r,l,d,u)=>{let b=e.find(i=>u>=i[0])||e[e.length-1],p,g,o,c,f,h;return r.map(i=>{let a=n(i),m=a.getFullYear(),w=a.getMonth(),x=a.getDate(),T=a.getHours(),$=a.getMinutes(),S=a.getSeconds(),k=m!=p&&b[2]||w!=g&&b[3]||x!=o&&b[4]||T!=c&&b[5]||$!=f&&b[6]||S!=h&&b[7]||b[1];return p=m,g=w,o=x,c=T,f=$,h=S,k(a)})}}function BA(n,e){let t=Jh(e);return(r,l,d,u,b)=>l.map(p=>t(n(p)))}function td(n,e,t){return new Date(n,e,t)}function qv(n,e){return e(n)}const jA="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Vv(n,e){return(t,r,l,d)=>d==null?Wh:e(n(r))}function WA(n,e){let t=n.series[e];return t.width?t.stroke(n,e):t.points.width?t.points.stroke(n,e):null}function zA(n,e){return n.series[e].fill(n,e)}const HA={show:!0,live:!0,isolate:!1,mount:lA,markers:{show:!0,width:2,stroke:WA,fill:zA,dash:"solid"},idx:null,idxs:null,values:[]};function UA(n,e){let t=n.cursor.points,r=Ci(),l=t.size(n,e);pn(r,hl,l),pn(r,dl,l);let d=l/-2;pn(r,"marginLeft",d),pn(r,"marginTop",d);let u=t.width(n,e,l);return u&&pn(r,"borderWidth",u),r}function qA(n,e){let t=n.series[e].points;return t._fill||t._stroke}function VA(n,e){let t=n.series[e].points;return t._stroke||t._fill}function KA(n,e){return n.series[e].points.size}const nd=[0,0];function GA(n,e,t){return nd[0]=e,nd[1]=t,nd}function Dc(n,e,t,r=!0){return l=>{l.button==0&&(!r||l.target==e)&&t(l)}}function rd(n,e,t,r=!0){return l=>{(!r||l.target==e)&&t(l)}}const YA={show:!0,x:!0,y:!0,lock:!1,move:GA,points:{one:!1,show:UA,size:KA,width:0,stroke:VA,fill:qA},bind:{mousedown:Dc,mouseup:Dc,click:Dc,dblclick:Dc,mousemove:rd,mouseleave:rd,mouseenter:rd},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,e)=>{e.stopPropagation(),e.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,e,t,r,l)=>r-l,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Kv={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},id=Gn({},Kv,{filter:Sv}),Gv=Gn({},id,{size:10}),Yv=Gn({},Kv,{show:!1}),od='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"',Xv="bold "+od,Qv=1.5,Zv={show:!0,scale:"x",stroke:Ph,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xv,side:2,grid:id,ticks:Gv,border:Yv,font:od,lineGap:Qv,rotate:0},XA="Value",QA="Time",Jv={show:!0,scale:"x",auto:!1,sorted:1,min:ln,max:-ln,idxs:[]};function ZA(n,e,t,r,l){return e.map(d=>d==null?"":Yh(d))}function JA(n,e,t,r,l,d,u){let b=[],p=Jo.get(l)||0;t=u?t:cn(Lc(t,l),p);for(let g=t;g<=r;g=cn(g+l,p))b.push(Object.is(g,-0)?0:g);return b}function sd(n,e,t,r,l,d,u){const b=[],p=n.scales[n.axes[e].scale].log,g=p==10?_o:bv,o=ui(g(t));l=ba(p,o),p==10&&(l=Is[Ui(l,Is)]);let c=t,f=l*p;p==10&&(f=Is[Ui(f,Is)]);do b.push(c),c=c+l,p==10&&!Jo.has(c)&&(c=cn(c,Jo.get(l))),c>=f&&(l=c,f=l*p,p==10&&(f=Is[Ui(f,Is)]));while(c<=r);return b}function eE(n,e,t,r,l,d,u){let b=n.scales[n.axes[e].scale].asinh,p=r>b?sd(n,e,Dr(b,t),r,l):[b],g=r>=0&&t<=0?[0]:[];return(t<-b?sd(n,e,Dr(b,-r),-t,l):[b]).reverse().map(o=>-o).concat(g,p)}const ey=/./,tE=/[12357]/,nE=/[125]/,ty=/1/,ad=(n,e,t,r)=>n.map((l,d)=>e==4&&l==0||d%r==0&&t.test(l.toExponential()[l<0?1:0])?l:null);function rE(n,e,t,r,l){let d=n.axes[t],u=d.scale,b=n.scales[u],p=n.valToPos,g=d._space,o=p(10,u),c=p(9,u)-o>=g?ey:p(7,u)-o>=g?tE:p(5,u)-o>=g?nE:ty;if(c==ty){let f=nr(p(1,u)-o);if(f<g)return ad(e.slice().reverse(),b.distr,c,$i(g/f)).reverse()}return ad(e,b.distr,c,1)}function iE(n,e,t,r,l){let d=n.axes[t],u=d.scale,b=d._space,p=n.valToPos,g=nr(p(1,u)-p(2,u));return g<b?ad(e.slice().reverse(),3,ey,$i(b/g)).reverse():e}function oE(n,e,t,r){return r==null?Wh:e==null?"":Yh(e)}const ny={show:!0,scale:"y",stroke:Ph,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Xv,side:3,grid:id,ticks:Gv,border:Yv,font:od,lineGap:Qv,rotate:0};function sE(n,e){let t=3+(n||1)*2;return cn(t*e,3)}function aE(n,e){let{scale:t,idxs:r}=n.series[0],l=n._data[0],d=n.valToPos(l[r[0]],t,!0),u=n.valToPos(l[r[1]],t,!0),b=nr(u-d),p=n.series[e],g=b/(p.points.space*Kt);return r[1]-r[0]<=g}const ry={scale:null,auto:!0,sorted:0,min:ln,max:-ln},iy=(n,e,t,r,l)=>l,oy={show:!0,auto:!0,sorted:0,gaps:iy,alpha:1,facets:[Gn({},ry,{scale:"x"}),Gn({},ry,{scale:"y"})]},sy={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:iy,alpha:1,points:{show:aE,filter:null},values:null,min:ln,max:-ln,idxs:[],path:null,clip:null};function lE(n,e,t,r,l){return t/10}const ay={time:O$,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},cE=Gn({},ay,{time:!1,ori:1}),ly={};function cy(n,e){let t=ly[n];return t||(t={key:n,plots:[],sub(r){t.plots.push(r)},unsub(r){t.plots=t.plots.filter(l=>l!=r)},pub(r,l,d,u,b,p,g){for(let o=0;o<t.plots.length;o++)t.plots[o]!=l&&t.plots[o].pub(r,l,d,u,b,p,g)}},n!=null&&(ly[n]=t)),t}const Sa=1,ld=2;function Ns(n,e,t){const r=n.mode,l=n.series[e],d=r==2?n._data[e]:n._data,u=n.scales,b=n.bbox;let p=d[0],g=r==2?d[1]:d[e],o=r==2?u[l.facets[0].scale]:u[n.series[0].scale],c=r==2?u[l.facets[1].scale]:u[l.scale],f=b.left,h=b.top,i=b.width,a=b.height,m=n.valToPosH,w=n.valToPosV;return o.ori==0?t(l,p,g,o,c,m,w,f,h,i,a,Pc,_a,jc,dy,py):t(l,p,g,o,c,w,m,h,f,a,i,Bc,Ca,hd,fy,gy)}function cd(n,e){let t=0,r=0,l=Ut(n.bands,Zh);for(let d=0;d<l.length;d++){let u=l[d];u.series[0]==e?t=u.dir:u.series[1]==e&&(u.dir==1?r|=1:r|=2)}return[t,r==1?-1:r==2?1:r==3?2:0]}function uE(n,e,t,r,l){let d=n.mode,u=n.series[e],b=d==2?u.facets[1].scale:u.scale,p=n.scales[b];return l==-1?p.min:l==1?p.max:p.distr==3?p.dir==1?p.min:p.max:0}function Co(n,e,t,r,l,d){return Ns(n,e,(u,b,p,g,o,c,f,h,i,a,m)=>{let w=u.pxRound;const x=g.dir*(g.ori==0?1:-1),T=g.ori==0?_a:Ca;let $,S;x==1?($=t,S=r):($=r,S=t);let k=w(c(b[$],g,a,h)),L=w(f(p[$],o,m,i)),N=w(c(b[S],g,a,h)),R=w(f(d==1?o.max:o.min,o,m,i)),O=new Path2D(l);return T(O,N,R),T(O,k,R),T(O,k,L),O})}function Fc(n,e,t,r,l,d){let u=null;if(n.length>0){u=new Path2D;const b=e==0?jc:hd;let p=t;for(let c=0;c<n.length;c++){let f=n[c];if(f[1]>f[0]){let h=f[0]-p;h>0&&b(u,p,r,h,r+d),p=f[1]}}let g=t+l-p,o=10;g>0&&b(u,p,r-o/2,g,r+d+o)}return u}function hE(n,e,t){let r=n[n.length-1];r&&r[0]==e?r[1]=t:n.push([e,t])}function ud(n,e,t,r,l,d,u){let b=[],p=n.length;for(let g=l==1?t:r;g>=t&&g<=r;g+=l)if(e[g]===null){let o=g,c=g;if(l==1)for(;++g<=r&&e[g]===null;)c=g;else for(;--g>=t&&e[g]===null;)c=g;let f=d(n[o]),h=c==o?f:d(n[c]),i=o-l;f=u<=0&&i>=0&&i<p?d(n[i]):f;let a=c+l;h=u>=0&&a>=0&&a<p?d(n[a]):h,h>=f&&b.push([f,h])}return b}function uy(n){return n==0?kv:n==1?rr:e=>Os(e,n)}function hy(n){let e=n==0?Pc:Bc,t=n==0?(l,d,u,b,p,g)=>{l.arcTo(d,u,b,p,g)}:(l,d,u,b,p,g)=>{l.arcTo(u,d,p,b,g)},r=n==0?(l,d,u,b,p)=>{l.rect(d,u,b,p)}:(l,d,u,b,p)=>{l.rect(u,d,p,b)};return(l,d,u,b,p,g=0,o=0)=>{g==0&&o==0?r(l,d,u,b,p):(g=qi(g,b/2,p/2),o=qi(o,b/2,p/2),e(l,d+g,u),t(l,d+b,u,d+b,u+p,g),t(l,d+b,u+p,d,u+p,o),t(l,d,u+p,d,u,o),t(l,d,u,d+b,u,g),l.closePath())}}const Pc=(n,e,t)=>{n.moveTo(e,t)},Bc=(n,e,t)=>{n.moveTo(t,e)},_a=(n,e,t)=>{n.lineTo(e,t)},Ca=(n,e,t)=>{n.lineTo(t,e)},jc=hy(0),hd=hy(1),dy=(n,e,t,r,l,d)=>{n.arc(e,t,r,l,d)},fy=(n,e,t,r,l,d)=>{n.arc(t,e,r,l,d)},py=(n,e,t,r,l,d,u)=>{n.bezierCurveTo(e,t,r,l,d,u)},gy=(n,e,t,r,l,d,u)=>{n.bezierCurveTo(t,e,l,r,u,d)};function my(n){return(e,t,r,l,d)=>Ns(e,t,(u,b,p,g,o,c,f,h,i,a,m)=>{let{pxRound:w,points:x}=u,T,$;g.ori==0?(T=Pc,$=dy):(T=Bc,$=fy);const S=cn(x.width*Kt,3);let k=(x.size-x.width)/2*Kt,L=cn(k*2,3),N=new Path2D,R=new Path2D,{left:O,top:W,width:P,height:D}=e.bbox;jc(R,O-L,W-L,P+L*2,D+L*2);const A=_=>{if(p[_]!=null){let I=w(c(b[_],g,a,h)),j=w(f(p[_],o,m,i));T(N,I+k,j),$(N,I,j,k,0,Rc*2)}};if(d)d.forEach(A);else for(let _=r;_<=l;_++)A(_);return{stroke:S>0?N:null,fill:N,clip:R,flags:Sa|ld}})}function vy(n){return(e,t,r,l,d,u)=>{r!=l&&(d!=r&&u!=r&&n(e,t,r),d!=l&&u!=l&&n(e,t,l),n(e,t,u))}}const dE=vy(_a),fE=vy(Ca);function yy(n){const e=Ut(n==null?void 0:n.alignGaps,0);return(t,r,l,d)=>Ns(t,r,(u,b,p,g,o,c,f,h,i,a,m)=>{[l,d]=Ec(p,l,d);let w=u.pxRound,x=P=>w(c(P,g,a,h)),T=P=>w(f(P,o,m,i)),$,S;g.ori==0?($=_a,S=dE):($=Ca,S=fE);const k=g.dir*(g.ori==0?1:-1),L={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Sa},N=L.stroke;let R=!1;if(d-l>=a*4){let P=ae=>t.posToVal(ae,g.key,!0),D=null,A=null,_,I,j,U=x(b[k==1?l:d]),K=x(b[l]),Z=x(b[d]),J=P(k==1?K+1:Z-1);for(let ae=k==1?l:d;ae>=l&&ae<=d;ae+=k){let ne=b[ae],se=(k==1?ne<J:ne>J)?U:x(ne),ce=p[ae];se==U?ce!=null?(I=ce,D==null?($(N,se,T(I)),_=D=A=I):I<D?D=I:I>A&&(A=I)):ce===null&&(R=!0):(D!=null&&S(N,U,T(D),T(A),T(_),T(I)),ce!=null?(I=ce,$(N,se,T(I)),D=A=_=I):(D=A=null,ce===null&&(R=!0)),U=se,J=P(U+k))}D!=null&&D!=A&&j!=U&&S(N,U,T(D),T(A),T(_),T(I))}else for(let P=k==1?l:d;P>=l&&P<=d;P+=k){let D=p[P];D===null?R=!0:D!=null&&$(N,x(b[P]),T(D))}let[O,W]=cd(t,r);if(u.fill!=null||O!=0){let P=L.fill=new Path2D(N),D=u.fillTo(t,r,u.min,u.max,O),A=T(D),_=x(b[l]),I=x(b[d]);k==-1&&([I,_]=[_,I]),$(P,I,A),$(P,_,A)}if(!u.spanGaps){let P=[];R&&P.push(...ud(b,p,l,d,k,x,e)),L.gaps=P=u.gaps(t,r,l,d,P),L.clip=Fc(P,g.ori,h,i,a,m)}return W!=0&&(L.band=W==2?[Co(t,r,l,d,N,-1),Co(t,r,l,d,N,1)]:Co(t,r,l,d,N,W)),L})}function pE(n){const e=Ut(n.align,1),t=Ut(n.ascDesc,!1),r=Ut(n.alignGaps,0),l=Ut(n.extend,!1);return(d,u,b,p)=>Ns(d,u,(g,o,c,f,h,i,a,m,w,x,T)=>{[b,p]=Ec(c,b,p);let $=g.pxRound,{left:S,width:k}=d.bbox,L=Z=>$(i(Z,f,x,m)),N=Z=>$(a(Z,h,T,w)),R=f.ori==0?_a:Ca;const O={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Sa},W=O.stroke,P=f.dir*(f.ori==0?1:-1);let D=N(c[P==1?b:p]),A=L(o[P==1?b:p]),_=A,I=A;l&&e==-1&&(I=S,R(W,I,D)),R(W,A,D);for(let Z=P==1?b:p;Z>=b&&Z<=p;Z+=P){let J=c[Z];if(J==null)continue;let ae=L(o[Z]),ne=N(J);e==1?R(W,ae,D):R(W,_,ne),R(W,ae,ne),D=ne,_=ae}let j=_;l&&e==1&&(j=S+k,R(W,j,D));let[U,K]=cd(d,u);if(g.fill!=null||U!=0){let Z=O.fill=new Path2D(W),J=g.fillTo(d,u,g.min,g.max,U),ae=N(J);R(Z,j,ae),R(Z,I,ae)}if(!g.spanGaps){let Z=[];Z.push(...ud(o,c,b,p,P,L,r));let J=g.width*Kt/2,ae=t||e==1?J:-J,ne=t||e==-1?-J:J;Z.forEach(se=>{se[0]+=ae,se[1]+=ne}),O.gaps=Z=g.gaps(d,u,b,p,Z),O.clip=Fc(Z,f.ori,m,w,x,T)}return K!=0&&(O.band=K==2?[Co(d,u,b,p,W,-1),Co(d,u,b,p,W,1)]:Co(d,u,b,p,W,K)),O})}function by(n,e,t,r,l,d,u=ln){if(n.length>1){let b=null;for(let p=0,g=1/0;p<n.length;p++)if(e[p]!==void 0){if(b!=null){let o=nr(n[p]-n[b]);o<g&&(g=o,u=nr(t(n[p],r,l,d)-t(n[b],r,l,d)))}b=p}}return u}function gE(n){n=n||ml;const e=Ut(n.size,[.6,ln,1]),t=n.align||0,r=n.gap||0;let l=n.radius;l=l==null?[0,0]:typeof l=="number"?[l,0]:l;const d=Ft(l),u=1-e[0],b=Ut(e[1],ln),p=Ut(e[2],1),g=Ut(n.disp,ml),o=Ut(n.each,h=>{}),{fill:c,stroke:f}=g;return(h,i,a,m)=>Ns(h,i,(w,x,T,$,S,k,L,N,R,O,W)=>{let P=w.pxRound,D=t,A=r*Kt,_=b*Kt,I=p*Kt,j,U;$.ori==0?[j,U]=d(h,i):[U,j]=d(h,i);const K=$.dir*($.ori==0?1:-1);let Z=$.ori==0?jc:hd,J=$.ori==0?o:(qe,qt,gn,Qn,Br,Ar,Cn)=>{o(qe,qt,gn,Br,Qn,Cn,Ar)},ae=Ut(h.bands,Zh).find(qe=>qe.series[0]==i),ne=ae!=null?ae.dir:0,se=w.fillTo(h,i,w.min,w.max,ne),ce=P(L(se,S,W,R)),he,ge,Ee,Te=O,Re=P(w.width*Kt),Xe=!1,Ke=null,dt=null,ot=null,gt=null;c!=null&&(Re==0||f!=null)&&(Xe=!0,Ke=c.values(h,i,a,m),dt=new Map,new Set(Ke).forEach(qe=>{qe!=null&&dt.set(qe,new Path2D)}),Re>0&&(ot=f.values(h,i,a,m),gt=new Map,new Set(ot).forEach(qe=>{qe!=null&&gt.set(qe,new Path2D)})));let{x0:tn,size:Wn}=g;if(tn!=null&&Wn!=null){D=1,x=tn.values(h,i,a,m),tn.unit==2&&(x=x.map(qt=>h.posToVal(N+qt*O,$.key,!0)));let qe=Wn.values(h,i,a,m);Wn.unit==2?ge=qe[0]*O:ge=k(qe[0],$,O,N)-k(0,$,O,N),Te=by(x,T,k,$,O,N,Te),Ee=Te-ge+A}else Te=by(x,T,k,$,O,N,Te),Ee=Te*u+A,ge=Te-Ee;Ee<1&&(Ee=0),Re>=ge/2&&(Re=0),Ee<5&&(P=kv);let Zt=Ee>0,hi=Te-Ee-(Zt?Re:0);ge=P(Qh(hi,I,_)),he=(D==0?ge/2:D==K?0:ge)-D*K*((D==0?A/2:0)+(Zt?Re/2:0));const _n={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Xn=Xe?null:new Path2D;let ur=null;if(ae!=null)ur=h.data[ae.series[1]];else{let{y0:qe,y1:qt}=g;qe!=null&&qt!=null&&(T=qt.values(h,i,a,m),ur=qe.values(h,i,a,m))}let Pr=j*ge,yt=U*ge;for(let qe=K==1?a:m;qe>=a&&qe<=m;qe+=K){let qt=T[qe];if(qt==null)continue;if(ur!=null){let nn=ur[qe]??0;if(qt-nn==0)continue;ce=L(nn,S,W,R)}let gn=$.distr!=2||g!=null?x[qe]:qe,Qn=k(gn,$,O,N),Br=L(Ut(qt,se),S,W,R),Ar=P(Qn-he),Cn=P(Dr(Br,ce)),ir=P(qi(Br,ce)),hr=Cn-ir;if(qt!=null){let nn=qt<0?yt:Pr,or=qt<0?Pr:yt;Xe?(Re>0&&ot[qe]!=null&&Z(gt.get(ot[qe]),Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),Ke[qe]!=null&&Z(dt.get(Ke[qe]),Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or)):Z(Xn,Ar,ir+ui(Re/2),ge,Dr(0,hr-Re),nn,or),J(h,i,qe,Ar-Re/2,ir,ge+Re,hr)}}return Re>0?_n.stroke=Xe?gt:Xn:Xe||(_n._fill=w.width==0?w._fill:w._stroke??w._fill,_n.width=0),_n.fill=Xe?dt:Xn,_n})}function mE(n,e){const t=Ut(e==null?void 0:e.alignGaps,0);return(r,l,d,u)=>Ns(r,l,(b,p,g,o,c,f,h,i,a,m,w)=>{[d,u]=Ec(g,d,u);let x=b.pxRound,T=j=>x(f(j,o,m,i)),$=j=>x(h(j,c,w,a)),S,k,L;o.ori==0?(S=Pc,L=_a,k=py):(S=Bc,L=Ca,k=gy);const N=o.dir*(o.ori==0?1:-1);let R=T(p[N==1?d:u]),O=R,W=[],P=[];for(let j=N==1?d:u;j>=d&&j<=u;j+=N)if(g[j]!=null){let U=p[j],K=T(U);W.push(O=K),P.push($(g[j]))}const D={stroke:n(W,P,S,L,k,x),fill:null,clip:null,band:null,gaps:null,flags:Sa},A=D.stroke;let[_,I]=cd(r,l);if(b.fill!=null||_!=0){let j=D.fill=new Path2D(A),U=b.fillTo(r,l,b.min,b.max,_),K=$(U);L(j,O,K),L(j,R,K)}if(!b.spanGaps){let j=[];j.push(...ud(p,g,d,u,N,T,t)),D.gaps=j=b.gaps(r,l,d,u,j),D.clip=Fc(j,o.ori,i,a,m,w)}return I!=0&&(D.band=I==2?[Co(r,l,d,u,A,-1),Co(r,l,d,u,A,1)]:Co(r,l,d,u,A,I)),D})}function vE(n){return mE(yE,n)}function yE(n,e,t,r,l,d){const u=n.length;if(u<2)return null;const b=new Path2D;if(t(b,n[0],e[0]),u==2)r(b,n[1],e[1]);else{let p=Array(u),g=Array(u-1),o=Array(u-1),c=Array(u-1);for(let f=0;f<u-1;f++)o[f]=e[f+1]-e[f],c[f]=n[f+1]-n[f],g[f]=o[f]/c[f];p[0]=g[0];for(let f=1;f<u-1;f++)g[f]===0||g[f-1]===0||g[f-1]>0!=g[f]>0?p[f]=0:(p[f]=3*(c[f-1]+c[f])/((2*c[f]+c[f-1])/g[f-1]+(c[f]+2*c[f-1])/g[f]),isFinite(p[f])||(p[f]=0));p[u-1]=g[u-2];for(let f=0;f<u-1;f++)l(b,n[f]+c[f]/3,e[f]+p[f]*c[f]/3,n[f+1]-c[f]/3,e[f+1]-p[f+1]*c[f]/3,n[f+1],e[f+1])}return b}const dd=new Set;function wy(){for(let n of dd)n.syncRect(!0)}va&&(Rs(Z$,ya,wy),Rs(J$,ya,wy,!0),Rs($c,ya,()=>{_r.pxRatio=Kt}));const bE=yy(),wE=my();function xy(n,e,t,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((l,d)=>fd(l,d,e,t))}function xE(n,e){return n.map((t,r)=>r==0?{}:Gn({},e,t))}function fd(n,e,t,r){return Gn({},e==0?t:r,n)}function ky(n,e,t){return e==null?wa:[e,t]}const kE=ky;function SE(n,e,t){return e==null?wa:Mc(e,t,Gh,!0)}function Sy(n,e,t,r){return e==null?wa:Tc(e,t,n.scales[r].log,!1)}const _E=Sy;function _y(n,e,t,r){return e==null?wa:Kh(e,t,n.scales[r].log,!1)}const CE=_y;function $E(n,e,t,r,l){let d=Dr(wv(n),wv(e)),u=e-n,b=Ui(l/r*u,t);do{let p=t[b],g=r*p/u;if(g>=l&&d+(p<5?Jo.get(p):0)<=17)return[p,g]}while(++b<t.length);return[0,0]}function Cy(n){let e,t;return n=n.replace(/(\d+)px/,(r,l)=>(e=rr((t=+l)*Kt))+"px"),[n,e,t]}function AE(n){n.show&&[n.font,n.labelFont].forEach(e=>{let t=cn(e[2]*Kt,1);e[0]=e[0].replace(/[0-9.]+px/,t+"px"),e[1]=t})}function _r(n,e,t){const r={mode:Ut(n.mode,1)},l=r.mode;function d(q,X,ie,oe){let pe=X.valToPct(q);return oe+ie*(X.dir==-1?1-pe:pe)}function u(q,X,ie,oe){let pe=X.valToPct(q);return oe+ie*(X.dir==-1?pe:1-pe)}function b(q,X,ie,oe){return X.ori==0?d(q,X,ie,oe):u(q,X,ie,oe)}r.valToPosH=d,r.valToPosV=u;let p=!1;r.status=0;const g=r.root=Ci(I$);if(n.id!=null&&(g.id=n.id),li(g,n.class),n.title){let q=Ci(F$,g);q.textContent=n.title}const o=Hi("canvas"),c=r.ctx=o.getContext("2d"),f=Ci(P$,g);Rs("click",f,q=>{q.target===i&&(Xt!=Mi||Bt!=bo)&&Rn.click(r,q)},!0);const h=r.under=Ci(B$,f);f.appendChild(o);const i=r.over=Ci(j$,f);n=xa(n);const a=+Ut(n.pxAlign,1),m=uy(a);(n.plugins||[]).forEach(q=>{q.opts&&(n=q.opts(r,n)||n)});const w=n.ms||.001,x=r.series=l==1?xy(n.series||[],Jv,sy,!1):xE(n.series||[null],oy),T=r.axes=xy(n.axes||[],Zv,ny,!0),$=r.scales={},S=r.bands=n.bands||[];S.forEach(q=>{q.fill=Ft(q.fill||null),q.dir=Ut(q.dir,-1)});const k=l==2?x[1].facets[0].scale:x[0].scale,L={axes:Lo,series:Da},N=(n.drawOrder||["axes","series"]).map(q=>L[q]);function R(q){const X=q.distr==3?ie=>_o(ie>0?ie:q.clamp(r,ie,q.min,q.max,q.key)):q.distr==4?ie=>Xh(ie,q.asinh):q.distr==100?ie=>q.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:pe,_max:we}=q,Me=we-pe;return(oe-pe)/Me}}function O(q){let X=$[q];if(X==null){let ie=(n.scales||ml)[q]||ml;if(ie.from!=null){O(ie.from);let oe=Gn({},$[ie.from],ie,{key:q});oe.valToPct=R(oe),$[q]=oe}else{X=$[q]=Gn({},q==k?ay:cE,ie),X.key=q;let oe=X.time,pe=X.range,we=es(pe);if((q!=k||l==2&&!oe)&&(we&&(pe[0]==null||pe[1]==null)&&(pe={min:pe[0]==null?mv:{mode:1,hard:pe[0],soft:pe[0]},max:pe[1]==null?mv:{mode:1,hard:pe[1],soft:pe[1]}},we=!1),!we&&Oc(pe))){let Me=pe;pe=(Pe,je,Ue)=>je==null?wa:Mc(je,Ue,Me)}X.range=Ft(pe||(oe?kE:q==k?X.distr==3?_E:X.distr==4?CE:ky:X.distr==3?Sy:X.distr==4?_y:SE)),X.auto=Ft(we?!1:X.auto),X.clamp=Ft(X.clamp||lE),X._min=X._max=null,X.valToPct=R(X)}}}O("x"),O("y"),l==1&&x.forEach(q=>{O(q.scale)}),T.forEach(q=>{O(q.scale)});for(let q in n.scales)O(q);const W=$[k],P=W.distr;let D,A;W.ori==0?(li(g,N$),D=d,A=u):(li(g,D$),D=u,A=d);const _={};for(let q in $){let X=$[q];(X.min!=null||X.max!=null)&&(_[q]={min:X.min,max:X.max},X.min=X.max=null)}const I=n.tzDate||(q=>new Date(rr(q/w))),j=n.fmtDate||Jh,U=w==1?NA(I):PA(I),K=Uv(I,Hv(w==1?IA:FA,j)),Z=Vv(I,qv(jA,j)),J=[],ae=r.legend=Gn({},HA,n.legend),ne=r.cursor=Gn({},YA,{drag:{y:l==2}},n.cursor),se=ae.show,ce=ne.show,he=ae.markers;ae.idxs=J,he.width=Ft(he.width),he.dash=Ft(he.dash),he.stroke=Ft(he.stroke),he.fill=Ft(he.fill);let ge,Ee,Te,Re=[],Xe=[],Ke,dt=!1,ot={};if(ae.live){const q=x[1]?x[1].values:null;dt=q!=null,Ke=dt?q(r,1,0):{_:0};for(let X in Ke)ot[X]=Wh}if(se)if(ge=Hi("table",V$,g),Te=Hi("tbody",null,ge),ae.mount(r,ge),dt){Ee=Hi("thead",null,ge,Te);let q=Hi("tr",null,Ee);Hi("th",null,q);for(var gt in Ke)Hi("th",ev,q).textContent=gt}else li(ge,G$),ae.live&&li(ge,K$);const tn={show:!0},Wn={show:!1};function Zt(q,X){if(X==0&&(dt||!ae.live||l==2))return wa;let ie=[],oe=Hi("tr",Y$,Te,Te.childNodes[X]);li(oe,q.class),q.show||li(oe,Ms);let pe=Hi("th",null,oe);if(he.show){let Pe=Ci(X$,pe);if(X>0){let je=he.width(r,X);je&&(Pe.style.border=je+"px "+he.dash(r,X)+" "+he.stroke(r,X)),Pe.style.background=he.fill(r,X)}}let we=Ci(ev,pe);q.label instanceof HTMLElement?we.appendChild(q.label):we.textContent=q.label,X>0&&(he.show||(we.style.color=q.width>0?he.stroke(r,X):he.fill(r,X)),_n("click",pe,Pe=>{if(ne._lock)return;Qi(Pe);let je=x.indexOf(q);if((Pe.ctrlKey||Pe.metaKey)!=ae.isolate){let Ue=x.some((Ge,Qe)=>Qe>0&&Qe!=je&&Ge.show);x.forEach((Ge,Qe)=>{Qe>0&&Wr(Qe,Ue?Qe==je?tn:Wn:tn,!0,lt.setSeries)})}else Wr(je,{show:!q.show},!0,lt.setSeries)},!1),Zi&&_n(iv,pe,Pe=>{ne._lock||(Qi(Pe),Wr(x.indexOf(q),Oi,!0,lt.setSeries))},!1));for(var Me in Ke){let Pe=Hi("td",Q$,oe);Pe.textContent="--",ie.push(Pe)}return[oe,ie]}const hi=new Map;function _n(q,X,ie,oe=!0){const pe=hi.get(X)||{},we=ne.bind[q](r,X,ie,oe);we&&(Rs(q,X,pe[q]=we),hi.set(X,pe))}function Xn(q,X,ie){const oe=hi.get(X)||{};for(let pe in oe)(q==null||pe==q)&&(Vh(pe,X,oe[pe]),delete oe[pe]);q==null&&hi.delete(X)}let ur=0,Pr=0,yt=0,qe=0,qt=0,gn=0,Qn=qt,Br=gn,Ar=yt,Cn=qe,ir=0,hr=0,nn=0,or=0;r.bbox={};let $o=!1,Gi=!1,Yi=!1,Xi=!1,Ao=!1,vr=!1;function Eo(q,X,ie){(ie||q!=r.width||X!=r.height)&&ts(q,X),no(!1),Yi=!0,Gi=!0,yo()}function ts(q,X){r.width=ur=yt=q,r.height=Pr=qe=X,qt=gn=0,zs(),Oa();let ie=r.bbox;ir=ie.left=Os(qt*Kt,.5),hr=ie.top=Os(gn*Kt,.5),nn=ie.width=Os(yt*Kt,.5),or=ie.height=Os(qe*Kt,.5)}const Ml=3;function di(){let q=!1,X=0;for(;!q;){X++;let ie=Fa(X),oe=Il(X);q=X==Ml||ie&&oe,q||(ts(r.width,r.height),Gi=!0)}}function Rl({width:q,height:X}){Eo(q,X)}r.setSize=Rl;function zs(){let q=!1,X=!1,ie=!1,oe=!1;T.forEach((pe,we)=>{if(pe.show&&pe._show){let{side:Me,_size:Pe}=pe,je=Me%2,Ue=pe.label!=null?pe.labelSize:0,Ge=Pe+Ue;Ge>0&&(je?(yt-=Ge,Me==3?(qt+=Ge,oe=!0):ie=!0):(qe-=Ge,Me==0?(gn+=Ge,q=!0):X=!0))}}),eo[0]=q,eo[1]=ie,eo[2]=X,eo[3]=oe,yt-=Mr[1]+Mr[3],qt+=Mr[3],qe-=Mr[2]+Mr[0],gn+=Mr[0]}function Oa(){let q=qt+yt,X=gn+qe,ie=qt,oe=gn;function pe(we,Me){switch(we){case 1:return q+=Me,q-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}T.forEach((we,Me)=>{if(we.show&&we._show){let Pe=we.side;we._pos=pe(Pe,we._size),we.label!=null&&(we._lpos=pe(Pe,we.labelSize))}})}if(ne.dataIdx==null){let q=ne.hover,X=q.skip=new Set(q.skip??[]);X.add(void 0);let ie=q.prox=Ft(q.prox),oe=q.bias??(q.bias=0);ne.dataIdx=(pe,we,Me,Pe)=>{if(we==0)return Me;let je=Me,Ue=ie(pe,we,Me,Pe)??ln,Ge=Ue>=0&&Ue<ln,Qe=W.ori==0?yt:qe,vt=ne.left,It=e[0],wt=e[we];if(X.has(wt[Me])){je=null;let Lt=null,ut=null,st;if(oe==0||oe==-1)for(st=Me;Lt==null&&st-- >0;)X.has(wt[st])||(Lt=st);if(oe==0||oe==1)for(st=Me;ut==null&&st++<wt.length;)X.has(wt[st])||(ut=st);if(Lt!=null||ut!=null)if(Ge){let un=Lt==null?-1/0:D(It[Lt],W,Qe,0),wn=ut==null?1/0:D(It[ut],W,Qe,0),er=vt-un,Wt=wn-vt;er<=Wt?er<=Ue&&(je=Lt):Wt<=Ue&&(je=ut)}else je=ut==null?Lt:Lt==null?ut:Me-Lt<=ut-Me?Lt:ut}else Ge&&nr(vt-D(It[Me],W,Qe,0))>Ue&&(je=null);return je}}const Qi=q=>{ne.event=q};ne.idxs=J,ne._lock=!1;let zn=ne.points;zn.show=Ft(zn.show),zn.size=Ft(zn.size),zn.stroke=Ft(zn.stroke),zn.width=Ft(zn.width),zn.fill=Ft(zn.fill);const Er=r.focus=Gn({},n.focus||{alpha:.3},ne.focus),Zi=Er.prox>=0,$n=Zi&&zn.one;let Tr=[],po=[],Ji=[];function Hs(q,X){let ie=zn.show(r,X);if(ie instanceof HTMLElement)return li(ie,q$),li(ie,q.class),lo(ie,-10,-10,yt,qe),i.insertBefore(ie,Tr[X]),ie}function Ia(q,X){if(l==1||X>0){let ie=l==1&&$[q.scale].time,oe=q.value;q.value=ie?Tv(oe)?Vv(I,qv(oe,j)):oe||Z:oe||oE,q.label=q.label||(ie?QA:XA)}if($n||X>0){q.width=q.width==null?1:q.width,q.paths=q.paths||bE||cA,q.fillTo=Ft(q.fillTo||uE),q.pxAlign=+Ut(q.pxAlign,a),q.pxRound=uy(q.pxAlign),q.stroke=Ft(q.stroke||null),q.fill=Ft(q.fill||null),q._stroke=q._fill=q._paths=q._focus=null;let ie=sE(Dr(1,q.width),1),oe=q.points=Gn({},{size:ie,width:Dr(1,ie*.2),stroke:q.stroke,space:ie*2,paths:wE,_stroke:null,_fill:null},q.points);oe.show=Ft(oe.show),oe.filter=Ft(oe.filter),oe.fill=Ft(oe.fill),oe.stroke=Ft(oe.stroke),oe.paths=Ft(oe.paths),oe.pxAlign=q.pxAlign}if(se){let ie=Zt(q,X);Re.splice(X,0,ie[0]),Xe.splice(X,0,ie[1]),ae.values.push(null)}if(ce){J.splice(X,0,null);let ie=null;$n?X==0&&(ie=Hs(q,X)):X>0&&(ie=Hs(q,X)),Tr.splice(X,0,ie),po.splice(X,0,0),Ji.splice(X,0,0)}tt("addSeries",X)}function Ll(q,X){X=X??x.length,q=l==1?fd(q,X,Jv,sy):fd(q,X,{},oy),x.splice(X,0,q),Ia(x[X],X)}r.addSeries=Ll;function Ol(q){if(x.splice(q,1),se){ae.values.splice(q,1),Xe.splice(q,1);let X=Re.splice(q,1)[0];Xn(null,X.firstChild),X.remove()}ce&&(J.splice(q,1),Tr.splice(q,1)[0].remove(),po.splice(q,1),Ji.splice(q,1)),tt("delSeries",q)}r.delSeries=Ol;const eo=[!1,!1,!1,!1];function fi(q,X){if(q._show=q.show,q.show){let ie=q.side%2,oe=$[q.scale];oe==null&&(q.scale=ie?x[1].scale:k,oe=$[q.scale]);let pe=oe.time;q.size=Ft(q.size),q.space=Ft(q.space),q.rotate=Ft(q.rotate),es(q.incrs)&&q.incrs.forEach(Me=>{!Jo.has(Me)&&Jo.set(Me,Av(Me))}),q.incrs=Ft(q.incrs||(oe.distr==2?RA:pe?w==1?OA:DA:Is)),q.splits=Ft(q.splits||(pe&&oe.distr==1?U:oe.distr==3?sd:oe.distr==4?eE:JA)),q.stroke=Ft(q.stroke),q.grid.stroke=Ft(q.grid.stroke),q.ticks.stroke=Ft(q.ticks.stroke),q.border.stroke=Ft(q.border.stroke);let we=q.values;q.values=es(we)&&!es(we[0])?Ft(we):pe?es(we)?Uv(I,Hv(we,j)):Tv(we)?BA(I,we):we||K:we||ZA,q.filter=Ft(q.filter||(oe.distr>=3&&oe.log==10?rE:oe.distr==3&&oe.log==2?iE:Sv)),q.font=Cy(q.font),q.labelFont=Cy(q.labelFont),q._size=q.size(r,null,X,0),q._space=q._rotate=q._incrs=q._found=q._splits=q._values=null,q._size>0&&(eo[X]=!0,q._el=Ci(W$,f))}}function Pt(q,X,ie,oe){let[pe,we,Me,Pe]=ie,je=X%2,Ue=0;return je==0&&(Pe||we)&&(Ue=X==0&&!pe||X==2&&!Me?rr(Zv.size/3):0),je==1&&(pe||Me)&&(Ue=X==1&&!we||X==3&&!Pe?rr(ny.size/2):0),Ue}const Na=r.padding=(n.padding||[Pt,Pt,Pt,Pt]).map(q=>Ft(Ut(q,Pt))),Mr=r._padding=Na.map((q,X)=>q(r,X,eo,0));let Hn,hn=null,Mn=null;const Ai=l==1?x[0].idxs:null;let Rr=null,Ei=!1;function ns(q,X){if(e=q??[],r.data=r._data=e,l==2){Hn=0;for(let ie=1;ie<x.length;ie++)Hn+=e[ie][0].length}else{e.length==0&&(r.data=r._data=e=[[]]),Rr=e[0],Hn=Rr.length;let ie=e;if(P==2){ie=e.slice();let oe=ie[0]=Array(Hn);for(let pe=0;pe<Hn;pe++)oe[pe]=pe}r._data=e=ie}if(no(!0),tt("setData"),P==2&&(Yi=!0),X!==!1){let ie=W;ie.auto(r,Ei)?Us():Zn(k,ie.min,ie.max),Xi=Xi||ne.left>=0,vr=!0,yo()}}r.setData=ns;function Us(){Ei=!0;let q,X;l==1&&(Hn>0?(hn=Ai[0]=0,Mn=Ai[1]=Hn-1,q=e[0][hn],X=e[0][Mn],P==2?(q=hn,X=Mn):q==X&&(P==3?[q,X]=Tc(q,q,W.log,!1):P==4?[q,X]=Kh(q,q,W.log,!1):W.time?X=q+rr(86400/w):[q,X]=Mc(q,X,Gh,!0))):(hn=Ai[0]=q=null,Mn=Ai[1]=X=null)),Zn(k,q,X)}let go,ti,To,rs,ni,is,qs,Vs,os,sr;function Ks(q,X,ie,oe,pe,we){q??(q=nv),ie??(ie=Zh),oe??(oe="butt"),pe??(pe=nv),we??(we="round"),q!=go&&(c.strokeStyle=go=q),pe!=ti&&(c.fillStyle=ti=pe),X!=To&&(c.lineWidth=To=X),we!=ni&&(c.lineJoin=ni=we),oe!=is&&(c.lineCap=is=oe),ie!=rs&&c.setLineDash(rs=ie)}function Mo(q,X,ie,oe){X!=ti&&(c.fillStyle=ti=X),q!=qs&&(c.font=qs=q),ie!=Vs&&(c.textAlign=Vs=ie),oe!=os&&(c.textBaseline=os=oe)}function ss(q,X,ie,oe,pe=0){if(oe.length>0&&q.auto(r,Ei)&&(X==null||X.min==null)){let we=Ut(hn,0),Me=Ut(Mn,oe.length-1),Pe=ie.min==null?rA(oe,we,Me,pe,q.distr==3):[ie.min,ie.max];q.min=qi(q.min,ie.min=Pe[0]),q.max=Dr(q.max,ie.max=Pe[1])}}const as={min:null,max:null};function mo(){for(let oe in $){let pe=$[oe];_[oe]==null&&(pe.min==null||_[k]!=null&&pe.auto(r,Ei))&&(_[oe]=as)}for(let oe in $){let pe=$[oe];_[oe]==null&&pe.from!=null&&_[pe.from]!=null&&(_[oe]=as)}_[k]!=null&&no(!0);let q={};for(let oe in _){let pe=_[oe];if(pe!=null){let we=q[oe]=xa($[oe],dA);if(pe.min!=null)Gn(we,pe);else if(oe!=k||l==2)if(Hn==0&&we.from==null){let Me=we.range(r,null,null,oe);we.min=Me[0],we.max=Me[1]}else we.min=ln,we.max=-ln}}if(Hn>0){x.forEach((oe,pe)=>{if(l==1){let we=oe.scale,Me=_[we];if(Me==null)return;let Pe=q[we];if(pe==0){let je=Pe.range(r,Pe.min,Pe.max,we);Pe.min=je[0],Pe.max=je[1],hn=Ui(Pe.min,e[0]),Mn=Ui(Pe.max,e[0]),Mn-hn>1&&(e[0][hn]<Pe.min&&hn++,e[0][Mn]>Pe.max&&Mn--),oe.min=Rr[hn],oe.max=Rr[Mn]}else oe.show&&oe.auto&&ss(Pe,Me,oe,e[pe],oe.sorted);oe.idxs[0]=hn,oe.idxs[1]=Mn}else if(pe>0&&oe.show&&oe.auto){let[we,Me]=oe.facets,Pe=we.scale,je=Me.scale,[Ue,Ge]=e[pe],Qe=q[Pe],vt=q[je];Qe!=null&&ss(Qe,_[Pe],we,Ue,we.sorted),vt!=null&&ss(vt,_[je],Me,Ge,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in q){let pe=q[oe],we=_[oe];if(pe.from==null&&(we==null||we.min==null)){let Me=pe.range(r,pe.min==ln?null:pe.min,pe.max==-ln?null:pe.max,oe);pe.min=Me[0],pe.max=Me[1]}}}for(let oe in q){let pe=q[oe];if(pe.from!=null){let we=q[pe.from];if(we.min==null)pe.min=pe.max=null;else{let Me=pe.range(r,we.min,we.max,oe);pe.min=Me[0],pe.max=Me[1]}}}let X={},ie=!1;for(let oe in q){let pe=q[oe],we=$[oe];if(we.min!=pe.min||we.max!=pe.max){we.min=pe.min,we.max=pe.max;let Me=we.distr;we._min=Me==3?_o(we.min):Me==4?Xh(we.min,we.asinh):Me==100?we.fwd(we.min):we.min,we._max=Me==3?_o(we.max):Me==4?Xh(we.max,we.asinh):Me==100?we.fwd(we.max):we.max,X[oe]=ie=!0}}if(ie){x.forEach((oe,pe)=>{l==2?pe>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)Yi=!0,tt("setScale",oe);ce&&ne.left>=0&&(Xi=vr=!0)}for(let oe in _)_[oe]=null}function Gs(q){let X=Qh(hn-1,0,Hn-1),ie=Qh(Mn+1,0,Hn-1);for(;q[X]==null&&X>0;)X--;for(;q[ie]==null&&ie<Hn-1;)ie++;return[X,ie]}function Da(){if(Hn>0){let q=x.some(X=>X._focus)&&sr!=Er.alpha;q&&(c.globalAlpha=sr=Er.alpha),x.forEach((X,ie)=>{if(ie>0&&X.show&&(ls(ie,!1),ls(ie,!0),X._paths==null)){let oe=sr;sr!=X.alpha&&(c.globalAlpha=sr=X.alpha);let pe=l==2?[0,e[ie][0].length-1]:Gs(e[ie]);X._paths=X.paths(r,ie,pe[0],pe[1]),sr!=oe&&(c.globalAlpha=sr=oe)}}),x.forEach((X,ie)=>{if(ie>0&&X.show){let oe=sr;sr!=X.alpha&&(c.globalAlpha=sr=X.alpha),X._paths!=null&&cs(ie,!1);{let pe=X._paths!=null?X._paths.gaps:null,we=X.points.show(r,ie,hn,Mn,pe),Me=X.points.filter(r,ie,we,pe);(we||Me)&&(X.points._paths=X.points.paths(r,ie,hn,Mn,Me),cs(ie,!0))}sr!=oe&&(c.globalAlpha=sr=oe),tt("drawSeries",ie)}}),q&&(c.globalAlpha=sr=1)}}function ls(q,X){let ie=X?x[q].points:x[q];ie._stroke=ie.stroke(r,q),ie._fill=ie.fill(r,q)}function cs(q,X){let ie=X?x[q].points:x[q],{stroke:oe,fill:pe,clip:we,flags:Me,_stroke:Pe=ie._stroke,_fill:je=ie._fill,_width:Ue=ie.width}=ie._paths;Ue=cn(Ue*Kt,3);let Ge=null,Qe=Ue%2/2;X&&je==null&&(je=Ue>0?"#fff":Pe);let vt=ie.pxAlign==1&&Qe>0;if(vt&&c.translate(Qe,Qe),!X){let It=ir-Ue/2,wt=hr-Ue/2,Lt=nn+Ue,ut=or+Ue;Ge=new Path2D,Ge.rect(It,wt,Lt,ut)}X?Ro(Pe,Ue,ie.dash,ie.cap,je,oe,pe,Me,we):Ys(q,Pe,Ue,ie.dash,ie.cap,je,oe,pe,Me,Ge,we),vt&&c.translate(-Qe,-Qe)}function Ys(q,X,ie,oe,pe,we,Me,Pe,je,Ue,Ge){let Qe=!1;je!=0&&S.forEach((vt,It)=>{if(vt.series[0]==q){let wt=x[vt.series[1]],Lt=e[vt.series[1]],ut=(wt._paths||ml).band;es(ut)&&(ut=vt.dir==1?ut[0]:ut[1]);let st,un=null;wt.show&&ut&&oA(Lt,hn,Mn)?(un=vt.fill(r,It)||we,st=wt._paths.clip):ut=null,Ro(X,ie,oe,pe,un,Me,Pe,je,Ue,Ge,st,ut),Qe=!0}}),Qe||Ro(X,ie,oe,pe,we,Me,Pe,je,Ue,Ge)}const us=Sa|ld;function Ro(q,X,ie,oe,pe,we,Me,Pe,je,Ue,Ge,Qe){Ks(q,X,ie,oe,pe),(je||Ue||Qe)&&(c.save(),je&&c.clip(je),Ue&&c.clip(Ue)),Qe?(Pe&us)==us?(c.clip(Qe),Ge&&c.clip(Ge),ar(pe,Me),Ti(q,we,X)):Pe&ld?(ar(pe,Me),c.clip(Qe),Ti(q,we,X)):Pe&Sa&&(c.save(),c.clip(Qe),Ge&&c.clip(Ge),ar(pe,Me),c.restore(),Ti(q,we,X)):(ar(pe,Me),Ti(q,we,X)),(je||Ue||Qe)&&c.restore()}function Ti(q,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,pe)=>{c.strokeStyle=go=pe,c.stroke(oe)}):X!=null&&q&&c.stroke(X))}function ar(q,X){X instanceof Map?X.forEach((ie,oe)=>{c.fillStyle=ti=oe,c.fill(ie)}):X!=null&&q&&c.fill(X)}function vo(q,X,ie,oe){let pe=T[q],we;if(oe<=0)we=[0,0];else{let Me=pe._space=pe.space(r,q,X,ie,oe),Pe=pe._incrs=pe.incrs(r,q,X,ie,oe,Me);we=$E(X,ie,Pe,oe,Me)}return pe._found=we}function to(q,X,ie,oe,pe,we,Me,Pe,je,Ue){let Ge=Me%2/2;a==1&&c.translate(Ge,Ge),Ks(Pe,Me,je,Ue,Pe),c.beginPath();let Qe,vt,It,wt,Lt=pe+(oe==0||oe==3?-we:we);ie==0?(vt=pe,wt=Lt):(Qe=pe,It=Lt);for(let ut=0;ut<q.length;ut++)X[ut]!=null&&(ie==0?Qe=It=q[ut]:vt=wt=q[ut],c.moveTo(Qe,vt),c.lineTo(It,wt));c.stroke(),a==1&&c.translate(-Ge,-Ge)}function Fa(q){let X=!0;return T.forEach((ie,oe)=>{if(!ie.show)return;let pe=$[ie.scale];if(pe.min==null){ie._show&&(X=!1,ie._show=!1,no(!1));return}else ie._show||(X=!1,ie._show=!0,no(!1));let we=ie.side,Me=we%2,{min:Pe,max:je}=pe,[Ue,Ge]=vo(oe,Pe,je,Me==0?yt:qe);if(Ge==0)return;let Qe=pe.distr==2,vt=ie._splits=ie.splits(r,oe,Pe,je,Ue,Ge,Qe),It=pe.distr==2?vt.map(st=>Rr[st]):vt,wt=pe.distr==2?Rr[vt[1]]-Rr[vt[0]]:Ue,Lt=ie._values=ie.values(r,ie.filter(r,It,oe,Ge,wt),oe,Ge,wt);ie._rotate=we==2?ie.rotate(r,Lt,oe,Ge):0;let ut=ie._size;ie._size=$i(ie.size(r,Lt,oe,q)),ut!=null&&ie._size!=ut&&(X=!1)}),X}function Il(q){let X=!0;return Na.forEach((ie,oe)=>{let pe=ie(r,oe,eo,q);pe!=Mr[oe]&&(X=!1),Mr[oe]=pe}),X}function Lo(){for(let q=0;q<T.length;q++){let X=T[q];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,pe,we,Me=X.stroke(r,q),Pe=ie==0||ie==3?-1:1,[je,Ue]=X._found;if(X.label!=null){let an=X.labelGap*Pe,gr=rr((X._lpos+an)*Kt);Mo(X.labelFont[0],Me,"center",ie==2?fl:tv),c.save(),oe==1?(pe=we=0,c.translate(gr,rr(hr+or/2)),c.rotate((ie==3?-Rc:Rc)/2)):(pe=rr(ir+nn/2),we=gr);let Fo=xv(X.label)?X.label(r,q,je,Ue):X.label;c.fillText(Fo,pe,we),c.restore()}if(Ue==0)continue;let Ge=$[X.scale],Qe=oe==0?nn:or,vt=oe==0?ir:hr,It=X._splits,wt=Ge.distr==2?It.map(an=>Rr[an]):It,Lt=Ge.distr==2?Rr[It[1]]-Rr[It[0]]:je,ut=X.ticks,st=X.border,un=ut.show?ut.size:0,wn=rr(un*Kt),er=rr((X.alignTo==2?X._size-un-X.gap:X.gap)*Kt),Wt=X._rotate*-Rc/180,fe=m(X._pos*Kt),Ae=(wn+er)*Pe,xe=fe+Ae;we=oe==0?xe:0,pe=oe==1?xe:0;let ze=X.font[0],ct=X.align==1?ma:X.align==2?Fh:Wt>0?ma:Wt<0?Fh:oe==0?"center":ie==3?Fh:ma,At=Wt||oe==1?"middle":ie==2?fl:tv;Mo(ze,Me,ct,At);let Ht=X.font[1]*X.lineGap,Mt=It.map(an=>m(b(an,Ge,Qe,vt))),zr=X._values;for(let an=0;an<zr.length;an++){let gr=zr[an];if(gr!=null){oe==0?pe=Mt[an]:we=Mt[an],gr=""+gr;let Fo=gr.indexOf(`
1496
+ `)==-1?[gr]:gr.split(/\n/gm);for(let In=0;In<Fo.length;In++){let Qs=Fo[In];Wt?(c.save(),c.translate(pe,we+In*Ht),c.rotate(Wt),c.fillText(Qs,0,0),c.restore()):c.fillText(Qs,pe,we+In*Ht)}}}ut.show&&to(Mt,ut.filter(r,wt,q,Ue,Lt),oe,ie,fe,wn,cn(ut.width*Kt,3),ut.stroke(r,q),ut.dash,ut.cap);let Ii=X.grid;Ii.show&&to(Mt,Ii.filter(r,wt,q,Ue,Lt),oe,oe==0?2:1,oe==0?hr:ir,oe==0?or:nn,cn(Ii.width*Kt,3),Ii.stroke(r,q),Ii.dash,Ii.cap),st.show&&to([fe],[1],oe==0?1:0,oe==0?1:2,oe==1?hr:ir,oe==1?or:nn,cn(st.width*Kt,3),st.stroke(r,q),st.dash,st.cap)}tt("drawAxes")}function no(q){x.forEach((X,ie)=>{ie>0&&(X._paths=null,q&&(l==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let Oo=!1,hs=!1,Io=[];function Pa(){hs=!1;for(let q=0;q<Io.length;q++)tt(...Io[q]);Io.length=0}function yo(){Oo||(bA(Ba),Oo=!0)}function Be(q,X=!1){Oo=!0,hs=X,q(r),Ba(),X&&Io.length>0&&queueMicrotask(Pa)}r.batch=Be;function Ba(){if($o&&(mo(),$o=!1),Yi&&(di(),Yi=!1),Gi){if(pn(h,ma,qt),pn(h,fl,gn),pn(h,hl,yt),pn(h,dl,qe),pn(i,ma,qt),pn(i,fl,gn),pn(i,hl,yt),pn(i,dl,qe),pn(f,hl,ur),pn(f,dl,Pr),o.width=rr(ur*Kt),o.height=rr(Pr*Kt),T.forEach(({_el:q,_show:X,_size:ie,_pos:oe,side:pe})=>{if(q!=null)if(X){let we=pe===3||pe===0?ie:0,Me=pe%2==1;pn(q,Me?"left":"top",oe-we),pn(q,Me?"width":"height",ie),pn(q,Me?"top":"left",Me?gn:qt),pn(q,Me?"height":"width",Me?qe:yt),Uh(q,Ms)}else li(q,Ms)}),go=ti=To=ni=is=qs=Vs=os=rs=null,sr=1,B(!0),qt!=Qn||gn!=Br||yt!=Ar||qe!=Cn){no(!1);let q=yt/Ar,X=qe/Cn;if(ce&&!Xi&&ne.left>=0){ne.left*=q,ne.top*=X,pi&&lo(pi,rr(ne.left),0,yt,qe),Un&&lo(Un,0,rr(ne.top),yt,qe);for(let ie=0;ie<Tr.length;ie++){let oe=Tr[ie];oe!=null&&(po[ie]*=q,Ji[ie]*=X,lo(oe,$i(po[ie]),$i(Ji[ie]),yt,qe))}}if(mt.show&&!Ao&&mt.left>=0&&mt.width>0){mt.left*=q,mt.width*=q,mt.top*=X,mt.height*=X;for(let ie in Y)pn(jr,ie,mt[ie])}Qn=qt,Br=gn,Ar=yt,Cn=qe}tt("setSize"),Gi=!1}ur>0&&Pr>0&&(c.clearRect(0,0,o.width,o.height),tt("drawClear"),N.forEach(q=>q()),tt("draw")),mt.show&&Ao&&(sn(mt),Ao=!1),ce&&Xi&&(C(null,!0,!1),Xi=!1),ae.show&&ae.live&&vr&&(y(),vr=!1),p||(p=!0,r.status=1,tt("ready")),Ei=!1,Oo=!1}r.redraw=(q,X)=>{Yi=X||!1,q!==!1?Zn(k,W.min,W.max):yo()};function De(q,X){let ie=$[q];if(ie.from==null){if(Hn==0){let oe=ie.range(r,X.min,X.max,q);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(Hn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;q==k&&ie.distr==2&&Hn>0&&(X.min=Ui(X.min,e[0]),X.max=Ui(X.max,e[0]),X.min==X.max&&X.max++),_[q]=X,$o=!0,yo()}}r.setScale=De;let An,No,pi,Un,ja,Do,Mi,bo,Yt,Vt,Xt,Bt,Ri=!1;const Rn=ne.drag;let We=Rn.x,dn=Rn.y;ce&&(ne.x&&(An=Ci(H$,i)),ne.y&&(No=Ci(U$,i)),W.ori==0?(pi=An,Un=No):(pi=No,Un=An),Xt=ne.left,Bt=ne.top);const mt=r.select=Gn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),jr=mt.show?Ci(z$,mt.over?i:h):null;function sn(q,X){if(mt.show){for(let ie in q)mt[ie]=q[ie],ie in Y&&pn(jr,ie,q[ie]);X!==!1&&tt("setSelect")}}r.setSelect=sn;function mn(q){if(x[q].show)se&&Uh(Re[q],Ms);else if(se&&li(Re[q],Ms),ce){let X=$n?Tr[0]:Tr[q];X!=null&&lo(X,-10,-10,yt,qe)}}function Zn(q,X,ie){De(q,{min:X,max:ie})}function Wr(q,X,ie,oe){X.focus!=null&&dr(q),X.show!=null&&x.forEach((pe,we)=>{we>0&&(q==we||q==null)&&(pe.show=X.show,mn(we),l==2?(Zn(pe.facets[0].scale,null,null),Zn(pe.facets[1].scale,null,null)):Zn(pe.scale,null,null),yo())}),ie!==!1&&tt("setSeries",q,X),oe&&$t("setSeries",r,q,X)}r.setSeries=Wr;function Li(q,X){Gn(S[q],X)}function Ln(q,X){q.fill=Ft(q.fill||null),q.dir=Ut(q.dir,-1),X=X??S.length,S.splice(X,0,q)}function ri(q){q==null?S.length=0:S.splice(q,1)}r.addBand=Ln,r.setBand=Li,r.delBand=ri;function ds(q,X){x[q].alpha=X,ce&&Tr[q]!=null&&(Tr[q].style.opacity=X),se&&Re[q]&&(Re[q].style.opacity=X)}let On,gi,mi;const Oi={focus:!0};function dr(q){if(q!=mi){let X=q==null,ie=Er.alpha!=1;x.forEach((oe,pe)=>{if(l==1||pe>0){let we=X||pe==0||pe==q;oe._focus=X?null:we,ie&&ds(pe,we?1:Er.alpha)}}),mi=q,ie&&yo()}}se&&Zi&&_n(ov,ge,q=>{ne._lock||(Qi(q),mi!=null&&Wr(null,Oi,!0,lt.setSeries))});function fr(q,X,ie){let oe=$[X];ie&&(q=q/Kt-(oe.ori==1?gn:qt));let pe=yt;oe.ori==1&&(pe=qe,q=pe-q),oe.dir==-1&&(q=pe-q);let we=oe._min,Me=oe._max,Pe=q/pe,je=we+(Me-we)*Pe,Ue=oe.distr;return Ue==3?ba(10,je):Ue==4?aA(je,oe.asinh):Ue==100?oe.bwd(je):je}function yr(q,X){let ie=fr(q,k,X);return Ui(ie,e[0],hn,Mn)}r.valToIdx=q=>Ui(q,e[0]),r.posToIdx=yr,r.posToVal=fr,r.valToPos=(q,X,ie)=>$[X].ori==0?d(q,$[X],ie?nn:yt,ie?ir:0):u(q,$[X],ie?or:qe,ie?hr:0),r.setCursor=(q,X,ie)=>{Xt=q.left,Bt=q.top,C(null,X,ie)};function Xs(q,X){pn(jr,ma,mt.left=q),pn(jr,hl,mt.width=X)}function br(q,X){pn(jr,fl,mt.top=q),pn(jr,dl,mt.height=X)}let Lr=W.ori==0?Xs:br,vi=W.ori==1?Xs:br;function yi(){if(se&&ae.live)for(let q=l==2?1:0;q<x.length;q++){if(q==0&&dt)continue;let X=ae.values[q],ie=0;for(let oe in X)Xe[q][ie++].firstChild.nodeValue=X[oe]}}function y(q,X){if(q!=null&&(q.idxs?q.idxs.forEach((ie,oe)=>{J[oe]=ie}):hA(q.idx)||J.fill(q.idx),ae.idx=J[0]),se&&ae.live){for(let ie=0;ie<x.length;ie++)(ie>0||l==1&&!dt)&&E(ie,J[ie]);yi()}vr=!1,X!==!1&&tt("setLegend")}r.setLegend=y;function E(q,X){let ie=x[q],oe=q==0&&P==2?Rr:e[q],pe;dt?pe=ie.values(r,q,X)??ot:(pe=ie.value(r,X==null?null:oe[X],q,X),pe=pe==null?ot:{_:pe}),ae.values[q]=pe}function C(q,X,ie){Yt=Xt,Vt=Bt,[Xt,Bt]=ne.move(r,Xt,Bt),ne.left=Xt,ne.top=Bt,ce&&(pi&&lo(pi,rr(Xt),0,yt,qe),Un&&lo(Un,0,rr(Bt),yt,qe));let oe,pe=hn>Mn;On=ln,gi=null;let we=W.ori==0?yt:qe,Me=W.ori==1?yt:qe;if(Xt<0||Hn==0||pe){oe=ne.idx=null;for(let Pe=0;Pe<x.length;Pe++){let je=Tr[Pe];je!=null&&lo(je,-10,-10,yt,qe)}Zi&&Wr(null,Oi,!0,q==null&&lt.setSeries),ae.live&&(J.fill(oe),vr=!0)}else{let Pe,je,Ue;l==1&&(Pe=W.ori==0?Xt:Bt,je=fr(Pe,k),oe=ne.idx=Ui(je,e[0],hn,Mn),Ue=D(e[0][oe],W,we,0));let Ge=-10,Qe=-10,vt=0,It=0,wt=!0,Lt="",ut="";for(let st=l==2?1:0;st<x.length;st++){let un=x[st],wn=J[st],er=wn==null?null:l==1?e[st][wn]:e[st][1][wn],Wt=ne.dataIdx(r,st,oe,je),fe=Wt==null?null:l==1?e[st][Wt]:e[st][1][Wt];if(vr=vr||fe!=er||Wt!=wn,J[st]=Wt,st>0&&un.show){let Ae=Wt==null?-10:Wt==oe?Ue:D(l==1?e[0][Wt]:e[st][0][Wt],W,we,0),xe=fe==null?-10:A(fe,l==1?$[un.scale]:$[un.facets[1].scale],Me,0);if(Zi&&fe!=null){let ze=W.ori==1?Xt:Bt,ct=nr(Er.dist(r,st,Wt,xe,ze));if(ct<On){let At=Er.bias;if(At!=0){let Ht=fr(ze,un.scale),Mt=fe>=0?1:-1,zr=Ht>=0?1:-1;zr==Mt&&(zr==1?At==1?fe>=Ht:fe<=Ht:At==1?fe<=Ht:fe>=Ht)&&(On=ct,gi=st)}else On=ct,gi=st}}if(vr||$n){let ze,ct;W.ori==0?(ze=Ae,ct=xe):(ze=xe,ct=Ae);let At,Ht,Mt,zr,Ii,an,gr=!0,Fo=zn.bbox;if(Fo!=null){gr=!1;let In=Fo(r,st);Mt=In.left,zr=In.top,At=In.width,Ht=In.height}else Mt=ze,zr=ct,At=Ht=zn.size(r,st);if(an=zn.fill(r,st),Ii=zn.stroke(r,st),$n)st==gi&&On<=Er.prox&&(Ge=Mt,Qe=zr,vt=At,It=Ht,wt=gr,Lt=an,ut=Ii);else{let In=Tr[st];In!=null&&(po[st]=Mt,Ji[st]=zr,dv(In,At,Ht,gr),uv(In,an,Ii),lo(In,$i(Mt),$i(zr),yt,qe))}}}}if($n){let st=Er.prox,un=mi==null?On<=st:On>st||gi!=mi;if(vr||un){let wn=Tr[0];wn!=null&&(po[0]=Ge,Ji[0]=Qe,dv(wn,vt,It,wt),uv(wn,Lt,ut),lo(wn,$i(Ge),$i(Qe),yt,qe))}}}if(mt.show&&Ri)if(q!=null){let[Pe,je]=lt.scales,[Ue,Ge]=lt.match,[Qe,vt]=q.cursor.sync.scales,It=q.cursor.drag;if(We=It._x,dn=It._y,We||dn){let{left:wt,top:Lt,width:ut,height:st}=q.select,un=q.scales[Qe].ori,wn=q.posToVal,er,Wt,fe,Ae,xe,ze=Pe!=null&&Ue(Pe,Qe),ct=je!=null&&Ge(je,vt);ze&&We?(un==0?(er=wt,Wt=ut):(er=Lt,Wt=st),fe=$[Pe],Ae=D(wn(er,Qe),fe,we,0),xe=D(wn(er+Wt,Qe),fe,we,0),Lr(qi(Ae,xe),nr(xe-Ae))):Lr(0,we),ct&&dn?(un==1?(er=wt,Wt=ut):(er=Lt,Wt=st),fe=$[je],Ae=A(wn(er,vt),fe,Me,0),xe=A(wn(er+Wt,vt),fe,Me,0),vi(qi(Ae,xe),nr(xe-Ae))):vi(0,Me)}else Q()}else{let Pe=nr(Yt-ja),je=nr(Vt-Do);if(W.ori==1){let vt=Pe;Pe=je,je=vt}We=Rn.x&&Pe>=Rn.dist,dn=Rn.y&&je>=Rn.dist;let Ue=Rn.uni;Ue!=null?We&&dn&&(We=Pe>=Ue,dn=je>=Ue,!We&&!dn&&(je>Pe?dn=!0:We=!0)):Rn.x&&Rn.y&&(We||dn)&&(We=dn=!0);let Ge,Qe;We&&(W.ori==0?(Ge=Mi,Qe=Xt):(Ge=bo,Qe=Bt),Lr(qi(Ge,Qe),nr(Qe-Ge)),dn||vi(0,Me)),dn&&(W.ori==1?(Ge=Mi,Qe=Xt):(Ge=bo,Qe=Bt),vi(qi(Ge,Qe),nr(Qe-Ge)),We||Lr(0,we)),!We&&!dn&&(Lr(0,0),vi(0,0))}if(Rn._x=We,Rn._y=dn,q==null){if(ie){if(yn!=null){let[Pe,je]=lt.scales;lt.values[0]=Pe!=null?fr(W.ori==0?Xt:Bt,Pe):null,lt.values[1]=je!=null?fr(W.ori==1?Xt:Bt,je):null}$t(Bh,r,Xt,Bt,yt,qe,oe)}if(Zi){let Pe=ie&&lt.setSeries,je=Er.prox;mi==null?On<=je&&Wr(gi,Oi,!0,Pe):On>je?Wr(null,Oi,!0,Pe):gi!=mi&&Wr(gi,Oi,!0,Pe)}}vr&&(ae.idx=oe,y()),X!==!1&&tt("setCursor")}let F=null;Object.defineProperty(r,"rect",{get(){return F==null&&B(!1),F}});function B(q=!1){q?F=null:(F=i.getBoundingClientRect(),tt("syncRect",F))}function z(q,X,ie,oe,pe,we,Me){ne._lock||Ri&&q!=null&&q.movementX==0&&q.movementY==0||(V(q,X,ie,oe,pe,we,Me,!1,q!=null),q!=null?C(null,!0,!0):C(X,!0,!1))}function V(q,X,ie,oe,pe,we,Me,Pe,je){if(F==null&&B(!1),Qi(q),q!=null)ie=q.clientX-F.left,oe=q.clientY-F.top;else{if(ie<0||oe<0){Xt=-10,Bt=-10;return}let[Ue,Ge]=lt.scales,Qe=X.cursor.sync,[vt,It]=Qe.values,[wt,Lt]=Qe.scales,[ut,st]=lt.match,un=X.axes[0].side%2==1,wn=W.ori==0?yt:qe,er=W.ori==1?yt:qe,Wt=un?we:pe,fe=un?pe:we,Ae=un?oe:ie,xe=un?ie:oe;if(wt!=null?ie=ut(Ue,wt)?b(vt,$[Ue],wn,0):-10:ie=wn*(Ae/Wt),Lt!=null?oe=st(Ge,Lt)?b(It,$[Ge],er,0):-10:oe=er*(xe/fe),W.ori==1){let ze=ie;ie=oe,oe=ze}}je&&(X==null||X.cursor.event.type==Bh)&&((ie<=1||ie>=yt-1)&&(ie=Os(ie,yt)),(oe<=1||oe>=qe-1)&&(oe=Os(oe,qe))),Pe?(ja=ie,Do=oe,[Mi,bo]=ne.move(r,ie,oe)):(Xt=ie,Bt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){sn(Y,!1)}let re,le,ye,ke;function me(q,X,ie,oe,pe,we,Me){Ri=!0,We=dn=Rn._x=Rn._y=!1,V(q,X,ie,oe,pe,we,Me,!0,!1),q!=null&&(_n(jh,zh,be,!1),$t(rv,r,Mi,bo,yt,qe,null));let{left:Pe,top:je,width:Ue,height:Ge}=mt;re=Pe,le=je,ye=Ue,ke=Ge}function be(q,X,ie,oe,pe,we,Me){Ri=Rn._x=Rn._y=!1,V(q,X,ie,oe,pe,we,Me,!1,!0);let{left:Pe,top:je,width:Ue,height:Ge}=mt,Qe=Ue>0||Ge>0,vt=re!=Pe||le!=je||ye!=Ue||ke!=Ge;if(Qe&&vt&&sn(mt),Rn.setScale&&Qe&&vt){let It=Pe,wt=Ue,Lt=je,ut=Ge;if(W.ori==1&&(It=je,wt=Ge,Lt=Pe,ut=Ue),We&&Zn(k,fr(It,k),fr(It+wt,k)),dn)for(let st in $){let un=$[st];st!=k&&un.from==null&&un.min!=ln&&Zn(st,fr(Lt+ut,st),fr(Lt,st))}Q()}else ne.lock&&(ne._lock=!ne._lock,C(X,!0,q!=null));q!=null&&(Xn(jh,zh),$t(jh,r,Xt,Bt,yt,qe,null))}function Ne(q,X,ie,oe,pe,we,Me){if(ne._lock)return;Qi(q);let Pe=Ri;if(Ri){let je=!0,Ue=!0,Ge=10,Qe,vt;W.ori==0?(Qe=We,vt=dn):(Qe=dn,vt=We),Qe&&vt&&(je=Xt<=Ge||Xt>=yt-Ge,Ue=Bt<=Ge||Bt>=qe-Ge),Qe&&je&&(Xt=Xt<Mi?0:yt),vt&&Ue&&(Bt=Bt<bo?0:qe),C(null,!0,!0),Ri=!1}Xt=-10,Bt=-10,J.fill(null),C(null,!0,!0),Pe&&(Ri=Pe)}function Ie(q,X,ie,oe,pe,we,Me){ne._lock||(Qi(q),Us(),Q(),q!=null&&$t(sv,r,Xt,Bt,yt,qe,null))}function He(){T.forEach(AE),Eo(r.width,r.height,!0)}Rs($c,ya,He);const at={};at.mousedown=me,at.mousemove=z,at.mouseup=be,at.dblclick=Ie,at.setSeries=(q,X,ie,oe)=>{let pe=lt.match[2];ie=pe(r,X,ie),ie!=-1&&Wr(ie,oe,!0,!1)},ce&&(_n(rv,i,me),_n(Bh,i,z),_n(iv,i,q=>{Qi(q),B(!1)}),_n(ov,i,Ne),_n(sv,i,Ie),dd.add(r),r.syncRect=B);const Ye=r.hooks=n.hooks||{};function tt(q,X,ie){hs?Io.push([q,X,ie]):q in Ye&&Ye[q].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(q=>{for(let X in q.hooks)Ye[X]=(Ye[X]||[]).concat(q.hooks[X])});const fn=(q,X,ie)=>ie,lt=Gn({key:null,setSeries:!1,filters:{pub:_v,sub:_v},scales:[k,x[1]?x[1].scale:null],match:[Cv,Cv,fn],values:[null,null]},ne.sync);lt.match.length==2&&lt.match.push(fn),ne.sync=lt;const yn=lt.key,bt=cy(yn);function $t(q,X,ie,oe,pe,we,Me){lt.filters.pub(q,X,ie,oe,pe,we,Me)&&bt.pub(q,X,ie,oe,pe,we,Me)}bt.sub(r);function Jn(q,X,ie,oe,pe,we,Me){lt.filters.sub(q,X,ie,oe,pe,we,Me)&&at[q](null,X,ie,oe,pe,we,Me)}r.pub=Jn;function pr(){bt.unsub(r),dd.delete(r),hi.clear(),Vh($c,ya,He),g.remove(),ge==null||ge.remove(),tt("destroy")}r.destroy=pr;function bn(){tt("init",n,e),ns(e||n.data,!1),_[k]?De(k,_[k]):Us(),Ao=mt.show&&(mt.width>0||mt.height>0),Xi=vr=!0,Eo(n.width,n.height)}return x.forEach(Ia),T.forEach(fi),t?t instanceof HTMLElement?(t.appendChild(g),bn()):t(r,bn):bn(),r}_r.assign=Gn,_r.fmtNum=Yh,_r.rangeNum=Mc,_r.rangeLog=Tc,_r.rangeAsinh=Kh,_r.orient=Ns,_r.pxRatio=Kt,_r.join=yA,_r.fmtDate=Jh,_r.tzDate=TA,_r.sync=cy;{_r.addGap=hE,_r.clipGaps=Fc;let n=_r.paths={points:my};n.linear=yy,n.stepped=pE,n.bars=gE,n.spline=vE}var $y,Ay;function EE(){return Ay||(Ay=1,$y=function(n,e,t,r,l){var d,u;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(l===void 0)l=n.length-1;else if(l=l|0,l<r||l>=n.length)throw new RangeError("invalid upper bound");for(;r<=l;)if(d=r+(l-r>>>1),u=+t(n[d],e,d,n),u<0)r=d+1;else if(u>0)l=d-1;else return d;return~r}),$y}var TE=EE();const lj=Si("a",lc(TE));var pd,Ey;function ME(){if(Ey)return pd;Ey=1;function n(e,t,r){var l=-1,d=e.length;t<0&&(t=-t>d?0:d+t),r=r>d?d:r,r<0&&(r+=d),d=t>r?0:r-t>>>0,t>>>=0;for(var u=Array(d);++l<d;)u[l]=e[l+t];return u}return pd=n,pd}var gd,Ty;function RE(){if(Ty)return gd;Ty=1;var n=ME();function e(t,r,l){var d=t.length;return l=l===void 0?d:l,!r&&l>=d?t:n(t,r,l)}return gd=e,gd}var md,My;function Ry(){if(My)return md;My=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\ufe0e\\ufe0f",u="\\u200d",b=RegExp("["+u+n+l+d+"]");function p(g){return b.test(g)}return md=p,md}var vd,Ly;function LE(){if(Ly)return vd;Ly=1;function n(e){return e.split("")}return vd=n,vd}var yd,Oy;function OE(){if(Oy)return yd;Oy=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\ufe0e\\ufe0f",u="["+n+"]",b="["+l+"]",p="\\ud83c[\\udffb-\\udfff]",g="(?:"+b+"|"+p+")",o="[^"+n+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",i=g+"?",a="["+d+"]?",m="(?:"+h+"(?:"+[o,c,f].join("|")+")"+a+i+")*",w=a+i+m,x="(?:"+[o+b+"?",b,c,f,u].join("|")+")",T=RegExp(p+"(?="+p+")|"+x+w,"g");function $(S){return S.match(T)||[]}return yd=$,yd}var bd,Iy;function IE(){if(Iy)return bd;Iy=1;var n=LE(),e=Ry(),t=OE();function r(l){return e(l)?t(l):n(l)}return bd=r,bd}var wd,Ny;function NE(){if(Ny)return wd;Ny=1;var n=typeof Zo=="object"&&Zo&&Zo.Object===Object&&Zo;return wd=n,wd}var xd,Dy;function DE(){if(Dy)return xd;Dy=1;var n=NE(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=n||e||Function("return this")();return xd=t,xd}var kd,Fy;function Sd(){if(Fy)return kd;Fy=1;var n=DE(),e=n.Symbol;return kd=e,kd}var _d,Py;function FE(){if(Py)return _d;Py=1;function n(e,t){for(var r=-1,l=e==null?0:e.length,d=Array(l);++r<l;)d[r]=t(e[r],r,e);return d}return _d=n,_d}var Cd,By;function PE(){if(By)return Cd;By=1;var n=Array.isArray;return Cd=n,Cd}var $d,jy;function BE(){if(jy)return $d;jy=1;var n=Sd(),e=Object.prototype,t=e.hasOwnProperty,r=e.toString,l=n?n.toStringTag:void 0;function d(u){var b=t.call(u,l),p=u[l];try{u[l]=void 0;var g=!0}catch{}var o=r.call(u);return g&&(b?u[l]=p:delete u[l]),o}return $d=d,$d}var Ad,Wy;function jE(){if(Wy)return Ad;Wy=1;var n=Object.prototype,e=n.toString;function t(r){return e.call(r)}return Ad=t,Ad}var Ed,zy;function WE(){if(zy)return Ed;zy=1;var n=Sd(),e=BE(),t=jE(),r="[object Null]",l="[object Undefined]",d=n?n.toStringTag:void 0;function u(b){return b==null?b===void 0?l:r:d&&d in Object(b)?e(b):t(b)}return Ed=u,Ed}var Td,Hy;function zE(){if(Hy)return Td;Hy=1;function n(e){return e!=null&&typeof e=="object"}return Td=n,Td}var Md,Uy;function HE(){if(Uy)return Md;Uy=1;var n=WE(),e=zE(),t="[object Symbol]";function r(l){return typeof l=="symbol"||e(l)&&n(l)==t}return Md=r,Md}var Rd,qy;function UE(){if(qy)return Rd;qy=1;var n=Sd(),e=FE(),t=PE(),r=HE(),l=n?n.prototype:void 0,d=l?l.toString:void 0;function u(b){if(typeof b=="string")return b;if(t(b))return e(b,u)+"";if(r(b))return d?d.call(b):"";var p=b+"";return p=="0"&&1/b==-1/0?"-0":p}return Rd=u,Rd}var Ld,Vy;function Wc(){if(Vy)return Ld;Vy=1;var n=UE();function e(t){return t==null?"":n(t)}return Ld=e,Ld}var Od,Ky;function qE(){if(Ky)return Od;Ky=1;var n=RE(),e=Ry(),t=IE(),r=Wc();function l(d){return function(u){u=r(u);var b=e(u)?t(u):void 0,p=b?b[0]:u.charAt(0),g=b?n(b,1).join(""):u.slice(1);return p[d]()+g}}return Od=l,Od}var Id,Gy;function Yy(){if(Gy)return Id;Gy=1;var n=qE(),e=n("toUpperCase");return Id=e,Id}var VE=Yy();const KE=lc(VE);var Nd,Xy;function GE(){if(Xy)return Nd;Xy=1;var n=Wc(),e=Yy();function t(r){return e(n(r).toLowerCase())}return Nd=t,Nd}var Dd,Qy;function YE(){if(Qy)return Dd;Qy=1;function n(e,t,r,l){var d=-1,u=e==null?0:e.length;for(l&&u&&(r=e[++d]);++d<u;)r=t(r,e[d],d,e);return r}return Dd=n,Dd}var Fd,Zy;function XE(){if(Zy)return Fd;Zy=1;function n(e){return function(t){return e==null?void 0:e[t]}}return Fd=n,Fd}var Pd,Jy;function QE(){if(Jy)return Pd;Jy=1;var n=XE(),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"},t=n(e);return Pd=t,Pd}var Bd,eb;function ZE(){if(eb)return Bd;eb=1;var n=QE(),e=Wc(),t=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",l="\\ufe20-\\ufe2f",d="\\u20d0-\\u20ff",u=r+l+d,b="["+u+"]",p=RegExp(b,"g");function g(o){return o=e(o),o&&o.replace(t,n).replace(p,"")}return Bd=g,Bd}var jd,tb;function JE(){if(tb)return jd;tb=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function e(t){return t.match(n)||[]}return jd=e,jd}var Wd,nb;function eT(){if(nb)return Wd;nb=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function e(t){return n.test(t)}return Wd=e,Wd}var zd,rb;function tT(){if(rb)return zd;rb=1;var n="\\ud800-\\udfff",e="\\u0300-\\u036f",t="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",l=e+t+r,d="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",b="\\xac\\xb1\\xd7\\xf7",p="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",g="\\u2000-\\u206f",o=" \\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",c="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",h=b+p+g+o,i="['’]",a="["+h+"]",m="["+l+"]",w="\\d+",x="["+d+"]",T="["+u+"]",$="[^"+n+h+w+d+u+c+"]",S="\\ud83c[\\udffb-\\udfff]",k="(?:"+m+"|"+S+")",L="[^"+n+"]",N="(?:\\ud83c[\\udde6-\\uddff]){2}",R="[\\ud800-\\udbff][\\udc00-\\udfff]",O="["+c+"]",W="\\u200d",P="(?:"+T+"|"+$+")",D="(?:"+O+"|"+$+")",A="(?:"+i+"(?:d|ll|m|re|s|t|ve))?",_="(?:"+i+"(?:D|LL|M|RE|S|T|VE))?",I=k+"?",j="["+f+"]?",U="(?:"+W+"(?:"+[L,N,R].join("|")+")"+j+I+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",J=j+I+U,ae="(?:"+[x,N,R].join("|")+")"+J,ne=RegExp([O+"?"+T+"+"+A+"(?="+[a,O,"$"].join("|")+")",D+"+"+_+"(?="+[a,O+P,"$"].join("|")+")",O+"?"+P+"+"+A,O+"+"+_,Z,K,w,ae].join("|"),"g");function se(ce){return ce.match(ne)||[]}return zd=se,zd}var Hd,ib;function nT(){if(ib)return Hd;ib=1;var n=JE(),e=eT(),t=Wc(),r=tT();function l(d,u,b){return d=t(d),u=b?void 0:u,u===void 0?e(d)?r(d):n(d):d.match(u)||[]}return Hd=l,Hd}var Ud,ob;function rT(){if(ob)return Ud;ob=1;var n=YE(),e=ZE(),t=nT(),r="['’]",l=RegExp(r,"g");function d(u){return function(b){return n(t(e(b).replace(l,"")),u,"")}}return Ud=d,Ud}var qd,sb;function iT(){if(sb)return qd;sb=1;var n=GE(),e=rT(),t=e(function(r,l,d){return l=l.toLowerCase(),r+(d?n(l):l)});return qd=t,qd}var oT=iT();const sT=lc(oT),aT=Object.assign({"./ArrayWidget.vue":()=>nt(()=>it.import("./ArrayWidget-Bc-Awsbn-202e0673c9eaf7beaa5a.js"),void 0),"./ArrayplotWidget.vue":()=>nt(()=>it.import("./ArrayplotWidget-B9UGCr4--2a7d43d0bd9c555359dd.js"),void 0),"./BlockWidget.vue":()=>nt(()=>it.import("./BlockWidget-CoQp-LZM-82ffdb2ee306bbc24ad5.js"),void 0),"./ButtonWidget.vue":()=>nt(()=>it.import("./ButtonWidget-CTTwpFec-8ee595bdd5d3320123e8.js"),void 0),"./CanvasWidget.vue":()=>nt(()=>it.import("./CanvasWidget-jFarbJ3t-17017b86b8ed25fcaee9.js"),void 0),"./CanvasdotWidget.vue":()=>nt(()=>it.import("./CanvasdotWidget-BoyUcwiB-69d5308fad5251ca5d81.js"),void 0),"./CanvasimageWidget.vue":()=>nt(()=>it.import("./CanvasimageWidget-DmyCSnuQ-3baf8861b6ab88687196.js"),void 0),"./CanvasimagevalueWidget.vue":()=>nt(()=>it.import("./CanvasimagevalueWidget-CmbngMqv-c9da5cd94d7cd3bc6f36.js"),void 0),"./CanvaslabelWidget.vue":()=>nt(()=>it.import("./CanvaslabelWidget-D8NzLKqi-651469a7a4034f6f5cf0.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>nt(()=>it.import("./CanvaslabelvalueWidget-DOybGI9D-c6df196e890d3728af3a.js"),void 0),"./CanvaslineWidget.vue":()=>nt(()=>it.import("./CanvaslineWidget-D2NEei7j-20ae2a6f40b22ffeee94.js"),void 0),"./CanvaslinevalueWidget.vue":()=>nt(()=>it.import("./CanvaslinevalueWidget-Ctvv9owf-c2392946037b6d01336e.js"),void 0),"./CheckbuttonWidget.vue":()=>nt(()=>it.import("./CheckbuttonWidget-CQeR0BMF-f642e449ad4e634b4233.js"),void 0),"./ComboboxWidget.vue":()=>nt(()=>it.import("./ComboboxWidget-4N-MagvN-173ae3cc380605ce2f5f.js"),void 0),"./DateWidget.vue":()=>nt(()=>it.import("./DateWidget-rYTjwUdb-c05c9568c1a2472917f8.js"),void 0),"./DynamicWidget.vue":()=>nt(()=>it.import("./DynamicWidget-DEHWYr8i-15f79b6a6248ecd2c8a2.js"),void 0),"./FilechecksumWidget.vue":()=>nt(()=>it.import("./FilechecksumWidget-gcmXxJHl-cefe2afd927c18996e1e.js"),void 0),"./FiledisplayWidget.vue":()=>nt(()=>it.import("./FiledisplayWidget-CqM549A4-e65a9d2fc98ce0908a36.js"),void 0),"./FormatvalueWidget.vue":()=>nt(()=>it.import("./FormatvalueWidget-BEwH0C7S-9f5c4680cd5a0daa983e.js"),void 0),"./HorizontalWidget.vue":()=>nt(()=>it.import("./HorizontalWidget-Dt8bkM3k-d5eb259635c40983c784.js"),void 0),"./HorizontalboxWidget.vue":()=>nt(()=>it.import("./HorizontalboxWidget-CdAZ5Sa6-985c6ab4858c68e1a969.js"),void 0),"./HorizontallineWidget.vue":()=>nt(()=>it.import("./HorizontallineWidget-CXZJTeU2-547ec0d3d7e5c1641ab5.js"),void 0),"./IframeWidget.vue":()=>nt(()=>it.import("./IframeWidget-CrcWiAVE-d6ad0b9699db7be22fc1.js"),void 0),"./ImageviewerWidget.vue":()=>nt(()=>it.import("./ImageviewerWidget-CTEl6iPg-c68dbdf5774a798fc155.js"),void 0),"./LabelWidget.vue":()=>nt(()=>it.import("./LabelWidget-CPqKGMx0-53c874ebe5cff4d620e1.js"),void 0),"./LabelledWidget.vue":()=>nt(()=>it.import("./LabelledWidget-BHYzRMFd-d210f4731d2aa4a07518.js"),void 0),"./LabelprogressbarWidget.vue":()=>nt(()=>it.import("./LabelprogressbarWidget-D9deeUo7-2ef1aae3fbd20adcafe5.js"),void 0),"./LabelsparklineWidget.vue":()=>nt(()=>it.import("./LabelsparklineWidget-7mYre3CP-61ea2fa654fc354f7349.js"),void 0),"./LabelvalueWidget.vue":()=>nt(()=>it.import("./LabelvalueWidget-NLsD60n4-4b96872518f58ddb88d6.js"),void 0),"./LabelvaluedescWidget.vue":()=>nt(()=>it.import("./LabelvaluedescWidget-DXROG4Gs-9c67c83c6f1517799fd7.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>nt(()=>it.import("./LabelvaluelimitsbarWidget-DqVqHF4W-7f22363671dcffddf201.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>nt(()=>it.import("./LabelvaluelimitscolumnWidget-BK6_31pC-bbe3304972602555928c.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>nt(()=>it.import("./LabelvaluerangebarWidget-DR7C8gqw-54c1fe87327127d2617f.js"),void 0),"./LedWidget.vue":()=>nt(()=>it.import("./LedWidget-CiAVs2tj-a7f0b4ecb264b57fc3ec.js"),void 0),"./LimitsbarWidget.vue":()=>nt(()=>it.import("./LimitsbarWidget-CIwcOhC8-cf1b307af95c6d13dc68.js"),void 0),"./LimitscolorWidget.vue":()=>nt(()=>it.import("./LimitscolorWidget-CGPfJwvT-8c439c50f6ffa0404d76.js"),void 0),"./LimitscolumnWidget.vue":()=>nt(()=>it.import("./LimitscolumnWidget-Bj_UPEC8-fa0a6dc3811e52d81877.js"),void 0),"./LinegraphWidget.vue":()=>nt(()=>it.import("./LinegraphWidget-DccnHbWa-1ed3d33006c4b2b6d30a.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>nt(()=>it.import("./MatrixbycolumnsWidget-U_NZ6aW--d8e8538d24ba887b8629.js"),void 0),"./ProgressbarWidget.vue":()=>nt(()=>it.import("./ProgressbarWidget-D4JtVzyk-e55b6a8d8b51eacc56d6.js"),void 0),"./RadiobuttonWidget.vue":()=>nt(()=>it.import("./RadiobuttonWidget-BUaW7pRx-1d111d9defef80ee83fe.js"),void 0),"./RadiogroupWidget.vue":()=>nt(()=>it.import("./RadiogroupWidget-NIv4CaUQ-32c2bddc764991b73bde.js"),void 0),"./RangebarWidget.vue":()=>nt(()=>it.import("./RangebarWidget-1-CsFpcl-b7e6048ff61b60caa373.js"),void 0),"./RollupWidget.vue":()=>nt(()=>it.import("./RollupWidget-ChasTJYP-b772cfcf7b4cccd042d6.js"),void 0),"./ScrollwindowWidget.vue":()=>nt(()=>it.import("./ScrollwindowWidget-Y2J758y6-f37fd44892d08d4af8ed.js"),void 0),"./SignalWidget.vue":()=>nt(()=>it.import("./SignalWidget-DFhHDicI-71b7de4e8ac5216beece.js"),void 0),"./SpacerWidget.vue":()=>nt(()=>it.import("./SpacerWidget-D4KojaGb-91ea8f7f2ab18293a822.js"),void 0),"./SparklineWidget.vue":()=>nt(()=>it.import("./SparklineWidget-DMHFzw8L-3bfa4871de6d64778eb9.js"),void 0),"./TabbookWidget.vue":()=>nt(()=>it.import("./TabbookWidget-NVLYMdFG-2c7238f5f6d3aeec7c65.js"),void 0),"./TextboxWidget.vue":()=>nt(()=>it.import("./TextboxWidget-CrMYPQIF-6dcf99580dc114ee150b.js"),void 0),"./TextfieldWidget.vue":()=>nt(()=>it.import("./TextfieldWidget-DMBQwtnb-292f89519348f8e5941c.js"),void 0),"./TimeWidget.vue":()=>nt(()=>it.import("./TimeWidget-CWLJZ2bt-df5276863e1bb9ad9a43.js"),void 0),"./TitleWidget.vue":()=>nt(()=>it.import("./TitleWidget-V1FGI8l3-f10848ed20d60ef98000.js"),void 0),"./ValueWidget.vue":()=>nt(()=>it.import("./ValueWidget-BI3uXmda-fac1859571cbbb8fbebb.js"),void 0),"./ValuelimitsbarWidget.vue":()=>nt(()=>it.import("./ValuelimitsbarWidget-BGSJLpw4-52ff7f3febf13969eb60.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>nt(()=>it.import("./ValuelimitscolumnWidget-CaNjHy4v-73018a6c2c62db99242a.js"),void 0),"./ValuerangebarWidget.vue":()=>nt(()=>it.import("./ValuerangebarWidget-Do40-aaL-9a6671803fd750e31bb2.js"),void 0),"./VerticalWidget.vue":()=>nt(()=>it.import("./VerticalWidget-DZqghqIm-8ff648dac0156d8dcb2c.js"),void 0),"./VerticalboxWidget.vue":()=>nt(()=>it.import("./VerticalboxWidget-CQ__4FcS-3f65e4f18cf3294d363c.js"),void 0)}),lT=Object.entries(aT).reduce((n,[e,t])=>{e=e.split("/").pop();const r=KE(sT(e.replace(/\.\w+$/,"")));return{...n,[r]:wp(t)}},{}),cj=Si("U",{components:lT}),cT={methods:{buildLanguageMode(n,e){let t=Nr.require("ace/lib/oop"),r=Object.getOwnPropertyNames(Vm.prototype).filter(p=>p!=="constructor").filter(p=>p!=="exec").concat(["check","check_raw","check_formatted","check_with_units","check_exception","check_tolerance","check_expression","wait","wait_tolerance","wait_expression","wait_check","wait_check_tolerance","wait_check_expression","wait_packet","wait_check_packet","disable_instrumentation","set_line_delay","get_line_delay","set_max_output","get_max_output"]),l=new RegExp(`(\\b${r.join("\\b|\\b")}\\b)`),d=function(){n.call(this);for(let p in this.$rules)this.$rules[p].unshift({regex:l,token:"support.function"})};t.inherits(d,n);let u=Nr.require("ace/mode/matching_brace_outdent").MatchingBraceOutdent,b=Nr.require("ace/mode/behaviour/cstyle").CstyleBehaviour;return[t,function(){this.HighlightRules=d,this.$outdent=new u,this.$behaviour=new b,this.foldingRules=new e,this.indentKeywords=this.foldingRules.indentKeywords}]},buildRubyMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/ruby_highlight_rules").RubyHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let t=Nr.require("ace/mode/ruby").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildPythonMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/python_highlight_rules").PythonHighlightRules,Nr.require("ace/mode/folding/pythonic").FoldMode);let t=Nr.require("ace/mode/python").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildJsonMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/json_highlight_rules").JsonHighlightRules,Nr.require("ace/mode/folding/ruby").FoldMode);let t=Nr.require("ace/mode/json").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e},buildMarkdownMode(){const[n,e]=this.buildLanguageMode(Nr.require("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,Nr.require("ace/mode/folding/markdown").FoldMode);let t=Nr.require("ace/mode/markdown").Mode;return n.inherits(e,t),(function(){this.$id="ace/mode/openc3"}).call(e.prototype),e}}},uT={mixins:[cT],props:{content:{type:String,required:!0},type:{type:String,default:null},name:{type:String,default:null},modelValue:Boolean,filename:{type:String,default:null}},emits:["update:modelValue"],data(){return{editor:null,mode:null}},computed:{show:{get(){return this.modelValue},set(n){this.$emit("update:modelValue",n)}},title:function(){return`${this.type}: ${this.name}`}},mounted(){this.editor=ace.edit(this.$refs.editor),this.editor.setTheme("ace/theme/twilight");let n=null;switch(this.filename?this.filename.split(".").pop():"txt"){case"json":const e=this.buildJsonMode();n=new e,this.editor.setOptions({useWorker:!1});break;case"py":case"pyi":const t=this.buildPythonMode();n=new t;break;case"md":const r=this.buildMarkdownMode();n=new r;break;default:const l=this.buildRubyMode();n=new l;break}this.editor.session.setMode(n),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 n=new Blob([this.editor.getValue()],{type:"text/plain"});let e=`${this.type.toLowerCase()}_${this.name.toLowerCase()}.json`;this.filename&&(e=this.filename);const t=document.createElement("a");t.href=URL.createObjectURL(n),t.setAttribute("download",e),t.click()}}},hT=["textContent"],dT={class:"mx-2"},fT={ref:"editor",class:"editor"};function pT(n,e,t,r,l,d){const u=Tt("v-spacer"),b=Tt("v-btn"),p=Tt("v-toolbar"),g=Tt("v-card-text"),o=Tt("v-card-actions"),c=Tt("v-card"),f=Tt("v-dialog");return Dt(),xn(f,{modelValue:d.show,"onUpdate:modelValue":e[1]||(e[1]=h=>d.show=h),width:"85vw"},{default:Je(()=>[et(c,null,{default:Je(()=>[et(p,{height:"24"},{default:Je(()=>[et(u),cr("span",{textContent:xr(d.title)},null,8,hT),et(u),cr("div",dT,[et(b,{icon:"mdi-download",variant:"text",density:"compact","data-test":"downloadIcon",onClick:d.download},null,8,["onClick"])])]),_:1}),et(g,null,{default:Je(()=>[cr("pre",fT,null,512)]),_:1}),et(o,{class:"pr-6 pb-4 pt-0"},{default:Je(()=>[et(u),et(b,{variant:"flat",onClick:e[0]||(e[0]=h=>d.show=!d.show)},{default:Je(()=>[...e[2]||(e[2]=[kn(" Ok ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])}const gT=Ku(uT,[["render",pT],["__scopeId","data-v-e0692b60"]]),mT={__name:"TopBarMenu",props:{menu:{type:Object,required:!0},title:{type:String,required:!0}},emits:["submenu-click"],setup(n,{emit:e}){const t=e,r=kp(!1);function l(){r.value=!1}function d(u){return u.replaceAll(" ","-").toLowerCase()}return(u,b)=>{const p=Tt("v-icon"),g=Tt("v-btn"),o=Tt("v-divider"),c=Tt("v-list-item-title"),f=Tt("v-list-item"),h=Tt("v-list"),i=Tt("v-menu"),a=Tt("v-radio"),m=Tt("v-list-item-action"),w=Tt("v-radio-group"),x=Tt("v-checkbox");return Dt(),xn(i,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=T=>r.value=T),"close-on-content-click":!1},{activator:Je(({props:T})=>[et(g,Yu(T,{variant:"outlined",class:"mx-1 menu-button",text:n.menu.label,"data-test":d(`${n.title} ${n.menu.label}`)}),{append:Je(()=>[et(p,{class:"menu-button-icon"},{default:Je(()=>[...b[1]||(b[1]=[kn(" mdi-menu-down ",-1)])]),_:1})]),_:1},16,["text","data-test"])]),default:Je(()=>[et(h,null,{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(n.menu.items,(T,$)=>(Dt(),Vr(So,null,[T.divider?(Dt(),xn(o,{key:$+"-divider"})):T.subMenu&&T.subMenu.length>0?(Dt(),Vr("div",{key:$+"-submenu"},[(Dt(),xn(i,{key:$,"open-on-hover":"",location:"right"},{activator:Je(({props:S})=>[(Dt(),xn(f,Yu({ref_for:!0},S,{key:$,disabled:T.disabled}),Xu({append:Je(()=>[et(p,null,{default:Je(()=>[...b[2]||(b[2]=[kn(" mdi-chevron-right ",-1)])]),_:1})]),default:Je(()=>[!T.radio&&!T.checkbox?(Dt(),xn(c,{key:0,style:Qu("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Je(()=>[kn(xr(T.label),1)]),_:2},1032,["style"])):_i("",!0)]),_:2},[T.icon?{name:"prepend",fn:Je(()=>[et(p,{disabled:T.disabled},{default:Je(()=>[kn(xr(T.icon),1)]),_:2},1032,["disabled"])]),key:"0"}:void 0]),1040,["disabled"]))]),default:Je(()=>[et(h,null,{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(T.subMenu,(S,k)=>(Dt(),xn(f,{key:k,"prepend-icon":S.icon,onClick:L=>t("submenu-click",S)},{default:Je(()=>[et(c,null,{default:Je(()=>[kn(xr(S.label),1)]),_:2},1024)]),_:2},1032,["prepend-icon","onClick"]))),128))]),_:2},1024)]),_:2},1024))])):T.radioGroup?(Dt(),xn(w,{key:$+"-radio-group",class:"ma-0 pa-0",density:"compact","hide-details":"","model-value":T.value,"onUpdate:modelValue":T.command},{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(T.choices,(S,k)=>(Dt(),xn(f,{key:k+"-choice"},{default:Je(()=>[et(m,{class:"list-action"},{default:Je(()=>[et(a,{color:"secondary",label:S.label,value:S.value,density:"compact","hide-details":""},null,8,["label","value"])]),_:2},1024)]),_:2},1024))),128))]),_:2},1032,["model-value","onUpdate:modelValue"])):(Dt(),xn(f,{key:$+"-list",disabled:T.disabled,"data-test":d(`${n.title} ${n.menu.label} ${T.label}`),onClick:()=>{T.command(T),T.checkbox||l()}},Xu({default:Je(()=>[T.checkbox?(Dt(),xn(m,{key:0,class:"list-action"},{default:Je(()=>[et(x,{modelValue:T.checked,"onUpdate:modelValue":S=>T.checked=S,label:T.label,color:"secondary",density:"compact","hide-details":""},null,8,["modelValue","onUpdate:modelValue","label"])]),_:2},1024)):_i("",!0),!T.radio&&!T.checkbox?(Dt(),xn(c,{key:1,style:Qu("cursor: pointer;"+(T.disabled?"opacity: 0.2":""))},{default:Je(()=>[kn(xr(T.label),1)]),_:2},1032,["style"])):_i("",!0)]),_:2},[T.icon?{name:"prepend",fn:Je(()=>[et(p,{icon:T.icon,disabled:T.disabled},null,8,["icon","disabled"])]),key:"0"}:void 0]),1032,["disabled","data-test","onClick"]))],64))),256))]),_:1})]),_:1},8,["modelValue"])}}},vT={components:{TopBarMenu:mT},props:{menus:{type:Array,default:function(){return[]}},title:{type:String,default:""}},mounted(){document.title=this.title},methods:{subMenuClick(n){n.command(n),this.$refs.topmenu[0].isActive=!1}}},yT={class:"app-title mr-2"};function bT(n,e,t,r,l,d){const u=Tt("v-col"),b=Tt("v-row"),p=Tt("TopBarMenu");return Dt(),xn(xp,{to:"#openc3-menu"},[et(b,{"no-gutters":""},{default:Je(()=>[et(u,{"align-self":"end"},{default:Je(()=>[cr("span",yT,xr(t.title),1)]),_:1})]),_:1}),et(b,{dense:"",class:"flex-nowrap"},{default:Je(()=>[(Dt(!0),Vr(So,null,Ko(t.menus,(g,o)=>(Dt(),xn(p,{key:o+"-top-menu",ref_for:!0,ref:"topmenu",menu:g,title:t.title,onSubmenuClick:d.subMenuClick},null,8,["menu","title","onSubmenuClick"]))),128))]),_:1})])}const wT=Ku(vT,[["render",bT],["__scopeId","data-v-b6581c4c"]]);function ab(n,e){return function(){return n.apply(e,arguments)}}const{toString:xT}=Object.prototype,{getPrototypeOf:Vd}=Object,{iterator:zc,toStringTag:lb}=Symbol,Hc=(n=>e=>{const t=xT.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Vi=n=>(n=n.toLowerCase(),e=>Hc(e)===n),Uc=n=>e=>typeof e===n,{isArray:$a}=Array,Aa=Uc("undefined");function bl(n){return n!==null&&!Aa(n)&&n.constructor!==null&&!Aa(n.constructor)&&Qr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const cb=Vi("ArrayBuffer");function kT(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&cb(n.buffer),e}const ST=Uc("string"),Qr=Uc("function"),ub=Uc("number"),wl=n=>n!==null&&typeof n=="object",_T=n=>n===!0||n===!1,qc=n=>{if(Hc(n)!=="object")return!1;const e=Vd(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(lb in n)&&!(zc in n)},CT=n=>{if(!wl(n)||bl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},$T=Vi("Date"),AT=Vi("File"),ET=Vi("Blob"),TT=Vi("FileList"),MT=n=>wl(n)&&Qr(n.pipe),RT=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Qr(n.append)&&((e=Hc(n))==="formdata"||e==="object"&&Qr(n.toString)&&n.toString()==="[object FormData]"))},LT=Vi("URLSearchParams"),[OT,IT,NT,DT]=["ReadableStream","Request","Response","Headers"].map(Vi),FT=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xl(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),$a(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(bl(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function hb(n,e){if(bl(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const Ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,db=n=>!Aa(n)&&n!==Ds;function Kd(){const{caseless:n,skipUndefined:e}=db(this)&&this||{},t={},r=(l,d)=>{const u=n&&hb(t,d)||d;qc(t[u])&&qc(l)?t[u]=Kd(t[u],l):qc(l)?t[u]=Kd({},l):$a(l)?t[u]=l.slice():(!e||!Aa(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&xl(arguments[l],r);return t}const PT=(n,e,t,{allOwnKeys:r}={})=>(xl(e,(l,d)=>{t&&Qr(l)?n[d]=ab(l,t):n[d]=l},{allOwnKeys:r}),n),BT=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),jT=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},WT=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&Vd(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},zT=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},HT=n=>{if(!n)return null;if($a(n))return n;let e=n.length;if(!ub(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},UT=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&Vd(Uint8Array)),qT=(n,e)=>{const t=(n&&n[zc]).call(n);let r;for(;(r=t.next())&&!r.done;){const l=r.value;e.call(n,l[0],l[1])}},VT=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},KT=Vi("HTMLFormElement"),GT=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),fb=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),YT=Vi("RegExp"),pb=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};xl(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},XT=n=>{pb(n,(e,t)=>{if(Qr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},QT=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return $a(n)?r(n):r(String(n).split(e)),t},ZT=()=>{},JT=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function eM(n){return!!(n&&Qr(n.append)&&n[lb]==="FormData"&&n[zc])}const tM=n=>{const e=new Array(10),t=(r,l)=>{if(wl(r)){if(e.indexOf(r)>=0)return;if(bl(r))return r;if(!("toJSON"in r)){e[l]=r;const d=$a(r)?[]:{};return xl(r,(u,b)=>{const p=t(u,l+1);!Aa(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},nM=Vi("AsyncFunction"),rM=n=>n&&(wl(n)||Qr(n))&&Qr(n.then)&&Qr(n.catch),gb=((n,e)=>n?setImmediate:e?((t,r)=>(Ds.addEventListener("message",({source:l,data:d})=>{l===Ds&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),Ds.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Qr(Ds.postMessage)),iM=typeof queueMicrotask<"u"?queueMicrotask.bind(Ds):typeof process<"u"&&process.nextTick||gb,oM=n=>n!=null&&Qr(n[zc]),Ce={isArray:$a,isArrayBuffer:cb,isBuffer:bl,isFormData:RT,isArrayBufferView:kT,isString:ST,isNumber:ub,isBoolean:_T,isObject:wl,isPlainObject:qc,isEmptyObject:CT,isReadableStream:OT,isRequest:IT,isResponse:NT,isHeaders:DT,isUndefined:Aa,isDate:$T,isFile:AT,isBlob:ET,isRegExp:YT,isFunction:Qr,isStream:MT,isURLSearchParams:LT,isTypedArray:UT,isFileList:TT,forEach:xl,merge:Kd,extend:PT,trim:FT,stripBOM:BT,inherits:jT,toFlatObject:WT,kindOf:Hc,kindOfTest:Vi,endsWith:zT,toArray:HT,forEachEntry:qT,matchAll:VT,isHTMLForm:KT,hasOwnProperty:fb,hasOwnProp:fb,reduceDescriptors:pb,freezeMethods:XT,toObjectSet:QT,toCamelCase:GT,noop:ZT,toFiniteNumber:JT,findKey:hb,global:Ds,isContextDefined:db,isSpecCompliantForm:eM,toJSONObject:tM,isAsyncFn:nM,isThenable:rM,setImmediate:gb,asap:iM,isIterable:oM};function _t(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.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 mb=_t.prototype,vb={};["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(n=>{vb[n]={value:n}}),Object.defineProperties(_t,vb),Object.defineProperty(mb,"isAxiosError",{value:!0}),_t.from=(n,e,t,r,l,d)=>{const u=Object.create(mb);Ce.toFlatObject(n,u,function(g){return g!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return _t.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const sM=null;function Gd(n){return Ce.isPlainObject(n)||Ce.isArray(n)}function yb(n){return Ce.endsWith(n,"[]")?n.slice(0,-2):n}function bb(n,e,t){return n?n.concat(e).map(function(r,l){return r=yb(r),!t&&l?"["+r+"]":r}).join(t?".":""):e}function aM(n){return Ce.isArray(n)&&!n.some(Gd)}const lM=Ce.toFlatObject(Ce,{},null,function(n){return/^is[A-Z]/.test(n)});function Vc(n,e,t){if(!Ce.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=Ce.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,i){return!Ce.isUndefined(i[h])});const r=t.metaTokens,l=t.visitor||g,d=t.dots,u=t.indexes,b=(t.Blob||typeof Blob<"u"&&Blob)&&Ce.isSpecCompliantForm(e);if(!Ce.isFunction(l))throw new TypeError("visitor must be a function");function p(h){if(h===null)return"";if(Ce.isDate(h))return h.toISOString();if(Ce.isBoolean(h))return h.toString();if(!b&&Ce.isBlob(h))throw new _t("Blob is not supported. Use a Buffer instead.");return Ce.isArrayBuffer(h)||Ce.isTypedArray(h)?b&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function g(h,i,a){let m=h;if(h&&!a&&typeof h=="object"){if(Ce.endsWith(i,"{}"))i=r?i:i.slice(0,-2),h=JSON.stringify(h);else if(Ce.isArray(h)&&aM(h)||(Ce.isFileList(h)||Ce.endsWith(i,"[]"))&&(m=Ce.toArray(h)))return i=yb(i),m.forEach(function(w,x){!(Ce.isUndefined(w)||w===null)&&e.append(u===!0?bb([i],x,d):u===null?i:i+"[]",p(w))}),!1}return Gd(h)?!0:(e.append(bb(a,i,d),p(h)),!1)}const o=[],c=Object.assign(lM,{defaultVisitor:g,convertValue:p,isVisitable:Gd});function f(h,i){if(!Ce.isUndefined(h)){if(o.indexOf(h)!==-1)throw Error("Circular reference detected in "+i.join("."));o.push(h),Ce.forEach(h,function(a,m){(!(Ce.isUndefined(a)||a===null)&&l.call(e,a,Ce.isString(m)?m.trim():m,i,c))===!0&&f(a,i?i.concat(m):[m])}),o.pop()}}if(!Ce.isObject(n))throw new TypeError("data must be an object");return f(n),e}function wb(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Yd(n,e){this._pairs=[],n&&Vc(n,this,e)}const xb=Yd.prototype;xb.append=function(n,e){this._pairs.push([n,e])},xb.toString=function(n){const e=n?function(t){return n.call(this,t,wb)}:wb;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function cM(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kb(n,e,t){if(!e)return n;const r=t&&t.encode||cM;Ce.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=Ce.isURLSearchParams(e)?e.toString():new Yd(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}let Sb=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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(t){t!==null&&e(t)})}};const _b={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uM=typeof URLSearchParams<"u"?URLSearchParams:Yd,hM=typeof FormData<"u"?FormData:null,dM=typeof Blob<"u"?Blob:null,fM={isBrowser:!0,classes:{URLSearchParams:uM,FormData:hM,Blob:dM},protocols:["http","https","file","blob","url","data"]},Xd=typeof window<"u"&&typeof document<"u",Qd=typeof navigator=="object"&&navigator||void 0,pM=Xd&&(!Qd||["ReactNative","NativeScript","NS"].indexOf(Qd.product)<0),gM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mM=Xd&&window.location.href||"http://localhost",vM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xd,hasStandardBrowserEnv:pM,hasStandardBrowserWebWorkerEnv:gM,navigator:Qd,origin:mM},Symbol.toStringTag,{value:"Module"})),Cr={...vM,...fM};function yM(n,e){return Vc(n,new Cr.classes.URLSearchParams,{visitor:function(t,r,l,d){return Cr.isNode&&Ce.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function bM(n){return Ce.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function wM(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function Cb(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&Ce.isArray(l)?l.length:u,p?(Ce.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!Ce.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&Ce.isArray(l[u])&&(l[u]=wM(l[u])),!b)}if(Ce.isFormData(n)&&Ce.isFunction(n.entries)){const t={};return Ce.forEachEntry(n,(r,l)=>{e(bM(r),l,t,0)}),t}return null}function xM(n,e,t){if(Ce.isString(n))try{return(e||JSON.parse)(n),Ce.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const kl={transitional:_b,adapter:["xhr","http","fetch"],transformRequest:[function(n,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,l=Ce.isObject(n);if(l&&Ce.isHTMLForm(n)&&(n=new FormData(n)),Ce.isFormData(n))return r?JSON.stringify(Cb(n)):n;if(Ce.isArrayBuffer(n)||Ce.isBuffer(n)||Ce.isStream(n)||Ce.isFile(n)||Ce.isBlob(n)||Ce.isReadableStream(n))return n;if(Ce.isArrayBufferView(n))return n.buffer;if(Ce.isURLSearchParams(n))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let d;if(l){if(t.indexOf("application/x-www-form-urlencoded")>-1)return yM(n,this.formSerializer).toString();if((d=Ce.isFileList(n))||t.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Vc(d?{"files[]":n}:n,u&&new u,this.formSerializer)}}return l||r?(e.setContentType("application/json",!1),xM(n)):n}],transformResponse:[function(n){const e=this.transitional||kl.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(Ce.isResponse(n)||Ce.isReadableStream(n))return n;if(n&&Ce.isString(n)&&(t&&!this.responseType||r)){const l=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(n,this.parseReviver)}catch(d){if(l)throw d.name==="SyntaxError"?_t.from(d,_t.ERR_BAD_RESPONSE,this,null,this.response):d}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Cr.classes.FormData,Blob:Cr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ce.forEach(["delete","get","head","post","put","patch"],n=>{kl.headers[n]={}});const kM=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"]),SM=n=>{const e={};let t,r,l;return n&&n.split(`
1497
1497
  `).forEach(function(d){l=d.indexOf(":"),t=d.substring(0,l).trim().toLowerCase(),r=d.substring(l+1).trim(),!(!t||e[t]&&kM[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},$b=Symbol("internals");function Sl(n){return n&&String(n).trim().toLowerCase()}function Kc(n){return n===!1||n==null?n:Ce.isArray(n)?n.map(Kc):String(n)}function _M(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const CM=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Zd(n,e,t,r,l){if(Ce.isFunction(r))return r.call(this,e,t);if(l&&(e=t),!!Ce.isString(e)){if(Ce.isString(r))return e.indexOf(r)!==-1;if(Ce.isRegExp(r))return r.test(e)}}function $M(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function AM(n,e){const t=Ce.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(l,d,u){return this[r].call(this,e,l,d,u)},configurable:!0})})}let Zr=class{constructor(e){e&&this.set(e)}set(e,t,r){const l=this;function d(b,p,g){const o=Sl(p);if(!o)throw new Error("header name must be a non-empty string");const c=Ce.findKey(l,o);(!c||l[c]===void 0||g===!0||g===void 0&&l[c]!==!1)&&(l[c||p]=Kc(b))}const u=(b,p)=>Ce.forEach(b,(g,o)=>d(g,o,p));if(Ce.isPlainObject(e)||e instanceof this.constructor)u(e,t);else if(Ce.isString(e)&&(e=e.trim())&&!CM(e))u(SM(e),t);else if(Ce.isObject(e)&&Ce.isIterable(e)){let b={},p,g;for(const o of e){if(!Ce.isArray(o))throw TypeError("Object iterator must return a key-value pair");b[g=o[0]]=(p=b[g])?Ce.isArray(p)?[...p,o[1]]:[p,o[1]]:o[1]}u(b,t)}else e!=null&&d(t,e,r);return this}get(e,t){if(e=Sl(e),e){const r=Ce.findKey(this,e);if(r){const l=this[r];if(!t)return l;if(t===!0)return _M(l);if(Ce.isFunction(t))return t.call(this,l,r);if(Ce.isRegExp(t))return t.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Sl(e),e){const r=Ce.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Zd(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let l=!1;function d(u){if(u=Sl(u),u){const b=Ce.findKey(r,u);b&&(!t||Zd(r,r[b],b,t))&&(delete r[b],l=!0)}}return Ce.isArray(e)?e.forEach(d):d(e),l}clear(e){const t=Object.keys(this);let r=t.length,l=!1;for(;r--;){const d=t[r];(!e||Zd(this,this[d],d,e,!0))&&(delete this[d],l=!0)}return l}normalize(e){const t=this,r={};return Ce.forEach(this,(l,d)=>{const u=Ce.findKey(r,d);if(u){t[u]=Kc(l),delete t[d];return}const b=e?$M(d):String(d).trim();b!==d&&delete t[d],t[b]=Kc(l),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Ce.forEach(this,(r,l)=>{r!=null&&r!==!1&&(t[l]=e&&Ce.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
1498
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,...t){const r=new this(e);return t.forEach(l=>r.set(l)),r}static accessor(e){const t=(this[$b]=this[$b]={accessors:{}}).accessors,r=this.prototype;function l(d){const u=Sl(d);t[u]||(AM(r,d),t[u]=!0)}return Ce.isArray(e)?e.forEach(l):l(e),this}};Zr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ce.reduceDescriptors(Zr.prototype,({value:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),Ce.freezeMethods(Zr);function Jd(n,e){const t=this||kl,r=e||t,l=Zr.from(r.headers);let d=r.data;return Ce.forEach(n,function(u){d=u.call(t,d,l.normalize(),e?e.status:void 0)}),l.normalize(),d}function Ab(n){return!!(n&&n.__CANCEL__)}function Ea(n,e,t){_t.call(this,n??"canceled",_t.ERR_CANCELED,e,t),this.name="CanceledError"}Ce.inherits(Ea,_t,{__CANCEL__:!0});function Eb(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new _t("Request failed with status code "+t.status,[_t.ERR_BAD_REQUEST,_t.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function EM(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function TM(n,e){n=n||10;const t=new Array(n),r=new Array(n);let l=0,d=0,u;return e=e!==void 0?e:1e3,function(b){const p=Date.now(),g=r[d];u||(u=p),t[l]=b,r[l]=p;let o=d,c=0;for(;o!==l;)c+=t[o++],o=o%n;if(l=(l+1)%n,l===d&&(d=(d+1)%n),p-u<e)return;const f=g&&p-g;return f?Math.round(c*1e3/f):void 0}}function MM(n,e){let t=0,r=1e3/e,l,d;const u=(b,p=Date.now())=>{t=p,l=null,d&&(clearTimeout(d),d=null),n(...b)};return[(...b)=>{const p=Date.now(),g=p-t;g>=r?u(b,p):(l=b,d||(d=setTimeout(()=>{d=null,u(l)},r-g)))},()=>l&&u(l)]}const Gc=(n,e,t=3)=>{let r=0;const l=TM(50,250);return MM(d=>{const u=d.loaded,b=d.lengthComputable?d.total:void 0,p=u-r,g=l(p),o=u<=b;r=u;const c={loaded:u,total:b,progress:b?u/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&o?(b-u)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(c)},t)},Tb=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Mb=n=>(...e)=>Ce.asap(()=>n(...e)),RM=Cr.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,Cr.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL(Cr.origin),Cr.navigator&&/(msie|trident)/i.test(Cr.navigator.userAgent)):()=>!0,LM=Cr.hasStandardBrowserEnv?{write(n,e,t,r,l,d,u){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];Ce.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),Ce.isString(r)&&b.push(`path=${r}`),Ce.isString(l)&&b.push(`domain=${l}`),d===!0&&b.push("secure"),Ce.isString(u)&&b.push(`SameSite=${u}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function OM(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function IM(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function Rb(n,e,t){let r=!OM(e);return n&&(r||t==!1)?IM(n,e):e}const Lb=n=>n instanceof Zr?{...n}:n;function Fs(n,e){e=e||{};const t={};function r(g,o,c,f){return Ce.isPlainObject(g)&&Ce.isPlainObject(o)?Ce.merge.call({caseless:f},g,o):Ce.isPlainObject(o)?Ce.merge({},o):Ce.isArray(o)?o.slice():o}function l(g,o,c,f){if(Ce.isUndefined(o)){if(!Ce.isUndefined(g))return r(void 0,g,c,f)}else return r(g,o,c,f)}function d(g,o){if(!Ce.isUndefined(o))return r(void 0,o)}function u(g,o){if(Ce.isUndefined(o)){if(!Ce.isUndefined(g))return r(void 0,g)}else return r(void 0,o)}function b(g,o,c){if(c in e)return r(g,o);if(c in n)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:b,headers:(g,o,c)=>l(Lb(g),Lb(o),c,!0)};return Ce.forEach(Object.keys({...n,...e}),function(g){const o=p[g]||l,c=o(n[g],e[g],g);Ce.isUndefined(c)&&o!==b||(t[g]=c)}),t}const Ob=n=>{const e=Fs({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:d,headers:u,auth:b}=e;if(e.headers=u=Zr.from(u),e.url=kb(Rb(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&u.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),Ce.isFormData(t)){if(Cr.hasStandardBrowserEnv||Cr.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Ce.isFunction(t.getHeaders)){const p=t.getHeaders(),g=["content-type","content-length"];Object.entries(p).forEach(([o,c])=>{g.includes(o.toLowerCase())&&u.set(o,c)})}}if(Cr.hasStandardBrowserEnv&&(r&&Ce.isFunction(r)&&(r=r(e)),r||r!==!1&&RM(e.url))){const p=l&&d&&LM.read(d);p&&u.set(l,p)}return e},NM=typeof XMLHttpRequest<"u",DM=NM&&function(n){return new Promise(function(e,t){const r=Ob(n);let l=r.data;const d=Zr.from(r.headers).normalize();let{responseType:u,onUploadProgress:b,onDownloadProgress:p}=r,g,o,c,f,h;function i(){f&&f(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(g),r.signal&&r.signal.removeEventListener("abort",g)}let a=new XMLHttpRequest;a.open(r.method.toUpperCase(),r.url,!0),a.timeout=r.timeout;function m(){if(!a)return;const x=Zr.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:x,config:n,request:a};Eb(function($){e($),i()},function($){t($),i()},T),a=null}"onloadend"in a?a.onloadend=m:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(m)},a.onabort=function(){a&&(t(new _t("Request aborted",_t.ECONNABORTED,n,a)),a=null)},a.onerror=function(x){const T=x&&x.message?x.message:"Network Error",$=new _t(T,_t.ERR_NETWORK,n,a);$.event=x||null,t($),a=null},a.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||_b;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),t(new _t(x,T.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,n,a)),a=null},l===void 0&&d.setContentType(null),"setRequestHeader"in a&&Ce.forEach(d.toJSON(),function(x,T){a.setRequestHeader(T,x)}),Ce.isUndefined(r.withCredentials)||(a.withCredentials=!!r.withCredentials),u&&u!=="json"&&(a.responseType=r.responseType),p&&([c,h]=Gc(p,!0),a.addEventListener("progress",c)),b&&a.upload&&([o,f]=Gc(b),a.upload.addEventListener("progress",o),a.upload.addEventListener("loadend",f)),(r.cancelToken||r.signal)&&(g=x=>{a&&(t(!x||x.type?new Ea(null,n,a):x),a.abort(),a=null)},r.cancelToken&&r.cancelToken.subscribe(g),r.signal&&(r.signal.aborted?g():r.signal.addEventListener("abort",g)));const w=EM(r.url);if(w&&Cr.protocols.indexOf(w)===-1){t(new _t("Unsupported protocol "+w+":",_t.ERR_BAD_REQUEST,n));return}a.send(l||null)})},FM=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,l;const d=function(g){if(!l){l=!0,b();const o=g instanceof Error?g:this.reason;r.abort(o instanceof _t?o:new Ea(o instanceof Error?o.message:o))}};let u=e&&setTimeout(()=>{u=null,d(new _t(`timeout ${e} of ms exceeded`,_t.ETIMEDOUT))},e);const b=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),n=null)};n.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>Ce.asap(b),p}},PM=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,l;for(;r<t;)l=r+e,yield n.slice(r,l),r=l},BM=async function*(n,e){for await(const t of jM(n))yield*PM(t,e)},jM=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Ib=(n,e,t,r)=>{const l=BM(n,e);let d=0,u,b=p=>{u||(u=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:o}=await l.next();if(g){b(),p.close();return}let c=o.byteLength;if(t){let f=d+=c;t(f)}p.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(p){return b(p),l.return()}},{highWaterMark:2})},Nb=64*1024,{isFunction:Yc}=Ce,WM=(({Request:n,Response:e})=>({Request:n,Response:e}))(Ce.global),{ReadableStream:Db,TextEncoder:Fb}=Ce.global,Pb=(n,...e)=>{try{return!!n(...e)}catch{return!1}},zM=n=>{n=Ce.merge.call({skipUndefined:!0},WM,n);const{fetch:e,Request:t,Response:r}=n,l=e?Yc(e):typeof fetch=="function",d=Yc(t),u=Yc(r);if(!l)return!1;const b=l&&Yc(Db),p=l&&(typeof Fb=="function"?(i=>a=>i.encode(a))(new Fb):async i=>new Uint8Array(await new t(i).arrayBuffer())),g=d&&b&&Pb(()=>{let i=!1;const a=new t(Cr.origin,{body:new Db,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!a}),o=u&&b&&Pb(()=>Ce.isReadableStream(new r("").body)),c={stream:o&&(i=>i.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!c[i]&&(c[i]=(a,m)=>{let w=a&&a[i];if(w)return w.call(a);throw new _t(`Response type '${i}' is not supported`,_t.ERR_NOT_SUPPORT,m)})});const f=async i=>{if(i==null)return 0;if(Ce.isBlob(i))return i.size;if(Ce.isSpecCompliantForm(i))return(await new t(Cr.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(Ce.isArrayBufferView(i)||Ce.isArrayBuffer(i))return i.byteLength;if(Ce.isURLSearchParams(i)&&(i=i+""),Ce.isString(i))return(await p(i)).byteLength},h=async(i,a)=>Ce.toFiniteNumber(i.getContentLength())??f(a);return async i=>{let{url:a,method:m,data:w,signal:x,cancelToken:T,timeout:$,onDownloadProgress:S,onUploadProgress:k,responseType:L,headers:N,withCredentials:R="same-origin",fetchOptions:O}=Ob(i),W=e||fetch;L=L?(L+"").toLowerCase():"text";let P=FM([x,T&&T.toAbortSignal()],$),D=null;const A=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let _;try{if(k&&g&&m!=="get"&&m!=="head"&&(_=await h(N,w))!==0){let J=new t(a,{method:"POST",body:w,duplex:"half"}),ae;if(Ce.isFormData(w)&&(ae=J.headers.get("content-type"))&&N.setContentType(ae),J.body){const[ne,se]=Tb(_,Gc(Mb(k)));w=Ib(J.body,Nb,ne,se)}}Ce.isString(R)||(R=R?"include":"omit");const I=d&&"credentials"in t.prototype,j={...O,signal:P,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:I?R:void 0};D=d&&new t(a,j);let U=await(d?W(D,O):W(a,j));const K=o&&(L==="stream"||L==="response");if(o&&(S||K&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=U[ce]});const ae=Ce.toFiniteNumber(U.headers.get("content-length")),[ne,se]=S&&Tb(ae,Gc(Mb(S),!0))||[];U=new r(Ib(U.body,Nb,ne,()=>{se&&se(),A&&A()}),J)}L=L||"text";let Z=await c[Ce.findKey(c,L)||"text"](U,i);return!K&&A&&A(),await new Promise((J,ae)=>{Eb(J,ae,{data:Z,headers:Zr.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:D})})}catch(I){throw A&&A(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new _t("Network Error",_t.ERR_NETWORK,i,D),{cause:I.cause||I}):_t.from(I,I&&I.code,i,D)}}},HM=new Map,Bb=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:l}=e,d=[r,l,t];let u=d.length,b=u,p,g,o=HM;for(;b--;)p=d[b],g=o.get(p),g===void 0&&o.set(p,g=b?new Map:zM(e)),o=g;return g};Bb();const ef={http:sM,xhr:DM,fetch:{get:Bb}};Ce.forEach(ef,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const jb=n=>`- ${n}`,UM=n=>Ce.isFunction(n)||n===null||n===!1;function qM(n,e){n=Ce.isArray(n)?n:[n];const{length:t}=n;let r,l;const d={};for(let u=0;u<t;u++){r=n[u];let b;if(l=r,!UM(r)&&(l=ef[(b=String(r)).toLowerCase()],l===void 0))throw new _t(`Unknown adapter '${b}'`);if(l&&(Ce.isFunction(l)||(l=l.get(e))))break;d[b||"#"+u]=l}if(!l){const u=Object.entries(d).map(([p,g])=>`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let b=t?u.length>1?`since :
1499
1499
  `+u.map(jb).join(`
1500
1500
  `):" "+jb(u[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return l}const Wb={getAdapter:qM,adapters:ef};function tf(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ea(null,n)}function zb(n){return tf(n),n.headers=Zr.from(n.headers),n.data=Jd.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Wb.getAdapter(n.adapter||kl.adapter,n)(n).then(function(e){return tf(n),e.data=Jd.call(n,n.transformResponse,e),e.headers=Zr.from(e.headers),e},function(e){return Ab(e)||(tf(n),e&&e.response&&(e.response.data=Jd.call(n,n.transformResponse,e.response),e.response.headers=Zr.from(e.response.headers))),Promise.reject(e)})}const Hb="1.13.2",Xc={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Xc[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});const Ub={};Xc.transitional=function(n,e,t){function r(l,d){return"[Axios v"+Hb+"] Transitional option '"+l+"'"+d+(t?". "+t:"")}return(l,d,u)=>{if(n===!1)throw new _t(r(d," has been removed"+(e?" in "+e:"")),_t.ERR_DEPRECATED);return e&&!Ub[d]&&(Ub[d]=!0,console.warn(r(d," has been deprecated since v"+e+" and will be removed in the near future"))),n?n(l,d,u):!0}},Xc.spelling=function(n){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${n}`),!0)};function VM(n,e,t){if(typeof n!="object")throw new _t("options must be an object",_t.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let l=r.length;for(;l-- >0;){const d=r[l],u=e[d];if(u){const b=n[d],p=b===void 0||u(b,d,n);if(p!==!0)throw new _t("option "+d+" must be "+p,_t.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new _t("Unknown option "+d,_t.ERR_BAD_OPTION)}}const Qc={assertOptions:VM,validators:Xc},co=Qc.validators;let Ps=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Sb,response:new Sb}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const d=l.stack?l.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,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Fs(this.defaults,t);const{transitional:r,paramsSerializer:l,headers:d}=t;r!==void 0&&Qc.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),l!=null&&(Ce.isFunction(l)?t.paramsSerializer={serialize:l}:Qc.assertOptions(l,{encode:co.function,serialize:co.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Qc.assertOptions(t,{baseUrl:co.spelling("baseURL"),withXsrfToken:co.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=d&&Ce.merge(d.common,d[t.method]);d&&Ce.forEach(["delete","get","head","post","put","patch","common"],i=>{delete d[i]}),t.headers=Zr.concat(u,d);const b=[];let p=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(t)===!1||(p=p&&i.synchronous,b.unshift(i.fulfilled,i.rejected))});const g=[];this.interceptors.response.forEach(function(i){g.push(i.fulfilled,i.rejected)});let o,c=0,f;if(!p){const i=[zb.bind(this),void 0];for(i.unshift(...b),i.push(...g),f=i.length,o=Promise.resolve(t);c<f;)o=o.then(i[c++],i[c++]);return o}f=b.length;let h=t;for(;c<f;){const i=b[c++],a=b[c++];try{h=i(h)}catch(m){a.call(this,m);break}}try{o=zb.call(this,h)}catch(i){return Promise.reject(i)}for(c=0,f=g.length;c<f;)o=o.then(g[c++],g[c++]);return o}getUri(e){e=Fs(this.defaults,e);const t=Rb(e.baseURL,e.url,e.allowAbsoluteUrls);return kb(t,e.params,e.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(n){Ps.prototype[n]=function(e,t){return this.request(Fs(t||{},{method:n,url:e,data:(t||{}).data}))}}),Ce.forEach(["post","put","patch"],function(n){function e(t){return function(r,l,d){return this.request(Fs(d||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}Ps.prototype[n]=e(),Ps.prototype[n+"Form"]=e(!0)});let KM=class Kx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(l){t=l});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(l,d,u){r.reason||(r.reason=new Ea(l,d,u),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Kx(function(t){e=t}),cancel:e}}};function GM(n){return function(e){return n.apply(null,e)}}function YM(n){return Ce.isObject(n)&&n.isAxiosError===!0}const nf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nf).forEach(([n,e])=>{nf[e]=n});function qb(n){const e=new Ps(n),t=ab(Ps.prototype.request,e);return Ce.extend(t,Ps.prototype,e,{allOwnKeys:!0}),Ce.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return qb(Fs(n,r))},t}const Yn=Bi("w",qb(kl));Yn.Axios=Ps,Yn.CanceledError=Ea,Yn.CancelToken=KM,Yn.isCancel=Ab,Yn.VERSION=Hb,Yn.toFormData=Vc,Yn.AxiosError=_t,Yn.Cancel=Yn.CanceledError,Yn.all=function(n){return Promise.all(n)},Yn.spread=GM,Yn.isAxiosError=YM,Yn.mergeConfig=Fs,Yn.AxiosHeaders=Zr,Yn.formToJSON=n=>Cb(Ce.isHTMLForm(n)?new FormData(n):n),Yn.getAdapter=Wb.getAdapter,Yn.HttpStatusCode=nf,Yn.default=Yn;const{Axios:uj,AxiosError:hj,CanceledError:dj,isCancel:fj,CancelToken:pj,VERSION:gj,all:mj,Cancel:vj,isAxiosError:yj,spread:bj,toFormData:wj,AxiosHeaders:xj,HttpStatusCode:kj,formToJSON:Sj,getAdapter:_j,mergeConfig:Cj}=Yn;function Vb(){return Object.assign({},ca())}function XM(n,e,t){const r=vn(n,void 0);return r.setTime(r.getTime()+e*sc),r}function QM(n,e){const t=()=>Kn(void 0,NaN),r=tR(n);let l;if(r.date){const p=nR(r.date,2);l=rR(p.restDateString,p.year)}if(!l||isNaN(+l))return t();const d=+l;let u=0,b;if(r.time&&(u=iR(r.time),isNaN(u)))return t();if(r.timezone){if(b=oR(r.timezone),isNaN(b))return t()}else{const p=new Date(d+u),g=vn(0,void 0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}return vn(d+u+b,void 0)}const Zc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ZM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,JM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,eR=/^([+-])(\d{2})(?::?(\d{2}))?$/;function tR(n){const e={},t=n.split(Zc.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],Zc.timeZoneDelimiter.test(e.date)&&(e.date=n.split(Zc.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const l=Zc.timezone.exec(r);l?(e.time=r.replace(l[1],""),e.timezone=l[1]):e.time=r}return e}function nR(n,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};const l=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?l:d*100,restDateString:n.slice((r[1]||r[2]).length)}}function rR(n,e){if(e===null)return new Date(NaN);const t=n.match(ZM);if(!t)return new Date(NaN);const r=!!t[4],l=_l(t[1]),d=_l(t[2])-1,u=_l(t[3]),b=_l(t[4]),p=_l(t[5])-1;if(r)return uR(e,b,p)?sR(e,b,p):new Date(NaN);{const g=new Date(0);return!lR(e,d,u)||!cR(e,l)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(l,u)),g)}}function _l(n){return n?parseInt(n):1}function iR(n){const e=n.match(JM);if(!e)return NaN;const t=rf(e[1]),r=rf(e[2]),l=rf(e[3]);return hR(t,r,l)?t*hh+r*sc+l*1e3:NaN}function rf(n){return n&&parseFloat(n.replace(",","."))||0}function oR(n){if(n==="Z")return 0;const e=n.match(eR);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),l=e[3]&&parseInt(e[3])||0;return dR(r,l)?t*(r*hh+l*sc):NaN}function sR(n,e,t){const r=new Date(0);r.setUTCFullYear(n,0,4);const l=r.getUTCDay()||7,d=(e-1)*7+t+1-l;return r.setUTCDate(r.getUTCDate()+d),r}const aR=[31,null,31,30,31,30,31,31,30,31,30,31];function Kb(n){return n%400===0||n%4===0&&n%100!==0}function lR(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(aR[e]||(Kb(n)?29:28))}function cR(n,e){return e>=1&&e<=(Kb(n)?366:365)}function uR(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function hR(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function dR(n,e){return e>=0&&e<=59}function fR(n,e,t){return XM(n,-e)}function Gb(n,e,t){const r=Vb(),l=mR(n,t.timeZone,t.locale??r.locale);return"formatToParts"in l?pR(l,e):gR(l,e)}function pR(n,e){const t=n.formatToParts(e);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function gR(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function mR(n,e,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:e,timeZoneName:n})}function vR(n,e){const t=kR(e);return"formatToParts"in t?bR(t,n):wR(t,n)}const yR={year:0,month:1,day:2,hour:3,minute:4,second:5};function bR(n,e){try{const t=n.formatToParts(e),r=[];for(let l=0;l<t.length;l++){const d=yR[t[l].type];d!==void 0&&(r[d]=parseInt(t[l].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function wR(n,e){const t=n.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);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 of={},Yb=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")),xR=Yb==="06/25/2014, 00:00:00"||Yb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function kR(n){return of[n]||(of[n]=xR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),of[n]}function Xb(n,e,t,r,l,d,u){const b=new Date(0);return b.setUTCFullYear(n,e,t),b.setUTCHours(r,l,d,u),b}const Qb=36e5,SR=6e4,sf={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function af(n,e,t){if(!n)return 0;let r=sf.timezoneZ.exec(n);if(r)return 0;let l,d;if(r=sf.timezoneHH.exec(n),r)return l=parseInt(r[1],10),Zb(l)?-(l*Qb):NaN;if(r=sf.timezoneHHMM.exec(n),r){l=parseInt(r[2],10);const u=parseInt(r[3],10);return Zb(l,u)?(d=Math.abs(l)*Qb+u*SR,r[1]==="+"?-d:d):NaN}if($R(n)){e=new Date(e||Date.now());const u=t?e:_R(e),b=lf(u,n);return-(t?b:CR(e,b,n))}return NaN}function _R(n){return Xb(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function lf(n,e){const t=vR(n,e),r=Xb(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let l=n.getTime();const d=l%1e3;return l-=d>=0?d:1e3+d,r-l}function CR(n,e,t){let r=n.getTime()-e;const l=lf(new Date(r),t);if(e===l)return e;r-=l-e;const d=lf(new Date(r),t);return l===d?l:Math.max(l,d)}function Zb(n,e){return-23<=n&&n<=23&&(e==null||0<=e&&e<=59)}const Jb={};function $R(n){if(Jb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Jb[n]=!0,!0}catch{return!1}}const AR=60*1e3,ER={X:function(n,e,t){const r=cf(t.timeZone,n);if(r===0)return"Z";switch(e){case"X":return ew(r);case"XXXX":case"XX":return Ta(r);case"XXXXX":case"XXX":default:return Ta(r,":")}},x:function(n,e,t){const r=cf(t.timeZone,n);switch(e){case"x":return ew(r);case"xxxx":case"xx":return Ta(r);case"xxxxx":case"xxx":default:return Ta(r,":")}},O:function(n,e,t){const r=cf(t.timeZone,n);switch(e){case"O":case"OO":case"OOO":return"GMT"+TR(r,":");case"OOOO":default:return"GMT"+Ta(r,":")}},z:function(n,e,t){switch(e){case"z":case"zz":case"zzz":return Gb("short",n,t);case"zzzz":default:return Gb("long",n,t)}}};function cf(n,e){const t=n?af(n,e,!0)/AR:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+n);return t}function Jc(n,e){const t=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<e;)r="0"+r;return t+r}function Ta(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),l=Jc(Math.floor(r/60),2),d=Jc(Math.floor(r%60),2);return t+l+e+d}function ew(n,e){return n%60===0?(n>0?"-":"+")+Jc(Math.abs(n)/60,2):Ta(n,e)}function TR(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),l=Math.floor(r/60),d=r%60;return d===0?t+String(l):t+String(l)+e+Jc(d,2)}function tw(n){const e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+n-+e}const MR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,uf=36e5,nw=6e4,RR=2,Fr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:MR};function rw(n,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const t=e.additionalDigits==null?RR:Number(e.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=LR(n),{year:l,restDateString:d}=OR(r.date,t),u=IR(d,l);if(u===null||isNaN(u.getTime()))return new Date(NaN);if(u){const b=u.getTime();let p=0,g;if(r.time&&(p=NR(r.time),p===null||isNaN(p)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=af(r.timeZone||e.timeZone,new Date(b+p)),isNaN(g))return new Date(NaN)}else g=tw(new Date(b+p)),g=tw(new Date(b+p+g));return new Date(b+p+g)}else return new Date(NaN)}function LR(n){const e={};let t=Fr.dateTimePattern.exec(n),r;if(t?(e.date=t[1],r=t[3]):(t=Fr.datePattern.exec(n),t?(e.date=t[1],r=t[2]):(e.date=null,r=n)),r){const l=Fr.timeZone.exec(r);l?(e.time=r.replace(l[1],""),e.timeZone=l[1].trim()):e.time=r}return e}function OR(n,e){if(n){const t=Fr.YYY[e],r=Fr.YYYYY[e];let l=Fr.YYYY.exec(n)||r.exec(n);if(l){const d=l[1];return{year:parseInt(d,10),restDateString:n.slice(d.length)}}if(l=Fr.YY.exec(n)||t.exec(n),l){const d=l[1];return{year:parseInt(d,10)*100,restDateString:n.slice(d.length)}}}return{year:null}}function IR(n,e){if(e===null)return null;let t,r,l;if(!n||!n.length)return t=new Date(0),t.setUTCFullYear(e),t;let d=Fr.MM.exec(n);if(d)return t=new Date(0),r=parseInt(d[1],10)-1,sw(e,r)?(t.setUTCFullYear(e,r),t):new Date(NaN);if(d=Fr.DDD.exec(n),d){t=new Date(0);const u=parseInt(d[1],10);return PR(e,u)?(t.setUTCFullYear(e,0,u),t):new Date(NaN)}if(d=Fr.MMDD.exec(n),d){t=new Date(0),r=parseInt(d[1],10)-1;const u=parseInt(d[2],10);return sw(e,r,u)?(t.setUTCFullYear(e,r,u),t):new Date(NaN)}if(d=Fr.Www.exec(n),d)return l=parseInt(d[1],10)-1,aw(l)?iw(e,l):new Date(NaN);if(d=Fr.WwwD.exec(n),d){l=parseInt(d[1],10)-1;const u=parseInt(d[2],10)-1;return aw(l,u)?iw(e,l,u):new Date(NaN)}return null}function NR(n){let e,t,r=Fr.HH.exec(n);if(r)return e=parseFloat(r[1].replace(",",".")),hf(e)?e%24*uf:NaN;if(r=Fr.HHMM.exec(n),r)return e=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),hf(e,t)?e%24*uf+t*nw:NaN;if(r=Fr.HHMMSS.exec(n),r){e=parseInt(r[1],10),t=parseInt(r[2],10);const l=parseFloat(r[3].replace(",","."));return hf(e,t,l)?e%24*uf+t*nw+l*1e3:NaN}return null}function iw(n,e,t){e=e||0,t=t||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const l=r.getUTCDay()||7,d=e*7+t+1-l;return r.setUTCDate(r.getUTCDate()+d),r}const DR=[31,28,31,30,31,30,31,31,30,31,30,31],FR=[31,29,31,30,31,30,31,31,30,31,30,31];function ow(n){return n%400===0||n%4===0&&n%100!==0}function sw(n,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const r=ow(n);if(r&&t>FR[e]||!r&&t>DR[e])return!1}return!0}function PR(n,e){if(e<1)return!1;const t=ow(n);return!(t&&e>366||!t&&e>365)}function aw(n,e){return!(n<0||n>52||e!=null&&(e<0||e>6))}function hf(n,e,t){return!(n<0||n>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}const BR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function jR(n,e,t={}){e=String(e);const r=e.match(BR);if(r){const l=rw(t.originalDate||n,t);e=r.reduce(function(d,u){if(u[0]==="'")return d;const b=d.indexOf(u),p=d[b-1]==="'",g=d.replace(u,"'"+ER[u[0]](l,u,t)+"'");return p?g.substring(0,b-1)+g.substring(b+1):g},e)}return _s(n,e,t)}function WR(n,e,t){n=rw(n,t);const r=af(e,n,!0),l=new Date(n.getTime()-r),d=new Date(0);return d.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),d.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),d}function eu(n,e,t,r){return r={...r,timeZone:e,originalDate:n},jR(WR(n,e,{timeZone:r.timeZone}),t,r)}const tu="yyyy-MM-dd",lw="HH:mm:ss.SSS",cw="HH:mm:ss",nu=`${tu} ${lw}`,uw=`${tu} ${cw}`,$j=Bi("R",{methods:{parseDateTime(n,e){return n.includes(" ")&&(n=n.replace(" ","T")),e&&e==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,e){return _s(!e||e==="local"?fR(n,n.getTimezoneOffset()):n,nu)},formatDateTime(n,e){return!e||e==="local"?_s(n,nu):eu(n,e,nu)},formatDateTimeHMS(n,e){return!e||e==="local"?_s(n,uw):eu(n,e,uw)},formatDate:function(n,e){return!e||e==="local"?_s(n,tu):eu(n,this.timeZone,tu)},formatTime:function(n,e,t=lw){return!e||e==="local"?_s(n,t):eu(n,this.timeZone,t)},formatTimeHMS:function(n,e){return this.formatTime(n,e,cw)},formatTimestamp(n,e){return this.formatDateTime(QM(n),e)},formatSeconds(n,e){return this.formatDateTime(new Date(n*1e3),e)},formatNanoseconds(n,e){return this.formatDateTime(new Date(parseInt(n)/1e6),e)}}});var zR=Object.defineProperty,HR=(n,e,t)=>e in n?zR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ze=(n,e,t)=>HR(n,typeof e!="symbol"?e+"":e,t);function df(n,e,t){const r=vn(n,t==null?void 0:t.in);return isNaN(e)?Kn((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function UR(n,e){const t=vn(n,void 0).getDay();return t===0?7:t}function qR(n,e){const t=VR(e)?new e(0):Kn(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function VR(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const KR=10;class hw{constructor(){Ze(this,"subPriority",0)}validate(e,t){return!0}}class GR extends hw{constructor(e,t,r,l,d){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=l,d&&(this.subPriority=d)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class YR extends hw{constructor(e,t){super(),Ze(this,"priority",KR),Ze(this,"subPriority",-1),this.context=e||(r=>Kn(t,r))}set(e,t){return t.timestampIsSet?e:Kn(e,qR(e,this.context))}}class Gt{run(e,t,r,l){const d=this.parse(e,t,r,l);return d?{setter:new GR(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,t,r){return!0}}class XR extends Gt{constructor(){super(...arguments),Ze(this,"priority",140),Ze(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){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,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Pn={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 Bn(n,e){return n&&{value:e(n.value),rest:n.rest}}function Sn(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ho(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,l=t[2]?parseInt(t[2],10):0,d=t[3]?parseInt(t[3],10):0,u=t[5]?parseInt(t[5],10):0;return{value:r*(l*hh+d*sc+u*Mk),rest:e.slice(t[0].length)}}function dw(n){return Sn(Pn.anyDigitsSigned,n)}function Tn(n,e){switch(n){case 1:return Sn(Pn.singleDigit,e);case 2:return Sn(Pn.twoDigits,e);case 3:return Sn(Pn.threeDigits,e);case 4:return Sn(Pn.fourDigits,e);default:return Sn(new RegExp("^\\d{1,"+n+"}"),e)}}function fw(n,e){switch(n){case 1:return Sn(Pn.singleDigitSigned,e);case 2:return Sn(Pn.twoDigitsSigned,e);case 3:return Sn(Pn.threeDigitsSigned,e);case 4:return Sn(Pn.fourDigitsSigned,e);default:return Sn(new RegExp("^-?\\d{1,"+n+"}"),e)}}function ff(n){switch(n){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 pw(n,e){const t=e>0,r=t?e:1-e;let l;if(r<=50)l=n||100;else{const d=r+50,u=Math.trunc(d/100)*100,b=n>=d%100;l=n+u-(b?100:0)}return t?l:1-l}function gw(n){return n%400===0||n%4===0&&n%100!==0}class QR extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const l=d=>({year:d,isTwoDigitYear:t==="yy"});switch(t){case"y":return Bn(Tn(4,e),l);case"yo":return Bn(r.ordinalNumber(e,{unit:"year"}),l);default:return Bn(Tn(t.length,e),l)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const l=e.getFullYear();if(r.isTwoDigitYear){const u=pw(r.year,l);return e.setFullYear(u,0,1),e.setHours(0,0,0,0),e}const d=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}class ZR 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,t,r){const l=d=>({year:d,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Bn(Tn(4,e),l);case"Yo":return Bn(r.ordinalNumber(e,{unit:"year"}),l);default:return Bn(Tn(t.length,e),l)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,l){const d=fh(e,l);if(r.isTwoDigitYear){const b=pw(r.year,d);return e.setFullYear(b,0,l.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,l)}const u=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(u,0,l.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,l)}}class JR 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,t){return fw(t==="R"?4:t.length,e)}set(e,t,r){const l=Kn(e,0);return l.setFullYear(r,0,4),l.setHours(0,0,0,0),ua(l)}}class eL 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,t){return fw(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class tL 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,t,r){switch(t){case"Q":case"QQ":return Tn(t.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,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class nL 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,t,r){switch(t){case"q":case"qq":return Tn(t.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,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class rL 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,t,r){const l=d=>d-1;switch(t){case"M":return Bn(Sn(Pn.month,e),l);case"MM":return Bn(Tn(2,e),l);case"Mo":return Bn(r.ordinalNumber(e,{unit:"month"}),l);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,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class iL 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,t,r){const l=d=>d-1;switch(t){case"L":return Bn(Sn(Pn.month,e),l);case"LL":return Bn(Tn(2,e),l);case"Lo":return Bn(r.ordinalNumber(e,{unit:"month"}),l);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,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function oL(n,e,t){const r=vn(n,t==null?void 0:t.in),l=yg(r,t)-e;return r.setDate(r.getDate()-l*7),vn(r,t==null?void 0:t.in)}class sL 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,t,r){switch(t){case"w":return Sn(Pn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,l){return Xo(oL(e,r,l),l)}}function aL(n,e,t){const r=vn(n,void 0),l=vg(r)-e;return r.setDate(r.getDate()-l*7),r}class lL 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,t,r){switch(t){case"I":return Sn(Pn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return ua(aL(e,r))}}const cL=[31,28,31,30,31,30,31,31,30,31,30,31],uL=[31,29,31,30,31,30,31,31,30,31,30,31];class hL 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,t,r){switch(t){case"d":return Sn(Pn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Tn(t.length,e)}}validate(e,t){const r=e.getFullYear(),l=gw(r),d=e.getMonth();return l?t>=1&&t<=uL[d]:t>=1&&t<=cL[d]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class dL 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,t,r){switch(t){case"D":case"DD":return Sn(Pn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Tn(t.length,e)}}validate(e,t){const r=e.getFullYear();return gw(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function pf(n,e,t){var r,l,d,u;const b=ca(),p=(t==null?void 0:t.weekStartsOn)??((l=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:l.weekStartsOn)??b.weekStartsOn??((u=(d=b.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,g=vn(n,t==null?void 0:t.in),o=g.getDay(),c=(e%7+7)%7,f=7-p,h=e<0||e>6?e-(o+f)%7:(c+f)%7-(o+f)%7;return df(g,h,t)}class fL extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}class pL 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,t,r,l){const d=u=>{const b=Math.floor((u-1)/7)*7;return(u+l.weekStartsOn+6)%7+b};switch(t){case"e":case"ee":return Bn(Tn(t.length,e),d);case"eo":return Bn(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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}class gL 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,t,r,l){const d=u=>{const b=Math.floor((u-1)/7)*7;return(u+l.weekStartsOn+6)%7+b};switch(t){case"c":case"cc":return Bn(Tn(t.length,e),d);case"co":return Bn(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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}function mL(n,e,t){const r=vn(n,void 0),l=UR(r),d=e-l;return df(r,d,t)}class vL 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,t,r){const l=d=>d===0?7:d;switch(t){case"i":case"ii":return Tn(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Bn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),l);case"iiiii":return Bn(r.day(e,{width:"narrow",context:"formatting"}),l);case"iiiiii":return Bn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),l);case"iiii":default:return Bn(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"}),l)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=mL(e,r),e.setHours(0,0,0,0),e}}class yL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class bL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class wL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class xL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return Sn(Pn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const l=e.getHours()>=12;return l&&r<12?e.setHours(r+12,0,0,0):!l&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class kL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return Sn(Pn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class SL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return Sn(Pn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class _L extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return Sn(Pn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const l=r<=24?r%24:r;return e.setHours(l,0,0,0),e}}class CL extends Gt{constructor(){super(...arguments),Ze(this,"priority",60),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return Sn(Pn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}class $L extends Gt{constructor(){super(...arguments),Ze(this,"priority",50),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return Sn(Pn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}}class AL extends Gt{constructor(){super(...arguments),Ze(this,"priority",30),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=l=>Math.trunc(l*Math.pow(10,-t.length+3));return Bn(Tn(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class EL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){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,t,r){return t.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class TL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){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,t,r){return t.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class ML extends Gt{constructor(){super(...arguments),Ze(this,"priority",40),Ze(this,"incompatibleTokens","*")}parse(e){return dw(e)}set(e,t,r){return[Kn(e,r*1e3),{timestampIsSet:!0}]}}class RL extends Gt{constructor(){super(...arguments),Ze(this,"priority",20),Ze(this,"incompatibleTokens","*")}parse(e){return dw(e)}set(e,t,r){return[Kn(e,r),{timestampIsSet:!0}]}}const LL={G:new XR,y:new QR,Y:new ZR,R:new JR,u:new eL,Q:new tL,q:new nL,M:new rL,L:new iL,w:new sL,I:new lL,d:new hL,D:new dL,E:new fL,e:new pL,c:new gL,i:new vL,a:new yL,b:new bL,B:new wL,h:new xL,H:new kL,K:new SL,k:new _L,m:new CL,s:new $L,S:new AL,X:new EL,x:new TL,t:new ML,T:new RL},OL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NL=/^'([^]*?)'?$/,DL=/''/g,FL=/\S/,PL=/[a-zA-Z]/;function BL(n,e,t,r){var l,d,u,b;const p=()=>Kn(t,NaN),g=Vb(),o=g.locale??mg,c=g.firstWeekContainsDate??((d=(l=g.locale)==null?void 0:l.options)==null?void 0:d.firstWeekContainsDate)??1,f=g.weekStartsOn??((b=(u=g.locale)==null?void 0:u.options)==null?void 0:b.weekStartsOn)??0;if(!e)return n?p():vn(t,void 0);const h={firstWeekContainsDate:c,weekStartsOn:f,locale:o},i=[new YR(void 0,t)],a=e.match(IL).map($=>{const S=$[0];if(S in ph){const k=ph[S];return k($,o.formatLong)}return $}).join("").match(OL),m=[];for(let $ of a){Cg($)&&gh($,e,n),_g($)&&gh($,e,n);const S=$[0],k=LL[S];if(k){const{incompatibleTokens:L}=k;if(Array.isArray(L)){const R=m.find(O=>L.includes(O.token)||O.token===S);if(R)throw new RangeError(`The format string mustn't contain \`${R.fullToken}\` and \`${$}\` at the same time`)}else if(k.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);m.push({token:S,fullToken:$});const N=k.run(n,$,o.match,h);if(!N)return p();i.push(N.setter),n=N.rest}else{if(S.match(PL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if($==="''"?$="'":S==="'"&&($=jL($)),n.indexOf($)===0)n=n.slice($.length);else return p()}}if(n.length>0&&FL.test(n))return p();const w=i.map($=>$.priority).sort(($,S)=>S-$).filter(($,S,k)=>k.indexOf($)===S).map($=>i.filter(S=>S.priority===$).sort((S,k)=>k.subPriority-S.subPriority)).map($=>$[0]);let x=vn(t,void 0);if(isNaN(+x))return p();const T={};for(const $ of w){if(!$.validate(x,h))return p();const S=$.set(x,T,h);Array.isArray(S)?(x=S[0],Object.assign(T,S[1])):x=S}return x}function jL(n){return n.match(NL)[1].replace(DL,"'")}function mw(n,e){return function(){return n.apply(e,arguments)}}const{toString:WL}=Object.prototype,{getPrototypeOf:gf}=Object,{iterator:ru,toStringTag:vw}=Symbol,iu=(n=>e=>{const t=WL.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ki=n=>(n=n.toLowerCase(),e=>iu(e)===n),ou=n=>e=>typeof e===n,{isArray:Ma}=Array,Ra=ou("undefined");function Cl(n){return n!==null&&!Ra(n)&&n.constructor!==null&&!Ra(n.constructor)&&Jr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const yw=Ki("ArrayBuffer");function zL(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&yw(n.buffer),e}const HL=ou("string"),Jr=ou("function"),bw=ou("number"),$l=n=>n!==null&&typeof n=="object",UL=n=>n===!0||n===!1,su=n=>{if(iu(n)!=="object")return!1;const e=gf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(vw in n)&&!(ru in n)},qL=n=>{if(!$l(n)||Cl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},VL=Ki("Date"),KL=Ki("File"),GL=Ki("Blob"),YL=Ki("FileList"),XL=n=>$l(n)&&Jr(n.pipe),QL=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Jr(n.append)&&((e=iu(n))==="formdata"||e==="object"&&Jr(n.toString)&&n.toString()==="[object FormData]"))},ZL=Ki("URLSearchParams"),[JL,eO,tO,nO]=["ReadableStream","Request","Response","Headers"].map(Ki),rO=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Al(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),Ma(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(Cl(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function ww(n,e){if(Cl(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xw=n=>!Ra(n)&&n!==Bs;function mf(){const{caseless:n,skipUndefined:e}=xw(this)&&this||{},t={},r=(l,d)=>{const u=n&&ww(t,d)||d;su(t[u])&&su(l)?t[u]=mf(t[u],l):su(l)?t[u]=mf({},l):Ma(l)?t[u]=l.slice():(!e||!Ra(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&Al(arguments[l],r);return t}const iO=(n,e,t,{allOwnKeys:r}={})=>(Al(e,(l,d)=>{t&&Jr(l)?n[d]=mw(l,t):n[d]=l},{allOwnKeys:r}),n),oO=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),sO=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},aO=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&gf(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},lO=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},cO=n=>{if(!n)return null;if(Ma(n))return n;let e=n.length;if(!bw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},uO=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&gf(Uint8Array)),hO=(n,e)=>{const r=(n&&n[ru]).call(n);let l;for(;(l=r.next())&&!l.done;){const d=l.value;e.call(n,d[0],d[1])}},dO=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},fO=Ki("HTMLFormElement"),pO=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,l){return r.toUpperCase()+l}),kw=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),gO=Ki("RegExp"),Sw=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Al(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},mO=n=>{Sw(n,(e,t)=>{if(Jr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},vO=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return Ma(n)?r(n):r(String(n).split(e)),t},yO=()=>{},bO=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function wO(n){return!!(n&&Jr(n.append)&&n[vw]==="FormData"&&n[ru])}const xO=n=>{const e=new Array(10),t=(r,l)=>{if($l(r)){if(e.indexOf(r)>=0)return;if(Cl(r))return r;if(!("toJSON"in r)){e[l]=r;const d=Ma(r)?[]:{};return Al(r,(u,b)=>{const p=t(u,l+1);!Ra(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},kO=Ki("AsyncFunction"),SO=n=>n&&($l(n)||Jr(n))&&Jr(n.then)&&Jr(n.catch),_w=((n,e)=>n?setImmediate:e?((t,r)=>(Bs.addEventListener("message",({source:l,data:d})=>{l===Bs&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),Bs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Jr(Bs.postMessage)),_O=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||_w,$e={isArray:Ma,isArrayBuffer:yw,isBuffer:Cl,isFormData:QL,isArrayBufferView:zL,isString:HL,isNumber:bw,isBoolean:UL,isObject:$l,isPlainObject:su,isEmptyObject:qL,isReadableStream:JL,isRequest:eO,isResponse:tO,isHeaders:nO,isUndefined:Ra,isDate:VL,isFile:KL,isBlob:GL,isRegExp:gO,isFunction:Jr,isStream:XL,isURLSearchParams:ZL,isTypedArray:uO,isFileList:YL,forEach:Al,merge:mf,extend:iO,trim:rO,stripBOM:oO,inherits:sO,toFlatObject:aO,kindOf:iu,kindOfTest:Ki,endsWith:lO,toArray:cO,forEachEntry:hO,matchAll:dO,isHTMLForm:fO,hasOwnProperty:kw,hasOwnProp:kw,reduceDescriptors:Sw,freezeMethods:mO,toObjectSet:vO,toCamelCase:pO,noop:yO,toFiniteNumber:bO,findKey:ww,global:Bs,isContextDefined:xw,isSpecCompliantForm:wO,toJSONObject:xO,isAsyncFn:kO,isThenable:SO,setImmediate:_w,asap:_O,isIterable:n=>n!=null&&Jr(n[ru])};function Ct(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}$e.inherits(Ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const Cw=Ct.prototype,$w={};["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(n=>{$w[n]={value:n}}),Object.defineProperties(Ct,$w),Object.defineProperty(Cw,"isAxiosError",{value:!0}),Ct.from=(n,e,t,r,l,d)=>{const u=Object.create(Cw);$e.toFlatObject(n,u,function(o){return o!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return Ct.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const CO=null;function vf(n){return $e.isPlainObject(n)||$e.isArray(n)}function Aw(n){return $e.endsWith(n,"[]")?n.slice(0,-2):n}function Ew(n,e,t){return n?n.concat(e).map(function(l,d){return l=Aw(l),!t&&d?"["+l+"]":l}).join(t?".":""):e}function $O(n){return $e.isArray(n)&&!n.some(vf)}const AO=$e.toFlatObject($e,{},null,function(e){return/^is[A-Z]/.test(e)});function au(n,e,t){if(!$e.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=$e.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,m){return!$e.isUndefined(m[a])});const r=t.metaTokens,l=t.visitor||o,d=t.dots,u=t.indexes,p=(t.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(l))throw new TypeError("visitor must be a function");function g(i){if(i===null)return"";if($e.isDate(i))return i.toISOString();if($e.isBoolean(i))return i.toString();if(!p&&$e.isBlob(i))throw new Ct("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(i)||$e.isTypedArray(i)?p&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function o(i,a,m){let w=i;if(i&&!m&&typeof i=="object"){if($e.endsWith(a,"{}"))a=r?a:a.slice(0,-2),i=JSON.stringify(i);else if($e.isArray(i)&&$O(i)||($e.isFileList(i)||$e.endsWith(a,"[]"))&&(w=$e.toArray(i)))return a=Aw(a),w.forEach(function(T,$){!($e.isUndefined(T)||T===null)&&e.append(u===!0?Ew([a],$,d):u===null?a:a+"[]",g(T))}),!1}return vf(i)?!0:(e.append(Ew(m,a,d),g(i)),!1)}const c=[],f=Object.assign(AO,{defaultVisitor:o,convertValue:g,isVisitable:vf});function h(i,a){if(!$e.isUndefined(i)){if(c.indexOf(i)!==-1)throw Error("Circular reference detected in "+a.join("."));c.push(i),$e.forEach(i,function(w,x){(!($e.isUndefined(w)||w===null)&&l.call(e,w,$e.isString(x)?x.trim():x,a,f))===!0&&h(w,a?a.concat(x):[x])}),c.pop()}}if(!$e.isObject(n))throw new TypeError("data must be an object");return h(n),e}function Tw(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function yf(n,e){this._pairs=[],n&&au(n,this,e)}const Mw=yf.prototype;Mw.append=function(e,t){this._pairs.push([e,t])},Mw.toString=function(e){const t=e?function(r){return e.call(this,r,Tw)}:Tw;return this._pairs.map(function(l){return t(l[0])+"="+t(l[1])},"").join("&")};function EO(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rw(n,e,t){if(!e)return n;const r=t&&t.encode||EO;$e.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=$e.isURLSearchParams(e)?e.toString():new yf(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class Lw{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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 Ow={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TO={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:yf,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window<"u"&&typeof document<"u",wf=typeof navigator=="object"&&navigator||void 0,MO=bf&&(!wf||["ReactNative","NativeScript","NS"].indexOf(wf.product)<0),RO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LO=bf&&window.location.href||"http://localhost",$r={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:MO,hasStandardBrowserWebWorkerEnv:RO,navigator:wf,origin:LO},Symbol.toStringTag,{value:"Module"})),...TO};function OO(n,e){return au(n,new $r.classes.URLSearchParams,{visitor:function(t,r,l,d){return $r.isNode&&$e.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function IO(n){return $e.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function NO(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function Iw(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&$e.isArray(l)?l.length:u,p?($e.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!$e.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&$e.isArray(l[u])&&(l[u]=NO(l[u])),!b)}if($e.isFormData(n)&&$e.isFunction(n.entries)){const t={};return $e.forEachEntry(n,(r,l)=>{e(IO(r),l,t,0)}),t}return null}function DO(n,e,t){if($e.isString(n))try{return(e||JSON.parse)(n),$e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const El={transitional:Ow,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",l=r.indexOf("application/json")>-1,d=$e.isObject(e);if(d&&$e.isHTMLForm(e)&&(e=new FormData(e)),$e.isFormData(e))return l?JSON.stringify(Iw(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 t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let b;if(d){if(r.indexOf("application/x-www-form-urlencoded")>-1)return OO(e,this.formSerializer).toString();if((b=$e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return au(b?{"files[]":e}:e,p&&new p,this.formSerializer)}}return d||l?(t.setContentType("application/json",!1),DO(e)):e}],transformResponse:[function(e){const t=this.transitional||El.transitional,r=t&&t.forcedJSONParsing,l=this.responseType==="json";if($e.isResponse(e)||$e.isReadableStream(e))return e;if(e&&$e.isString(e)&&(r&&!this.responseType||l)){const u=!(t&&t.silentJSONParsing)&&l;try{return JSON.parse(e,this.parseReviver)}catch(b){if(u)throw b.name==="SyntaxError"?Ct.from(b,Ct.ERR_BAD_RESPONSE,this,null,this.response):b}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.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"],n=>{El.headers[n]={}});const FO=$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"]),PO=n=>{const e={};let t,r,l;return n&&n.split(`
1501
+ `+d):r.stack=d}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Fs(this.defaults,t);const{transitional:r,paramsSerializer:l,headers:d}=t;r!==void 0&&Qc.assertOptions(r,{silentJSONParsing:co.transitional(co.boolean),forcedJSONParsing:co.transitional(co.boolean),clarifyTimeoutError:co.transitional(co.boolean)},!1),l!=null&&(Ce.isFunction(l)?t.paramsSerializer={serialize:l}:Qc.assertOptions(l,{encode:co.function,serialize:co.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Qc.assertOptions(t,{baseUrl:co.spelling("baseURL"),withXsrfToken:co.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=d&&Ce.merge(d.common,d[t.method]);d&&Ce.forEach(["delete","get","head","post","put","patch","common"],i=>{delete d[i]}),t.headers=Zr.concat(u,d);const b=[];let p=!0;this.interceptors.request.forEach(function(i){typeof i.runWhen=="function"&&i.runWhen(t)===!1||(p=p&&i.synchronous,b.unshift(i.fulfilled,i.rejected))});const g=[];this.interceptors.response.forEach(function(i){g.push(i.fulfilled,i.rejected)});let o,c=0,f;if(!p){const i=[zb.bind(this),void 0];for(i.unshift(...b),i.push(...g),f=i.length,o=Promise.resolve(t);c<f;)o=o.then(i[c++],i[c++]);return o}f=b.length;let h=t;for(;c<f;){const i=b[c++],a=b[c++];try{h=i(h)}catch(m){a.call(this,m);break}}try{o=zb.call(this,h)}catch(i){return Promise.reject(i)}for(c=0,f=g.length;c<f;)o=o.then(g[c++],g[c++]);return o}getUri(e){e=Fs(this.defaults,e);const t=Rb(e.baseURL,e.url,e.allowAbsoluteUrls);return kb(t,e.params,e.paramsSerializer)}};Ce.forEach(["delete","get","head","options"],function(n){Ps.prototype[n]=function(e,t){return this.request(Fs(t||{},{method:n,url:e,data:(t||{}).data}))}}),Ce.forEach(["post","put","patch"],function(n){function e(t){return function(r,l,d){return this.request(Fs(d||{},{method:n,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:l}))}}Ps.prototype[n]=e(),Ps.prototype[n+"Form"]=e(!0)});let KM=class Kx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(l){t=l});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(l,d,u){r.reason||(r.reason=new Ea(l,d,u),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Kx(function(t){e=t}),cancel:e}}};function GM(n){return function(e){return n.apply(null,e)}}function YM(n){return Ce.isObject(n)&&n.isAxiosError===!0}const nf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(nf).forEach(([n,e])=>{nf[e]=n});function qb(n){const e=new Ps(n),t=ab(Ps.prototype.request,e);return Ce.extend(t,Ps.prototype,e,{allOwnKeys:!0}),Ce.extend(t,e,null,{allOwnKeys:!0}),t.create=function(r){return qb(Fs(n,r))},t}const Yn=Si("w",qb(kl));Yn.Axios=Ps,Yn.CanceledError=Ea,Yn.CancelToken=KM,Yn.isCancel=Ab,Yn.VERSION=Hb,Yn.toFormData=Vc,Yn.AxiosError=_t,Yn.Cancel=Yn.CanceledError,Yn.all=function(n){return Promise.all(n)},Yn.spread=GM,Yn.isAxiosError=YM,Yn.mergeConfig=Fs,Yn.AxiosHeaders=Zr,Yn.formToJSON=n=>Cb(Ce.isHTMLForm(n)?new FormData(n):n),Yn.getAdapter=Wb.getAdapter,Yn.HttpStatusCode=nf,Yn.default=Yn;const{Axios:uj,AxiosError:hj,CanceledError:dj,isCancel:fj,CancelToken:pj,VERSION:gj,all:mj,Cancel:vj,isAxiosError:yj,spread:bj,toFormData:wj,AxiosHeaders:xj,HttpStatusCode:kj,formToJSON:Sj,getAdapter:_j,mergeConfig:Cj}=Yn;function Vb(){return Object.assign({},ca())}function XM(n,e,t){const r=vn(n,void 0);return r.setTime(r.getTime()+e*sc),r}function QM(n,e){const t=()=>Kn(void 0,NaN),r=tR(n);let l;if(r.date){const p=nR(r.date,2);l=rR(p.restDateString,p.year)}if(!l||isNaN(+l))return t();const d=+l;let u=0,b;if(r.time&&(u=iR(r.time),isNaN(u)))return t();if(r.timezone){if(b=oR(r.timezone),isNaN(b))return t()}else{const p=new Date(d+u),g=vn(0,void 0);return g.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),g.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),g}return vn(d+u+b,void 0)}const Zc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ZM=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,JM=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,eR=/^([+-])(\d{2})(?::?(\d{2}))?$/;function tR(n){const e={},t=n.split(Zc.dateTimeDelimiter);let r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],Zc.timeZoneDelimiter.test(e.date)&&(e.date=n.split(Zc.timeZoneDelimiter)[0],r=n.substr(e.date.length,n.length))),r){const l=Zc.timezone.exec(r);l?(e.time=r.replace(l[1],""),e.timezone=l[1]):e.time=r}return e}function nR(n,e){const t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=n.match(t);if(!r)return{year:NaN,restDateString:""};const l=r[1]?parseInt(r[1]):null,d=r[2]?parseInt(r[2]):null;return{year:d===null?l:d*100,restDateString:n.slice((r[1]||r[2]).length)}}function rR(n,e){if(e===null)return new Date(NaN);const t=n.match(ZM);if(!t)return new Date(NaN);const r=!!t[4],l=_l(t[1]),d=_l(t[2])-1,u=_l(t[3]),b=_l(t[4]),p=_l(t[5])-1;if(r)return uR(e,b,p)?sR(e,b,p):new Date(NaN);{const g=new Date(0);return!lR(e,d,u)||!cR(e,l)?new Date(NaN):(g.setUTCFullYear(e,d,Math.max(l,u)),g)}}function _l(n){return n?parseInt(n):1}function iR(n){const e=n.match(JM);if(!e)return NaN;const t=rf(e[1]),r=rf(e[2]),l=rf(e[3]);return hR(t,r,l)?t*hh+r*sc+l*1e3:NaN}function rf(n){return n&&parseFloat(n.replace(",","."))||0}function oR(n){if(n==="Z")return 0;const e=n.match(eR);if(!e)return 0;const t=e[1]==="+"?-1:1,r=parseInt(e[2]),l=e[3]&&parseInt(e[3])||0;return dR(r,l)?t*(r*hh+l*sc):NaN}function sR(n,e,t){const r=new Date(0);r.setUTCFullYear(n,0,4);const l=r.getUTCDay()||7,d=(e-1)*7+t+1-l;return r.setUTCDate(r.getUTCDate()+d),r}const aR=[31,null,31,30,31,30,31,31,30,31,30,31];function Kb(n){return n%400===0||n%4===0&&n%100!==0}function lR(n,e,t){return e>=0&&e<=11&&t>=1&&t<=(aR[e]||(Kb(n)?29:28))}function cR(n,e){return e>=1&&e<=(Kb(n)?366:365)}function uR(n,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function hR(n,e,t){return n===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&n>=0&&n<25}function dR(n,e){return e>=0&&e<=59}function fR(n,e,t){return XM(n,-e)}function Gb(n,e,t){const r=Vb(),l=mR(n,t.timeZone,t.locale??r.locale);return"formatToParts"in l?pR(l,e):gR(l,e)}function pR(n,e){const t=n.formatToParts(e);for(let r=t.length-1;r>=0;--r)if(t[r].type==="timeZoneName")return t[r].value}function gR(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(t);return r?r[0].substr(1):""}function mR(n,e,t){return new Intl.DateTimeFormat(t?[t.code,"en-US"]:void 0,{timeZone:e,timeZoneName:n})}function vR(n,e){const t=kR(e);return"formatToParts"in t?bR(t,n):wR(t,n)}const yR={year:0,month:1,day:2,hour:3,minute:4,second:5};function bR(n,e){try{const t=n.formatToParts(e),r=[];for(let l=0;l<t.length;l++){const d=yR[t[l].type];d!==void 0&&(r[d]=parseInt(t[l].value,10))}return r}catch(t){if(t instanceof RangeError)return[NaN];throw t}}function wR(n,e){const t=n.format(e),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);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 of={},Yb=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")),xR=Yb==="06/25/2014, 00:00:00"||Yb==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function kR(n){return of[n]||(of[n]=xR?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),of[n]}function Xb(n,e,t,r,l,d,u){const b=new Date(0);return b.setUTCFullYear(n,e,t),b.setUTCHours(r,l,d,u),b}const Qb=36e5,SR=6e4,sf={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function af(n,e,t){if(!n)return 0;let r=sf.timezoneZ.exec(n);if(r)return 0;let l,d;if(r=sf.timezoneHH.exec(n),r)return l=parseInt(r[1],10),Zb(l)?-(l*Qb):NaN;if(r=sf.timezoneHHMM.exec(n),r){l=parseInt(r[2],10);const u=parseInt(r[3],10);return Zb(l,u)?(d=Math.abs(l)*Qb+u*SR,r[1]==="+"?-d:d):NaN}if($R(n)){e=new Date(e||Date.now());const u=t?e:_R(e),b=lf(u,n);return-(t?b:CR(e,b,n))}return NaN}function _R(n){return Xb(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function lf(n,e){const t=vR(n,e),r=Xb(t[0],t[1]-1,t[2],t[3]%24,t[4],t[5],0).getTime();let l=n.getTime();const d=l%1e3;return l-=d>=0?d:1e3+d,r-l}function CR(n,e,t){let r=n.getTime()-e;const l=lf(new Date(r),t);if(e===l)return e;r-=l-e;const d=lf(new Date(r),t);return l===d?l:Math.max(l,d)}function Zb(n,e){return-23<=n&&n<=23&&(e==null||0<=e&&e<=59)}const Jb={};function $R(n){if(Jb[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Jb[n]=!0,!0}catch{return!1}}const AR=60*1e3,ER={X:function(n,e,t){const r=cf(t.timeZone,n);if(r===0)return"Z";switch(e){case"X":return ew(r);case"XXXX":case"XX":return Ta(r);case"XXXXX":case"XXX":default:return Ta(r,":")}},x:function(n,e,t){const r=cf(t.timeZone,n);switch(e){case"x":return ew(r);case"xxxx":case"xx":return Ta(r);case"xxxxx":case"xxx":default:return Ta(r,":")}},O:function(n,e,t){const r=cf(t.timeZone,n);switch(e){case"O":case"OO":case"OOO":return"GMT"+TR(r,":");case"OOOO":default:return"GMT"+Ta(r,":")}},z:function(n,e,t){switch(e){case"z":case"zz":case"zzz":return Gb("short",n,t);case"zzzz":default:return Gb("long",n,t)}}};function cf(n,e){const t=n?af(n,e,!0)/AR:(e==null?void 0:e.getTimezoneOffset())??0;if(Number.isNaN(t))throw new RangeError("Invalid time zone specified: "+n);return t}function Jc(n,e){const t=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<e;)r="0"+r;return t+r}function Ta(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),l=Jc(Math.floor(r/60),2),d=Jc(Math.floor(r%60),2);return t+l+e+d}function ew(n,e){return n%60===0?(n>0?"-":"+")+Jc(Math.abs(n)/60,2):Ta(n,e)}function TR(n,e=""){const t=n>0?"-":"+",r=Math.abs(n),l=Math.floor(r/60),d=r%60;return d===0?t+String(l):t+String(l)+e+Jc(d,2)}function tw(n){const e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+n-+e}const MR=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,uf=36e5,nw=6e4,RR=2,Fr={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:MR};function rw(n,e={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const t=e.additionalDigits==null?RR:Number(e.additionalDigits);if(t!==2&&t!==1&&t!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=LR(n),{year:l,restDateString:d}=OR(r.date,t),u=IR(d,l);if(u===null||isNaN(u.getTime()))return new Date(NaN);if(u){const b=u.getTime();let p=0,g;if(r.time&&(p=NR(r.time),p===null||isNaN(p)))return new Date(NaN);if(r.timeZone||e.timeZone){if(g=af(r.timeZone||e.timeZone,new Date(b+p)),isNaN(g))return new Date(NaN)}else g=tw(new Date(b+p)),g=tw(new Date(b+p+g));return new Date(b+p+g)}else return new Date(NaN)}function LR(n){const e={};let t=Fr.dateTimePattern.exec(n),r;if(t?(e.date=t[1],r=t[3]):(t=Fr.datePattern.exec(n),t?(e.date=t[1],r=t[2]):(e.date=null,r=n)),r){const l=Fr.timeZone.exec(r);l?(e.time=r.replace(l[1],""),e.timeZone=l[1].trim()):e.time=r}return e}function OR(n,e){if(n){const t=Fr.YYY[e],r=Fr.YYYYY[e];let l=Fr.YYYY.exec(n)||r.exec(n);if(l){const d=l[1];return{year:parseInt(d,10),restDateString:n.slice(d.length)}}if(l=Fr.YY.exec(n)||t.exec(n),l){const d=l[1];return{year:parseInt(d,10)*100,restDateString:n.slice(d.length)}}}return{year:null}}function IR(n,e){if(e===null)return null;let t,r,l;if(!n||!n.length)return t=new Date(0),t.setUTCFullYear(e),t;let d=Fr.MM.exec(n);if(d)return t=new Date(0),r=parseInt(d[1],10)-1,sw(e,r)?(t.setUTCFullYear(e,r),t):new Date(NaN);if(d=Fr.DDD.exec(n),d){t=new Date(0);const u=parseInt(d[1],10);return PR(e,u)?(t.setUTCFullYear(e,0,u),t):new Date(NaN)}if(d=Fr.MMDD.exec(n),d){t=new Date(0),r=parseInt(d[1],10)-1;const u=parseInt(d[2],10);return sw(e,r,u)?(t.setUTCFullYear(e,r,u),t):new Date(NaN)}if(d=Fr.Www.exec(n),d)return l=parseInt(d[1],10)-1,aw(l)?iw(e,l):new Date(NaN);if(d=Fr.WwwD.exec(n),d){l=parseInt(d[1],10)-1;const u=parseInt(d[2],10)-1;return aw(l,u)?iw(e,l,u):new Date(NaN)}return null}function NR(n){let e,t,r=Fr.HH.exec(n);if(r)return e=parseFloat(r[1].replace(",",".")),hf(e)?e%24*uf:NaN;if(r=Fr.HHMM.exec(n),r)return e=parseInt(r[1],10),t=parseFloat(r[2].replace(",",".")),hf(e,t)?e%24*uf+t*nw:NaN;if(r=Fr.HHMMSS.exec(n),r){e=parseInt(r[1],10),t=parseInt(r[2],10);const l=parseFloat(r[3].replace(",","."));return hf(e,t,l)?e%24*uf+t*nw+l*1e3:NaN}return null}function iw(n,e,t){e=e||0,t=t||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const l=r.getUTCDay()||7,d=e*7+t+1-l;return r.setUTCDate(r.getUTCDate()+d),r}const DR=[31,28,31,30,31,30,31,31,30,31,30,31],FR=[31,29,31,30,31,30,31,31,30,31,30,31];function ow(n){return n%400===0||n%4===0&&n%100!==0}function sw(n,e,t){if(e<0||e>11)return!1;if(t!=null){if(t<1)return!1;const r=ow(n);if(r&&t>FR[e]||!r&&t>DR[e])return!1}return!0}function PR(n,e){if(e<1)return!1;const t=ow(n);return!(t&&e>366||!t&&e>365)}function aw(n,e){return!(n<0||n>52||e!=null&&(e<0||e>6))}function hf(n,e,t){return!(n<0||n>=25||e!=null&&(e<0||e>=60)||t!=null&&(t<0||t>=60))}const BR=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function jR(n,e,t={}){e=String(e);const r=e.match(BR);if(r){const l=rw(t.originalDate||n,t);e=r.reduce(function(d,u){if(u[0]==="'")return d;const b=d.indexOf(u),p=d[b-1]==="'",g=d.replace(u,"'"+ER[u[0]](l,u,t)+"'");return p?g.substring(0,b-1)+g.substring(b+1):g},e)}return _s(n,e,t)}function WR(n,e,t){n=rw(n,t);const r=af(e,n,!0),l=new Date(n.getTime()-r),d=new Date(0);return d.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),d.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),d}function eu(n,e,t,r){return r={...r,timeZone:e,originalDate:n},jR(WR(n,e,{timeZone:r.timeZone}),t,r)}const tu="yyyy-MM-dd",lw="HH:mm:ss.SSS",cw="HH:mm:ss",nu=`${tu} ${lw}`,uw=`${tu} ${cw}`,$j=Si("R",{methods:{parseDateTime(n,e){return n.includes(" ")&&(n=n.replace(" ","T")),e&&e==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,e){return _s(!e||e==="local"?fR(n,n.getTimezoneOffset()):n,nu)},formatDateTime(n,e){return!e||e==="local"?_s(n,nu):eu(n,e,nu)},formatDateTimeHMS(n,e){return!e||e==="local"?_s(n,uw):eu(n,e,uw)},formatDate:function(n,e){return!e||e==="local"?_s(n,tu):eu(n,this.timeZone,tu)},formatTime:function(n,e,t=lw){return!e||e==="local"?_s(n,t):eu(n,this.timeZone,t)},formatTimeHMS:function(n,e){return this.formatTime(n,e,cw)},formatTimestamp(n,e){return this.formatDateTime(QM(n),e)},formatSeconds(n,e){return this.formatDateTime(new Date(n*1e3),e)},formatNanoseconds(n,e){return this.formatDateTime(new Date(parseInt(n)/1e6),e)}}});var zR=Object.defineProperty,HR=(n,e,t)=>e in n?zR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ze=(n,e,t)=>HR(n,typeof e!="symbol"?e+"":e,t);function df(n,e,t){const r=vn(n,t==null?void 0:t.in);return isNaN(e)?Kn((t==null?void 0:t.in)||n,NaN):(e&&r.setDate(r.getDate()+e),r)}function UR(n,e){const t=vn(n,void 0).getDay();return t===0?7:t}function qR(n,e){const t=VR(e)?new e(0):Kn(e,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),t}function VR(n){var e;return typeof n=="function"&&((e=n.prototype)==null?void 0:e.constructor)===n}const KR=10;class hw{constructor(){Ze(this,"subPriority",0)}validate(e,t){return!0}}class GR extends hw{constructor(e,t,r,l,d){super(),this.value=e,this.validateValue=t,this.setValue=r,this.priority=l,d&&(this.subPriority=d)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,r){return this.setValue(e,t,this.value,r)}}class YR extends hw{constructor(e,t){super(),Ze(this,"priority",KR),Ze(this,"subPriority",-1),this.context=e||(r=>Kn(t,r))}set(e,t){return t.timestampIsSet?e:Kn(e,qR(e,this.context))}}class Gt{run(e,t,r,l){const d=this.parse(e,t,r,l);return d?{setter:new GR(d.value,this.validate,this.set,this.priority,this.subPriority),rest:d.rest}:null}validate(e,t,r){return!0}}class XR extends Gt{constructor(){super(...arguments),Ze(this,"priority",140),Ze(this,"incompatibleTokens",["R","u","t","T"])}parse(e,t,r){switch(t){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,t,r){return t.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}const Pn={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 Bn(n,e){return n&&{value:e(n.value),rest:n.rest}}function Sn(n,e){const t=e.match(n);return t?{value:parseInt(t[0],10),rest:e.slice(t[0].length)}:null}function ho(n,e){const t=e.match(n);if(!t)return null;if(t[0]==="Z")return{value:0,rest:e.slice(1)};const r=t[1]==="+"?1:-1,l=t[2]?parseInt(t[2],10):0,d=t[3]?parseInt(t[3],10):0,u=t[5]?parseInt(t[5],10):0;return{value:r*(l*hh+d*sc+u*Mk),rest:e.slice(t[0].length)}}function dw(n){return Sn(Pn.anyDigitsSigned,n)}function Tn(n,e){switch(n){case 1:return Sn(Pn.singleDigit,e);case 2:return Sn(Pn.twoDigits,e);case 3:return Sn(Pn.threeDigits,e);case 4:return Sn(Pn.fourDigits,e);default:return Sn(new RegExp("^\\d{1,"+n+"}"),e)}}function fw(n,e){switch(n){case 1:return Sn(Pn.singleDigitSigned,e);case 2:return Sn(Pn.twoDigitsSigned,e);case 3:return Sn(Pn.threeDigitsSigned,e);case 4:return Sn(Pn.fourDigitsSigned,e);default:return Sn(new RegExp("^-?\\d{1,"+n+"}"),e)}}function ff(n){switch(n){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 pw(n,e){const t=e>0,r=t?e:1-e;let l;if(r<=50)l=n||100;else{const d=r+50,u=Math.trunc(d/100)*100,b=n>=d%100;l=n+u-(b?100:0)}return t?l:1-l}function gw(n){return n%400===0||n%4===0&&n%100!==0}class QR extends Gt{constructor(){super(...arguments),Ze(this,"priority",130),Ze(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,t,r){const l=d=>({year:d,isTwoDigitYear:t==="yy"});switch(t){case"y":return Bn(Tn(4,e),l);case"yo":return Bn(r.ordinalNumber(e,{unit:"year"}),l);default:return Bn(Tn(t.length,e),l)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r){const l=e.getFullYear();if(r.isTwoDigitYear){const u=pw(r.year,l);return e.setFullYear(u,0,1),e.setHours(0,0,0,0),e}const d=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(d,0,1),e.setHours(0,0,0,0),e}}class ZR 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,t,r){const l=d=>({year:d,isTwoDigitYear:t==="YY"});switch(t){case"Y":return Bn(Tn(4,e),l);case"Yo":return Bn(r.ordinalNumber(e,{unit:"year"}),l);default:return Bn(Tn(t.length,e),l)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,r,l){const d=fh(e,l);if(r.isTwoDigitYear){const b=pw(r.year,d);return e.setFullYear(b,0,l.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,l)}const u=!("era"in t)||t.era===1?r.year:1-r.year;return e.setFullYear(u,0,l.firstWeekContainsDate),e.setHours(0,0,0,0),Xo(e,l)}}class JR 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,t){return fw(t==="R"?4:t.length,e)}set(e,t,r){const l=Kn(e,0);return l.setFullYear(r,0,4),l.setHours(0,0,0,0),ua(l)}}class eL 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,t){return fw(t==="u"?4:t.length,e)}set(e,t,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}}class tL 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,t,r){switch(t){case"Q":case"QQ":return Tn(t.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,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class nL 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,t,r){switch(t){case"q":case"qq":return Tn(t.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,t){return t>=1&&t<=4}set(e,t,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}}class rL 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,t,r){const l=d=>d-1;switch(t){case"M":return Bn(Sn(Pn.month,e),l);case"MM":return Bn(Tn(2,e),l);case"Mo":return Bn(r.ordinalNumber(e,{unit:"month"}),l);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,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class iL 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,t,r){const l=d=>d-1;switch(t){case"L":return Bn(Sn(Pn.month,e),l);case"LL":return Bn(Tn(2,e),l);case"Lo":return Bn(r.ordinalNumber(e,{unit:"month"}),l);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,t){return t>=0&&t<=11}set(e,t,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}function oL(n,e,t){const r=vn(n,t==null?void 0:t.in),l=yg(r,t)-e;return r.setDate(r.getDate()-l*7),vn(r,t==null?void 0:t.in)}class sL 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,t,r){switch(t){case"w":return Sn(Pn.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r,l){return Xo(oL(e,r,l),l)}}function aL(n,e,t){const r=vn(n,void 0),l=vg(r)-e;return r.setDate(r.getDate()-l*7),r}class lL 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,t,r){switch(t){case"I":return Sn(Pn.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,r){return ua(aL(e,r))}}const cL=[31,28,31,30,31,30,31,31,30,31,30,31],uL=[31,29,31,30,31,30,31,31,30,31,30,31];class hL 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,t,r){switch(t){case"d":return Sn(Pn.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return Tn(t.length,e)}}validate(e,t){const r=e.getFullYear(),l=gw(r),d=e.getMonth();return l?t>=1&&t<=uL[d]:t>=1&&t<=cL[d]}set(e,t,r){return e.setDate(r),e.setHours(0,0,0,0),e}}class dL 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,t,r){switch(t){case"D":case"DD":return Sn(Pn.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return Tn(t.length,e)}}validate(e,t){const r=e.getFullYear();return gw(r)?t>=1&&t<=366:t>=1&&t<=365}set(e,t,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}}function pf(n,e,t){var r,l,d,u;const b=ca(),p=(t==null?void 0:t.weekStartsOn)??((l=(r=t==null?void 0:t.locale)==null?void 0:r.options)==null?void 0:l.weekStartsOn)??b.weekStartsOn??((u=(d=b.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,g=vn(n,t==null?void 0:t.in),o=g.getDay(),c=(e%7+7)%7,f=7-p,h=e<0||e>6?e-(o+f)%7:(c+f)%7-(o+f)%7;return df(g,h,t)}class fL extends Gt{constructor(){super(...arguments),Ze(this,"priority",90),Ze(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,t,r){switch(t){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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}class pL 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,t,r,l){const d=u=>{const b=Math.floor((u-1)/7)*7;return(u+l.weekStartsOn+6)%7+b};switch(t){case"e":case"ee":return Bn(Tn(t.length,e),d);case"eo":return Bn(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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}class gL 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,t,r,l){const d=u=>{const b=Math.floor((u-1)/7)*7;return(u+l.weekStartsOn+6)%7+b};switch(t){case"c":case"cc":return Bn(Tn(t.length,e),d);case"co":return Bn(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,t){return t>=0&&t<=6}set(e,t,r,l){return e=pf(e,r,l),e.setHours(0,0,0,0),e}}function mL(n,e,t){const r=vn(n,void 0),l=UR(r),d=e-l;return df(r,d,t)}class vL 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,t,r){const l=d=>d===0?7:d;switch(t){case"i":case"ii":return Tn(t.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return Bn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),l);case"iiiii":return Bn(r.day(e,{width:"narrow",context:"formatting"}),l);case"iiiiii":return Bn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),l);case"iiii":default:return Bn(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"}),l)}}validate(e,t){return t>=1&&t<=7}set(e,t,r){return e=mL(e,r),e.setHours(0,0,0,0),e}}class yL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class bL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class wL extends Gt{constructor(){super(...arguments),Ze(this,"priority",80),Ze(this,"incompatibleTokens",["a","b","t","T"])}parse(e,t,r){switch(t){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,t,r){return e.setHours(ff(r),0,0,0),e}}class xL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,t,r){switch(t){case"h":return Sn(Pn.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,r){const l=e.getHours()>=12;return l&&r<12?e.setHours(r+12,0,0,0):!l&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}}class kL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,t,r){switch(t){case"H":return Sn(Pn.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,r){return e.setHours(r,0,0,0),e}}class SL extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,t,r){switch(t){case"K":return Sn(Pn.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}}class _L extends Gt{constructor(){super(...arguments),Ze(this,"priority",70),Ze(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,t,r){switch(t){case"k":return Sn(Pn.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return Tn(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,r){const l=r<=24?r%24:r;return e.setHours(l,0,0,0),e}}class CL extends Gt{constructor(){super(...arguments),Ze(this,"priority",60),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"m":return Sn(Pn.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setMinutes(r,0,0),e}}class $L extends Gt{constructor(){super(...arguments),Ze(this,"priority",50),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t,r){switch(t){case"s":return Sn(Pn.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return Tn(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,r){return e.setSeconds(r,0),e}}class AL extends Gt{constructor(){super(...arguments),Ze(this,"priority",30),Ze(this,"incompatibleTokens",["t","T"])}parse(e,t){const r=l=>Math.trunc(l*Math.pow(10,-t.length+3));return Bn(Tn(t.length,e),r)}set(e,t,r){return e.setMilliseconds(r),e}}class EL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","x"])}parse(e,t){switch(t){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,t,r){return t.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class TL extends Gt{constructor(){super(...arguments),Ze(this,"priority",10),Ze(this,"incompatibleTokens",["t","T","X"])}parse(e,t){switch(t){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,t,r){return t.timestampIsSet?e:Kn(e,e.getTime()-ac(e)-r)}}class ML extends Gt{constructor(){super(...arguments),Ze(this,"priority",40),Ze(this,"incompatibleTokens","*")}parse(e){return dw(e)}set(e,t,r){return[Kn(e,r*1e3),{timestampIsSet:!0}]}}class RL extends Gt{constructor(){super(...arguments),Ze(this,"priority",20),Ze(this,"incompatibleTokens","*")}parse(e){return dw(e)}set(e,t,r){return[Kn(e,r),{timestampIsSet:!0}]}}const LL={G:new XR,y:new QR,Y:new ZR,R:new JR,u:new eL,Q:new tL,q:new nL,M:new rL,L:new iL,w:new sL,I:new lL,d:new hL,D:new dL,E:new fL,e:new pL,c:new gL,i:new vL,a:new yL,b:new bL,B:new wL,h:new xL,H:new kL,K:new SL,k:new _L,m:new CL,s:new $L,S:new AL,X:new EL,x:new TL,t:new ML,T:new RL},OL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,NL=/^'([^]*?)'?$/,DL=/''/g,FL=/\S/,PL=/[a-zA-Z]/;function BL(n,e,t,r){var l,d,u,b;const p=()=>Kn(t,NaN),g=Vb(),o=g.locale??mg,c=g.firstWeekContainsDate??((d=(l=g.locale)==null?void 0:l.options)==null?void 0:d.firstWeekContainsDate)??1,f=g.weekStartsOn??((b=(u=g.locale)==null?void 0:u.options)==null?void 0:b.weekStartsOn)??0;if(!e)return n?p():vn(t,void 0);const h={firstWeekContainsDate:c,weekStartsOn:f,locale:o},i=[new YR(void 0,t)],a=e.match(IL).map($=>{const S=$[0];if(S in ph){const k=ph[S];return k($,o.formatLong)}return $}).join("").match(OL),m=[];for(let $ of a){Cg($)&&gh($,e,n),_g($)&&gh($,e,n);const S=$[0],k=LL[S];if(k){const{incompatibleTokens:L}=k;if(Array.isArray(L)){const R=m.find(O=>L.includes(O.token)||O.token===S);if(R)throw new RangeError(`The format string mustn't contain \`${R.fullToken}\` and \`${$}\` at the same time`)}else if(k.incompatibleTokens==="*"&&m.length>0)throw new RangeError(`The format string mustn't contain \`${$}\` and any other token at the same time`);m.push({token:S,fullToken:$});const N=k.run(n,$,o.match,h);if(!N)return p();i.push(N.setter),n=N.rest}else{if(S.match(PL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if($==="''"?$="'":S==="'"&&($=jL($)),n.indexOf($)===0)n=n.slice($.length);else return p()}}if(n.length>0&&FL.test(n))return p();const w=i.map($=>$.priority).sort(($,S)=>S-$).filter(($,S,k)=>k.indexOf($)===S).map($=>i.filter(S=>S.priority===$).sort((S,k)=>k.subPriority-S.subPriority)).map($=>$[0]);let x=vn(t,void 0);if(isNaN(+x))return p();const T={};for(const $ of w){if(!$.validate(x,h))return p();const S=$.set(x,T,h);Array.isArray(S)?(x=S[0],Object.assign(T,S[1])):x=S}return x}function jL(n){return n.match(NL)[1].replace(DL,"'")}function mw(n,e){return function(){return n.apply(e,arguments)}}const{toString:WL}=Object.prototype,{getPrototypeOf:gf}=Object,{iterator:ru,toStringTag:vw}=Symbol,iu=(n=>e=>{const t=WL.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ki=n=>(n=n.toLowerCase(),e=>iu(e)===n),ou=n=>e=>typeof e===n,{isArray:Ma}=Array,Ra=ou("undefined");function Cl(n){return n!==null&&!Ra(n)&&n.constructor!==null&&!Ra(n.constructor)&&Jr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const yw=Ki("ArrayBuffer");function zL(n){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(n):e=n&&n.buffer&&yw(n.buffer),e}const HL=ou("string"),Jr=ou("function"),bw=ou("number"),$l=n=>n!==null&&typeof n=="object",UL=n=>n===!0||n===!1,su=n=>{if(iu(n)!=="object")return!1;const e=gf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(vw in n)&&!(ru in n)},qL=n=>{if(!$l(n)||Cl(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},VL=Ki("Date"),KL=Ki("File"),GL=Ki("Blob"),YL=Ki("FileList"),XL=n=>$l(n)&&Jr(n.pipe),QL=n=>{let e;return n&&(typeof FormData=="function"&&n instanceof FormData||Jr(n.append)&&((e=iu(n))==="formdata"||e==="object"&&Jr(n.toString)&&n.toString()==="[object FormData]"))},ZL=Ki("URLSearchParams"),[JL,eO,tO,nO]=["ReadableStream","Request","Response","Headers"].map(Ki),rO=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Al(n,e,{allOwnKeys:t=!1}={}){if(n===null||typeof n>"u")return;let r,l;if(typeof n!="object"&&(n=[n]),Ma(n))for(r=0,l=n.length;r<l;r++)e.call(null,n[r],r,n);else{if(Cl(n))return;const d=t?Object.getOwnPropertyNames(n):Object.keys(n),u=d.length;let b;for(r=0;r<u;r++)b=d[r],e.call(null,n[b],b,n)}}function ww(n,e){if(Cl(n))return null;e=e.toLowerCase();const t=Object.keys(n);let r=t.length,l;for(;r-- >0;)if(l=t[r],e===l.toLowerCase())return l;return null}const Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xw=n=>!Ra(n)&&n!==Bs;function mf(){const{caseless:n,skipUndefined:e}=xw(this)&&this||{},t={},r=(l,d)=>{const u=n&&ww(t,d)||d;su(t[u])&&su(l)?t[u]=mf(t[u],l):su(l)?t[u]=mf({},l):Ma(l)?t[u]=l.slice():(!e||!Ra(l))&&(t[u]=l)};for(let l=0,d=arguments.length;l<d;l++)arguments[l]&&Al(arguments[l],r);return t}const iO=(n,e,t,{allOwnKeys:r}={})=>(Al(e,(l,d)=>{t&&Jr(l)?n[d]=mw(l,t):n[d]=l},{allOwnKeys:r}),n),oO=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),sO=(n,e,t,r)=>{n.prototype=Object.create(e.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:e.prototype}),t&&Object.assign(n.prototype,t)},aO=(n,e,t,r)=>{let l,d,u;const b={};if(e=e||{},n==null)return e;do{for(l=Object.getOwnPropertyNames(n),d=l.length;d-- >0;)u=l[d],(!r||r(u,n,e))&&!b[u]&&(e[u]=n[u],b[u]=!0);n=t!==!1&&gf(n)}while(n&&(!t||t(n,e))&&n!==Object.prototype);return e},lO=(n,e,t)=>{n=String(n),(t===void 0||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return r!==-1&&r===t},cO=n=>{if(!n)return null;if(Ma(n))return n;let e=n.length;if(!bw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=n[e];return t},uO=(n=>e=>n&&e instanceof n)(typeof Uint8Array<"u"&&gf(Uint8Array)),hO=(n,e)=>{const r=(n&&n[ru]).call(n);let l;for(;(l=r.next())&&!l.done;){const d=l.value;e.call(n,d[0],d[1])}},dO=(n,e)=>{let t;const r=[];for(;(t=n.exec(e))!==null;)r.push(t);return r},fO=Ki("HTMLFormElement"),pO=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,l){return r.toUpperCase()+l}),kw=(({hasOwnProperty:n})=>(e,t)=>n.call(e,t))(Object.prototype),gO=Ki("RegExp"),Sw=(n,e)=>{const t=Object.getOwnPropertyDescriptors(n),r={};Al(t,(l,d)=>{let u;(u=e(l,d,n))!==!1&&(r[d]=u||l)}),Object.defineProperties(n,r)},mO=n=>{Sw(n,(e,t)=>{if(Jr(n)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const r=n[t];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 '"+t+"'")})}})},vO=(n,e)=>{const t={},r=l=>{l.forEach(d=>{t[d]=!0})};return Ma(n)?r(n):r(String(n).split(e)),t},yO=()=>{},bO=(n,e)=>n!=null&&Number.isFinite(n=+n)?n:e;function wO(n){return!!(n&&Jr(n.append)&&n[vw]==="FormData"&&n[ru])}const xO=n=>{const e=new Array(10),t=(r,l)=>{if($l(r)){if(e.indexOf(r)>=0)return;if(Cl(r))return r;if(!("toJSON"in r)){e[l]=r;const d=Ma(r)?[]:{};return Al(r,(u,b)=>{const p=t(u,l+1);!Ra(p)&&(d[b]=p)}),e[l]=void 0,d}}return r};return t(n,0)},kO=Ki("AsyncFunction"),SO=n=>n&&($l(n)||Jr(n))&&Jr(n.then)&&Jr(n.catch),_w=((n,e)=>n?setImmediate:e?((t,r)=>(Bs.addEventListener("message",({source:l,data:d})=>{l===Bs&&d===t&&r.length&&r.shift()()},!1),l=>{r.push(l),Bs.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Jr(Bs.postMessage)),_O=typeof queueMicrotask<"u"?queueMicrotask.bind(Bs):typeof process<"u"&&process.nextTick||_w,$e={isArray:Ma,isArrayBuffer:yw,isBuffer:Cl,isFormData:QL,isArrayBufferView:zL,isString:HL,isNumber:bw,isBoolean:UL,isObject:$l,isPlainObject:su,isEmptyObject:qL,isReadableStream:JL,isRequest:eO,isResponse:tO,isHeaders:nO,isUndefined:Ra,isDate:VL,isFile:KL,isBlob:GL,isRegExp:gO,isFunction:Jr,isStream:XL,isURLSearchParams:ZL,isTypedArray:uO,isFileList:YL,forEach:Al,merge:mf,extend:iO,trim:rO,stripBOM:oO,inherits:sO,toFlatObject:aO,kindOf:iu,kindOfTest:Ki,endsWith:lO,toArray:cO,forEachEntry:hO,matchAll:dO,isHTMLForm:fO,hasOwnProperty:kw,hasOwnProp:kw,reduceDescriptors:Sw,freezeMethods:mO,toObjectSet:vO,toCamelCase:pO,noop:yO,toFiniteNumber:bO,findKey:ww,global:Bs,isContextDefined:xw,isSpecCompliantForm:wO,toJSONObject:xO,isAsyncFn:kO,isThenable:SO,setImmediate:_w,asap:_O,isIterable:n=>n!=null&&Jr(n[ru])};function Ct(n,e,t,r,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),l&&(this.response=l,this.status=l.status?l.status:null)}$e.inherits(Ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const Cw=Ct.prototype,$w={};["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(n=>{$w[n]={value:n}}),Object.defineProperties(Ct,$w),Object.defineProperty(Cw,"isAxiosError",{value:!0}),Ct.from=(n,e,t,r,l,d)=>{const u=Object.create(Cw);$e.toFlatObject(n,u,function(o){return o!==Error.prototype},g=>g!=="isAxiosError");const b=n&&n.message?n.message:"Error",p=e==null&&n?n.code:e;return Ct.call(u,b,p,t,r,l),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",d&&Object.assign(u,d),u};const CO=null;function vf(n){return $e.isPlainObject(n)||$e.isArray(n)}function Aw(n){return $e.endsWith(n,"[]")?n.slice(0,-2):n}function Ew(n,e,t){return n?n.concat(e).map(function(l,d){return l=Aw(l),!t&&d?"["+l+"]":l}).join(t?".":""):e}function $O(n){return $e.isArray(n)&&!n.some(vf)}const AO=$e.toFlatObject($e,{},null,function(e){return/^is[A-Z]/.test(e)});function au(n,e,t){if(!$e.isObject(n))throw new TypeError("target must be an object");e=e||new FormData,t=$e.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(a,m){return!$e.isUndefined(m[a])});const r=t.metaTokens,l=t.visitor||o,d=t.dots,u=t.indexes,p=(t.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(l))throw new TypeError("visitor must be a function");function g(i){if(i===null)return"";if($e.isDate(i))return i.toISOString();if($e.isBoolean(i))return i.toString();if(!p&&$e.isBlob(i))throw new Ct("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(i)||$e.isTypedArray(i)?p&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function o(i,a,m){let w=i;if(i&&!m&&typeof i=="object"){if($e.endsWith(a,"{}"))a=r?a:a.slice(0,-2),i=JSON.stringify(i);else if($e.isArray(i)&&$O(i)||($e.isFileList(i)||$e.endsWith(a,"[]"))&&(w=$e.toArray(i)))return a=Aw(a),w.forEach(function(T,$){!($e.isUndefined(T)||T===null)&&e.append(u===!0?Ew([a],$,d):u===null?a:a+"[]",g(T))}),!1}return vf(i)?!0:(e.append(Ew(m,a,d),g(i)),!1)}const c=[],f=Object.assign(AO,{defaultVisitor:o,convertValue:g,isVisitable:vf});function h(i,a){if(!$e.isUndefined(i)){if(c.indexOf(i)!==-1)throw Error("Circular reference detected in "+a.join("."));c.push(i),$e.forEach(i,function(w,x){(!($e.isUndefined(w)||w===null)&&l.call(e,w,$e.isString(x)?x.trim():x,a,f))===!0&&h(w,a?a.concat(x):[x])}),c.pop()}}if(!$e.isObject(n))throw new TypeError("data must be an object");return h(n),e}function Tw(n){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function yf(n,e){this._pairs=[],n&&au(n,this,e)}const Mw=yf.prototype;Mw.append=function(e,t){this._pairs.push([e,t])},Mw.toString=function(e){const t=e?function(r){return e.call(this,r,Tw)}:Tw;return this._pairs.map(function(l){return t(l[0])+"="+t(l[1])},"").join("&")};function EO(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rw(n,e,t){if(!e)return n;const r=t&&t.encode||EO;$e.isFunction(t)&&(t={serialize:t});const l=t&&t.serialize;let d;if(l?d=l(e,t):d=$e.isURLSearchParams(e)?e.toString():new yf(e,t).toString(r),d){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class Lw{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,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 Ow={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},TO={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:yf,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window<"u"&&typeof document<"u",wf=typeof navigator=="object"&&navigator||void 0,MO=bf&&(!wf||["ReactNative","NativeScript","NS"].indexOf(wf.product)<0),RO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",LO=bf&&window.location.href||"http://localhost",$r={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:MO,hasStandardBrowserWebWorkerEnv:RO,navigator:wf,origin:LO},Symbol.toStringTag,{value:"Module"})),...TO};function OO(n,e){return au(n,new $r.classes.URLSearchParams,{visitor:function(t,r,l,d){return $r.isNode&&$e.isBuffer(t)?(this.append(r,t.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)},...e})}function IO(n){return $e.matchAll(/\w+|\[(\w*)]/g,n).map(e=>e[0]==="[]"?"":e[1]||e[0])}function NO(n){const e={},t=Object.keys(n);let r;const l=t.length;let d;for(r=0;r<l;r++)d=t[r],e[d]=n[d];return e}function Iw(n){function e(t,r,l,d){let u=t[d++];if(u==="__proto__")return!0;const b=Number.isFinite(+u),p=d>=t.length;return u=!u&&$e.isArray(l)?l.length:u,p?($e.hasOwnProp(l,u)?l[u]=[l[u],r]:l[u]=r,!b):((!l[u]||!$e.isObject(l[u]))&&(l[u]=[]),e(t,r,l[u],d)&&$e.isArray(l[u])&&(l[u]=NO(l[u])),!b)}if($e.isFormData(n)&&$e.isFunction(n.entries)){const t={};return $e.forEachEntry(n,(r,l)=>{e(IO(r),l,t,0)}),t}return null}function DO(n,e,t){if($e.isString(n))try{return(e||JSON.parse)(n),$e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(n)}const El={transitional:Ow,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",l=r.indexOf("application/json")>-1,d=$e.isObject(e);if(d&&$e.isHTMLForm(e)&&(e=new FormData(e)),$e.isFormData(e))return l?JSON.stringify(Iw(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 t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let b;if(d){if(r.indexOf("application/x-www-form-urlencoded")>-1)return OO(e,this.formSerializer).toString();if((b=$e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return au(b?{"files[]":e}:e,p&&new p,this.formSerializer)}}return d||l?(t.setContentType("application/json",!1),DO(e)):e}],transformResponse:[function(e){const t=this.transitional||El.transitional,r=t&&t.forcedJSONParsing,l=this.responseType==="json";if($e.isResponse(e)||$e.isReadableStream(e))return e;if(e&&$e.isString(e)&&(r&&!this.responseType||l)){const u=!(t&&t.silentJSONParsing)&&l;try{return JSON.parse(e,this.parseReviver)}catch(b){if(u)throw b.name==="SyntaxError"?Ct.from(b,Ct.ERR_BAD_RESPONSE,this,null,this.response):b}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$r.classes.FormData,Blob:$r.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"],n=>{El.headers[n]={}});const FO=$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"]),PO=n=>{const e={};let t,r,l;return n&&n.split(`
1502
1502
  `).forEach(function(u){l=u.indexOf(":"),t=u.substring(0,l).trim().toLowerCase(),r=u.substring(l+1).trim(),!(!t||e[t]&&FO[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)}),e},Nw=Symbol("internals");function Tl(n){return n&&String(n).trim().toLowerCase()}function lu(n){return n===!1||n==null?n:$e.isArray(n)?n.map(lu):String(n)}function BO(n){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=t.exec(n);)e[r[1]]=r[2];return e}const jO=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function xf(n,e,t,r,l){if($e.isFunction(r))return r.call(this,e,t);if(l&&(e=t),!!$e.isString(e)){if($e.isString(r))return e.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(e)}}function WO(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function zO(n,e){const t=$e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+t,{value:function(l,d,u){return this[r].call(this,e,l,d,u)},configurable:!0})})}let ei=class{constructor(e){e&&this.set(e)}set(e,t,r){const l=this;function d(b,p,g){const o=Tl(p);if(!o)throw new Error("header name must be a non-empty string");const c=$e.findKey(l,o);(!c||l[c]===void 0||g===!0||g===void 0&&l[c]!==!1)&&(l[c||p]=lu(b))}const u=(b,p)=>$e.forEach(b,(g,o)=>d(g,o,p));if($e.isPlainObject(e)||e instanceof this.constructor)u(e,t);else if($e.isString(e)&&(e=e.trim())&&!jO(e))u(PO(e),t);else if($e.isObject(e)&&$e.isIterable(e)){let b={},p,g;for(const o of e){if(!$e.isArray(o))throw TypeError("Object iterator must return a key-value pair");b[g=o[0]]=(p=b[g])?$e.isArray(p)?[...p,o[1]]:[p,o[1]]:o[1]}u(b,t)}else e!=null&&d(t,e,r);return this}get(e,t){if(e=Tl(e),e){const r=$e.findKey(this,e);if(r){const l=this[r];if(!t)return l;if(t===!0)return BO(l);if($e.isFunction(t))return t.call(this,l,r);if($e.isRegExp(t))return t.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Tl(e),e){const r=$e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||xf(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let l=!1;function d(u){if(u=Tl(u),u){const b=$e.findKey(r,u);b&&(!t||xf(r,r[b],b,t))&&(delete r[b],l=!0)}}return $e.isArray(e)?e.forEach(d):d(e),l}clear(e){const t=Object.keys(this);let r=t.length,l=!1;for(;r--;){const d=t[r];(!e||xf(this,this[d],d,e,!0))&&(delete this[d],l=!0)}return l}normalize(e){const t=this,r={};return $e.forEach(this,(l,d)=>{const u=$e.findKey(r,d);if(u){t[u]=lu(l),delete t[d];return}const b=e?WO(d):String(d).trim();b!==d&&delete t[d],t[b]=lu(l),r[b]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return $e.forEach(this,(r,l)=>{r!=null&&r!==!1&&(t[l]=e&&$e.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
1503
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,...t){const r=new this(e);return t.forEach(l=>r.set(l)),r}static accessor(e){const r=(this[Nw]=this[Nw]={accessors:{}}).accessors,l=this.prototype;function d(u){const b=Tl(u);r[b]||(zO(l,u),r[b]=!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:n},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(r){this[t]=r}}}),$e.freezeMethods(ei);function kf(n,e){const t=this||El,r=e||t,l=ei.from(r.headers);let d=r.data;return $e.forEach(n,function(b){d=b.call(t,d,l.normalize(),e?e.status:void 0)}),l.normalize(),d}function Dw(n){return!!(n&&n.__CANCEL__)}function La(n,e,t){Ct.call(this,n??"canceled",Ct.ERR_CANCELED,e,t),this.name="CanceledError"}$e.inherits(La,Ct,{__CANCEL__:!0});function Fw(n,e,t){const r=t.config.validateStatus;!t.status||!r||r(t.status)?n(t):e(new Ct("Request failed with status code "+t.status,[Ct.ERR_BAD_REQUEST,Ct.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function HO(n){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}function UO(n,e){n=n||10;const t=new Array(n),r=new Array(n);let l=0,d=0,u;return e=e!==void 0?e:1e3,function(p){const g=Date.now(),o=r[d];u||(u=g),t[l]=p,r[l]=g;let c=d,f=0;for(;c!==l;)f+=t[c++],c=c%n;if(l=(l+1)%n,l===d&&(d=(d+1)%n),g-u<e)return;const h=o&&g-o;return h?Math.round(f*1e3/h):void 0}}function qO(n,e){let t=0,r=1e3/e,l,d;const u=(g,o=Date.now())=>{t=o,l=null,d&&(clearTimeout(d),d=null),n(...g)};return[(...g)=>{const o=Date.now(),c=o-t;c>=r?u(g,o):(l=g,d||(d=setTimeout(()=>{d=null,u(l)},r-c)))},()=>l&&u(l)]}const cu=(n,e,t=3)=>{let r=0;const l=UO(50,250);return qO(d=>{const u=d.loaded,b=d.lengthComputable?d.total:void 0,p=u-r,g=l(p),o=u<=b;r=u;const c={loaded:u,total:b,progress:b?u/b:void 0,bytes:p,rate:g||void 0,estimated:g&&b&&o?(b-u)/g:void 0,event:d,lengthComputable:b!=null,[e?"download":"upload"]:!0};n(c)},t)},Pw=(n,e)=>{const t=n!=null;return[r=>e[0]({lengthComputable:t,total:n,loaded:r}),e[1]]},Bw=n=>(...e)=>$e.asap(()=>n(...e)),VO=$r.hasStandardBrowserEnv?((n,e)=>t=>(t=new URL(t,$r.origin),n.protocol===t.protocol&&n.host===t.host&&(e||n.port===t.port)))(new URL($r.origin),$r.navigator&&/(msie|trident)/i.test($r.navigator.userAgent)):()=>!0,KO=$r.hasStandardBrowserEnv?{write(n,e,t,r,l,d,u){if(typeof document>"u")return;const b=[`${n}=${encodeURIComponent(e)}`];$e.isNumber(t)&&b.push(`expires=${new Date(t).toUTCString()}`),$e.isString(r)&&b.push(`path=${r}`),$e.isString(l)&&b.push(`domain=${l}`),d===!0&&b.push("secure"),$e.isString(u)&&b.push(`SameSite=${u}`),document.cookie=b.join("; ")},read(n){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function GO(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function YO(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function jw(n,e,t){let r=!GO(e);return n&&(r||t==!1)?YO(n,e):e}const Ww=n=>n instanceof ei?{...n}:n;function js(n,e){e=e||{};const t={};function r(g,o,c,f){return $e.isPlainObject(g)&&$e.isPlainObject(o)?$e.merge.call({caseless:f},g,o):$e.isPlainObject(o)?$e.merge({},o):$e.isArray(o)?o.slice():o}function l(g,o,c,f){if($e.isUndefined(o)){if(!$e.isUndefined(g))return r(void 0,g,c,f)}else return r(g,o,c,f)}function d(g,o){if(!$e.isUndefined(o))return r(void 0,o)}function u(g,o){if($e.isUndefined(o)){if(!$e.isUndefined(g))return r(void 0,g)}else return r(void 0,o)}function b(g,o,c){if(c in e)return r(g,o);if(c in n)return r(void 0,g)}const p={url:d,method:d,data:d,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:b,headers:(g,o,c)=>l(Ww(g),Ww(o),c,!0)};return $e.forEach(Object.keys({...n,...e}),function(o){const c=p[o]||l,f=c(n[o],e[o],o);$e.isUndefined(f)&&c!==b||(t[o]=f)}),t}const zw=n=>{const e=js({},n);let{data:t,withXSRFToken:r,xsrfHeaderName:l,xsrfCookieName:d,headers:u,auth:b}=e;if(e.headers=u=ei.from(u),e.url=Rw(jw(e.baseURL,e.url,e.allowAbsoluteUrls),n.params,n.paramsSerializer),b&&u.set("Authorization","Basic "+btoa((b.username||"")+":"+(b.password?unescape(encodeURIComponent(b.password)):""))),$e.isFormData(t)){if($r.hasStandardBrowserEnv||$r.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if($e.isFunction(t.getHeaders)){const p=t.getHeaders(),g=["content-type","content-length"];Object.entries(p).forEach(([o,c])=>{g.includes(o.toLowerCase())&&u.set(o,c)})}}if($r.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(e)),r||r!==!1&&VO(e.url))){const p=l&&d&&KO.read(d);p&&u.set(l,p)}return e},XO=typeof XMLHttpRequest<"u"&&function(n){return new Promise(function(t,r){const l=zw(n);let d=l.data;const u=ei.from(l.headers).normalize();let{responseType:b,onUploadProgress:p,onDownloadProgress:g}=l,o,c,f,h,i;function a(){h&&h(),i&&i(),l.cancelToken&&l.cancelToken.unsubscribe(o),l.signal&&l.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;m.open(l.method.toUpperCase(),l.url,!0),m.timeout=l.timeout;function w(){if(!m)return;const T=ei.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),S={data:!b||b==="text"||b==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:n,request:m};Fw(function(L){t(L),a()},function(L){r(L),a()},S),m=null}"onloadend"in m?m.onloadend=w:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(w)},m.onabort=function(){m&&(r(new Ct("Request aborted",Ct.ECONNABORTED,n,m)),m=null)},m.onerror=function($){const S=$&&$.message?$.message:"Network Error",k=new Ct(S,Ct.ERR_NETWORK,n,m);k.event=$||null,r(k),m=null},m.ontimeout=function(){let $=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const S=l.transitional||Ow;l.timeoutErrorMessage&&($=l.timeoutErrorMessage),r(new Ct($,S.clarifyTimeoutError?Ct.ETIMEDOUT:Ct.ECONNABORTED,n,m)),m=null},d===void 0&&u.setContentType(null),"setRequestHeader"in m&&$e.forEach(u.toJSON(),function($,S){m.setRequestHeader(S,$)}),$e.isUndefined(l.withCredentials)||(m.withCredentials=!!l.withCredentials),b&&b!=="json"&&(m.responseType=l.responseType),g&&([f,i]=cu(g,!0),m.addEventListener("progress",f)),p&&m.upload&&([c,h]=cu(p),m.upload.addEventListener("progress",c),m.upload.addEventListener("loadend",h)),(l.cancelToken||l.signal)&&(o=T=>{m&&(r(!T||T.type?new La(null,n,m):T),m.abort(),m=null)},l.cancelToken&&l.cancelToken.subscribe(o),l.signal&&(l.signal.aborted?o():l.signal.addEventListener("abort",o)));const x=HO(l.url);if(x&&$r.protocols.indexOf(x)===-1){r(new Ct("Unsupported protocol "+x+":",Ct.ERR_BAD_REQUEST,n));return}m.send(d||null)})},QO=(n,e)=>{const{length:t}=n=n?n.filter(Boolean):[];if(e||t){let r=new AbortController,l;const d=function(g){if(!l){l=!0,b();const o=g instanceof Error?g:this.reason;r.abort(o instanceof Ct?o:new La(o instanceof Error?o.message:o))}};let u=e&&setTimeout(()=>{u=null,d(new Ct(`timeout ${e} of ms exceeded`,Ct.ETIMEDOUT))},e);const b=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(g=>{g.unsubscribe?g.unsubscribe(d):g.removeEventListener("abort",d)}),n=null)};n.forEach(g=>g.addEventListener("abort",d));const{signal:p}=r;return p.unsubscribe=()=>$e.asap(b),p}},ZO=function*(n,e){let t=n.byteLength;if(t<e){yield n;return}let r=0,l;for(;r<t;)l=r+e,yield n.slice(r,l),r=l},JO=async function*(n,e){for await(const t of eI(n))yield*ZO(t,e)},eI=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const e=n.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Hw=(n,e,t,r)=>{const l=JO(n,e);let d=0,u,b=p=>{u||(u=!0,r&&r(p))};return new ReadableStream({async pull(p){try{const{done:g,value:o}=await l.next();if(g){b(),p.close();return}let c=o.byteLength;if(t){let f=d+=c;t(f)}p.enqueue(new Uint8Array(o))}catch(g){throw b(g),g}},cancel(p){return b(p),l.return()}},{highWaterMark:2})},Uw=64*1024,{isFunction:uu}=$e,tI=(({Request:n,Response:e})=>({Request:n,Response:e}))($e.global),{ReadableStream:qw,TextEncoder:Vw}=$e.global,Kw=(n,...e)=>{try{return!!n(...e)}catch{return!1}},nI=n=>{n=$e.merge.call({skipUndefined:!0},tI,n);const{fetch:e,Request:t,Response:r}=n,l=e?uu(e):typeof fetch=="function",d=uu(t),u=uu(r);if(!l)return!1;const b=l&&uu(qw),p=l&&(typeof Vw=="function"?(i=>a=>i.encode(a))(new Vw):async i=>new Uint8Array(await new t(i).arrayBuffer())),g=d&&b&&Kw(()=>{let i=!1;const a=new t($r.origin,{body:new qw,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!a}),o=u&&b&&Kw(()=>$e.isReadableStream(new r("").body)),c={stream:o&&(i=>i.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(i=>{!c[i]&&(c[i]=(a,m)=>{let w=a&&a[i];if(w)return w.call(a);throw new Ct(`Response type '${i}' is not supported`,Ct.ERR_NOT_SUPPORT,m)})});const f=async i=>{if(i==null)return 0;if($e.isBlob(i))return i.size;if($e.isSpecCompliantForm(i))return(await new t($r.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if($e.isArrayBufferView(i)||$e.isArrayBuffer(i))return i.byteLength;if($e.isURLSearchParams(i)&&(i=i+""),$e.isString(i))return(await p(i)).byteLength},h=async(i,a)=>{const m=$e.toFiniteNumber(i.getContentLength());return m??f(a)};return async i=>{let{url:a,method:m,data:w,signal:x,cancelToken:T,timeout:$,onDownloadProgress:S,onUploadProgress:k,responseType:L,headers:N,withCredentials:R="same-origin",fetchOptions:O}=zw(i),W=e||fetch;L=L?(L+"").toLowerCase():"text";let P=QO([x,T&&T.toAbortSignal()],$),D=null;const A=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let _;try{if(k&&g&&m!=="get"&&m!=="head"&&(_=await h(N,w))!==0){let J=new t(a,{method:"POST",body:w,duplex:"half"}),ae;if($e.isFormData(w)&&(ae=J.headers.get("content-type"))&&N.setContentType(ae),J.body){const[ne,se]=Pw(_,cu(Bw(k)));w=Hw(J.body,Uw,ne,se)}}$e.isString(R)||(R=R?"include":"omit");const I=d&&"credentials"in t.prototype,j={...O,signal:P,method:m.toUpperCase(),headers:N.normalize().toJSON(),body:w,duplex:"half",credentials:I?R:void 0};D=d&&new t(a,j);let U=await(d?W(D,O):W(a,j));const K=o&&(L==="stream"||L==="response");if(o&&(S||K&&A)){const J={};["status","statusText","headers"].forEach(ce=>{J[ce]=U[ce]});const ae=$e.toFiniteNumber(U.headers.get("content-length")),[ne,se]=S&&Pw(ae,cu(Bw(S),!0))||[];U=new r(Hw(U.body,Uw,ne,()=>{se&&se(),A&&A()}),J)}L=L||"text";let Z=await c[$e.findKey(c,L)||"text"](U,i);return!K&&A&&A(),await new Promise((J,ae)=>{Fw(J,ae,{data:Z,headers:ei.from(U.headers),status:U.status,statusText:U.statusText,config:i,request:D})})}catch(I){throw A&&A(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new Ct("Network Error",Ct.ERR_NETWORK,i,D),{cause:I.cause||I}):Ct.from(I,I&&I.code,i,D)}}},rI=new Map,Gw=n=>{let e=n&&n.env||{};const{fetch:t,Request:r,Response:l}=e,d=[r,l,t];let u=d.length,b=u,p,g,o=rI;for(;b--;)p=d[b],g=o.get(p),g===void 0&&o.set(p,g=b?new Map:nI(e)),o=g;return g};Gw();const Sf={http:CO,xhr:XO,fetch:{get:Gw}};$e.forEach(Sf,(n,e)=>{if(n){try{Object.defineProperty(n,"name",{value:e})}catch{}Object.defineProperty(n,"adapterName",{value:e})}});const Yw=n=>`- ${n}`,iI=n=>$e.isFunction(n)||n===null||n===!1;function oI(n,e){n=$e.isArray(n)?n:[n];const{length:t}=n;let r,l;const d={};for(let u=0;u<t;u++){r=n[u];let b;if(l=r,!iI(r)&&(l=Sf[(b=String(r)).toLowerCase()],l===void 0))throw new Ct(`Unknown adapter '${b}'`);if(l&&($e.isFunction(l)||(l=l.get(e))))break;d[b||"#"+u]=l}if(!l){const u=Object.entries(d).map(([p,g])=>`adapter ${p} `+(g===!1?"is not supported by the environment":"is not available in the build"));let b=t?u.length>1?`since :
1504
1504
  `+u.map(Yw).join(`
1505
1505
  `):" "+Yw(u[0]):"as no adapter specified";throw new Ct("There is no suitable adapter to dispatch the request "+b,"ERR_NOT_SUPPORT")}return l}const Xw={getAdapter:oI,adapters:Sf};function _f(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new La(null,n)}function Qw(n){return _f(n),n.headers=ei.from(n.headers),n.data=kf.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Xw.getAdapter(n.adapter||El.adapter,n)(n).then(function(r){return _f(n),r.data=kf.call(n,n.transformResponse,r),r.headers=ei.from(r.headers),r},function(r){return Dw(r)||(_f(n),r&&r.response&&(r.response.data=kf.call(n,n.transformResponse,r.response),r.response.headers=ei.from(r.response.headers))),Promise.reject(r)})}const Zw="1.13.2",hu={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{hu[n]=function(r){return typeof r===n||"a"+(e<1?"n ":" ")+n}});const Jw={};hu.transitional=function(e,t,r){function l(d,u){return"[Axios v"+Zw+"] Transitional option '"+d+"'"+u+(r?". "+r:"")}return(d,u,b)=>{if(e===!1)throw new Ct(l(u," has been removed"+(t?" in "+t:"")),Ct.ERR_DEPRECATED);return t&&!Jw[u]&&(Jw[u]=!0,console.warn(l(u," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(d,u,b):!0}},hu.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function sI(n,e,t){if(typeof n!="object")throw new Ct("options must be an object",Ct.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let l=r.length;for(;l-- >0;){const d=r[l],u=e[d];if(u){const b=n[d],p=b===void 0||u(b,d,n);if(p!==!0)throw new Ct("option "+d+" must be "+p,Ct.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new Ct("Unknown option "+d,Ct.ERR_BAD_OPTION)}}const du={assertOptions:sI,validators:hu},fo=du.validators;let Ws=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Lw,response:new Lw}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const d=l.stack?l.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,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=js(this.defaults,t);const{transitional:r,paramsSerializer:l,headers:d}=t;r!==void 0&&du.assertOptions(r,{silentJSONParsing:fo.transitional(fo.boolean),forcedJSONParsing:fo.transitional(fo.boolean),clarifyTimeoutError:fo.transitional(fo.boolean)},!1),l!=null&&($e.isFunction(l)?t.paramsSerializer={serialize:l}:du.assertOptions(l,{encode:fo.function,serialize:fo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),du.assertOptions(t,{baseUrl:fo.spelling("baseURL"),withXsrfToken:fo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=d&&$e.merge(d.common,d[t.method]);d&&$e.forEach(["delete","get","head","post","put","patch","common"],i=>{delete d[i]}),t.headers=ei.concat(u,d);const b=[];let p=!0;this.interceptors.request.forEach(function(a){typeof a.runWhen=="function"&&a.runWhen(t)===!1||(p=p&&a.synchronous,b.unshift(a.fulfilled,a.rejected))});const g=[];this.interceptors.response.forEach(function(a){g.push(a.fulfilled,a.rejected)});let o,c=0,f;if(!p){const i=[Qw.bind(this),void 0];for(i.unshift(...b),i.push(...g),f=i.length,o=Promise.resolve(t);c<f;)o=o.then(i[c++],i[c++]);return o}f=b.length;let h=t;for(;c<f;){const i=b[c++],a=b[c++];try{h=i(h)}catch(m){a.call(this,m);break}}try{o=Qw.call(this,h)}catch(i){return Promise.reject(i)}for(c=0,f=g.length;c<f;)o=o.then(g[c++],g[c++]);return o}getUri(e){e=js(this.defaults,e);const t=jw(e.baseURL,e.url,e.allowAbsoluteUrls);return Rw(t,e.params,e.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(t,r){return this.request(js(r||{},{method:e,url:t,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(e){function t(r){return function(d,u,b){return this.request(js(b||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:u}))}}Ws.prototype[e]=t(),Ws.prototype[e+"Form"]=t(!0)});let aI=class Gx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(d,u,b){r.reason||(r.reason=new La(d,u,b),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Gx(function(l){e=l}),cancel:e}}};function lI(n){return function(t){return n.apply(null,t)}}function cI(n){return $e.isObject(n)&&n.isAxiosError===!0}const Cf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cf).forEach(([n,e])=>{Cf[e]=n});function e0(n){const e=new Ws(n),t=mw(Ws.prototype.request,e);return $e.extend(t,Ws.prototype,e,{allOwnKeys:!0}),$e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(l){return e0(js(n,l))},t}const jn=e0(El);jn.Axios=Ws,jn.CanceledError=La,jn.CancelToken=aI,jn.isCancel=Dw,jn.VERSION=Zw,jn.toFormData=au,jn.AxiosError=Ct,jn.Cancel=jn.CanceledError,jn.all=function(e){return Promise.all(e)},jn.spread=lI,jn.isAxiosError=cI,jn.mergeConfig=js,jn.AxiosHeaders=ei,jn.formToJSON=n=>Iw($e.isHTMLForm(n)?new FormData(n):n),jn.getAdapter=Xw.getAdapter,jn.HttpStatusCode=Cf,jn.default=jn;const{Axios:Oj,AxiosError:Ij,CanceledError:Nj,isCancel:Dj,CancelToken:Fj,VERSION:Pj,all:Bj,Cancel:jj,isAxiosError:Wj,spread:zj,toFormData:Hj,AxiosHeaders:Uj,HttpStatusCode:qj,formToJSON:Vj,getAdapter:Kj,mergeConfig:Gj}=jn;function t0(n,e){const t=window.atob(n),r=new Uint8Array(t.length);for(let b=0;b<t.length;++b)r[b]=t.charCodeAt(b);const l=new Blob([r]),d=URL.createObjectURL(l),u=document.createElement("a");u.href=d,u.setAttribute("download",e),u.click()}const uI={components:{TopBar:wT,OutputDialog:gT},data(){const n="bucketExplorerRefreshInterval",e=Number.parseInt(localStorage.getItem(n))||60;return{title:"Bucket Explorer",search:"",root:"",mode:"bucket",buckets:[],volumes:[],uploadPathDialog:!1,optionsDialog:!1,refreshInterval:e,refreshIntervalKey:n,updater:null,updating:!1,path:"",file:null,files:[],selectedFiles:[],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 Gu(this.files.reduce((n,e)=>n+(e.size?e.size:0),0))},breadcrumbPath(){const n=this.path.split("/");return n.map((e,t)=>({name:e,path:n.slice(0,t+1).join("/")+"/"}))}},watch:{file:async function(){this.file!==null&&(this.uploadFilePath=`${this.path}${this.file.name}`,this.uploadPathDialog=!0)}},created(){var n;if(Yo.get("/openc3-api/storage/buckets").then(e=>{this.buckets=e.data}),Yo.get("/openc3-api/storage/volumes").then(e=>{this.volumes=e.data}),(n=this.$route.params.path)!=null&&n.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(n){if(["Rakefile","Dockerfile"].includes(n))return!0;let e=n.split(".").pop();return["txt","md","rb","py","pyi","cfg","html","js","json","info","vue","sh","bat","csv"].includes(e)},gotoPath(n){this.updating||(this.updating=!0,this.path=n,this.update())},update(){this.updating=!0,this.selectedFiles=[],this.$router.push({name:"Bucket Explorer",params:{path:`${this.root}/${this.path}`}}),this.updateFiles()},saveRefreshInterval(){this.refreshInterval?localStorage.setItem(this.refreshIntervalKey,this.refreshInterval):this.refreshInterval=Number.parseInt(localStorage.getItem(this.refreshIntervalKey))||60,this.optionsDialog=!1,this.changeUpdater()},cancelChangeRefreshInterval(){this.refreshInterval=Number.parseInt(localStorage.getItem(this.refreshIntervalKey))||60,this.optionsDialog=!1},changeUpdater(){this.clearUpdater(),this.updater=setInterval(()=>{this.root&&this.updateFiles()},this.refreshInterval*1e3)},clearUpdater(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},selectBucket(n){this.updating||(this.updating=!0,this.mode="bucket",this.root=n,this.path="",this.update())},selectVolume(n){this.updating||(this.updating=!0,this.mode="volume",this.root=n,this.path="",this.update())},backArrow(){if(this.path!==""&&!this.updating){this.updating=!0;let n=this.path.split("/");this.path=n.slice(0,n.length-2).join("/"),n.length>2&&(this.path+="/"),this.update()}},fileClick(n,{item:e}){e.icon==="mdi-folder"&&(this.updating||(this.updating=!0,this.root===""?this.root=e.name:this.path+=`${e.name}/`,this.update()))},viewFile(n){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),Yo.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(t=>{this.dialogName=n,this.dialogFilename=n,this.dialogContent=window.atob(t.data.contents),this.showDialog=!0})},downloadFile(n){let e=this.root.toUpperCase(),t="download";this.mode==="volume"&&(t="download_file",e=e.slice(1)),Yo.get(`/openc3-api/storage/${t}/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(r=>{if(this.mode==="bucket"){const l=document.createElement("a");l.href=r.data.url,l.setAttribute("download",n),l.click()}else t0(r.data.contents,n)}).catch(r=>{this.$notify.caution({title:`Unable to download file ${this.path}${n} from bucket ${this.root}`})})},async downloadMultipleFiles(){if(this.selectedFiles.length!==0)try{let n=this.root.toUpperCase();this.mode==="volume"&&(n=n.slice(1));const e=await Yo.post("/openc3-api/storage/download_multiple_files",{data:{[this.mode]:`OPENC3_${n}_${this.mode.toUpperCase()}`,path:this.path,files:this.selectedFiles}});t0(e.data.contents,e.data.filename),this.$notify.normal({title:`Successfully downloaded ${this.selectedFiles.length} file${this.selectedFiles.length>1?"s":""}`,severity:"success"})}catch(n){this.$notify.caution({title:`Failed to download files: ${n.message}`})}},clearSelection(){this.selectedFiles=[]},async uploadFile(){this.uploadPathDialog=!1,this.uploadFilePath.startsWith("/")&&(this.uploadFilePath=this.uploadFilePath.slice(1));const{data:n}=await Yo.get(`/openc3-api/storage/upload/${encodeURIComponent(this.uploadFilePath)}?bucket=OPENC3_${this.root.toUpperCase()}_BUCKET`);await jn({...n,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()},cancelFileUpload(){this.file=null,this.uploadPathDialog=!1},deleteFile(n){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),this.$dialog.confirm(`Are you sure you want to delete: ${n}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>Yo.delete(`/openc3-api/storage/delete/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`)).then(t=>{this.updateFiles()}).catch(t=>{})},updateFiles(){let n=this.root.toUpperCase();this.mode==="volume"&&(n=n.slice(1)),Yo.get(`/openc3-api/storage/files/OPENC3_${n}_${this.mode.toUpperCase()}/${this.path}`).then(e=>{this.files=e.data[0].map(t=>({name:t,icon:"mdi-folder"})),this.files=this.files.concat(e.data[1].map(t=>({name:t.name,icon:"mdi-file",size:t.size,modified:t.modified}))),this.updating=!1}).catch(({response:e})=>{var t;this.files=[],(t=e.data)!=null&&t.message?this.$notify.caution({title:e.data.message}):this.$notify.caution({title:e.message}),this.updating=!1})},formatBytesToString:Gu}},hI={style:{"padding-left":"5px","padding-top":"5px"}},dI={key:0,style:{"padding-left":"5px"}},fI={class:".text-body-1 ma-2 font-size","data-test":"file-path"},pI=["onClick"],gI={class:"ma-2 font-size"},mI={key:0,class:"ma-2",style:{display:"flex"}},vI={class:"mx-1"},yI={class:"pa-3"};function bI(n,e,t,r,l,d){const u=Tt("top-bar"),b=Tt("v-icon"),p=Tt("v-avatar"),g=Tt("v-chip"),o=Tt("v-spacer"),c=Tt("v-btn"),f=Tt("v-text-field"),h=Tt("v-card-title"),i=Tt("v-checkbox-btn"),a=Tt("v-file-input"),m=Tt("v-row"),w=Tt("v-data-table"),x=Tt("v-card"),T=Tt("v-toolbar"),$=Tt("v-card-text"),S=Tt("v-dialog"),k=Tt("v-card-actions"),L=Tt("output-dialog");return Dt(),Vr("div",null,[et(u,{title:l.title,menus:l.menus},null,8,["title","menus"]),et(x,{width:"100%"},{default:Je(()=>[cr("div",hI,[e[12]||(e[12]=cr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(Dt(!0),Vr(So,null,Ko(l.buckets,(N,R)=>(Dt(),xn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:Go(O=>d.selectBucket(N),["stop"])},{default:Je(()=>[et(p,{start:""},{default:Je(()=>[et(b,null,{default:Je(()=>[...e[11]||(e[11]=[kn("mdi-bucket",-1)])]),_:1})]),_:1}),kn(" "+xr(N),1)]),_:2},1032,["onClick"]))),128))]),l.volumes.length!==0?(Dt(),Vr("div",dI,[e[14]||(e[14]=cr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(Dt(!0),Vr(So,null,Ko(l.volumes,(N,R)=>(Dt(),xn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:Go(O=>d.selectVolume(N),["stop"])},{default:Je(()=>[et(p,{start:""},{default:Je(()=>[et(b,null,{default:Je(()=>[...e[13]||(e[13]=[kn("mdi-folder",-1)])]),_:1})]),_:1}),kn(" "+xr(N),1)]),_:2},1032,["onClick"]))),128))])):Si("",!0),et(h,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:Je(()=>[kn(xr(l.root)+" Files ",1),et(o),l.selectedFiles.length>0?(Dt(),xn(c,{key:0,color:"primary",variant:"elevated","prepend-icon":"mdi-download-multiple",class:"mr-2","data-test":"download-selected",onClick:d.downloadMultipleFiles},{default:Je(()=>[kn(" Download "+xr(l.selectedFiles.length)+" Selected ",1)]),_:1},8,["onClick"])):Si("",!0),et(f,{modelValue:l.search,"onUpdate:modelValue":e[0]||(e[0]=N=>l.search=N),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}),et(w,{"sort-by":l.sortBy,"onUpdate:sortBy":e[3]||(e[3]=N=>l.sortBy=N),modelValue:l.selectedFiles,"onUpdate:modelValue":e[4]||(e[4]=N=>l.selectedFiles=N),headers:l.headers,items:l.files,search:l.search,"items-per-page":-1,"items-per-page-options":[10,20,50,100,-1],"item-selectable":N=>N.icon==="mdi-file","show-select":"","item-value":"name","multi-sort":"",density:"compact",hover:"","onClick:row":Go(d.fileClick,["stop"])},{"item.data-table-select":Je(({item:N,internalItem:R,isSelected:O,toggleSelect:W})=>[N.icon==="mdi-file"?(Dt(),xn(i,{key:0,"model-value":O(R),"onUpdate:modelValue":P=>W(R),onClick:e[1]||(e[1]=Go(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])):Si("",!0)]),top:Je(()=>[et(m,{class:"ma-0",style:{"background-color":"var(--color-background-surface-header)"}},{default:Je(()=>[et(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:Go(d.backArrow,["stop"])},null,8,["onClick"]),cr("div",fI,[(Dt(!0),Vr(So,null,Ko(d.breadcrumbPath,(N,R)=>(Dt(),Vr("span",{key:R},[e[15]||(e[15]=kn(" / ",-1)),cr("a",{style:{cursor:"pointer"},onClick:Go(O=>d.gotoPath(N.path),["prevent"])},xr(N.name),9,pI)]))),128))]),et(o),cr("div",gI,[kn(" Folder Size: "+xr(d.folderTotal)+" ",1),e[16]||(e[16]=cr("span",{class:"small-font-size"},"(not recursive)",-1))]),et(o),l.mode==="bucket"?(Dt(),Vr("div",mI,[e[17]||(e[17]=cr("span",{class:"font-size"},"Upload File",-1)),et(a,{modelValue:l.file,"onUpdate:modelValue":e[2]||(e[2]=N=>l.file=N),"hide-input":"","hide-details":"",class:"mr-1 file-input","prepend-icon":"mdi-upload","data-test":"upload-file"},null,8,["modelValue"])])):Si("",!0)]),_:1})]),"item.name":Je(({item:N})=>[et(b,{class:"mr-2"},{default:Je(()=>[kn(xr(N.icon),1)]),_:2},1024),kn(" "+xr(N.name),1)]),"item.size":Je(({item:N})=>[kn(xr(N.size?d.formatBytesToString(N.size):""),1)]),"item.action":Je(({item:N})=>[N.icon==="mdi-file"&&d.isText(N.name)?(Dt(),xn(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(N.name)},null,8,["onClick"])):Si("",!0),N.icon==="mdi-file"?(Dt(),xn(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(N.name)},null,8,["onClick"])):Si("",!0),N.icon==="mdi-file"?(Dt(),xn(c,{key:2,icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-file","aria-label":"Delete File",onClick:R=>d.deleteFile(N.name)},null,8,["onClick"])):Si("",!0)]),_:1},8,["sort-by","modelValue","headers","items","search","item-selectable","onClick:row"])]),_:1}),et(S,{modelValue:l.uploadPathDialog,"onUpdate:modelValue":e[6]||(e[6]=N=>l.uploadPathDialog=N),"max-width":"600",persistent:"",onKeydown:Zu(d.cancelFileUpload,["esc"])},{default:Je(()=>[et(x,null,{default:Je(()=>[et(T,{height:"24"},{default:Je(()=>[et(o),e[18]||(e[18]=cr("span",null," Upload Path ",-1)),et(o)]),_:1}),et($,null,{default:Je(()=>[cr("div",vI,[et(m,{class:"my-2"},{default:Je(()=>[...e[19]||(e[19]=[cr("span",null," This file path can be modified. New directories will be automatically created. ",-1)])]),_:1}),et(m,null,{default:Je(()=>[et(f,{modelValue:n.uploadFilePath,"onUpdate:modelValue":e[5]||(e[5]=N=>n.uploadFilePath=N),"hide-details":"",label:"File Path","data-test":"upload-file-path"},null,8,["modelValue"])]),_:1}),et(m,{class:"mt-6"},{default:Je(()=>[et(o),et(c,{variant:"outlined",class:"mx-2","data-test":"upload-file-cancel-btn",onClick:d.cancelFileUpload},{default:Je(()=>[...e[20]||(e[20]=[kn(" Cancel ",-1)])]),_:1},8,["onClick"]),et(c,{class:"mx-2",color:"primary",type:"submit","data-test":"upload-file-submit-btn",onClick:Go(d.uploadFile,["prevent"])},{default:Je(()=>[...e[21]||(e[21]=[kn(" Upload ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),et(S,{modelValue:l.optionsDialog,"onUpdate:modelValue":e[8]||(e[8]=N=>l.optionsDialog=N),"max-width":"300",persistent:"",onKeydown:Zu(d.cancelChangeRefreshInterval,["esc"])},{default:Je(()=>[et(x,null,{default:Je(()=>[et(T,{height:"24"},{default:Je(()=>[et(o),e[22]||(e[22]=cr("span",null,"Options",-1)),et(o)]),_:1}),et($,null,{default:Je(()=>[cr("div",yI,[et(f,{modelValue:l.refreshInterval,"onUpdate:modelValue":e[7]||(e[7]=N=>l.refreshInterval=N),min:"1",max:"3600",step:"100",type:"number",label:"Refresh Interval (s)","data-test":"refresh-interval"},null,8,["modelValue"])])]),_:1}),et(k,{class:"px-2"},{default:Je(()=>[et(c,{"data-test":"options-close-btn",variant:"outlined",onClick:d.saveRefreshInterval},{default:Je(()=>[...e[23]||(e[23]=[kn(" Save ",-1)])]),_:1},8,["onClick"]),et(c,{"data-test":"options-close-btn",variant:"outlined",onClick:d.cancelChangeRefreshInterval},{default:Je(()=>[...e[24]||(e[24]=[kn(" Cancel ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),l.showDialog?(Dt(),xn(L,{key:0,modelValue:l.showDialog,"onUpdate:modelValue":e[9]||(e[9]=N=>l.showDialog=N),type:"File",content:l.dialogContent,name:l.dialogName,filename:l.dialogFilename,onSubmit:e[10]||(e[10]=N=>l.showDialog=!1)},null,8,["modelValue","content","name","filename"])):Si("",!0)])}Bi("b",Object.freeze(Object.defineProperty({__proto__:null,default:bp(uI,[["render",bI],["__scopeId","data-v-73b5c6d5"]])},Symbol.toStringTag,{value:"Module"})))}}});
1506
+ `+d):r.stack=d}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=js(this.defaults,t);const{transitional:r,paramsSerializer:l,headers:d}=t;r!==void 0&&du.assertOptions(r,{silentJSONParsing:fo.transitional(fo.boolean),forcedJSONParsing:fo.transitional(fo.boolean),clarifyTimeoutError:fo.transitional(fo.boolean)},!1),l!=null&&($e.isFunction(l)?t.paramsSerializer={serialize:l}:du.assertOptions(l,{encode:fo.function,serialize:fo.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),du.assertOptions(t,{baseUrl:fo.spelling("baseURL"),withXsrfToken:fo.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=d&&$e.merge(d.common,d[t.method]);d&&$e.forEach(["delete","get","head","post","put","patch","common"],i=>{delete d[i]}),t.headers=ei.concat(u,d);const b=[];let p=!0;this.interceptors.request.forEach(function(a){typeof a.runWhen=="function"&&a.runWhen(t)===!1||(p=p&&a.synchronous,b.unshift(a.fulfilled,a.rejected))});const g=[];this.interceptors.response.forEach(function(a){g.push(a.fulfilled,a.rejected)});let o,c=0,f;if(!p){const i=[Qw.bind(this),void 0];for(i.unshift(...b),i.push(...g),f=i.length,o=Promise.resolve(t);c<f;)o=o.then(i[c++],i[c++]);return o}f=b.length;let h=t;for(;c<f;){const i=b[c++],a=b[c++];try{h=i(h)}catch(m){a.call(this,m);break}}try{o=Qw.call(this,h)}catch(i){return Promise.reject(i)}for(c=0,f=g.length;c<f;)o=o.then(g[c++],g[c++]);return o}getUri(e){e=js(this.defaults,e);const t=jw(e.baseURL,e.url,e.allowAbsoluteUrls);return Rw(t,e.params,e.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(e){Ws.prototype[e]=function(t,r){return this.request(js(r||{},{method:e,url:t,data:(r||{}).data}))}}),$e.forEach(["post","put","patch"],function(e){function t(r){return function(d,u,b){return this.request(js(b||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:d,data:u}))}}Ws.prototype[e]=t(),Ws.prototype[e+"Form"]=t(!0)});let aI=class Gx{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(d){t=d});const r=this;this.promise.then(l=>{if(!r._listeners)return;let d=r._listeners.length;for(;d-- >0;)r._listeners[d](l);r._listeners=null}),this.promise.then=l=>{let d;const u=new Promise(b=>{r.subscribe(b),d=b}).then(l);return u.cancel=function(){r.unsubscribe(d)},u},e(function(d,u,b){r.reason||(r.reason=new La(d,u,b),t(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 t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=r=>{e.abort(r)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Gx(function(l){e=l}),cancel:e}}};function lI(n){return function(t){return n.apply(null,t)}}function cI(n){return $e.isObject(n)&&n.isAxiosError===!0}const Cf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cf).forEach(([n,e])=>{Cf[e]=n});function e0(n){const e=new Ws(n),t=mw(Ws.prototype.request,e);return $e.extend(t,Ws.prototype,e,{allOwnKeys:!0}),$e.extend(t,e,null,{allOwnKeys:!0}),t.create=function(l){return e0(js(n,l))},t}const jn=e0(El);jn.Axios=Ws,jn.CanceledError=La,jn.CancelToken=aI,jn.isCancel=Dw,jn.VERSION=Zw,jn.toFormData=au,jn.AxiosError=Ct,jn.Cancel=jn.CanceledError,jn.all=function(e){return Promise.all(e)},jn.spread=lI,jn.isAxiosError=cI,jn.mergeConfig=js,jn.AxiosHeaders=ei,jn.formToJSON=n=>Iw($e.isHTMLForm(n)?new FormData(n):n),jn.getAdapter=Xw.getAdapter,jn.HttpStatusCode=Cf,jn.default=jn;const{Axios:Oj,AxiosError:Ij,CanceledError:Nj,isCancel:Dj,CancelToken:Fj,VERSION:Pj,all:Bj,Cancel:jj,isAxiosError:Wj,spread:zj,toFormData:Hj,AxiosHeaders:Uj,HttpStatusCode:qj,formToJSON:Vj,getAdapter:Kj,mergeConfig:Gj}=jn;function t0(n,e){const t=window.atob(n),r=new Uint8Array(t.length);for(let b=0;b<t.length;++b)r[b]=t.charCodeAt(b);const l=new Blob([r]),d=URL.createObjectURL(l),u=document.createElement("a");u.href=d,u.setAttribute("download",e),u.click()}const uI={components:{TopBar:wT,OutputDialog:gT},data(){const n="bucketExplorerRefreshInterval",e=Number.parseInt(localStorage.getItem(n))||60;return{title:"Bucket Explorer",search:"",root:"",mode:"bucket",buckets:[],volumes:[],uploadPathDialog:!1,optionsDialog:!1,refreshInterval:e,refreshIntervalKey:n,updater:null,updating:!1,path:"",file:null,files:[],selectedFiles:[],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 Gu(this.files.reduce((n,e)=>n+(e.size?e.size:0),0))},breadcrumbPath(){const n=this.path.split("/");return n.map((e,t)=>({name:e,path:n.slice(0,t+1).join("/")+"/"}))}},watch:{file:async function(){this.file!==null&&(this.uploadFilePath=`${this.path}${this.file.name}`,this.uploadPathDialog=!0)}},created(){var n;if(Yo.get("/openc3-api/storage/buckets").then(e=>{this.buckets=e.data}),Yo.get("/openc3-api/storage/volumes").then(e=>{this.volumes=e.data}),(n=this.$route.params.path)!=null&&n.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(n){if(["Rakefile","Dockerfile"].includes(n))return!0;let e=n.split(".").pop();return["txt","md","rb","py","pyi","cfg","html","js","json","info","vue","sh","bat","csv"].includes(e)},gotoPath(n){this.updating||(this.updating=!0,this.path=n,this.update())},update(){this.updating=!0,this.selectedFiles=[],this.$router.push({name:"Bucket Explorer",params:{path:`${this.root}/${this.path}`}}),this.updateFiles()},saveRefreshInterval(){this.refreshInterval?localStorage.setItem(this.refreshIntervalKey,this.refreshInterval):this.refreshInterval=Number.parseInt(localStorage.getItem(this.refreshIntervalKey))||60,this.optionsDialog=!1,this.changeUpdater()},cancelChangeRefreshInterval(){this.refreshInterval=Number.parseInt(localStorage.getItem(this.refreshIntervalKey))||60,this.optionsDialog=!1},changeUpdater(){this.clearUpdater(),this.updater=setInterval(()=>{this.root&&this.updateFiles()},this.refreshInterval*1e3)},clearUpdater(){this.updater!=null&&(clearInterval(this.updater),this.updater=null)},selectBucket(n){this.updating||(this.updating=!0,this.mode="bucket",this.root=n,this.path="",this.update())},selectVolume(n){this.updating||(this.updating=!0,this.mode="volume",this.root=n,this.path="",this.update())},backArrow(){if(this.path!==""&&!this.updating){this.updating=!0;let n=this.path.split("/");this.path=n.slice(0,n.length-2).join("/"),n.length>2&&(this.path+="/"),this.update()}},fileClick(n,{item:e}){e.icon==="mdi-folder"&&(this.updating||(this.updating=!0,this.root===""?this.root=e.name:this.path+=`${e.name}/`,this.update()))},viewFile(n){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),Yo.get(`/openc3-api/storage/download_file/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(t=>{this.dialogName=n,this.dialogFilename=n,this.dialogContent=window.atob(t.data.contents),this.showDialog=!0})},downloadFile(n){let e=this.root.toUpperCase(),t="download";this.mode==="volume"&&(t="download_file",e=e.slice(1)),Yo.get(`/openc3-api/storage/${t}/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`).then(r=>{if(this.mode==="bucket"){const l=document.createElement("a");l.href=r.data.url,l.setAttribute("download",n),l.click()}else t0(r.data.contents,n)}).catch(r=>{this.$notify.caution({title:`Unable to download file ${this.path}${n} from bucket ${this.root}`})})},async downloadMultipleFiles(){if(this.selectedFiles.length!==0)try{let n=this.root.toUpperCase();this.mode==="volume"&&(n=n.slice(1));const e=await Yo.post("/openc3-api/storage/download_multiple_files",{data:{[this.mode]:`OPENC3_${n}_${this.mode.toUpperCase()}`,path:this.path,files:this.selectedFiles}});t0(e.data.contents,e.data.filename),this.$notify.normal({title:`Successfully downloaded ${this.selectedFiles.length} file${this.selectedFiles.length>1?"s":""}`,severity:"success"})}catch(n){this.$notify.caution({title:`Failed to download files: ${n.message}`})}},clearSelection(){this.selectedFiles=[]},async uploadFile(){this.uploadPathDialog=!1,this.uploadFilePath.startsWith("/")&&(this.uploadFilePath=this.uploadFilePath.slice(1));const{data:n}=await Yo.get(`/openc3-api/storage/upload/${encodeURIComponent(this.uploadFilePath)}?bucket=OPENC3_${this.root.toUpperCase()}_BUCKET`);await jn({...n,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()},cancelFileUpload(){this.file=null,this.uploadPathDialog=!1},deleteFile(n){let e=this.root.toUpperCase();this.mode==="volume"&&(e=e.slice(1)),this.$dialog.confirm(`Are you sure you want to delete: ${n}`,{okText:"Delete",cancelText:"Cancel"}).then(t=>Yo.delete(`/openc3-api/storage/delete/${encodeURIComponent(this.path)}${n}?${this.mode}=OPENC3_${e}_${this.mode.toUpperCase()}`)).then(t=>{this.updateFiles()}).catch(t=>{})},updateFiles(){let n=this.root.toUpperCase();this.mode==="volume"&&(n=n.slice(1)),Yo.get(`/openc3-api/storage/files/OPENC3_${n}_${this.mode.toUpperCase()}/${this.path}`).then(e=>{this.files=e.data[0].map(t=>({name:t,icon:"mdi-folder"})),this.files=this.files.concat(e.data[1].map(t=>({name:t.name,icon:"mdi-file",size:t.size,modified:t.modified}))),this.updating=!1}).catch(({response:e})=>{var t;this.files=[],(t=e.data)!=null&&t.message?this.$notify.caution({title:e.data.message}):this.$notify.caution({title:e.message}),this.updating=!1})},formatBytesToString:Gu}},hI={style:{"padding-left":"5px","padding-top":"5px"}},dI={key:0,style:{"padding-left":"5px"}},fI={class:".text-body-1 ma-2 font-size","data-test":"file-path"},pI=["onClick"],gI={class:"ma-2 font-size"},mI={key:0,class:"ma-2",style:{display:"flex"}},vI={class:"mx-1"},yI={class:"pa-3"};function bI(n,e,t,r,l,d){const u=Tt("top-bar"),b=Tt("v-icon"),p=Tt("v-avatar"),g=Tt("v-chip"),o=Tt("v-spacer"),c=Tt("v-btn"),f=Tt("v-text-field"),h=Tt("v-card-title"),i=Tt("v-checkbox-btn"),a=Tt("v-file-input"),m=Tt("v-row"),w=Tt("v-data-table"),x=Tt("v-card"),T=Tt("v-toolbar"),$=Tt("v-card-text"),S=Tt("v-dialog"),k=Tt("v-card-actions"),L=Tt("output-dialog");return Dt(),Vr("div",null,[et(u,{title:l.title,menus:l.menus},null,8,["title","menus"]),et(x,{width:"100%"},{default:Je(()=>[cr("div",hI,[e[12]||(e[12]=cr("span",{class:"ma-2 font-size"},"Buckets:",-1)),(Dt(!0),Vr(So,null,Ko(l.buckets,(N,R)=>(Dt(),xn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:Go(O=>d.selectBucket(N),["stop"])},{default:Je(()=>[et(p,{start:""},{default:Je(()=>[et(b,null,{default:Je(()=>[...e[11]||(e[11]=[kn("mdi-bucket",-1)])]),_:1})]),_:1}),kn(" "+xr(N),1)]),_:2},1032,["onClick"]))),128))]),l.volumes.length!==0?(Dt(),Vr("div",dI,[e[14]||(e[14]=cr("span",{class:"ma-2 font-size"},"Volumes:",-1)),(Dt(!0),Vr(So,null,Ko(l.volumes,(N,R)=>(Dt(),xn(g,{key:R,variant:"elevated",color:"primary",class:"ma-2",onClick:Go(O=>d.selectVolume(N),["stop"])},{default:Je(()=>[et(p,{start:""},{default:Je(()=>[et(b,null,{default:Je(()=>[...e[13]||(e[13]=[kn("mdi-folder",-1)])]),_:1})]),_:1}),kn(" "+xr(N),1)]),_:2},1032,["onClick"]))),128))])):_i("",!0),et(h,{class:"pt-0 d-flex align-center justify-content-space-between"},{default:Je(()=>[kn(xr(l.root)+" Files ",1),et(o),l.selectedFiles.length>0?(Dt(),xn(c,{key:0,color:"primary",variant:"elevated","prepend-icon":"mdi-download-multiple",class:"mr-2","data-test":"download-selected",onClick:d.downloadMultipleFiles},{default:Je(()=>[kn(" Download "+xr(l.selectedFiles.length)+" Selected ",1)]),_:1},8,["onClick"])):_i("",!0),et(f,{modelValue:l.search,"onUpdate:modelValue":e[0]||(e[0]=N=>l.search=N),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}),et(w,{"sort-by":l.sortBy,"onUpdate:sortBy":e[3]||(e[3]=N=>l.sortBy=N),modelValue:l.selectedFiles,"onUpdate:modelValue":e[4]||(e[4]=N=>l.selectedFiles=N),headers:l.headers,items:l.files,search:l.search,"items-per-page":-1,"items-per-page-options":[10,20,50,100,-1],"item-selectable":N=>N.icon==="mdi-file","show-select":"","item-value":"name","multi-sort":"",density:"compact",hover:"","onClick:row":Go(d.fileClick,["stop"])},{"item.data-table-select":Je(({item:N,internalItem:R,isSelected:O,toggleSelect:W})=>[N.icon==="mdi-file"?(Dt(),xn(i,{key:0,"model-value":O(R),"onUpdate:modelValue":P=>W(R),onClick:e[1]||(e[1]=Go(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])):_i("",!0)]),top:Je(()=>[et(m,{class:"ma-0",style:{"background-color":"var(--color-background-surface-header)"}},{default:Je(()=>[et(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:Go(d.backArrow,["stop"])},null,8,["onClick"]),cr("div",fI,[(Dt(!0),Vr(So,null,Ko(d.breadcrumbPath,(N,R)=>(Dt(),Vr("span",{key:R},[e[15]||(e[15]=kn(" / ",-1)),cr("a",{style:{cursor:"pointer"},onClick:Go(O=>d.gotoPath(N.path),["prevent"])},xr(N.name),9,pI)]))),128))]),et(o),cr("div",gI,[kn(" Folder Size: "+xr(d.folderTotal)+" ",1),e[16]||(e[16]=cr("span",{class:"small-font-size"},"(not recursive)",-1))]),et(o),l.mode==="bucket"?(Dt(),Vr("div",mI,[e[17]||(e[17]=cr("span",{class:"font-size"},"Upload File",-1)),et(a,{modelValue:l.file,"onUpdate:modelValue":e[2]||(e[2]=N=>l.file=N),"hide-input":"","hide-details":"",class:"mr-1 file-input","prepend-icon":"mdi-upload","data-test":"upload-file"},null,8,["modelValue"])])):_i("",!0)]),_:1})]),"item.name":Je(({item:N})=>[et(b,{class:"mr-2"},{default:Je(()=>[kn(xr(N.icon),1)]),_:2},1024),kn(" "+xr(N.name),1)]),"item.size":Je(({item:N})=>[kn(xr(N.size?d.formatBytesToString(N.size):""),1)]),"item.action":Je(({item:N})=>[N.icon==="mdi-file"&&d.isText(N.name)?(Dt(),xn(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(N.name)},null,8,["onClick"])):_i("",!0),N.icon==="mdi-file"?(Dt(),xn(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(N.name)},null,8,["onClick"])):_i("",!0),N.icon==="mdi-file"?(Dt(),xn(c,{key:2,icon:"mdi-delete",variant:"text",density:"compact","data-test":"delete-file","aria-label":"Delete File",onClick:R=>d.deleteFile(N.name)},null,8,["onClick"])):_i("",!0)]),_:1},8,["sort-by","modelValue","headers","items","search","item-selectable","onClick:row"])]),_:1}),et(S,{modelValue:l.uploadPathDialog,"onUpdate:modelValue":e[6]||(e[6]=N=>l.uploadPathDialog=N),"max-width":"600",persistent:"",onKeydown:Zu(d.cancelFileUpload,["esc"])},{default:Je(()=>[et(x,null,{default:Je(()=>[et(T,{height:"24"},{default:Je(()=>[et(o),e[18]||(e[18]=cr("span",null," Upload Path ",-1)),et(o)]),_:1}),et($,null,{default:Je(()=>[cr("div",vI,[et(m,{class:"my-2"},{default:Je(()=>[...e[19]||(e[19]=[cr("span",null," This file path can be modified. New directories will be automatically created. ",-1)])]),_:1}),et(m,null,{default:Je(()=>[et(f,{modelValue:n.uploadFilePath,"onUpdate:modelValue":e[5]||(e[5]=N=>n.uploadFilePath=N),"hide-details":"",label:"File Path","data-test":"upload-file-path"},null,8,["modelValue"])]),_:1}),et(m,{class:"mt-6"},{default:Je(()=>[et(o),et(c,{variant:"outlined",class:"mx-2","data-test":"upload-file-cancel-btn",onClick:d.cancelFileUpload},{default:Je(()=>[...e[20]||(e[20]=[kn(" Cancel ",-1)])]),_:1},8,["onClick"]),et(c,{class:"mx-2",color:"primary",type:"submit","data-test":"upload-file-submit-btn",onClick:Go(d.uploadFile,["prevent"])},{default:Je(()=>[...e[21]||(e[21]=[kn(" Upload ",-1)])]),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),et(S,{modelValue:l.optionsDialog,"onUpdate:modelValue":e[8]||(e[8]=N=>l.optionsDialog=N),"max-width":"300",persistent:"",onKeydown:Zu(d.cancelChangeRefreshInterval,["esc"])},{default:Je(()=>[et(x,null,{default:Je(()=>[et(T,{height:"24"},{default:Je(()=>[et(o),e[22]||(e[22]=cr("span",null,"Options",-1)),et(o)]),_:1}),et($,null,{default:Je(()=>[cr("div",yI,[et(f,{modelValue:l.refreshInterval,"onUpdate:modelValue":e[7]||(e[7]=N=>l.refreshInterval=N),min:"1",max:"3600",step:"100",type:"number",label:"Refresh Interval (s)","data-test":"refresh-interval"},null,8,["modelValue"])])]),_:1}),et(k,{class:"px-2"},{default:Je(()=>[et(c,{"data-test":"options-close-btn",variant:"outlined",onClick:d.saveRefreshInterval},{default:Je(()=>[...e[23]||(e[23]=[kn(" Save ",-1)])]),_:1},8,["onClick"]),et(c,{"data-test":"options-close-btn",variant:"outlined",onClick:d.cancelChangeRefreshInterval},{default:Je(()=>[...e[24]||(e[24]=[kn(" Cancel ",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue","onKeydown"]),l.showDialog?(Dt(),xn(L,{key:0,modelValue:l.showDialog,"onUpdate:modelValue":e[9]||(e[9]=N=>l.showDialog=N),type:"File",content:l.dialogContent,name:l.dialogName,filename:l.dialogFilename,onSubmit:e[10]||(e[10]=N=>l.showDialog=!1)},null,8,["modelValue","content","name","filename"])):_i("",!0)])}Si("d",Object.freeze(Object.defineProperty({__proto__:null,default:bp(uI,[["render",bI],["__scopeId","data-v-73b5c6d5"]])},Symbol.toStringTag,{value:"Module"})))}}});