openc3-cosmos-tool-handbooks 6.4.2 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/tools/handbooks/{ArrayWidget-D0fKsdTb-f0f8bb61c8ac001076cf.js → ArrayWidget-CC3iwyQc-f16262c5e7548e8079dc.js} +2 -2
  3. data/tools/handbooks/{ArrayplotWidget-BmRSuGhA-e26fcf073e312dceb2b1.js → ArrayplotWidget-CiQdsmVy-dc49057dcce57b29bea9.js} +1 -1
  4. data/tools/handbooks/{BarColumn-DtYw6Gmq-f619ad16b67d8a1e2c67.js → BarColumn-BhjcS87D-786416bed44f82b5e313.js} +1 -1
  5. data/tools/handbooks/BlockWidget-LLPHBYVU-a5c7122ee80c889512bf.js +2 -0
  6. data/tools/handbooks/{ButtonWidget-8iOpXmpp-4898d8aa1f6beedd8249.js → ButtonWidget-Co0KMkIG-a0a61e9e9dc2b698420d.js} +1 -1
  7. data/tools/handbooks/CanvasWidget-DPrxnI7M-e5152f13433999756dcb.js +1 -0
  8. data/tools/handbooks/CanvasdotWidget-s1ALDR4k-e821752c98798c275990.js +1 -0
  9. data/tools/handbooks/{CanvasimageWidget-CFiCpITu-8124aef76935c61281e0.js → CanvasimageWidget-Cs-KjdqK-1bfcffcb54067427f4c1.js} +1 -1
  10. data/tools/handbooks/{CanvasimagevalueWidget-fu6vbAY0-d33ae9045bd15eb0fda9.js → CanvasimagevalueWidget-B-wBQisl-ed5a331659ddc6104635.js} +1 -1
  11. data/tools/handbooks/CanvaslabelWidget-CLBK52pP-3000bb4216f7ca88b20a.js +1 -0
  12. data/tools/handbooks/{CanvaslabelvalueWidget-BOFa8-NU-2ec7ec4cf0e141deaf0a.js → CanvaslabelvalueWidget-CAa70y_o-68ab40d404cf5107adf3.js} +1 -1
  13. data/tools/handbooks/CanvaslineWidget-PdwVJOQ5-68dfe09e7afa882973e9.js +1 -0
  14. data/tools/handbooks/{CanvaslinevalueWidget-BCZoO-Z6-6ea06b52ef07c6a3f2f0.js → CanvaslinevalueWidget-CKrp1f3Z-3e697a2a831a7728074d.js} +1 -1
  15. data/tools/handbooks/CheckbuttonWidget-CTSfH4NN-d475e2fd8a07dd17725b.js +1 -0
  16. data/tools/handbooks/ComboboxWidget-BQzv9zk5-3d913480f3a0b937e507.js +1 -0
  17. data/tools/handbooks/{DateWidget-Dggqab-F-dc0d26e6f356a28fa0a7.js → DateWidget-DKXxXT1g-3926c4905e08b54f70c9.js} +1 -1
  18. data/tools/handbooks/{DetailsDialog-BhSAQDSK-34d237d8076d580222cf.js → DetailsDialog-DEjAO6yp-7ca9202f9508decabee2.js} +1 -1
  19. data/tools/handbooks/{DynamicWidget-CfMtj7H8-a65d99195373abb692e3.js → DynamicWidget-CfMtj7H8-18f20f21b99dd35d82a2.js} +1 -1
  20. data/tools/handbooks/{FormatvalueWidget-B9_PbzY2-ff74a90fe613f621e128.js → FormatvalueWidget-7Yp9jfgX-b1c47b82bc5ec8cbd76c.js} +1 -1
  21. data/tools/handbooks/{Graph-B29y4d5A-99352842257e9a646a40.js → Graph-hzxapkW--73394e023048dfa76a81.js} +1 -1
  22. data/tools/handbooks/{GraphWidget-oBxPa3EB-5a23c4a108d29e66672a.js → GraphWidget-Dn0ZaxHo-de550ea8141a9e7cf06c.js} +1 -1
  23. data/tools/handbooks/{Handbooks-a7223db6964365035fd4.js → Handbooks-6cf6cebc8d43a1fe411a.js} +1 -1
  24. data/tools/handbooks/{HorizontalWidget-BWgZL_Oz-b0937c61aa8e8ff0cf5c.js → HorizontalWidget-BFzi3rMl-d35706610552e2dd70eb.js} +1 -1
  25. data/tools/handbooks/{HorizontalboxWidget-yMYUnNB8-15f50369d0f8ae722376.js → HorizontalboxWidget-DIagyace-de14fa53e0414b667c75.js} +1 -1
  26. data/tools/handbooks/HorizontallineWidget-BOZNWM3a-5652d76ab3a626d42f1d.js +1 -0
  27. data/tools/handbooks/{IframeWidget-DA4P_mJT-e723858ead19fc1c7cd4.js → IframeWidget-BU24bhc2-78a2291f883648dbe438.js} +1 -1
  28. data/tools/handbooks/{ImageLoader-rvd9t-mk-36bb3c9550aef4b1870f.js → ImageLoader-xxDrxPAX-dac94e5f3c9d7fcacd47.js} +1 -1
  29. data/tools/handbooks/{ImageviewerWidget-B1wK0hK4-098b5862b394475b8565.js → ImageviewerWidget-YMA4CVsl-8a806a62294373ec9a2b.js} +1 -1
  30. data/tools/handbooks/{LabelWidget-CY0saBoK-5a3c95d625a22791960c.js → LabelWidget-2402SA18-d420af1f6c8dee6965aa.js} +1 -1
  31. data/tools/handbooks/LabelledWidget-Cbubzj_g-5bf027f9bc3560842bdd.js +1 -0
  32. data/tools/handbooks/{LabelprogressbarWidget-CmXcESTg-7b8ff2c8a931b7eb0f8f.js → LabelprogressbarWidget-s8V7w6LJ-a52f68dc8cb8cd4cfbbd.js} +1 -1
  33. data/tools/handbooks/LabelsparklineWidget-qbM_OXLh-2ada012ec5ecf44281ec.js +1 -0
  34. data/tools/handbooks/{LabelvalueWidget-dNaNfsBE-854bb3c62f4d5afa58d3.js → LabelvalueWidget-B5Ihc2yP-26cdb559a8c48f3d7a6d.js} +1 -1
  35. data/tools/handbooks/{LabelvaluedescWidget-3vNoH6Mc-94a7d0f093855f8c050a.js → LabelvaluedescWidget-Cl3JHPGR-df707668abbea4902d25.js} +1 -1
  36. data/tools/handbooks/LabelvaluelimitsbarWidget-DnpfRyHl-fa696bfa6d9550235c5f.js +1 -0
  37. data/tools/handbooks/{LabelvaluelimitscolumnWidget-BZ6nwifg-e3cc4d6460e742408c8e.js → LabelvaluelimitscolumnWidget-D4L9L5oa-1e5634db083733c1d5fc.js} +1 -1
  38. data/tools/handbooks/LabelvaluerangebarWidget-BivnHCbE-c17c5c68607aec748611.js +1 -0
  39. data/tools/handbooks/Layout-B7KU2jmu-bbebcbf5f5954eec2e16.js +1 -0
  40. data/tools/handbooks/{LedWidget-DSxpmIOK-50ebc592ef283af5fd06.js → LedWidget-DpdthKEd-b0ddd2a959a62f911d5a.js} +1 -1
  41. data/tools/handbooks/{LimitsbarWidget-BoPTdVV5-3138230cbb1a9780ae76.js → LimitsbarWidget-CLyj3Kb--d16f71139a6916bd24b4.js} +1 -1
  42. data/tools/handbooks/{LimitscolorWidget-Bt3qOvrv-d1a97b0759d0f2e8b9c8.js → LimitscolorWidget-ChvzYoug-af4898bcb16112d937a8.js} +1 -1
  43. data/tools/handbooks/{LimitscolumnWidget-Ce6YnUBz-a85b5995e0b21477c63e.js → LimitscolumnWidget-IOhsLFZ1-3f893e99fbbd70684f0c.js} +1 -1
  44. data/tools/handbooks/LinegraphWidget-DZdqMqjw-2e8191246f7f4f59e2f2.js +1 -0
  45. data/tools/handbooks/{MatrixbycolumnsWidget-5MgJFZtz-55861419cbeb5dfe04c8.js → MatrixbycolumnsWidget-BzGYMhJ2-8832a0a18eac73375827.js} +1 -1
  46. data/tools/handbooks/{ProgressbarWidget-CDwDOFIy-f86891d133e0f3edd52c.js → ProgressbarWidget-Bre-0zcS-6ecc1f122c9f55ba1649.js} +1 -1
  47. data/tools/handbooks/RadiobuttonWidget-CLbfhrkc-e9ef2c017e2a97cc6eb7.js +1 -0
  48. data/tools/handbooks/RadiogroupWidget-DvRc70_Q-70490ef193b318fe4acc.js +1 -0
  49. data/tools/handbooks/{RangebarWidget-aHmgV0qs-d1f1b38c653e4e205f69.js → RangebarWidget-BvzVWcfZ-457e925240ae2de6f48f.js} +1 -1
  50. data/tools/handbooks/{RollupWidget-D1jUPrUQ-9976792d7ec25e066c9e.js → RollupWidget-KT243Ed8-9b03840bdcefcc01881b.js} +1 -1
  51. data/tools/handbooks/{ScrollwindowWidget-Cn0o3b4E-6ec4f0d7b1ae0be5f005.js → ScrollwindowWidget-DcpdXyrP-b95c2df643d57f810c27.js} +1 -1
  52. data/tools/handbooks/{SignalWidget-BQBzqdU--76698f37bc8a9d4d8226.js → SignalWidget-CoTi0Uzy-f5c9b4c5dde35c672a0e.js} +1 -1
  53. data/tools/handbooks/SpacerWidget-CTekSgNO-07d0c9bf6f93e7a95f70.js +1 -0
  54. data/tools/handbooks/{SparklineWidget-BTH9rvcX-5b46f1b67e523b869929.js → SparklineWidget-BxwPKrIr-805c451d5b923f3d8dc4.js} +1 -1
  55. data/tools/handbooks/{TabbookWidget-C-aDdEoD-febc451fb8bea7d012e2.js → TabbookWidget-B6Nx3Kmt-1a3b33accbb7305b5023.js} +1 -1
  56. data/tools/handbooks/TextboxWidget-DJgAfLFU-ca2e3c76ae952a6e18f8.js +1 -0
  57. data/tools/handbooks/TextfieldWidget-Bc2xGs8v-b839a49475af566d284f.js +1 -0
  58. data/tools/handbooks/{TimeWidget-C_site21-87895250eeaaa9e7aaaa.js → TimeWidget-DO6ZuMLO-99090e4b504353a585f4.js} +1 -1
  59. data/tools/handbooks/TitleWidget-CkZhMme1-3155acddb2f79847baa5.js +1 -0
  60. data/tools/handbooks/{VWidget-DuUens7G-6d87b2239f7a7acda499.js → VWidget-DzhcRBQe-59aaba2e3990c8f11f06.js} +1 -1
  61. data/tools/handbooks/ValueWidget-tieHz2H1-ef88e49c23cc4305366a.js +1 -0
  62. data/tools/handbooks/ValuelimitsbarWidget-oFqxZu0t-d432b836497d9d822d71.js +1 -0
  63. data/tools/handbooks/{ValuelimitscolumnWidget-BBTuSCK9-25b1b10e08eb81ab7813.js → ValuelimitscolumnWidget-DYBv8POg-056ee4ed5cbba422c007.js} +1 -1
  64. data/tools/handbooks/{ValuerangebarWidget-Ct7iGtu0-fa70b22703f8a8eb6cbf.js → ValuerangebarWidget-m3gFyG4v-4ac37415f7c0fee71e9f.js} +1 -1
  65. data/tools/handbooks/{VerticalWidget-DJn02myf-72f0a6db12f5197c1f52.js → VerticalWidget-CcdRZmQK-492d71106b93b07c8461.js} +1 -1
  66. data/tools/handbooks/VerticalboxWidget-DfsCYhrX-c75d48d17ee02be1821e.js +1 -0
  67. data/tools/handbooks/{Widget-CP2CtyUr-eb2092fc25a48bac973d.js → Widget-B5HKasz2-83ccb87b2ed48b7df134.js} +1 -1
  68. data/tools/handbooks/{main-6e6a348c68b337a5e187.js → main-55fea62d37ad53768c20.js} +35 -35
  69. data/tools/handbooks/main.js +1 -1
  70. metadata +68 -68
  71. data/tools/handbooks/BlockWidget-Dpxbw455-f2911693be4b145d39cc.js +0 -2
  72. data/tools/handbooks/CanvasWidget-B0iU38rA-b6b8904fa2c914f3f6a9.js +0 -1
  73. data/tools/handbooks/CanvasdotWidget-C9viSVBs-2dbde68bdc99154b1deb.js +0 -1
  74. data/tools/handbooks/CanvaslabelWidget-BVqHq3Vp-2ccc092480cf9b316359.js +0 -1
  75. data/tools/handbooks/CanvaslineWidget-l3ko0QXk-83b407875e2961181282.js +0 -1
  76. data/tools/handbooks/CheckbuttonWidget-BN7e1d5b-fecffc9a2e8bea6e5bd3.js +0 -1
  77. data/tools/handbooks/ComboboxWidget-Bb5RGXDB-d70c808812db4c585098.js +0 -1
  78. data/tools/handbooks/HorizontallineWidget-C4zMx7z2-d191d0b59ca769974c0a.js +0 -1
  79. data/tools/handbooks/LabelledWidget-B3ZOYaGy-ca6a1b8b5a029aba73a8.js +0 -1
  80. data/tools/handbooks/LabelsparklineWidget-D_yrQrn6-17fb855c3b251cf14e44.js +0 -1
  81. data/tools/handbooks/LabelvaluelimitsbarWidget-7VppYVIN-b4cc9cbbd0f74dc8341b.js +0 -1
  82. data/tools/handbooks/LabelvaluerangebarWidget-IyuXLNsw-6585ae45caeeb504dfd6.js +0 -1
  83. data/tools/handbooks/Layout-BqMhhhws-e1dd4e57aa8082738380.js +0 -1
  84. data/tools/handbooks/LinegraphWidget-XAbg0jj2-b316bf5e28edc978d06b.js +0 -1
  85. data/tools/handbooks/RadiobuttonWidget-cQ8V8LaD-f3d5aa6ac01e684d1f88.js +0 -1
  86. data/tools/handbooks/RadiogroupWidget-BvRnuGA2-f5c80e3fcd9b37498e20.js +0 -1
  87. data/tools/handbooks/SpacerWidget-C0RmQY3t-12ffbfa88369bf0b3b97.js +0 -1
  88. data/tools/handbooks/TextboxWidget-Dd2ccpUQ-4a21273b27209e479764.js +0 -1
  89. data/tools/handbooks/TextfieldWidget-DY3aFTnP-a1583dd6195b967ccc54.js +0 -1
  90. data/tools/handbooks/TitleWidget-Bx81VfQD-adaca188166a227c8776.js +0 -1
  91. data/tools/handbooks/ValueWidget-cbjxVV3B-853e1275e8f0e22fa582.js +0 -1
  92. data/tools/handbooks/ValuelimitsbarWidget-cQb2o_xH-b6d60437cec5d403a07c.js +0 -1
  93. data/tools/handbooks/VerticalboxWidget-DHQMxtF3-65540eb925a6ebc3975c.js +0 -1
@@ -1,4 +1,4 @@
1
- System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Tr,it){"use strict";var $n,_o,Zn,or,ln,ci,Ls,Xd,Qd,Os,va,$o,ui,hi,Zd,Jd,ep,Uc,tp,np,rp,ip,Vc,op,qc,sp,ap,lp,cp,up,hp,dp,pp;return{setters:[Nt=>{$n=Nt.resolveComponent,_o=Nt.createBlock,Zn=Nt.openBlock,or=Nt.withCtx,ln=Nt.createVNode,ci=Nt.createElementBlock,Ls=Nt.createElementVNode,Xd=Nt.useCssVars,Qd=Nt.defineAsyncComponent,Os=Nt.h,va=Nt.normalizeStyle,$o=Nt.createCommentVNode,ui=Nt.createTextVNode,hi=Nt.toDisplayString,Zd=Nt.defineComponent,Jd=Nt.warn,ep=Nt.inject,Uc=Nt.computed,tp=Nt.shallowRef,np=Nt.watchEffect,rp=Nt.getCurrentInstance,ip=Nt.provide,Vc=Nt.createApp,op=Nt.withDirectives,qc=Nt.Fragment,sp=Nt.withModifiers,ap=Nt.vShow,lp=Nt.mergeProps},Nt=>{cp=Nt.createRouter,up=Nt.createWebHistory},Nt=>{hp=Nt.getMountedApps},Nt=>{dp=Nt.createStore},Nt=>{pp=Nt.createVuetify}],execute:function(){Tr({$:xp,c:DT,l:yn,m:yr,y:Vn,z:Xh});var Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable})),e.push.apply(e,r)}return e}function Qo(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?gp(Object(e),!0).forEach(function(r){vb(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):gp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function vb(n,t,e){return(t=function(r){var v=function(f,y){if(Zo(f)!=="object"||f===null)return f;var x=f[Symbol.toPrimitive];if(x!==void 0){var h=x.call(f,y);if(Zo(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(f)}(r,"string");return Zo(v)==="symbol"?v:String(v)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Zo(n){return Zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,v=String(e),f=v.length,y=-1,x="",h=v.charCodeAt(0);++y<f;)(r=v.charCodeAt(y))!=0?x+=r>=1&&r<=31||r==127||y==0&&r>=48&&r<=57||y==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":y==0&&f==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+v.charAt(y):v.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(Nt);var yb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function wb(n){if(Zo(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Qo(Qo({},yb),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(Zo(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:bb.bind(null,t,e),mount:xb.bind(null,t,e),unmount:kb.bind(null,t,e),update:Cb.bind(null,t,e)}}function bb(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function xb(n,t,e){var r={};return Promise.resolve().then(function(){return function(v,f){return typeof v.appOptions=="function"?v.appOptions(f):Promise.resolve(Qo({},v.appOptions))}(n,e).then(function(v){var f;if(e.domElement&&!v.el&&(v.el=e.domElement),v.el)if(typeof v.el=="string"){if(!(f=document.querySelector(v.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(v.el))}else(f=v.el).id||(f.id="single-spa-application:".concat(e.name)),v.el="#".concat(CSS.escape(f.id));else{var y="single-spa-application:".concat(e.name);v.el="#".concat(CSS.escape(y)),(f=document.getElementById(y))||((f=document.createElement("div")).id=y,document.body.appendChild(f))}if(!n.replaceMode&&(v.el=v.el+" .single-spa-container",!f.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",f.appendChild(x)}r.domEl=f,v.render||v.template||!n.rootComponent||(v.render=function(p){return p(n.rootComponent)}),v.data||(v.data={});var h=v.data;if(v.data=function(){return Qo(Qo({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(v),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return r.root=r.vueInstance.mount(v.el),t[e.name]=r,r.vueInstance});r.root=r.vueInstance.mount(v.el)}else if(r.vueInstance=new n.Vue(v),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return t[e.name]=r,r.vueInstance});return t[e.name]=r,r.vueInstance})})}function Cb(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],v=Qo(Qo({},n.appOptions.data||{}),e),f=r.root||r.vueInstance;for(var y in v)f[y]=v[y]})}function kb(n,t,e){return Promise.resolve().then(function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const Sb=Tr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),Ab={};function _b(n,t){const e=$n("router-view"),r=$n("v-app");return Zn(),_o(r,{id:"innerapp"},{default:or(()=>[ln(e)]),_:1})}const $b=Sb(Ab,[["render",_b]]),E2="modulepreload",I2=function(n){return"/"+n},R2={},ot=function(t,e,r){let v=Promise.resolve();function f(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return v.then(y=>{for(const x of y||[])x.status==="rejected"&&f(x.reason);return t().catch(f)})},fp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/handbooks/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(fp)},Ns=Tr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),Tb="/icons/customIcons.svg",Kc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Tb+"#"+this.icon}}},mp=()=>{Xd(n=>({"259824e2":n.color}))},vp=Kc.setup;Kc.setup=vp?(n,t)=>(mp(),vp(n,t)):mp;const Mb={class:"cosmos-custom-icon"},Eb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Ib=["href"];function Rb(n,t,e,r,v,f){return Zn(),ci("span",Mb,[(Zn(),ci("svg",Eb,[Ls("use",{href:f.iconSrc},null,8,Ib)]))])}const Lb=Ns(Kc,[["render",Rb],["__scopeId","data-v-4b6f1199"]]),sl=6e4,Gc=36e5,Ob=1e3,yp=Symbol.for("constructDateFrom");function Vn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&yp in n?n[yp](t):n instanceof Date?new n.constructor(t):new Date(t)}function yn(n,t){return Vn(t||n,n)}let Nb={};function Ds(){return Nb}function To(n,t){var e,r,v,f;const y=Ds(),x=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??y.weekStartsOn??((f=(v=y.locale)==null?void 0:v.options)==null?void 0:f.weekStartsOn)??0,h=yn(n,t==null?void 0:t.in),p=h.getDay(),s=(p<x?7:0)+p-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Fs(n,t){return To(n,{...t,weekStartsOn:1})}function wp(n,t){const e=yn(n,void 0),r=e.getFullYear(),v=Vn(e,0);v.setFullYear(r+1,0,4),v.setHours(0,0,0,0);const f=Fs(v),y=Vn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Fs(y);return e.getTime()>=f.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function al(n){const t=yn(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function Db(n,...t){const e=Vn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function bp(n,t){const e=yn(n,void 0);return e.setHours(0,0,0,0),e}function Fb(n,t,e){const[r,v]=Db(void 0,n,t),f=bp(r),y=bp(v),x=+f-al(f),h=+y-al(y);return Math.round((x-h)/864e5)}function Pb(n,t){const e=wp(n),r=Vn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Fs(r)}function Wb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function xp(n){return!(!Wb(n)&&typeof n!="number"||isNaN(+yn(n)))}function Bb(n,t){const e=yn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const zb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jb=(n,t,e)=>{let r;const v=zb[n];return typeof v=="string"?r=v:t===1?r=v.one:r=v.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Yc(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Hb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ub={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qb={date:Yc({formats:Hb,defaultWidth:"full"}),time:Yc({formats:Ub,defaultWidth:"full"}),dateTime:Yc({formats:Vb,defaultWidth:"full"})},Kb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gb=(n,t,e,r)=>Kb[n];function ya(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let v;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;v=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;v=n.values[x]||n.values[y]}const f=n.argumentCallback?n.argumentCallback(t):t;return v[f]}}const Yb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Xb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Zb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Jb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},e0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},t0=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},n0={ordinalNumber:t0,era:ya({values:Yb,defaultWidth:"wide"}),quarter:ya({values:Xb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ya({values:Qb,defaultWidth:"wide"}),day:ya({values:Zb,defaultWidth:"wide"}),dayPeriod:ya({values:Jb,defaultWidth:"wide",formattingValues:e0,defaultFormattingWidth:"wide"})};function wa(n){return(t,e={})=>{const r=e.width,v=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],f=t.match(v);if(!f)return null;const y=f[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?i0(x,a=>a.test(y)):r0(x,a=>a.test(y));let p;p=n.valueCallback?n.valueCallback(h):h,p=e.valueCallback?e.valueCallback(p):p;const s=t.slice(y.length);return{value:p,rest:s}}}function r0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function i0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function o0(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const v=r[0],f=t.match(n.parsePattern);if(!f)return null;let y=n.valueCallback?n.valueCallback(f[0]):f[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(v.length);return{value:y,rest:x}}}const s0=/^(\d+)(th|st|nd|rd)?/i,a0=/\d+/i,l0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},c0={any:[/^b/i,/^(a|c)/i]},u0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},h0={any:[/1/i,/2/i,/3/i,/4/i]},d0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},p0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},g0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},f0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},m0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},v0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},y0={ordinalNumber:o0({matchPattern:s0,parsePattern:a0,valueCallback:n=>parseInt(n,10)}),era:wa({matchPatterns:l0,defaultMatchWidth:"wide",parsePatterns:c0,defaultParseWidth:"any"}),quarter:wa({matchPatterns:u0,defaultMatchWidth:"wide",parsePatterns:h0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:wa({matchPatterns:d0,defaultMatchWidth:"wide",parsePatterns:p0,defaultParseWidth:"any"}),day:wa({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:f0,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:m0,defaultMatchWidth:"any",parsePatterns:v0,defaultParseWidth:"any"})},Cp={code:"en-US",formatDistance:jb,formatLong:qb,formatRelative:Gb,localize:n0,match:y0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function w0(n,t){const e=yn(n,void 0);return Fb(e,Bb(e))+1}function kp(n,t){const e=yn(n,void 0),r=+Fs(e)-+Pb(e);return Math.round(r/6048e5)+1}function Xc(n,t){var e,r,v,f;const y=yn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Ds(),p=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((f=(v=h.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,s=Vn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,p),s.setHours(0,0,0,0);const a=To(s,t),u=Vn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,p),u.setHours(0,0,0,0);const l=To(u,t);return+y>=+a?x+1:+y>=+l?x:x-1}function b0(n,t){var e,r,v,f;const y=Ds(),x=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??y.firstWeekContainsDate??((f=(v=y.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,h=Xc(n,t),p=Vn((t==null?void 0:t.in)||n,0);return p.setFullYear(h,0,x),p.setHours(0,0,0,0),To(p,t)}function Sp(n,t){const e=yn(n,t==null?void 0:t.in),r=+To(e,t)-+b0(e,t);return Math.round(r/6048e5)+1}function rn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Mo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return rn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):rn(e+1,2)},d(n,t){return rn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return rn(n.getHours()%12||12,t.length)},H(n,t){return rn(n.getHours(),t.length)},m(n,t){return rn(n.getMinutes(),t.length)},s(n,t){return rn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),v=Math.trunc(r*Math.pow(10,e-3));return rn(v,t.length)}},Ps={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ap={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),v=r>0?r:1-r;return e.ordinalNumber(v,{unit:"year"})}return Mo.y(n,t)},Y:function(n,t,e,r){const v=Xc(n,r),f=v>0?v:1-v;if(t==="YY"){const y=f%100;return rn(y,2)}return t==="Yo"?e.ordinalNumber(f,{unit:"year"}):rn(f,t.length)},R:function(n,t){const e=wp(n);return rn(e,t.length)},u:function(n,t){const e=n.getFullYear();return rn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Mo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return rn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const v=Sp(n,r);return t==="wo"?e.ordinalNumber(v,{unit:"week"}):rn(v,t.length)},I:function(n,t,e){const r=kp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):rn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Mo.d(n,t)},D:function(n,t,e){const r=w0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):rn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const v=n.getDay(),f=(v-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return rn(f,2);case"eo":return e.ordinalNumber(f,{unit:"day"});case"eee":return e.day(v,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(v,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(v,{width:"short",context:"formatting"});case"eeee":default:return e.day(v,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const v=n.getDay(),f=(v-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return rn(f,t.length);case"co":return e.ordinalNumber(f,{unit:"day"});case"ccc":return e.day(v,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(v,{width:"narrow",context:"standalone"});case"cccccc":return e.day(v,{width:"short",context:"standalone"});case"cccc":default:return e.day(v,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),v=r===0?7:r;switch(t){case"i":return String(v);case"ii":return rn(v,t.length);case"io":return e.ordinalNumber(v,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let v;switch(r===12?v=Ps.noon:r===0?v=Ps.midnight:v=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(v,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let v;switch(r>=17?v=Ps.evening:r>=12?v=Ps.afternoon:r>=4?v=Ps.morning:v=Ps.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(v,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Mo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Mo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Mo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Mo.s(n,t)},S:function(n,t){return Mo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $p(r);case"XXXX":case"XX":return Jo(r);case"XXXXX":case"XXX":default:return Jo(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return $p(r);case"xxxx":case"xx":return Jo(r);case"xxxxx":case"xxx":default:return Jo(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_p(r,":");case"OOOO":default:return"GMT"+Jo(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_p(r,":");case"zzzz":default:return"GMT"+Jo(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return rn(r,t.length)},T:function(n,t,e){return rn(+n,t.length)}};function _p(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.trunc(r/60),f=r%60;return f===0?e+String(v):e+String(v)+t+rn(f,2)}function $p(n,t){return n%60===0?(n>0?"-":"+")+rn(Math.abs(n)/60,2):Jo(n,t)}function Jo(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=rn(Math.trunc(r/60),2),f=rn(r%60,2);return e+v+t+f}const Tp=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Mp=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},x0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],v=e[2];if(!v)return Tp(n,t);let f;switch(r){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;case"PPPP":default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",Tp(r,t)).replace("{{time}}",Mp(v,t))},Qc={p:Mp,P:x0},C0=/^D+$/,k0=/^Y+$/,S0=["D","DD","YY","YYYY"];function Ep(n){return C0.test(n)}function Ip(n){return k0.test(n)}function Zc(n,t,e){const r=A0(n,t,e);if(console.warn(r),S0.includes(n))throw new RangeError(r)}function A0(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const _0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T0=/^'([^]*?)'?$/,M0=/''/g,E0=/[a-zA-Z]/;function es(n,t,e){var r,v,f,y,x,h,p,s;const a=Ds(),u=(e==null?void 0:e.locale)??a.locale??Cp,l=(e==null?void 0:e.firstWeekContainsDate)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.firstWeekContainsDate)??a.firstWeekContainsDate??((y=(f=a.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((h=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(p=a.locale)==null?void 0:p.options)==null?void 0:s.weekStartsOn)??0,c=yn(n,e==null?void 0:e.in);if(!xp(c))throw new RangeError("Invalid time value");let d=t.match($0).map(b=>{const I=b[0];if(I==="p"||I==="P"){const T=Qc[I];return T(b,u.formatLong)}return b}).join("").match(_0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const I=b[0];if(I==="'")return{isToken:!1,value:I0(b)};if(Ap[I])return{isToken:!0,value:b};if(I.match(E0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(d=u.localize.preprocessor(c,d));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:u};return d.map(b=>{if(!b.isToken)return b.value;const I=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Ip(I)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Ep(I))&&Zc(I,t,String(n));const T=Ap[I[0]];return T(c,I,u.localize,w)}).join("")}function I0(n){const t=n.match(T0);return t?t[1].replace(M0,"'"):n}var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Rp={exports:{}},Lp;function R0(){return Lp||(Lp=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var v=function(s,a,u){if(typeof s!="string"){v.original?v.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),v.modules[s]||(v.payloads[s]=u,v.modules[s]=null)};v.modules={},v.payloads={};var f=function(s,a,u){if(typeof a=="string"){var l=h(s,a);if(l!=null)return u&&u(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],c=0,d=a.length;c<d;++c){var w=h(s,a[c]);if(w==null&&y.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},y=function(s,a){var u=f("",s,a);return u==null&&y.original?y.original.apply(this,arguments):u},x=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return x(s,u[0])+"!"+x(s,u[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=x(s,a);var u=v.modules[a];if(!u){if(u=v.payloads[a],typeof u=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},c=function(w,b){return f(a,w,b)},d=u(c,l,o);l=d||o.exports,v.modules[a]=l,delete v.payloads[a]}u=v.modules[a]=l||u}return u};function p(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(v.original=a.define,a.define=v,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(y.original=a.require,a.require=y,a.require.packaged=!0)}p(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,v){function f(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||f(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||f(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var p=h.indexOf(y,x);return p!==-1&&p===x}),String.prototype.repeat||f(String.prototype,"repeat",function(y){for(var x="",h=this;y>0;)y&1&&(x+=h),(y>>=1)&&(h+=h);return x}),String.prototype.includes||f(String.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Object.assign||(Object.assign=function(y){if(y==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(y),h=1;h<arguments.length;h++){var p=arguments[h];p!=null&&Object.keys(p).forEach(function(s){x[s]=p[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||f(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return s}}),Array.prototype.findIndex||f(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return p}}),Array.prototype.includes||f(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||f(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,p=arguments[1],s=p>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],l=u===void 0?h:u>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)x[a]=y,a++;return x}),Array.of||f(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,v){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,v){r.deepCopy=function f(y){if(typeof y!="object"||!y)return y;var x;if(Array.isArray(y)){x=[];for(var h=0;h<y.length;h++)x[h]=f(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=f(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,v){r.last=function(x){return x[x.length-1]},r.stringReverse=function(x){return x.split("").reverse().join("")},r.stringRepeat=function(x,h){for(var p="";h>0;)h&1&&(p+=x),(h>>=1)&&(x+=x);return p};var f=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(f,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var p in x)h[p]=x[p];return h},r.copyArray=function(x){for(var h=[],p=0,s=x.length;p<s;p++)x[p]&&typeof x[p]=="object"?h[p]=this.copyObject(x[p]):h[p]=x[p];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},p=0;p<x.length;p++)h[x[p]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var p in x)h[p]=x[p];return h},r.arrayRemove=function(x,h){for(var p=0;p<=x.length;p++)h===x[p]&&x.splice(p,1)},r.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(x){return(""+x).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(x,h){var p=[];return x.replace(h,function(s){p.push({offset:arguments[arguments.length-2],length:s.length})}),p},r.deferredCall=function(x){var h=null,p=function(){h=null,x()},s=function(a){return s.cancel(),h=setTimeout(p,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(x,h){var p=null,s=function(){p=null,x()},a=function(u){p==null&&(p=setTimeout(s,u||h))};return a.delay=function(u){p&&clearTimeout(p),p=setTimeout(s,u||h)},a.schedule=a,a.call=function(){this.cancel(),x()},a.cancel=function(){p&&clearTimeout(p),p=null},a.isPending=function(){return p},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,p){return p&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,v){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var f=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(f.platform)||["other"])[0].toLowerCase(),x=f.userAgent||"",h=f.appName||"";r.isWin=y=="win",r.isMac=y=="mac",r.isLinux=y=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=x.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(x.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,r.isAIR=x.indexOf("AdobeAIR")>=0,r.isAndroid=x.indexOf("Android")>=0,r.isChromeOS=x.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,v){var f=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function u(l,o,c){if(typeof l=="string"&&l){var d=document.createTextNode(l);return o&&o.appendChild(d),d}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],b=0;b<l.length;b++){var I=u(l[b],o,c);I&&w.push(I)}return w}var T=document.createElement(l[0]),S=l[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var b=C;b<l.length;b++)u(l[b],T,c);return C==2&&Object.keys(S).forEach(function(R){var L=S[R];R==="class"?T.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?T[R]=L:R==="ref"?c&&(c[L]=T):R==="style"?typeof L=="string"&&(T.style.cssText=L):L!=null&&T.setAttribute(R,L)}),o&&o.appendChild(T),T},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,l){return document.createElementNS?document.createElementNS(l||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,l){var o=l?l.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var l=u?u.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(u,l){var o=(u.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(u,l){r.hasCssClass(u,l)||(u.className+=" "+l)},r.removeCssClass=function(u,l){for(var o=u.className.split(/\s+/g);;){var c=o.indexOf(l);if(c==-1)break;o.splice(c,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,l){for(var o=u.className.split(/\s+/g),c=!0;;){var d=o.indexOf(l);if(d==-1)break;c=!1,o.splice(d,1)}return c&&o.push(l),u.className=o.join(" "),c},r.setCssClass=function(u,l,o){o?r.addCssClass(u,l):r.removeCssClass(u,l)},r.hasCssString=function(u,l){var o=0,c;if(l=l||document,c=l.querySelectorAll("style")){for(;o<c.length;)if(c[o++].id===u)return!0}},r.removeElementById=function(u,l){l=l||document,l.getElementById(u)&&l.getElementById(u).remove()};var x,h=[];r.useStrictCSP=function(u){x=u,u==!1?p():h||(h=[])};function p(){var u=h;h=null,u&&u.forEach(function(l){s(l[0],l[1])})}function s(u,l,o){if(!(typeof document>"u")){if(h){if(o)p();else if(o===!1)return h.push([u,l])}if(!x){var c=o;!o||!o.getRootNode?c=document:(c=o.getRootNode(),(!c||c==o)&&(c=document));var d=c.ownerDocument||c;if(l&&r.hasCssString(l,c))return null;l&&(u+=`
1
+ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Tr,it){"use strict";var Tn,_o,Jn,sr,ln,ci,Ls,Xd,Qd,Os,va,$o,ui,hi,Zd,Jd,ep,Uc,tp,np,rp,ip,Vc,op,qc,sp,ap,lp,cp,up,hp,dp,pp;return{setters:[Nt=>{Tn=Nt.resolveComponent,_o=Nt.createBlock,Jn=Nt.openBlock,sr=Nt.withCtx,ln=Nt.createVNode,ci=Nt.createElementBlock,Ls=Nt.createElementVNode,Xd=Nt.useCssVars,Qd=Nt.defineAsyncComponent,Os=Nt.h,va=Nt.normalizeStyle,$o=Nt.createCommentVNode,ui=Nt.createTextVNode,hi=Nt.toDisplayString,Zd=Nt.defineComponent,Jd=Nt.warn,ep=Nt.inject,Uc=Nt.computed,tp=Nt.shallowRef,np=Nt.watchEffect,rp=Nt.getCurrentInstance,ip=Nt.provide,Vc=Nt.createApp,op=Nt.withDirectives,qc=Nt.Fragment,sp=Nt.withModifiers,ap=Nt.vShow,lp=Nt.mergeProps},Nt=>{cp=Nt.createRouter,up=Nt.createWebHistory},Nt=>{hp=Nt.getMountedApps},Nt=>{dp=Nt.createStore},Nt=>{pp=Nt.createVuetify}],execute:function(){Tr({$:xp,c:DT,l:wn,m:yr,y:qn,z:Xh});var Nt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gp(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(v){return Object.getOwnPropertyDescriptor(n,v).enumerable})),e.push.apply(e,r)}return e}function Qo(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?gp(Object(e),!0).forEach(function(r){vb(n,r,e[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):gp(Object(e)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))})}return n}function vb(n,t,e){return(t=function(r){var v=function(f,y){if(Zo(f)!=="object"||f===null)return f;var x=f[Symbol.toPrimitive];if(x!==void 0){var h=x.call(f,y);if(Zo(h)!=="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(f)}(r,"string");return Zo(v)==="symbol"?v:String(v)}(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Zo(n){return Zo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(n)}(function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var t=function(e){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var r,v=String(e),f=v.length,y=-1,x="",h=v.charCodeAt(0);++y<f;)(r=v.charCodeAt(y))!=0?x+=r>=1&&r<=31||r==127||y==0&&r>=48&&r<=57||y==1&&r>=48&&r<=57&&h==45?"\\"+r.toString(16)+" ":y==0&&f==1&&r==45||!(r>=128||r==45||r==95||r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122)?"\\"+v.charAt(y):v.charAt(y):x+="�";return x};n.CSS||(n.CSS={}),n.CSS.escape=t})(Nt);var yb={appOptions:null,template:null,Vue:null,createApp:null,handleInstance:null};function wb(n){if(Zo(n)!=="object")throw new Error("single-spa-vue requires a configuration object");var t=Qo(Qo({},yb),n);if(!t.Vue&&!t.createApp)throw Error("single-spa-vue must be passed opts.Vue or opts.createApp");if(!t.appOptions)throw Error("single-spa-vue must be passed opts.appOptions");if(t.appOptions.el&&typeof t.appOptions.el!="string"&&!(t.appOptions.el instanceof HTMLElement))throw Error("single-spa-vue: appOptions.el must be a string CSS selector, an HTMLElement, or not provided at all. Was given ".concat(Zo(t.appOptions.el)));t.createApp=t.createApp||t.Vue&&t.Vue.createApp;var e={};return{bootstrap:bb.bind(null,t,e),mount:xb.bind(null,t,e),unmount:kb.bind(null,t,e),update:Cb.bind(null,t,e)}}function bb(n){return n.loadRootComponent?n.loadRootComponent().then(function(t){return n.rootComponent=t}):Promise.resolve()}function xb(n,t,e){var r={};return Promise.resolve().then(function(){return function(v,f){return typeof v.appOptions=="function"?v.appOptions(f):Promise.resolve(Qo({},v.appOptions))}(n,e).then(function(v){var f;if(e.domElement&&!v.el&&(v.el=e.domElement),v.el)if(typeof v.el=="string"){if(!(f=document.querySelector(v.el)))throw Error("If appOptions.el is provided to single-spa-vue, the dom element must exist in the dom. Was provided as ".concat(v.el))}else(f=v.el).id||(f.id="single-spa-application:".concat(e.name)),v.el="#".concat(CSS.escape(f.id));else{var y="single-spa-application:".concat(e.name);v.el="#".concat(CSS.escape(y)),(f=document.getElementById(y))||((f=document.createElement("div")).id=y,document.body.appendChild(f))}if(!n.replaceMode&&(v.el=v.el+" .single-spa-container",!f.querySelector(".single-spa-container"))){var x=document.createElement("div");x.className="single-spa-container",f.appendChild(x)}r.domEl=f,v.render||v.template||!n.rootComponent||(v.render=function(p){return p(n.rootComponent)}),v.data||(v.data={});var h=v.data;if(v.data=function(){return Qo(Qo({},typeof h=="function"?h.call(this,this):h),e)},n.createApp){if(r.vueInstance=n.createApp(v),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return r.root=r.vueInstance.mount(v.el),t[e.name]=r,r.vueInstance});r.root=r.vueInstance.mount(v.el)}else if(r.vueInstance=new n.Vue(v),r.vueInstance.bind&&(r.vueInstance=r.vueInstance.bind(r.vueInstance)),n.handleInstance)return Promise.resolve(n.handleInstance(r.vueInstance,e)).then(function(){return t[e.name]=r,r.vueInstance});return t[e.name]=r,r.vueInstance})})}function Cb(n,t,e){return Promise.resolve().then(function(){var r=t[e.name],v=Qo(Qo({},n.appOptions.data||{}),e),f=r.root||r.vueInstance;for(var y in v)f[y]=v[y]})}function kb(n,t,e){return Promise.resolve().then(function(){var r=t[e.name];n.createApp?r.vueInstance.unmount(r.domEl):(r.vueInstance.$destroy(),r.vueInstance.$el.innerHTML=""),delete r.vueInstance,r.domEl&&(r.domEl.innerHTML="",delete r.domEl)})}const Sb=Tr("_",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),Ab={};function _b(n,t){const e=Tn("router-view"),r=Tn("v-app");return Jn(),_o(r,{id:"innerapp"},{default:sr(()=>[ln(e)]),_:1})}const $b=Sb(Ab,[["render",_b]]),E2="modulepreload",I2=function(n){return"/"+n},R2={},ot=function(t,e,r){let v=Promise.resolve();function f(y){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=y,window.dispatchEvent(x),!x.defaultPrevented)throw y}return v.then(y=>{for(const x of y||[])x.status==="rejected"&&f(x.reason);return t().catch(f)})},fp=function(n){var t;!n.name!=="NotFound"&&(n.path=`/tools/handbooks/${n.path.replace(/^\//,"")}`),(t=n.children)==null||t.forEach(fp)},Ns=Tr("d",(n,t)=>{const e=n.__vccOpts||n;for(const[r,v]of t)e[r]=v;return e}),Tb="/icons/customIcons.svg",Kc={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{iconSrc:function(){return Tb+"#"+this.icon}}},mp=()=>{Xd(n=>({"259824e2":n.color}))},vp=Kc.setup;Kc.setup=vp?(n,t)=>(mp(),vp(n,t)):mp;const Mb={class:"cosmos-custom-icon"},Eb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",focusable:"false"},Ib=["href"];function Rb(n,t,e,r,v,f){return Jn(),ci("span",Mb,[(Jn(),ci("svg",Eb,[Ls("use",{href:f.iconSrc},null,8,Ib)]))])}const Lb=Ns(Kc,[["render",Rb],["__scopeId","data-v-4b6f1199"]]),sl=6e4,Gc=36e5,Ob=1e3,yp=Symbol.for("constructDateFrom");function qn(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&yp in n?n[yp](t):n instanceof Date?new n.constructor(t):new Date(t)}function wn(n,t){return qn(t||n,n)}let Nb={};function Ds(){return Nb}function To(n,t){var e,r,v,f;const y=Ds(),x=(t==null?void 0:t.weekStartsOn)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.weekStartsOn)??y.weekStartsOn??((f=(v=y.locale)==null?void 0:v.options)==null?void 0:f.weekStartsOn)??0,h=wn(n,t==null?void 0:t.in),p=h.getDay(),s=(p<x?7:0)+p-x;return h.setDate(h.getDate()-s),h.setHours(0,0,0,0),h}function Fs(n,t){return To(n,{...t,weekStartsOn:1})}function wp(n,t){const e=wn(n,void 0),r=e.getFullYear(),v=qn(e,0);v.setFullYear(r+1,0,4),v.setHours(0,0,0,0);const f=Fs(v),y=qn(e,0);y.setFullYear(r,0,4),y.setHours(0,0,0,0);const x=Fs(y);return e.getTime()>=f.getTime()?r+1:e.getTime()>=x.getTime()?r:r-1}function al(n){const t=wn(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function Db(n,...t){const e=qn.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function bp(n,t){const e=wn(n,void 0);return e.setHours(0,0,0,0),e}function Fb(n,t,e){const[r,v]=Db(void 0,n,t),f=bp(r),y=bp(v),x=+f-al(f),h=+y-al(y);return Math.round((x-h)/864e5)}function Pb(n,t){const e=wp(n),r=qn(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),Fs(r)}function Wb(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function xp(n){return!(!Wb(n)&&typeof n!="number"||isNaN(+wn(n)))}function Bb(n,t){const e=wn(n,void 0);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const zb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jb=(n,t,e)=>{let r;const v=zb[n];return typeof v=="string"?r=v:t===1?r=v.one:r=v.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function Yc(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const Hb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ub={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Vb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qb={date:Yc({formats:Hb,defaultWidth:"full"}),time:Yc({formats:Ub,defaultWidth:"full"}),dateTime:Yc({formats:Vb,defaultWidth:"full"})},Kb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gb=(n,t,e,r)=>Kb[n];function ya(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let v;if(r==="formatting"&&n.formattingValues){const y=n.defaultFormattingWidth||n.defaultWidth,x=e!=null&&e.width?String(e.width):y;v=n.formattingValues[x]||n.formattingValues[y]}else{const y=n.defaultWidth,x=e!=null&&e.width?String(e.width):n.defaultWidth;v=n.values[x]||n.values[y]}const f=n.argumentCallback?n.argumentCallback(t):t;return v[f]}}const Yb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Xb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Zb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Jb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},e0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},t0=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},n0={ordinalNumber:t0,era:ya({values:Yb,defaultWidth:"wide"}),quarter:ya({values:Xb,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ya({values:Qb,defaultWidth:"wide"}),day:ya({values:Zb,defaultWidth:"wide"}),dayPeriod:ya({values:Jb,defaultWidth:"wide",formattingValues:e0,defaultFormattingWidth:"wide"})};function wa(n){return(t,e={})=>{const r=e.width,v=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],f=t.match(v);if(!f)return null;const y=f[0],x=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],h=Array.isArray(x)?i0(x,a=>a.test(y)):r0(x,a=>a.test(y));let p;p=n.valueCallback?n.valueCallback(h):h,p=e.valueCallback?e.valueCallback(p):p;const s=t.slice(y.length);return{value:p,rest:s}}}function r0(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function i0(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function o0(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const v=r[0],f=t.match(n.parsePattern);if(!f)return null;let y=n.valueCallback?n.valueCallback(f[0]):f[0];y=e.valueCallback?e.valueCallback(y):y;const x=t.slice(v.length);return{value:y,rest:x}}}const s0=/^(\d+)(th|st|nd|rd)?/i,a0=/\d+/i,l0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},c0={any:[/^b/i,/^(a|c)/i]},u0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},h0={any:[/1/i,/2/i,/3/i,/4/i]},d0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},p0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},g0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},f0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},m0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},v0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},y0={ordinalNumber:o0({matchPattern:s0,parsePattern:a0,valueCallback:n=>parseInt(n,10)}),era:wa({matchPatterns:l0,defaultMatchWidth:"wide",parsePatterns:c0,defaultParseWidth:"any"}),quarter:wa({matchPatterns:u0,defaultMatchWidth:"wide",parsePatterns:h0,defaultParseWidth:"any",valueCallback:n=>n+1}),month:wa({matchPatterns:d0,defaultMatchWidth:"wide",parsePatterns:p0,defaultParseWidth:"any"}),day:wa({matchPatterns:g0,defaultMatchWidth:"wide",parsePatterns:f0,defaultParseWidth:"any"}),dayPeriod:wa({matchPatterns:m0,defaultMatchWidth:"any",parsePatterns:v0,defaultParseWidth:"any"})},Cp={code:"en-US",formatDistance:jb,formatLong:qb,formatRelative:Gb,localize:n0,match:y0,options:{weekStartsOn:0,firstWeekContainsDate:1}};function w0(n,t){const e=wn(n,void 0);return Fb(e,Bb(e))+1}function kp(n,t){const e=wn(n,void 0),r=+Fs(e)-+Pb(e);return Math.round(r/6048e5)+1}function Xc(n,t){var e,r,v,f;const y=wn(n,t==null?void 0:t.in),x=y.getFullYear(),h=Ds(),p=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??h.firstWeekContainsDate??((f=(v=h.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,s=qn((t==null?void 0:t.in)||n,0);s.setFullYear(x+1,0,p),s.setHours(0,0,0,0);const a=To(s,t),u=qn((t==null?void 0:t.in)||n,0);u.setFullYear(x,0,p),u.setHours(0,0,0,0);const l=To(u,t);return+y>=+a?x+1:+y>=+l?x:x-1}function b0(n,t){var e,r,v,f;const y=Ds(),x=(t==null?void 0:t.firstWeekContainsDate)??((r=(e=t==null?void 0:t.locale)==null?void 0:e.options)==null?void 0:r.firstWeekContainsDate)??y.firstWeekContainsDate??((f=(v=y.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,h=Xc(n,t),p=qn((t==null?void 0:t.in)||n,0);return p.setFullYear(h,0,x),p.setHours(0,0,0,0),To(p,t)}function Sp(n,t){const e=wn(n,t==null?void 0:t.in),r=+To(e,t)-+b0(e,t);return Math.round(r/6048e5)+1}function rn(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const Mo={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return rn(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):rn(e+1,2)},d(n,t){return rn(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return rn(n.getHours()%12||12,t.length)},H(n,t){return rn(n.getHours(),t.length)},m(n,t){return rn(n.getMinutes(),t.length)},s(n,t){return rn(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),v=Math.trunc(r*Math.pow(10,e-3));return rn(v,t.length)}},Ps={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ap={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),v=r>0?r:1-r;return e.ordinalNumber(v,{unit:"year"})}return Mo.y(n,t)},Y:function(n,t,e,r){const v=Xc(n,r),f=v>0?v:1-v;if(t==="YY"){const y=f%100;return rn(y,2)}return t==="Yo"?e.ordinalNumber(f,{unit:"year"}):rn(f,t.length)},R:function(n,t){const e=wp(n);return rn(e,t.length)},u:function(n,t){const e=n.getFullYear();return rn(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return rn(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return rn(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return Mo.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return rn(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const v=Sp(n,r);return t==="wo"?e.ordinalNumber(v,{unit:"week"}):rn(v,t.length)},I:function(n,t,e){const r=kp(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):rn(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Mo.d(n,t)},D:function(n,t,e){const r=w0(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):rn(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const v=n.getDay(),f=(v-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return rn(f,2);case"eo":return e.ordinalNumber(f,{unit:"day"});case"eee":return e.day(v,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(v,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(v,{width:"short",context:"formatting"});case"eeee":default:return e.day(v,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const v=n.getDay(),f=(v-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return rn(f,t.length);case"co":return e.ordinalNumber(f,{unit:"day"});case"ccc":return e.day(v,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(v,{width:"narrow",context:"standalone"});case"cccccc":return e.day(v,{width:"short",context:"standalone"});case"cccc":default:return e.day(v,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),v=r===0?7:r;switch(t){case"i":return String(v);case"ii":return rn(v,t.length);case"io":return e.ordinalNumber(v,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const r=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let v;switch(r===12?v=Ps.noon:r===0?v=Ps.midnight:v=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(v,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let v;switch(r>=17?v=Ps.evening:r>=12?v=Ps.afternoon:r>=4?v=Ps.morning:v=Ps.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(v,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(v,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(v,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return Mo.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Mo.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):rn(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Mo.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Mo.s(n,t)},S:function(n,t){return Mo.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return $p(r);case"XXXX":case"XX":return Jo(r);case"XXXXX":case"XXX":default:return Jo(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return $p(r);case"xxxx":case"xx":return Jo(r);case"xxxxx":case"xxx":default:return Jo(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_p(r,":");case"OOOO":default:return"GMT"+Jo(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_p(r,":");case"zzzz":default:return"GMT"+Jo(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return rn(r,t.length)},T:function(n,t,e){return rn(+n,t.length)}};function _p(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.trunc(r/60),f=r%60;return f===0?e+String(v):e+String(v)+t+rn(f,2)}function $p(n,t){return n%60===0?(n>0?"-":"+")+rn(Math.abs(n)/60,2):Jo(n,t)}function Jo(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=rn(Math.trunc(r/60),2),f=rn(r%60,2);return e+v+t+f}const Tp=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Mp=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},x0=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],v=e[2];if(!v)return Tp(n,t);let f;switch(r){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;case"PPPP":default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",Tp(r,t)).replace("{{time}}",Mp(v,t))},Qc={p:Mp,P:x0},C0=/^D+$/,k0=/^Y+$/,S0=["D","DD","YY","YYYY"];function Ep(n){return C0.test(n)}function Ip(n){return k0.test(n)}function Zc(n,t,e){const r=A0(n,t,e);if(console.warn(r),S0.includes(n))throw new RangeError(r)}function A0(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const _0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T0=/^'([^]*?)'?$/,M0=/''/g,E0=/[a-zA-Z]/;function es(n,t,e){var r,v,f,y,x,h,p,s;const a=Ds(),u=(e==null?void 0:e.locale)??a.locale??Cp,l=(e==null?void 0:e.firstWeekContainsDate)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.firstWeekContainsDate)??a.firstWeekContainsDate??((y=(f=a.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)??1,o=(e==null?void 0:e.weekStartsOn)??((h=(x=e==null?void 0:e.locale)==null?void 0:x.options)==null?void 0:h.weekStartsOn)??a.weekStartsOn??((s=(p=a.locale)==null?void 0:p.options)==null?void 0:s.weekStartsOn)??0,c=wn(n,e==null?void 0:e.in);if(!xp(c))throw new RangeError("Invalid time value");let d=t.match($0).map(b=>{const I=b[0];if(I==="p"||I==="P"){const T=Qc[I];return T(b,u.formatLong)}return b}).join("").match(_0).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const I=b[0];if(I==="'")return{isToken:!1,value:I0(b)};if(Ap[I])return{isToken:!0,value:b};if(I.match(E0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+I+"`");return{isToken:!1,value:b}});u.localize.preprocessor&&(d=u.localize.preprocessor(c,d));const w={firstWeekContainsDate:l,weekStartsOn:o,locale:u};return d.map(b=>{if(!b.isToken)return b.value;const I=b.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&Ip(I)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&Ep(I))&&Zc(I,t,String(n));const T=Ap[I[0]];return T(c,I,u.localize,w)}).join("")}function I0(n){const t=n.match(T0);return t?t[1].replace(M0,"'"):n}var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Rp={exports:{}},Lp;function R0(){return Lp||(Lp=1,function(n,t){(function(){var e="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var v=function(s,a,u){if(typeof s!="string"){v.original?v.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(u=a),v.modules[s]||(v.payloads[s]=u,v.modules[s]=null)};v.modules={},v.payloads={};var f=function(s,a,u){if(typeof a=="string"){var l=h(s,a);if(l!=null)return u&&u(),l}else if(Object.prototype.toString.call(a)==="[object Array]"){for(var o=[],c=0,d=a.length;c<d;++c){var w=h(s,a[c]);if(w==null&&y.original)return;o.push(w)}return u&&u.apply(null,o)||!0}},y=function(s,a){var u=f("",s,a);return u==null&&y.original?y.original.apply(this,arguments):u},x=function(s,a){if(a.indexOf("!")!==-1){var u=a.split("!");return x(s,u[0])+"!"+x(s,u[1])}if(a.charAt(0)=="."){var l=s.split("/").slice(0,-1).join("/");for(a=l+"/"+a;a.indexOf(".")!==-1&&o!=a;){var o=a;a=a.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},h=function(s,a){a=x(s,a);var u=v.modules[a];if(!u){if(u=v.payloads[a],typeof u=="function"){var l={},o={id:a,uri:"",exports:l,packaged:!0},c=function(w,b){return f(a,w,b)},d=u(c,l,o);l=d||o.exports,v.modules[a]=l,delete v.payloads[a]}u=v.modules[a]=l||u}return u};function p(s){var a=r;r[s]||(r[s]={}),a=r[s],(!a.define||!a.define.packaged)&&(v.original=a.define,a.define=v,a.define.packaged=!0),(!a.require||!a.require.packaged)&&(y.original=a.require,a.require=y,a.require.packaged=!0)}p(e)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(e,r,v){function f(y,x,h){Object.defineProperty(y,x,{value:h,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||f(String.prototype,"startsWith",function(y,x){return x=x||0,this.lastIndexOf(y,x)===x}),String.prototype.endsWith||f(String.prototype,"endsWith",function(y,x){var h=this;(x===void 0||x>h.length)&&(x=h.length),x-=y.length;var p=h.indexOf(y,x);return p!==-1&&p===x}),String.prototype.repeat||f(String.prototype,"repeat",function(y){for(var x="",h=this;y>0;)y&1&&(x+=h),(y>>=1)&&(h+=h);return x}),String.prototype.includes||f(String.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Object.assign||(Object.assign=function(y){if(y==null)throw new TypeError("Cannot convert undefined or null to object");for(var x=Object(y),h=1;h<arguments.length;h++){var p=arguments[h];p!=null&&Object.keys(p).forEach(function(s){x[s]=p[s]})}return x}),Object.values||(Object.values=function(y){return Object.keys(y).map(function(x){return y[x]})}),Array.prototype.find||f(Array.prototype,"find",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return s}}),Array.prototype.findIndex||f(Array.prototype,"findIndex",function(y){for(var x=this.length,h=arguments[1],p=0;p<x;p++){var s=this[p];if(y.call(h,s,p,this))return p}}),Array.prototype.includes||f(Array.prototype,"includes",function(y,x){return this.indexOf(y,x)!=-1}),Array.prototype.fill||f(Array.prototype,"fill",function(y){for(var x=this,h=x.length>>>0,p=arguments[1],s=p>>0,a=s<0?Math.max(h+s,0):Math.min(s,h),u=arguments[2],l=u===void 0?h:u>>0,o=l<0?Math.max(h+l,0):Math.min(l,h);a<o;)x[a]=y,a++;return x}),Array.of||f(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,r,v){e("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(e,r,v){r.deepCopy=function f(y){if(typeof y!="object"||!y)return y;var x;if(Array.isArray(y)){x=[];for(var h=0;h<y.length;h++)x[h]=f(y[h]);return x}if(Object.prototype.toString.call(y)!=="[object Object]")return y;x={};for(var h in y)x[h]=f(y[h]);return x}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(e,r,v){r.last=function(x){return x[x.length-1]},r.stringReverse=function(x){return x.split("").reverse().join("")},r.stringRepeat=function(x,h){for(var p="";h>0;)h&1&&(p+=x),(h>>=1)&&(x+=x);return p};var f=/^\s\s*/,y=/\s\s*$/;r.stringTrimLeft=function(x){return x.replace(f,"")},r.stringTrimRight=function(x){return x.replace(y,"")},r.copyObject=function(x){var h={};for(var p in x)h[p]=x[p];return h},r.copyArray=function(x){for(var h=[],p=0,s=x.length;p<s;p++)x[p]&&typeof x[p]=="object"?h[p]=this.copyObject(x[p]):h[p]=x[p];return h},r.deepCopy=e("./deep_copy").deepCopy,r.arrayToMap=function(x){for(var h={},p=0;p<x.length;p++)h[x[p]]=1;return h},r.createMap=function(x){var h=Object.create(null);for(var p in x)h[p]=x[p];return h},r.arrayRemove=function(x,h){for(var p=0;p<=x.length;p++)h===x[p]&&x.splice(p,1)},r.escapeRegExp=function(x){return x.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(x){return(""+x).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(x,h){var p=[];return x.replace(h,function(s){p.push({offset:arguments[arguments.length-2],length:s.length})}),p},r.deferredCall=function(x){var h=null,p=function(){h=null,x()},s=function(a){return s.cancel(),h=setTimeout(p,a||0),s};return s.schedule=s,s.call=function(){return this.cancel(),x(),s},s.cancel=function(){return clearTimeout(h),h=null,s},s.isPending=function(){return h},s},r.delayedCall=function(x,h){var p=null,s=function(){p=null,x()},a=function(u){p==null&&(p=setTimeout(s,u||h))};return a.delay=function(u){p&&clearTimeout(p),p=setTimeout(s,u||h)},a.schedule=a,a.call=function(){this.cancel(),x()},a.cancel=function(){p&&clearTimeout(p),p=null},a.isPending=function(){return p},a},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(x,h,p){return p&&x.codePointAt(h)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,r,v){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var f=typeof navigator=="object"?navigator:{},y=(/mac|win|linux/i.exec(f.platform)||["other"])[0].toLowerCase(),x=f.userAgent||"",h=f.appName||"";r.isWin=y=="win",r.isMac=y=="mac",r.isLinux=y=="linux",r.isIE=h=="Microsoft Internet Explorer"||h.indexOf("MSAppHost")>=0?parseFloat((x.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((x.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=x.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(x.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(x.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(x.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(x.split(" Edge/")[1])||void 0,r.isAIR=x.indexOf("AdobeAIR")>=0,r.isAndroid=x.indexOf("Android")>=0,r.isChromeOS=x.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(x)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,v){var f=e("./useragent"),y="http://www.w3.org/1999/xhtml";r.buildDom=function u(l,o,c){if(typeof l=="string"&&l){var d=document.createTextNode(l);return o&&o.appendChild(d),d}if(!Array.isArray(l))return l&&l.appendChild&&o&&o.appendChild(l),l;if(typeof l[0]!="string"||!l[0]){for(var w=[],b=0;b<l.length;b++){var I=u(l[b],o,c);I&&w.push(I)}return w}var T=document.createElement(l[0]),S=l[1],C=1;S&&typeof S=="object"&&!Array.isArray(S)&&(C=2);for(var b=C;b<l.length;b++)u(l[b],T,c);return C==2&&Object.keys(S).forEach(function(R){var L=S[R];R==="class"?T.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?T[R]=L:R==="ref"?c&&(c[L]=T):R==="style"?typeof L=="string"&&(T.style.cssText=L):L!=null&&T.setAttribute(R,L)}),o&&o.appendChild(T),T},r.getDocumentHead=function(u){return u||(u=document),u.head||u.getElementsByTagName("head")[0]||u.documentElement},r.createElement=function(u,l){return document.createElementNS?document.createElementNS(l||y,u):document.createElement(u)},r.removeChildren=function(u){u.innerHTML=""},r.createTextNode=function(u,l){var o=l?l.ownerDocument:document;return o.createTextNode(u)},r.createFragment=function(u){var l=u?u.ownerDocument:document;return l.createDocumentFragment()},r.hasCssClass=function(u,l){var o=(u.className+"").split(/\s+/g);return o.indexOf(l)!==-1},r.addCssClass=function(u,l){r.hasCssClass(u,l)||(u.className+=" "+l)},r.removeCssClass=function(u,l){for(var o=u.className.split(/\s+/g);;){var c=o.indexOf(l);if(c==-1)break;o.splice(c,1)}u.className=o.join(" ")},r.toggleCssClass=function(u,l){for(var o=u.className.split(/\s+/g),c=!0;;){var d=o.indexOf(l);if(d==-1)break;c=!1,o.splice(d,1)}return c&&o.push(l),u.className=o.join(" "),c},r.setCssClass=function(u,l,o){o?r.addCssClass(u,l):r.removeCssClass(u,l)},r.hasCssString=function(u,l){var o=0,c;if(l=l||document,c=l.querySelectorAll("style")){for(;o<c.length;)if(c[o++].id===u)return!0}},r.removeElementById=function(u,l){l=l||document,l.getElementById(u)&&l.getElementById(u).remove()};var x,h=[];r.useStrictCSP=function(u){x=u,u==!1?p():h||(h=[])};function p(){var u=h;h=null,u&&u.forEach(function(l){s(l[0],l[1])})}function s(u,l,o){if(!(typeof document>"u")){if(h){if(o)p();else if(o===!1)return h.push([u,l])}if(!x){var c=o;!o||!o.getRootNode?c=document:(c=o.getRootNode(),(!c||c==o)&&(c=document));var d=c.ownerDocument||c;if(l&&r.hasCssString(l,c))return null;l&&(u+=`
2
2
  /*# sourceURL=ace/css/`+l+" */");var w=r.createElement("style");w.appendChild(d.createTextNode(u)),l&&(w.id=l),c==d&&(c=r.getDocumentHead(d)),c.insertBefore(w,c.firstChild)}}}if(r.importCssString=s,r.importCssStylsheet=function(u,l){r.buildDom(["link",{rel:"stylesheet",href:u}],r.getDocumentHead(l))},r.scrollbarWidth=function(u){var l=r.createElement("ace_inner");l.style.width="100%",l.style.minWidth="0px",l.style.height="200px",l.style.display="block";var o=r.createElement("ace_outer"),c=o.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",o.appendChild(l);var d=u&&u.documentElement||document&&document.documentElement;if(!d)return 0;d.appendChild(o);var w=l.offsetWidth;c.overflow="scroll";var b=l.offsetWidth;return w===b&&(b=o.clientWidth),d.removeChild(o),w-b},r.computedStyle=function(u,l){return window.getComputedStyle(u,"")||{}},r.setStyle=function(u,l,o){u[l]!==o&&(u[l]=o)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=f.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,f.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var a=document.createElement("div");r.HI_DPI&&a.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!f.isEdge&&typeof a.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),a=null}r.HAS_CSS_TRANSFORMS?r.translate=function(u,l,o){u.style.transform="translate("+Math.round(l)+"px, "+Math.round(o)+"px)"}:r.translate=function(u,l,o){u.style.top=Math.round(o)+"px",u.style.left=Math.round(l)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,r,v){/*
3
3
  * based on code from:
4
4
  *
@@ -170,12 +170,12 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Tr,i
170
170
  `+Ye}else if(Ct.end.row>Z){var yt=C.session.getLine(Z+1);ze=Ct.end.row>Z+1?yt.length:Ct.end.column,ze+=Ye.length+1,Ye=Ye+`
171
171
  `+yt}else I&&xt>0&&(Ye=`
172
172
  `+Ye,ze+=1,ke+=1);Ye.length>o&&(ke<o&&ze<o?Ye=Ye.slice(0,o):(Ye=`
173
- `,ke==ze?ke=ze=0:(ke=0,ze=1)));var wn=Ye+`
173
+ `,ke==ze?ke=ze=0:(ke=0,ze=1)));var bn=Ye+`
174
174
 
175
- `;wn!=A&&(R.value=A=wn,N=B=wn.length)}if($e&&(N=R.selectionStart,B=R.selectionEnd),B!=ze||N!=ke||R.selectionEnd!=B)try{R.setSelectionRange(ke,ze),N=ke,B=ze}catch{}E=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=A.length&&ke.value===A&&A&&ke.selectionEnd!==B},ce=function(ke){E||(L?L=!1:ue(R)?(C.selectAll(),ae()):I&&R.selectionStart!=N&&ae())},fe=null;this.setInputHandler=function(ke){fe=ke},this.getInputHandler=function(){return fe};var $e=!1,Te=function(ke,ze){if($e&&($e=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ye=R.selectionStart,dt=R.selectionEnd,Ct=N,xt=A.length-B,Rt=ke,Et=ke.length-Ye,ct=ke.length-dt,yt=0;Ct>0&&A[yt]==ke[yt];)yt++,Ct--;for(Rt=Rt.slice(yt),yt=1;xt>0&&A.length-yt>N-1&&A[A.length-yt]==ke[ke.length-yt];)yt++,xt--;Et-=yt-1,ct-=yt-1;var wn=Rt.length-yt+1;if(wn<0&&(Ct=-wn,wn=0),Rt=Rt.slice(0,wn),!ze&&!Rt&&!Et&&!Ct&&!xt&&!ct)return"";H=!0;var br=!1;return x.isAndroid&&Rt==". "&&(Rt=" ",br=!0),Rt&&!Ct&&!xt&&!Et&&!ct||O?C.onTextInput(Rt):C.onTextInput(Rt,{extendLeft:Ct,extendRight:xt,restoreStart:Et,restoreEnd:ct}),H=!1,A=ke,N=Ye,B=dt,U=ct,br?`
176
- `:Rt},Ee=function(ke){if(E)return hn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var ze=R.value,Ye=Te(ze,!0);(ze.length>o+100||b.test(Ye)||I&&N<1&&N==B)&&ae()},Ge=function(ke,ze,Ye){var dt=ke.clipboardData||window.clipboardData;if(!(!dt||a)){var Ct=u||Ye?"Text":"text/plain";try{return ze?dt.setData(Ct,ze)!==!1:dt.getData(Ct)}catch(xt){if(!Ye)return Ge(xt,ze,!0)}}},qe=function(ke,ze){var Ye=C.getCopyText();if(!Ye)return f.preventDefault(ke);Ge(ke,Ye)?(w&&(ae(Ye),L=Ye,setTimeout(function(){L=!1},10)),ze?C.onCut():C.onCopy(),f.preventDefault(ke)):(L=!0,R.value=Ye,R.select(),setTimeout(function(){L=!1,ae(),ze?C.onCut():C.onCopy()}))},ut=function(ke){qe(ke,!0)},tt=function(ke){qe(ke,!1)},ht=function(ke){var ze=Ge(ke);s.pasteCancelled()||(typeof ze=="string"?(ze&&C.onPaste(ze,ke),x.isIE&&setTimeout(ae),f.preventDefault(ke)):(R.value="",F=!0))};f.addCommandKeyListener(R,function(ke,ze,Ye){if(!E)return C.onCommandKey(ke,ze,Ye)},C),f.addListener(R,"select",ce,C),f.addListener(R,"input",Ee,C),f.addListener(R,"cut",ut,C),f.addListener(R,"copy",tt,C),f.addListener(R,"paste",ht,C),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&f.addListener(S,"keydown",function(ke){if(!(x.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:tt(ke);break;case 86:ht(ke);break;case 88:ut(ke);break}},C);var Zt=function(ke){if(!(E||!C.onCompositionStart||C.$readOnly)&&(E={},!O)){ke.data&&(E.useTextareaForIME=!1),setTimeout(hn,0),C._signal("compositionStart"),C.on("mousedown",dr);var ze=C.getSelectionRange();ze.end.row=ze.start.row,ze.end.column=ze.start.column,E.markerRange=ze,E.selectionStart=N,C.onCompositionStart(E),E.useTextareaForIME?(A=R.value="",N=0,B=0):(R.msGetInputContext&&(E.context=R.msGetInputContext()),R.getInputContext&&(E.context=R.getInputContext()))}},hn=function(){if(!(!E||!C.onCompositionUpdate||C.$readOnly)){if(O)return dr();if(E.useTextareaForIME)C.onCompositionUpdate(R.value);else{var ke=R.value;Te(ke),E.markerRange&&(E.context&&(E.markerRange.start.column=E.selectionStart=E.context.compositionStartOffset),E.markerRange.end.column=E.markerRange.start.column+B-E.selectionStart+U)}}},qt=function(ke){!C.onCompositionEnd||C.$readOnly||(E=!1,C.onCompositionEnd(),C.off("mousedown",dr),ke&&Ee())};function dr(){_=!0,R.blur(),R.focus(),_=!1}var dn=p.delayedCall(hn,50).schedule.bind(null,null);function Mn(ke){ke.keyCode==27&&R.value.length<R.selectionStart&&(E||(A=R.value),N=B=-1,ae()),dn()}f.addListener(R,"compositionstart",Zt,C),f.addListener(R,"compositionupdate",hn,C),f.addListener(R,"keyup",Mn,C),f.addListener(R,"keydown",dn,C),f.addListener(R,"compositionend",qt,C),this.getElement=function(){return R},this.setCommandMode=function(ke){O=ke,R.readOnly=!1},this.setReadOnly=function(ke){O||(R.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){$e=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,ze){P||(P=R.style.cssText),R.style.cssText=(ze?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ye=C.container.getBoundingClientRect(),dt=h.computedStyle(C.container),Ct=Ye.top+(parseInt(dt.borderTopWidth)||0),xt=Ye.left+(parseInt(dt.borderLeftWidth)||0),Rt=Ye.bottom-Ct-R.clientHeight-2,Et=function(ct){h.translate(R,ct.clientX-xt-2,Math.min(ct.clientY-Ct-2,Rt))};Et(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(En),x.isWin&&f.capture(C.container,Et,Gn))},this.onContextMenuClose=Gn;var En;function Gn(){clearTimeout(En),En=setTimeout(function(){P&&(R.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var vt=function(ke){C.textInput.onContextMenu(ke),Gn()};f.addListener(R,"mouseup",vt,C),f.addListener(R,"mousedown",function(ke){ke.preventDefault(),Gn()},C),f.addListener(C.renderer.scroller,"contextmenu",vt,C),f.addListener(R,"contextmenu",vt,C),w&&He(S,C,R);function He(ke,ze,Ye){var dt=null,Ct=!1;Ye.addEventListener("keydown",function(Rt){dt&&clearTimeout(dt),Ct=!0},!0),Ye.addEventListener("keyup",function(Rt){dt=setTimeout(function(){Ct=!1},100)},!0);var xt=function(Rt){if(document.activeElement===Ye&&!(Ct||E||ze.$mouseHandler.isMousePressed)&&!L){var Et=Ye.selectionStart,ct=Ye.selectionEnd,yt=null,wn=0;if(Et==0?yt=c.up:Et==1?yt=c.home:ct>B&&A[ct]==`
177
- `?yt=c.end:Et<N&&A[Et-1]==" "?(yt=c.left,wn=d.option):Et<N||Et==N&&B!=N&&Et==ct?yt=c.left:ct>B&&A.slice(0,ct).split(`
178
- `).length>2?yt=c.down:ct>B&&A[ct-1]==" "?(yt=c.right,wn=d.option):(ct>B||ct==B&&B!=N&&Et==ct)&&(yt=c.right),Et!==ct&&(wn|=d.shift),yt){var br=ze.onCommandKey({},wn,yt);if(!br&&ze.commands){yt=c.keyCodeToString(yt);var zr=ze.commands.findKeyCommand(wn,yt);zr&&ze.execCommand(zr)}N=Et,B=ct,ae("")}}};document.addEventListener("selectionchange",xt),ze.on("destroy",function(){document.removeEventListener("selectionchange",xt)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=T,r.$setUserAgentForTests=function(S,C){I=S,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,v){var f=e("../lib/useragent"),y=0,x=550,h=function(){function a(u){u.$clickSelection=null;var l=u.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var l=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,d=u.getButton();if(d!==0){var w=c.getSelectionRange(),b=w.isEmpty();(b||d==1)&&c.selection.moveToPosition(o),d==2&&(c.textInput.onContextMenu(u.domEvent),f.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,l){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):l||o.selection.moveToPosition(u),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,u=d.anchor}l.selection.setSelectionAnchor(u.row,u.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var l,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)l=this.$clickSelection.end,(d.end.row!=c.row||d.end.column!=c.column)&&(c=d.start);else if(b==1&&w>=0)l=this.$clickSelection.start,(d.start.row!=c.row||d.start.column!=c.column)&&(c=d.end);else if(w==-1&&b==1)c=d.end,l=d.start;else{var I=s(this.$clickSelection,c);c=I.cursor,l=I.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(c),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(u>y||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var l=u.getDocumentPosition(),o=this.editor,c=o.session,d=c.getBracketRange(l);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},a.prototype.onTripleClick=function(u){var l=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(u){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=u.domEvent.timeStamp,d=c-o.t,w=d?u.wheelX/d:o.vx,b=d?u.wheelY/d:o.vy;d<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var I=Math.abs(w/b),T=!1;if(I>=1&&l.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(T=!0),I<=1&&l.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(T=!0),T)o.allowed=c;else if(c-o.allowed<x){var S=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);S?(T=!0,o.allowed=c):o.allowed=0}if(o.t=c,o.vx=w,o.vy=b,T)return l.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function p(a,u,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-u,2))}function s(a,u){if(a.start.row==a.end.row)var l=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=u.column-4;else var l=2*u.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,v){r.preventParentScroll=function(f){f.stopPropagation();var y=f.currentTarget,x=y.scrollHeight>y.clientHeight;x||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,v){var f=this&&this.__extends||function(){var c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,p=e("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function c(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return c.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(d){this.getElement().textContent=d},c.prototype.setHtml=function(d){this.getElement().innerHTML=d},c.prototype.setPosition=function(d,w){this.getElement().style.left=d+"px",this.getElement().style.top=w+"px"},c.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},c.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},c.prototype.show=function(d,w,b){d!=null&&this.setText(d),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),u=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},c.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var d,w,b,I;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var S=y(this.popups),C=S.next();!C.done;C=S.next()){var R=C.value,L=!0;try{for(var F=(b=void 0,y(T)),E=F.next();!E.done;E=F.next()){var H=E.value;if(this.doPopupsOverlap(H,R)){L=!1;break}}}catch(P){b={error:P}}finally{try{E&&!E.done&&(I=F.return)&&I.call(F)}finally{if(b)throw b.error}}L?T.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=S.return)&&w.call(S)}finally{if(d)throw d.error}}},c.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),I=w.getElement().getBoundingClientRect();return b.left<I.right&&b.right>I.left&&b.top<I.bottom&&b.bottom>I.top},c}(),l=new u;r.popupManager=l,r.Tooltip=a;var o=function(c){f(d,c);function d(w){w===void 0&&(w=document.body);var b=c.call(this,w)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var I=b.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",b.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(b)),I.addEventListener("wheel",p),b}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var I=b.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.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)},d.prototype.isOutsideOfText=function(w){var b=w.editor,I=w.getDocumentPosition(),T=b.session.getLine(I.row);if(I.column==T.length){var S=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(I.row,I.column);if(C.column!=S.column||C.row!=S.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,I,T){var S=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),L=C.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var F=this.getElement();F.innerHTML="",F.appendChild(I),F.style.maxHeight="",F.style.display="block";var E=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-E<0&&R.pageY<P&&(O=!1),F.style.maxHeight=(O?R.pageY:P)-S+"px",F.style.top=O?"":R.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.pageX,window.innerWidth-H-S)+"px"}},d.prototype.addMarker=function(w,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(w,"ace_highlight-marker","text")},d.prototype.hide=function(w){!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.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.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())},d}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,v){var f=this&&this.__extends||function(){var c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),p=e("../tooltip").Tooltip,s=e("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function l(c){var d=c.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);c.editor.setDefaultHandler("guttermousedown",function(L){if(!(!d.isFocused()||L.getButton()!=0)){var F=w.getRegion(L);if(F!="foldWidgets"){var E=L.getDocumentPosition().row,H=d.session.selection;if(L.getShiftKey())H.selectTo(E,0);else{if(L.domEvent.detail==2)return d.selectAll(),L.preventDefault();c.$clickSelection=d.selection.getLineRange(E)}return c.setState("selectByLines"),c.captureMouse(L),L.preventDefault()}}});var I,T;function S(){var L=T.getDocumentPosition().row,F=d.session.getLength();if(L==F){var E=d.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(E>d.session.documentToScreenRow(H.row,H.column))return C()}if(b.showTooltip(L),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)R(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var _=O.element.querySelector(".ace_gutter_annotation"),A=_.getBoundingClientRect(),N=b.getElement().style;N.left=A.right-a+"px",N.top=A.bottom-u+"px"}else R(T)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||b.getElement().contains(L.relatedTarget))||(I&&(I=clearTimeout(I)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(L){b.setPosition(L.x,L.y)}c.editor.setDefaultHandler("guttermousemove",function(L){var F=L.domEvent.target||L.domEvent.srcElement;if(x.hasCssClass(F,"ace_fold-widget")||x.hasCssClass(F,"ace_custom-widget"))return C();b.isOpen&&c.$tooltipFollowsMouse&&R(L),T=L,!I&&(I=setTimeout(function(){I=null,T&&!c.isMousePressed&&S()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(L){T=null,b.isOpen&&(I=setTimeout(function(){I=null,C(L)},50))},d)}r.GutterHandler=l;var o=function(c){f(d,c);function d(w,b){b===void 0&&(b=!1);var I=c.call(this,w.container)||this;I.editor=w,I.visibleTooltipRow;var T=I.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",b&&(I.onMouseOut=I.onMouseOut.bind(I),T.addEventListener("mouseout",I.onMouseOut)),I}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,b){var I=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+S>I&&(w-=w+S-I),b+C>T&&(b-=20+C),p.prototype.setPosition.call(this,w,b)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(w){var b,I=this.editor.renderer.$gutterLayer,T=I.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var C=I.session.getFoldLine(w);if(C&&I.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},F,E=w+1;E<=C.end.row;E++)if(I.$annotations[E])for(var H=0;H<I.$annotations[E].text.length;H++){var P=I.$annotations[E].type[H];R[P].push(I.$annotations[E].text[H]),(!F||L[P]<L[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");S.displayText.push(O),S.type.push(F+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},A=I.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<S.displayText.length;E++){var N=x.createElement("span"),B=x.createElement("span");(b=B.classList).add.apply(b,["ace_".concat(S.type[E]),A]),B.setAttribute("aria-label","".concat(d.annotationLabels[S.type[E].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(x.createTextNode(" ")),N.appendChild(B),N.appendChild(x.createTextNode(S.displayText[E])),N.appendChild(x.createElement("br")),_[S.type[E].replace("_fold","")].push(N)}var U=this.getElement();x.removeChildren(U),_.error.forEach(function(K){return U.appendChild(K)}),_.security.forEach(function(K){return U.appendChild(K)}),_.warning.forEach(function(K){return U.appendChild(K)}),_.info.forEach(function(K){return U.appendChild(K)}),_.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},d.annotationsToSummaryString=function(w){var b,I,T=[],S=["error","security","warning","info","hint"];try{for(var C=y(S),R=C.next();!R.done;R=C.next()){var L=R.value;if(w[L].length){var F=w[L].length===1?d.annotationLabels[L].singular:d.annotationLabels[L].plural;T.push("".concat(w[L].length," ").concat(F))}}}catch(E){b={error:E}}finally{try{R&&!R.done&&(I=C.return)&&I.call(C)}finally{if(b)throw b.error}}return T.join(", ")},d}(p);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,v){var f=e("../lib/event"),y=e("../lib/useragent"),x=function(){function h(p,s){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=s,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){f.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){f.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(p,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,s=p.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return f.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return y.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,v){var f=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,p=200,s=5;function a(l){var o=l.editor,c=f.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,b,I,T,S,C,R,L=0,F,E,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(c),ue.setDragImage&&ue.setDragImage(c,0,0),setTimeout(function(){o.container.removeChild(c)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,E=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,b||B(),L++,ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,b||(B(),L++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&b)return U(),F=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(E)switch(F){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=o.moveText(C,R);break;case"copy":C=o.moveText(C,R,!0);break}else{var ue=ae.getData("Text");C={start:R,end:o.session.insert(R,ue)},o.focus(),F=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(l),o),y.addListener(w,"dragend",this.onDragEnd.bind(l),o),y.addListener(w,"dragenter",this.onDragEnter.bind(l),o),y.addListener(w,"dragover",this.onDragOver.bind(l),o),y.addListener(w,"dragleave",this.onDragLeave.bind(l),o),y.addListener(w,"drop",this.onDrop.bind(l),o);function _(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,fe=!ae||ne.column!=ae.column;if(!P||ce||fe)o.moveCursorToPosition(ne),P=ue,O={x:I,y:T};else{var $e=u(O.x,O.y,I,T);$e>s?P=null:ue-P>=p&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Te={x:{left:I-$e.left,right:$e.right-I},y:{top:T-$e.top,bottom:$e.bottom-T}},Ee=Math.min(Te.x.left,Te.x.right),Ge=Math.min(Te.y.top,Te.y.bottom),qe={row:ne.row,column:ne.column};Ee/fe<=2&&(qe.column+=Te.x.left<Te.x.right?-3:2),Ge/ce<=1&&(qe.row+=Te.y.top<Te.y.bottom?-1:1);var ut=ne.row!=qe.row,tt=ne.column!=qe.column,ht=!ae||ne.row!=ae.row;ut||tt&&!ht?H?ue-H>=h&&o.renderer.scrollCursorIntoView(qe):H=ue:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(I,T),_(R,ne),A(R,ne)}function B(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),N(),S=setInterval(N,20),L=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(S),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!E&&o.$resetCursorStyle(),C=null,R=null,L=0,H=null,P=null,y.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&b&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=x.isMac?ne.altKey:ne.ctrlKey,fe="uninitialized";try{fe=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return ce&&ae.indexOf(fe)>=0?$e="copy":ue.indexOf(fe)>=0?$e="move":ae.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=x.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&o.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,c=l.inSelection(),d=l.getButton(),w=l.domEvent.detail||1;if(w===1&&d===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var I=o.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function u(l,o,c,d){return Math.sqrt(Math.pow(c-l,2)+Math.pow(d-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,v){var f=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,p){var s="scroll",a,u,l,o,c,d,w=0,b,I=0,T=0,S=0,C,R;function L(){var _=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=p.getCopyText(),Z=p.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(A?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},B=function(K){return p.commands.canExecute(K,p)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?_.readText().then(function(te){p.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(_?_.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(Z)),R.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&p.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),p.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function F(){if(!p.getOption("enableMobileMenu")){R&&E();return}R||L();var _=p.selection.cursor,A=p.renderer.textToScreenCoordinates(_.row,_.column),N=p.renderer.textToScreenCoordinates(0,0).pageX,B=p.renderer.scrollLeft,U=p.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",E)}function E(_){R&&(R.style.display="none"),p.off("input",E)}function H(){c=null,clearTimeout(c);var _=p.selection.getRange(),A=_.contains(b.row,b.column);(_.isEmpty()||!A)&&(p.selection.moveToPosition(b),p.selection.selectWord()),s="wait",F()}function P(){c=null,clearTimeout(c),p.selection.moveToPosition(b);var _=I>=2?p.selection.getLineRange(b.row):p.session.getBracketRange(b);_&&!_.isEmpty()?p.selection.setRange(_):p.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(_){if(C){var A=p.textInput.getElement();A.focus()}},p),y.addListener(h,"touchstart",function(_){var A=_.touches;if(c||A.length>1){clearTimeout(c),c=null,l=-1,s="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var N=p.renderer.layerConfig.lineHeight,B=p.renderer.layerConfig.lineHeight,U=_.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(u-te)>N&&(l=-1),a=_.clientX=Z,u=_.clientY=te,T=S=0;var he=new f(_,p);if(b=he.getDocumentPosition(),U-l<500&&A.length==1&&!w)I++,_.preventDefault(),_.button=0,P();else{I=0;var ne=p.selection.cursor,ae=p.selection.isEmpty()?ne:p.selection.anchor,ue=p.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=p.renderer.$cursorLayer.getPixelPosition(ae,!0),fe=p.renderer.scroller.getBoundingClientRect(),$e=p.renderer.layerConfig.offset,Te=p.renderer.scrollLeft,Ee=function(ut,tt){return ut=ut/B,tt=tt/N-.75,ut*ut+tt*tt};if(_.clientX<fe.left){s="zoom";return}var Ge=Ee(_.clientX-fe.left-ue.left+Te,_.clientY-fe.top-ue.top+$e),qe=Ee(_.clientX-fe.left-ce.left+Te,_.clientY-fe.top-ce.top+$e);Ge<3.5&&qe<3.5&&(s=Ge>qe?"cursor":"anchor"),qe<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",c=setTimeout(H,450)}l=U},p),y.addListener(h,"touchend",function(_){C=p.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):c?(p.selection.moveToPosition(b),w=0,F()):s=="scroll"?(O(),E()):F(),clearTimeout(c),c=null},p),y.addListener(h,"touchmove",function(_){c&&(clearTimeout(c),c=null);var A=_.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=a-N.clientX,U=u-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return _.preventDefault();a=N.clientX,u=N.clientY,_.clientX=N.clientX,_.clientY=N.clientY;var K=_.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new f(_,p);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&(T=B/Z,S=U/Z),p._emit("mousewheel",te),te.propagationStopped||(T=S=0)}else{var he=new f(_,p),ne=he.getDocumentPosition();s=="cursor"?p.selection.moveCursorToPosition(ne):s=="anchor"&&p.selection.setSelectionAnchor(ne.row,ne.column),p.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},p);function O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs(T)<.01&&(T=0),Math.abs(S)<.01&&(S=0),w<20&&(T=.9*T),w<20&&(S=.9*S);var _=p.session.getScrollTop();p.renderer.scrollBy(10*T,10*S),_==p.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,v){var f=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,p=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),l=function(){function o(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=c,new x(this),new h(this),new s(this);var w=function(T){var S=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());S&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},b=c.renderer.getMouseEventTarget();f.addListener(b,"click",this.onMouseEvent.bind(this,"click"),c),f.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),f.addMultiMouseDownListener([b,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),f.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var I=c.renderer.$gutter;f.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),f.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),c),f.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),f.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),f.addListener(b,"mousedown",w,c),f.addListener(I,"mousedown",w,c),y.isIE&&c.renderer.scrollBarV&&(f.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),f.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(T){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var S=c.renderer.screenToTextCoordinates(T.x,T.y),C=c.session.selection.getRange(),R=c.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},c)}return o.prototype.onMouseEvent=function(c,d){this.editor.session&&this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseMove=function(c,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseWheel=function(c,d){var w=new p(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(c,w)},o.prototype.setState=function(c){this.state=c},o.prototype.captureMouse=function(c,d){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var I=this,T=function(F){if(F){if(y.isWebKit&&!F.which&&I.releaseMouse)return I.releaseMouse();I.x=F.clientX,I.y=F.clientY,d&&d(F),I.mouseEvent=new p(F,I.editor),I.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",R),clearInterval(L),w.session&&C(),I[I.state+"End"]&&I[I.state+"End"](F),I.state="",I.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,F&&I.onMouseEvent("mouseup",F),w.endOperation()},C=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1};if(y.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){S(c)});var R=function(F){I.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=T,I.releaseMouse=f.capture(this.editor.container,T,S);var L=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var c=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),d&&d.domEvent&&f.stopEvent(d.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,u.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,v){var f=e("../lib/dom"),y=function(){function x(h){h.on("click",function(p){var s=p.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(p.getAccelKey()?a.removeFold(u):a.expandFold(u),p.stop());var l=p.domEvent&&p.domEvent.target;l&&f.hasCssClass(l,"ace_inline_button")&&f.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,p),h.isFocused()||h.focus(),p.stop()}}),h.on("gutterdblclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session,l=u.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}p.stop()}})}return x}();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,v){var f=e("../lib/keys"),y=e("../lib/event"),x=function(){function h(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return h.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},h.prototype.setKeyboardHandler=function(p){var s=this.$handlers;if(s[s.length-1]!=p){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(p,1)}},h.prototype.addKeyboardHandler=function(p,s){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var a=this.$handlers.indexOf(p);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(p):this.$handlers.splice(s,0,p),a==-1&&p.attach&&p.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(p){var s=this.$handlers.indexOf(p);return s==-1?!1:(this.$handlers.splice(s,1),p.detach&&p.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var p=this.$data,s=p.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,p)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(p,s,a,u){for(var l,o=!1,c=this.$editor.commands,d=this.$handlers.length;d--&&(l=this.$handlers[d].handleKeyboard(this.$data,p,s,a,u),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=c.exec(l.command,this.$editor,l.args,u),o&&u&&p!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&p==-1&&(l={command:"insertstring"},o=c.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(p,s,a){var u=f.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,p)},h.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},h}();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,v){var f=0,y=0,x=!1,h=!1,p=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,l=1,o=0,c=1,d=2,w=3,b=4,I=5,T=6,S=7,C=8,R=9,L=10,F=11,E=12,H=13,P=14,O=15,_=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,T,I,T,C,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,I,I,I,T,C,b,b,F,F,F,b,b,b,b,b,L,R,L,R,R,d,d,d,d,d,d,d,d,d,d,R,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,N,N,N,N,N,N,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,b,F,F,F,F,b,b,b,b,o,b,b,N,b,b,F,F,d,d,b,o,b,b,b,d,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,c,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,I,H,P,O,_,A,R,F,F,F,F,F,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,R,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];function K(ne,ae,ue,ce){var fe=f?a:s,$e=null,Te=null,Ee=null,Ge=0,qe=null,ut=null,tt=-1,ht=null,Zt=null,hn=[];if(!ce)for(ht=0,ce=[];ht<ue;ht++)ce[ht]=he(ne[ht]);for(y=f,x=!1,h=!1,p=!1,Zt=0;Zt<ue;Zt++){if($e=Ge,hn[Zt]=Te=te(ne,ce,hn,Zt),Ge=fe[$e][Te],qe=Ge&240,Ge&=15,ae[Zt]=Ee=fe[Ge][5],qe>0)if(qe==16){for(ht=tt;ht<Zt;ht++)ae[ht]=1;tt=-1}else tt=-1;if(ut=fe[Ge][6],ut)tt==-1&&(tt=Zt);else if(tt>-1){for(ht=tt;ht<Zt;ht++)ae[ht]=Ee;tt=-1}ce[Zt]==I&&(ae[Zt]=0),y|=Ee}if(p){for(ht=0;ht<ue;ht++)if(ce[ht]==T){ae[ht]=f;for(var qt=ht-1;qt>=0&&ce[qt]==C;qt--)ae[qt]=f}}}function Z(ne,ae,ue){if(!(y<ne)){if(ne==1&&f==l&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,$e,Te,Ee,Ge;fe<ce;){if(ae[fe]>=ne){for($e=fe+1;$e<ce&&ae[$e]>=ne;)$e++;for(Te=fe,Ee=$e-1;Te<Ee;Te++,Ee--)Ge=ue[Te],ue[Te]=ue[Ee],ue[Ee]=Ge;fe=$e}fe++}}}function te(ne,ae,ue,ce){var fe=ae[ce],$e,Te,Ee,Ge;switch(fe){case o:case c:x=!1;case b:case w:return fe;case d:return x?w:d;case S:return x=!0,c;case C:return b;case R:return ce<1||ce+1>=ae.length||($e=ue[ce-1])!=d&&$e!=w||(Te=ae[ce+1])!=d&&Te!=w?b:(x&&(Te=w),Te==$e?Te:b);case L:return $e=ce>0?ue[ce-1]:I,$e==d&&ce+1<ae.length&&ae[ce+1]==d?d:b;case F:if(ce>0&&ue[ce-1]==d)return d;if(x)return b;for(Ge=ce+1,Ee=ae.length;Ge<Ee&&ae[Ge]==F;)Ge++;return Ge<Ee&&ae[Ge]==d?d:b;case E:for(Ee=ae.length,Ge=ce+1;Ge<Ee&&ae[Ge]==E;)Ge++;if(Ge<Ee){var qe=ne[ce],ut=qe>=1425&&qe<=2303||qe==64286;if($e=ae[Ge],ut&&($e==c||$e==S))return c}return ce<1||($e=ae[ce-1])==I?b:ue[ce-1];case I:return x=!1,h=!0,f;case T:return p=!0,b;case H:case P:case _:case A:case O:x=!1;case N:return b}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:B[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?c:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?d:S:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?S:b}r.L=o,r.R=c,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),$e=new Array(ce.length),Te=[];f=ue?l:u,K(ce,Te,ce.length,ae);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);Z(2,Te,fe),Z(1,Te,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ae[Ee]===w?Te[Ee]=r.AN:Te[Ee]===c&&(ae[Ee]>S&&ae[Ee]<H||ae[Ee]===b||ae[Ee]===N)?Te[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&(Te[Ee-1]=Te[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&(Te[ce.length-1]=r.B),ce[0]==="‫"&&(Te[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Te[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==c||ae[ce]==S||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,v){var f=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function p(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=f,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(s.getValue())}return p.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
175
+ `;bn!=A&&(R.value=A=bn,N=B=bn.length)}if($e&&(N=R.selectionStart,B=R.selectionEnd),B!=ze||N!=ke||R.selectionEnd!=B)try{R.setSelectionRange(ke,ze),N=ke,B=ze}catch{}E=!1}};this.resetSelection=ae,he&&C.onFocus();var ue=function(ke){return ke.selectionStart===0&&ke.selectionEnd>=A.length&&ke.value===A&&A&&ke.selectionEnd!==B},ce=function(ke){E||(L?L=!1:ue(R)?(C.selectAll(),ae()):I&&R.selectionStart!=N&&ae())},fe=null;this.setInputHandler=function(ke){fe=ke},this.getInputHandler=function(){return fe};var $e=!1,Te=function(ke,ze){if($e&&($e=!1),F)return ae(),ke&&C.onPaste(ke),F=!1,"";for(var Ye=R.selectionStart,dt=R.selectionEnd,Ct=N,xt=A.length-B,Rt=ke,Et=ke.length-Ye,ct=ke.length-dt,yt=0;Ct>0&&A[yt]==ke[yt];)yt++,Ct--;for(Rt=Rt.slice(yt),yt=1;xt>0&&A.length-yt>N-1&&A[A.length-yt]==ke[ke.length-yt];)yt++,xt--;Et-=yt-1,ct-=yt-1;var bn=Rt.length-yt+1;if(bn<0&&(Ct=-bn,bn=0),Rt=Rt.slice(0,bn),!ze&&!Rt&&!Et&&!Ct&&!xt&&!ct)return"";H=!0;var br=!1;return x.isAndroid&&Rt==". "&&(Rt=" ",br=!0),Rt&&!Ct&&!xt&&!Et&&!ct||O?C.onTextInput(Rt):C.onTextInput(Rt,{extendLeft:Ct,extendRight:xt,restoreStart:Et,restoreEnd:ct}),H=!1,A=ke,N=Ye,B=dt,U=ct,br?`
176
+ `:Rt},Ee=function(ke){if(E)return dn();if(ke&&ke.inputType){if(ke.inputType=="historyUndo")return C.execCommand("undo");if(ke.inputType=="historyRedo")return C.execCommand("redo")}var ze=R.value,Ye=Te(ze,!0);(ze.length>o+100||b.test(Ye)||I&&N<1&&N==B)&&ae()},Ge=function(ke,ze,Ye){var dt=ke.clipboardData||window.clipboardData;if(!(!dt||a)){var Ct=u||Ye?"Text":"text/plain";try{return ze?dt.setData(Ct,ze)!==!1:dt.getData(Ct)}catch(xt){if(!Ye)return Ge(xt,ze,!0)}}},qe=function(ke,ze){var Ye=C.getCopyText();if(!Ye)return f.preventDefault(ke);Ge(ke,Ye)?(w&&(ae(Ye),L=Ye,setTimeout(function(){L=!1},10)),ze?C.onCut():C.onCopy(),f.preventDefault(ke)):(L=!0,R.value=Ye,R.select(),setTimeout(function(){L=!1,ae(),ze?C.onCut():C.onCopy()}))},ut=function(ke){qe(ke,!0)},tt=function(ke){qe(ke,!1)},ht=function(ke){var ze=Ge(ke);s.pasteCancelled()||(typeof ze=="string"?(ze&&C.onPaste(ze,ke),x.isIE&&setTimeout(ae),f.preventDefault(ke)):(R.value="",F=!0))};f.addCommandKeyListener(R,function(ke,ze,Ye){if(!E)return C.onCommandKey(ke,ze,Ye)},C),f.addListener(R,"select",ce,C),f.addListener(R,"input",Ee,C),f.addListener(R,"cut",ut,C),f.addListener(R,"copy",tt,C),f.addListener(R,"paste",ht,C),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&f.addListener(S,"keydown",function(ke){if(!(x.isMac&&!ke.metaKey||!ke.ctrlKey))switch(ke.keyCode){case 67:tt(ke);break;case 86:ht(ke);break;case 88:ut(ke);break}},C);var Zt=function(ke){if(!(E||!C.onCompositionStart||C.$readOnly)&&(E={},!O)){ke.data&&(E.useTextareaForIME=!1),setTimeout(dn,0),C._signal("compositionStart"),C.on("mousedown",dr);var ze=C.getSelectionRange();ze.end.row=ze.start.row,ze.end.column=ze.start.column,E.markerRange=ze,E.selectionStart=N,C.onCompositionStart(E),E.useTextareaForIME?(A=R.value="",N=0,B=0):(R.msGetInputContext&&(E.context=R.msGetInputContext()),R.getInputContext&&(E.context=R.getInputContext()))}},dn=function(){if(!(!E||!C.onCompositionUpdate||C.$readOnly)){if(O)return dr();if(E.useTextareaForIME)C.onCompositionUpdate(R.value);else{var ke=R.value;Te(ke),E.markerRange&&(E.context&&(E.markerRange.start.column=E.selectionStart=E.context.compositionStartOffset),E.markerRange.end.column=E.markerRange.start.column+B-E.selectionStart+U)}}},qt=function(ke){!C.onCompositionEnd||C.$readOnly||(E=!1,C.onCompositionEnd(),C.off("mousedown",dr),ke&&Ee())};function dr(){_=!0,R.blur(),R.focus(),_=!1}var pn=p.delayedCall(dn,50).schedule.bind(null,null);function En(ke){ke.keyCode==27&&R.value.length<R.selectionStart&&(E||(A=R.value),N=B=-1,ae()),pn()}f.addListener(R,"compositionstart",Zt,C),f.addListener(R,"compositionupdate",dn,C),f.addListener(R,"keyup",En,C),f.addListener(R,"keydown",pn,C),f.addListener(R,"compositionend",qt,C),this.getElement=function(){return R},this.setCommandMode=function(ke){O=ke,R.readOnly=!1},this.setReadOnly=function(ke){O||(R.readOnly=ke)},this.setCopyWithEmptySelection=function(ke){},this.onContextMenu=function(ke){$e=!0,ae(),C._emit("nativecontextmenu",{target:C,domEvent:ke}),this.moveToMouse(ke,!0)},this.moveToMouse=function(ke,ze){P||(P=R.style.cssText),R.style.cssText=(ze?"z-index:100000;":"")+(x.isIE?"opacity:0.1;":"")+"text-indent: -"+(N+B)*C.renderer.characterWidth*.5+"px;";var Ye=C.container.getBoundingClientRect(),dt=h.computedStyle(C.container),Ct=Ye.top+(parseInt(dt.borderTopWidth)||0),xt=Ye.left+(parseInt(dt.borderLeftWidth)||0),Rt=Ye.bottom-Ct-R.clientHeight-2,Et=function(ct){h.translate(R,ct.clientX-xt-2,Math.min(ct.clientY-Ct-2,Rt))};Et(ke),ke.type=="mousedown"&&(C.renderer.$isMousePressed=!0,clearTimeout(In),x.isWin&&f.capture(C.container,Et,Yn))},this.onContextMenuClose=Yn;var In;function Yn(){clearTimeout(In),In=setTimeout(function(){P&&(R.style.cssText=P,P=""),C.renderer.$isMousePressed=!1,C.renderer.$keepTextAreaAtCursor&&C.renderer.$moveTextAreaToCursor()},0)}var vt=function(ke){C.textInput.onContextMenu(ke),Yn()};f.addListener(R,"mouseup",vt,C),f.addListener(R,"mousedown",function(ke){ke.preventDefault(),Yn()},C),f.addListener(C.renderer.scroller,"contextmenu",vt,C),f.addListener(R,"contextmenu",vt,C),w&&He(S,C,R);function He(ke,ze,Ye){var dt=null,Ct=!1;Ye.addEventListener("keydown",function(Rt){dt&&clearTimeout(dt),Ct=!0},!0),Ye.addEventListener("keyup",function(Rt){dt=setTimeout(function(){Ct=!1},100)},!0);var xt=function(Rt){if(document.activeElement===Ye&&!(Ct||E||ze.$mouseHandler.isMousePressed)&&!L){var Et=Ye.selectionStart,ct=Ye.selectionEnd,yt=null,bn=0;if(Et==0?yt=c.up:Et==1?yt=c.home:ct>B&&A[ct]==`
177
+ `?yt=c.end:Et<N&&A[Et-1]==" "?(yt=c.left,bn=d.option):Et<N||Et==N&&B!=N&&Et==ct?yt=c.left:ct>B&&A.slice(0,ct).split(`
178
+ `).length>2?yt=c.down:ct>B&&A[ct-1]==" "?(yt=c.right,bn=d.option):(ct>B||ct==B&&B!=N&&Et==ct)&&(yt=c.right),Et!==ct&&(bn|=d.shift),yt){var br=ze.onCommandKey({},bn,yt);if(!br&&ze.commands){yt=c.keyCodeToString(yt);var zr=ze.commands.findKeyCommand(bn,yt);zr&&ze.execCommand(zr)}N=Et,B=ct,ae("")}}};document.addEventListener("selectionchange",xt),ze.on("destroy",function(){document.removeEventListener("selectionchange",xt)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=T,r.$setUserAgentForTests=function(S,C){I=S,w=C}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,r,v){var f=e("../lib/useragent"),y=0,x=550,h=function(){function a(u){u.$clickSelection=null;var l=u.editor;l.setDefaultHandler("mousedown",this.onMouseDown.bind(u)),l.setDefaultHandler("dblclick",this.onDoubleClick.bind(u)),l.setDefaultHandler("tripleclick",this.onTripleClick.bind(u)),l.setDefaultHandler("quadclick",this.onQuadClick.bind(u)),l.setDefaultHandler("mousewheel",this.onMouseWheel.bind(u));var o=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];o.forEach(function(c){u[c]=this[c]},this),u.selectByLines=this.extendSelectionBy.bind(u,"getLineRange"),u.selectByWords=this.extendSelectionBy.bind(u,"getWordRange")}return a.prototype.onMouseDown=function(u){var l=u.inSelection(),o=u.getDocumentPosition();this.mousedownEvent=u;var c=this.editor,d=u.getButton();if(d!==0){var w=c.getSelectionRange(),b=w.isEmpty();(b||d==1)&&c.selection.moveToPosition(o),d==2&&(c.textInput.onContextMenu(u.domEvent),f.isMozilla||u.preventDefault());return}if(this.mousedownEvent.time=Date.now(),l&&!c.isFocused()&&(c.focus(),this.$focusTimeout&&!this.$clickSelection&&!c.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(u);return}return this.captureMouse(u),this.startSelect(o,u.domEvent._clicks>1),u.preventDefault()},a.prototype.startSelect=function(u,l){u=u||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var o=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?o.selection.selectToPosition(u):l||o.selection.moveToPosition(u),l||this.select(),o.setStyle("ace_selecting"),this.setState("select"))},a.prototype.select=function(){var u,l=this.editor,o=l.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(o);if(c==-1)u=this.$clickSelection.end;else if(c==1)u=this.$clickSelection.start;else{var d=s(this.$clickSelection,o);o=d.cursor,u=d.anchor}l.selection.setSelectionAnchor(u.row,u.column)}l.selection.selectToPosition(o),l.renderer.scrollCursorIntoView()},a.prototype.extendSelectionBy=function(u){var l,o=this.editor,c=o.renderer.screenToTextCoordinates(this.x,this.y),d=o.selection[u](c.row,c.column);if(this.$clickSelection){var w=this.$clickSelection.comparePoint(d.start),b=this.$clickSelection.comparePoint(d.end);if(w==-1&&b<=0)l=this.$clickSelection.end,(d.end.row!=c.row||d.end.column!=c.column)&&(c=d.start);else if(b==1&&w>=0)l=this.$clickSelection.start,(d.start.row!=c.row||d.start.column!=c.column)&&(c=d.end);else if(w==-1&&b==1)c=d.end,l=d.start;else{var I=s(this.$clickSelection,c);c=I.cursor,l=I.anchor}o.selection.setSelectionAnchor(l.row,l.column)}o.selection.selectToPosition(c),o.renderer.scrollCursorIntoView()},a.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},a.prototype.focusWait=function(){var u=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),l=Date.now();(u>y||l-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},a.prototype.onDoubleClick=function(u){var l=u.getDocumentPosition(),o=this.editor,c=o.session,d=c.getBracketRange(l);d?(d.isEmpty()&&(d.start.column--,d.end.column++),this.setState("select")):(d=o.selection.getWordRange(l.row,l.column),this.setState("selectByWords")),this.$clickSelection=d,this.select()},a.prototype.onTripleClick=function(u){var l=u.getDocumentPosition(),o=this.editor;this.setState("selectByLines");var c=o.getSelectionRange();c.isMultiLine()&&c.contains(l.row,l.column)?(this.$clickSelection=o.selection.getLineRange(c.start.row),this.$clickSelection.end=o.selection.getLineRange(c.end.row).end):this.$clickSelection=o.selection.getLineRange(l.row),this.select()},a.prototype.onQuadClick=function(u){var l=this.editor;l.selectAll(),this.$clickSelection=l.getSelectionRange(),this.setState("selectAll")},a.prototype.onMouseWheel=function(u){if(!u.getAccelKey()){u.getShiftKey()&&u.wheelY&&!u.wheelX&&(u.wheelX=u.wheelY,u.wheelY=0);var l=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var o=this.$lastScroll,c=u.domEvent.timeStamp,d=c-o.t,w=d?u.wheelX/d:o.vx,b=d?u.wheelY/d:o.vy;d<x&&(w=(w+o.vx)/2,b=(b+o.vy)/2);var I=Math.abs(w/b),T=!1;if(I>=1&&l.renderer.isScrollableBy(u.wheelX*u.speed,0)&&(T=!0),I<=1&&l.renderer.isScrollableBy(0,u.wheelY*u.speed)&&(T=!0),T)o.allowed=c;else if(c-o.allowed<x){var S=Math.abs(w)<=1.5*Math.abs(o.vx)&&Math.abs(b)<=1.5*Math.abs(o.vy);S?(T=!0,o.allowed=c):o.allowed=0}if(o.t=c,o.vx=w,o.vy=b,T)return l.renderer.scrollBy(u.wheelX*u.speed,u.wheelY*u.speed),u.stop()}},a}();h.prototype.selectEnd=h.prototype.selectByLinesEnd,h.prototype.selectAllEnd=h.prototype.selectByLinesEnd,h.prototype.selectByWordsEnd=h.prototype.selectByLinesEnd,r.DefaultHandlers=h;function p(a,u,l,o){return Math.sqrt(Math.pow(l-a,2)+Math.pow(o-u,2))}function s(a,u){if(a.start.row==a.end.row)var l=2*u.column-a.start.column-a.end.column;else if(a.start.row==a.end.row-1&&!a.start.column&&!a.end.column)var l=u.column-4;else var l=2*u.row-a.start.row-a.end.row;return l<0?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,r,v){r.preventParentScroll=function(f){f.stopPropagation();var y=f.currentTarget,x=y.scrollHeight>y.clientHeight;x||f.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(e,r,v){var f=this&&this.__extends||function(){var c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("./lib/dom");e("./lib/event");var h=e("./range").Range,p=e("./lib/scroll").preventParentScroll,s="ace_tooltip",a=function(){function c(d){this.isOpen=!1,this.$element=null,this.$parentNode=d}return c.prototype.$init=function(){return this.$element=x.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(d){this.getElement().textContent=d},c.prototype.setHtml=function(d){this.getElement().innerHTML=d},c.prototype.setPosition=function(d,w){this.getElement().style.left=d+"px",this.getElement().style.top=w+"px"},c.prototype.setClassName=function(d){x.addCssClass(this.getElement(),d)},c.prototype.setTheme=function(d){this.$element.className=s+" "+(d.isDark?"ace_dark ":"")+(d.cssClass||"")},c.prototype.show=function(d,w,b){d!=null&&this.setText(d),w!=null&&b!=null&&this.setPosition(w,b),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(d){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c}(),u=function(){function c(){this.popups=[]}return c.prototype.addPopup=function(d){this.popups.push(d),this.updatePopups()},c.prototype.removePopup=function(d){var w=this.popups.indexOf(d);w!==-1&&(this.popups.splice(w,1),this.updatePopups())},c.prototype.updatePopups=function(){var d,w,b,I;this.popups.sort(function(P,O){return O.priority-P.priority});var T=[];try{for(var S=y(this.popups),C=S.next();!C.done;C=S.next()){var R=C.value,L=!0;try{for(var F=(b=void 0,y(T)),E=F.next();!E.done;E=F.next()){var H=E.value;if(this.doPopupsOverlap(H,R)){L=!1;break}}}catch(P){b={error:P}}finally{try{E&&!E.done&&(I=F.return)&&I.call(F)}finally{if(b)throw b.error}}L?T.push(R):R.hide()}}catch(P){d={error:P}}finally{try{C&&!C.done&&(w=S.return)&&w.call(S)}finally{if(d)throw d.error}}},c.prototype.doPopupsOverlap=function(d,w){var b=d.getElement().getBoundingClientRect(),I=w.getElement().getBoundingClientRect();return b.left<I.right&&b.right>I.left&&b.top<I.bottom&&b.bottom>I.top},c}(),l=new u;r.popupManager=l,r.Tooltip=a;var o=function(c){f(d,c);function d(w){w===void 0&&(w=document.body);var b=c.call(this,w)||this;b.timeout=void 0,b.lastT=0,b.idleTime=350,b.lastEvent=void 0,b.onMouseOut=b.onMouseOut.bind(b),b.onMouseMove=b.onMouseMove.bind(b),b.waitForHover=b.waitForHover.bind(b),b.hide=b.hide.bind(b);var I=b.getElement();return I.style.whiteSpace="pre-wrap",I.style.pointerEvents="auto",I.addEventListener("mouseout",b.onMouseOut),I.tabIndex=-1,I.addEventListener("blur",(function(){I.contains(document.activeElement)||this.hide()}).bind(b)),I.addEventListener("wheel",p),b}return d.prototype.addToEditor=function(w){w.on("mousemove",this.onMouseMove),w.on("mousedown",this.hide),w.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},d.prototype.removeFromEditor=function(w){w.off("mousemove",this.onMouseMove),w.off("mousedown",this.hide),w.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},d.prototype.onMouseMove=function(w,b){this.lastEvent=w,this.lastT=Date.now();var I=b.$mouseHandler.isMousePressed;if(this.isOpen){var T=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(T.row,T.column)||I||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||I||(this.lastEvent=w,this.timeout=setTimeout(this.waitForHover,this.idleTime))},d.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)},d.prototype.isOutsideOfText=function(w){var b=w.editor,I=w.getDocumentPosition(),T=b.session.getLine(I.row);if(I.column==T.length){var S=b.renderer.pixelToScreenCoordinates(w.clientX,w.clientY),C=b.session.documentToScreenPosition(I.row,I.column);if(C.column!=S.column||C.row!=S.row)return!0}return!1},d.prototype.setDataProvider=function(w){this.$gatherData=w},d.prototype.showForRange=function(w,b,I,T){var S=10;if(!(T&&T!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var C=w.renderer;this.isOpen||(l.addPopup(this),this.$registerCloseEvents(),this.setTheme(C.theme)),this.isOpen=!0,this.addMarker(b,w.session),this.range=h.fromPoints(b.start,b.end);var R=C.textToScreenCoordinates(b.start.row,b.start.column),L=C.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var F=this.getElement();F.innerHTML="",F.appendChild(I),F.style.maxHeight="",F.style.display="block";var E=F.clientHeight,H=F.clientWidth,P=window.innerHeight-R.pageY-C.lineHeight,O=!0;R.pageY-E<0&&R.pageY<P&&(O=!1),F.style.maxHeight=(O?R.pageY:P)-S+"px",F.style.top=O?"":R.pageY+C.lineHeight+"px",F.style.bottom=O?window.innerHeight-R.pageY+"px":"",F.style.left=Math.min(R.pageX,window.innerWidth-H-S)+"px"}},d.prototype.addMarker=function(w,b){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=b,this.marker=b&&b.addMarker(w,"ace_highlight-marker","text")},d.prototype.hide=function(w){!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.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,l.removePopup(this)))},d.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},d.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},d.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())},d}(a);r.HoverTooltip=o}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(e,r,v){var f=this&&this.__extends||function(){var c=function(d,w){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,I){b.__proto__=I}||function(b,I){for(var T in I)Object.prototype.hasOwnProperty.call(I,T)&&(b[T]=I[T])},c(d,w)};return function(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");c(d,w);function b(){this.constructor=d}d.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}(),y=this&&this.__values||function(c){var d=typeof Symbol=="function"&&Symbol.iterator,w=d&&c[d],b=0;if(w)return w.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&b>=c.length&&(c=void 0),{value:c&&c[b++],done:!c}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")},x=e("../lib/dom"),h=e("../lib/event"),p=e("../tooltip").Tooltip,s=e("../config").nls,a=5,u=3;r.GUTTER_TOOLTIP_LEFT_OFFSET=a,r.GUTTER_TOOLTIP_TOP_OFFSET=u;function l(c){var d=c.editor,w=d.renderer.$gutterLayer,b=new o(d,!0);c.editor.setDefaultHandler("guttermousedown",function(L){if(!(!d.isFocused()||L.getButton()!=0)){var F=w.getRegion(L);if(F!="foldWidgets"){var E=L.getDocumentPosition().row,H=d.session.selection;if(L.getShiftKey())H.selectTo(E,0);else{if(L.domEvent.detail==2)return d.selectAll(),L.preventDefault();c.$clickSelection=d.selection.getLineRange(E)}return c.setState("selectByLines"),c.captureMouse(L),L.preventDefault()}}});var I,T;function S(){var L=T.getDocumentPosition().row,F=d.session.getLength();if(L==F){var E=d.renderer.pixelToScreenCoordinates(0,T.y).row,H=T.$pos;if(E>d.session.documentToScreenRow(H.row,H.column))return C()}if(b.showTooltip(L),!!b.isOpen)if(d.on("mousewheel",C),d.on("changeSession",C),window.addEventListener("keydown",C,!0),c.$tooltipFollowsMouse)R(T);else{var P=T.getGutterRow(),O=w.$lines.get(P);if(O){var _=O.element.querySelector(".ace_gutter_annotation"),A=_.getBoundingClientRect(),N=b.getElement().style;N.left=A.right-a+"px",N.top=A.bottom-u+"px"}else R(T)}}function C(L){L&&L.type==="keydown"&&(L.ctrlKey||L.metaKey)||L&&L.type==="mouseout"&&(!L.relatedTarget||b.getElement().contains(L.relatedTarget))||(I&&(I=clearTimeout(I)),b.isOpen&&(b.hideTooltip(),d.off("mousewheel",C),d.off("changeSession",C),window.removeEventListener("keydown",C,!0)))}function R(L){b.setPosition(L.x,L.y)}c.editor.setDefaultHandler("guttermousemove",function(L){var F=L.domEvent.target||L.domEvent.srcElement;if(x.hasCssClass(F,"ace_fold-widget")||x.hasCssClass(F,"ace_custom-widget"))return C();b.isOpen&&c.$tooltipFollowsMouse&&R(L),T=L,!I&&(I=setTimeout(function(){I=null,T&&!c.isMousePressed&&S()},50))}),h.addListener(d.renderer.$gutter,"mouseout",function(L){T=null,b.isOpen&&(I=setTimeout(function(){I=null,C(L)},50))},d)}r.GutterHandler=l;var o=function(c){f(d,c);function d(w,b){b===void 0&&(b=!1);var I=c.call(this,w.container)||this;I.editor=w,I.visibleTooltipRow;var T=I.getElement();return T.setAttribute("role","tooltip"),T.style.pointerEvents="auto",b&&(I.onMouseOut=I.onMouseOut.bind(I),T.addEventListener("mouseout",I.onMouseOut)),I}return d.prototype.onMouseOut=function(w){this.isOpen&&(!w.relatedTarget||this.getElement().contains(w.relatedTarget)||w&&w.currentTarget.contains(w.relatedTarget)||this.hideTooltip())},d.prototype.setPosition=function(w,b){var I=window.innerWidth||document.documentElement.clientWidth,T=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),C=this.getHeight();w+=15,b+=15,w+S>I&&(w-=w+S-I),b+C>T&&(b-=20+C),p.prototype.setPosition.call(this,w,b)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:s("gutter-tooltip.aria-label.security.singular","security finding"),plural:s("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:s("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:s("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(w){var b,I=this.editor.renderer.$gutterLayer,T=I.$annotations[w],S;T?S={displayText:Array.from(T.displayText),type:Array.from(T.type)}:S={displayText:[],type:[]};var C=I.session.getFoldLine(w);if(C&&I.$showFoldedAnnotations){for(var R={error:[],security:[],warning:[],info:[],hint:[]},L={error:1,security:2,warning:3,info:4,hint:5},F,E=w+1;E<=C.end.row;E++)if(I.$annotations[E])for(var H=0;H<I.$annotations[E].text.length;H++){var P=I.$annotations[E].type[H];R[P].push(I.$annotations[E].text[H]),(!F||L[P]<L[F])&&(F=P)}if(["error","security","warning"].includes(F)){var O="".concat(d.annotationsToSummaryString(R)," in folded code.");S.displayText.push(O),S.type.push(F+"_fold")}}if(S.displayText.length===0)return this.hideTooltip();for(var _={error:[],security:[],warning:[],info:[],hint:[]},A=I.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=0;E<S.displayText.length;E++){var N=x.createElement("span"),B=x.createElement("span");(b=B.classList).add.apply(b,["ace_".concat(S.type[E]),A]),B.setAttribute("aria-label","".concat(d.annotationLabels[S.type[E].replace("_fold","")].singular)),B.setAttribute("role","img"),B.appendChild(x.createTextNode(" ")),N.appendChild(B),N.appendChild(x.createTextNode(S.displayText[E])),N.appendChild(x.createElement("br")),_[S.type[E].replace("_fold","")].push(N)}var U=this.getElement();x.removeChildren(U),_.error.forEach(function(K){return U.appendChild(K)}),_.security.forEach(function(K){return U.appendChild(K)}),_.warning.forEach(function(K){return U.appendChild(K)}),_.info.forEach(function(K){return U.appendChild(K)}),_.hint.forEach(function(K){return U.appendChild(K)}),U.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.visibleTooltipRow=w,this.editor._signal("showGutterTooltip",this)},d.prototype.hideTooltip=function(){this.isOpen&&(this.$element.removeAttribute("aria-live"),this.hide(),this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this))},d.annotationsToSummaryString=function(w){var b,I,T=[],S=["error","security","warning","info","hint"];try{for(var C=y(S),R=C.next();!R.done;R=C.next()){var L=R.value;if(w[L].length){var F=w[L].length===1?d.annotationLabels[L].singular:d.annotationLabels[L].plural;T.push("".concat(w[L].length," ").concat(F))}}}catch(E){b={error:E}}finally{try{R&&!R.done&&(I=C.return)&&I.call(C)}finally{if(b)throw b.error}}return T.join(", ")},d}(p);r.GutterTooltip=o}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,r,v){var f=e("../lib/event"),y=e("../lib/useragent"),x=function(){function h(p,s){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=s,this.x=this.clientX=p.clientX,this.y=this.clientY=p.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return h.prototype.stopPropagation=function(){f.stopPropagation(this.domEvent),this.propagationStopped=!0},h.prototype.preventDefault=function(){f.preventDefault(this.domEvent),this.defaultPrevented=!0},h.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},h.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},h.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,s=this.editor.session.documentToScreenRow(p,0),a=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return s-a},h.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,s=p.getSelectionRange();if(s.isEmpty())this.$inSelection=!1;else{var a=this.getDocumentPosition();this.$inSelection=s.contains(a.row,a.column)}return this.$inSelection},h.prototype.getButton=function(){return f.getButton(this.domEvent)},h.prototype.getShiftKey=function(){return this.domEvent.shiftKey},h.prototype.getAccelKey=function(){return y.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},h}();r.MouseEvent=x}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,r,v){var f=e("../lib/dom"),y=e("../lib/event"),x=e("../lib/useragent"),h=200,p=200,s=5;function a(l){var o=l.editor,c=f.createElement("div");c.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",c.textContent=" ";var d=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];d.forEach(function(ne){l[ne]=this[ne]},this),o.on("mousedown",this.onMouseDown.bind(l));var w=o.container,b,I,T,S,C,R,L=0,F,E,H,P,O;this.onDragStart=function(ne){if(this.cancelDrag||!w.draggable){var ae=this;return setTimeout(function(){ae.startSelect(),ae.captureMouse(ne)},0),ne.preventDefault()}C=o.getSelectionRange();var ue=ne.dataTransfer;ue.effectAllowed=o.getReadOnly()?"copy":"copyMove",o.container.appendChild(c),ue.setDragImage&&ue.setDragImage(c,0,0),setTimeout(function(){o.container.removeChild(c)}),ue.clearData(),ue.setData("Text",o.session.getTextRange()),E=!0,this.setState("drag")},this.onDragEnd=function(ne){if(w.draggable=!1,E=!1,this.setState(null),!o.getReadOnly()){var ae=ne.dataTransfer.dropEffect;!F&&ae=="move"&&o.session.remove(o.getSelectionRange()),o.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,b||B(),L++,ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragOver=function(ne){if(!(o.getReadOnly()||!te(ne.dataTransfer)))return I=ne.clientX,T=ne.clientY,b||(B(),L++),K!==null&&(K=null),ne.dataTransfer.dropEffect=F=he(ne),y.preventDefault(ne)},this.onDragLeave=function(ne){if(L--,L<=0&&b)return U(),F=null,y.preventDefault(ne)},this.onDrop=function(ne){if(R){var ae=ne.dataTransfer;if(E)switch(F){case"move":C.contains(R.row,R.column)?C={start:R,end:R}:C=o.moveText(C,R);break;case"copy":C=o.moveText(C,R,!0);break}else{var ue=ae.getData("Text");C={start:R,end:o.session.insert(R,ue)},o.focus(),F=null}return U(),y.preventDefault(ne)}},y.addListener(w,"dragstart",this.onDragStart.bind(l),o),y.addListener(w,"dragend",this.onDragEnd.bind(l),o),y.addListener(w,"dragenter",this.onDragEnter.bind(l),o),y.addListener(w,"dragover",this.onDragOver.bind(l),o),y.addListener(w,"dragleave",this.onDragLeave.bind(l),o),y.addListener(w,"drop",this.onDrop.bind(l),o);function _(ne,ae){var ue=Date.now(),ce=!ae||ne.row!=ae.row,fe=!ae||ne.column!=ae.column;if(!P||ce||fe)o.moveCursorToPosition(ne),P=ue,O={x:I,y:T};else{var $e=u(O.x,O.y,I,T);$e>s?P=null:ue-P>=p&&(o.renderer.scrollCursorIntoView(),P=null)}}function A(ne,ae){var ue=Date.now(),ce=o.renderer.layerConfig.lineHeight,fe=o.renderer.layerConfig.characterWidth,$e=o.renderer.scroller.getBoundingClientRect(),Te={x:{left:I-$e.left,right:$e.right-I},y:{top:T-$e.top,bottom:$e.bottom-T}},Ee=Math.min(Te.x.left,Te.x.right),Ge=Math.min(Te.y.top,Te.y.bottom),qe={row:ne.row,column:ne.column};Ee/fe<=2&&(qe.column+=Te.x.left<Te.x.right?-3:2),Ge/ce<=1&&(qe.row+=Te.y.top<Te.y.bottom?-1:1);var ut=ne.row!=qe.row,tt=ne.column!=qe.column,ht=!ae||ne.row!=ae.row;ut||tt&&!ht?H?ue-H>=h&&o.renderer.scrollCursorIntoView(qe):H=ue:H=null}function N(){var ne=R;R=o.renderer.screenToTextCoordinates(I,T),_(R,ne),A(R,ne)}function B(){C=o.selection.toOrientedRange(),b=o.session.addMarker(C,"ace_selection",o.getSelectionStyle()),o.clearSelection(),o.isFocused()&&o.renderer.$cursorLayer.setBlinking(!1),clearInterval(S),N(),S=setInterval(N,20),L=0,y.addListener(document,"mousemove",Z)}function U(){clearInterval(S),o.session.removeMarker(b),b=null,o.selection.fromOrientedRange(C),o.isFocused()&&!E&&o.$resetCursorStyle(),C=null,R=null,L=0,H=null,P=null,y.removeListener(document,"mousemove",Z)}var K=null;function Z(){K==null&&(K=setTimeout(function(){K!=null&&b&&U()},20))}function te(ne){var ae=ne.types;return!ae||Array.prototype.some.call(ae,function(ue){return ue=="text/plain"||ue=="Text"})}function he(ne){var ae=["copy","copymove","all","uninitialized"],ue=["move","copymove","linkmove","all","uninitialized"],ce=x.isMac?ne.altKey:ne.ctrlKey,fe="uninitialized";try{fe=ne.dataTransfer.effectAllowed.toLowerCase()}catch{}var $e="none";return ce&&ae.indexOf(fe)>=0?$e="copy":ue.indexOf(fe)>=0?$e="move":ae.indexOf(fe)>=0&&($e="copy"),$e}}(function(){this.dragWait=function(){var l=Date.now()-this.mousedownEvent.time;l>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var l=this.editor.container;l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(l){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var l=this.editor,o=l.container;o.draggable=!0,l.renderer.$cursorLayer.setBlinking(!1),l.setStyle("ace_dragging");var c=x.isWin?"default":"move";l.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(l){var o=this.editor.container;if(x.isIE&&this.state=="dragReady"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&o.dragDrop()}if(this.state==="dragWait"){var c=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(o.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(l){if(this.$dragEnabled){this.mousedownEvent=l;var o=this.editor,c=l.inSelection(),d=l.getButton(),w=l.domEvent.detail||1;if(w===1&&d===0&&c){if(l.editor.inMultiSelectMode&&(l.getAccelKey()||l.getShiftKey()))return;this.mousedownEvent.time=Date.now();var b=l.domEvent.target||l.domEvent.srcElement;if("unselectable"in b&&(b.unselectable="on"),o.getDragDelay()){if(x.isWebKit){this.cancelDrag=!0;var I=o.container;I.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(l,this.onMouseDrag.bind(this)),l.defaultPrevented=!0}}}}).call(a.prototype);function u(l,o,c,d){return Math.sqrt(Math.pow(c-l,2)+Math.pow(d-o,2))}r.DragdropHandler=a}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,r,v){var f=e("./mouse_event").MouseEvent,y=e("../lib/event"),x=e("../lib/dom");r.addTouchListeners=function(h,p){var s="scroll",a,u,l,o,c,d,w=0,b,I=0,T=0,S=0,C,R;function L(){var _=window.navigator&&window.navigator.clipboard,A=!1,N=function(){var K=p.getCopyText(),Z=p.session.getUndoManager().hasUndo();R.replaceChild(x.buildDom(A?["span",!K&&B("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],K&&B("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],K&&B("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&B("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],Z&&B("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],B("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],B("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},B=function(K){return p.commands.canExecute(K,p)},U=function(K){var Z=K.target.getAttribute("action");if(Z=="more"||!A)return A=!A,N();Z=="paste"?_.readText().then(function(te){p.execCommand(Z,te)}):Z&&((Z=="cut"||Z=="copy")&&(_?_.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(Z)),R.firstChild.style.display="none",A=!1,Z!="openCommandPalette"&&p.focus()};R=x.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(K){s="menu",K.stopPropagation(),K.preventDefault(),p.textInput.focus()},ontouchend:function(K){K.stopPropagation(),K.preventDefault(),U(K)},onclick:U},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function F(){if(!p.getOption("enableMobileMenu")){R&&E();return}R||L();var _=p.selection.cursor,A=p.renderer.textToScreenCoordinates(_.row,_.column),N=p.renderer.textToScreenCoordinates(0,0).pageX,B=p.renderer.scrollLeft,U=p.container.getBoundingClientRect();R.style.top=A.pageY-U.top-3+"px",A.pageX-U.left<U.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=N+B-U.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",E)}function E(_){R&&(R.style.display="none"),p.off("input",E)}function H(){c=null,clearTimeout(c);var _=p.selection.getRange(),A=_.contains(b.row,b.column);(_.isEmpty()||!A)&&(p.selection.moveToPosition(b),p.selection.selectWord()),s="wait",F()}function P(){c=null,clearTimeout(c),p.selection.moveToPosition(b);var _=I>=2?p.selection.getLineRange(b.row):p.session.getBracketRange(b);_&&!_.isEmpty()?p.selection.setRange(_):p.selection.selectWord(),s="wait"}y.addListener(h,"contextmenu",function(_){if(C){var A=p.textInput.getElement();A.focus()}},p),y.addListener(h,"touchstart",function(_){var A=_.touches;if(c||A.length>1){clearTimeout(c),c=null,l=-1,s="zoom";return}C=p.$mouseHandler.isMousePressed=!0;var N=p.renderer.layerConfig.lineHeight,B=p.renderer.layerConfig.lineHeight,U=_.timeStamp;o=U;var K=A[0],Z=K.clientX,te=K.clientY;Math.abs(a-Z)+Math.abs(u-te)>N&&(l=-1),a=_.clientX=Z,u=_.clientY=te,T=S=0;var he=new f(_,p);if(b=he.getDocumentPosition(),U-l<500&&A.length==1&&!w)I++,_.preventDefault(),_.button=0,P();else{I=0;var ne=p.selection.cursor,ae=p.selection.isEmpty()?ne:p.selection.anchor,ue=p.renderer.$cursorLayer.getPixelPosition(ne,!0),ce=p.renderer.$cursorLayer.getPixelPosition(ae,!0),fe=p.renderer.scroller.getBoundingClientRect(),$e=p.renderer.layerConfig.offset,Te=p.renderer.scrollLeft,Ee=function(ut,tt){return ut=ut/B,tt=tt/N-.75,ut*ut+tt*tt};if(_.clientX<fe.left){s="zoom";return}var Ge=Ee(_.clientX-fe.left-ue.left+Te,_.clientY-fe.top-ue.top+$e),qe=Ee(_.clientX-fe.left-ce.left+Te,_.clientY-fe.top-ce.top+$e);Ge<3.5&&qe<3.5&&(s=Ge>qe?"cursor":"anchor"),qe<3.5?s="anchor":Ge<3.5?s="cursor":s="scroll",c=setTimeout(H,450)}l=U},p),y.addListener(h,"touchend",function(_){C=p.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),s=="zoom"?(s="",w=0):c?(p.selection.moveToPosition(b),w=0,F()):s=="scroll"?(O(),E()):F(),clearTimeout(c),c=null},p),y.addListener(h,"touchmove",function(_){c&&(clearTimeout(c),c=null);var A=_.touches;if(!(A.length>1||s=="zoom")){var N=A[0],B=a-N.clientX,U=u-N.clientY;if(s=="wait")if(B*B+U*U>4)s="cursor";else return _.preventDefault();a=N.clientX,u=N.clientY,_.clientX=N.clientX,_.clientY=N.clientY;var K=_.timeStamp,Z=K-o;if(o=K,s=="scroll"){var te=new f(_,p);te.speed=1,te.wheelX=B,te.wheelY=U,10*Math.abs(B)<Math.abs(U)&&(B=0),10*Math.abs(U)<Math.abs(B)&&(U=0),Z!=0&&(T=B/Z,S=U/Z),p._emit("mousewheel",te),te.propagationStopped||(T=S=0)}else{var he=new f(_,p),ne=he.getDocumentPosition();s=="cursor"?p.selection.moveCursorToPosition(ne):s=="anchor"&&p.selection.setSelectionAnchor(ne.row,ne.column),p.renderer.scrollCursorIntoView(ne),_.preventDefault()}}},p);function O(){w+=60,d=setInterval(function(){w--<=0&&(clearInterval(d),d=null),Math.abs(T)<.01&&(T=0),Math.abs(S)<.01&&(S=0),w<20&&(T=.9*T),w<20&&(S=.9*S);var _=p.session.getScrollTop();p.renderer.scrollBy(10*T,10*S),_==p.session.getScrollTop()&&(w=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,r,v){var f=e("../lib/event"),y=e("../lib/useragent"),x=e("./default_handlers").DefaultHandlers,h=e("./default_gutter_handler").GutterHandler,p=e("./mouse_event").MouseEvent,s=e("./dragdrop_handler").DragdropHandler,a=e("./touch_handler").addTouchListeners,u=e("../config"),l=function(){function o(c){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var d=this;this.editor=c,new x(this),new h(this),new s(this);var w=function(T){var S=!document.hasFocus||!document.hasFocus()||!c.isFocused()&&document.activeElement==(c.textInput&&c.textInput.getElement());S&&window.focus(),c.focus(),setTimeout(function(){c.isFocused()||c.focus()})},b=c.renderer.getMouseEventTarget();f.addListener(b,"click",this.onMouseEvent.bind(this,"click"),c),f.addListener(b,"mousemove",this.onMouseMove.bind(this,"mousemove"),c),f.addMultiMouseDownListener([b,c.renderer.scrollBarV&&c.renderer.scrollBarV.inner,c.renderer.scrollBarH&&c.renderer.scrollBarH.inner,c.textInput&&c.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",c),f.addMouseWheelListener(c.container,this.onMouseWheel.bind(this,"mousewheel"),c),a(c.container,c);var I=c.renderer.$gutter;f.addListener(I,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),c),f.addListener(I,"click",this.onMouseEvent.bind(this,"gutterclick"),c),f.addListener(I,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),c),f.addListener(I,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),c),f.addListener(b,"mousedown",w,c),f.addListener(I,"mousedown",w,c),y.isIE&&c.renderer.scrollBarV&&(f.addListener(c.renderer.scrollBarV.element,"mousedown",w,c),f.addListener(c.renderer.scrollBarH.element,"mousedown",w,c)),c.on("mousemove",function(T){if(!(d.state||d.$dragDelay||!d.$dragEnabled)){var S=c.renderer.screenToTextCoordinates(T.x,T.y),C=c.session.selection.getRange(),R=c.renderer;!C.isEmpty()&&C.insideStart(S.row,S.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},c)}return o.prototype.onMouseEvent=function(c,d){this.editor.session&&this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseMove=function(c,d){var w=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!w||!w.length||this.editor._emit(c,new p(d,this.editor))},o.prototype.onMouseWheel=function(c,d){var w=new p(d,this.editor);w.speed=this.$scrollSpeed*2,w.wheelX=d.wheelX,w.wheelY=d.wheelY,this.editor._emit(c,w)},o.prototype.setState=function(c){this.state=c},o.prototype.captureMouse=function(c,d){this.x=c.x,this.y=c.y,this.isMousePressed=!0;var w=this.editor,b=this.editor.renderer;b.$isMousePressed=!0;var I=this,T=function(F){if(F){if(y.isWebKit&&!F.which&&I.releaseMouse)return I.releaseMouse();I.x=F.clientX,I.y=F.clientY,d&&d(F),I.mouseEvent=new p(F,I.editor),I.$mouseMoved=!0}},S=function(F){w.off("beforeEndOperation",R),clearInterval(L),w.session&&C(),I[I.state+"End"]&&I[I.state+"End"](F),I.state="",I.isMousePressed=b.$isMousePressed=!1,b.$keepTextAreaAtCursor&&b.$moveTextAreaToCursor(),I.$onCaptureMouseMove=I.releaseMouse=null,F&&I.onMouseEvent("mouseup",F),w.endOperation()},C=function(){I[I.state]&&I[I.state](),I.$mouseMoved=!1};if(y.isOldIE&&c.domEvent.type=="dblclick")return setTimeout(function(){S(c)});var R=function(F){I.releaseMouse&&w.curOp.command.name&&w.curOp.selectionChanged&&(I[I.state+"End"]&&I[I.state+"End"](),I.state="",I.releaseMouse())};w.on("beforeEndOperation",R),w.startOperation({command:{name:"mouse"}}),I.$onCaptureMouseMove=T,I.releaseMouse=f.capture(this.editor.container,T,S);var L=setInterval(C,20)},o.prototype.cancelContextMenu=function(){var c=(function(d){d&&d.domEvent&&d.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",c),d&&d.domEvent&&f.stopEvent(d.domEvent))}).bind(this);setTimeout(c,10),this.editor.on("nativecontextmenu",c)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o}();l.prototype.releaseMouse=null,u.defineOptions(l.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:y.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=l}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,r,v){var f=e("../lib/dom"),y=function(){function x(h){h.on("click",function(p){var s=p.getDocumentPosition(),a=h.session,u=a.getFoldAt(s.row,s.column,1);u&&(p.getAccelKey()?a.removeFold(u):a.expandFold(u),p.stop());var l=p.domEvent&&p.domEvent.target;l&&f.hasCssClass(l,"ace_inline_button")&&f.hasCssClass(l,"ace_toggle_wrap")&&(a.setOption("wrap",!a.getUseWrapMode()),h.renderer.scrollCursorIntoView())}),h.on("gutterclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session;u.foldWidgets&&u.foldWidgets[a]&&h.session.onFoldWidgetClick(a,p),h.isFocused()||h.focus(),p.stop()}}),h.on("gutterdblclick",function(p){var s=h.renderer.$gutterLayer.getRegion(p);if(s=="foldWidgets"){var a=p.getDocumentPosition().row,u=h.session,l=u.getParentFoldRangeData(a,!0),o=l.range||l.firstRange;if(o){a=o.start.row;var c=u.getFoldAt(a,u.getLine(a).length,1);c?u.removeFold(c):(u.addFold("...",o),h.renderer.scrollCursorIntoView({row:o.start.row,column:0}))}p.stop()}})}return x}();r.FoldHandler=y}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,r,v){var f=e("../lib/keys"),y=e("../lib/event"),x=function(){function h(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return h.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},h.prototype.setKeyboardHandler=function(p){var s=this.$handlers;if(s[s.length-1]!=p){for(;s[s.length-1]&&s[s.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(s[s.length-1]);this.addKeyboardHandler(p,1)}},h.prototype.addKeyboardHandler=function(p,s){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var a=this.$handlers.indexOf(p);a!=-1&&this.$handlers.splice(a,1),s==null?this.$handlers.push(p):this.$handlers.splice(s,0,p),a==-1&&p.attach&&p.attach(this.$editor)}},h.prototype.removeKeyboardHandler=function(p){var s=this.$handlers.indexOf(p);return s==-1?!1:(this.$handlers.splice(s,1),p.detach&&p.detach(this.$editor),!0)},h.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},h.prototype.getStatusText=function(){var p=this.$data,s=p.editor;return this.$handlers.map(function(a){return a.getStatusText&&a.getStatusText(s,p)||""}).filter(Boolean).join(" ")},h.prototype.$callKeyboardHandlers=function(p,s,a,u){for(var l,o=!1,c=this.$editor.commands,d=this.$handlers.length;d--&&(l=this.$handlers[d].handleKeyboard(this.$data,p,s,a,u),!(!(!l||!l.command)&&(l.command=="null"?o=!0:o=c.exec(l.command,this.$editor,l.args,u),o&&u&&p!=-1&&l.passEvent!=!0&&l.command.passEvent!=!0&&y.stopEvent(u),o))););return!o&&p==-1&&(l={command:"insertstring"},o=c.exec("insertstring",this.$editor,s)),o&&this.$editor._signal&&this.$editor._signal("keyboardActivity",l),o},h.prototype.onCommandKey=function(p,s,a){var u=f.keyCodeToString(a);return this.$callKeyboardHandlers(s,u,a,p)},h.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},h}();r.KeyBinding=x}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,r,v){var f=0,y=0,x=!1,h=!1,p=!1,s=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],a=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,l=1,o=0,c=1,d=2,w=3,b=4,I=5,T=6,S=7,C=8,R=9,L=10,F=11,E=12,H=13,P=14,O=15,_=16,A=17,N=18,B=[N,N,N,N,N,N,N,N,N,T,I,T,C,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,I,I,I,T,C,b,b,F,F,F,b,b,b,b,b,L,R,L,R,R,d,d,d,d,d,d,d,d,d,d,R,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,b,b,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,b,b,b,b,N,N,N,N,N,N,I,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,R,b,F,F,F,F,b,b,b,b,o,b,b,N,b,b,F,F,d,d,b,o,b,b,b,d,o,b,b,b,b,b],U=[C,C,C,C,C,C,C,C,C,C,C,N,N,N,o,c,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,I,H,P,O,_,A,R,F,F,F,F,F,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,R,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C];function K(ne,ae,ue,ce){var fe=f?a:s,$e=null,Te=null,Ee=null,Ge=0,qe=null,ut=null,tt=-1,ht=null,Zt=null,dn=[];if(!ce)for(ht=0,ce=[];ht<ue;ht++)ce[ht]=he(ne[ht]);for(y=f,x=!1,h=!1,p=!1,Zt=0;Zt<ue;Zt++){if($e=Ge,dn[Zt]=Te=te(ne,ce,dn,Zt),Ge=fe[$e][Te],qe=Ge&240,Ge&=15,ae[Zt]=Ee=fe[Ge][5],qe>0)if(qe==16){for(ht=tt;ht<Zt;ht++)ae[ht]=1;tt=-1}else tt=-1;if(ut=fe[Ge][6],ut)tt==-1&&(tt=Zt);else if(tt>-1){for(ht=tt;ht<Zt;ht++)ae[ht]=Ee;tt=-1}ce[Zt]==I&&(ae[Zt]=0),y|=Ee}if(p){for(ht=0;ht<ue;ht++)if(ce[ht]==T){ae[ht]=f;for(var qt=ht-1;qt>=0&&ce[qt]==C;qt--)ae[qt]=f}}}function Z(ne,ae,ue){if(!(y<ne)){if(ne==1&&f==l&&!h){ue.reverse();return}for(var ce=ue.length,fe=0,$e,Te,Ee,Ge;fe<ce;){if(ae[fe]>=ne){for($e=fe+1;$e<ce&&ae[$e]>=ne;)$e++;for(Te=fe,Ee=$e-1;Te<Ee;Te++,Ee--)Ge=ue[Te],ue[Te]=ue[Ee],ue[Ee]=Ge;fe=$e}fe++}}}function te(ne,ae,ue,ce){var fe=ae[ce],$e,Te,Ee,Ge;switch(fe){case o:case c:x=!1;case b:case w:return fe;case d:return x?w:d;case S:return x=!0,c;case C:return b;case R:return ce<1||ce+1>=ae.length||($e=ue[ce-1])!=d&&$e!=w||(Te=ae[ce+1])!=d&&Te!=w?b:(x&&(Te=w),Te==$e?Te:b);case L:return $e=ce>0?ue[ce-1]:I,$e==d&&ce+1<ae.length&&ae[ce+1]==d?d:b;case F:if(ce>0&&ue[ce-1]==d)return d;if(x)return b;for(Ge=ce+1,Ee=ae.length;Ge<Ee&&ae[Ge]==F;)Ge++;return Ge<Ee&&ae[Ge]==d?d:b;case E:for(Ee=ae.length,Ge=ce+1;Ge<Ee&&ae[Ge]==E;)Ge++;if(Ge<Ee){var qe=ne[ce],ut=qe>=1425&&qe<=2303||qe==64286;if($e=ae[Ge],ut&&($e==c||$e==S))return c}return ce<1||($e=ae[ce-1])==I?b:ue[ce-1];case I:return x=!1,h=!0,f;case T:return p=!0,b;case H:case P:case _:case A:case O:x=!1;case N:return b}}function he(ne){var ae=ne.charCodeAt(0),ue=ae>>8;return ue==0?ae>191?o:B[ae]:ue==5?/[\u0591-\u05f4]/.test(ne)?c:o:ue==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ne)?E:/[\u0660-\u0669\u066b-\u066c]/.test(ne)?w:ae==1642?F:/[\u06f0-\u06f9]/.test(ne)?d:S:ue==32&&ae<=8287?U[ae&255]:ue==254&&ae>=65136?S:b}r.L=o,r.R=c,r.EN=d,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(ne,ae,ue){if(ne.length<2)return{};var ce=ne.split(""),fe=new Array(ce.length),$e=new Array(ce.length),Te=[];f=ue?l:u,K(ce,Te,ce.length,ae);for(var Ee=0;Ee<fe.length;fe[Ee]=Ee,Ee++);Z(2,Te,fe),Z(1,Te,fe);for(var Ee=0;Ee<fe.length-1;Ee++)ae[Ee]===w?Te[Ee]=r.AN:Te[Ee]===c&&(ae[Ee]>S&&ae[Ee]<H||ae[Ee]===b||ae[Ee]===N)?Te[Ee]=r.ON_R:Ee>0&&ce[Ee-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ce[Ee])&&(Te[Ee-1]=Te[Ee]=r.R_H,Ee++);ce[ce.length-1]===r.DOT&&(Te[ce.length-1]=r.B),ce[0]==="‫"&&(Te[0]=r.RLE);for(var Ee=0;Ee<fe.length;Ee++)$e[Ee]=Te[fe[Ee]];return{logicalFromVisual:fe,bidiLevels:$e}},r.hasBidiCharacters=function(ne,ae){for(var ue=!1,ce=0;ce<ne.length;ce++)ae[ce]=he(ne.charAt(ce)),!ue&&(ae[ce]==c||ae[ce]==S||ae[ce]==w)&&(ue=!0);return ue},r.getVisualFromLogicalIdx=function(ne,ae){for(var ue=0;ue<ae.logicalFromVisual.length;ue++)if(ae.logicalFromVisual[ue]==ne)return ue;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,r,v){var f=e("./lib/bidiutil"),y=e("./lib/lang"),x=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,h=function(){function p(s){this.session=s,this.bidiMap={},this.currentRow=null,this.bidiUtil=f,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=x.test(s.getValue())}return p.prototype.isBidiRow=function(s,a,u){return this.seenBidi?(s!==this.currentRow&&(this.currentRow=s,this.updateRowLine(a,u),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(s){this.seenBidi?this.currentRow=null:s.action=="insert"&&x.test(s.lines.join(`
179
179
  `))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var s=0,a=this.session.$screenRowCache;if(a.length){var u=this.session.$getRowCacheIndex(a,this.currentRow);u>=0&&(s=this.session.$docRowCache[u])}return s},p.prototype.getSplitIndex=function(){var s=0,a=this.session.$screenRowCache;if(a.length)for(var u,l=this.session.$getRowCacheIndex(a,this.currentRow);this.currentRow-s>0&&(u=this.session.$getRowCacheIndex(a,this.currentRow-s-1),u===l);)l=u,s++;else s=this.currentRow;return s},p.prototype.updateRowLine=function(s,a){s===void 0&&(s=this.getDocumentRow());var u=s===this.session.getLength()-1,l=u?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[s];o&&(a===void 0&&(a=this.getSplitIndex()),a>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[f.L],this.line=a<o.length?this.line.substring(o[a-1],o[a]):this.line.substring(o[o.length-1])):this.line=this.line.substring(0,o[a]),a==o.length&&(this.line+=this.showInvisibles?l:f.DOT))}else this.line+=this.showInvisibles?l:f.DOT;var c=this.session,d=0,w;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(b,I){return b===" "||c.isFullWidth(b.charCodeAt(0))?(w=b===" "?c.getScreenTabSize(I+d):2,d+=w-1,y.stringRepeat(f.DOT,w)):b}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==f.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},p.prototype.updateBidiMap=function(){var s=[];f.hasBidiCharacters(this.line,s)||this.isRtlDir?this.bidiMap=f.doBidiReorder(this.line,s,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(s){if(this.characterWidth!==s.$characterSize.width){this.fontMetrics=s;var a=this.characterWidth=s.$characterSize.width,u=s.$measureCharWidth("ה");this.charWidths[f.L]=this.charWidths[f.EN]=this.charWidths[f.ON_R]=a,this.charWidths[f.R]=this.charWidths[f.AN]=u,this.charWidths[f.R_H]=u*.45,this.charWidths[f.B]=this.charWidths[f.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(s){this.showInvisibles=s,this.currentRow=null},p.prototype.setEolChar=function(s){this.EOL=s},p.prototype.setContentWidth=function(s){this.contentWidth=s},p.prototype.isRtlLine=function(s){return this.$isRtl?!0:s!=null?this.session.getLine(s).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(s,a){for(var u=s.getCursorPosition(),l=s.selection.getSelectionAnchor().row;l<=u.row;l++)!a&&s.session.getLine(l).charAt(0)===s.session.$bidiHandler.RLE?s.session.doc.removeInLine(l,0,1):a&&s.session.getLine(l).charAt(0)!==s.session.$bidiHandler.RLE&&s.session.doc.insert({column:0,row:l},s.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(s){s-=this.wrapIndent;var a=this.line.charAt(0)===this.RLE?1:0,u=s>a?this.session.getOverwrite()?s:s-1:a,l=f.getVisualFromLogicalIdx(u,this.bidiMap),o=this.bidiMap.bidiLevels,c=0;!this.session.getOverwrite()&&s<=a&&o[l]%2!==0&&l++;for(var d=0;d<l;d++)c+=this.charWidths[o[d]];return!this.session.getOverwrite()&&s>a&&o[l]%2===0&&(c+=this.charWidths[o[l]]),this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(c+=this.rtlLineOffset),c},p.prototype.getSelections=function(s,a){var u=this.bidiMap,l=u.bidiLevels,o,c=[],d=0,w=Math.min(s,a)-this.wrapIndent,b=Math.max(s,a)-this.wrapIndent,I=!1,T=!1,S=0;this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var C,R=0;R<l.length;R++)C=u.logicalFromVisual[R],o=l[R],I=C>=w&&C<b,I&&!T?S=d:!I&&T&&c.push({left:S,width:d-S}),d+=this.charWidths[o],T=I;if(I&&R===l.length&&c.push({left:S,width:d-S}),this.isRtlDir)for(var L=0;L<c.length;L++)c[L].left+=this.rtlLineOffset;return c},p.prototype.offsetToCol=function(u){this.isRtlDir&&(u-=this.rtlLineOffset);var a=0,u=Math.max(u,0),l=0,o=0,c=this.bidiMap.bidiLevels,d=this.charWidths[c[o]];for(this.wrapIndent&&(u-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);u>l+d/2;){if(l+=d,o===c.length-1){d=0;break}d=this.charWidths[c[++o]]}return o>0&&c[o-1]%2!==0&&c[o]%2===0?(u<l&&o--,a=this.bidiMap.logicalFromVisual[o]):o>0&&c[o-1]%2===0&&c[o]%2!==0?a=1+(u>l?this.bidiMap.logicalFromVisual[o]:this.bidiMap.logicalFromVisual[o-1]):this.isRtlDir&&o===c.length-1&&d===0&&c[o-1]%2===0||!this.isRtlDir&&o===0&&c[o]%2!==0?a=1+this.bidiMap.logicalFromVisual[o]:(o>0&&c[o-1]%2!==0&&d!==0&&o--,a=this.bidiMap.logicalFromVisual[o]),a===0&&this.isRtlDir&&a++,a+this.wrapIndent},p}();r.BidiHandler=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,r,v){var f=e("./lib/oop"),y=e("./lib/lang"),x=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,p=function(){function s(a){this.session=a,this.doc=a.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var u=this;this.cursor.on("change",function(l){u.$cursorChanged=!0,u.$silent||u._emit("changeCursor"),!u.$isEmpty&&!u.$silent&&u._emit("changeSelection"),!u.$keepDesiredColumnOnChange&&l.old.column!=l.value.column&&(u.$desiredColumn=null)}),this.anchor.on("change",function(){u.$anchorChanged=!0,!u.$isEmpty&&!u.$silent&&u._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(a,u){this.$isEmpty=!1,this.anchor.setPosition(a,u)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var a=this.anchor,u=this.lead;return a.row>u.row||a.row==u.row&&a.column>u.column},s.prototype.getRange=function(){var a=this.anchor,u=this.lead;return this.$isEmpty?h.fromPoints(u,u):this.isBackwards()?h.fromPoints(u,a):h.fromPoints(a,u)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(a,u){var l=u?a.end:a.start,o=u?a.start:a.end;this.$setSelection(l.row,l.column,o.row,o.column)},s.prototype.$setSelection=function(a,u,l,o){if(!this.$silent){var c=this.$isEmpty,d=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(a,u),this.cursor.setPosition(l,o),this.$isEmpty=!h.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||c!=this.$isEmpty||d)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(a){var u=this.lead;this.$isEmpty&&this.setSelectionAnchor(u.row,u.column),a.call(this)},s.prototype.selectTo=function(a,u){this.$moveSelection(function(){this.moveCursorTo(a,u)})},s.prototype.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},s.prototype.moveTo=function(a,u){this.clearSelection(),this.moveCursorTo(a,u)},s.prototype.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(a,u){if(typeof u>"u"){var l=a||this.lead;a=l.row,u=l.column}return this.session.getWordRange(a,u)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var a=this.getCursor(),u=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(u)},s.prototype.getLineRange=function(a,u){var l=typeof a=="number"?a:this.lead.row,o,c=this.session.getFoldLine(l);return c?(l=c.start.row,o=c.end.row):o=l,u===!0?new h(l,0,o,this.session.getLine(o).length):new h(l,0,o+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(a,u,l){var o=a.column,c=a.column+u;return l<0&&(o=a.column-u,c=a.column),this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(o,c).split(" ").length-1==u},s.prototype.moveCursorLeft=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(u.start.row,u.start.column);else if(a.column===0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var l=this.session.getTabSize();this.wouldMoveIntoSoftTab(a,l,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-l):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var a=this.lead.getPosition(),u;if(u=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(u.end.row,u.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var l=this.session.getTabSize(),a=this.lead;this.wouldMoveIntoSoftTab(a,l,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,l):this.moveCursorBy(0,1)}},s.prototype.moveCursorLineStart=function(){var a=this.lead.row,u=this.lead.column,l=this.session.documentToScreenRow(a,u),o=this.session.screenToDocumentPosition(l,0),c=this.session.getDisplayLine(a,null,o.row,o.column),d=c.match(/^\s*/);d[0].length!=u&&!this.session.$useEmacsStyleLineStart&&(o.column+=d[0].length),this.moveCursorToPosition(o)},s.prototype.moveCursorLineEnd=function(){var a=this.lead,u=this.session.getDocumentLastRowColumnPosition(a.row,a.column);if(this.lead.column==u.column){var l=this.session.getLine(u.row);if(u.column==l.length){var o=l.search(/\s+$/);o>0&&(u.column=o)}}this.moveCursorTo(u.row,u.column)},s.prototype.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,u=this.doc.getLine(a).length;this.moveCursorTo(a,u)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),o=l.substring(u);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var c=this.session.getFoldAt(a,u,1);if(c){this.moveCursorTo(c.end.row,c.end.column);return}if(this.session.nonTokenRe.exec(o)&&(u+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,o=l.substring(u)),u>=l.length){this.moveCursorTo(a,l.length),this.moveCursorRight(),a<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(o)&&(u+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.moveCursorLongWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1)){this.moveCursorTo(l.start.row,l.start.column);return}var o=this.session.getFoldStringAt(a,u,-1);o==null&&(o=this.doc.getLine(a).substring(0,u));var c=y.stringReverse(o);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(c)&&(u-=this.session.nonTokenRe.lastIndex,c=c.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),u<=0){this.moveCursorTo(a,0),this.moveCursorLeft(),a>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(c)&&(u-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(a,u)},s.prototype.$shortWordEndIndex=function(a){var u=0,l,o=/\s/,c=this.session.tokenRe;if(c.lastIndex=0,this.session.tokenRe.exec(a))u=this.session.tokenRe.lastIndex;else{for(;(l=a[u])&&o.test(l);)u++;if(u<1){for(c.lastIndex=0;(l=a[u])&&!c.test(l);)if(c.lastIndex=0,u++,o.test(l))if(u>2){u--;break}else{for(;(l=a[u])&&o.test(l);)u++;if(u>2)break}}}return c.lastIndex=0,u},s.prototype.moveCursorShortWordRight=function(){var a=this.lead.row,u=this.lead.column,l=this.doc.getLine(a),o=l.substring(u),c=this.session.getFoldAt(a,u,1);if(c)return this.moveCursorTo(c.end.row,c.end.column);if(u==l.length){var d=this.doc.getLength();do a++,o=this.doc.getLine(a);while(a<d&&/^\s*$/.test(o));/^\s+/.test(o)||(o=""),u=0}var w=this.$shortWordEndIndex(o);this.moveCursorTo(a,u+w)},s.prototype.moveCursorShortWordLeft=function(){var a=this.lead.row,u=this.lead.column,l;if(l=this.session.getFoldAt(a,u,-1))return this.moveCursorTo(l.start.row,l.start.column);var o=this.session.getLine(a).substring(0,u);if(u===0){do a--,o=this.doc.getLine(a);while(a>0&&/^\s*$/.test(o));u=o.length,/\s+$/.test(o)||(o="")}var c=y.stringReverse(o),d=this.$shortWordEndIndex(c);return this.moveCursorTo(a,u-d)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(a,u){var l=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o;if(u===0&&(a!==0&&(this.session.$bidiHandler.isBidiRow(l.row,this.lead.row)?(o=this.session.$bidiHandler.getPosLeft(l.column),l.column=Math.round(o/this.session.$bidiHandler.charWidths[0])):o=l.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?l.column=this.$desiredColumn:this.$desiredColumn=l.column),a!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var c=this.session.lineWidgets[this.lead.row];a<0?a-=c.rowsAbove||0:a>0&&(a+=c.rowCount-(c.rowsAbove||0))}var d=this.session.screenToDocumentPosition(l.row+a,l.column,o);a!==0&&u===0&&d.row===this.lead.row&&(d.column,this.lead.column),this.moveCursorTo(d.row,d.column+u,u===0)},s.prototype.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},s.prototype.moveCursorTo=function(a,u,l){var o=this.session.getFoldAt(a,u,1);o&&(a=o.start.row,u=o.start.column),this.$keepDesiredColumnOnChange=!0;var c=this.session.getLine(a);/[\uDC00-\uDFFF]/.test(c.charAt(u))&&c.charAt(u-1)&&(this.lead.row==a&&this.lead.column==u+1?u=u-1:u=u+1),this.lead.setPosition(a,u),this.$keepDesiredColumnOnChange=!1,l||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(a,u,l){var o=this.session.screenToDocumentPosition(a,u);this.moveCursorTo(o.row,o.column,l)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(a){var u=this.getRange();return a?(a.start.column=u.start.column,a.start.row=u.start.row,a.end.column=u.end.column,a.end.row=u.end.row):a=u,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},s.prototype.getRangeOfMovements=function(a){var u=this.getCursor();try{a(this);var l=this.getCursor();return h.fromPoints(u,l)}catch{return h.fromPoints(u,u)}finally{this.moveCursorToPosition(u)}},s.prototype.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(u){var l=u.clone();return l.isBackwards=u.cursor==u.start,l});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},s.prototype.fromJSON=function(a){if(a.start==null)if(this.rangeList&&a.length>1){this.toSingleRange(a[0]);for(var u=a.length;u--;){var l=h.fromPoints(a[u].start,a[u].end);a[u].isBackwards&&(l.cursor=l.start),this.addRange(l,!0)}return}else a=a[0];this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},s.prototype.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var u=this.ranges.length;u--;)if(!this.ranges[u].isEqual(a[u]))return!1;return!0},s}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,f.implement(p.prototype,x),r.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,r,v){var f=e("./lib/report_error").reportError,y=2e3,x=function(){function h(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var s in this.states){for(var a=this.states[s],u=[],l=0,o=this.matchMappings[s]={defaultToken:"text"},c="g",d=[],w=0;w<a.length;w++){var b=a[w];if(b.defaultToken&&(o.defaultToken=b.defaultToken),b.caseInsensitive&&c.indexOf("i")===-1&&(c+="i"),b.unicode&&c.indexOf("u")===-1&&(c+="u"),b.regex!=null){b.regex instanceof RegExp&&(b.regex=b.regex.toString().slice(1,-1));var I=b.regex,T=new RegExp("(?:("+I+")|(.))").exec("a").length-2;Array.isArray(b.token)?b.token.length==1||T==1?b.token=b.token[0]:T-1!=b.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:b,groupCount:T-1}),b.token=b.token[0]):(b.tokenArray=b.token,b.token=null,b.onMatch=this.$arrayTokens):typeof b.token=="function"&&!b.onMatch&&(T>1?b.onMatch=this.$applyToken:b.onMatch=b.token),T>1&&(/\\\d/.test(b.regex)?I=b.regex.replace(/\\([0-9]+)/g,function(S,C){return"\\"+(parseInt(C,10)+l+1)}):(T=1,I=this.removeCapturingGroups(b.regex)),!b.splitRegex&&typeof b.token!="string"&&d.push(b)),o[l]=w,l+=T,u.push(I),b.onMatch||(b.onMatch=null)}}u.length||(o[0]=0,u.push("$")),d.forEach(function(S){S.splitRegex=this.createSplitterRegexp(S.regex,c)},this),this.regExps[s]=new RegExp("("+u.join(")|(")+")|($)",c)}}return h.prototype.$setMaxTokenCount=function(p){y=p|0},h.prototype.$applyToken=function(p){var s=this.splitRegex.exec(p).slice(1),a=this.token.apply(this,s);if(typeof a=="string")return[{type:a,value:p}];for(var u=[],l=0,o=a.length;l<o;l++)s[l]&&(u[u.length]={type:a[l],value:s[l]});return u},h.prototype.$arrayTokens=function(p){if(!p)return[];var s=this.splitRegex.exec(p);if(!s)return"text";for(var a=[],u=this.tokenArray,l=0,o=u.length;l<o;l++)s[l+1]&&(a[a.length]={type:u[l],value:s[l+1]});return a},h.prototype.removeCapturingGroups=function(p){var s=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(a,u){return u?"(?:":a});return s},h.prototype.createSplitterRegexp=function(p,s){if(p.indexOf("(?=")!=-1){var a=0,u=!1,l={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(o,c,d,w,b,I){return u?u=b!="]":b?u=!0:w?(a==l.stack&&(l.end=I+1,l.stack=-1),a--):d&&(a++,d.length!=1&&(l.stack=a,l.start=I)),o}),l.end!=null&&/^\)*$/.test(p.substr(l.end))&&(p=p.substring(0,l.start)+p.substr(l.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(s||"").replace("g",""))},h.prototype.getLineTokens=function(p,s){if(s&&typeof s!="string"){var a=s.slice(0);s=a[0],s==="#tmp"&&(a.shift(),s=a.shift())}else var a=[];var u=s||"start",l=this.states[u];l||(u="start",l=this.states[u]);var o=this.matchMappings[u],c=this.regExps[u];c.lastIndex=0;for(var d,w=[],b=0,I=0,T={type:null,value:""};d=c.exec(p);){var S=o.defaultToken,C=null,R=d[0],L=c.lastIndex;if(L-R.length>b){var F=p.substring(b,L-R.length);T.type==S?T.value+=F:(T.type&&w.push(T),T={type:S,value:F})}for(var E=0;E<d.length-2;E++)if(d[E+1]!==void 0){C=l[o[E]],C.onMatch?S=C.onMatch(R,u,a,p):S=C.token,C.next&&(typeof C.next=="string"?u=C.next:u=C.next(u,a),l=this.states[u],l||(this.reportError("state doesn't exist",u),u="start",l=this.states[u]),o=this.matchMappings[u],b=L,c=this.regExps[u],c.lastIndex=L),C.consumeLineEnd&&(b=L);break}if(R){if(typeof S=="string")(!C||C.merge!==!1)&&T.type===S?T.value+=R:(T.type&&w.push(T),T={type:S,value:R});else if(S){T.type&&w.push(T),T={type:null,value:""};for(var E=0;E<S.length;E++)w.push(S[E])}}if(b==p.length)break;if(b=L,I++>y){for(I>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:p});b<p.length;)T.type&&w.push(T),T={value:p.substring(b,b+=500),type:"overflow"};u="start",a=[];break}}return T.type&&w.push(T),a.length>1&&a[0]!==u&&a.unshift("#tmp",u),{tokens:w,state:a.length?a:u}},h}();x.prototype.reportError=f,r.Tokenizer=x}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,r,v){var f=e("../lib/deep_copy").deepCopy,y;y=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,s){if(!s){for(var a in p)this.$rules[a]=p[a];return}for(var a in p){for(var u=p[a],l=0;l<u.length;l++){var o=u[l];(o.next||o.onMatch)&&(typeof o.next=="string"&&o.next.indexOf(s)!==0&&(o.next=s+o.next),o.nextState&&o.nextState.indexOf(s)!==0&&(o.nextState=s+o.nextState))}this.$rules[s+a]=u}},this.getRules=function(){return this.$rules},this.embedRules=function(p,s,a,u,l){var o=typeof p=="function"?new p().getRules():p;if(u)for(var c=0;c<u.length;c++)u[c]=s+u[c];else{u=[];for(var d in o)u.push(s+d)}if(this.addRules(o,s),a)for(var w=Array.prototype[l?"push":"unshift"],c=0;c<u.length;c++)w.apply(this.$rules[u[c]],f(a));this.$embeds||(this.$embeds=[]),this.$embeds.push(s)},this.getEmbeds=function(){return this.$embeds};var x=function(p,s){return(p!="start"||s.length)&&s.unshift(this.nextState,p),this.nextState},h=function(p,s){return s.shift(),s.shift()||"start"};this.normalizeRules=function(){var p=0,s=this.$rules;function a(u){var l=s[u];l.processed=!0;for(var o=0;o<l.length;o++){var c=l[o],d=null;Array.isArray(c)&&(d=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+".end",regex:c.end||c.start,next:"pop"}),c.token=c.token+".start",c.push=!0);var w=c.next||c.push;if(w&&Array.isArray(w)){var b=c.stateName;b||(b=c.token,typeof b!="string"&&(b=b[0]||""),s[b]&&(b+=p++)),s[b]=w,c.next=b,a(b)}else w=="pop"&&(c.next=h);if(c.push&&(c.nextState=c.next||c.push,c.next=x,delete c.push),c.rules)for(var I in c.rules)s[I]?s[I].push&&s[I].push.apply(s[I],c.rules[I]):s[I]=c.rules[I];var T=typeof c=="string"?c:c.include;if(T&&(T==="$self"&&(T="start"),Array.isArray(T)?d=T.map(function(C){return s[C]}):d=s[T]),d){var S=[o,1].concat(d);c.noEscape&&(S=S.filter(function(C){return!C.next})),l.splice.apply(l,S),o--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||"text",c.caseInsensitive),delete c.defaultToken)}}Object.keys(s).forEach(a,this)},this.createKeywordMapper=function(p,s,a,u){var l=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(o){for(var c=p[o],d=c.split(u||"|"),w=d.length;w--;){var b=d[w];this.$keywordList.push(b),a&&(b=b.toLowerCase()),l[b]=o}},this),p=null,a?function(o){return l[o.toLowerCase()]||s}:function(o){return l[o]||s}},this.getKeywords=function(){return this.$keywords}}).call(y.prototype),r.TextHighlightRules=y}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,r,v){var f;f=function(){this.$behaviours={}},(function(){this.add=function(y,x,h){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[y]:this.$behaviours[y]={}}this.$behaviours[y][x]=h},this.addBehaviours=function(y){for(var x in y)for(var h in y[x])this.add(x,h,y[x][h])},this.remove=function(y){this.$behaviours&&this.$behaviours[y]&&delete this.$behaviours[y]},this.inherit=function(y,x){if(typeof y=="function")var h=new y().getBehaviours(x);else var h=y.getBehaviours(x);this.addBehaviours(h)},this.getBehaviours=function(y){if(y){for(var x={},h=0;h<y.length;h++)this.$behaviours[y[h]]&&(x[y[h]]=this.$behaviours[y[h]]);return x}else return this.$behaviours}}).call(f.prototype),r.Behaviour=f}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,r,v){var f=e("./range").Range,y=function(){function x(h,p,s){this.$session=h,this.$row=p,this.$rowTokens=h.getTokens(p);var a=h.getTokenAt(p,s);this.$tokenIndex=a?a.index:-1}return x.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]},x.prototype.stepForward=function(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},x.prototype.getCurrentTokenRow=function(){return this.$row},x.prototype.getCurrentTokenColumn=function(){var h=this.$rowTokens,p=this.$tokenIndex,s=h[p].start;if(s!==void 0)return s;for(s=0;p>0;)p-=1,s+=h[p].value.length;return s},x.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},x.prototype.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new f(this.$row,p,this.$row,p+h.value.length)},x}();r.TokenIterator=y}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,r,v){var f=e("../../lib/oop"),y=e("../behaviour").Behaviour,x=e("../../token_iterator").TokenIterator,h=e("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],a,u={},l={'"':'"',"'":"'"},o=function(w){var b=-1;if(w.multiSelect&&(b=w.selection.index,u.rangeCount!=w.multiSelect.rangeCount&&(u={rangeCount:w.multiSelect.rangeCount})),u[b])return a=u[b];a=u[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},c=function(w,b,I,T){var S=w.end.row-w.start.row;return{text:I+b+T,selection:[0,w.start.column+1,S,w.end.column+(S?0:1)]}},d;d=function(w){w=w||{},this.add("braces","insertion",function(b,I,T,S,C){var R=T.getCursorPosition(),L=S.doc.getLine(R.row);if(C=="{"){o(T);var F=T.getSelectionRange(),E=S.doc.getTextRange(F),H=S.getTokenAt(R.row,R.column);if(E!==""&&E!=="{"&&T.getWrapBehavioursEnabled())return c(F,E,"{","}");if(H&&/(?:string)\.quasi|\.xml/.test(H.type)){var P=[/tag\-(?:open|name)/,/attribute\-name/];return P.some(function(K){return K.test(H.type)})||/(string)\.quasi/.test(H.type)&&H.value[R.column-H.start-1]!=="$"?void 0:(d.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]})}else if(d.isSaneInsertion(T,S))return/[\]\}\)]/.test(L[R.column])||T.inMultiSelectMode||w.braces?(d.recordAutoInsert(T,S,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(T,S,"{"),{text:"{",selection:[1,1]})}else if(C=="}"){o(T);var O=L.substring(R.column,R.column+1);if(O=="}"){var _=S.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(_!==null&&d.isAutoInsertedClosing(R,L,C))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(C==`
180
180
  `||C==`\r
181
181
  `){o(T);var A="";d.isMaybeInsertedClosing(R,L)&&(A=h.stringRepeat("}",a.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var O=L.substring(R.column,R.column+1);if(O==="}"){var N=S.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!N)return null;var B=this.$getIndent(S.getLine(N.row))}else if(A)var B=this.$getIndent(L);else{d.clearMaybeInsertedClosing();return}var U=B+S.getTabString();return{text:`
@@ -1393,17 +1393,17 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Tr,i
1393
1393
  `)}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,...t){const e=new this(n);return t.forEach(r=>e.set(r)),e}static accessor(n){const t=(this[pg]=this[pg]={accessors:{}}).accessors,e=this.prototype;function r(v){const f=ka(v);t[f]||(Gx(e,v),t[f]=!0)}return Ae.isArray(n)?n.forEach(r):r(n),this}};Pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(Pr.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),Ae.freezeMethods(Pr);function su(n,t){const e=this||Ca,r=t||e,v=Pr.from(r.headers);let f=r.data;return Ae.forEach(n,function(y){f=y.call(e,f,v.normalize(),t?t.status:void 0)}),v.normalize(),f}function gg(n){return!!(n&&n.__CANCEL__)}function Bs(n,t,e){_t.call(this,n??"canceled",_t.ERR_CANCELED,t,e),this.name="CanceledError"}Ae.inherits(Bs,_t,{__CANCEL__:!0});function fg(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new _t("Request failed with status code "+e.status,[_t.ERR_BAD_REQUEST,_t.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function Yx(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function Xx(n,t){n=n||10;const e=new Array(n),r=new Array(n);let v=0,f=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),p=r[f];y||(y=h),e[v]=x,r[v]=h;let s=f,a=0;for(;s!==v;)a+=e[s++],s=s%n;if(v=(v+1)%n,v===f&&(f=(f+1)%n),h-y<t)return;const u=p&&h-p;return u?Math.round(a*1e3/u):void 0}}function Qx(n,t){let e=0,r=1e3/t,v,f;const y=(x,h=Date.now())=>{e=h,v=null,f&&(clearTimeout(f),f=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),p=h-e;p>=r?y(x,h):(v=x,f||(f=setTimeout(()=>{f=null,y(v)},r-p)))},()=>v&&y(v)]}const vl=(n,t,e=3)=>{let r=0;const v=Xx(50,250);return Qx(f=>{const y=f.loaded,x=f.lengthComputable?f.total:void 0,h=y-r,p=v(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:p||void 0,estimated:p&&x&&s?(x-y)/p:void 0,event:f,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},mg=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},vg=n=>(...t)=>Ae.asap(()=>n(...t)),Zx=vr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,vr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(vr.origin),vr.navigator&&/(msie|trident)/i.test(vr.navigator.userAgent)):()=>!0,Jx=vr.hasStandardBrowserEnv?{write(n,t,e,r,v,f){const y=[n+"="+encodeURIComponent(t)];Ae.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),Ae.isString(r)&&y.push("path="+r),Ae.isString(v)&&y.push("domain="+v),f===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function e1(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function t1(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function yg(n,t,e){let r=!e1(t);return n&&(r||e==!1)?t1(n,t):t}const wg=n=>n instanceof Pr?{...n}:n;function ns(n,t){t=t||{};const e={};function r(p,s,a,u){return Ae.isPlainObject(p)&&Ae.isPlainObject(s)?Ae.merge.call({caseless:u},p,s):Ae.isPlainObject(s)?Ae.merge({},s):Ae.isArray(s)?s.slice():s}function v(p,s,a,u){if(Ae.isUndefined(s)){if(!Ae.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function f(p,s){if(!Ae.isUndefined(s))return r(void 0,s)}function y(p,s){if(Ae.isUndefined(s)){if(!Ae.isUndefined(p))return r(void 0,p)}else return r(void 0,s)}function x(p,s,a){if(a in t)return r(p,s);if(a in n)return r(void 0,p)}const h={url:f,method:f,data:f,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(p,s,a)=>v(wg(p),wg(s),a,!0)};return Ae.forEach(Object.keys(Object.assign({},n,t)),function(p){const s=h[p]||v,a=s(n[p],t[p],p);Ae.isUndefined(a)&&s!==x||(e[p]=a)}),e}const bg=n=>{const t=ns({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:v,xsrfCookieName:f,headers:y,auth:x}=t;t.headers=y=Pr.from(y),t.url=cg(yg(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(Ae.isFormData(e)){if(vr.hasStandardBrowserEnv||vr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[p,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([p||"multipart/form-data",...s].join("; "))}}if(vr.hasStandardBrowserEnv&&(r&&Ae.isFunction(r)&&(r=r(t)),r||r!==!1&&Zx(t.url))){const p=v&&f&&Jx.read(f);p&&y.set(v,p)}return t},n1=typeof XMLHttpRequest<"u",r1=n1&&function(n){return new Promise(function(t,e){const r=bg(n);let v=r.data;const f=Pr.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function d(){if(!c)return;const b=Pr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};fg(function(T){t(T),o()},function(T){e(T),o()},I),c=null}"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(e(new _t("Request aborted",_t.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new _t("Network Error",_t.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||hg;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new _t(b,I.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,n,c)),c=null},v===void 0&&f.setContentType(null),"setRequestHeader"in c&&Ae.forEach(f.toJSON(),function(b,I){c.setRequestHeader(I,b)}),Ae.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=vl(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=vl(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{c&&(e(!b||b.type?new Bs(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=Yx(r.url);if(w&&vr.protocols.indexOf(w)===-1){e(new _t("Unsupported protocol "+w+":",_t.ERR_BAD_REQUEST,n));return}c.send(v||null)})},i1=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,v;const f=function(p){if(!v){v=!0,x();const s=p instanceof Error?p:this.reason;r.abort(s instanceof _t?s:new Bs(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,f(new _t(`timeout ${t} of ms exceeded`,_t.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(f):p.removeEventListener("abort",f)}),n=null)};n.forEach(p=>p.addEventListener("abort",f));const{signal:h}=r;return h.unsubscribe=()=>Ae.asap(x),h}},o1=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,v;for(;r<e;)v=r+t,yield n.slice(r,v),r=v},s1=async function*(n,t){for await(const e of a1(n))yield*o1(e,t)},a1=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},xg=(n,t,e,r)=>{const v=s1(n,t);let f=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:p,value:s}=await v.next();if(p){x(),h.close();return}let a=s.byteLength;if(e){let u=f+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(p){throw x(p),p}},cancel(h){return x(h),v.return()}},{highWaterMark:2})},yl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Cg=yl&&typeof ReadableStream=="function",l1=yl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),kg=(n,...t)=>{try{return!!n(...t)}catch{return!1}},c1=Cg&&kg(()=>{let n=!1;const t=new Request(vr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Sg=64*1024,au=Cg&&kg(()=>Ae.isReadableStream(new Response("").body)),wl={stream:au&&(n=>n.body)};yl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!wl[t]&&(wl[t]=Ae.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new _t(`Response type '${t}' is not supported`,_t.ERR_NOT_SUPPORT,r)})})})(new Response);const u1=async n=>{if(n==null)return 0;if(Ae.isBlob(n))return n.size;if(Ae.isSpecCompliantForm(n))return(await new Request(vr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(n)||Ae.isArrayBuffer(n))return n.byteLength;if(Ae.isURLSearchParams(n)&&(n=n+""),Ae.isString(n))return(await l1(n)).byteLength},h1=async(n,t)=>Ae.toFiniteNumber(n.getContentLength())??u1(t),d1=yl&&(async n=>{let{url:t,method:e,data:r,signal:v,cancelToken:f,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:p,headers:s,withCredentials:a="same-origin",fetchOptions:u}=bg(n);p=p?(p+"").toLowerCase():"text";let l=i1([v,f&&f.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let d;try{if(h&&c1&&e!=="get"&&e!=="head"&&(d=await h1(s,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(Ae.isFormData(r)&&(C=S.headers.get("content-type"))&&s.setContentType(C),S.body){const[R,L]=mg(d,vl(vg(h)));r=xg(S.body,Sg,R,L)}}Ae.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o);const I=au&&(p==="stream"||p==="response");if(au&&(x||I&&c)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=b[F]});const C=Ae.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&mg(C,vl(vg(x),!0))||[];b=new Response(xg(b.body,Sg,R,()=>{L&&L(),c&&c()}),S)}p=p||"text";let T=await wl[Ae.findKey(wl,p)||"text"](b,n);return!I&&c&&c(),await new Promise((S,C)=>{fg(S,C,{data:T,headers:Pr.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new _t("Network Error",_t.ERR_NETWORK,n,o),{cause:w.cause||w}):_t.from(w,w&&w.code,n,o)}}),lu={http:$x,xhr:r1,fetch:d1};Ae.forEach(lu,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Ag=n=>`- ${n}`,p1=n=>Ae.isFunction(n)||n===null||n===!1,_g={getAdapter:n=>{n=Ae.isArray(n)?n:[n];const{length:t}=n;let e,r;const v={};for(let f=0;f<t;f++){e=n[f];let y;if(r=e,!p1(e)&&(r=lu[(y=String(e)).toLowerCase()],r===void 0))throw new _t(`Unknown adapter '${y}'`);if(r)break;v[y||"#"+f]=r}if(!r){const f=Object.entries(v).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?f.length>1?`since :
1394
1394
  `+f.map(Ag).join(`
1395
1395
  `):" "+Ag(f[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:lu};function cu(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Bs(null,n)}function $g(n){return cu(n),n.headers=Pr.from(n.headers),n.data=su.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),_g.getAdapter(n.adapter||Ca.adapter)(n).then(function(t){return cu(n),t.data=su.call(n,n.transformResponse,t),t.headers=Pr.from(t.headers),t},function(t){return gg(t)||(cu(n),t&&t.response&&(t.response.data=su.call(n,n.transformResponse,t.response),t.response.headers=Pr.from(t.response.headers))),Promise.reject(t)})}const Tg="1.9.0",bl={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{bl[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Mg={};bl.transitional=function(n,t,e){function r(v,f){return"[Axios v"+Tg+"] Transitional option '"+v+"'"+f+(e?". "+e:"")}return(v,f,y)=>{if(n===!1)throw new _t(r(f," has been removed"+(t?" in "+t:"")),_t.ERR_DEPRECATED);return t&&!Mg[f]&&(Mg[f]=!0,console.warn(r(f," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(v,f,y):!0}},bl.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function g1(n,t,e){if(typeof n!="object")throw new _t("options must be an object",_t.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let v=r.length;for(;v-- >0;){const f=r[v],y=t[f];if(y){const x=n[f],h=x===void 0||y(x,f,n);if(h!==!0)throw new _t("option "+f+" must be "+h,_t.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new _t("Unknown option "+f,_t.ERR_BAD_OPTION)}}const xl={assertOptions:g1,validators:bl},Hi=xl.validators;let rs=class{constructor(n){this.defaults=n||{},this.interceptors={request:new ug,response:new ug}}async request(n,t){try{return await this._request(n,t)}catch(e){if(e instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const v=r.stack?r.stack.replace(/^.+\n/,""):"";try{e.stack?v&&!String(e.stack).endsWith(v.replace(/^.+\n.+\n/,""))&&(e.stack+=`
1396
- `+v):e.stack=v}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=ns(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:v}=t;e!==void 0&&xl.assertOptions(e,{silentJSONParsing:Hi.transitional(Hi.boolean),forcedJSONParsing:Hi.transitional(Hi.boolean),clarifyTimeoutError:Hi.transitional(Hi.boolean)},!1),r!=null&&(Ae.isFunction(r)?t.paramsSerializer={serialize:r}:xl.assertOptions(r,{encode:Hi.function,serialize:Hi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),xl.assertOptions(t,{baseUrl:Hi.spelling("baseURL"),withXsrfToken:Hi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let f=v&&Ae.merge(v.common,v[t.method]);v&&Ae.forEach(["delete","get","head","post","put","patch","common"],l=>{delete v[l]}),t.headers=Pr.concat(f,v);const y=[];let x=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(t)===!1||(x=x&&l.synchronous,y.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let p,s=0,a;if(!x){const l=[$g.bind(this),void 0];for(l.unshift.apply(l,y),l.push.apply(l,h),a=l.length,p=Promise.resolve(t);s<a;)p=p.then(l[s++],l[s++]);return p}a=y.length;let u=t;for(s=0;s<a;){const l=y[s++],o=y[s++];try{u=l(u)}catch(c){o.call(this,c);break}}try{p=$g.call(this,u)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)p=p.then(h[s++],h[s++]);return p}getUri(n){n=ns(this.defaults,n);const t=yg(n.baseURL,n.url,n.allowAbsoluteUrls);return cg(t,n.params,n.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){rs.prototype[n]=function(t,e){return this.request(ns(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,f){return this.request(ns(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}rs.prototype[n]=t(),rs.prototype[n+"Form"]=t(!0)});let f1=class fb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](v);r._listeners=null}),this.promise.then=v=>{let f;const y=new Promise(x=>{r.subscribe(x),f=x}).then(v);return y.cancel=function(){r.unsubscribe(f)},y},t(function(v,f,y){r.reason||(r.reason=new Bs(v,f,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new fb(function(e){t=e}),cancel:t}}};function m1(n){return function(t){return n.apply(null,t)}}function v1(n){return Ae.isObject(n)&&n.isAxiosError===!0}const uu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uu).forEach(([n,t])=>{uu[t]=n});function Eg(n){const t=new rs(n),e=Gp(rs.prototype.request,t);return Ae.extend(e,rs.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Eg(ns(n,r))},e}const Fn=Eg(Ca);Fn.Axios=rs,Fn.CanceledError=Bs,Fn.CancelToken=f1,Fn.isCancel=gg,Fn.VERSION=Tg,Fn.toFormData=fl,Fn.AxiosError=_t,Fn.Cancel=Fn.CanceledError,Fn.all=function(n){return Promise.all(n)},Fn.spread=m1,Fn.isAxiosError=v1,Fn.mergeConfig=ns,Fn.AxiosHeaders=Pr,Fn.formToJSON=n=>dg(Ae.isHTMLForm(n)?new FormData(n):n),Fn.getAdapter=_g.getAdapter,Fn.HttpStatusCode=uu,Fn.default=Fn;const{Axios:L2,AxiosError:O2,CanceledError:N2,isCancel:D2,CancelToken:F2,VERSION:P2,all:W2,Cancel:B2,isAxiosError:z2,spread:j2,toFormData:H2,AxiosHeaders:U2,HttpStatusCode:V2,formToJSON:q2,getAdapter:K2,mergeConfig:G2}=Fn,hu=Fn.create({baseURL:location.origin,timeout:6e4,params:{}});hu.interceptors.response.use(n=>n,n=>{var t,e,r,v,f,y,x,h,p,s,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(f=(v=n.response)==null?void 0:v.data)!=null&&f.message?u+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?u+=`${n.response.data.exception}`:(s=(p=(h=n.response)==null?void 0:h.data)==null?void 0:p.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:u}),n}else throw n});const Cl=async function(n,t,{data:e,params:r={},headers:v,noAuth:f=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!f){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}v.Authorization=localStorage.openc3Token}return v.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),hu({method:n,url:t,data:e,params:r,headers:v,onUploadProgress:x})},du={Accept:"application/json"},Ig={...du,"Content-Type":"application/json"},Y2=Tr("F",{get:function(n,{params:t,headers:e=du,noScope:r,noAuth:v,onUploadProgress:f}={}){return Cl("get",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:f})},put:function(n,{data:t,params:e,headers:r=Ig,noScope:v,noAuth:f,onUploadProgress:y}={}){return Cl("put",n,{data:t,params:e,headers:r,noScope:v,noAuth:f,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Ig,noScope:v,noAuth:f,onUploadProgress:y}={}){return Cl("post",n,{data:t,params:e,headers:r,noScope:v,noAuth:f,onUploadProgress:y})},delete:function(n,{params:t,headers:e=du,noScope:r,noAuth:v,onUploadProgress:f}={}){return Cl("delete",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:f})}});let kl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,v=e.length;r<v;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(v=>t!==v)}}});class Sa extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class pu extends Sa{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class y1 extends Sa{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ti extends Sa{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class w1 extends Ti{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Rg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class b1{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:t,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:v})=>(e[r]=v,e),{})}}const is=Symbol("state");class Lg{constructor(t={}){this.emitter=kl(),this.params=Object.freeze(t),this.presence=new b1(this),this.initialConnect=!0,this[is]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Rg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[is]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[is]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[is]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[is]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[is]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[is]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(v=>v()),t()})),r.push(this.on("close",v=>{r.forEach(f=>f()),e(v||new Sa("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class x1{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(f=>{e=f}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},v=this._pendingTop;return this._pendings.push(r),v&&await v.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class C1{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class k1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new C1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let v=this._subscriptions[t]=new x1(t);return v.remoteId=this._localToRemote[t],v.subscriber=e,v.unsubscriber=r,v.gvl=this.glv,v}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class S1{constructor(t={}){this.subscriptions=new k1(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let v=this._remoteToLocal[t];if(!v){this._pendingMessages.push([t,e,r]);return}let f=this.subscriptions.get(v);f&&f.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let v=this._remoteToLocal[t];if(!v)return;let f=this.subscriptions.get(v);f&&f.channels.forEach(y=>y.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const Og={debug:0,info:1,warn:2,error:3};class Ng{constructor(t){this.level=t||"warn"}log(t,e,r){Og[t]<Og[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}}class Aa extends Ng{writeLogEntry(){}}class A1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let _1=0;class Dg{constructor(t={}){let{logger:e}=t;this.logger=e||new Aa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let v=Rg(r);if(this.pendingUnsubscriptions[v]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,v),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[v])return this.logger.warn("subscription is already pending, skipping",v),Promise.reject(Error("Already subscribing"));let f=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++_1;this.pendingSubscriptions[v]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(v)),this.maybeRetrySubscribe(h,v,f)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let v=this.pendingSubscriptions[e];v&&v.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let v=this.pendingSubscriptions[e];v&&v.id===t&&(delete this.pendingSubscriptions[e],v.reject(new y1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:v,reason:f,reconnect:y}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let x=t.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new Ti(f);this.reset(x),y===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[r];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],x.resolve(r)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[r];return x?(delete this.pendingSubscriptions[r],x.reject(new pu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(v)return{identifier:r,message:v};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Fg=()=>Date.now()/1e3|0;class $1 extends Dg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Fg()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:v}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=Fg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let f=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of f)this.cable.send({identifier:y,command:"history",history:this.historyRequestFor(y)}),this.presenceInfo[y]&&this.cable.send({identifier:y,command:"join",presence:this.presenceInfo[y]});return this.cable.restored(f)}return this.cable.connected(this.sessionId)}if(e==="presence"){let f=v.type;if(f==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(v))}else if(f==="error"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:v}}if(v){let f=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:v,meta:f}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let v=this.presenceInfo[t];return v&&(e.presence=v),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let v of this.subscriptionStreams[t]){let f=this.streamsPositions[v];f&&(r=!0,e[v]=f)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,v){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:v},{stream:e,epoch:r,offset:v}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,v)=>{this.pendingPresence[t]={resolve:r,reject:v},this.cable.send({command:"presence",identifier:t,data:e})})}}class T1 extends Sa{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class gu extends Lg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}cl(gu,"identifier","__ghost__");const M1="$pubsub";class fu extends Lg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}cl(fu,"identifier",M1);const os=Symbol("state");let E1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:v,hubOptions:f,performFailures:y,transportConfigurator:x}){this.emitter=kl(),this.transport=n,this.encoder=e,this.logger=r||new Aa,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new S1(f||{}),this[os]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,v===!1&&this.connect().catch(()=>{})}get state(){return this[os]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[os]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[os]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Ti("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[os]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ti("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Ti(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[os]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Ti?n:new Ti(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[os]="closed";let e=t||new Ti("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:v,message:f,meta:y}=e;r?this.hub.notify(v,r,f):this.hub.transmit(v,f,y)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new fu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new fu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=gu),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let v=await n.acquire("subscribed");if(v.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),v.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),v.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),v.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),v.release();return}let f={identifier:t,params:e};this.logger.debug("subscribing",f);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...f,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof pu&&this.logger.warn("rejected",f),y instanceof Ti){this.logger.debug("disconnected during subscription; will retry on connect",f),v.release();return}this.logger.error("failed to subscribe",{error:y,...f})}n.close(y),this.hub.unsubscribe(r)}v.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(v){v&&(v instanceof Ti?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:v}):this.logger.error("unsubscribe failed",{id:t,error:v}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new T1;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 v=r.remoteId,f={id:v,action:t,payload:e};this.logger.debug("perform",f);try{let y=await this.protocol.perform(v,t,e);return y&&this.logger.debug("perform result",{message:y,request:f}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:f}),y}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(v=>v()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(v=>v()),t(r)}))}),this._pendingConnect)}};const I1={maxMissingPings:2,maxReconnectAttempts:1/0},zs=()=>Date.now(),Pg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:v}=t;return e=e||2,r===void 0&&(r=.5),f=>{let y=n*e**f,x=y*e,h=y+(x-y)*Math.random(),p=2*(Math.random()-.5)*r;return h=h*(1+p),v&&v<h&&(h=v),h}};let Wg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},I1,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Aa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=zs()}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=zs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=zs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=zs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=zs()})),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=zs()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new w1))}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 R1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=kl(),this.unbind=[],this.logger=e.logger||new Aa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}class L1{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=kl();let{format:v,subprotocol:f,authStrategy:y}=e;this.format=v||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=f}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let v=[];v.push(this.once("open",()=>{v.forEach(f=>f()),e()})),v.push(this.once("close",()=>{v.forEach(f=>f()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let v=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(v)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(v=>v.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Bg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function O1(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},Bg,t);let{protocol:e,websocketImplementation:r,websocketFormat:v,websocketOptions:f,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:p,transport:s,encoder:a,lazy:u,monitor:l,pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:I,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:C,performFailures:R,transportConfigurator:L,auth:F}=t;if(p=p||new Aa(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")e=new Dg({logger:p,...S});else if(P==="actioncable-v1-ext")e=new $1({logger:p,historyTimestamp:T,...S});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new A1,v=v||"text";else if(O==="msgpack"){if(v="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(v=v||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new L1(n,{websocketImplementation:r,websocketOptions:f,subprotocol:b,authStrategy:y,format:v}),x&&(s=new R1([s,...x],{logger:p})),F&&F.token&&s.setToken(F.token,F.param||"jid"),c=c||Pg(o),l!==!1&&(l=l||new Wg({pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,logger:p}));let E={concurrentSubscribes:C},H=new E1({protocol:e,transport:s,encoder:a,logger:p,lazy:u,hubOptions:E,performFailures:R,transportConfigurator:L});return l&&(l.watch(H),H.monitor=l),I&&N1(H,async()=>{try{await I(s)}catch(P){return p.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function N1(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class D1{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class F1 extends gu{constructor(t,e,r){super(t,e),this.subscription=new D1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:v})=>this.subscription.notify("connected",{reconnected:v})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",v=>this.subscription.notify("received",v)),this.on("close",v=>{v&&v instanceof pu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class P1{constructor(t){this.cable=t}create(t,e){let r,v;typeof t=="object"?(r=t.channel,delete t.channel,v=t):(r=t,v={});let f=new F1(r,v,e);return f.subscription.notify("initialized"),this.cable.subscribe(f),f.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class W1{constructor(t){this.cable=t,this.subscriptions=new P1(t)}}class B1 extends Ng{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class z1 extends Wg{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=v=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:v})},r=()=>this.disconnect(new Ti("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const j1=["cable","action-cable"],H1="/cable",Sl=(n,t)=>{for(let e of j1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},zg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,U1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"url");if(n)return zg(n)}return zg(H1)},V1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"history-timestamp");if(n)return n|0}},q1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token")},K1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token-param")};function G1(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||U1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=V1());let e=q1();if(e){let p=K1();t.auth=Object.assign({token:e,param:p},t.auth||{})}t=Object.assign({},Bg,t);let{logLevel:r,logger:v,pingInterval:f,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return v=t.logger=t.logger||new B1(r),y=t.reconnectStrategy=t.reconnectStrategy||Pg(f),t.monitor!==!1&&(t.monitor=t.monitor||new z1({pingInterval:f,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:v})),O1(n,t)}function Y1(n,t){let e=G1(n,t);return new W1(e)}class X1{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},v={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(f=>{if(f&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=Y1(y)}return this._cable.subscriptions.create({channel:t,...v},r)})}recordPing(){}}Tr("P",X1);class Q1{constructor(t,e,r="",v=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=v}}Tr("b",Q1);function Al(n){return Z1.test(n)}const Z1=/^-?[0-9]+$/;function jg(n){return J1.test(n)}const J1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Hg(n,t){const e=Number.parseFloat(n),r=String(e),v=Ug(n),f=Ug(r);return!!(v===f||(t==null?void 0:t.approx)===!0&&!Al(n)&&f.length>=14&&v.startsWith(f.substring(0,14)))}let _a=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function eC(n){if(Hg(n,{approx:!1}))return;if(Al(n))return _a.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?_a.underflow:_a.truncate_float:_a.overflow}function Ug(n){return n.replace(tC,"").replace(rC,"").replace(iC,"").replace(nC,"")}const tC=/[eE][+-]?\d+$/,nC=/^-?(0*)?/,rC=/\./,iC=/0+$/;class oC{constructor(t){if(cl(this,"isLosslessNumber",!0),!jg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=eC(this.value);if(t===void 0||t===_a.truncate_float)return Number.parseFloat(this.value);if(Al(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function sC(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function aC(n){return new oC(n)}function lC(n,t){return mu({"":n},"",n,t)}function mu(n,t,e,r){return Array.isArray(e)?r.call(n,t,uC(e,r)):e&&typeof e=="object"&&!sC(e)?r.call(n,t,cC(e,r)):r.call(n,t,e)}function cC(n,t){for(const e of Object.keys(n)){const r=mu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function uC(n,t){for(let e=0;e<n.length;e++)n[e]=mu(n,String(e),n[e],t);return n}function hC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aC,r=0;const v=x();return o(v),d(),t?lC(v,t):v;function f(){if(n.charCodeAt(r)===vC){r++,p();const _={};let A=!0;for(;r<n.length&&n.charCodeAt(r)!==qg;){A?A=!1:(u(),p());const N=r,B=s();if(B===void 0){I();return}p(),l();const U=x();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(_,B)&&!vu(U,_[B])&&T(B,N+1),_[B]=U}return n.charCodeAt(r)!==qg&&S(),r++,_}}function y(){if(n.charCodeAt(r)===yC){r++,p();const _=[];let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Kg;){A?A=!1:u();const N=x();c(N),_.push(N)}return n.charCodeAt(r)!==Kg&&C(),r++,_}}function x(){p();const _=s()??a()??f()??y()??h("true",!0)??h("false",!1)??h("null",null);return p(),_}function h(_,A){if(n.slice(r,r+_.length)===_)return r+=_.length,A}function p(){for(;dC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===yu){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==yu;){if(n.charCodeAt(r)===mC){const A=n[r+1],N=fC[A];N!==void 0?(_+=N,r++):A==="u"?_l(n.charCodeAt(r+2))&&_l(n.charCodeAt(r+3))&&_l(n.charCodeAt(r+4))&&_l(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):E(r):L(r)}else gC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return b(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===Gg&&(r++,w(_)),n.charCodeAt(r)===wu)r++;else if(pC(n.charCodeAt(r)))for(r++;$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===_C)for(r++,w(_);$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===IC||n.charCodeAt(r)===EC)for(r++,(n.charCodeAt(r)===Gg||n.charCodeAt(r)===kC)&&r++,w(_);$l(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==AC)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(n.charCodeAt(r)!==$C)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function c(_){if(_===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(_){if(!$l(n.charCodeAt(r))){const A=n.slice(_,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function b(){if(n.charCodeAt(r)!==yu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function I(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(_,A){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${A}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${H()}`)}function L(_){const A=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function E(_){const A=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function dC(n){return n===wC||n===bC||n===xC||n===CC}function _l(n){return n>=wu&&n<=bu||n>=TC&&n<=RC||n>=MC&&n<=LC}function $l(n){return n>=wu&&n<=bu}function pC(n){return n>=SC&&n<=bu}function gC(n){return n>=32&&n<=1114111}function vu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>vu(e,t[r])):Vg(n)&&Vg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>vu(n[e],t[e])):!1}function Vg(n){return typeof n=="object"&&n!==null}const fC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1396
+ `+v):e.stack=v}catch{}}throw e}}_request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=ns(this.defaults,t);const{transitional:e,paramsSerializer:r,headers:v}=t;e!==void 0&&xl.assertOptions(e,{silentJSONParsing:Hi.transitional(Hi.boolean),forcedJSONParsing:Hi.transitional(Hi.boolean),clarifyTimeoutError:Hi.transitional(Hi.boolean)},!1),r!=null&&(Ae.isFunction(r)?t.paramsSerializer={serialize:r}:xl.assertOptions(r,{encode:Hi.function,serialize:Hi.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),xl.assertOptions(t,{baseUrl:Hi.spelling("baseURL"),withXsrfToken:Hi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let f=v&&Ae.merge(v.common,v[t.method]);v&&Ae.forEach(["delete","get","head","post","put","patch","common"],l=>{delete v[l]}),t.headers=Pr.concat(f,v);const y=[];let x=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(t)===!1||(x=x&&l.synchronous,y.unshift(l.fulfilled,l.rejected))});const h=[];this.interceptors.response.forEach(function(l){h.push(l.fulfilled,l.rejected)});let p,s=0,a;if(!x){const l=[$g.bind(this),void 0];for(l.unshift.apply(l,y),l.push.apply(l,h),a=l.length,p=Promise.resolve(t);s<a;)p=p.then(l[s++],l[s++]);return p}a=y.length;let u=t;for(s=0;s<a;){const l=y[s++],o=y[s++];try{u=l(u)}catch(c){o.call(this,c);break}}try{p=$g.call(this,u)}catch(l){return Promise.reject(l)}for(s=0,a=h.length;s<a;)p=p.then(h[s++],h[s++]);return p}getUri(n){n=ns(this.defaults,n);const t=yg(n.baseURL,n.url,n.allowAbsoluteUrls);return cg(t,n.params,n.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(n){rs.prototype[n]=function(t,e){return this.request(ns(e||{},{method:n,url:t,data:(e||{}).data}))}}),Ae.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,f){return this.request(ns(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}rs.prototype[n]=t(),rs.prototype[n+"Form"]=t(!0)});let f1=class fb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](v);r._listeners=null}),this.promise.then=v=>{let f;const y=new Promise(x=>{r.subscribe(x),f=x}).then(v);return y.cancel=function(){r.unsubscribe(f)},y},t(function(v,f,y){r.reason||(r.reason=new Bs(v,f,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new fb(function(e){t=e}),cancel:t}}};function m1(n){return function(t){return n.apply(null,t)}}function v1(n){return Ae.isObject(n)&&n.isAxiosError===!0}const uu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(uu).forEach(([n,t])=>{uu[t]=n});function Eg(n){const t=new rs(n),e=Gp(rs.prototype.request,t);return Ae.extend(e,rs.prototype,t,{allOwnKeys:!0}),Ae.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Eg(ns(n,r))},e}const Pn=Eg(Ca);Pn.Axios=rs,Pn.CanceledError=Bs,Pn.CancelToken=f1,Pn.isCancel=gg,Pn.VERSION=Tg,Pn.toFormData=fl,Pn.AxiosError=_t,Pn.Cancel=Pn.CanceledError,Pn.all=function(n){return Promise.all(n)},Pn.spread=m1,Pn.isAxiosError=v1,Pn.mergeConfig=ns,Pn.AxiosHeaders=Pr,Pn.formToJSON=n=>dg(Ae.isHTMLForm(n)?new FormData(n):n),Pn.getAdapter=_g.getAdapter,Pn.HttpStatusCode=uu,Pn.default=Pn;const{Axios:L2,AxiosError:O2,CanceledError:N2,isCancel:D2,CancelToken:F2,VERSION:P2,all:W2,Cancel:B2,isAxiosError:z2,spread:j2,toFormData:H2,AxiosHeaders:U2,HttpStatusCode:V2,formToJSON:q2,getAdapter:K2,mergeConfig:G2}=Pn,hu=Pn.create({baseURL:location.origin,timeout:6e4,params:{}});hu.interceptors.response.use(n=>n,n=>{var t,e,r,v,f,y,x,h,p,s,a;if(n.response){if(n.response.status===401&&OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity,!0).then(function(o){o&&OpenC3Auth.setTokens()}),n.response.config.headers["Ignore-Errors"]&&n.response.config.headers["Ignore-Errors"].includes(n.response.status.toString()))return Promise.reject(n);let u=`HTTP ${n.response.status} - `;(t=n.response)!=null&&t.statusText&&(u+=`${n.response.statusText} `),(r=(e=n.response)==null?void 0:e.config)!=null&&r.data&&(u+=`${n.response.config.data} `),(f=(v=n.response)==null?void 0:v.data)!=null&&f.message?u+=`${n.response.data.message}`:(x=(y=n.response)==null?void 0:y.data)!=null&&x.exception?u+=`${n.response.data.exception}`:(s=(p=(h=n.response)==null?void 0:h.data)==null?void 0:p.error)!=null&&s.message?(n.response.data.error.class&&(u+=`${n.response.data.error.class} `),u+=`${n.response.data.error.message}`):u+=`${(a=n.response)==null?void 0:a.data}`;const{$cosmosNotify:l}=window;throw l&&l.serious({title:"Network error",body:u}),n}else throw n});const Cl=async function(n,t,{data:e,params:r={},headers:v,noAuth:f=!1,noScope:y=!1,onUploadProgress:x=!1}={}){if(!f){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}v.Authorization=localStorage.openc3Token}return v.manual=!0,!y&&!r.scope&&(r.scope=window.openc3Scope),hu({method:n,url:t,data:e,params:r,headers:v,onUploadProgress:x})},du={Accept:"application/json"},Ig={...du,"Content-Type":"application/json"},Y2=Tr("F",{get:function(n,{params:t,headers:e=du,noScope:r,noAuth:v,onUploadProgress:f}={}){return Cl("get",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:f})},put:function(n,{data:t,params:e,headers:r=Ig,noScope:v,noAuth:f,onUploadProgress:y}={}){return Cl("put",n,{data:t,params:e,headers:r,noScope:v,noAuth:f,onUploadProgress:y})},post:function(n,{data:t,params:e,headers:r=Ig,noScope:v,noAuth:f,onUploadProgress:y}={}){return Cl("post",n,{data:t,params:e,headers:r,noScope:v,noAuth:f,onUploadProgress:y})},delete:function(n,{params:t,headers:e=du,noScope:r,noAuth:v,onUploadProgress:f}={}){return Cl("delete",n,{params:t,headers:e,noScope:r,noAuth:v,onUploadProgress:f})}});let kl=()=>({emit(n,...t){for(let e=this.events[n]||[],r=0,v=e.length;r<v;r++)e[r](...t)},events:{},on(n,t){var e;return((e=this.events)[n]||(e[n]=[])).push(t),()=>{var r;this.events[n]=(r=this.events[n])==null?void 0:r.filter(v=>t!==v)}}});class Sa extends Error{constructor(t,e){t instanceof Error?(super(t.message),this.cause=t):super(t),this.reason=e,this.name="ReasonError"}}class pu extends Sa{constructor(t){super("Rejected",t),this.name="SubscriptionRejectedError"}}class y1 extends Sa{constructor(t){super(t||"Timed out to receive subscription ack"),this.name="SubscriptionTimeoutError"}}class Ti extends Sa{constructor(t,e){e?super(t,e):super("Disconnected",t),this.name="DisconnectedError"}}class w1 extends Ti{constructor(t){super(t,"stale_connection"),this.name="StaleConnectionError"}}function Rg(n){return n?`{${Object.keys(n).sort().filter(t=>n[t]!==void 0).map(t=>{let e=JSON.stringify(n[t]);return`${JSON.stringify(t)}:${e}`}).join(",")}}`:""}class b1{constructor(t){this.channel=t,this.listeners=[]}watch(){this.listeners.push(this.channel.on("presence",t=>{if(t.type==="info"){this._state||(this._state=this.stateFromInfo(t));return}this._state&&(t.type==="join"?this._state[t.id]=t.info:t.type==="leave"&&delete this._state[t.id])}))}reset(){delete this._state}dispose(){delete this._info,delete this._state,this.listeners.forEach(t=>t()),this.listeners.length=0}async join(t,e){if(!this._info)return this._info={id:t,info:e},this.channel.perform("$presence:join",this._info)}async leave(){if(!this._info)return;let t=await this.channel.perform("$presence:leave");return delete this._info,t}async info(){return this._state?this._state:(this._promise||(this._promise=this._sync()),await this._promise,this._state)}async _sync(){this.watch();try{let t=await this.channel.perform("$presence:info",{});return this._state=this.stateFromInfo(t),this._state}finally{delete this._promise}}stateFromInfo(t){return t.records.reduce((e,{id:r,info:v})=>(e[r]=v,e),{})}}const is=Symbol("state");class Lg{constructor(t={}){this.emitter=kl(),this.params=Object.freeze(t),this.presence=new b1(this),this.initialConnect=!0,this[is]="idle"}get identifier(){return this._identifier?this._identifier:(this._identifier=Rg({channel:this.channelId,...this.params}),this._identifier)}get channelId(){return this.constructor.identifier}get state(){return this[is]}attached(t){if(this.receiver){if(this.receiver!==t)throw Error("Already connected to a different receiver");return!1}return this.receiver=t,!0}connecting(){this[is]="connecting"}connected(){if(this.state==="connected"||this.state==="closed")return;this[is]="connected";let t=!1;this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:t})):this.emit("connect",{reconnect:!0,restored:t})}restored(){if(this.state==="connected")throw Error("Already connected");this[is]="connected";let t=!0,e=!0;this.initialConnect=!1,this.emit("connect",{reconnect:e,restored:t})}disconnected(t){this.state==="disconnected"||this.state==="closed"||(this[is]="disconnected",this.presence.reset(),this.emit("disconnect",t))}closed(t){this.state!=="closed"&&(this[is]="closed",delete this.receiver,this.initialConnect=!0,this.presence.dispose(),this.emit("close",t))}disconnect(){this.state==="idle"||this.state==="closed"||this.receiver.unsubscribe(this)}async perform(t,e){if(this.state==="idle"||this.state==="closed")throw Error("Channel is not subscribed");return this.receiver.perform(this.identifier,t,e)}async send(t){return this.perform(void 0,t)}async whisper(t){try{await this.perform("$whisper",t)}catch(e){let r=this.receiver?this.receiver.logger:null;r&&r.warn("whisper failed: ",e)}}receive(t,e){this.emit("message",t,e)}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}emit(t,...e){return this.emitter.emit(t,...e)}ensureSubscribed(){return this.state==="connected"?Promise.resolve():this.state==="closed"?Promise.reject(Error("Channel is unsubscribed")):this.pendingSubscribe()}pendingSubscribe(){return this._pendingSubscribe?this._pendingSubscribe:(this._pendingSubscribe=new Promise((t,e)=>{let r=[()=>delete this._pendingSubscribe];r.push(this.on("connect",()=>{r.forEach(v=>v()),t()})),r.push(this.on("close",v=>{r.forEach(f=>f()),e(v||new Sa("Channel was disconnected before subscribing","canceled"))}))}),this._pendingSubscribe)}}class x1{constructor(t){this.id=t,this.intent="unsubscribed",this.state="idle",this.channels=[],this.disposed=!1,this._pendings=[]}add(t){this.channels.includes(t)||this.channels.push(t)}remove(t){let e=this.channels.indexOf(t);e>-1&&this.channels.splice(e,1)}notify(t,...e){this.state=t==="restored"?"connected":t,e.length===1?this.channels.forEach(r=>r[t](e[0])):this.channels.forEach(r=>r[t]())}pending(t){this._checkIntent(t);let e=this._pendings[0];return!e||e.intent!==t?Promise.resolve():e.promise}ensureResubscribed(){this.disposed||(this.intent=void 0,this.ensureSubscribed())}ensureSubscribed(){if(this.intent!=="subscribed"){if(this.disposed)throw Error("Subscription is disposed");this.intent="subscribed",!this._mergeWithPending("unsubscribed")&&this.subscriber(this)}}maybeUnsubscribe(){this.disposed||this.intent==="unsubscribed"||this.channels.length>0||(this.intent="unsubscribed",this._mergeWithPending("subscribed"))||this.unsubscriber(this)}async acquire(t){this._checkIntent(t);let e,r={promise:new Promise(f=>{e=f}),intent:t,release:()=>{this._pendings.splice(this._pendings.indexOf(r),1),e(r)},canceled:!1,acquired:!1},v=this._pendingTop;return this._pendings.push(r),v&&await v.promise,this.gvl&&await this.gvl.acquire(r,t),r.acquired=!0,r}close(t){this.disposed=!0,this.intent=void 0,this.notify("closed",t)}_checkIntent(t){if(!(t==="unsubscribed"||t==="subscribed"))throw Error(`Unknown subscription intent: ${t}`)}get _pendingTop(){return this._pendings.length?this._pendings[this._pendings.length-1]:void 0}_mergeWithPending(t){let e=this._pendingTop;return!e||e.acquired||e.intent!==t?!1:(this._pendings.pop(),e.canceled=!0,!0)}}class C1{constructor(){this.queue=[]}async acquire(t,e){e==="subscribed"&&(this.queue.push(t.promise.then(()=>{this.queue.splice(this.queue.indexOf(t),1)})),this.queue.length>1&&await this.queue[this.queue.length-2])}}class k1{constructor(t){t.concurrentSubscribes===!1&&(this.glv=new C1),this._subscriptions={},this._localToRemote={}}all(){return Object.values(this._subscriptions)}get(t){return this._subscriptions[t]}create(t,{subscribe:e,unsubscribe:r}){let v=this._subscriptions[t]=new x1(t);return v.remoteId=this._localToRemote[t],v.subscriber=e,v.unsubscriber=r,v.gvl=this.glv,v}remove(t){delete this._subscriptions[t],delete this._localToRemote[t]}storeRemoteId(t,e){this._localToRemote[t]=e;let r=this.get(t);r&&(r.remoteId=e)}}class S1{constructor(t={}){this.subscriptions=new k1(t),this._pendingMessages=[],this._remoteToLocal={}}subscribe(t,e){this._remoteToLocal[e]=t,this.subscriptions.storeRemoteId(t,e),this.flush(e)}unsubscribe(t){let e=this.subscriptions.get(t);if(!e)return;let r=e.remoteId;r&&delete this._remoteToLocal[r],this.subscriptions.remove(t)}transmit(t,e,r){let v=this._remoteToLocal[t];if(!v){this._pendingMessages.push([t,e,r]);return}let f=this.subscriptions.get(v);f&&f.channels.forEach(y=>{y.receive(e,r)})}notify(t,e,r){let v=this._remoteToLocal[t];if(!v)return;let f=this.subscriptions.get(v);f&&f.channels.forEach(y=>y.emit(e,r))}close(){this._pendingMessages.length=0}get size(){return this.channels.length}get channels(){return this.subscriptions.all().flatMap(t=>t.channels)}flush(t){let e=[];for(let r of this._pendingMessages)r[0]===t?this.transmit(r[0],r[1],r[2]):e.push(r);this._pendingMessages=e}}const Og={debug:0,info:1,warn:2,error:3};class Ng{constructor(t){this.level=t||"warn"}log(t,e,r){Og[t]<Og[this.level]||this.writeLogEntry(t,e,r)}writeLogEntry(){throw Error("Not implemented")}debug(t,e){this.log("debug",t,e)}info(t,e){this.log("info",t,e)}warn(t,e){this.log("warn",t,e)}error(t,e){this.log("error",t,e)}}class Aa extends Ng{writeLogEntry(){}}class A1{encode(t){return JSON.stringify(t)}decode(t){try{return JSON.parse(t)}catch{}}}let _1=0;class Dg{constructor(t={}){let{logger:e}=t;this.logger=e||new Aa,this.pendingSubscriptions={},this.pendingUnsubscriptions={},this.subscribeCooldownInterval=t.subscribeCooldownInterval||250,this.subscribeRetryInterval=t.subscribeRetryInterval||5e3}attached(t){this.cable=t}subscribe(t,e){let r={channel:t};e&&Object.assign(r,e);let v=Rg(r);if(this.pendingUnsubscriptions[v]){let y=this.subscribeCooldownInterval*1.5;return this.logger.debug(`unsubscribed recently, cooldown for ${y}`,v),new Promise(x=>{setTimeout(()=>{x(this.subscribe(t,e))},y)})}if(this.pendingSubscriptions[v])return this.logger.warn("subscription is already pending, skipping",v),Promise.reject(Error("Already subscribing"));let f=this.subscribeRetryInterval;return new Promise((y,x)=>{let h=++_1;this.pendingSubscriptions[v]={resolve:y,reject:x,id:h},this.cable.send(this.buildSubscribeRequest(v)),this.maybeRetrySubscribe(h,v,f)})}buildSubscribeRequest(t){return{command:"subscribe",identifier:t}}maybeRetrySubscribe(t,e,r){setTimeout(()=>{let v=this.pendingSubscriptions[e];v&&v.id===t&&(this.logger.warn(`no subscription ack received in ${r}ms, retrying subscribe`,e),this.cable.send(this.buildSubscribeRequest(e)),this.maybeExpireSubscribe(t,e,r))},r)}maybeExpireSubscribe(t,e,r){setTimeout(()=>{let v=this.pendingSubscriptions[e];v&&v.id===t&&(delete this.pendingSubscriptions[e],v.reject(new y1(`Haven't received subscription ack in ${r*2}ms for ${e}`)))},r)}unsubscribe(t){return this.cable.send({command:"unsubscribe",identifier:t}),this.pendingUnsubscriptions[t]=!0,setTimeout(()=>{delete this.pendingUnsubscriptions[t]},this.subscribeCooldownInterval),Promise.resolve()}perform(t,e,r){return e==="$whisper"?this.whisper(t,r):(r||(r={}),r.action=e,this.cable.send({command:"message",identifier:t,data:JSON.stringify(r)}),Promise.resolve())}whisper(t,e){return this.cable.send({command:"whisper",identifier:t,data:e}),Promise.resolve()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:v,reason:f,reconnect:y}=t;if(e==="ping")return this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="welcome"){let x=t.sid;return x&&this.cable.setSessionId(x),this.cable.connected()}if(e==="disconnect"){let x=new Ti(f);this.reset(x),y===!1?this.cable.closed(x):this.cable.disconnected(x);return}if(e==="confirm_subscription"){let x=this.pendingSubscriptions[r];if(!x){this.logger.error("subscription not found, unsubscribing",{type:e,identifier:r}),this.unsubscribe(r);return}return delete this.pendingSubscriptions[r],x.resolve(r)}if(e==="reject_subscription"){let x=this.pendingSubscriptions[r];return x?(delete this.pendingSubscriptions[r],x.reject(new pu)):this.logger.error("subscription not found",{type:e,identifier:r})}if(v)return{identifier:r,message:v};this.logger.warn(`unknown message type: ${e}`,{message:t})}reset(t){for(let e in this.pendingSubscriptions)this.pendingSubscriptions[e].reject(t);this.pendingSubscriptions={}}recoverableClosure(){return!1}}const Fg=()=>Date.now()/1e3|0;class $1 extends Dg{constructor(t={}){super(t),this.streamsPositions={},this.subscriptionStreams={},this.pendingHistory={},this.pendingPresence={},this.presenceInfo={},this.restoreSince=t.historyTimestamp,this.disableSessionRecovery=t.disableSessionRecovery,this.restoreSince===void 0&&(this.restoreSince=Fg()),this.sessionId=void 0,this.sendPongs=t.pongs}reset(t){for(let e in this.pendingPresence)this.pendingPresence[e].reject(t);return this.pendingPresence={},super.reset()}receive(t){if(typeof t!="object"){this.logger.error("unsupported message format",{message:t});return}let{type:e,identifier:r,message:v}=t;if(e==="disconnect")return delete this.sessionId,this.cable.setSessionId(""),super.receive(t);if(e==="reject_subscription")return super.receive(t);if(e==="confirm_subscription")return this.subscriptionStreams[r]||(this.subscriptionStreams[r]=new Set),super.receive(t);if(e==="ping")return this.restoreSince&&(this.restoreSince=Fg()),this.sendPongs&&this.sendPong(),this.cable.keepalive(t.message);if(this.cable.keepalive(),e==="confirm_history"){this.logger.debug("history result received",t),this.cable.notify("history_received",r);return}if(e==="reject_history"){this.logger.warn("failed to retrieve history",t),this.cable.notify("history_not_found",r);return}if(e==="welcome"){if(this.disableSessionRecovery||(this.sessionId=t.sid,this.sessionId&&this.cable.setSessionId(this.sessionId)),t.restored){let f=t.restored_ids||Object.keys(this.subscriptionStreams);for(let y of f)this.cable.send({identifier:y,command:"history",history:this.historyRequestFor(y)}),this.presenceInfo[y]&&this.cable.send({identifier:y,command:"join",presence:this.presenceInfo[y]});return this.cable.restored(f)}return this.cable.connected(this.sessionId)}if(e==="presence"){let f=v.type;if(f==="info"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.resolve(v))}else if(f==="error"){let y=this.pendingPresence[r];y&&(delete this.pendingPresence[r],y.reject(new Error("failed to retrieve presence")))}return{type:e,identifier:r,message:v}}if(v){let f=this.trackStreamPosition(r,t.stream_id,t.epoch,t.offset);return{identifier:r,message:v,meta:f}}this.logger.warn(`unknown message type: ${e}`,{message:t})}perform(t,e,r){switch(e){case"$presence:join":return this.join(t,r);case"$presence:leave":return this.leave(t,r);case"$presence:info":return this.presence(t,r)}return super.perform(t,e,r)}unsubscribe(t){return delete this.presenceInfo[t],super.unsubscribe(t)}buildSubscribeRequest(t){let e=super.buildSubscribeRequest(t),r=this.historyRequestFor(t);r&&(e.history=r,this.pendingHistory[t]=!0);let v=this.presenceInfo[t];return v&&(e.presence=v),e}recoverableClosure(){return!!this.sessionId}historyRequestFor(t){let e={},r=!1;if(this.subscriptionStreams[t])for(let v of this.subscriptionStreams[t]){let f=this.streamsPositions[v];f&&(r=!0,e[v]=f)}if(!(!r&&!this.restoreSince))return{since:this.restoreSince,streams:e}}trackStreamPosition(t,e,r,v){if(!(!e||!r))return this.subscriptionStreams[t]||(this.subscriptionStreams[t]=new Set),this.subscriptionStreams[t].add(e),this.streamsPositions[e]={epoch:r,offset:v},{stream:e,epoch:r,offset:v}}async sendPong(){await new Promise(t=>setTimeout(t,0)),this.cable.state==="connected"&&this.cable.send({command:"pong"})}async join(t,e){return this.presenceInfo[t]=e,this.cable.send({command:"join",identifier:t,presence:e}),Promise.resolve()}async leave(t,e){return delete this.presenceInfo[t],this.cable.send({command:"leave",identifier:t,presence:e}),Promise.resolve()}presence(t,e){return this.pendingPresence[t]?(this.logger.warn("presence is already pending, skipping",t),Promise.reject(Error("presence request is already pending"))):new Promise((r,v)=>{this.pendingPresence[t]={resolve:r,reject:v},this.cable.send({command:"presence",identifier:t,data:e})})}}class T1 extends Sa{constructor(){super("No connection","closed"),this.name="NoConnectionError"}}class gu extends Lg{constructor(t,e){super(e),this.channelId=t}set channelId(t){this._channelId=t}get channelId(){return this._channelId}}cl(gu,"identifier","__ghost__");const M1="$pubsub";class fu extends Lg{async perform(t,e){if(t.startsWith("$"))return super.perform(t,e);throw Error("not implemented")}}cl(fu,"identifier",M1);const os=Symbol("state");let E1=class{constructor({transport:n,protocol:t,encoder:e,logger:r,lazy:v,hubOptions:f,performFailures:y,transportConfigurator:x}){this.emitter=kl(),this.transport=n,this.encoder=e,this.logger=r||new Aa,this.protocol=t,this.performFailures=y||"throw",this.protocol.attached(this),this.hub=new S1(f||{}),this[os]="idle",this.handleClose=this.handleClose.bind(this),this.handleIncoming=this.handleIncoming.bind(this),this.transportConfigurator=x,this.transport.on("close",this.handleClose),this.transport.on("data",this.handleIncoming),this.initialConnect=!0,this.recovering=!1,v===!1&&this.connect().catch(()=>{})}get state(){return this[os]}async connect(){if(this.state==="connected")return Promise.resolve();if(this.state==="connecting")return this.pendingConnect();let n=this.state==="idle";this[os]="connecting";let t=this.pendingConnect();this.logger.debug("connecting");try{this.transportConfigurator&&await this.transportConfigurator(this.transport,{initial:n}),await this.transport.open()}catch(e){this.handleClose(e)}return t}setSessionId(n){this.sessionId=n,this.transport.setParam("sid",n)}connected(){if(this.state==="connected")return;this.logger.info("connected"),this[os]="connected",this.recovering&&this.hub.subscriptions.all().forEach(t=>t.notify("disconnected",new Ti("recovery_failed"))),this.hub.subscriptions.all().forEach(t=>this._resubscribe(t));let n=!1;this.recovering=!1,this.initialConnect?(this.initialConnect=!1,this.emit("connect",{reconnect:!1,restored:n})):this.emit("connect",{reconnect:!0,restored:n})}restored(n){this.logger.info("connection recovered",{remoteIds:n}),this[os]="connected",this.hub.subscriptions.all().forEach(r=>{n&&r.remoteId&&n.includes(r.remoteId)?r.notify("restored"):(r.notify("disconnected",new Ti("recovery_failed")),this._resubscribe(r))});let t=!this.initialConnect,e=!0;this.recovering=!1,this.initialConnect=!1,this.emit("connect",{reconnect:t,restored:e})}notify(n,t,e){t&&typeof t!="string"&&(e=t,t=void 0),t?this.hub.notify(t,"info",{type:n,data:e}):this.emit("info",{type:n,data:e})}handleClose(n){this.logger.debug("transport closed",{error:n}),this.disconnected(new Ti(n,"transport_closed"))}disconnected(n){(this.state==="connected"||this.state==="connecting")&&(this.logger.info("disconnected",{reason:n}),this[os]="disconnected",this.recovering=this.protocol.recoverableClosure(n),this.recovering?this.hub.subscriptions.all().forEach(t=>t.notify("connecting")):this.hub.subscriptions.all().forEach(t=>{t.notify("disconnected",n)}),this.protocol.reset(n),this.hub.close(),this.transport.close(),this.emit("disconnect",n))}closed(n){if(this.state==="closed"||this.state==="idle")return;let t;n&&(t=n instanceof Ti?n:new Ti(n,void 0)),this.logger.info("closed",{reason:n||"user"}),this[os]="closed";let e=t||new Ti("cable_closed");this.hub.subscriptions.all().forEach(r=>r.notify("disconnected",e)),this.hub.close(),this.protocol.reset(),this.transport.close(),this.initialConnect=!0,this.emit("close",t)}disconnect(){this.closed()}handleIncoming(n){if(this.state==="closed"||this.state==="idle")return;let t=this.encoder.decode(n);if(t===void 0){this.logger.error("failed to decode message",{message:n});return}this.logger.debug("incoming data",t);let e=this.protocol.receive(t);if(e){this.logger.debug("processed incoming message",e);let{type:r,identifier:v,message:f,meta:y}=e;r?this.hub.notify(v,r,f):this.hub.transmit(v,f,y)}}send(n){if(this.state==="closed")throw Error("Cable is closed");let t=this.encoder.encode(n);if(t===void 0){this.logger.error("failed to encode message",{message:n});return}this.logger.debug("outgoing message",n),this.transport.send(t)}keepalive(n){this.emit("keepalive",n)}streamFrom(n){let t=new fu({stream_name:n});return this.subscribe(t)}streamFromSigned(n){let t=new fu({signed_stream_name:n});return this.subscribe(t)}subscribeTo(n,t){let e,r;return typeof n=="string"&&(r=n,n=gu),e=r?new n(r,t):new n(t),this.subscribe(e)}subscribe(n){if(!n.attached(this))return n;let t=n.identifier;n.connecting();let e=this.hub.subscriptions.get(t)||this.hub.subscriptions.create(t,{subscribe:r=>this._subscribe(r,n.channelId,n.params),unsubscribe:r=>this._unsubscribe(r)});return e.add(n),e.intent==="subscribed"&&e.state==="connected"&&n.connected(),e.ensureSubscribed(),n}async _resubscribe(n){n.intent!=="subscribed"||!n.channels[0]||(n.notify("connecting"),n.ensureResubscribed())}async _subscribe(n,t,e){let r=n.id;if(this.state==="idle"&&this.connect().catch(()=>{}),this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r});return}this.logger.debug("acquiring subscribe lock",{identifier:r});let v=await n.acquire("subscribed");if(v.canceled){this.logger.debug("subscribe lock has been canceled",{identifier:r}),v.release();return}if(this.logger.debug("subscribe lock has been acquired",{identifier:r}),n.intent!=="subscribed"){this.logger.debug("cancel subscribe request, already unsubscribed"),v.release();return}if(this.state!=="connected"){this.logger.debug("cancel subscribe, no connection",{identifier:r}),v.release();return}if(n.state==="connected"){this.logger.debug("already connected, skip subscribe command",{identifier:r}),n.notify("connected"),v.release();return}let f={identifier:t,params:e};this.logger.debug("subscribing",f);try{let y=await this.protocol.subscribe(t,e);this.hub.subscribe(r,y),this.logger.debug("subscribed",{...f,remoteId:y}),n.notify("connected")}catch(y){if(y){if(y instanceof pu&&this.logger.warn("rejected",f),y instanceof Ti){this.logger.debug("disconnected during subscription; will retry on connect",f),v.release();return}this.logger.error("failed to subscribe",{error:y,...f})}n.close(y),this.hub.unsubscribe(r)}v.release()}unsubscribe(n){let t=n.identifier,e=this.hub.subscriptions.get(t);if(!e)throw Error(`Subscription not found: ${t}`);e.remove(n),n.closed(),e.maybeUnsubscribe()}async _unsubscribe(n){let t=n.id;this.logger.debug("acquiring unsubscribe lock",{identifier:t});let e=await n.acquire("unsubscribed");if(e.canceled){this.logger.debug("unsubscribe lock has been canceled",{identifier:t}),e.release();return}if(this.logger.debug("unsubscribe lock has been acquired",{identifier:t}),n.intent!=="unsubscribed"){this.logger.debug("cancel unsubscribe, no longer needed",{identifier:t,intent:n.intent}),e.release();return}if(n.state==="disconnected"||n.state==="closed"){this.logger.debug(`already ${n.state} connected, skip unsubscribe command`,{identifier:t}),e.release();return}let r=n.remoteId;if(this.logger.debug("unsubscribing...",{remoteId:r}),this.state!=="connected"){this.logger.debug("unsubscribe skipped (cable is not connected)",{id:t}),n.close(),this.hub.unsubscribe(t),e.release();return}try{await this.protocol.unsubscribe(r),this.logger.debug("unsubscribed remotely",{id:t})}catch(v){v&&(v instanceof Ti?this.logger.debug("cable disconnected during the unsubscribe command execution",{id:t,error:v}):this.logger.error("unsubscribe failed",{id:t,error:v}))}n.intent==="unsubscribed"?(n.close(),this.hub.unsubscribe(t)):n.state="closed",e.release()}async perform(n,t,e){if(this.performFailures==="throw")return this._perform(n,t,e);try{return await this._perform(n,t,e)}catch(r){this.performFailures==="warn"&&this.logger.warn("perform failed",{error:r});return}}async _perform(n,t,e){if(this.state==="connecting"&&await this.pendingConnect(),this.state==="closed"||this.state==="disconnected")throw new T1;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 v=r.remoteId,f={id:v,action:t,payload:e};this.logger.debug("perform",f);try{let y=await this.protocol.perform(v,t,e);return y&&this.logger.debug("perform result",{message:y,request:f}),y}catch(y){throw this.logger.error("perform failed",{error:y,request:f}),y}}on(n,t){return this.emitter.on(n,t)}once(n,t){let e=this.emitter.on(n,(...r)=>{e(),t(...r)});return e}emit(n,...t){return this.emitter.emit(n,...t)}pendingConnect(){return this._pendingConnect?this._pendingConnect:(this._pendingConnect=new Promise((n,t)=>{let e=[()=>delete this._pendingConnect];e.push(this.on("connect",()=>{e.forEach(r=>r()),n()})),e.push(this.on("close",r=>{e.forEach(v=>v()),t(r)})),e.push(this.on("disconnect",r=>{e.forEach(v=>v()),t(r)}))}),this._pendingConnect)}};const I1={maxMissingPings:2,maxReconnectAttempts:1/0},zs=()=>Date.now(),Pg=(n,t)=>{t=t||{};let{backoffRate:e,jitterRatio:r,maxInterval:v}=t;return e=e||2,r===void 0&&(r=.5),f=>{let y=n*e**f,x=y*e,h=y+(x-y)*Math.random(),p=2*(Math.random()-.5)*r;return h=h*(1+p),v&&v<h&&(h=v),h}};let Wg=class{constructor({pingInterval:n,...t}){if(this.pingInterval=n,!this.pingInterval)throw Error(`Incorrect pingInterval is provided: ${n}`);if(t=Object.assign({},I1,t),this.strategy=t.reconnectStrategy,!this.strategy)throw Error("Reconnect strategy must be provided");this.maxMissingPings=t.maxMissingPings,this.maxReconnectAttempts=t.maxReconnectAttempts,this.logger=t.logger||new Aa,this.state="pending_connect",this.attempts=0,this.disconnectedAt=zs()}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=zs(),this.state="connected",this.cancelReconnect(),this.startPolling()})),this.unbind.push(this.target.on("disconnect",()=>{this.disconnectedAt=zs(),this.state="disconnected",this.stopPolling(),this.scheduleReconnect()})),this.unbind.push(this.target.on("close",()=>{this.disconnectedAt=zs(),this.state="closed",this.cancelReconnect(),this.stopPolling()})),this.unbind.push(this.target.on("keepalive",()=>{this.pingedAt=zs()})),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=zs()-this.pingedAt;n>this.maxMissingPings*this.pingInterval&&(this.logger.warn(`Stale connection: ${n}ms without pings`),this.state="pending_disconnect",this.target.disconnected(new w1))}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 R1{constructor(t,e={}){this.transports=t,this.transport=null,this.emitter=kl(),this.unbind=[],this.logger=e.logger||new Aa}displayName(){return"fallbacked transport"}async open(){for(let t=0;t<this.transports.length;t++){let e=this.transports[t];try{this.transport=e,this.resetListeners(),this.logger.debug(`Trying to connect via ${e.displayName()}`),await e.open(),this.logger.debug(`Connected via ${e.displayName()}`);return}catch(r){this.logger.debug(`Failed to connect via ${e.displayName()}: ${r.message}`)}}throw this.transport=null,this.resetListeners(),new Error("Couldn't connect via any available transport")}send(t){if(!this.transport)throw new Error("No transport is open");this.transport.send(t)}async close(){if(!this.transport)throw new Error("No transport is open");await this.transport.close(),this.transport=null}setURL(){throw new Error("Not implemented. Set URL for each transport separately")}setParam(t,e){this.transports.forEach(r=>{r.setParam(t,e)})}setToken(t,e){this.transports.forEach(r=>{r.setToken(t,e)})}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}get url(){return this.transport?this.transport.url:""}resetListeners(){this.unbind.forEach(t=>t()),this.unbind.length=0,this.transport&&this.unbind.push(this.transport.on("open",()=>{this.emitter.emit("open")}),this.transport.on("data",t=>{this.emitter.emit("data",t)}),this.transport.on("close",t=>{this.emitter.emit("close",t)}),this.transport.on("error",t=>{this.emitter.emit("error",t)}))}}class L1{constructor(t,e={}){this.url=t;let r=e.websocketImplementation;if(r)this.Impl=r;else if(typeof WebSocket<"u")this.Impl=WebSocket;else throw new Error("No WebSocket support");this.connected=!1,this.emitter=kl();let{format:v,subprotocol:f,authStrategy:y}=e;this.format=v||"text",this.connectionOptions=e.websocketOptions,this.authStrategy=y||"param",this.authProtocol="",this.subprotocol=f}displayName(){return"WebSocket("+this.url+")"}open(){let t=this.subprotocol;return this.authStrategy==="sub-protocol"&&(t=[this.subprotocol,this.authProtocol]),this.connectionOptions?this.ws=new this.Impl(this.url,t,this.connectionOptions):this.ws=new this.Impl(this.url,t),this.ws.binaryType="arraybuffer",this.initListeners(),new Promise((e,r)=>{let v=[];v.push(this.once("open",()=>{v.forEach(f=>f()),e()})),v.push(this.once("close",()=>{v.forEach(f=>f()),r(Error("WS connection closed"))}))})}setURL(t){this.url=t}setParam(t,e){let r=new URL(this.url);r.searchParams.set(t,e);let v=`${r.protocol}//${r.host}${r.pathname}?${r.searchParams}`;this.setURL(v)}setToken(t,e="jid"){if(this.authStrategy==="param")this.setParam(e,t);else if(this.authStrategy==="header"){this.connectionOptions=this.connectionOptions||{},this.connectionOptions.headers=this.connectionOptions.headers||{};let r=`x-${e}`.toLowerCase();r=Object.keys(this.connectionOptions.headers).find(v=>v.toLowerCase()===r)||r,this.connectionOptions.headers[r]=t}else if(this.authStrategy==="sub-protocol")this.authProtocol=`anycable-token.${t}`;else throw new Error("Unknown auth strategy: "+this.authStrategy)}send(t){if(!this.ws||!this.connected)throw Error("WebSocket is not connected");this.ws.send(t)}close(){this.ws?this.onclose():this.connected=!1}on(t,e){return this.emitter.on(t,e)}once(t,e){let r=this.emitter.on(t,(...v)=>{r(),e(...v)});return r}initListeners(){this.ws.onerror=t=>{this.connected&&this.emitter.emit("error",t.error||new Error("WS Error"))},this.ws.onclose=()=>{this.onclose()},this.ws.onmessage=t=>{let e=t.data;this.format==="binary"&&(e=new Uint8Array(e)),this.emitter.emit("data",e)},this.ws.onopen=()=>{this.connected=!0,this.emitter.emit("open")}}onclose(){this.ws.onclose=void 0,this.ws.onmessage=void 0,this.ws.onopen=void 0,this.ws.close(),delete this.ws,this.connected=!1,this.emitter.emit("close")}}const Bg={protocol:"actioncable-v1-json",pingInterval:3e3,maxReconnectAttempts:1/0,maxMissingPings:2,logLevel:"warn",lazy:!0};function O1(n,t){if(typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),t=t||{},!n&&!t.transport)throw Error("URL or transport must be specified");t=Object.assign({},Bg,t);let{protocol:e,websocketImplementation:r,websocketFormat:v,websocketOptions:f,websocketAuthStrategy:y,fallbacks:x,logLevel:h,logger:p,transport:s,encoder:a,lazy:u,monitor:l,pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,subprotocol:b,tokenRefresher:I,historyTimestamp:T,protocolOptions:S,concurrentSubscribes:C,performFailures:R,transportConfigurator:L,auth:F}=t;if(p=p||new Aa(h),typeof e=="string"){b=b||e;let P=e.substring(0,e.lastIndexOf("-")),O=e.substring(e.lastIndexOf("-")+1);if(S=S||{},P==="actioncable-v1")e=new Dg({logger:p,...S});else if(P==="actioncable-v1-ext")e=new $1({logger:p,historyTimestamp:T,...S});else throw Error(`Protocol is not supported yet: ${e}`);if(O==="json")a=a||new A1,v=v||"text";else if(O==="msgpack"){if(v="binary",!a)throw Error("Msgpack encoder must be specified explicitly. Use `@anycable/msgpack-encoder` package or build your own")}else if(O==="protobuf"){if(v=v||"binary",!a)throw Error("Protobuf encoder must be specified explicitly. Use `@anycable/protobuf-encoder` package or build your own")}else throw Error(`Protocol is not supported yet: ${e}`)}if(!e)throw Error("Protocol must be specified");s=s||new L1(n,{websocketImplementation:r,websocketOptions:f,subprotocol:b,authStrategy:y,format:v}),x&&(s=new R1([s,...x],{logger:p})),F&&F.token&&s.setToken(F.token,F.param||"jid"),c=c||Pg(o),l!==!1&&(l=l||new Wg({pingInterval:o,reconnectStrategy:c,maxMissingPings:d,maxReconnectAttempts:w,logger:p}));let E={concurrentSubscribes:C},H=new E1({protocol:e,transport:s,encoder:a,logger:p,lazy:u,hubOptions:E,performFailures:R,transportConfigurator:L});return l&&(l.watch(H),H.monitor=l),I&&N1(H,async()=>{try{await I(s)}catch(P){return p.error("Failed to refresh authentication token: "+P),!1}return H.connect().catch(()=>{}),!0}),H}function N1(n,t){let e=!1;n.on("connect",()=>e=!1),n.on("close",async r=>{if(r){if(e){n.logger.warn("Token auto-refresh is disabled",r);return}r.reason==="token_expired"&&(e=!0,await t())}})}class D1{constructor(t){this.channel=t}notify(t,...e){typeof this[t]=="function"&&this[t](...e)}perform(t,e={}){this.channel.perform(t,e)}send(t){this.channel.send(t)}get identifier(){return this.channel.identifier}unsubscribe(){return this.channel.disconnect()}}class F1 extends gu{constructor(t,e,r){super(t,e),this.subscription=new D1(this),Object.assign(this.subscription,r),this.on("connect",({reconnect:v})=>this.subscription.notify("connected",{reconnected:v})),this.on("disconnect",()=>this.subscription.notify("disconnected",{allowReconnect:!0})),this.on("message",v=>this.subscription.notify("received",v)),this.on("close",v=>{v&&v instanceof pu?this.subscription.notify("rejected"):this.subscription.notify("disconnected",{allowReconnect:!1})})}}class P1{constructor(t){this.cable=t}create(t,e){let r,v;typeof t=="object"?(r=t.channel,delete t.channel,v=t):(r=t,v={});let f=new F1(r,v,e);return f.subscription.notify("initialized"),this.cable.subscribe(f),f.subscription}findAll(t){return this.cable.hub.channels.filter(e=>e.identifier===t).map(e=>e.subscription)}}class W1{constructor(t){this.cable=t,this.subscriptions=new P1(t)}}class B1 extends Ng{writeLogEntry(t,e,r){r?console[t](e,r):console[t](e)}}class z1 extends Wg{watch(t){super.watch(t),this.initActivityListeners()}initActivityListeners(){if(typeof document<"u"&&typeof window<"u"&&document.addEventListener&&window.addEventListener){let t=()=>{document.hidden||this.reconnectNow()&&this.logger.debug("Trigger reconnect due to visibility change")},e=v=>{this.reconnectNow()&&this.logger.debug("Trigger reconnect",{event:v})},r=()=>this.disconnect(new Ti("page_frozen"));document.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",e,!1),window.addEventListener("online",e,!1),window.addEventListener("resume",e,!1),window.addEventListener("freeze",r,!1),this.unbind.push(()=>{document.removeEventListener("visibilitychange",t,!1),window.removeEventListener("focus",e,!1),window.removeEventListener("online",e,!1),window.removeEventListener("resume",e,!1),window.removeEventListener("freeze",r,!1)})}}disconnect(t){this.state==="disconnected"||this.state==="closed"||(this.logger.info("Disconnecting",{reason:t.message}),this.cancelReconnect(),this.stopPolling(),this.state="pending_disconnect",this.target.disconnected(t))}}const j1=["cable","action-cable"],H1="/cable",Sl=(n,t)=>{for(let e of j1){let r=n.head.querySelector(`meta[name='${e}-${t}']`);if(r)return r.getAttribute("content")}},zg=n=>n.match(/wss?:\/\//)?n:typeof window<"u"?`${window.location.protocol.replace("http","ws")}//${window.location.host}${n}`:n,U1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"url");if(n)return zg(n)}return zg(H1)},V1=()=>{if(typeof document<"u"&&document.head){let n=Sl(document,"history-timestamp");if(n)return n|0}},q1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token")},K1=()=>{if(typeof document<"u"&&document.head)return Sl(document,"token-param")};function G1(n,t){typeof n=="object"&&typeof t>"u"&&(t=n,n=void 0),n=n||U1(),t=t||{},t.historyTimestamp||(t.historyTimestamp=V1());let e=q1();if(e){let p=K1();t.auth=Object.assign({token:e,param:p},t.auth||{})}t=Object.assign({},Bg,t);let{logLevel:r,logger:v,pingInterval:f,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h}=t;return v=t.logger=t.logger||new B1(r),y=t.reconnectStrategy=t.reconnectStrategy||Pg(f),t.monitor!==!1&&(t.monitor=t.monitor||new z1({pingInterval:f,reconnectStrategy:y,maxMissingPings:x,maxReconnectAttempts:h,logger:v})),O1(n,t)}function Y1(n,t){let e=G1(n,t);return new W1(e)}class X1{constructor(t="/openc3-api/cable"){this._cable=null,this._url=t}disconnect(){this._cable&&(this._cable.cable.disconnect(),this._cable=null)}createSubscription(t,e,r={},v={}){return OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity).then(f=>{if(f&&OpenC3Auth.setTokens(),this._cable==null){let y=this._url+"?scope="+encodeURIComponent(window.openc3Scope)+"&authorization="+encodeURIComponent(localStorage.openc3Token);y=new URL(y,document.baseURI).href,this._cable=Y1(y)}return this._cable.subscriptions.create({channel:t,...v},r)})}recordPing(){}}Tr("P",X1);class Q1{constructor(t,e,r="",v=""){this.keyword=t.keyword,this.parameters=t.parameters,this.filename=t.filename,this.line=t.line,this.lineNumber=t.lineNumber,this.message=e,this.usage=r,this.url=v}}Tr("b",Q1);function Al(n){return Z1.test(n)}const Z1=/^-?[0-9]+$/;function jg(n){return J1.test(n)}const J1=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Hg(n,t){const e=Number.parseFloat(n),r=String(e),v=Ug(n),f=Ug(r);return!!(v===f||(t==null?void 0:t.approx)===!0&&!Al(n)&&f.length>=14&&v.startsWith(f.substring(0,14)))}let _a=function(n){return n.underflow="underflow",n.overflow="overflow",n.truncate_integer="truncate_integer",n.truncate_float="truncate_float",n}({});function eC(n){if(Hg(n,{approx:!1}))return;if(Al(n))return _a.truncate_integer;const t=Number.parseFloat(n);return Number.isFinite(t)?t===0?_a.underflow:_a.truncate_float:_a.overflow}function Ug(n){return n.replace(tC,"").replace(rC,"").replace(iC,"").replace(nC,"")}const tC=/[eE][+-]?\d+$/,nC=/^-?(0*)?/,rC=/\./,iC=/0+$/;class oC{constructor(t){if(cl(this,"isLosslessNumber",!0),!jg(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=eC(this.value);if(t===void 0||t===_a.truncate_float)return Number.parseFloat(this.value);if(Al(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function sC(n){return n&&typeof n=="object"&&n.isLosslessNumber===!0||!1}function aC(n){return new oC(n)}function lC(n,t){return mu({"":n},"",n,t)}function mu(n,t,e,r){return Array.isArray(e)?r.call(n,t,uC(e,r)):e&&typeof e=="object"&&!sC(e)?r.call(n,t,cC(e,r)):r.call(n,t,e)}function cC(n,t){for(const e of Object.keys(n)){const r=mu(n,e,n[e],t);r!==void 0?n[e]=r:delete n[e]}return n}function uC(n,t){for(let e=0;e<n.length;e++)n[e]=mu(n,String(e),n[e],t);return n}function hC(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:aC,r=0;const v=x();return o(v),d(),t?lC(v,t):v;function f(){if(n.charCodeAt(r)===vC){r++,p();const _={};let A=!0;for(;r<n.length&&n.charCodeAt(r)!==qg;){A?A=!1:(u(),p());const N=r,B=s();if(B===void 0){I();return}p(),l();const U=x();if(U===void 0){F();return}Object.prototype.hasOwnProperty.call(_,B)&&!vu(U,_[B])&&T(B,N+1),_[B]=U}return n.charCodeAt(r)!==qg&&S(),r++,_}}function y(){if(n.charCodeAt(r)===yC){r++,p();const _=[];let A=!0;for(;r<n.length&&n.charCodeAt(r)!==Kg;){A?A=!1:u();const N=x();c(N),_.push(N)}return n.charCodeAt(r)!==Kg&&C(),r++,_}}function x(){p();const _=s()??a()??f()??y()??h("true",!0)??h("false",!1)??h("null",null);return p(),_}function h(_,A){if(n.slice(r,r+_.length)===_)return r+=_.length,A}function p(){for(;dC(n.charCodeAt(r));)r++}function s(){if(n.charCodeAt(r)===yu){r++;let _="";for(;r<n.length&&n.charCodeAt(r)!==yu;){if(n.charCodeAt(r)===mC){const A=n[r+1],N=fC[A];N!==void 0?(_+=N,r++):A==="u"?_l(n.charCodeAt(r+2))&&_l(n.charCodeAt(r+3))&&_l(n.charCodeAt(r+4))&&_l(n.charCodeAt(r+5))?(_+=String.fromCharCode(Number.parseInt(n.slice(r+2,r+6),16)),r+=5):E(r):L(r)}else gC(n.charCodeAt(r))?_+=n[r]:R(n[r]);r++}return b(),r++,_}}function a(){const _=r;if(n.charCodeAt(r)===Gg&&(r++,w(_)),n.charCodeAt(r)===wu)r++;else if(pC(n.charCodeAt(r)))for(r++;$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===_C)for(r++,w(_);$l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)===IC||n.charCodeAt(r)===EC)for(r++,(n.charCodeAt(r)===Gg||n.charCodeAt(r)===kC)&&r++,w(_);$l(n.charCodeAt(r));)r++;if(r>_)return e(n.slice(_,r))}function u(){if(n.charCodeAt(r)!==AC)throw new SyntaxError(`Comma ',' expected after value ${O()}`);r++}function l(){if(n.charCodeAt(r)!==$C)throw new SyntaxError(`Colon ':' expected after property name ${O()}`);r++}function o(_){if(_===void 0)throw new SyntaxError(`JSON value expected ${O()}`)}function c(_){if(_===void 0)throw new SyntaxError(`Array item expected ${O()}`)}function d(){if(r<n.length)throw new SyntaxError(`Expected end of input ${O()}`)}function w(_){if(!$l(n.charCodeAt(r))){const A=n.slice(_,r);throw new SyntaxError(`Invalid number '${A}', expecting a digit ${O()}`)}}function b(){if(n.charCodeAt(r)!==yu)throw new SyntaxError(`End of string '"' expected ${O()}`)}function I(){throw new SyntaxError(`Quoted object key expected ${O()}`)}function T(_,A){throw new SyntaxError(`Duplicate key '${_}' encountered at position ${A}`)}function S(){throw new SyntaxError(`Quoted object key or end of object '}' expected ${O()}`)}function C(){throw new SyntaxError(`Array item or end of array ']' expected ${O()}`)}function R(_){throw new SyntaxError(`Invalid character '${_}' ${H()}`)}function L(_){const A=n.slice(_,_+2);throw new SyntaxError(`Invalid escape character '${A}' ${H()}`)}function F(){throw new SyntaxError(`Object value expected after ':' ${H()}`)}function E(_){const A=n.slice(_,_+6);throw new SyntaxError(`Invalid unicode character '${A}' ${H()}`)}function H(){return`at position ${r}`}function P(){return r<n.length?`but got '${n[r]}'`:"but reached end of input"}function O(){return`${P()} ${H()}`}}function dC(n){return n===wC||n===bC||n===xC||n===CC}function _l(n){return n>=wu&&n<=bu||n>=TC&&n<=RC||n>=MC&&n<=LC}function $l(n){return n>=wu&&n<=bu}function pC(n){return n>=SC&&n<=bu}function gC(n){return n>=32&&n<=1114111}function vu(n,t){return n===t?!0:Array.isArray(n)&&Array.isArray(t)?n.length===t.length&&n.every((e,r)=>vu(e,t[r])):Vg(n)&&Vg(t)?[...new Set([...Object.keys(n),...Object.keys(t)])].every(e=>vu(n[e],t[e])):!1}function Vg(n){return typeof n=="object"&&n!==null}const fC={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
1397
1397
  `,r:"\r",t:" "},mC=92,vC=123,qg=125,yC=91,Kg=93,wC=32,bC=10,xC=9,CC=13,yu=34,kC=43,Gg=45,wu=48,SC=49,bu=57,AC=44,_C=46,$C=58,TC=65,MC=97,EC=69,IC=101,RC=70,LC=102;function Yg(n,t,e,r){return v(n);function v(h,p){if(Array.isArray(r)){const s=r.find(a=>a.test(h));if(s){const a=s.stringify(h);if(typeof a!="string"||!jg(a))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${a})`);return a}}if(typeof h=="boolean"||typeof h=="number"||typeof h=="string"||h===null||h instanceof Date||h instanceof Boolean||h instanceof Number||h instanceof String)return JSON.stringify(h);if(h!=null&&h.isLosslessNumber||typeof h=="bigint")return h.toString();if(Array.isArray(h))return f(h);if(h&&typeof h=="object")return y(h)}function f(h,p){if(h.length===0)return"[]";let s="[";for(let a=0;a<h.length;a++){const u=h[a];typeof u<"u"&&typeof u!="function"?s+=v(u):s+="null",a<h.length-1&&(s+=",")}return s+="]",s}function y(h,p){if(typeof h.toJSON=="function")return Yg(h.toJSON(),t,e,void 0);const s=Array.isArray(t)?t.map(String):Object.keys(h);if(s.length===0)return"{}";let a=!0,u="{";for(const l of s){const o=h[l];if(x(l,o)){a?a=!1:u+=",";const c=JSON.stringify(l);u+=`${c}:`,u+=v(o)}}return u+="}",u}function x(h,p){return typeof p<"u"&&typeof p!="function"&&typeof p!="symbol"}}function OC(n){return Al(n)&&!Hg(n)?BigInt(n):parseFloat(n)}class NC{constructor(){cl(this,"id",1)}async exec(t,e,r={},v={},f=6e4){try{await OpenC3Auth.updateToken(OpenC3Auth.defaultMinValidity)&&OpenC3Auth.setTokens()}catch{OpenC3Auth.login()}this.id=this.id+1;try{return r.scope=window.openc3Scope,v.manual=!0,(await hu.post("/openc3-api/api",{jsonrpc:"2.0",method:t,params:e,id:this.id,keyword_params:r},{headers:{Authorization:localStorage.openc3Token,"Content-Type":"application/json-rpc",...v},timeout:f,transformRequest:[(y,x)=>Yg(y)],transformResponse:[y=>hC(y,void 0,OC)]})).data.result}catch(y){let x=new Error;throw y.response?(x.name=y.response.data.error.data.class,x.message=y.response.data.error.data.message,x.object=y.response.data.error):y.request?(x.name="Request error",x.message="Request error, no response received"):x=y,x}}decode_openc3_type(t){if(t!==null&&typeof t=="object"&&t.json_class=="Float"&&t.raw){if(t.raw=="NaN")return NaN;if(t.raw=="Infinity")return 1/0;if(t.raw=="-Infinity")return-1/0}return null}encode_openc3_type(t){return Number.isNaN(t)?{json_class:"Float",raw:"NaN"}:t==Number.POSITIVE_INFINITY?{json_class:"Float",raw:"Infinity"}:t==Number.NEGATIVE_INFINITY?{json_class:"Float",raw:"-Infinity"}:null}ensure_offline_access(){this.offline_access_needed().then(t=>{t&&(localStorage.openc3OfflineToken?this.set_offline_access(localStorage.openc3OfflineToken).then(()=>{delete localStorage.openc3OfflineToken}):OpenC3Auth.getOfflineAccess())})}offline_access_needed(){return this.exec("offline_access_needed",[])}set_offline_access(t){return this.exec("set_offline_access",[t])}get_all_interface_info(){return this.exec("get_all_interface_info",[])}map_target_to_interface(t,e){return this.exec("map_target_to_interface",[t,e])}connect_interface(t,...e){return e.length>0?this.exec("connect_interface",[t,...e]):this.exec("connect_interface",[t])}disconnect_interface(t){return this.exec("disconnect_interface",[t])}interface_cmd(t,e,...r){return this.exec("interface_cmd",[t,e,...r])}get_all_router_info(){return this.exec("get_all_router_info",[])}connect_router(t){return this.exec("connect_router",[t])}disconnect_router(t){return this.exec("disconnect_router",[t])}get_target_interfaces(){return this.exec("get_target_interfaces",[])}get_tlm_cnts(t){return this.exec("get_tlm_cnts",[t])}get_item(t,e,r){return this.exec("get_item",[t,e,r])}get_param(t,e,r){return this.exec("get_param",[t,e,r])}get_parameter(t,e,r){return this.exec("get_param",[t,e,r])}get_limits_sets(){return this.exec("get_limits_sets",[])}get_limits_set(){return this.exec("get_limits_set",[])}set_limits_set(t){return this.exec("set_limits_set",[t])}get_target(t){return this.exec("get_target",[t])}get_target_names(){return this.exec("get_target_names",[])}get_target_list(){return this.exec("get_target_names",[])}get_tlm(t,e){return this.exec("get_tlm",[t,e])}get_telemetry(t,e){return this.exec("get_tlm",[t,e])}get_all_tlm(t){return this.exec("get_all_tlm",[t])}get_all_telemetry(t){return this.exec("get_all_tlm",[t])}get_all_tlm_names(t,e=!1){return this.exec("get_all_tlm_names",[t],{hidden:e})}get_all_telemetry_names(t){return this.exec("get_all_tlm_names",[t])}get_all_tlm_item_names(t){return this.exec("get_all_tlm_item_names",[t])}async get_tlm_packet(t,e,r,v=30){const f=await this.exec("get_tlm_packet",[t,e],{type:r,stale_time:v});if(f!=null){let y=f.length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(f[h][1]),x!==null&&(f[h][1]=x)}return f}get_packet_derived_items(t,e){return this.exec("get_packet_derived_items",[t,e])}get_tlm_buffer(t,e){return this.exec("get_tlm_buffer",[t,e])}async get_tlm_values(t,e=30,r=null){let v={stale_time:e};r!==null&&(v.cache_timeout=r);const f=await this.exec("get_tlm_values",[t],v,{},1e4);let y=f[0].length,x=null;for(let h=0;h<y;h++)x=this.decode_openc3_type(f[0][h]),x!==null&&(f[0][h]=x);return f}get_limits(t,e,r){return this.exec("get_limits",[t,e,r])}async tlm(t,e,r,v="CONVERTED"){let f=null;if(e===void 0)f=await this.exec("tlm",[t]);else if(r===void 0)if(["RAW","CONVERTED","FORMATTED","WITH_UNITS"].includes(e))f=await this.exec("tlm",[t],{type:e});else{let x=new Error;throw x.name="TypeError",x.message=`Invalid data type ${e}. Valid options are RAW, CONVERTED, FORMATTED, and WITH_UNITS.`,x}else f=await this.exec("tlm",[t,e,r],{type:v});let y=this.decode_openc3_type(f);return y!==null&&(f=y),f}async inject_tlm(t,e,r=null,v="CONVERTED"){await this.exec("inject_tlm",[t,e,r],{type:v})}set_tlm(t,e,r,v){return this.exec("set_tlm",[t,e,r],{type:v})}override_tlm(t,e,r,v){return this.exec("override_tlm",[t,e,r],{type:v})}get_overrides(){return this.exec("get_overrides")}normalize_tlm(t,e,r,v){return this.exec("normalize_tlm",[t,e,r],{type:v})}get_all_cmds(t){return this.exec("get_all_cmds",[t])}get_all_commands(t){return this.exec("get_all_cmds",[t])}get_all_cmd_names(t,e=!1){return this.exec("get_all_cmd_names",[t],{hidden:e})}get_all_command_names(t){return this.exec("get_all_cmd_names",[t])}get_cmd(t,e){return this.exec("get_cmd",[t,e])}get_command(t,e){return this.exec("get_cmd",[t,e])}get_cmd_cnts(t){return this.exec("get_cmd_cnts",[t])}get_cmd_value(t,e,r,v="CONVERTED"){return this.exec("get_cmd_value",[t,e,r,v])}get_cmd_buffer(t,e){return this.exec("get_cmd_buffer",[t,e])}_cmd(t,e,r,v,f){let y=null;for(let x in v)Object.prototype.hasOwnProperty.call(v,x)&&(y=this.encode_openc3_type(v[x]),y!==null&&(v[x]=y));return this.exec(t,[e,r,v],{},f)}get_cmd_hazardous(t,e,r,v={}){return e===void 0?this.exec("get_cmd_hazardous",t,{},v):this._cmd("get_cmd_hazardous",t,e,r,v)}cmd(t,e,r,v={}){return e===void 0?this.exec("cmd",t,{},v):this._cmd("cmd",t,e,r,v)}cmd_no_range_check(t,e,r,v={}){return e===void 0?this.exec("cmd_no_range_check",t,{},v):this._cmd("cmd_no_range_check",t,e,r,v)}cmd_raw(t,e,r,v={}){return e===void 0?this.exec("cmd_raw",t,{},v):this._cmd("cmd_raw",t,e,r,v)}cmd_raw_no_range_check(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_range_check",t,{},v):this._cmd("cmd_raw_no_range_check",t,e,r,v)}cmd_no_hazardous_check(t,e,r,v={}){return e===void 0?this.exec("cmd_no_hazardous_check",t,{},v):this._cmd("cmd_no_hazardous_check",t,e,r,v)}cmd_no_checks(t,e,r,v={}){return e===void 0?this.exec("cmd_no_checks",t,{},v):this._cmd("cmd_no_checks",t,e,r,v)}cmd_raw_no_hazardous_check(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_hazardous_check",t,{},v):this._cmd("cmd_raw_no_hazardous_check",t,e,r,v)}cmd_raw_no_checks(t,e,r,v={}){return e===void 0?this.exec("cmd_raw_no_checks",t,{},v):this._cmd("cmd_raw_no_checks",t,e,r,v)}build_cmd(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}build_command(t,e,r){return e===void 0?this.exec("build_cmd",t):this._cmd("build_cmd",t,e,r)}get_interface_names(){return this.exec("get_interface_names",[])}send_raw(t,e){return this.exec("send_raw",[t,e])}list_configs(t){return this.exec("list_configs",[t])}load_config(t,e){return this.exec("load_config",[t,e])}save_config(t,e,r){return this.exec("save_config",[t,e,r])}delete_config(t,e){return this.exec("delete_config",[t,e])}enable_limits(t,e,r){return this.exec("enable_limits",[t,e,r])}disable_limits(t,e,r){return this.exec("disable_limits",[t,e,r])}get_out_of_limits(){return this.exec("get_out_of_limits",[])}get_overall_limits_state(t){return this.exec("get_overall_limits_state",[t])}list_settings(){return this.exec("list_settings",[])}get_all_settings(){return this.exec("get_all_settings",[])}get_setting(t){return this.exec("get_setting",[t])}get_settings(t){return this.exec("get_settings",t)}set_setting(t,e){return this.exec("set_setting",[t,e])}update_news(){return this.exec("update_news",[])}save_setting(t,e){return this.exec("set_setting",[t,e])}get_metrics(){return this.exec("get_metrics",[])}async hashString(t){if(window.isSecureContext){const e=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",e),v=new Uint8Array(r);return Array.from(v).map(f=>f.toString(16).padStart(2,"0")).join("")}}}Tr("B",NC);var Xg={exports:{}},Qg;function DC(){return Qg||(Qg=1,function(n,t){ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,r,v){function f(p,s){function a(F,E,H){if(!(F.length<E)){var P=F.slice(0,E),O=F.slice(E),_=/^(?:(\s+)|(\S+)(\s+))/.exec(O),A=/(?:(\s+)|(\s+)(\S+))$/.exec(P),N=0,B=0;if(A&&!A[2]&&(N=E-A[1].length,B=E),_&&!_[2]&&(N||(N=E),B=E+_[1].length),N)return{start:N,end:B};if(A&&A[2]&&A.index>H)return{start:A.index,end:A.index+A[2].length};if(_&&_[2])return N=E+_[2].length,{start:N,end:N+_[3].length}}}for(var u=s.column||p.getOption("printMarginColumn"),l=s.allowMerge!=0,o=Math.min(s.startRow,s.endRow),c=Math.max(s.startRow,s.endRow),d=p.session;o<=c;){var w=d.getLine(o);if(w.length>u){var b=a(w,u,5);if(b){var I=/^\s*/.exec(w)[0];d.replace(new x(o,b.start,o,b.end),`
1398
- `+I)}c++}else if(l&&/\S/.test(w)&&o!=c){var T=d.getLine(o+1);if(T&&/\S/.test(T)){var S=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),R=S+" "+C,b=a(R,u,5);if(b&&b.start>S.length||R.length<u){var L=new x(o,S.length,o+1,T.length-C.length);d.replace(L," "),o--,c--}else S.length<w.length&&d.remove(new x(o,S.length,o,w.length))}}o++}}function y(p){if(p.command.name=="insertstring"&&/\S/.test(p.args)){var s=p.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;f(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(p){p?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=f}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,v){function f(m){return{row:m.line,column:m.ch}}function y(m){return new Ne(m.row,m.column)}function x(m,$,k){if($.line===k.line&&$.ch>=k.ch-1){var D=m.getLine($.line),W=D.charCodeAt($.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:$,end:k}}function h(m){m.setOption("disableInput",!0),m.setOption("showCursorWhenSelecting",!1),Pe.signal(m,"vim-mode-change",{mode:"normal"}),m.on("cursorActivity",Po),R(m),Pe.on(m.getInputField(),"paste",s(m))}function p(m){m.setOption("disableInput",!1),m.off("cursorActivity",Po),Pe.off(m.getInputField(),"paste",s(m)),m.state.vim=null,ar&&clearTimeout(ar)}function s(m){var $=m.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(m.setCursor(fe(m.getCursor(),0,1)),On.enterInsertMode(m,{},$))}),$.onPasteFn}function a(m,$){return $>=m.firstLine()&&$<=m.lastLine()}function u(m){return/^[a-z]$/.test(m)}function l(m){return"()[]{}".indexOf(m)!=-1}function o(m){return la.test(m)}function c(m){return en.test(m)}function d(m){return/^\s*$/.test(m)}function w(m){return".?!".indexOf(m)!=-1}function b(m,$){for(var k=0;k<$.length;k++)if($[k]==m)return!0;return!1}function I(m,$,k,D,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),jt[m]={type:k,defaultValue:$,callback:W},D)for(var z=0;z<D.length;z++)jt[D[z]]=jt[m];$&&T(m,$)}function T(m,$,k,D){var W=jt[m];D=D||{};var z=D.scope;if(!W)return new Error("Unknown option: "+m);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+m+"="+$);$!==!1&&($=!0)}W.callback?(z!=="local"&&W.callback($,void 0),z!=="global"&&k&&W.callback($,k)):(z!=="local"&&(W.value=W.type=="boolean"?!!$:$),z!=="global"&&k&&(k.state.vim.options[m]={value:$}))}function S(m,$,k){var D=jt[m];k=k||{};var W=k.scope;if(!D)return new Error("Unknown option: "+m);if(D.callback){var z=$&&D.callback(void 0,$);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&$&&$.state.vim.options[m];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Rn()}function R(m){return m.state.vim||(m.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),m.state.vim}function L(){Be={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:yi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var m in jt){var $=jt[m];$.value=$.defaultValue}}function F(m){function $(Y){typeof Y=="string"?vn.value=Y:vn=null}if(m[0]=="<"){var k=m.toLowerCase().slice(1,-1),D=k.split("-");if(k=D.pop()||"",k=="lt")m="<";else if(k=="space")m=" ";else if(k=="cr")m=`
1399
- `;else if(wi[k]){var W=vn.value,z={key:wi[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};vn.onKeyDown&&vn.onKeyDown(z,vn.value,$),vn&&vn.onKeyUp&&vn.onKeyUp(z,vn.value,$);return}}if(m==`
1400
- `){var q=vn;vn=null,q.onClose&&q.onClose(q.value)}else vn.value=(vn.value||"")+m}function E(m,$,k){var D=sn;if(k){if(Ir.indexOf(k)!=-1)return;Ir.push(k),sn=k.noremap!=0}try{for(var W=R(m),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec($);){var Y=q[0],Q=W.insertMode;if(vn){F(Y);continue}var re=wt.handleKey(m,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1401
- `;else{if(wi.hasOwnProperty(se)){Y=wi[se],Bo(m,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}m.replaceSelection(Y)}}}finally{if(Ir.pop(),sn=Ir.length?D:!1,!Ir.length&&vn){var Ce=vn;vn=null,kr(m,Ce)}}}function H(m,$){var k=m.key;if(!Rr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Yn[k]||k;var D="";if(m.ctrlKey&&(D+="C-"),m.altKey&&(D+="A-"),m.metaKey&&(D+="M-"),Pe.isMac&&m.altKey&&!m.metaKey&&!m.ctrlKey&&(D=D.slice(2)),(D||k.length>1)&&m.shiftKey&&(D+="S-"),$&&!$.expectLiteralNext&&k.length==1){if(jn.keymap&&k in jn.keymap)(jn.remapCtrl!=0||!D)&&(k=jn.keymap[k]);else if(k.charCodeAt(0)>255){var W=m.code&&m.code.slice(-1)||"";m.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return D+=k,D.length>1&&(D="<"+D+">"),D}}function P(m,$){jn.string!==m&&(jn=O(m)),jn.remapCtrl=$}function O(m){function $(D){return D.split(/\\?(.)/).filter(Boolean)}var k={};return m?(m.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=$(W[1]),q=$(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)k[z[Y]]=q[Y]}else if(W.length==1){var Q=$(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:m}):{keymap:k,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(m,$){m.state.vim.inputState=new _,m.state.vim.expectLiteralNext=!1,Pe.signal(m,"vim-command-done",$)}function N(){this.removed=[],this.inserted=""}function B(m,$,k){this.clear(),this.keyBuffer=[m||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!k}function U(m,$){var k=Be.registerController.registers;if(!m||m.length!=1)throw Error("Register name must be 1 character");k[m]=$,Jt.push(m)}function K(m){this.registers=m,this.unnamedRegister=m['"']=new B,m["."]=new B,m[":"]=new B,m["/"]=new B,m["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(m,$){Ur[m]=$}function he(m,$){for(var k=[],D=0;D<$;D++)k.push(m);return k}function ne(m,$){Uo[m]=$}function ae(m,$){On[m]=$}function ue(m,$,k){var D=m.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(m.firstLine(),$.line),m.lastLine()),q=m.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==z&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ce(m){var $={};for(var k in m)m.hasOwnProperty(k)&&($[k]=m[k]);return $}function fe(m,$,k){return typeof $=="object"&&(k=$.ch,$=$.line),new Ne(m.line+$,m.ch+k)}function $e(m,$,k,D){D.operator&&(k="operatorPending");for(var W,z=[],q=[],Y=sn?$.length-go:0,Q=Y;Q<$.length;Q++){var re=$[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||D.operator&&re.type=="action"||!(W=Te(m,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function Te(m,$){var k=$.slice(-11)=="<character>",D=$.slice(-10)=="<register>";if(k||D){var W=$.length-(k?11:10),z=m.slice(0,W),q=$.slice(0,W);return z==q&&m.length>W?"full":q.indexOf(z)==0?"partial":!1}return m==$?"full":$.indexOf(m)==0?"partial":!1}function Ee(m){var $=/^.*(<[^>]+>)$/.exec(m),k=$?$[1]:m.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
1402
- `;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(m,$,k){return function(){for(var D=0;D<k;D++)$(m)}}function qe(m){return new Ne(m.line,m.ch)}function ut(m,$){return m.ch==$.ch&&m.line==$.line}function tt(m,$){return m.line<$.line?!0:m.line==$.line&&m.ch<$.ch}function ht(m,$){return arguments.length>2&&($=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(m,$)?m:$}function Zt(m,$){return arguments.length>2&&($=Zt.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(m,$)?$:m}function hn(m,$,k){var D=tt(m,$),W=tt($,k);return D&&W}function qt(m,$){return m.getLine($).length}function dr(m){return m.trim?m.trim():m.replace(/^\s+|\s+$/g,"")}function dn(m){return m.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Mn(m,$,k){var D=qt(m,$),W=new Array(k-D+1).join(" ");m.setCursor(new Ne($,D)),m.replaceRange(W,m.getCursor())}function En(m,$){var k=[],D=m.listSelections(),W=qe(m.clipPos($)),z=!ut($,W),q=m.getCursor("head"),Y=vt(D,q),Q=ut(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ye=D[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),we=ye.ch,Oe=W.ch,Le=D[se].head.ch-we,Ue=Oe-we;Le>0&&Ue<=0?(we++,z||Oe--):Le<0&&Ue>=0?(we--,Q||Oe++):Le<0&&Ue==-1&&(we--,Oe++);for(var st=Ce;st<=me;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};k.push(Qe)}return m.setSelections(k),$.ch=Oe,ye.ch=we,ye}function Gn(m,$,k){for(var D=[],W=0;W<k;W++){var z=fe($,W,0);D.push({anchor:z,head:z})}m.setSelections(D,0)}function vt(m,$,k){for(var D=0;D<m.length;D++){var W=ut(m[D].anchor,$),z=ut(m[D].head,$);if(W||z)return D}return-1}function He(m,$){var k=$.lastSelection,D=function(){var z=m.listSelections(),q=z[0],Y=z[z.length-1],Q=tt(q.anchor,q.head)?q.anchor:q.head,re=tt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=m.getCursor(),q=m.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ye=z.line;ye<q.line;ye++){var Ce=new Ne(ye,z.ch),me=new Ne(ye,q.ch),we={anchor:Ce,head:me};se.push(we)}m.setSelections(se)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Ue=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ue,ch:Ue?q.ch:st+q.ch},k.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,qt(m,q.line))),m.setSelection(z,q)}return[z,q]};return $.visualMode?D():W()}function ke(m,$){var k=$.sel.anchor,D=$.sel.head;$.lastPastedText&&(D=m.posFromIndex(m.indexFromPos(k)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:m.setBookmark(k),headMark:m.setBookmark(D),anchor:qe(k),head:qe(D),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function ze(m,$,k,D){var W=m.state.vim.sel,z=D?$:W.head,q=D?$:W.anchor,Y;return tt(k,$)&&(Y=k,k=$,$=Y),tt(z,q)?(z=ht($,z),q=Zt(q,k)):(q=ht($,q),z=Zt(z,k),z=fe(z,0,-1),z.ch==-1&&z.line!=m.firstLine()&&(z=new Ne(z.line-1,qt(m,z.line-1)))),[q,z]}function Ye(m,$,W){var D=m.state.vim;$=$||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=dt(m,$,W);m.setSelections(z.ranges,z.primary)}function dt(m,$,k,D){var W=qe($.head),z=qe($.anchor);if(k=="char"){var q=!D&&!tt($.head,$.anchor)?1:0,Y=tt($.head,$.anchor)?1:0;return W=fe($.head,0,q),z=fe($.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(k=="line"){if(tt($.head,$.anchor))W.ch=0,z.ch=qt(m,z.line);else{z.ch=0;var Q=m.lastLine();W.line>Q&&(W.line=Q),W.ch=qt(m,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(k=="block"){var re=Math.min(z.line,W.line),se=z.ch,ye=Math.max(z.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,we=W.line==re?0:me-1,Oe=[],Le=0;Le<me;Le++)Oe.push({anchor:new Ne(re+Le,se),head:new Ne(re+Le,Ce)});return{ranges:Oe,primary:we}}}function Ct(m){var $=m.getCursor("head");return m.getSelection().length==1&&($=ht($,m.getCursor("anchor"))),$}function xt(m,$){var k=m.state.vim;$!==!1&&m.setCursor(ue(m,k.sel.head)),ke(m,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||Pe.signal(m,"vim-mode-change",{mode:"normal"})}function Rt(m,$,k){var D=m.getRange($,k);if(/\n\s*$/.test(D)){var W=D.split(`
1403
- `);W.pop();for(var z,z=W.pop();W.length>0&&z&&d(z);z=W.pop())k.line--,k.ch=0;z?(k.line--,k.ch=qt(m,k.line)):k.ch=0}}function Et(m,$,k){$.ch=0,k.ch=0,k.line++}function ct(m){if(!m)return 0;var $=m.search(/\S/);return $==-1?m.length:$}function yt(m,$,k){var D=$.inclusive,W=$.innerWord,z=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=k||Ct(m),re=m.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,we,Oe=q?fo[0]:vi[0];if(W&&/\s/.test(re.charAt(me)))Oe=function(fn){return/\s/.test(fn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=oo(m,Q,!0,z,!0);break}z?Oe=vi[0]:(Oe=fo[0],Oe(re.charAt(me))||(Oe=fo[1]))}for(var Le=me,Ue=me;Oe(re.charAt(Ue))&&Ue>=0;)Ue--;if(Ue++,we)Le=we.to,Ce=we.line,se=m.getLine(Ce),!se&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(D){var st=Le,Qe=Q.ch<=Ue&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(st==Le||Qe){for(var et=Ue;/\s/.test(re.charAt(Ue-1))&&Ue>0;)Ue--;!Ue&&!Qe&&(Ue=et)}}return{start:new Ne(ye,Ue),end:new Ne(Ce,Le)}}function wn(m,$,k){var D=$;if(!Pe.findMatchingTag||!Pe.findEnclosingTag)return{start:D,end:D};var W=Pe.findMatchingTag(m,$)||Pe.findEnclosingTag(m,$);return!W||!W.open||!W.close?{start:D,end:D}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function br(m,$,k){ut($,k)||Be.jumpList.add(m,$,k)}function zr(m,$){Be.lastCharacterSearch.increment=m,Be.lastCharacterSearch.forward=$.forward,Be.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Li(m,$,k,D){var W=qe(m.getCursor()),z=k?1:-1,q=k?m.lineCount():-1,Y=W.ch,Q=W.line,re=m.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:k,depth:0,curMoveThrough:!1},ye=ti[D];if(!ye)return W;var Ce=ni[ye].init,me=ni[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=m.getLine(Q)||"",z>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(W.line=Q,W.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function oo(m,$,k,D,W){var z=$.line,q=$.ch,Y=m.getLine(z),Q=k?1:-1,re=D?vi:fo;if(W&&Y==""){if(z+=Q,Y=m.getLine(z),!a(m,z))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(q))){for(ye=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&z==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:z}}me||(q+=Q)}if(z+=Q,!a(m,z))return null;Y=m.getLine(z),q=Q>0?0:Y.length}}function pr(m,$,k,D,W,z){var q=qe($),Y=[];(D&&!W||!D&&W)&&k++;for(var Q=!D||!W,re=0;re<k;re++){var se=oo(m,$,D,z,Q);if(!se){var ye=qt(m,m.lastLine());Y.push(D?{line:m.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=k,me=Y[0],we=Y.pop();return D&&!W?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):D&&W?new Ne(we.line,we.to-1):!D&&W?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function so(m,$,k,D,W){var z=$,q=new Ne(z.line+k.repeat-1,1/0),Y=m.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=m.charCoords(Y,"div").left),q}function Lo(m,$,k,D,W){for(var z=W||m.getCursor(),q=z.ch,Y,Q=0;Q<$;Q++){var re=m.getLine(z.line);if(Y=ja(q,re,D,k),Y==-1)return null;q=Y}return new Ne(m.getCursor().line,Y)}function za(m,$){var k=m.getCursor().line;return ue(m,new Ne(k,$-1))}function Zr(m,$,k,D){!b(k,Ji)&&!Yt.test(k)||($.marks[k]&&$.marks[k].clear(),$.marks[k]=m.setBookmark(D))}function ja(m,$,k,D,W){var z;return D?(z=$.indexOf(k,m+1),z!=-1):(z=$.lastIndexOf(k,m-1),z!=-1),z}function fs(m,$,k,D,W){function z(Ue){return!/\S/.test(m.getLine(Ue))}function q(Ue,st,Qe){return Qe?z(Ue)!=z(Ue+st):!z(Ue)&&z(Ue+st)}function Y(Ue){D=D>0?1:-1;var st=m.ace.session.getFoldLine(Ue);st&&Ue+D>st.start.row&&Ue+D<st.end.row&&(D=(D>0?st.end.row:st.start.row)-Ue)}var Q=$.line,re=m.firstLine(),se=m.lastLine(),ye,Ce,me=Q;if(D){for(;re<=me&&me<=se&&k>0;)Y(me),q(me,D)&&k--,me+=D;return new Ne(me,0)}var we=m.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(me=Q;me<=se&&k;me++)q(me,1,!0)&&(!W||z(me)!=Le)&&k--;for(Ce=new Ne(me,0),me>se&&!Le?Le=!0:W=!1,me=Q;me>re&&!((!W||z(me)==Le||me==Q)&&q(me,-1,!0));me--);return ye=new Ne(me,0),{start:ye,end:Ce}}function ta(m,$,k,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&d(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?d(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=me,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};k>0;)D<0?Q=Y(m,Q.ln,Q.pos,D):Q=q(m,Q.ln,Q.pos,D),k--;return new Ne(Q.ln,Q.pos)}function Oi(m,$,k,D){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function z(Q,re,se,ye){var Le=Q.getLine(re),Ce=Le==="",me={line:Le,ln:re,pos:se,dir:ye},we={ln:me.ln,pos:me.pos},Oe=me.line==="";for(W(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!d(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||d(me.line[me.pos+1]))&&(Ce=!0),W(Q,me)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ue=Le.length-1;Ue>=0;--Ue)if(!d(Le[Ue])){we.pos=Ue;break}return we}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!d(Ce.line[Ce.pos])&&(we=!1,me={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!d(Oe[Le])){me.pos=Le;break}return me}for(var Y={ln:$.line,pos:$.ch};k>0;)D<0?Y=q(m,Y.ln,Y.pos,D):Y=z(m,Y.ln,Y.pos,D),k--;return new Ne(Y.ln,Y.pos)}function Bn(m,$,k,D){var W=$,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=m.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=m.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=m.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ye=z;z=q,q=ye}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function xr(m,$,k,D){var W=qe($),z=m.getLine(W.line),q=z.split(""),Y,Q,re,se,ye=q.indexOf(k);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&q[W.ch]==k){var Ce=/string/.test(m.getTokenTypeAt(fe($,0,1))),me=/string/.test(m.getTokenTypeAt($)),we=Ce&&!me;we||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Ni(){}function Sn(m){var $=m.state.vim;return $.searchState_||($.searchState_=new Ni)}function Cr(m){return Di(m,"/")}function Gi(m){return ms(m,"/")}function Di(m,$){var k=ms(m,$)||[];if(!k.length)return[];var D=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&D.push(m.substring(k[W]+1,k[W+1]));return D}}function ms(m,$){$||($="/");for(var k=!1,D=[],W=0;W<m.length;W++){var z=m.charAt(W);!k&&z==$&&D.push(W),k=!k&&z=="\\"}return D}function na(m){for(var $="|(){",k="}",D=!1,W=[],z=-1;z<m.length;z++){var q=m.charAt(z)||"",Y=m.charAt(z+1)||"",Q=Y&&$.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ha(m){for(var $=!1,k=[],D=-1;D<m.length;D++){var W=m.charAt(D)||"",z=m.charAt(D+1)||"";bi[W+z]?(k.push(bi[W+z]),D++):$?(k.push(W),$=!1):W==="\\"?($=!0,o(z)||z==="$"?k.push("$"):z!=="/"&&z!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),z==="/"&&k.push("\\"))}return k.join("")}function Ua(m){for(var $=new Pe.StringStream(m),k=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)k.push($.next());var D=!1;for(var W in sr)if($.match(W,!0)){D=!0,k.push(sr[W]);break}D||k.push($.next())}return k.join("")}function Fi(m,$,k){var D=Be.registerController.getRegister("/");if(D.setText(m),m instanceof RegExp)return m;var W=Gi(m),z,q;if(!W.length)z=m;else{z=m.substring(0,W[0]);var Y=m.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;S("pcre")||(z=na(z)),k&&($=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,$||q?"im":"m");return Q}function Jr(m){typeof m=="string"&&(m=document.createElement(m));for(var $,k=1;k<arguments.length;k++)if($=arguments[k])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)m.appendChild($);else for(var D in $)Object.prototype.hasOwnProperty.call($,D)&&(D[0]==="$"?m.style[D.slice(1)]=$[D]:m.setAttribute(D,$[D]));return m}function zt(m,$){var k=Jr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);m.openNotification?m.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ra(m,$){return Jr("div",{$display:"flex"},Jr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},m,Jr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&Jr("span",{$color:"#888"},$))}function kr(m,$){if(Ir.length){$.value||($.value=""),vn=$;return}var k=ra($.prefix,$.desc);if(m.openDialog)m.openDialog(k,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var D="";typeof $.prefix!="string"&&$.prefix&&(D+=$.prefix.textContent),$.desc&&(D+=" "+$.desc),$.onClose(prompt(D,""))}}function zn(m,$){if(m instanceof RegExp&&$ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],D=0;D<k.length;D++){var W=k[D];if(m[W]!==$[W])return!1}return!0}return!1}function pn(m,$,k,D){if($){var W=Sn(m),z=Fi($,!!k,!!D);if(z)return gi(m,z),zn(z,W.getQuery())||W.setQuery(z),z}}function In(m){if(m.source.charAt(0)=="^")var $=!0;return{token:function(k){if($&&!k.sol()){k.skipToEnd();return}var D=k.match(m,!1);if(D)return D[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!m.exec(k.next()+D[0]))?(k.next(),null):(k.match(m),"searching");for(;!k.eol()&&(k.next(),!k.match(m,!1)););},query:m}}function gi(m,$){clearTimeout(ar);var k=Sn(m);k.highlightTimeout=ar,ar=setTimeout(function(){if(m.state.vim){var D=Sn(m);D.highlightTimeout=null;var W=D.getOverlay();(!W||$!=W.query)&&(W&&m.removeOverlay(W),W=In($),m.addOverlay(W),m.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(m.showMatchesOnScrollbar($))),D.setOverlay(W))}},50)}function Sr(m,$,k,D){return D===void 0&&(D=1),m.operation(function(){for(var W=m.getCursor(),z=m.getSearchCursor(k,W),q=0;q<D;q++){var Y=z.find($);if(q==0&&Y&&ut(z.from(),W)){var Q=$?z.from():z.to();Y=z.find($),Y&&!Y[0]&&ut(z.from(),Q)&&m.getLine(Q.line).length==Q.ch&&(Y=z.find($))}if(!Y&&(z=m.getSearchCursor(k,$?new Ne(m.lastLine()):new Ne(m.firstLine(),0)),!z.find($)))return}return z.from()})}function fi(m,$,k,D,W){return D===void 0&&(D=1),m.operation(function(){var z=m.getCursor(),q=m.getSearchCursor(k,z),Y=q.find(!$);!W.visualMode&&Y&&ut(q.from(),z)&&q.find(!$);for(var Q=0;Q<D;Q++)if(Y=q.find($),!Y&&(q=m.getSearchCursor(k,$?new Ne(m.lastLine()):new Ne(m.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function Oo(m){var $=Sn(m);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),m.removeOverlay(Sn(m).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function vs(m,$,k){return typeof m!="number"&&(m=m.line),$ instanceof Array?b(m,$):typeof k=="number"?m>=$&&m<=k:m==$}function Yi(m){var $=m.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function jr(m,$,k){if(k=="'"||k=="`")return Be.jumpList.find(m,-1)||new Ne(0,0);if(k==".")return ao(m);var D=$.marks[k];return D&&D.find()}function ao(m){if(m.getLastEditEnd)return m.getLastEditEnd();for(var $=m.doc.history.done,k=$.length;k--;)if($[k].changes)return qe($[k].changes[0].to)}function No(m,$,k,D,W,z,q,Y,Q){function re(){m.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var Qe=m.getRange(z.from(),z.to()),et=Qe.replace(q,Y),fn=z.to().line;z.replace(et),Ue=z.to().line,W+=Ue-fn,st=Ue<fn}function ye(){var Qe=Le&&qe(z.to()),et=z.findNext();return et&&!et[0]&&Qe&&ut(z.from(),Qe)&&(et=z.findNext()),et}function Ce(){for(;ye()&&vs(z.from(),D,W);)if(!(!k&&z.from().line==Ue&&!st)){m.scrollIntoView(z.from(),30),m.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function me(Qe){if(Qe&&Qe(),m.focus(),Le){m.setCursor(Le);var et=m.state.vim;et.exMode=!1,et.lastHPos=et.lastHSPos=Le.ch}Q&&Q()}function we(Qe,et,fn){Pe.e_stop(Qe);var at=H(Qe);switch(at){case"y":se(),Ce();break;case"n":Ce();break;case"a":var bn=Q;Q=void 0,m.operation(re),Q=bn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(fn)}return Oe&&me(fn),!0}m.state.vim.exMode=!0;var Oe=!1,Le,Ue,st;if(Ce(),Oe){zt(m,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}kr(m,{prefix:Jr("span","replace with ",Jr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Hr(m,$){var k=m.state.vim,D=Be.macroModeState,W=Be.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(m.off("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,Pe.off(m.getInputField(),"keydown",xs)),!z&&k.insertModeRepeat>1&&(ia(m,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,$||m.setCursor(m.getCursor().line,m.getCursor().ch-1),m.setOption("keyMap","vim"),m.setOption("disableInput",!0),m.toggleOverwrite(!1),W.setText(q.changes.join("")),Pe.signal(m,"vim-mode-change",{mode:"normal"}),D.isRecording&&nr(D)}function Do(m){An.unshift(m)}function ys(m,$,k,D,W){var z={keys:m,type:$};z[$]=k,z[$+"Args"]=D;for(var q in W)z[q]=W[q];Do(z)}function ws(m,$,k,D){var W=Be.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&fr.processCommand(m,W.keyBuffer[0]),k.isPlaying=!1;return}var z=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),wt.handleKey(m,se,"macro"),$.insertMode){var ye=W.insertModeChanges[q++].changes;Be.macroModeState.lastInsertModeChanges.changes=ye,zo(m,ye,1),Hr(m)}k.isPlaying=!1}function Fo(m,$){if(!m.isPlaying){var k=m.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushText($)}}function nr(m){if(!m.isPlaying){var $=m.latestRegister,k=Be.registerController.getRegister($);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(m.lastInsertModeChanges)}}function bs(m,$){if(!m.isPlaying){var k=m.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushSearchQuery&&D.pushSearchQuery($)}}function lo(m,$){var k=Be.macroModeState,D=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=m.state.vim;$;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var z=m.listSelections().length;z>1&&(D.ignoreCount=z);var q=$.text.join(`
1404
- `);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(m.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=m.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}$=$.next}}function Po(m){var $=m.state.vim;if($.insertMode){var k=Be.macroModeState;if(k.isPlaying)return;var D=k.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=m.setBookmark(m.getCursor(),{insertLeft:!0}))}else m.curOp.isVimOp||Wo(m,$)}function Wo(m,$,k){var D=m.getCursor("anchor"),W=m.getCursor("head");if($.visualMode&&!m.somethingSelected()?xt(m,!1):!$.visualMode&&!$.insertMode&&m.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,Pe.signal(m,"vim-mode-change",{mode:"visual"})),$.visualMode){var z=tt(W,D)?0:-1,q=tt(W,D)?-1:0;W=fe(W,0,z),D=fe(D,0,q),$.sel={anchor:D,head:W},Zr(m,$,"<",ht(W,D)),Zr(m,$,">",Zt(W,D))}else!$.insertMode&&!k&&($.lastHPos=m.getCursor().ch)}function Xi(m,$){this.keyName=m,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function xs(m){var $=Be.macroModeState,k=$.lastInsertModeChanges,D=Pe.keyName?Pe.keyName(m):m.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Xi(D,m)))}function ia(m,$,k,D){function W(){Y?Ln.processAction(m,$,$.lastEditActionCommand):Ln.evalInput(m,$)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;zo(m,ye.changes,se)}}var q=Be.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),z(1);else D||W(),z(k);$.inputState=Q,$.insertMode&&!D&&Hr(m),q.isPlaying=!1}function Bo(m,$){Pe.lookupKey($,"vim-insert",function(k){return typeof k=="string"?Pe.commands[k](m):k(m),!0})}function zo(m,$,k){var D=m.getCursor("head"),W=Be.macroModeState.lastInsertModeChanges.visualBlock;W&&(Gn(m,D,W+1),k=m.listSelections().length,m.setCursor(D));for(var z=0;z<k;z++){W&&m.setCursor(fe(D,z,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof Xi)Bo(m,Y.keyName);else if(typeof Y=="string")m.replaceSelection(Y);else{var Q=m.getCursor(),re=fe(Q,0,Y[0].length-(Y[1]||0));m.replaceRange(Y[0],Q,Y[1]?Q:re),m.setCursor(re)}}}W&&m.setCursor(fe(D,0,1))}function Cs(m,$,k,D){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Ar[$]||$;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||$.length>1)&&k.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&$.length==1){if(jn.keymap&&$ in jn.keymap)(jn.remapCtrl!==!1||!W)&&($=jn.keymap[$]);else if($.charCodeAt(0)>255){var z=k.code&&k.code.slice(-1)||"";k.shiftKey||(z=z.toLowerCase()),z&&($=z)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function jo(m){var $=new m.constructor;return Object.keys(m).forEach(function(k){if(k!="insertEnd"){var D=m[k];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=jo(D)),$[k]=D}}),m.sel&&($.sel={head:m.sel.head&&qe(m.sel.head),anchor:m.sel.anchor&&qe(m.sel.anchor)}),$}function co(m,$,k){var D=!1,W=wt.maybeInitVimState_(m),z=W.visualBlock||W.wasInVisualBlock,q=m.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)m.ace.exitMultiSelectMode();else if(z||!q||m.ace.inVirtualSelectionMode)D=wt.handleKey(m,$,k);else{var Y=jo(W),Q=W.inputState.changeQueueList||[];m.operation(function(){m.curOp.isVimOp=!0;var re=0;m.ace.forEachSelection(function(){var se=m.ace.selection;m.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,m.state.vim.inputState.changeQueue=Q[re];var ye=m.getCursor("head"),Ce=m.getCursor("anchor"),me=tt(ye,Ce)?0:-1,we=tt(ye,Ce)?-1:0;ye=fe(ye,0,me),Ce=fe(Ce,0,we),m.state.vim.sel.head=ye,m.state.vim.sel.anchor=Ce,D=ri(m,$,k),se.$desiredColumn=m.state.vim.lastHPos==-1?null:m.state.vim.lastHPos,m.ace.inVirtualSelectionMode&&(Q[re]=m.state.vim.inputState.changeQueue),m.virtualSelectionMode()&&(m.state.vim=jo(Y)),re++}),m.curOp.cursorActivity&&!D&&(m.curOp.cursorActivity=!1),W.status=m.state.vim.status,m.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=m.somethingSelected()&&Wo(m,W,!0),D}function mi(m,$){$.off("beforeEndOperation",mi);var k=$.state.cm.vimCmd;k&&$.execCommand(k.exec?k:k.name,k.args),$.curOp=$.prevOp}var rr=e("../range").Range,Qi=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),oa=e("../lib/oop"),Va=e("../lib/keys"),uo=e("../lib/event"),Wi=e("../search").Search,ho=e("../lib/useragent"),Ho=e("../search_highlight").SearchHighlight,po=e("../commands/multi_select_commands"),sa=e("../mode/text").Mode.prototype.tokenRe,Zi=e("../ext/hardwrap").hardWrap;e("../multi_select");var Pe=function(m){this.ace=m,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)};Pe.Pos=function(m,$){if(!(this instanceof Ne))return new Ne(m,$);this.line=m,this.ch=$},Pe.defineOption=function(m,$,k){},Pe.commands={redo:function(m){m.ace.redo()},undo:function(m){m.ace.undo()},newlineAndIndent:function(m){m.ace.insert(`
1405
- `)},goLineLeft:function(m){m.ace.selection.moveCursorLineStart()},goLineRight:function(m){m.ace.selection.moveCursorLineEnd()}},Pe.keyMap={},Pe.addClass=Pe.rmClass=function(){},Pe.e_stop=Pe.e_preventDefault=uo.stopEvent,Pe.keyName=function(m){var $=Va[m.keyCode]||m.key||"";return $.length==1&&($=$.toUpperCase()),$=uo.getModifierString(m).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+$,$},Pe.keyMap.default=function(m){return function($){var k=$.ace.commands.commandKeyBinding[m.toLowerCase()];return k&&$.ace.execCommand(k)!==!1}},Pe.lookupKey=function m($,k,D){k||(k="default"),typeof k=="string"&&(k=Pe.keyMap[k]||Pe.keyMap.default);var W=typeof k=="function"?k($):k[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return m($,k.fallthrough,D);for(var z=0;z<k.fallthrough.length;z++){var q=m($,k.fallthrough[z],D);if(q)return q}}},Pe.findMatchingTag=function(m,$){return m.findMatchingTag($)},Pe.findEnclosingTag=function(m,$){},Pe.signal=function(m,$,k){return m._signal($,k)},Pe.on=uo.addListener,Pe.off=uo.removeListener,Pe.isWordChar=function(m){return m<""?/^\w$/.test(m):(sa.lastIndex=0,sa.test(m))},(function(){oa.implement(Pe.prototype,Qi),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(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var D={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(po.keyboardHandler)},this.operation=function(k,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return k();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=k();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&&W&&(this.ace.prevOp=W)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,D,W){var z=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},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(k,D){typeof k=="object"&&(D=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:D}),this.ace.selection.moveTo(k,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var D=this.ace.selection,W=k=="anchor"?D.isEmpty()?D.lead:D.anchor:k=="head"||!k?D.lead:D.getRange()[k];return y(W)},this.listSelections=function(k){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(k,D){var W=this.ace.multiSelect,z=k.map(function(re){var se=f(re.anchor),ye=f(re.head),Ce=rr.comparePoints(se,ye)<0?new rr.fromPoints(se,ye):new rr.fromPoints(ye,se);return Ce.cursor=rr.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(k,D,W){var z=this.ace.selection;z.moveTo(k.line,k.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var D=this.ace.session.$clipPositionToDocument(k.line,k.ch);return y(D)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var D=k.action=="insert",W=k.start,z=k.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=rr.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=D?se:rr.comparePoints(re,z);if(ye>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var m=function(k,D,W,z){this.cm=k,this.id=D,this.row=W,this.column=z,k.marks[this.id]=this};m.prototype.clear=function(){delete this.cm.marks[this.id]},m.prototype.find=function(){return y(this)},this.setBookmark=function(k,D){var W=new m(this,this.$uid++,k.line,k.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);z!=null&&(Q.column=z),Q.row+=D,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 y(re)}debugger},this.charCoords=function(k,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return y(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(k,D,W){var z=!1,q=!1;k instanceof RegExp&&!k.global&&(z=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
1406
- `,q=!1);var Y=new Wi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:k,caseSensitive:z,wrap:!1,backwards:ye,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&y(se.start)},to:function(){return se&&y(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(k,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,D){if(k){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(f(k),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,D){return this.ace.session.getTextRange(new rr(k.line,k.ch,D.line,D.ch))},this.replaceRange=function(k,D,W){W||(W=D);var z=new rr(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,k)},this.replaceSelection=this.replaceSelections=function(k){var D=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,D){switch(this.state[k]=D,k){case"indentWithTabs":k=$[k],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:k=$[k]}k&&this.ace.setOption(k,D)},this.getOption=function(k){var D,W=$[k];switch(W&&(D=this.ace.getOption(W)),k){case"indentWithTabs":return k=$[k],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new Ho(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,D=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var D=this.ace.session.getTokenAt(k.line,k.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(k){var D=this.ace.session.findMatchingBracket(f(k));return{to:D&&y(D)}},this.findMatchingTag=function(k){var D=this.ace.session.getMatchingTags(f(k));if(D)return{open:{from:y(D.openTag.start),to:y(D.openTag.end)},close:{from:y(D.closeTag.start),to:y(D.closeTag.end)}}},this.indentLine=function(k,D){D===!0?this.ace.session.indentRows(k,k," "):D===!1&&this.ace.session.outdentRows(new rr(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(f(k))},this.posFromIndex=function(k){return y(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),f(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:y(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(Pe.commands.hasOwnProperty(k))return Pe.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var D=this.$lineHandleChanges;if(!D)return null;for(var W=k.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return y(k.$lastDelta.end)}}).call(Pe.prototype);var aa=Pe.StringStream=function(m,$){this.pos=this.start=0,this.string=m,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};aa.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(m){var $=this.string.charAt(this.pos);if(typeof m=="string")var k=$==m;else var k=$&&(m.test?m.test($):m($));if(k)return++this.pos,$},eatWhile:function(m){for(var $=this.pos;this.eat(m););return this.pos>$},eatSpace:function(){for(var m=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>m},skipToEnd:function(){this.pos=this.string.length},skipTo:function(m){var $=this.string.indexOf(m,this.pos);if($>-1)return this.pos=$,!0},backUp:function(m){this.pos-=m},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(m,$,k){if(typeof m!="string"){var D=this.string.slice(this.pos).match(m);return D&&D.index>0?null:(D&&$!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return k?q.toLowerCase():q},z=this.string.substr(this.pos,m.length);if(W(z)==W(m))return $!==!1&&(this.pos+=m.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(m,$){this.lineStart+=m;try{return $()}finally{this.lineStart-=m}}},Pe.defineExtension=function(m,$){Pe.prototype[m]=$},Pi.importCssString(`.normal-mode .ace_cursor{
1398
+ `+I)}c++}else if(l&&/\S/.test(w)&&o!=c){var T=d.getLine(o+1);if(T&&/\S/.test(T)){var S=w.replace(/\s+$/,""),C=T.replace(/^\s+/,""),R=S+" "+C,b=a(R,u,5);if(b&&b.start>S.length||R.length<u){var L=new x(o,S.length,o+1,T.length-C.length);d.replace(L," "),o--,c--}else S.length<w.length&&d.remove(new x(o,S.length,o,w.length))}}o++}}function y(p){if(p.command.name=="insertstring"&&/\S/.test(p.args)){var s=p.editor,a=s.selection.cursor;if(a.column<=s.renderer.$printMarginColumn)return;var u=s.session.$undoManager.$lastDelta;f(s,{startRow:a.row,endRow:a.row,allowMerge:!1}),u!=s.session.$undoManager.$lastDelta&&s.session.markUndoGroup()}}var x=e("../range").Range,h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{hardWrap:{set:function(p){p?this.commands.on("afterExec",y):this.commands.off("afterExec",y)},value:!1}}),r.hardWrap=f}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],function(e,r,v){function f(m){return{row:m.line,column:m.ch}}function y(m){return new Ne(m.row,m.column)}function x(m,$,k){if($.line===k.line&&$.ch>=k.ch-1){var D=m.getLine($.line),W=D.charCodeAt($.ch);55296<=W&&W<=55551&&(k.ch+=1)}return{start:$,end:k}}function h(m){m.setOption("disableInput",!0),m.setOption("showCursorWhenSelecting",!1),Pe.signal(m,"vim-mode-change",{mode:"normal"}),m.on("cursorActivity",Po),R(m),Pe.on(m.getInputField(),"paste",s(m))}function p(m){m.setOption("disableInput",!1),m.off("cursorActivity",Po),Pe.off(m.getInputField(),"paste",s(m)),m.state.vim=null,lr&&clearTimeout(lr)}function s(m){var $=m.state.vim;return $.onPasteFn||($.onPasteFn=function(){$.insertMode||(m.setCursor(fe(m.getCursor(),0,1)),Nn.enterInsertMode(m,{},$))}),$.onPasteFn}function a(m,$){return $>=m.firstLine()&&$<=m.lastLine()}function u(m){return/^[a-z]$/.test(m)}function l(m){return"()[]{}".indexOf(m)!=-1}function o(m){return la.test(m)}function c(m){return en.test(m)}function d(m){return/^\s*$/.test(m)}function w(m){return".?!".indexOf(m)!=-1}function b(m,$){for(var k=0;k<$.length;k++)if($[k]==m)return!0;return!1}function I(m,$,k,D,W){if($===void 0&&!W)throw Error("defaultValue is required unless callback is provided");if(k||(k="string"),jt[m]={type:k,defaultValue:$,callback:W},D)for(var z=0;z<D.length;z++)jt[D[z]]=jt[m];$&&T(m,$)}function T(m,$,k,D){var W=jt[m];D=D||{};var z=D.scope;if(!W)return new Error("Unknown option: "+m);if(W.type=="boolean"){if($&&$!==!0)return new Error("Invalid argument: "+m+"="+$);$!==!1&&($=!0)}W.callback?(z!=="local"&&W.callback($,void 0),z!=="global"&&k&&W.callback($,k)):(z!=="local"&&(W.value=W.type=="boolean"?!!$:$),z!=="global"&&k&&(k.state.vim.options[m]={value:$}))}function S(m,$,k){var D=jt[m];k=k||{};var W=k.scope;if(!D)return new Error("Unknown option: "+m);if(D.callback){var z=$&&D.callback(void 0,$);return W!=="global"&&z!==void 0?z:W!=="local"?D.callback():void 0}var z=W!=="global"&&$&&$.state.vim.options[m];return(z||W!=="local"&&D||{}).value}function C(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Ln()}function R(m){return m.state.vim||(m.state.vim={inputState:new _,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeReturn:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{},expectLiteralNext:!1}),m.state.vim}function L(){Be={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:yi(),macroModeState:new C,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new K({}),searchHistoryController:new Z,exCommandHistoryController:new Z};for(var m in jt){var $=jt[m];$.value=$.defaultValue}}function F(m){function $(Y){typeof Y=="string"?yn.value=Y:yn=null}if(m[0]=="<"){var k=m.toLowerCase().slice(1,-1),D=k.split("-");if(k=D.pop()||"",k=="lt")m="<";else if(k=="space")m=" ";else if(k=="cr")m=`
1399
+ `;else if(wi[k]){var W=yn.value,z={key:wi[k],target:{value:W,selectionEnd:W.length,selectionStart:W.length}};yn.onKeyDown&&yn.onKeyDown(z,yn.value,$),yn&&yn.onKeyUp&&yn.onKeyUp(z,yn.value,$);return}}if(m==`
1400
+ `){var q=yn;yn=null,q.onClose&&q.onClose(q.value)}else yn.value=(yn.value||"")+m}function E(m,$,k){var D=sn;if(k){if(Ir.indexOf(k)!=-1)return;Ir.push(k),sn=k.noremap!=0}try{for(var W=R(m),z=/<(?:[CSMA]-)*\w+>|./gi,q;q=z.exec($);){var Y=q[0],Q=W.insertMode;if(yn){F(Y);continue}var re=wt.handleKey(m,Y,"mapping");if(!re&&Q&&W.insertMode){if(Y[0]=="<"){var se=Y.toLowerCase().slice(1,-1),ye=se.split("-");if(se=ye.pop()||"",se=="lt")Y="<";else if(se=="space")Y=" ";else if(se=="cr")Y=`
1401
+ `;else{if(wi.hasOwnProperty(se)){Y=wi[se],Bo(m,Y);continue}Y=Y[0],z.lastIndex=q.index+1}}m.replaceSelection(Y)}}}finally{if(Ir.pop(),sn=Ir.length?D:!1,!Ir.length&&yn){var Ce=yn;yn=null,kr(m,Ce)}}}function H(m,$){var k=m.key;if(!Rr[k]){k.length>1&&k[0]=="n"&&(k=k.replace("Numpad","")),k=Xn[k]||k;var D="";if(m.ctrlKey&&(D+="C-"),m.altKey&&(D+="A-"),m.metaKey&&(D+="M-"),Pe.isMac&&m.altKey&&!m.metaKey&&!m.ctrlKey&&(D=D.slice(2)),(D||k.length>1)&&m.shiftKey&&(D+="S-"),$&&!$.expectLiteralNext&&k.length==1){if(Hn.keymap&&k in Hn.keymap)(Hn.remapCtrl!=0||!D)&&(k=Hn.keymap[k]);else if(k.charCodeAt(0)>255){var W=m.code&&m.code.slice(-1)||"";m.shiftKey||(W=W.toLowerCase()),W&&(k=W)}}return D+=k,D.length>1&&(D="<"+D+">"),D}}function P(m,$){Hn.string!==m&&(Hn=O(m)),Hn.remapCtrl=$}function O(m){function $(D){return D.split(/\\?(.)/).filter(Boolean)}var k={};return m?(m.split(/((?:[^\\,]|\\.)+),/).map(function(D){if(D){var W=D.split(/((?:[^\\;]|\\.)+);/);if(W.length==3){var z=$(W[1]),q=$(W[2]);if(z.length!==q.length)return;for(var Y=0;Y<z.length;++Y)k[z[Y]]=q[Y]}else if(W.length==1){var Q=$(D);if(Q.length%2!==0)return;for(var Y=0;Y<Q.length;Y+=2)k[Q[Y]]=Q[Y+1]}}}),{keymap:k,string:m}):{keymap:k,string:""}}function _(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null,this.changeQueue=null}function A(m,$){m.state.vim.inputState=new _,m.state.vim.expectLiteralNext=!1,Pe.signal(m,"vim-command-done",$)}function N(){this.removed=[],this.inserted=""}function B(m,$,k){this.clear(),this.keyBuffer=[m||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!$,this.blockwise=!!k}function U(m,$){var k=Be.registerController.registers;if(!m||m.length!=1)throw Error("Register name must be 1 character");k[m]=$,Jt.push(m)}function K(m){this.registers=m,this.unnamedRegister=m['"']=new B,m["."]=new B,m[":"]=new B,m["/"]=new B,m["+"]=new B}function Z(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}function te(m,$){Ur[m]=$}function he(m,$){for(var k=[],D=0;D<$;D++)k.push(m);return k}function ne(m,$){Uo[m]=$}function ae(m,$){Nn[m]=$}function ue(m,$,k){var D=m.state.vim,W=D.insertMode||D.visualMode,z=Math.min(Math.max(m.firstLine(),$.line),m.lastLine()),q=m.getLine(z),Y=q.length-1+ +!!W,Q=Math.min(Math.max(0,$.ch),Y),re=q.charCodeAt(Q);if(56320<=re&&re<=57343){var se=1;k&&k.line==z&&k.ch>Q&&(se=-1),Q+=se,Q>Y&&(Q-=2)}return new Ne(z,Q)}function ce(m){var $={};for(var k in m)m.hasOwnProperty(k)&&($[k]=m[k]);return $}function fe(m,$,k){return typeof $=="object"&&(k=$.ch,$=$.line),new Ne(m.line+$,m.ch+k)}function $e(m,$,k,D){D.operator&&(k="operatorPending");for(var W,z=[],q=[],Y=sn?$.length-go:0,Q=Y;Q<$.length;Q++){var re=$[Q];k=="insert"&&re.context!="insert"||re.context&&re.context!=k||D.operator&&re.type=="action"||!(W=Te(m,re.keys))||(W=="partial"&&z.push(re),W=="full"&&q.push(re))}return{partial:z.length&&z,full:q.length&&q}}function Te(m,$){var k=$.slice(-11)=="<character>",D=$.slice(-10)=="<register>";if(k||D){var W=$.length-(k?11:10),z=m.slice(0,W),q=$.slice(0,W);return z==q&&m.length>W?"full":q.indexOf(z)==0?"partial":!1}return m==$?"full":$.indexOf(m)==0?"partial":!1}function Ee(m){var $=/^.*(<[^>]+>)$/.exec(m),k=$?$[1]:m.slice(-1);if(k.length>1)switch(k){case"<CR>":k=`
1402
+ `;break;case"<Space>":k=" ";break;default:k=""}return k}function Ge(m,$,k){return function(){for(var D=0;D<k;D++)$(m)}}function qe(m){return new Ne(m.line,m.ch)}function ut(m,$){return m.ch==$.ch&&m.line==$.line}function tt(m,$){return m.line<$.line?!0:m.line==$.line&&m.ch<$.ch}function ht(m,$){return arguments.length>2&&($=ht.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(m,$)?m:$}function Zt(m,$){return arguments.length>2&&($=Zt.apply(void 0,Array.prototype.slice.call(arguments,1))),tt(m,$)?$:m}function dn(m,$,k){var D=tt(m,$),W=tt($,k);return D&&W}function qt(m,$){return m.getLine($).length}function dr(m){return m.trim?m.trim():m.replace(/^\s+|\s+$/g,"")}function pn(m){return m.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function En(m,$,k){var D=qt(m,$),W=new Array(k-D+1).join(" ");m.setCursor(new Ne($,D)),m.replaceRange(W,m.getCursor())}function In(m,$){var k=[],D=m.listSelections(),W=qe(m.clipPos($)),z=!ut($,W),q=m.getCursor("head"),Y=vt(D,q),Q=ut(D[Y].head,D[Y].anchor),re=D.length-1,se=re-Y>Y?re:0,ye=D[se].anchor,Ce=Math.min(ye.line,W.line),me=Math.max(ye.line,W.line),we=ye.ch,Oe=W.ch,Le=D[se].head.ch-we,Ue=Oe-we;Le>0&&Ue<=0?(we++,z||Oe--):Le<0&&Ue>=0?(we--,Q||Oe++):Le<0&&Ue==-1&&(we--,Oe++);for(var st=Ce;st<=me;st++){var Qe={anchor:new Ne(st,we),head:new Ne(st,Oe)};k.push(Qe)}return m.setSelections(k),$.ch=Oe,ye.ch=we,ye}function Yn(m,$,k){for(var D=[],W=0;W<k;W++){var z=fe($,W,0);D.push({anchor:z,head:z})}m.setSelections(D,0)}function vt(m,$,k){for(var D=0;D<m.length;D++){var W=ut(m[D].anchor,$),z=ut(m[D].head,$);if(W||z)return D}return-1}function He(m,$){var k=$.lastSelection,D=function(){var z=m.listSelections(),q=z[0],Y=z[z.length-1],Q=tt(q.anchor,q.head)?q.anchor:q.head,re=tt(Y.anchor,Y.head)?Y.head:Y.anchor;return[Q,re]},W=function(){var z=m.getCursor(),q=m.getCursor(),Y=k.visualBlock;if(Y){var Q=Y.width,re=Y.height;q=new Ne(z.line+re,z.ch+Q);for(var se=[],ye=z.line;ye<q.line;ye++){var Ce=new Ne(ye,z.ch),me=new Ne(ye,q.ch),we={anchor:Ce,head:me};se.push(we)}m.setSelections(se)}else{var Oe=k.anchorMark.find(),Le=k.headMark.find(),Ue=Le.line-Oe.line,st=Le.ch-Oe.ch;q={line:q.line+Ue,ch:Ue?q.ch:st+q.ch},k.visualLine&&(z=new Ne(z.line,0),q=new Ne(q.line,qt(m,q.line))),m.setSelection(z,q)}return[z,q]};return $.visualMode?D():W()}function ke(m,$){var k=$.sel.anchor,D=$.sel.head;$.lastPastedText&&(D=m.posFromIndex(m.indexFromPos(k)+$.lastPastedText.length),$.lastPastedText=null),$.lastSelection={anchorMark:m.setBookmark(k),headMark:m.setBookmark(D),anchor:qe(k),head:qe(D),visualMode:$.visualMode,visualLine:$.visualLine,visualBlock:$.visualBlock}}function ze(m,$,k,D){var W=m.state.vim.sel,z=D?$:W.head,q=D?$:W.anchor,Y;return tt(k,$)&&(Y=k,k=$,$=Y),tt(z,q)?(z=ht($,z),q=Zt(q,k)):(q=ht($,q),z=Zt(z,k),z=fe(z,0,-1),z.ch==-1&&z.line!=m.firstLine()&&(z=new Ne(z.line-1,qt(m,z.line-1)))),[q,z]}function Ye(m,$,W){var D=m.state.vim;$=$||D.sel;var W=W||D.visualLine?"line":D.visualBlock?"block":"char",z=dt(m,$,W);m.setSelections(z.ranges,z.primary)}function dt(m,$,k,D){var W=qe($.head),z=qe($.anchor);if(k=="char"){var q=!D&&!tt($.head,$.anchor)?1:0,Y=tt($.head,$.anchor)?1:0;return W=fe($.head,0,q),z=fe($.anchor,0,Y),{ranges:[{anchor:z,head:W}],primary:0}}if(k=="line"){if(tt($.head,$.anchor))W.ch=0,z.ch=qt(m,z.line);else{z.ch=0;var Q=m.lastLine();W.line>Q&&(W.line=Q),W.ch=qt(m,W.line)}return{ranges:[{anchor:z,head:W}],primary:0}}if(k=="block"){var re=Math.min(z.line,W.line),se=z.ch,ye=Math.max(z.line,W.line),Ce=W.ch;se<Ce?Ce+=1:se+=1;for(var me=ye-re+1,we=W.line==re?0:me-1,Oe=[],Le=0;Le<me;Le++)Oe.push({anchor:new Ne(re+Le,se),head:new Ne(re+Le,Ce)});return{ranges:Oe,primary:we}}}function Ct(m){var $=m.getCursor("head");return m.getSelection().length==1&&($=ht($,m.getCursor("anchor"))),$}function xt(m,$){var k=m.state.vim;$!==!1&&m.setCursor(ue(m,k.sel.head)),ke(m,k),k.visualMode=!1,k.visualLine=!1,k.visualBlock=!1,k.insertMode||Pe.signal(m,"vim-mode-change",{mode:"normal"})}function Rt(m,$,k){var D=m.getRange($,k);if(/\n\s*$/.test(D)){var W=D.split(`
1403
+ `);W.pop();for(var z,z=W.pop();W.length>0&&z&&d(z);z=W.pop())k.line--,k.ch=0;z?(k.line--,k.ch=qt(m,k.line)):k.ch=0}}function Et(m,$,k){$.ch=0,k.ch=0,k.line++}function ct(m){if(!m)return 0;var $=m.search(/\S/);return $==-1?m.length:$}function yt(m,$,k){var D=$.inclusive,W=$.innerWord,z=$.bigWord,q=$.noSymbol,Y=$.multiline,Q=k||Ct(m),re=m.getLine(Q.line),se=re,ye=Q.line,Ce=ye,me=Q.ch,we,Oe=q?fo[0]:vi[0];if(W&&/\s/.test(re.charAt(me)))Oe=function(mn){return/\s/.test(mn)};else{for(;!Oe(re.charAt(me));)if(me++,me>=re.length){if(!Y)return null;me--,we=oo(m,Q,!0,z,!0);break}z?Oe=vi[0]:(Oe=fo[0],Oe(re.charAt(me))||(Oe=fo[1]))}for(var Le=me,Ue=me;Oe(re.charAt(Ue))&&Ue>=0;)Ue--;if(Ue++,we)Le=we.to,Ce=we.line,se=m.getLine(Ce),!se&&Le==0&&Le++;else for(;Oe(re.charAt(Le))&&Le<re.length;)Le++;if(D){var st=Le,Qe=Q.ch<=Ue&&/\s/.test(re.charAt(Q.ch));if(!Qe)for(;/\s/.test(se.charAt(Le))&&Le<se.length;)Le++;if(st==Le||Qe){for(var et=Ue;/\s/.test(re.charAt(Ue-1))&&Ue>0;)Ue--;!Ue&&!Qe&&(Ue=et)}}return{start:new Ne(ye,Ue),end:new Ne(Ce,Le)}}function bn(m,$,k){var D=$;if(!Pe.findMatchingTag||!Pe.findEnclosingTag)return{start:D,end:D};var W=Pe.findMatchingTag(m,$)||Pe.findEnclosingTag(m,$);return!W||!W.open||!W.close?{start:D,end:D}:k?{start:W.open.from,end:W.close.to}:{start:W.open.to,end:W.close.from}}function br(m,$,k){ut($,k)||Be.jumpList.add(m,$,k)}function zr(m,$){Be.lastCharacterSearch.increment=m,Be.lastCharacterSearch.forward=$.forward,Be.lastCharacterSearch.selectedCharacter=$.selectedCharacter}function Li(m,$,k,D){var W=qe(m.getCursor()),z=k?1:-1,q=k?m.lineCount():-1,Y=W.ch,Q=W.line,re=m.getLine(Q),se={lineText:re,nextCh:re.charAt(Y),lastCh:null,index:Y,symb:D,reverseSymb:(k?{")":"(","}":"{"}:{"(":")","{":"}"})[D],forward:k,depth:0,curMoveThrough:!1},ye=ti[D];if(!ye)return W;var Ce=ni[ye].init,me=ni[ye].isComplete;for(Ce&&Ce(se);Q!==q&&$;){if(se.index+=z,se.nextCh=se.lineText.charAt(se.index),!se.nextCh){if(Q+=z,se.lineText=m.getLine(Q)||"",z>0)se.index=0;else{var we=se.lineText.length;se.index=we>0?we-1:0}se.nextCh=se.lineText.charAt(se.index)}me(se)&&(W.line=Q,W.ch=se.index,$--)}return se.nextCh||se.curMoveThrough?new Ne(Q,se.index):W}function oo(m,$,k,D,W){var z=$.line,q=$.ch,Y=m.getLine(z),Q=k?1:-1,re=D?vi:fo;if(W&&Y==""){if(z+=Q,Y=m.getLine(z),!a(m,z))return null;q=k?0:Y.length}for(;;){if(W&&Y=="")return{from:0,to:0,line:z};for(var se=Q>0?Y.length:-1,ye=se,Ce=se;q!=se;){for(var me=!1,we=0;we<re.length&&!me;++we)if(re[we](Y.charAt(q))){for(ye=q;q!=se&&re[we](Y.charAt(q));)q+=Q;if(Ce=q,me=ye!=Ce,ye==$.ch&&z==$.line&&Ce==ye+Q)continue;return{from:Math.min(ye,Ce+1),to:Math.max(ye,Ce),line:z}}me||(q+=Q)}if(z+=Q,!a(m,z))return null;Y=m.getLine(z),q=Q>0?0:Y.length}}function pr(m,$,k,D,W,z){var q=qe($),Y=[];(D&&!W||!D&&W)&&k++;for(var Q=!D||!W,re=0;re<k;re++){var se=oo(m,$,D,z,Q);if(!se){var ye=qt(m,m.lastLine());Y.push(D?{line:m.lastLine(),from:ye,to:ye}:{line:0,from:0,to:0});break}Y.push(se),$=new Ne(se.line,D?se.to-1:se.from)}var Ce=Y.length!=k,me=Y[0],we=Y.pop();return D&&!W?(!Ce&&(me.from!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.from)):D&&W?new Ne(we.line,we.to-1):!D&&W?(!Ce&&(me.to!=q.ch||me.line!=q.line)&&(we=Y.pop()),new Ne(we.line,we.to)):new Ne(we.line,we.from)}function so(m,$,k,D,W){var z=$,q=new Ne(z.line+k.repeat-1,1/0),Y=m.clipPos(q);return Y.ch--,W||(D.lastHPos=1/0,D.lastHSPos=m.charCoords(Y,"div").left),q}function Lo(m,$,k,D,W){for(var z=W||m.getCursor(),q=z.ch,Y,Q=0;Q<$;Q++){var re=m.getLine(z.line);if(Y=ja(q,re,D,k),Y==-1)return null;q=Y}return new Ne(m.getCursor().line,Y)}function za(m,$){var k=m.getCursor().line;return ue(m,new Ne(k,$-1))}function Zr(m,$,k,D){!b(k,Ji)&&!Yt.test(k)||($.marks[k]&&$.marks[k].clear(),$.marks[k]=m.setBookmark(D))}function ja(m,$,k,D,W){var z;return D?(z=$.indexOf(k,m+1),z!=-1):(z=$.lastIndexOf(k,m-1),z!=-1),z}function fs(m,$,k,D,W){function z(Ue){return!/\S/.test(m.getLine(Ue))}function q(Ue,st,Qe){return Qe?z(Ue)!=z(Ue+st):!z(Ue)&&z(Ue+st)}function Y(Ue){D=D>0?1:-1;var st=m.ace.session.getFoldLine(Ue);st&&Ue+D>st.start.row&&Ue+D<st.end.row&&(D=(D>0?st.end.row:st.start.row)-Ue)}var Q=$.line,re=m.firstLine(),se=m.lastLine(),ye,Ce,me=Q;if(D){for(;re<=me&&me<=se&&k>0;)Y(me),q(me,D)&&k--,me+=D;return new Ne(me,0)}var we=m.state.vim;if(we.visualLine&&q(Q,1,!0)){var Oe=we.sel.anchor;q(Oe.line,-1,!0)&&(!W||Oe.line!=Q)&&(Q+=1)}var Le=z(Q);for(me=Q;me<=se&&k;me++)q(me,1,!0)&&(!W||z(me)!=Le)&&k--;for(Ce=new Ne(me,0),me>se&&!Le?Le=!0:W=!1,me=Q;me>re&&!((!W||z(me)==Le||me==Q)&&q(me,-1,!0));me--);return ye=new Ne(me,0),{start:ye,end:Ce}}function ta(m,$,k,D,W){function z(re){re.pos+re.dir<0||re.pos+re.dir>=re.line.length?re.line=null:re.pos+=re.dir}function q(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(Oe=we.pos,w(we.line[we.pos])){if(!W)return{ln:we.ln,pos:we.pos+1};for(z(we);we.line!==null&&d(we.line[we.pos]);)Oe=we.pos,z(we);return{ln:we.ln,pos:Oe+1}}z(we)}return{ln:we.ln,pos:Oe+1}}function Y(re,se,ye,Ce){var me=re.getLine(se),we={line:me,ln:se,pos:ye,dir:Ce};if(we.line==="")return{ln:we.ln,pos:we.pos};var Oe=we.pos;for(z(we);we.line!==null;){if(!d(we.line[we.pos])&&!w(we.line[we.pos]))Oe=we.pos;else if(w(we.line[we.pos]))return W?d(we.line[we.pos+1])?{ln:we.ln,pos:we.pos+1}:{ln:we.ln,pos:Oe}:{ln:we.ln,pos:Oe};z(we)}return we.line=me,W&&d(we.line[we.pos])?{ln:we.ln,pos:we.pos}:{ln:we.ln,pos:Oe}}for(var Q={ln:$.line,pos:$.ch};k>0;)D<0?Q=Y(m,Q.ln,Q.pos,D):Q=q(m,Q.ln,Q.pos,D),k--;return new Ne(Q.ln,Q.pos)}function Oi(m,$,k,D){function W(Q,re){if(re.pos+re.dir<0||re.pos+re.dir>=re.line.length){if(re.ln+=re.dir,!a(Q,re.ln)){re.line=null,re.ln=null,re.pos=null;return}re.line=Q.getLine(re.ln),re.pos=re.dir>0?0:re.line.length-1}else re.pos+=re.dir}function z(Q,re,se,ye){var Le=Q.getLine(re),Ce=Le==="",me={line:Le,ln:re,pos:se,dir:ye},we={ln:me.ln,pos:me.pos},Oe=me.line==="";for(W(Q,me);me.line!==null;){if(we.ln=me.ln,we.pos=me.pos,me.line===""&&!Oe)return{ln:me.ln,pos:me.pos};if(Ce&&me.line!==""&&!d(me.line[me.pos]))return{ln:me.ln,pos:me.pos};w(me.line[me.pos])&&!Ce&&(me.pos===me.line.length-1||d(me.line[me.pos+1]))&&(Ce=!0),W(Q,me)}var Le=Q.getLine(we.ln);we.pos=0;for(var Ue=Le.length-1;Ue>=0;--Ue)if(!d(Le[Ue])){we.pos=Ue;break}return we}function q(Q,re,se,ye){var Oe=Q.getLine(re),Ce={line:Oe,ln:re,pos:se,dir:ye},me={ln:Ce.ln,pos:null},we=Ce.line==="";for(W(Q,Ce);Ce.line!==null;){if(Ce.line===""&&!we)return me.pos!==null?me:{ln:Ce.ln,pos:Ce.pos};if(!(!w(Ce.line[Ce.pos])||me.pos===null||Ce.ln===me.ln&&Ce.pos+1===me.pos))return me;Ce.line!==""&&!d(Ce.line[Ce.pos])&&(we=!1,me={ln:Ce.ln,pos:Ce.pos}),W(Q,Ce)}var Oe=Q.getLine(me.ln);me.pos=0;for(var Le=0;Le<Oe.length;++Le)if(!d(Oe[Le])){me.pos=Le;break}return me}for(var Y={ln:$.line,pos:$.ch};k>0;)D<0?Y=q(m,Y.ln,Y.pos,D):Y=z(m,Y.ln,Y.pos,D),k--;return new Ne(Y.ln,Y.pos)}function zn(m,$,k,D){var W=$,z,q,Y={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[k],Q={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[k],re=m.getLine(W.line).charAt(W.ch),se=re===Q?1:0;if(z=m.scanForBracket(new Ne(W.line,W.ch+se),-1,void 0,{bracketRegex:Y}),q=m.scanForBracket(new Ne(W.line,W.ch+se),1,void 0,{bracketRegex:Y}),!z||!q)return null;if(z=z.pos,q=q.pos,z.line==q.line&&z.ch>q.ch||z.line>q.line){var ye=z;z=q,q=ye}return D?q.ch+=1:z.ch+=1,{start:z,end:q}}function xr(m,$,k,D){var W=qe($),z=m.getLine(W.line),q=z.split(""),Y,Q,re,se,ye=q.indexOf(k);if(W.ch<ye)W.ch=ye;else if(ye<W.ch&&q[W.ch]==k){var Ce=/string/.test(m.getTokenTypeAt(fe($,0,1))),me=/string/.test(m.getTokenTypeAt($)),we=Ce&&!me;we||(Q=W.ch,--W.ch)}if(q[W.ch]==k&&!Q)Y=W.ch+1;else for(re=W.ch;re>-1&&!Y;re--)q[re]==k&&(Y=re+1);if(Y&&!Q)for(re=Y,se=q.length;re<se&&!Q;re++)q[re]==k&&(Q=re);return!Y||!Q?{start:W,end:W}:(D&&(--Y,++Q),{start:new Ne(W.line,Y),end:new Ne(W.line,Q)})}function Ni(){}function An(m){var $=m.state.vim;return $.searchState_||($.searchState_=new Ni)}function Cr(m){return Di(m,"/")}function Gi(m){return ms(m,"/")}function Di(m,$){var k=ms(m,$)||[];if(!k.length)return[];var D=[];if(k[0]===0){for(var W=0;W<k.length;W++)typeof k[W]=="number"&&D.push(m.substring(k[W]+1,k[W+1]));return D}}function ms(m,$){$||($="/");for(var k=!1,D=[],W=0;W<m.length;W++){var z=m.charAt(W);!k&&z==$&&D.push(W),k=!k&&z=="\\"}return D}function na(m){for(var $="|(){",k="}",D=!1,W=[],z=-1;z<m.length;z++){var q=m.charAt(z)||"",Y=m.charAt(z+1)||"",Q=Y&&$.indexOf(Y)!=-1;D?((q!=="\\"||!Q)&&W.push(q),D=!1):q==="\\"?(D=!0,Y&&k.indexOf(Y)!=-1&&(Q=!0),(!Q||Y==="\\")&&W.push(q)):(W.push(q),Q&&Y!=="\\"&&W.push("\\"))}return W.join("")}function Ha(m){for(var $=!1,k=[],D=-1;D<m.length;D++){var W=m.charAt(D)||"",z=m.charAt(D+1)||"";bi[W+z]?(k.push(bi[W+z]),D++):$?(k.push(W),$=!1):W==="\\"?($=!0,o(z)||z==="$"?k.push("$"):z!=="/"&&z!=="\\"&&k.push("\\")):(W==="$"&&k.push("$"),k.push(W),z==="/"&&k.push("\\"))}return k.join("")}function Ua(m){for(var $=new Pe.StringStream(m),k=[];!$.eol();){for(;$.peek()&&$.peek()!="\\";)k.push($.next());var D=!1;for(var W in ar)if($.match(W,!0)){D=!0,k.push(ar[W]);break}D||k.push($.next())}return k.join("")}function Fi(m,$,k){var D=Be.registerController.getRegister("/");if(D.setText(m),m instanceof RegExp)return m;var W=Gi(m),z,q;if(!W.length)z=m;else{z=m.substring(0,W[0]);var Y=m.substring(W[0]);q=Y.indexOf("i")!=-1}if(!z)return null;S("pcre")||(z=na(z)),k&&($=/^[^A-Z]*$/.test(z));var Q=new RegExp(z,$||q?"im":"m");return Q}function Jr(m){typeof m=="string"&&(m=document.createElement(m));for(var $,k=1;k<arguments.length;k++)if($=arguments[k])if(typeof $!="object"&&($=document.createTextNode($)),$.nodeType)m.appendChild($);else for(var D in $)Object.prototype.hasOwnProperty.call($,D)&&(D[0]==="$"?m.style[D.slice(1)]=$[D]:m.setAttribute(D,$[D]));return m}function zt(m,$){var k=Jr("div",{$color:"red",$whiteSpace:"pre",class:"cm-vim-message"},$);m.openNotification?m.openNotification(k,{bottom:!0,duration:5e3}):alert(k.innerText)}function ra(m,$){return Jr("div",{$display:"flex"},Jr("span",{$fontFamily:"monospace",$whiteSpace:"pre",$flex:1},m,Jr("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false",$width:"100%"})),$&&Jr("span",{$color:"#888"},$))}function kr(m,$){if(Ir.length){$.value||($.value=""),yn=$;return}var k=ra($.prefix,$.desc);if(m.openDialog)m.openDialog(k,$.onClose,{onKeyDown:$.onKeyDown,onKeyUp:$.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:$.value});else{var D="";typeof $.prefix!="string"&&$.prefix&&(D+=$.prefix.textContent),$.desc&&(D+=" "+$.desc),$.onClose(prompt(D,""))}}function jn(m,$){if(m instanceof RegExp&&$ instanceof RegExp){for(var k=["global","multiline","ignoreCase","source"],D=0;D<k.length;D++){var W=k[D];if(m[W]!==$[W])return!1}return!0}return!1}function gn(m,$,k,D){if($){var W=An(m),z=Fi($,!!k,!!D);if(z)return gi(m,z),jn(z,W.getQuery())||W.setQuery(z),z}}function Rn(m){if(m.source.charAt(0)=="^")var $=!0;return{token:function(k){if($&&!k.sol()){k.skipToEnd();return}var D=k.match(m,!1);if(D)return D[0].length==0?(k.next(),"searching"):!k.sol()&&(k.backUp(1),!m.exec(k.next()+D[0]))?(k.next(),null):(k.match(m),"searching");for(;!k.eol()&&(k.next(),!k.match(m,!1)););},query:m}}function gi(m,$){clearTimeout(lr);var k=An(m);k.highlightTimeout=lr,lr=setTimeout(function(){if(m.state.vim){var D=An(m);D.highlightTimeout=null;var W=D.getOverlay();(!W||$!=W.query)&&(W&&m.removeOverlay(W),W=Rn($),m.addOverlay(W),m.showMatchesOnScrollbar&&(D.getScrollbarAnnotate()&&D.getScrollbarAnnotate().clear(),D.setScrollbarAnnotate(m.showMatchesOnScrollbar($))),D.setOverlay(W))}},50)}function Sr(m,$,k,D){return D===void 0&&(D=1),m.operation(function(){for(var W=m.getCursor(),z=m.getSearchCursor(k,W),q=0;q<D;q++){var Y=z.find($);if(q==0&&Y&&ut(z.from(),W)){var Q=$?z.from():z.to();Y=z.find($),Y&&!Y[0]&&ut(z.from(),Q)&&m.getLine(Q.line).length==Q.ch&&(Y=z.find($))}if(!Y&&(z=m.getSearchCursor(k,$?new Ne(m.lastLine()):new Ne(m.firstLine(),0)),!z.find($)))return}return z.from()})}function fi(m,$,k,D,W){return D===void 0&&(D=1),m.operation(function(){var z=m.getCursor(),q=m.getSearchCursor(k,z),Y=q.find(!$);!W.visualMode&&Y&&ut(q.from(),z)&&q.find(!$);for(var Q=0;Q<D;Q++)if(Y=q.find($),!Y&&(q=m.getSearchCursor(k,$?new Ne(m.lastLine()):new Ne(m.firstLine(),0)),!q.find($)))return;return[q.from(),q.to()]})}function Oo(m){var $=An(m);$.highlightTimeout&&(clearTimeout($.highlightTimeout),$.highlightTimeout=null),m.removeOverlay(An(m).getOverlay()),$.setOverlay(null),$.getScrollbarAnnotate()&&($.getScrollbarAnnotate().clear(),$.setScrollbarAnnotate(null))}function vs(m,$,k){return typeof m!="number"&&(m=m.line),$ instanceof Array?b(m,$):typeof k=="number"?m>=$&&m<=k:m==$}function Yi(m){var $=m.ace.renderer;return{top:$.getFirstFullyVisibleRow(),bottom:$.getLastFullyVisibleRow()}}function jr(m,$,k){if(k=="'"||k=="`")return Be.jumpList.find(m,-1)||new Ne(0,0);if(k==".")return ao(m);var D=$.marks[k];return D&&D.find()}function ao(m){if(m.getLastEditEnd)return m.getLastEditEnd();for(var $=m.doc.history.done,k=$.length;k--;)if($[k].changes)return qe($[k].changes[0].to)}function No(m,$,k,D,W,z,q,Y,Q){function re(){m.operation(function(){for(;!Oe;)se(),Ce();me()})}function se(){var Qe=m.getRange(z.from(),z.to()),et=Qe.replace(q,Y),mn=z.to().line;z.replace(et),Ue=z.to().line,W+=Ue-mn,st=Ue<mn}function ye(){var Qe=Le&&qe(z.to()),et=z.findNext();return et&&!et[0]&&Qe&&ut(z.from(),Qe)&&(et=z.findNext()),et}function Ce(){for(;ye()&&vs(z.from(),D,W);)if(!(!k&&z.from().line==Ue&&!st)){m.scrollIntoView(z.from(),30),m.setSelection(z.from(),z.to()),Le=z.from(),Oe=!1;return}Oe=!0}function me(Qe){if(Qe&&Qe(),m.focus(),Le){m.setCursor(Le);var et=m.state.vim;et.exMode=!1,et.lastHPos=et.lastHSPos=Le.ch}Q&&Q()}function we(Qe,et,mn){Pe.e_stop(Qe);var at=H(Qe);switch(at){case"y":se(),Ce();break;case"n":Ce();break;case"a":var xn=Q;Q=void 0,m.operation(re),Q=xn;break;case"l":se();case"q":case"<Esc>":case"<C-c>":case"<C-[>":me(mn)}return Oe&&me(mn),!0}m.state.vim.exMode=!0;var Oe=!1,Le,Ue,st;if(Ce(),Oe){zt(m,"No matches for "+q.source);return}if(!$){re(),Q&&Q();return}kr(m,{prefix:Jr("span","replace with ",Jr("strong",Y)," (y/n/a/q/l)"),onKeyDown:we})}function Hr(m,$){var k=m.state.vim,D=Be.macroModeState,W=Be.registerController.getRegister("."),z=D.isPlaying,q=D.lastInsertModeChanges;z||(m.off("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=null,Pe.off(m.getInputField(),"keydown",xs)),!z&&k.insertModeRepeat>1&&(ia(m,k,k.insertModeRepeat-1,!0),k.lastEditInputState.repeatOverride=k.insertModeRepeat),delete k.insertModeRepeat,k.insertMode=!1,$||m.setCursor(m.getCursor().line,m.getCursor().ch-1),m.setOption("keyMap","vim"),m.setOption("disableInput",!0),m.toggleOverwrite(!1),W.setText(q.changes.join("")),Pe.signal(m,"vim-mode-change",{mode:"normal"}),D.isRecording&&rr(D)}function Do(m){_n.unshift(m)}function ys(m,$,k,D,W){var z={keys:m,type:$};z[$]=k,z[$+"Args"]=D;for(var q in W)z[q]=W[q];Do(z)}function ws(m,$,k,D){var W=Be.registerController.getRegister(D);if(D==":"){W.keyBuffer[0]&&fr.processCommand(m,W.keyBuffer[0]),k.isPlaying=!1;return}var z=W.keyBuffer,q=0;k.isPlaying=!0,k.replaySearchQueries=W.searchQueries.slice(0);for(var Y=0;Y<z.length;Y++)for(var Q=z[Y],re,se;Q;)if(re=/<\w+-.+?>|<\w+>|./.exec(Q),se=re[0],Q=Q.substring(re.index+se.length),wt.handleKey(m,se,"macro"),$.insertMode){var ye=W.insertModeChanges[q++].changes;Be.macroModeState.lastInsertModeChanges.changes=ye,zo(m,ye,1),Hr(m)}k.isPlaying=!1}function Fo(m,$){if(!m.isPlaying){var k=m.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushText($)}}function rr(m){if(!m.isPlaying){var $=m.latestRegister,k=Be.registerController.getRegister($);k&&k.pushInsertModeChanges&&k.pushInsertModeChanges(m.lastInsertModeChanges)}}function bs(m,$){if(!m.isPlaying){var k=m.latestRegister,D=Be.registerController.getRegister(k);D&&D.pushSearchQuery&&D.pushSearchQuery($)}}function lo(m,$){var k=Be.macroModeState,D=k.lastInsertModeChanges;if(!k.isPlaying)for(var W=m.state.vim;$;){if(D.expectCursorActivityForChange=!0,D.ignoreCount>1)D.ignoreCount--;else if($.origin=="+input"||$.origin=="paste"||$.origin===void 0){var z=m.listSelections().length;z>1&&(D.ignoreCount=z);var q=$.text.join(`
1404
+ `);if(D.maybeReset&&(D.changes=[],D.maybeReset=!1),q)if(m.state.overwrite&&!/\n/.test(q))D.changes.push([q]);else{if(q.length>1){var Y=W&&W.insertEnd&&W.insertEnd.find(),Q=m.getCursor();if(Y&&Y.line==Q.line){var re=Y.ch-Q.ch;re>0&&re<q.length&&(D.changes.push([q,re]),q="")}}q&&D.changes.push(q)}}$=$.next}}function Po(m){var $=m.state.vim;if($.insertMode){var k=Be.macroModeState;if(k.isPlaying)return;var D=k.lastInsertModeChanges;D.expectCursorActivityForChange?D.expectCursorActivityForChange=!1:(D.maybeReset=!0,$.insertEnd&&$.insertEnd.clear(),$.insertEnd=m.setBookmark(m.getCursor(),{insertLeft:!0}))}else m.curOp.isVimOp||Wo(m,$)}function Wo(m,$,k){var D=m.getCursor("anchor"),W=m.getCursor("head");if($.visualMode&&!m.somethingSelected()?xt(m,!1):!$.visualMode&&!$.insertMode&&m.somethingSelected()&&($.visualMode=!0,$.visualLine=!1,Pe.signal(m,"vim-mode-change",{mode:"visual"})),$.visualMode){var z=tt(W,D)?0:-1,q=tt(W,D)?-1:0;W=fe(W,0,z),D=fe(D,0,q),$.sel={anchor:D,head:W},Zr(m,$,"<",ht(W,D)),Zr(m,$,">",Zt(W,D))}else!$.insertMode&&!k&&($.lastHPos=m.getCursor().ch)}function Xi(m,$){this.keyName=m,this.key=$.key,this.ctrlKey=$.ctrlKey,this.altKey=$.altKey,this.metaKey=$.metaKey,this.shiftKey=$.shiftKey}function xs(m){var $=Be.macroModeState,k=$.lastInsertModeChanges,D=Pe.keyName?Pe.keyName(m):m.key;D&&(D.indexOf("Delete")!=-1||D.indexOf("Backspace")!=-1)&&(k.maybeReset&&(k.changes=[],k.maybeReset=!1),k.changes.push(new Xi(D,m)))}function ia(m,$,k,D){function W(){Y?On.processAction(m,$,$.lastEditActionCommand):On.evalInput(m,$)}function z(se){if(q.lastInsertModeChanges.changes.length>0){se=$.lastEditActionCommand?se:1;var ye=q.lastInsertModeChanges;zo(m,ye.changes,se)}}var q=Be.macroModeState;q.isPlaying=!0;var Y=!!$.lastEditActionCommand,Q=$.inputState;if($.inputState=$.lastEditInputState,Y&&$.lastEditActionCommand.interlaceInsertRepeat)for(var re=0;re<k;re++)W(),z(1);else D||W(),z(k);$.inputState=Q,$.insertMode&&!D&&Hr(m),q.isPlaying=!1}function Bo(m,$){Pe.lookupKey($,"vim-insert",function(k){return typeof k=="string"?Pe.commands[k](m):k(m),!0})}function zo(m,$,k){var D=m.getCursor("head"),W=Be.macroModeState.lastInsertModeChanges.visualBlock;W&&(Yn(m,D,W+1),k=m.listSelections().length,m.setCursor(D));for(var z=0;z<k;z++){W&&m.setCursor(fe(D,z,0));for(var q=0;q<$.length;q++){var Y=$[q];if(Y instanceof Xi)Bo(m,Y.keyName);else if(typeof Y=="string")m.replaceSelection(Y);else{var Q=m.getCursor(),re=fe(Q,0,Y[0].length-(Y[1]||0));m.replaceRange(Y[0],Q,Y[1]?Q:re),m.setCursor(re)}}}W&&m.setCursor(fe(D,0,1))}function Cs(m,$,k,D){$.length>1&&$[0]=="n"&&($=$.replace("numpad","")),$=Ar[$]||$;var W="";if(k.ctrlKey&&(W+="C-"),k.altKey&&(W+="A-"),(W||$.length>1)&&k.shiftKey&&(W+="S-"),D&&!D.expectLiteralNext&&$.length==1){if(Hn.keymap&&$ in Hn.keymap)(Hn.remapCtrl!==!1||!W)&&($=Hn.keymap[$]);else if($.charCodeAt(0)>255){var z=k.code&&k.code.slice(-1)||"";k.shiftKey||(z=z.toLowerCase()),z&&($=z)}}return W+=$,W.length>1&&(W="<"+W+">"),W}function jo(m){var $=new m.constructor;return Object.keys(m).forEach(function(k){if(k!="insertEnd"){var D=m[k];Array.isArray(D)?D=D.slice():D&&typeof D=="object"&&D.constructor!=Object&&(D=jo(D)),$[k]=D}}),m.sel&&($.sel={head:m.sel.head&&qe(m.sel.head),anchor:m.sel.anchor&&qe(m.sel.anchor)}),$}function co(m,$,k){var D=!1,W=wt.maybeInitVimState_(m),z=W.visualBlock||W.wasInVisualBlock,q=m.ace.inMultiSelectMode;if(W.wasInVisualBlock&&!q?W.wasInVisualBlock=!1:q&&W.visualBlock&&(W.wasInVisualBlock=!0),$=="<Esc>"&&!W.insertMode&&!W.visualMode&&q)m.ace.exitMultiSelectMode();else if(z||!q||m.ace.inVirtualSelectionMode)D=wt.handleKey(m,$,k);else{var Y=jo(W),Q=W.inputState.changeQueueList||[];m.operation(function(){m.curOp.isVimOp=!0;var re=0;m.ace.forEachSelection(function(){var se=m.ace.selection;m.state.vim.lastHPos=se.$desiredColumn==null?se.lead.column:se.$desiredColumn,m.state.vim.inputState.changeQueue=Q[re];var ye=m.getCursor("head"),Ce=m.getCursor("anchor"),me=tt(ye,Ce)?0:-1,we=tt(ye,Ce)?-1:0;ye=fe(ye,0,me),Ce=fe(Ce,0,we),m.state.vim.sel.head=ye,m.state.vim.sel.anchor=Ce,D=ri(m,$,k),se.$desiredColumn=m.state.vim.lastHPos==-1?null:m.state.vim.lastHPos,m.ace.inVirtualSelectionMode&&(Q[re]=m.state.vim.inputState.changeQueue),m.virtualSelectionMode()&&(m.state.vim=jo(Y)),re++}),m.curOp.cursorActivity&&!D&&(m.curOp.cursorActivity=!1),W.status=m.state.vim.status,m.state.vim=W,W.inputState.changeQueueList=Q,W.inputState.changeQueue=null},!0)}return D&&!W.visualMode&&!W.insert&&W.visualMode!=m.somethingSelected()&&Wo(m,W,!0),D}function mi(m,$){$.off("beforeEndOperation",mi);var k=$.state.cm.vimCmd;k&&$.execCommand(k.exec?k:k.name,k.args),$.curOp=$.prevOp}var ir=e("../range").Range,Qi=e("../lib/event_emitter").EventEmitter,Pi=e("../lib/dom"),oa=e("../lib/oop"),Va=e("../lib/keys"),uo=e("../lib/event"),Wi=e("../search").Search,ho=e("../lib/useragent"),Ho=e("../search_highlight").SearchHighlight,po=e("../commands/multi_select_commands"),sa=e("../mode/text").Mode.prototype.tokenRe,Zi=e("../ext/hardwrap").hardWrap;e("../multi_select");var Pe=function(m){this.ace=m,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)};Pe.Pos=function(m,$){if(!(this instanceof Ne))return new Ne(m,$);this.line=m,this.ch=$},Pe.defineOption=function(m,$,k){},Pe.commands={redo:function(m){m.ace.redo()},undo:function(m){m.ace.undo()},newlineAndIndent:function(m){m.ace.insert(`
1405
+ `)},goLineLeft:function(m){m.ace.selection.moveCursorLineStart()},goLineRight:function(m){m.ace.selection.moveCursorLineEnd()}},Pe.keyMap={},Pe.addClass=Pe.rmClass=function(){},Pe.e_stop=Pe.e_preventDefault=uo.stopEvent,Pe.keyName=function(m){var $=Va[m.keyCode]||m.key||"";return $.length==1&&($=$.toUpperCase()),$=uo.getModifierString(m).replace(/(^|-)\w/g,function(k){return k.toUpperCase()})+$,$},Pe.keyMap.default=function(m){return function($){var k=$.ace.commands.commandKeyBinding[m.toLowerCase()];return k&&$.ace.execCommand(k)!==!1}},Pe.lookupKey=function m($,k,D){k||(k="default"),typeof k=="string"&&(k=Pe.keyMap[k]||Pe.keyMap.default);var W=typeof k=="function"?k($):k[$];if(W===!1)return"nothing";if(W==="...")return"multi";if(W!=null&&D(W))return"handled";if(k.fallthrough){if(!Array.isArray(k.fallthrough))return m($,k.fallthrough,D);for(var z=0;z<k.fallthrough.length;z++){var q=m($,k.fallthrough[z],D);if(q)return q}}},Pe.findMatchingTag=function(m,$){return m.findMatchingTag($)},Pe.findEnclosingTag=function(m,$){},Pe.signal=function(m,$,k){return m._signal($,k)},Pe.on=uo.addListener,Pe.off=uo.removeListener,Pe.isWordChar=function(m){return m<""?/^\w$/.test(m):(sa.lastIndex=0,sa.test(m))},(function(){oa.implement(Pe.prototype,Qi),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(k){this.$lineHandleChanges&&this.$lineHandleChanges.push(k);var D={text:k.action[0]=="i"?k.lines:[]},W=this.curOp=this.curOp||{};W.changeHandlers||(W.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),W.lastChange?W.lastChange.next=W.lastChange=D:W.lastChange=W.change=D,this.$updateMarkers(k)},this.onSelectionChange=function(){var k=this.curOp=this.curOp||{};k.cursorActivityHandlers||(k.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(po.keyboardHandler)},this.operation=function(k,D){if(!D&&this.curOp||D&&this.curOp&&this.curOp.force)return k();if((D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var W=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var z=this.curOp=this.curOp||{};this.curOp.force=D;var q=k();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&&W&&(this.ace.prevOp=W)),(D||!this.ace.curOp)&&this.curOp&&this.onBeforeEndOperation(),q},this.onBeforeEndOperation=function(){var k=this.curOp;k&&(k.change&&this.signal("change",k.change,k),k&&k.cursorActivity&&this.signal("cursorActivity",null,k),this.curOp=null)},this.signal=function(k,D,W){var z=W?W[k+"Handlers"]:(this._eventRegistry||{})[k];if(z){z=z.slice();for(var q=0;q<z.length;q++)z[q](this,D)}},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(k,D){typeof k=="object"&&(D=k.ch,k=k.line);var W=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:k,column:D}),this.ace.selection.moveTo(k,D),W&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(k){var D=this.ace.selection,W=k=="anchor"?D.isEmpty()?D.lead:D.anchor:k=="head"||!k?D.lead:D.getRange()[k];return y(W)},this.listSelections=function(k){var D=this.ace.multiSelect.rangeList.ranges;return!D.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:D.map(function(W){return{anchor:this.clipPos(y(W.cursor==W.end?W.start:W.end)),head:this.clipPos(y(W.cursor))}},this)},this.setSelections=function(k,D){var W=this.ace.multiSelect,z=k.map(function(re){var se=f(re.anchor),ye=f(re.head),Ce=ir.comparePoints(se,ye)<0?new ir.fromPoints(se,ye):new ir.fromPoints(ye,se);return Ce.cursor=ir.comparePoints(Ce.start,ye)?Ce.end:Ce.start,Ce});if(this.ace.inVirtualSelectionMode){this.ace.selection.fromOrientedRange(z[0]);return}D?z[D]&&z.push(z.splice(D,1)[0]):z=z.reverse(),W.toSingleRange(z[0].clone());for(var q=this.ace.session,Y=0;Y<z.length;Y++){var Q=q.$clipRangeToDocument(z[Y]);W.addRange(Q)}},this.setSelection=function(k,D,W){var z=this.ace.selection;z.moveTo(k.line,k.ch),z.selectTo(D.line,D.ch),W&&W.origin=="*mouse"&&this.onBeforeEndOperation()},this.somethingSelected=function(k){return!this.ace.selection.isEmpty()},this.clipPos=function(k){var D=this.ace.session.$clipPositionToDocument(k.line,k.ch);return y(D)},this.foldCode=function(k){this.ace.session.$toggleFoldWidget(k.line,{})},this.markText=function(k){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(k){var D=k.action=="insert",W=k.start,z=k.end,q=(z.row-W.row)*(D?1:-1),Y=(z.column-W.column)*(D?1:-1);D&&(z=W);for(var Q in this.marks){var re=this.marks[Q],se=ir.comparePoints(re,W);if(!(se<0)){if(se===0&&D)if(!re.$insertRight)se=1;else{if(re.bias!=1){re.bias=-1;continue}se=1}var ye=D?se:ir.comparePoints(re,z);if(ye>0){re.row+=q,re.column+=re.row==z.row?Y:0;continue}!D&&ye<=0&&(re.row=W.row,re.column=W.column,ye===0&&(re.bias=1))}}};var m=function(k,D,W,z){this.cm=k,this.id=D,this.row=W,this.column=z,k.marks[this.id]=this};m.prototype.clear=function(){delete this.cm.marks[this.id]},m.prototype.find=function(){return y(this)},this.setBookmark=function(k,D){var W=new m(this,this.$uid++,k.line,k.ch);return(!D||!D.insertLeft)&&(W.$insertRight=!0),this.marks[W.id]=W,W},this.moveH=function(k,D){if(D=="char"){var W=this.ace.selection;W.clearSelection(),W.moveCursorBy(0,k)}},this.findPosV=function(k,D,W,z){if(W=="page"){var q=this.ace.renderer,Y=q.layerConfig;D*=Math.floor(Y.height/Y.lineHeight),W="line"}if(W=="line"){var Q=this.ace.session.documentToScreenPosition(k.line,k.ch);z!=null&&(Q.column=z),Q.row+=D,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 y(re)}debugger},this.charCoords=function(k,D){if(D=="div"||!D){var W=this.ace.session.documentToScreenPosition(k.line,k.ch);return{left:W.column,top:W.row}}if(D=="local"){var z=this.ace.renderer,W=this.ace.session.documentToScreenPosition(k.line,k.ch),q=z.layerConfig.lineHeight,Y=z.layerConfig.characterWidth,Q=q*W.row;return{left:W.column*Y,top:Q,bottom:Q+q}}},this.coordsChar=function(k,D){var W=this.ace.renderer;if(D=="local"){var z=Math.max(0,Math.floor(k.top/W.lineHeight)),q=Math.max(0,Math.floor(k.left/W.characterWidth)),Y=W.session.screenToDocumentPosition(z,q);return y(Y)}if(D=="div")throw"not implemented"},this.getSearchCursor=function(k,D,W){var z=!1,q=!1;k instanceof RegExp&&!k.global&&(z=!k.ignoreCase,k=k.source,q=!0),k=="\\n"&&(k=`
1406
+ `,q=!1);var Y=new Wi;D.ch==null&&(D.ch=Number.MAX_VALUE);var Q={row:D.line,column:D.ch},re=this,se=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(ye){Y.setOptions({needle:k,caseSensitive:z,wrap:!1,backwards:ye,regExp:q,start:se||Q});var Ce=Y.find(re.ace.session);return se=Ce,se&&[!se.isEmpty()]},from:function(){return se&&y(se.start)},to:function(){return se&&y(se.end)},replace:function(ye){se&&(se.end=re.ace.session.doc.replace(se,ye))}}},this.scrollTo=function(k,D){var W=this.ace.renderer,z=W.layerConfig,q=z.maxHeight;q-=(W.$size.scrollerHeight-W.lineHeight)*W.$scrollPastEnd,D!=null&&this.ace.session.setScrollTop(Math.max(0,Math.min(D,q))),k!=null&&this.ace.session.setScrollLeft(Math.max(0,Math.min(k,z.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(k,D){if(k){var W=this.ace.renderer,z={top:0,bottom:D};W.scrollCursorIntoView(f(k),W.lineHeight*2/W.$size.scrollerHeight,z)}},this.getLine=function(k){return this.ace.session.getLine(k)},this.getRange=function(k,D){return this.ace.session.getTextRange(new ir(k.line,k.ch,D.line,D.ch))},this.replaceRange=function(k,D,W){W||(W=D);var z=new ir(D.line,D.ch,W.line,W.ch);return this.ace.session.$clipRangeToDocument(z),this.ace.session.replace(z,k)},this.replaceSelection=this.replaceSelections=function(k){var D=Array.isArray(k)&&k,W=this.ace.selection;if(this.ace.inVirtualSelectionMode){this.ace.session.replace(W.getRange(),D?k[0]||"":k);return}W.inVirtualSelectionMode=!0;var z=W.rangeList.ranges;z.length||(z=[this.ace.multiSelect.getRange()]);for(var q=z.length;q--;)this.ace.session.replace(z[q],D?k[q]||"":k);W.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(k){return this.getRange(k.anchor,k.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var $={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(k,D){switch(this.state[k]=D,k){case"indentWithTabs":k=$[k],D=!D;break;case"keyMap":this.state.$keyMap=D;return;default:k=$[k]}k&&this.ace.setOption(k,D)},this.getOption=function(k){var D,W=$[k];switch(W&&(D=this.ace.getOption(W)),k){case"indentWithTabs":return k=$[k],!D;case"keyMap":return this.state.$keyMap||"vim"}return W?D:this.state[k]},this.toggleOverwrite=function(k){return this.state.overwrite=k,this.ace.setOverwrite(k)},this.addOverlay=function(k){if(!this.$searchHighlight||!this.$searchHighlight.session){var D=new Ho(null,"ace_highlight-marker","text"),W=this.ace.session.addDynamicMarker(D);D.id=W.id,D.session=this.ace.session,D.destroy=function(q){D.session.off("change",D.updateOnChange),D.session.off("changeEditor",D.destroy),D.session.removeMarker(D.id),D.session=null},D.updateOnChange=function(q){var Y=q.start.row;Y==q.end.row?D.cache[Y]=void 0:D.cache.splice(Y,D.cache.length)},D.session.on("changeEditor",D.destroy),D.session.on("change",D.updateOnChange)}var z=new RegExp(k.query.source,"gmi");this.$searchHighlight=k.highlight=D,this.$searchHighlight.setRegexp(z),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(k){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var k=this.ace.renderer,D=k.layerConfig;return{left:k.scrollLeft,top:k.scrollTop,height:D.maxHeight,width:D.width,clientHeight:D.height,clientWidth:D.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(k){return this.ace.setValue(k,-1)},this.getTokenTypeAt=function(k){var D=this.ace.session.getTokenAt(k.line,k.ch);return D&&/comment|string/.test(D.type)?"string":""},this.findMatchingBracket=function(k){var D=this.ace.session.findMatchingBracket(f(k));return{to:D&&y(D)}},this.findMatchingTag=function(k){var D=this.ace.session.getMatchingTags(f(k));if(D)return{open:{from:y(D.openTag.start),to:y(D.openTag.end)},close:{from:y(D.closeTag.start),to:y(D.closeTag.end)}}},this.indentLine=function(k,D){D===!0?this.ace.session.indentRows(k,k," "):D===!1&&this.ace.session.outdentRows(new ir(k,0,k,0))},this.indexFromPos=function(k){return this.ace.session.doc.positionToIndex(f(k))},this.posFromIndex=function(k){return y(this.ace.session.doc.indexToPosition(k))},this.focus=function(k){return this.ace.textInput.focus()},this.blur=function(k){return this.ace.blur()},this.defaultTextHeight=function(k){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(k,D,W,z){var q=z.bracketRegex.source,Y=/paren|text|operator|tag/;if(D==1)var Q=this.ace.session.$findClosingBracket(q.slice(1,2),f(k),Y);else{var Q=this.ace.session.$findOpeningBracket(q.slice(-2,-1),{row:k.line,column:k.ch+1},Y);!Q&&z.bracketRegex&&z.bracketRegex.test(this.getLine(k.line)[k.ch-1])&&(Q={row:k.line,column:k.ch-1})}return Q&&{pos:y(Q)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(k){if(Pe.commands.hasOwnProperty(k))return Pe.commands[k](this);if(k=="indentAuto")return this.ace.execCommand("autoindent");console.log(k+" is not implemented")},this.getLineNumber=function(k){var D=this.$lineHandleChanges;if(!D)return null;for(var W=k.row,z=0;z<D.length;z++){var q=D[z];if(q.start.row!=q.end.row){if(q.action[0]=="i")q.start.row<W&&(W+=q.end.row-q.start.row);else if(q.start.row<W){if(W<q.end.row||W==q.end.row&&q.start.column>0)return null;W-=q.end.row-q.start.row}}}return W},this.getLineHandle=function(k){return this.$lineHandleChanges||(this.$lineHandleChanges=[]),{text:this.ace.session.getLine(k),row:k}},this.releaseLineHandles=function(){this.$lineHandleChanges=void 0},this.getLastEditEnd=function(){var k=this.ace.session.$undoManager;if(k&&k.$lastDelta)return y(k.$lastDelta.end)}}).call(Pe.prototype);var aa=Pe.StringStream=function(m,$){this.pos=this.start=0,this.string=m,this.tabSize=$||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};aa.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(m){var $=this.string.charAt(this.pos);if(typeof m=="string")var k=$==m;else var k=$&&(m.test?m.test($):m($));if(k)return++this.pos,$},eatWhile:function(m){for(var $=this.pos;this.eat(m););return this.pos>$},eatSpace:function(){for(var m=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>m},skipToEnd:function(){this.pos=this.string.length},skipTo:function(m){var $=this.string.indexOf(m,this.pos);if($>-1)return this.pos=$,!0},backUp:function(m){this.pos-=m},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(m,$,k){if(typeof m!="string"){var D=this.string.slice(this.pos).match(m);return D&&D.index>0?null:(D&&$!==!1&&(this.pos+=D[0].length),D)}var W=function(q){return k?q.toLowerCase():q},z=this.string.substr(this.pos,m.length);if(W(z)==W(m))return $!==!1&&(this.pos+=m.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(m,$){this.lineStart+=m;try{return $()}finally{this.lineStart-=m}}},Pe.defineExtension=function(m,$){Pe.prototype[m]=$},Pi.importCssString(`.normal-mode .ace_cursor{
1407
1407
  border: none;
1408
1408
  background-color: rgba(255,0,0,0.5);
1409
1409
  }
@@ -1436,38 +1436,38 @@ System.register(["vue","vue-router","single-spa","vuex","vuetify"],function(Tr,i
1436
1436
  width: 20em;
1437
1437
  color: inherit;
1438
1438
  font-family: monospace;
1439
- }`,"vimMode",!1),function(){function m(k,D,W){var z=k.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function $(k,D){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=D}Pe.defineExtension("openDialog",function(k,D,W){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var q=m(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Pe.on(re,"input",function(ye){W.onInput(ye,re.value,z)}),W.onKeyUp&&Pe.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,z)}),Pe.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&D(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Pe.e_stop(ye),z()))}),W.closeOnBlur!==!1&&Pe.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Pe.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Pe.on(se,"blur",z),se.focus()),z}}),Pe.defineExtension("openNotification",function(k,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){$(this,W);var z=m(this,k,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Pe.on(z,"click",function(re){Pe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Pe.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"}],go=An.length,ei=[{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"}],jn=O(""),la=/[\d]/,fo=[Pe.isWordChar,function(m){return m&&!Pe.isWordChar(m)&&!/\s/.test(m)}],vi=[function(m){return/\S/.test(m)}],Ji=["<",">"],Jt=["-",'"',".",":","_","/","+"],Yt=/^\w$/,en;try{en=new RegExp("^[\\p{Lu}]$","u")}catch{en=/^[A-Z]$/}var jt={};I("filetype",void 0,"string",["ft"],function(m,$){if($!==void 0){if(m===void 0){var k=$.getOption("mode");return k=="null"?"":k}var k=m==""?"null":m;$.setOption("mode",k)}}),I("textwidth",80,"number",["tw"],function(m,$){if($!==void 0){if(m===void 0){var k=$.getOption("textwidth");return k}var D=Math.round(m);D>1&&$.setOption("textwidth",D)}});var yi=function(){function m(Q,re,se){function ye(Oe){var Le=++W%D,Ue=Y[Le];Ue&&Ue.clear(),Y[Le]=Q.setBookmark(Oe)}var Ce=W%D,me=Y[Ce];if(me){var we=me.find();we&&!ut(we,re)&&ye(re)}else ye(re);ye(se),z=W,q=W-D+1,q<0&&(q=0)}function $(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(D+W)%D],se&&(Ce=se.find())&&!ut(me,Ce))break;while(W<z&&W>q)}return se}function k(Q,re){var se=W,ye=$(Q,re);return W=se,ye&&ye.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:m,find:k,move:$}},Rn=function(m){return m?{changes:m.changes,expectCursorActivityForChange:m.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var m=Be.macroModeState;m.onRecordingDone&&m.onRecordingDone(),m.onRecordingDone=void 0,m.isRecording=!1},enterMacroRecordMode:function(m,$){var k=Be.registerController.getRegister($);if(k){if(k.clear(),this.latestRegister=$,m.openDialog){var D=Jr("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=m.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var Be,gn,wt={enterVimMode:h,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return Be.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return Be},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Xi,map:function(m,$,k){fr.map(m,$,k)},unmap:function(m,$){return fr.unmap(m,$)},noremap:function(m,$,k){fr.map(m,$,k,!0)},mapclear:function(m){var $=An.length,k=go,D=An.slice(0,$-k);if(An=An.slice($-k),m)for(var W=D.length-1;W>=0;W--){var z=D[W];if(m!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==m){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:S,defineOption:I,defineEx:function(m,$,k){if(!$)$=m;else if(m.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+m+'", command not registered');ks[m]=k,fr.commandMap_[$]={name:m,shortName:$,type:"api"}},handleKey:function(m,$,k){var D=this.findKey(m,$,k);if(typeof D=="function")return D()},multiSelectHandleKey:co,findKey:function(m,$,k){function D(){var re=Be.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),A(m),!0;k!="mapping"&&Fo(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)xt(m);else{if(!Y.insertMode)return;Hr(m)}return A(m),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=Ln.matchCommand(re,An,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return A(m),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),gn&&window.clearTimeout(gn),gn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(m)},S("insertModeEscKeysTimeout")),se){var me=m.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=$;for(var we=0;we<me.length;we++){var Oe=ht(me[we].anchor,me[we].head),Le=Zt(me[we].anchor,me[we].head),Ue=m.getRange(Oe,m.state.overwrite?fe(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+Ue}}return!se}if(Y.expectLiteralNext=!1,gn&&window.clearTimeout(gn),ye.command&&Ce){for(var me=m.listSelections(),we=0;we<me.length;we++){var st=me[we].head;m.replaceRange(Ce.removed[we]||"",fe(st,0,-Ce.inserted.length),st,"+input")}Be.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||A(m),ye.command}function q(){if(D()||W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return A(m),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=Ln.matchCommand(Ce,An,Y.inputState,ye);return me.type=="none"?(A(m),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(A(m),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=R(m),Q;return Y.insertMode?Q=z():Q=q(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&m.getOption("readOnly")))return m.operation(function(){m.curOp.isVimOp=!0;try{Q.type=="keyToKey"?E(m,Q.toKeys,Q):Ln.processCommand(m,Y,Q)}catch(re){throw m.state.vim=void 0,R(m),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(m,$){fr.processCommand(m,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:ys,_mapCommand:Do,defineRegister:U,exitVisualMode:xt,exitInsertMode:Hr},Ir=[],sn=!1,vn,Yn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Rr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},wi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Yn)).forEach(function(m){wi[(Yn[m]||"").toLowerCase()]=wi[m.toLowerCase()]=m}),I("langmap",void 0,"string",["lmap"],function(m,$){if(m===void 0)return jn.string;P(m)}),_.prototype.pushRepeatDigit=function(m){this.operator?this.motionRepeat=this.motionRepeat.concat(m):this.prefixRepeat=this.prefixRepeat.concat(m)},_.prototype.getRepeat=function(){var m=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(m=1,this.prefixRepeat.length>0&&(m*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(m*=parseInt(this.motionRepeat.join(""),10))),m},B.prototype={setText:function(m,$,k){this.keyBuffer=[m||""],this.linewise=!!$,this.blockwise=!!k},pushText:function(m,$){$&&(this.linewise||this.keyBuffer.push(`
1440
- `),this.linewise=!0),this.keyBuffer.push(m)},pushInsertModeChanges:function(m){this.insertModeChanges.push(Rn(m))},pushSearchQuery:function(m){this.searchQueries.push(m)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(m,$,k,D,W){if(m!=="_"){D&&k.charAt(k.length-1)!==`
1439
+ }`,"vimMode",!1),function(){function m(k,D,W){var z=k.ace.container,q;return q=z.appendChild(document.createElement("div")),W?q.className="ace_dialog ace_dialog-bottom":q.className="ace_dialog ace_dialog-top",typeof D=="string"?q.innerHTML=D:q.appendChild(D),q}function $(k,D){k.state.currentNotificationClose&&k.state.currentNotificationClose(),k.state.currentNotificationClose=D}Pe.defineExtension("openDialog",function(k,D,W){function z(ye){if(typeof ye=="string")re.value=ye;else{if(Y||ye&&ye.type=="blur"&&document.activeElement===re)return;Q.state.dialog==q&&(Q.state.dialog=null,Q.focus()),Y=!0,q.remove(),W.onClose&&W.onClose(q);var Ce=Q;Ce.state.vim&&(Ce.state.vim.status=null,Ce.ace._signal("changeStatus"),Ce.ace.renderer.$loop.schedule(Ce.ace.renderer.CHANGE_CURSOR))}}if(!this.virtualSelectionMode()){W||(W={}),$(this,null);var q=m(this,k,W.bottom),Y=!1,Q=this;this.state.dialog=q;var re=q.getElementsByTagName("input")[0],se;return re?(W.value&&(re.value=W.value,W.selectValueOnOpen!==!1&&re.select()),W.onInput&&Pe.on(re,"input",function(ye){W.onInput(ye,re.value,z)}),W.onKeyUp&&Pe.on(re,"keyup",function(ye){W.onKeyUp(ye,re.value,z)}),Pe.on(re,"keydown",function(ye){W&&W.onKeyDown&&W.onKeyDown(ye,re.value,z)||(ye.keyCode==13&&D(re.value),(ye.keyCode==27||W.closeOnEnter!==!1&&ye.keyCode==13)&&(Pe.e_stop(ye),z()))}),W.closeOnBlur!==!1&&Pe.on(re,"blur",z),re.focus()):(se=q.getElementsByTagName("button")[0])&&(Pe.on(se,"click",function(){z(),Q.focus()}),W.closeOnBlur!==!1&&Pe.on(se,"blur",z),se.focus()),z}}),Pe.defineExtension("openNotification",function(k,D){function W(){q||(q=!0,clearTimeout(Y),z.remove())}if(!this.virtualSelectionMode()){$(this,W);var z=m(this,k,D&&D.bottom),q=!1,Y,Q=D&&typeof D.duration<"u"?D.duration:5e3;return Pe.on(z,"click",function(re){Pe.e_preventDefault(re),W()}),Q&&(Y=setTimeout(W,Q)),W}})}();var Ne=Pe.Pos,_n=[{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"}],go=_n.length,ei=[{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"}],Hn=O(""),la=/[\d]/,fo=[Pe.isWordChar,function(m){return m&&!Pe.isWordChar(m)&&!/\s/.test(m)}],vi=[function(m){return/\S/.test(m)}],Ji=["<",">"],Jt=["-",'"',".",":","_","/","+"],Yt=/^\w$/,en;try{en=new RegExp("^[\\p{Lu}]$","u")}catch{en=/^[A-Z]$/}var jt={};I("filetype",void 0,"string",["ft"],function(m,$){if($!==void 0){if(m===void 0){var k=$.getOption("mode");return k=="null"?"":k}var k=m==""?"null":m;$.setOption("mode",k)}}),I("textwidth",80,"number",["tw"],function(m,$){if($!==void 0){if(m===void 0){var k=$.getOption("textwidth");return k}var D=Math.round(m);D>1&&$.setOption("textwidth",D)}});var yi=function(){function m(Q,re,se){function ye(Oe){var Le=++W%D,Ue=Y[Le];Ue&&Ue.clear(),Y[Le]=Q.setBookmark(Oe)}var Ce=W%D,me=Y[Ce];if(me){var we=me.find();we&&!ut(we,re)&&ye(re)}else ye(re);ye(se),z=W,q=W-D+1,q<0&&(q=0)}function $(Q,re){W+=re,W>z?W=z:W<q&&(W=q);var se=Y[(D+W)%D];if(se&&!se.find()){var ye=re>0?1:-1,Ce,me=Q.getCursor();do if(W+=ye,se=Y[(D+W)%D],se&&(Ce=se.find())&&!ut(me,Ce))break;while(W<z&&W>q)}return se}function k(Q,re){var se=W,ye=$(Q,re);return W=se,ye&&ye.find()}var D=100,W=-1,z=0,q=0,Y=new Array(D);return{cachedCursor:void 0,add:m,find:k,move:$}},Ln=function(m){return m?{changes:m.changes,expectCursorActivityForChange:m.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var m=Be.macroModeState;m.onRecordingDone&&m.onRecordingDone(),m.onRecordingDone=void 0,m.isRecording=!1},enterMacroRecordMode:function(m,$){var k=Be.registerController.getRegister($);if(k){if(k.clear(),this.latestRegister=$,m.openDialog){var D=Jr("span",{class:"cm-vim-message"},"recording @"+$);this.onRecordingDone=m.openDialog(D,null,{bottom:!0})}this.isRecording=!0}}};var Be,fn,wt={enterVimMode:h,leaveVimMode:p,buildKeyMap:function(){},getRegisterController:function(){return Be.registerController},resetVimGlobalState_:L,getVimGlobalState_:function(){return Be},maybeInitVimState_:R,suppressErrorLogging:!1,InsertModeKey:Xi,map:function(m,$,k){fr.map(m,$,k)},unmap:function(m,$){return fr.unmap(m,$)},noremap:function(m,$,k){fr.map(m,$,k,!0)},mapclear:function(m){var $=_n.length,k=go,D=_n.slice(0,$-k);if(_n=_n.slice($-k),m)for(var W=D.length-1;W>=0;W--){var z=D[W];if(m!==z.context)if(z.context)this._mapCommand(z);else{var q=["normal","insert","visual"];for(var Y in q)if(q[Y]!==m){var Q={};for(var re in z)Q[re]=z[re];Q.context=q[Y],this._mapCommand(Q)}}}},langmap:P,vimKeyFromEvent:H,setOption:T,getOption:S,defineOption:I,defineEx:function(m,$,k){if(!$)$=m;else if(m.indexOf($)!==0)throw new Error('(Vim.defineEx) "'+$+'" is not a prefix of "'+m+'", command not registered');ks[m]=k,fr.commandMap_[$]={name:m,shortName:$,type:"api"}},handleKey:function(m,$,k){var D=this.findKey(m,$,k);if(typeof D=="function")return D()},multiSelectHandleKey:co,findKey:function(m,$,k){function D(){var re=Be.macroModeState;if(re.isRecording){if($=="q")return re.exitMacroRecordMode(),A(m),!0;k!="mapping"&&Fo(re,$)}}function W(){if($=="<Esc>"){if(Y.visualMode)xt(m);else{if(!Y.insertMode)return;Hr(m)}return A(m),!0}}function z(){if(W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join(""),se=$.length==1,ye=On.matchCommand(re,_n,Y.inputState,"insert"),Ce=Y.inputState.changeQueue;if(ye.type=="none")return A(m),!1;if(ye.type=="partial"){if(ye.expectLiteralNext&&(Y.expectLiteralNext=!0),fn&&window.clearTimeout(fn),fn=se&&window.setTimeout(function(){Y.insertMode&&Y.inputState.keyBuffer.length&&A(m)},S("insertModeEscKeysTimeout")),se){var me=m.listSelections();(!Ce||Ce.removed.length!=me.length)&&(Ce=Y.inputState.changeQueue=new N),Ce.inserted+=$;for(var we=0;we<me.length;we++){var Oe=ht(me[we].anchor,me[we].head),Le=Zt(me[we].anchor,me[we].head),Ue=m.getRange(Oe,m.state.overwrite?fe(Le,0,1):Le);Ce.removed[we]=(Ce.removed[we]||"")+Ue}}return!se}if(Y.expectLiteralNext=!1,fn&&window.clearTimeout(fn),ye.command&&Ce){for(var me=m.listSelections(),we=0;we<me.length;we++){var st=me[we].head;m.replaceRange(Ce.removed[we]||"",fe(st,0,-Ce.inserted.length),st,"+input")}Be.macroModeState.lastInsertModeChanges.changes.pop()}return ye.command||A(m),ye.command}function q(){if(D()||W())return!0;Y.inputState.keyBuffer.push($);var re=Y.inputState.keyBuffer.join("");if(/^[1-9]\d*$/.test(re))return!0;var se=/^(\d*)(.*)$/.exec(re);if(!se)return A(m),!1;var ye=Y.visualMode?"visual":"normal",Ce=se[2]||se[1];Y.inputState.operatorShortcut&&Y.inputState.operatorShortcut.slice(-1)==Ce&&(Ce=Y.inputState.operatorShortcut);var me=On.matchCommand(Ce,_n,Y.inputState,ye);return me.type=="none"?(A(m),!1):me.type=="partial"?(me.expectLiteralNext&&(Y.expectLiteralNext=!0),!0):me.type=="clear"?(A(m),!0):(Y.expectLiteralNext=!1,Y.inputState.keyBuffer.length=0,se=/^(\d*)(.*)$/.exec(re),se[1]&&se[1]!="0"&&Y.inputState.pushRepeatDigit(se[1]),me.command)}var Y=R(m),Q;return Y.insertMode?Q=z():Q=q(),Q===!1?!Y.insertMode&&$.length===1?function(){return!0}:void 0:Q===!0?function(){return!0}:function(){if(!((Q.operator||Q.isEdit)&&m.getOption("readOnly")))return m.operation(function(){m.curOp.isVimOp=!0;try{Q.type=="keyToKey"?E(m,Q.toKeys,Q):On.processCommand(m,Y,Q)}catch(re){throw m.state.vim=void 0,R(m),wt.suppressErrorLogging||console.log(re),re}return!0})}},handleEx:function(m,$){fr.processCommand(m,$)},defineMotion:te,defineAction:ae,defineOperator:ne,mapCommand:ys,_mapCommand:Do,defineRegister:U,exitVisualMode:xt,exitInsertMode:Hr},Ir=[],sn=!1,yn,Xn={Return:"CR",Backspace:"BS",Delete:"Del",Escape:"Esc",Insert:"Ins",ArrowLeft:"Left",ArrowRight:"Right",ArrowUp:"Up",ArrowDown:"Down",Enter:"CR"," ":"Space"},Rr={Shift:1,Alt:1,Command:1,Control:1,CapsLock:1,AltGraph:1,Dead:1,Unidentified:1},wi={};"Left|Right|Up|Down|End|Home".split("|").concat(Object.keys(Xn)).forEach(function(m){wi[(Xn[m]||"").toLowerCase()]=wi[m.toLowerCase()]=m}),I("langmap",void 0,"string",["lmap"],function(m,$){if(m===void 0)return Hn.string;P(m)}),_.prototype.pushRepeatDigit=function(m){this.operator?this.motionRepeat=this.motionRepeat.concat(m):this.prefixRepeat=this.prefixRepeat.concat(m)},_.prototype.getRepeat=function(){var m=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(m=1,this.prefixRepeat.length>0&&(m*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(m*=parseInt(this.motionRepeat.join(""),10))),m},B.prototype={setText:function(m,$,k){this.keyBuffer=[m||""],this.linewise=!!$,this.blockwise=!!k},pushText:function(m,$){$&&(this.linewise||this.keyBuffer.push(`
1440
+ `),this.linewise=!0),this.keyBuffer.push(m)},pushInsertModeChanges:function(m){this.insertModeChanges.push(Ln(m))},pushSearchQuery:function(m){this.searchQueries.push(m)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},K.prototype={pushText:function(m,$,k,D,W){if(m!=="_"){D&&k.charAt(k.length-1)!==`
1441
1441
  `&&(k+=`
1442
1442
  `);var z=this.isValidRegister(m)?this.getRegister(m):null;if(!z){switch($){case"yank":this.registers[0]=new B(k,D,W);break;case"delete":case"change":k.indexOf(`
1443
- `)==-1?this.registers["-"]=new B(k,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,D))}this.unnamedRegister.setText(k,D,W);return}var q=c(m);q?z.pushText(k,D):z.setText(k,D,W),m==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(m){return this.isValidRegister(m)?(m=m.toLowerCase(),this.registers[m]||(this.registers[m]=new B),this.registers[m]):this.unnamedRegister},isValidRegister:function(m){return m&&(b(m,Jt)||Yt.test(m))},shiftNumericRegisters_:function(){for(var m=9;m>=2;m--)this.registers[m]=this.getRegister(""+(m-1))}},Z.prototype={nextMatch:function(m,$){var k=this.historyBuffer,D=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=m);for(var W=this.iterator+D;$?W>=0:W<k.length;W+=D)for(var z=k[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return m},pushInput:function(m){var $=this.historyBuffer.indexOf(m);$>-1&&this.historyBuffer.splice($,1),m.length&&this.historyBuffer.push(m)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Ln={matchCommand:function(m,$,k,D){var W=$e(m,$,D,k);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ee(m);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(m,$,k){switch($.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(m,$,k);break;case"operator":this.processOperator(m,$,k);break;case"operatorMotion":this.processOperatorMotion(m,$,k);break;case"action":this.processAction(m,$,k);break;case"search":this.processSearch(m,$,k);break;case"ex":case"keyToEx":this.processEx(m,$,k);break}},processMotion:function(m,$,k){$.inputState.motion=k.motion,$.inputState.motionArgs=ce(k.motionArgs),this.evalInput(m,$)},processOperator:function(m,$,k){var D=$.inputState;if(D.operator){if(D.operator==k.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(m,$);return}A(m)}D.operator=k.operator,D.operatorArgs=ce(k.operatorArgs),k.keys.length>1&&(D.operatorShortcut=k.keys),k.exitVisualBlock&&($.visualBlock=!1,Ye(m)),$.visualMode&&this.evalInput(m,$)},processOperatorMotion:function(m,$,k){var D=$.visualMode,W=ce(k.operatorMotionArgs);W&&D&&W.visualLine&&($.visualLine=!0),this.processOperator(m,$,k),D||this.processMotion(m,$,k)},processAction:function(m,$,k){var D=$.inputState,W=D.getRepeat(),z=!!W,q=ce(k.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),k.operator&&this.processOperator(m,$,k),k.motion&&this.processMotion(m,$,k),(k.motion||k.operator)&&this.evalInput(m,$),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,A(m),$.lastMotion=null,k.isEdit&&this.recordLastEdit($,D,k),On[k.action](m,q,$)},processSearch:function(m,$,k){function D(Le,Ue,st){Be.searchHistoryController.pushInput(Le),Be.searchHistoryController.reset();try{pn(m,Le,Ue,st)}catch{zt(m,"Invalid regex: "+Le),A(m);return}Ln.processMotion(m,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){D(Le,!0,!0);var Ue=Be.macroModeState;Ue.isRecording&&bs(Ue,Le)}function z(Le,Ue,st){var Qe=H(Le),et,fn;Qe=="<Up>"||Qe=="<Down>"?(et=Qe=="<Up>",fn=Le.target?Le.target.selectionEnd:0,Ue=Be.searchHistoryController.nextMatch(Ue,et)||"",st(Ue),fn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(fn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Be.searchHistoryController.reset();var at;try{at=pn(m,Ue,!0,!0)}catch{}at?m.scrollIntoView(Sr(m,!Y,at),30):(Oo(m),m.scrollTo(ye.left,ye.top))}function q(Le,Ue,st){var Qe=H(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ue==""?(Be.searchHistoryController.pushInput(Ue),Be.searchHistoryController.reset(),pn(m,se),Oo(m),m.scrollTo(ye.left,ye.top),Pe.e_stop(Le),A(m),st(),m.focus()):Qe=="<Up>"||Qe=="<Down>"?Pe.e_stop(Le):Qe=="<C-u>"&&(Pe.e_stop(Le),st(""))}if(m.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;Sn(m).setReversed(!Y);var re=Y?"/":"?",se=Sn(m).getQuery(),ye=m.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=Be.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else kr(m,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var me=yt(m,{noSymbol:!0}),we=!0;if(me||(me=yt(m,{noSymbol:!1}),we=!1),!me){zt(m,"No word under cursor"),A(m);return}var Oe=m.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=dn(Oe),Be.jumpList.cachedCursor=m.getCursor(),m.setCursor(me.start),D(Oe,!0,!1)}}},processEx:function(m,$,k){function D(z){Be.exCommandHistoryController.pushInput(z),Be.exCommandHistoryController.reset(),fr.processCommand(m,z),m.state.vim&&A(m)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Be.exCommandHistoryController.pushInput(q),Be.exCommandHistoryController.reset(),Pe.e_stop(z),A(m),Y(),m.focus()),Q=="<Up>"||Q=="<Down>"?(Pe.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=Be.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Pe.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Be.exCommandHistoryController.reset()}k.type=="keyToEx"?fr.processCommand(m,k.exArgs.input):$.visualMode?kr(m,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):kr(m,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(m,$){var k=$.inputState,D=k.motion,W=k.motionArgs||{},z=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=$.sel,re=qe($.visualMode?ue(m,Q.head):m.getCursor("head")),se=qe($.visualMode?ue(m,Q.anchor):m.getCursor("anchor")),ye=qe(re),Ce=qe(se),me,we,Oe;if(z&&this.recordLastEdit($,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(m),D){var Le=Ur[D](m,re,W,$,k);if($.lastMotion=Ur[D],!Le)return;if(W.toJumplist){!z&&m.ace.curOp!=null&&(m.ace.curOp.command.scrollIntoView="center-animate");var Ue=Be.jumpList,st=Ue.cachedCursor;st?(br(m,st,Le),delete Ue.cachedCursor):br(m,re,Le)}Le instanceof Array?(we=Le[0],me=Le[1]):me=Le,me||(me=qe(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(m,me,ye)),we&&(we=ue(m,we)),we=we||Ce,Q.anchor=we,Q.head=me,Ye(m),Zr(m,$,"<",tt(we,me)?we:me),Zr(m,$,">",tt(we,me)?me:we)):z||(m.ace.curOp&&(m.ace.curOp.vimDialogScroll="center-animate"),me=ue(m,me,ye),m.setCursor(me.line,me.ch))}if(z){if(q.lastSel){we=Ce;var Qe=q.lastSel,et=Math.abs(Qe.head.line-Qe.anchor.line),fn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?me=new Ne(Ce.line+et,Ce.ch):Qe.visualBlock?me=new Ne(Ce.line+et,Ce.ch+fn):Qe.head.line==Qe.anchor.line?me=new Ne(Ce.line,Ce.ch+fn):me=new Ne(Ce.line+et,Ce.ch),$.visualMode=!0,$.visualLine=Qe.visualLine,$.visualBlock=Qe.visualBlock,Q=$.sel={anchor:we,head:me},Ye(m)}else $.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var at,bn,kt,Tt,Xn;if($.visualMode){at=ht(Q.head,Q.anchor),bn=Zt(Q.head,Q.anchor),kt=$.visualLine||q.linewise,Tt=$.visualBlock?"block":kt?"line":"char";var lr=x(m,at,bn);if(Xn=dt(m,{anchor:lr.start,head:lr.end},Tt),kt){var xn=Xn.ranges;if(Tt=="block")for(var V=0;V<xn.length;V++)xn[V].head.ch=qt(m,xn[V].head.line);else Tt=="line"&&(xn[0].head=new Ne(xn[0].head.line+1,0))}}else{if(at=qe(we||Ce),bn=qe(me||ye),tt(bn,at)){var X=at;at=bn,bn=X}kt=W.linewise||q.linewise,kt?Et(m,at,bn):W.forward&&Rt(m,at,bn),Tt="char";var ie=!W.inclusive||kt,lr=x(m,at,bn);Xn=dt(m,{anchor:lr.start,head:lr.end},Tt,ie)}m.setSelections(Xn.ranges,Xn.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=kt;var oe=Uo[z](m,q,Xn.ranges,Ce,me);$.visualMode&&xt(m,oe!=null),oe&&m.setCursor(oe)}},recordLastEdit:function(m,$,k){var D=Be.macroModeState;D.isPlaying||(m.lastEditInputState=$,m.lastEditActionCommand=k,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=m.visualBlock?m.sel.head.line-m.sel.anchor.line:0)}},Ur={moveToTopLine:function(m,$,k){var D=Yi(m).top+k.repeat-1;return new Ne(D,ct(m.getLine(D)))},moveToMiddleLine:function(m){var $=Yi(m),k=Math.floor(($.top+$.bottom)*.5);return new Ne(k,ct(m.getLine(k)))},moveToBottomLine:function(m,$,k){var D=Yi(m).bottom-k.repeat+1;return new Ne(D,ct(m.getLine(D)))},expandToLine:function(m,$,k){var D=$;return new Ne(D.line+k.repeat-1,1/0)},findNext:function(m,$,k){var D=Sn(m),W=D.getQuery();if(W){var z=!k.forward;return z=D.isReversed()?!z:z,gi(m,W),Sr(m,z,W,k.repeat)}},findAndSelectNextInclusive:function(m,$,k,D,W){var z=Sn(m),q=z.getQuery();if(q){var Y=!k.forward;Y=z.isReversed()?!Y:Y;var Q=fi(m,Y,q,k.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:""}));var ye=D.sel.anchor;if(ye)return z.isReversed()?k.forward?[ye,re]:[ye,se]:k.forward?[ye,se]:[ye,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(m,$,k,D){var W=jr(m,D,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:ct(m.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(m,$,k,D){if(D.visualBlock&&k.sameLine){var W=D.sel;return[ue(m,new Ne(W.anchor.line,W.head.ch)),ue(m,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(m,$,k,D){for(var W=$,z=0;z<k.repeat;z++){var q=W;for(var Y in D.marks)if(u(Y)){var Q=D.marks[Y].find(),re=k.forward?tt(Q,q):tt(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=ut(q,W),ye=k.forward?hn(q,Q,W):hn(W,Q,q);(se||ye)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,ct(m.getLine(W.line)))),W},moveByCharacters:function(m,$,k){var D=$,W=k.repeat,z=k.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(m,$,k,D){var W=$,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=m.firstLine(),re=m.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(m,$,k,D);if(Y>re&&W.line==re)return so(m,$,k,D,!0);var se=m.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(z=ct(m.getLine(Y)),D.lastHPos=z),D.lastHSPos=m.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(m,$,k,D){var W=$;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=m.charCoords(W,"div").left}var z=k.repeat,Q=m.findPosV(W,k.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(k.forward)var q=m.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=m.coordsChar(Y,"div");else{var re=m.charCoords(new Ne(m.firstLine(),0),"div");re.left=D.lastHSPos,Q=m.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(m,$,k){var D=$,W=k.repeat;return m.findPosV(D,k.forward?W:-W,"page")},moveByParagraph:function(m,$,k){var D=k.forward?1:-1;return fs(m,$,k.repeat,D)},moveBySentence:function(m,$,k){var D=k.forward?1:-1;return Oi(m,$,k.repeat,D)},moveByScroll:function(m,$,k,D){var W=m.getScrollInfo(),z=null,q=k.repeat;q||(q=W.clientHeight/(2*m.defaultTextHeight()));var Y=m.charCoords($,"local");if(k.repeat=q,z=Ur.moveByDisplayLines(m,$,k,D),!z)return null;var Q=m.charCoords(z,"local");return m.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(m,$,k){return pr(m,$,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(m,$,k){var D=k.repeat,W=Lo(m,D,k.forward,k.selectedCharacter,$),z=k.forward?-1:1;return zr(z,k),W?(W.ch+=z,W):null},moveToCharacter:function(m,$,k){var D=k.repeat;return zr(0,k),Lo(m,D,k.forward,k.selectedCharacter,$)||$},moveToSymbol:function(m,$,k){var D=k.repeat;return Li(m,D,k.forward,k.selectedCharacter)||$},moveToColumn:function(m,$,k,D){var W=k.repeat;return D.lastHPos=W-1,D.lastHSPos=m.charCoords($,"div").left,za(m,W)},moveToEol:function(m,$,k,D){return so(m,$,k,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(m,$){var k=$;return new Ne(k.line,ct(m.getLine(k.line)))},moveToMatchedSymbol:function(m,$){for(var k=$,D=k.line,W=k.ch,z=m.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&l(q)){var Y=m.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=m.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(m,$){return new Ne($.line,0)},moveToLineOrEdgeOfDocument:function(m,$,k){var D=k.forward?m.lastLine():m.firstLine();return k.repeatIsExplicit&&(D=k.repeat-m.getOption("firstLineNumber")),new Ne(D,ct(m.getLine(D)))},moveToStartOfDisplayLine:function(m){return m.execCommand("goLineLeft"),m.getCursor()},moveToEndOfDisplayLine:function(m){m.execCommand("goLineRight");var $=m.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(m,$,k,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=Bn(m,$,q,Y),!Q){var se=m.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=Bn(m,se.from(),q,Y))}}else if(z[q])re=!0,Q=xr(m,$,q,Y);else if(q==="W"||q==="w")for(var ye=k.repeat||1;ye-- >0;){var Ce=yt(m,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=fs(m,$,k.repeat,0,Y),k.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var me=D.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=wn(m,$,Y);else if(q==="s"){var we=m.getLine($.line);$.ch>0&&w(we[$.ch])&&($.ch-=1);var Oe=ta(m,$,k.repeat,1,Y),Le=ta(m,$,k.repeat,-1,Y);d(m.getLine(Le.line)[Le.ch])&&d(m.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?m.state.vim.visualMode?ze(m,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(m,$,k){var D=Be.lastCharacterSearch,W=k.repeat,z=k.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);m.moveH(-q,"char"),k.inclusive=!!z;var Y=Lo(m,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(m.moveH(q,"char"),$)}},Uo={change:function(m,$,k){var D,W,z=m.state.vim,q=k[0].anchor,Y=k[0].head;if(z.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,m.setSelection(q,Y),W=m.getSelection(),m.replaceSelection(""),D=q;else{W=m.getSelection();var Q=he("",k.length);m.replaceSelections(Q),D=ht(k[0].head,k[0].anchor)}else{W=m.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=fe(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}$.linewise&&(q=new Ne(q.line,ct(m.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),m.replaceRange("",q,Y),D=q}Be.registerController.pushText($.registerName,"change",W,$.linewise,k.length>1),On.enterInsertMode(m,{head:D},m.state.vim)},delete:function(m,$,k){var D,W,z=m.state.vim;if(z.visualBlock){W=m.getSelection();var q=he("",k.length);m.replaceSelections(q),D=ht(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[0].head;$.linewise&&Q.line!=m.firstLine()&&Y.line==m.lastLine()&&Y.line==Q.line-1&&(Y.line==m.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,qt(m,Y.line-1))),W=m.getRange(Y,Q),m.replaceRange("",Y,Q),D=Y,$.linewise&&(D=Ur.moveToFirstNonWhiteSpaceCharacter(m,Y))}return Be.registerController.pushText($.registerName,"delete",W,$.linewise,z.visualBlock),ue(m,D)},indent:function(m,$,k){var D=m.state.vim,W=D.visualMode?$.repeat:1;if(D.visualBlock){for(var z=m.getOption("tabSize"),q=m.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=k.length-1;Q>=0;Q--)if(Y=ht(k[Q].anchor,k[Q].head),$.indentRight)m.replaceRange(q.repeat(W),Y,Y);else{for(var re=m.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}m.replaceRange("",Y,fe(Y,0,se))}return Y}if(m.indentMore)for(var ye=0;ye<W;ye++)$.indentRight?m.indentMore():m.indentLess();else{var we=k[0].anchor.line,Oe=D.visualBlock?k[k.length-1].anchor.line:k[0].head.line;$.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ye=0;ye<W;ye++)m.indentLine(Q,$.indentRight)}return Ur.moveToFirstNonWhiteSpaceCharacter(m,k[0].anchor)},indentAuto:function(m,$,k){return m.execCommand("indentAuto"),Ur.moveToFirstNonWhiteSpaceCharacter(m,k[0].anchor)},hardWrap:function(m,$,k,D,W){if(m.hardWrap){var z=k[0].anchor.line,q=k[0].head.line;$.linewise&&q--;var Y=m.hardWrap({from:z,to:q});return Y>z&&$.linewise&&Y--,$.keepCursor?D:new Ne(Y,0)}},changeCase:function(m,$,k,D,W){for(var z=m.getSelections(),q=[],Y=$.toLower,Q=0;Q<z.length;Q++){var re=z[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=c(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return m.replaceSelections(q),$.shouldMoveCursor?W:!m.state.vim.visualMode&&$.linewise&&k[0].anchor.line+1==k[0].head.line?Ur.moveToFirstNonWhiteSpaceCharacter(m,D):$.linewise?D:ht(k[0].anchor,k[0].head)},yank:function(m,$,k,D){var W=m.state.vim,z=m.getSelection(),q=W.visualMode?ht(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):D;return Be.registerController.pushText($.registerName,"yank",z,$.linewise,W.visualBlock),q}},On={jumpListWalk:function(m,$,k){if(!k.visualMode){var D=$.repeat,W=$.forward,z=Be.jumpList,q=z.move(m,W?D:-D),Y=q?q.find():void 0;Y=Y||m.getCursor(),m.setCursor(Y),m.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(m,$,k){if(!k.visualMode){var D=$.repeat||1,W=m.defaultTextHeight(),z=m.getScrollInfo().top,q=W*D,Y=$.forward?z+q:z-q,Q=qe(m.getCursor()),re=m.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),m.setCursor(Q),re=m.charCoords(Q,"local"),m.scrollTo(null,re.top)):m.scrollTo(null,Y);else{var se=Y+m.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),m.setCursor(Q),re=m.charCoords(Q,"local"),m.scrollTo(null,re.bottom-m.getScrollInfo().clientHeight)):m.scrollTo(null,Y)}}},scrollToCursor:function(m,$){var k=m.getCursor().line,D=m.charCoords(new Ne(k,0),"local"),W=m.getScrollInfo().clientHeight,z=D.top;switch($.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(k,m.getLine(k).length-1),Y=m.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}m.scrollTo(null,z)},replayMacro:function(m,$,k){var D=$.selectedCharacter,W=$.repeat,z=Be.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)ws(m,k,z,D)},enterMacroRecordMode:function(m,$){var k=Be.macroModeState,D=$.selectedCharacter;Be.registerController.isValidRegister(D)&&k.enterMacroRecordMode(m,D)},toggleOverwrite:function(m){m.state.overwrite?(m.toggleOverwrite(!1),m.setOption("keyMap","vim-insert"),Pe.signal(m,"vim-mode-change",{mode:"insert"})):(m.toggleOverwrite(!0),m.setOption("keyMap","vim-replace"),Pe.signal(m,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(m,$,k){if(!m.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=$&&$.repeat||1;var D=$?$.insertAt:null,W=k.sel,z=$.head||m.getCursor("head"),q=m.listSelections().length;if(D=="eol")z=new Ne(z.line,qt(m,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=x(m,z,fe(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=x(m,z,Ur.moveToFirstNonWhiteSpaceCharacter(m,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=fe(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(k.visualMode)return}else D=="lastEdit"&&(z=ao(m)||z);m.setOption("disableInput",!1),$&&$.replace?(m.toggleOverwrite(!0),m.setOption("keyMap","vim-replace"),Pe.signal(m,"vim-mode-change",{mode:"replace"})):(m.toggleOverwrite(!1),m.setOption("keyMap","vim-insert"),Pe.signal(m,"vim-mode-change",{mode:"insert"})),Be.macroModeState.isPlaying||(m.on("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=m.setBookmark(z,{insertLeft:!0}),Pe.on(m.getInputField(),"keydown",xs)),k.visualMode&&xt(m),Gn(m,z,q)}},toggleVisualMode:function(m,$,k){var D=$.repeat,W=m.getCursor(),z;if(k.visualMode)k.visualLine^$.linewise||k.visualBlock^$.blockwise?(k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(m)):xt(m);else{k.visualMode=!0,k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,z=ue(m,new Ne(W.line,W.ch+D-1));var q=x(m,W,z);k.sel={anchor:q.start,head:q.end},Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(m),Zr(m,k,"<",ht(W,z)),Zr(m,k,">",Zt(W,z))}},reselectLastSelection:function(m,$,k){var D=k.lastSelection;if(k.visualMode&&ke(m,k),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;k.sel={anchor:W,head:z},k.visualMode=!0,k.visualLine=D.visualLine,k.visualBlock=D.visualBlock,Ye(m),Zr(m,k,"<",ht(W,z)),Zr(m,k,">",Zt(W,z)),Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(m,$,k){var D,W;if(k.visualMode){if(D=m.getCursor("anchor"),W=m.getCursor("head"),tt(W,D)){var z=W;W=D,D=z}W.ch=qt(m,W.line)-1}else{var q=Math.max($.repeat,2);D=m.getCursor(),W=ue(m,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=qt(m,D.line);var re="",se=0;if(!$.keepSpaces){var ye=m.getLine(D.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}m.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ue(m,new Ne(D.line,Y));k.visualMode&&xt(m,!1),m.setCursor(Ce)},newLineAndEnterInsertMode:function(m,$,k){k.insertMode=!0;var D=qe(m.getCursor());if(D.line===m.firstLine()&&!$.after)m.replaceRange(`
1444
- `,new Ne(m.firstLine(),0)),m.setCursor(m.firstLine(),0);else{D.line=$.after?D.line:D.line-1,D.ch=qt(m,D.line),m.setCursor(D);var W=Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent;W(m)}this.enterInsertMode(m,{repeat:$.repeat},k)},paste:function(m,$,k){var D=this,W=Be.registerController.getRegister($.registerName),z=function(){var q=W.toString();D.continuePaste(m,$,k,q,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(m,$,k,q,W)},function(){z()}):z()},continuePaste:function(m,$,k,D,W){var z=qe(m.getCursor());if(D){if($.matchIndent){var q=m.getOption("tabSize"),Y=function(xn){var V=xn.split(" ").length-1,X=xn.split(" ").length-1;return V*q+X*1},Q=m.getLine(m.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ye=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(xn){var V=re+(Y(xn)-Ce);if(V<0)return"";if(m.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ye?`
1443
+ `)==-1?this.registers["-"]=new B(k,D):(this.shiftNumericRegisters_(),this.registers[1]=new B(k,D))}this.unnamedRegister.setText(k,D,W);return}var q=c(m);q?z.pushText(k,D):z.setText(k,D,W),m==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"&&navigator.clipboard.writeText(k),this.unnamedRegister.setText(z.toString(),D)}},getRegister:function(m){return this.isValidRegister(m)?(m=m.toLowerCase(),this.registers[m]||(this.registers[m]=new B),this.registers[m]):this.unnamedRegister},isValidRegister:function(m){return m&&(b(m,Jt)||Yt.test(m))},shiftNumericRegisters_:function(){for(var m=9;m>=2;m--)this.registers[m]=this.getRegister(""+(m-1))}},Z.prototype={nextMatch:function(m,$){var k=this.historyBuffer,D=$?-1:1;this.initialPrefix===null&&(this.initialPrefix=m);for(var W=this.iterator+D;$?W>=0:W<k.length;W+=D)for(var z=k[W],q=0;q<=z.length;q++)if(this.initialPrefix==z.substring(0,q))return this.iterator=W,z;if(W>=k.length)return this.iterator=k.length,this.initialPrefix;if(W<0)return m},pushInput:function(m){var $=this.historyBuffer.indexOf(m);$>-1&&this.historyBuffer.splice($,1),m.length&&this.historyBuffer.push(m)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var On={matchCommand:function(m,$,k,D){var W=$e(m,$,D,k);if(!W.full&&!W.partial)return{type:"none"};if(!W.full&&W.partial)return{type:"partial",expectLiteralNext:W.partial.length==1&&W.partial[0].keys.slice(-11)=="<character>"};for(var z,q=0;q<W.full.length;q++){var Y=W.full[q];z||(z=Y)}if(z.keys.slice(-11)=="<character>"||z.keys.slice(-10)=="<register>"){var Q=Ee(m);if(!Q||Q.length>1)return{type:"clear"};k.selectedCharacter=Q}return{type:"full",command:z}},processCommand:function(m,$,k){switch($.inputState.repeatOverride=k.repeatOverride,k.type){case"motion":this.processMotion(m,$,k);break;case"operator":this.processOperator(m,$,k);break;case"operatorMotion":this.processOperatorMotion(m,$,k);break;case"action":this.processAction(m,$,k);break;case"search":this.processSearch(m,$,k);break;case"ex":case"keyToEx":this.processEx(m,$,k);break}},processMotion:function(m,$,k){$.inputState.motion=k.motion,$.inputState.motionArgs=ce(k.motionArgs),this.evalInput(m,$)},processOperator:function(m,$,k){var D=$.inputState;if(D.operator){if(D.operator==k.operator){D.motion="expandToLine",D.motionArgs={linewise:!0},this.evalInput(m,$);return}A(m)}D.operator=k.operator,D.operatorArgs=ce(k.operatorArgs),k.keys.length>1&&(D.operatorShortcut=k.keys),k.exitVisualBlock&&($.visualBlock=!1,Ye(m)),$.visualMode&&this.evalInput(m,$)},processOperatorMotion:function(m,$,k){var D=$.visualMode,W=ce(k.operatorMotionArgs);W&&D&&W.visualLine&&($.visualLine=!0),this.processOperator(m,$,k),D||this.processMotion(m,$,k)},processAction:function(m,$,k){var D=$.inputState,W=D.getRepeat(),z=!!W,q=ce(k.actionArgs)||{};D.selectedCharacter&&(q.selectedCharacter=D.selectedCharacter),k.operator&&this.processOperator(m,$,k),k.motion&&this.processMotion(m,$,k),(k.motion||k.operator)&&this.evalInput(m,$),q.repeat=W||1,q.repeatIsExplicit=z,q.registerName=D.registerName,A(m),$.lastMotion=null,k.isEdit&&this.recordLastEdit($,D,k),Nn[k.action](m,q,$)},processSearch:function(m,$,k){function D(Le,Ue,st){Be.searchHistoryController.pushInput(Le),Be.searchHistoryController.reset();try{gn(m,Le,Ue,st)}catch{zt(m,"Invalid regex: "+Le),A(m);return}On.processMotion(m,$,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:k.searchArgs.toJumplist}})}function W(Le){D(Le,!0,!0);var Ue=Be.macroModeState;Ue.isRecording&&bs(Ue,Le)}function z(Le,Ue,st){var Qe=H(Le),et,mn;Qe=="<Up>"||Qe=="<Down>"?(et=Qe=="<Up>",mn=Le.target?Le.target.selectionEnd:0,Ue=Be.searchHistoryController.nextMatch(Ue,et)||"",st(Ue),mn&&Le.target&&(Le.target.selectionEnd=Le.target.selectionStart=Math.min(mn,Le.target.value.length))):Qe&&Qe!="<Left>"&&Qe!="<Right>"&&Be.searchHistoryController.reset();var at;try{at=gn(m,Ue,!0,!0)}catch{}at?m.scrollIntoView(Sr(m,!Y,at),30):(Oo(m),m.scrollTo(ye.left,ye.top))}function q(Le,Ue,st){var Qe=H(Le);Qe=="<Esc>"||Qe=="<C-c>"||Qe=="<C-[>"||Qe=="<BS>"&&Ue==""?(Be.searchHistoryController.pushInput(Ue),Be.searchHistoryController.reset(),gn(m,se),Oo(m),m.scrollTo(ye.left,ye.top),Pe.e_stop(Le),A(m),st(),m.focus()):Qe=="<Up>"||Qe=="<Down>"?Pe.e_stop(Le):Qe=="<C-u>"&&(Pe.e_stop(Le),st(""))}if(m.getSearchCursor){var Y=k.searchArgs.forward,Q=k.searchArgs.wholeWordOnly;An(m).setReversed(!Y);var re=Y?"/":"?",se=An(m).getQuery(),ye=m.getScrollInfo();switch(k.searchArgs.querySrc){case"prompt":var Ce=Be.macroModeState;if(Ce.isPlaying){var Oe=Ce.replaySearchQueries.shift();D(Oe,!0,!1)}else kr(m,{onClose:W,prefix:re,desc:"(JavaScript regexp)",onKeyUp:z,onKeyDown:q});break;case"wordUnderCursor":var me=yt(m,{noSymbol:!0}),we=!0;if(me||(me=yt(m,{noSymbol:!1}),we=!1),!me){zt(m,"No word under cursor"),A(m);return}var Oe=m.getLine(me.start.line).substring(me.start.ch,me.end.ch);we&&Q?Oe="\\b"+Oe+"\\b":Oe=pn(Oe),Be.jumpList.cachedCursor=m.getCursor(),m.setCursor(me.start),D(Oe,!0,!1)}}},processEx:function(m,$,k){function D(z){Be.exCommandHistoryController.pushInput(z),Be.exCommandHistoryController.reset(),fr.processCommand(m,z),m.state.vim&&A(m)}function W(z,q,Y){var Q=H(z),re,se;(Q=="<Esc>"||Q=="<C-c>"||Q=="<C-[>"||Q=="<BS>"&&q=="")&&(Be.exCommandHistoryController.pushInput(q),Be.exCommandHistoryController.reset(),Pe.e_stop(z),A(m),Y(),m.focus()),Q=="<Up>"||Q=="<Down>"?(Pe.e_stop(z),re=Q=="<Up>",se=z.target?z.target.selectionEnd:0,q=Be.exCommandHistoryController.nextMatch(q,re)||"",Y(q),se&&z.target&&(z.target.selectionEnd=z.target.selectionStart=Math.min(se,z.target.value.length))):Q=="<C-u>"?(Pe.e_stop(z),Y("")):Q&&Q!="<Left>"&&Q!="<Right>"&&Be.exCommandHistoryController.reset()}k.type=="keyToEx"?fr.processCommand(m,k.exArgs.input):$.visualMode?kr(m,{onClose:D,prefix:":",value:"'<,'>",onKeyDown:W,selectValueOnOpen:!1}):kr(m,{onClose:D,prefix:":",onKeyDown:W})},evalInput:function(m,$){var k=$.inputState,D=k.motion,W=k.motionArgs||{},z=k.operator,q=k.operatorArgs||{},Y=k.registerName,Q=$.sel,re=qe($.visualMode?ue(m,Q.head):m.getCursor("head")),se=qe($.visualMode?ue(m,Q.anchor):m.getCursor("anchor")),ye=qe(re),Ce=qe(se),me,we,Oe;if(z&&this.recordLastEdit($,k),k.repeatOverride!==void 0?Oe=k.repeatOverride:Oe=k.getRepeat(),Oe>0&&W.explicitRepeat?W.repeatIsExplicit=!0:(W.noRepeat||!W.explicitRepeat&&Oe===0)&&(Oe=1,W.repeatIsExplicit=!1),k.selectedCharacter&&(W.selectedCharacter=q.selectedCharacter=k.selectedCharacter),W.repeat=Oe,A(m),D){var Le=Ur[D](m,re,W,$,k);if($.lastMotion=Ur[D],!Le)return;if(W.toJumplist){!z&&m.ace.curOp!=null&&(m.ace.curOp.command.scrollIntoView="center-animate");var Ue=Be.jumpList,st=Ue.cachedCursor;st?(br(m,st,Le),delete Ue.cachedCursor):br(m,re,Le)}Le instanceof Array?(we=Le[0],me=Le[1]):me=Le,me||(me=qe(re)),$.visualMode?((!$.visualBlock||me.ch!==1/0)&&(me=ue(m,me,ye)),we&&(we=ue(m,we)),we=we||Ce,Q.anchor=we,Q.head=me,Ye(m),Zr(m,$,"<",tt(we,me)?we:me),Zr(m,$,">",tt(we,me)?me:we)):z||(m.ace.curOp&&(m.ace.curOp.vimDialogScroll="center-animate"),me=ue(m,me,ye),m.setCursor(me.line,me.ch))}if(z){if(q.lastSel){we=Ce;var Qe=q.lastSel,et=Math.abs(Qe.head.line-Qe.anchor.line),mn=Math.abs(Qe.head.ch-Qe.anchor.ch);Qe.visualLine?me=new Ne(Ce.line+et,Ce.ch):Qe.visualBlock?me=new Ne(Ce.line+et,Ce.ch+mn):Qe.head.line==Qe.anchor.line?me=new Ne(Ce.line,Ce.ch+mn):me=new Ne(Ce.line+et,Ce.ch),$.visualMode=!0,$.visualLine=Qe.visualLine,$.visualBlock=Qe.visualBlock,Q=$.sel={anchor:we,head:me},Ye(m)}else $.visualMode&&(q.lastSel={anchor:qe(Q.anchor),head:qe(Q.head),visualBlock:$.visualBlock,visualLine:$.visualLine});var at,xn,kt,Tt,Qn;if($.visualMode){at=ht(Q.head,Q.anchor),xn=Zt(Q.head,Q.anchor),kt=$.visualLine||q.linewise,Tt=$.visualBlock?"block":kt?"line":"char";var cr=x(m,at,xn);if(Qn=dt(m,{anchor:cr.start,head:cr.end},Tt),kt){var Cn=Qn.ranges;if(Tt=="block")for(var V=0;V<Cn.length;V++)Cn[V].head.ch=qt(m,Cn[V].head.line);else Tt=="line"&&(Cn[0].head=new Ne(Cn[0].head.line+1,0))}}else{if(at=qe(we||Ce),xn=qe(me||ye),tt(xn,at)){var X=at;at=xn,xn=X}kt=W.linewise||q.linewise,kt?Et(m,at,xn):W.forward&&Rt(m,at,xn),Tt="char";var ie=!W.inclusive||kt,cr=x(m,at,xn);Qn=dt(m,{anchor:cr.start,head:cr.end},Tt,ie)}m.setSelections(Qn.ranges,Qn.primary),$.lastMotion=null,q.repeat=Oe,q.registerName=Y,q.linewise=kt;var oe=Uo[z](m,q,Qn.ranges,Ce,me);$.visualMode&&xt(m,oe!=null),oe&&m.setCursor(oe)}},recordLastEdit:function(m,$,k){var D=Be.macroModeState;D.isPlaying||(m.lastEditInputState=$,m.lastEditActionCommand=k,D.lastInsertModeChanges.changes=[],D.lastInsertModeChanges.expectCursorActivityForChange=!1,D.lastInsertModeChanges.visualBlock=m.visualBlock?m.sel.head.line-m.sel.anchor.line:0)}},Ur={moveToTopLine:function(m,$,k){var D=Yi(m).top+k.repeat-1;return new Ne(D,ct(m.getLine(D)))},moveToMiddleLine:function(m){var $=Yi(m),k=Math.floor(($.top+$.bottom)*.5);return new Ne(k,ct(m.getLine(k)))},moveToBottomLine:function(m,$,k){var D=Yi(m).bottom-k.repeat+1;return new Ne(D,ct(m.getLine(D)))},expandToLine:function(m,$,k){var D=$;return new Ne(D.line+k.repeat-1,1/0)},findNext:function(m,$,k){var D=An(m),W=D.getQuery();if(W){var z=!k.forward;return z=D.isReversed()?!z:z,gi(m,W),Sr(m,z,W,k.repeat)}},findAndSelectNextInclusive:function(m,$,k,D,W){var z=An(m),q=z.getQuery();if(q){var Y=!k.forward;Y=z.isReversed()?!Y:Y;var Q=fi(m,Y,q,k.repeat,D);if(Q){if(W.operator)return Q;var re=Q[0],se=new Ne(Q[1].line,Q[1].ch-1);if(D.visualMode){(D.visualLine||D.visualBlock)&&(D.visualLine=!1,D.visualBlock=!1,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:""}));var ye=D.sel.anchor;if(ye)return z.isReversed()?k.forward?[ye,re]:[ye,se]:k.forward?[ye,se]:[ye,re]}else D.visualMode=!0,D.visualLine=!1,D.visualBlock=!1,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:""});return Y?[se,re]:[re,se]}}},goToMark:function(m,$,k,D){var W=jr(m,D,k.selectedCharacter);return W?k.linewise?{line:W.line,ch:ct(m.getLine(W.line))}:W:null},moveToOtherHighlightedEnd:function(m,$,k,D){if(D.visualBlock&&k.sameLine){var W=D.sel;return[ue(m,new Ne(W.anchor.line,W.head.ch)),ue(m,new Ne(W.head.line,W.anchor.ch))]}return[D.sel.head,D.sel.anchor]},jumpToMark:function(m,$,k,D){for(var W=$,z=0;z<k.repeat;z++){var q=W;for(var Y in D.marks)if(u(Y)){var Q=D.marks[Y].find(),re=k.forward?tt(Q,q):tt(q,Q);if(!re&&!(k.linewise&&Q.line==q.line)){var se=ut(q,W),ye=k.forward?dn(q,Q,W):dn(W,Q,q);(se||ye)&&(W=Q)}}}return k.linewise&&(W=new Ne(W.line,ct(m.getLine(W.line)))),W},moveByCharacters:function(m,$,k){var D=$,W=k.repeat,z=k.forward?D.ch+W:D.ch-W;return new Ne(D.line,z)},moveByLines:function(m,$,k,D){var W=$,z=W.ch;switch(D.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:z=D.lastHPos;break;default:D.lastHPos=z}var q=k.repeat+(k.repeatOffset||0),Y=k.forward?W.line+q:W.line-q,Q=m.firstLine(),re=m.lastLine();if(Y<Q&&W.line==Q)return this.moveToStartOfLine(m,$,k,D);if(Y>re&&W.line==re)return so(m,$,k,D,!0);var se=m.ace.session.getFoldLine(Y);return se&&(k.forward?Y>se.start.row&&(Y=se.end.row+1):Y=se.start.row),k.toFirstChar&&(z=ct(m.getLine(Y)),D.lastHPos=z),D.lastHSPos=m.charCoords(new Ne(Y,z),"div").left,new Ne(Y,z)},moveByDisplayLines:function(m,$,k,D){var W=$;switch(D.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:D.lastHSPos=m.charCoords(W,"div").left}var z=k.repeat,Q=m.findPosV(W,k.forward?z:-z,"line",D.lastHSPos);if(Q.hitSide)if(k.forward)var q=m.charCoords(Q,"div"),Y={top:q.top+8,left:D.lastHSPos},Q=m.coordsChar(Y,"div");else{var re=m.charCoords(new Ne(m.firstLine(),0),"div");re.left=D.lastHSPos,Q=m.coordsChar(re,"div")}return D.lastHPos=Q.ch,Q},moveByPage:function(m,$,k){var D=$,W=k.repeat;return m.findPosV(D,k.forward?W:-W,"page")},moveByParagraph:function(m,$,k){var D=k.forward?1:-1;return fs(m,$,k.repeat,D)},moveBySentence:function(m,$,k){var D=k.forward?1:-1;return Oi(m,$,k.repeat,D)},moveByScroll:function(m,$,k,D){var W=m.getScrollInfo(),z=null,q=k.repeat;q||(q=W.clientHeight/(2*m.defaultTextHeight()));var Y=m.charCoords($,"local");if(k.repeat=q,z=Ur.moveByDisplayLines(m,$,k,D),!z)return null;var Q=m.charCoords(z,"local");return m.scrollTo(null,W.top+Q.top-Y.top),z},moveByWords:function(m,$,k){return pr(m,$,k.repeat,!!k.forward,!!k.wordEnd,!!k.bigWord)},moveTillCharacter:function(m,$,k){var D=k.repeat,W=Lo(m,D,k.forward,k.selectedCharacter,$),z=k.forward?-1:1;return zr(z,k),W?(W.ch+=z,W):null},moveToCharacter:function(m,$,k){var D=k.repeat;return zr(0,k),Lo(m,D,k.forward,k.selectedCharacter,$)||$},moveToSymbol:function(m,$,k){var D=k.repeat;return Li(m,D,k.forward,k.selectedCharacter)||$},moveToColumn:function(m,$,k,D){var W=k.repeat;return D.lastHPos=W-1,D.lastHSPos=m.charCoords($,"div").left,za(m,W)},moveToEol:function(m,$,k,D){return so(m,$,k,D,!1)},moveToFirstNonWhiteSpaceCharacter:function(m,$){var k=$;return new Ne(k.line,ct(m.getLine(k.line)))},moveToMatchedSymbol:function(m,$){for(var k=$,D=k.line,W=k.ch,z=m.getLine(D),q;W<z.length;W++)if(q=z.charAt(W),q&&l(q)){var Y=m.getTokenTypeAt(new Ne(D,W+1));if(Y!=="string"&&Y!=="comment")break}if(W<z.length){var Q=/[<>]/.test(z[W])?/[(){}[\]<>]/:/[(){}[\]]/,re=m.findMatchingBracket(new Ne(D,W+1),{bracketRegex:Q});return re.to}return k},moveToStartOfLine:function(m,$){return new Ne($.line,0)},moveToLineOrEdgeOfDocument:function(m,$,k){var D=k.forward?m.lastLine():m.firstLine();return k.repeatIsExplicit&&(D=k.repeat-m.getOption("firstLineNumber")),new Ne(D,ct(m.getLine(D)))},moveToStartOfDisplayLine:function(m){return m.execCommand("goLineLeft"),m.getCursor()},moveToEndOfDisplayLine:function(m){m.execCommand("goLineRight");var $=m.getCursor();return $.sticky=="before"&&$.ch--,$},textObjectManipulation:function(m,$,k,D){var W={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},z={"'":!0,'"':!0,"`":!0},q=k.selectedCharacter;q=="b"?q="(":q=="B"&&(q="{");var Y=!k.textObjectInner,Q,re;if(W[q]){if(re=!0,Q=zn(m,$,q,Y),!Q){var se=m.getSearchCursor(new RegExp("\\"+q,"g"),$);se.find()&&(Q=zn(m,se.from(),q,Y))}}else if(z[q])re=!0,Q=xr(m,$,q,Y);else if(q==="W"||q==="w")for(var ye=k.repeat||1;ye-- >0;){var Ce=yt(m,{inclusive:Y,innerWord:!Y,bigWord:q==="W",noSymbol:q==="W",multiline:!0},Q&&Q.end);Ce&&(Q||(Q=Ce),Q.end=Ce.end)}else if(q==="p")if(Q=fs(m,$,k.repeat,0,Y),k.linewise=!0,D.visualMode)D.visualLine||(D.visualLine=!0);else{var me=D.inputState.operatorArgs;me&&(me.linewise=!0),Q.end.line--}else if(q==="t")Q=bn(m,$,Y);else if(q==="s"){var we=m.getLine($.line);$.ch>0&&w(we[$.ch])&&($.ch-=1);var Oe=ta(m,$,k.repeat,1,Y),Le=ta(m,$,k.repeat,-1,Y);d(m.getLine(Le.line)[Le.ch])&&d(m.getLine(Oe.line)[Oe.ch-1])&&(Le={line:Le.line,ch:Le.ch+1}),Q={start:Le,end:Oe}}return Q?m.state.vim.visualMode?ze(m,Q.start,Q.end,re):[Q.start,Q.end]:null},repeatLastCharacterSearch:function(m,$,k){var D=Be.lastCharacterSearch,W=k.repeat,z=k.forward===D.forward,q=(D.increment?1:0)*(z?-1:1);m.moveH(-q,"char"),k.inclusive=!!z;var Y=Lo(m,W,z,D.selectedCharacter);return Y?(Y.ch+=q,Y):(m.moveH(q,"char"),$)}},Uo={change:function(m,$,k){var D,W,z=m.state.vim,q=k[0].anchor,Y=k[0].head;if(z.visualMode)if($.fullLine)Y.ch=Number.MAX_VALUE,Y.line--,m.setSelection(q,Y),W=m.getSelection(),m.replaceSelection(""),D=q;else{W=m.getSelection();var Q=he("",k.length);m.replaceSelections(Q),D=ht(k[0].head,k[0].anchor)}else{W=m.getRange(q,Y);var re=z.lastEditInputState||{};if(re.motion=="moveByWords"&&!d(W)){var se=/\s+$/.exec(W);se&&re.motionArgs&&re.motionArgs.forward&&(Y=fe(Y,0,-se[0].length),W=W.slice(0,-se[0].length))}$.linewise&&(q=new Ne(q.line,ct(m.getLine(q.line))),Y.line>q.line&&(Y=new Ne(Y.line-1,Number.MAX_VALUE))),m.replaceRange("",q,Y),D=q}Be.registerController.pushText($.registerName,"change",W,$.linewise,k.length>1),Nn.enterInsertMode(m,{head:D},m.state.vim)},delete:function(m,$,k){var D,W,z=m.state.vim;if(z.visualBlock){W=m.getSelection();var q=he("",k.length);m.replaceSelections(q),D=ht(k[0].head,k[0].anchor)}else{var Y=k[0].anchor,Q=k[0].head;$.linewise&&Q.line!=m.firstLine()&&Y.line==m.lastLine()&&Y.line==Q.line-1&&(Y.line==m.firstLine()?Y.ch=0:Y=new Ne(Y.line-1,qt(m,Y.line-1))),W=m.getRange(Y,Q),m.replaceRange("",Y,Q),D=Y,$.linewise&&(D=Ur.moveToFirstNonWhiteSpaceCharacter(m,Y))}return Be.registerController.pushText($.registerName,"delete",W,$.linewise,z.visualBlock),ue(m,D)},indent:function(m,$,k){var D=m.state.vim,W=D.visualMode?$.repeat:1;if(D.visualBlock){for(var z=m.getOption("tabSize"),q=m.getOption("indentWithTabs")?" ":" ".repeat(z),Y,Q=k.length-1;Q>=0;Q--)if(Y=ht(k[Q].anchor,k[Q].head),$.indentRight)m.replaceRange(q.repeat(W),Y,Y);else{for(var re=m.getLine(Y.line),se=0,ye=0;ye<W;ye++){var Ce=re[Y.ch+se];if(Ce==" ")se++;else{if(Ce!=" ")break;se++;for(var me=1;me<q.length&&(Ce=re[Y.ch+se],Ce===" ");me++)se++}}m.replaceRange("",Y,fe(Y,0,se))}return Y}if(m.indentMore)for(var ye=0;ye<W;ye++)$.indentRight?m.indentMore():m.indentLess();else{var we=k[0].anchor.line,Oe=D.visualBlock?k[k.length-1].anchor.line:k[0].head.line;$.linewise&&Oe--;for(var Q=we;Q<=Oe;Q++)for(var ye=0;ye<W;ye++)m.indentLine(Q,$.indentRight)}return Ur.moveToFirstNonWhiteSpaceCharacter(m,k[0].anchor)},indentAuto:function(m,$,k){return m.execCommand("indentAuto"),Ur.moveToFirstNonWhiteSpaceCharacter(m,k[0].anchor)},hardWrap:function(m,$,k,D,W){if(m.hardWrap){var z=k[0].anchor.line,q=k[0].head.line;$.linewise&&q--;var Y=m.hardWrap({from:z,to:q});return Y>z&&$.linewise&&Y--,$.keepCursor?D:new Ne(Y,0)}},changeCase:function(m,$,k,D,W){for(var z=m.getSelections(),q=[],Y=$.toLower,Q=0;Q<z.length;Q++){var re=z[Q],se="";if(Y===!0)se=re.toLowerCase();else if(Y===!1)se=re.toUpperCase();else for(var ye=0;ye<re.length;ye++){var Ce=re.charAt(ye);se+=c(Ce)?Ce.toLowerCase():Ce.toUpperCase()}q.push(se)}return m.replaceSelections(q),$.shouldMoveCursor?W:!m.state.vim.visualMode&&$.linewise&&k[0].anchor.line+1==k[0].head.line?Ur.moveToFirstNonWhiteSpaceCharacter(m,D):$.linewise?D:ht(k[0].anchor,k[0].head)},yank:function(m,$,k,D){var W=m.state.vim,z=m.getSelection(),q=W.visualMode?ht(W.sel.anchor,W.sel.head,k[0].head,k[0].anchor):D;return Be.registerController.pushText($.registerName,"yank",z,$.linewise,W.visualBlock),q}},Nn={jumpListWalk:function(m,$,k){if(!k.visualMode){var D=$.repeat,W=$.forward,z=Be.jumpList,q=z.move(m,W?D:-D),Y=q?q.find():void 0;Y=Y||m.getCursor(),m.setCursor(Y),m.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(m,$,k){if(!k.visualMode){var D=$.repeat||1,W=m.defaultTextHeight(),z=m.getScrollInfo().top,q=W*D,Y=$.forward?z+q:z-q,Q=qe(m.getCursor()),re=m.charCoords(Q,"local");if($.forward)Y>re.top?(Q.line+=(Y-re.top)/W,Q.line=Math.ceil(Q.line),m.setCursor(Q),re=m.charCoords(Q,"local"),m.scrollTo(null,re.top)):m.scrollTo(null,Y);else{var se=Y+m.getScrollInfo().clientHeight;se<re.bottom?(Q.line-=(re.bottom-se)/W,Q.line=Math.floor(Q.line),m.setCursor(Q),re=m.charCoords(Q,"local"),m.scrollTo(null,re.bottom-m.getScrollInfo().clientHeight)):m.scrollTo(null,Y)}}},scrollToCursor:function(m,$){var k=m.getCursor().line,D=m.charCoords(new Ne(k,0),"local"),W=m.getScrollInfo().clientHeight,z=D.top;switch($.position){case"center":z=D.bottom-W/2;break;case"bottom":var q=new Ne(k,m.getLine(k).length-1),Y=m.charCoords(q,"local"),Q=Y.bottom-z;z=z-W+Q}m.scrollTo(null,z)},replayMacro:function(m,$,k){var D=$.selectedCharacter,W=$.repeat,z=Be.macroModeState;for(D=="@"?D=z.latestRegister:z.latestRegister=D;W--;)ws(m,k,z,D)},enterMacroRecordMode:function(m,$){var k=Be.macroModeState,D=$.selectedCharacter;Be.registerController.isValidRegister(D)&&k.enterMacroRecordMode(m,D)},toggleOverwrite:function(m){m.state.overwrite?(m.toggleOverwrite(!1),m.setOption("keyMap","vim-insert"),Pe.signal(m,"vim-mode-change",{mode:"insert"})):(m.toggleOverwrite(!0),m.setOption("keyMap","vim-replace"),Pe.signal(m,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(m,$,k){if(!m.getOption("readOnly")){k.insertMode=!0,k.insertModeRepeat=$&&$.repeat||1;var D=$?$.insertAt:null,W=k.sel,z=$.head||m.getCursor("head"),q=m.listSelections().length;if(D=="eol")z=new Ne(z.line,qt(m,z.line));else if(D=="bol")z=new Ne(z.line,0);else if(D=="charAfter"){var Y=x(m,z,fe(z,0,1));z=Y.end}else if(D=="firstNonBlank"){var Y=x(m,z,Ur.moveToFirstNonWhiteSpaceCharacter(m,z));z=Y.end}else if(D=="startOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.min(W.head.ch,W.anchor.ch)),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line<W.anchor.line?z=W.head:z=new Ne(W.anchor.line,0)}else if(D=="endOfSelectedArea"){if(!k.visualMode)return;k.visualBlock?(z=new Ne(Math.min(W.head.line,W.anchor.line),Math.max(W.head.ch,W.anchor.ch)+1),q=Math.abs(W.head.line-W.anchor.line)+1):W.head.line>=W.anchor.line?z=fe(W.head,0,1):z=new Ne(W.anchor.line,0)}else if(D=="inplace"){if(k.visualMode)return}else D=="lastEdit"&&(z=ao(m)||z);m.setOption("disableInput",!1),$&&$.replace?(m.toggleOverwrite(!0),m.setOption("keyMap","vim-replace"),Pe.signal(m,"vim-mode-change",{mode:"replace"})):(m.toggleOverwrite(!1),m.setOption("keyMap","vim-insert"),Pe.signal(m,"vim-mode-change",{mode:"insert"})),Be.macroModeState.isPlaying||(m.on("change",lo),k.insertEnd&&k.insertEnd.clear(),k.insertEnd=m.setBookmark(z,{insertLeft:!0}),Pe.on(m.getInputField(),"keydown",xs)),k.visualMode&&xt(m),Yn(m,z,q)}},toggleVisualMode:function(m,$,k){var D=$.repeat,W=m.getCursor(),z;if(k.visualMode)k.visualLine^$.linewise||k.visualBlock^$.blockwise?(k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(m)):xt(m);else{k.visualMode=!0,k.visualLine=!!$.linewise,k.visualBlock=!!$.blockwise,z=ue(m,new Ne(W.line,W.ch+D-1));var q=x(m,W,z);k.sel={anchor:q.start,head:q.end},Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""}),Ye(m),Zr(m,k,"<",ht(W,z)),Zr(m,k,">",Zt(W,z))}},reselectLastSelection:function(m,$,k){var D=k.lastSelection;if(k.visualMode&&ke(m,k),D){var W=D.anchorMark.find(),z=D.headMark.find();if(!W||!z)return;k.sel={anchor:W,head:z},k.visualMode=!0,k.visualLine=D.visualLine,k.visualBlock=D.visualBlock,Ye(m),Zr(m,k,"<",ht(W,z)),Zr(m,k,">",Zt(W,z)),Pe.signal(m,"vim-mode-change",{mode:"visual",subMode:k.visualLine?"linewise":k.visualBlock?"blockwise":""})}},joinLines:function(m,$,k){var D,W;if(k.visualMode){if(D=m.getCursor("anchor"),W=m.getCursor("head"),tt(W,D)){var z=W;W=D,D=z}W.ch=qt(m,W.line)-1}else{var q=Math.max($.repeat,2);D=m.getCursor(),W=ue(m,new Ne(D.line+q-1,1/0))}for(var Y=0,Q=D.line;Q<W.line;Q++){Y=qt(m,D.line);var re="",se=0;if(!$.keepSpaces){var ye=m.getLine(D.line+1);se=ye.search(/\S/),se==-1?se=ye.length:re=" "}m.replaceRange(re,new Ne(D.line,Y),new Ne(D.line+1,se))}var Ce=ue(m,new Ne(D.line,Y));k.visualMode&&xt(m,!1),m.setCursor(Ce)},newLineAndEnterInsertMode:function(m,$,k){k.insertMode=!0;var D=qe(m.getCursor());if(D.line===m.firstLine()&&!$.after)m.replaceRange(`
1444
+ `,new Ne(m.firstLine(),0)),m.setCursor(m.firstLine(),0);else{D.line=$.after?D.line:D.line-1,D.ch=qt(m,D.line),m.setCursor(D);var W=Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent;W(m)}this.enterInsertMode(m,{repeat:$.repeat},k)},paste:function(m,$,k){var D=this,W=Be.registerController.getRegister($.registerName),z=function(){var q=W.toString();D.continuePaste(m,$,k,q,W)};$.registerName==="+"&&typeof navigator<"u"&&typeof navigator.clipboard<"u"&&typeof navigator.clipboard.readText=="function"?navigator.clipboard.readText().then(function(q){D.continuePaste(m,$,k,q,W)},function(){z()}):z()},continuePaste:function(m,$,k,D,W){var z=qe(m.getCursor());if(D){if($.matchIndent){var q=m.getOption("tabSize"),Y=function(Cn){var V=Cn.split(" ").length-1,X=Cn.split(" ").length-1;return V*q+X*1},Q=m.getLine(m.getCursor().line),re=Y(Q.match(/^\s*/)[0]),se=D.replace(/\n$/,""),ye=D!==se,Ce=Y(D.match(/^\s*/)[0]),D=se.replace(/^\s*/gm,function(Cn){var V=re+(Y(Cn)-Ce);if(V<0)return"";if(m.getOption("indentWithTabs")){var X=Math.floor(V/q);return Array(X+1).join(" ")}return Array(V+1).join(" ")});D+=ye?`
1445
1445
  `:""}if($.repeat>1)var D=Array($.repeat+1).join(D);var me=W.linewise,we=W.blockwise;if(we){D=D.split(`
1446
1446
  `),me&&D.pop();for(var Oe=0;Oe<D.length;Oe++)D[Oe]=D[Oe]==""?" ":D[Oe];z.ch+=$.after?1:0,z.ch=Math.min(qt(m,z.line),z.ch)}else me?k.visualMode?D=k.visualLine?D.slice(0,-1):`
1447
1447
  `+D.slice(0,D.length-1)+`
1448
1448
  `:$.after?(D=`
1449
- `+D.slice(0,D.length-1),z.ch=qt(m,z.line)):z.ch=0:z.ch+=$.after?1:0;var Le;if(k.visualMode){k.lastPastedText=D;var Ue,st=He(m,k),Qe=st[0],et=st[1],fn=m.getSelection(),at=m.listSelections(),bn=new Array(at.length).join("1").split("1");k.lastSelection&&(Ue=k.lastSelection.headMark.find()),Be.registerController.unnamedRegister.setText(fn),we?(m.replaceSelections(bn),et=new Ne(Qe.line+D.length-1,Qe.ch),m.setCursor(Qe),En(m,et),m.replaceSelections(D),Le=Qe):k.visualBlock?(m.replaceSelections(bn),m.setCursor(Qe),m.replaceRange(D,Qe,Qe),Le=Qe):(m.replaceRange(D,Qe,et),Le=m.posFromIndex(m.indexFromPos(Qe)+D.length-1)),Ue&&(k.lastSelection.headMark=m.setBookmark(Ue)),me&&(Le.ch=0)}else if(we){m.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var kt=z.line+Oe;kt>m.lastLine()&&m.replaceRange(`
1450
- `,new Ne(kt,0));var Tt=qt(m,kt);Tt<z.ch&&Mn(m,kt,z.ch)}m.setCursor(z),En(m,new Ne(z.line+D.length-1,z.ch)),m.replaceSelections(D),Le=z}else if(m.replaceRange(D,z),me){var kt=$.after?z.line+1:z.line;Le=new Ne(kt,ct(m.getLine(kt)))}else Le=qe(z),/\n/.test(D)||(Le.ch+=D.length-($.after?1:0));k.visualMode&&xt(m,!1),m.setCursor(Le)}},undo:function(m,$){m.operation(function(){Ge(m,Pe.commands.undo,$.repeat)(),m.setCursor(ue(m,m.getCursor("start")))})},redo:function(m,$){Ge(m,Pe.commands.redo,$.repeat)()},setRegister:function(m,$,k){k.inputState.registerName=$.selectedCharacter},insertRegister:function(m,$,k){var D=$.selectedCharacter,W=Be.registerController.getRegister(D),z=W&&W.toString();z&&m.replaceSelection(z)},oneNormalCommand:function(m,$,k){Hr(m,!0),k.insertModeReturn=!0,Pe.on(m,"vim-command-done",function D(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||On.enterInsertMode(m,{},k)),Pe.off(m,"vim-command-done",D))})},setMark:function(m,$,k){var D=$.selectedCharacter;Zr(m,k,D,m.getCursor())},replace:function(m,$,k){var D=$.selectedCharacter,W=m.getCursor(),z,q,Y=m.listSelections();if(k.visualMode)W=m.getCursor("start"),q=m.getCursor("end");else{var Q=m.getLine(W.line);z=W.ch+$.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=x(m,W,q);if(W=re.start,q=re.end,D==`
1449
+ `+D.slice(0,D.length-1),z.ch=qt(m,z.line)):z.ch=0:z.ch+=$.after?1:0;var Le;if(k.visualMode){k.lastPastedText=D;var Ue,st=He(m,k),Qe=st[0],et=st[1],mn=m.getSelection(),at=m.listSelections(),xn=new Array(at.length).join("1").split("1");k.lastSelection&&(Ue=k.lastSelection.headMark.find()),Be.registerController.unnamedRegister.setText(mn),we?(m.replaceSelections(xn),et=new Ne(Qe.line+D.length-1,Qe.ch),m.setCursor(Qe),In(m,et),m.replaceSelections(D),Le=Qe):k.visualBlock?(m.replaceSelections(xn),m.setCursor(Qe),m.replaceRange(D,Qe,Qe),Le=Qe):(m.replaceRange(D,Qe,et),Le=m.posFromIndex(m.indexFromPos(Qe)+D.length-1)),Ue&&(k.lastSelection.headMark=m.setBookmark(Ue)),me&&(Le.ch=0)}else if(we){m.setCursor(z);for(var Oe=0;Oe<D.length;Oe++){var kt=z.line+Oe;kt>m.lastLine()&&m.replaceRange(`
1450
+ `,new Ne(kt,0));var Tt=qt(m,kt);Tt<z.ch&&En(m,kt,z.ch)}m.setCursor(z),In(m,new Ne(z.line+D.length-1,z.ch)),m.replaceSelections(D),Le=z}else if(m.replaceRange(D,z),me){var kt=$.after?z.line+1:z.line;Le=new Ne(kt,ct(m.getLine(kt)))}else Le=qe(z),/\n/.test(D)||(Le.ch+=D.length-($.after?1:0));k.visualMode&&xt(m,!1),m.setCursor(Le)}},undo:function(m,$){m.operation(function(){Ge(m,Pe.commands.undo,$.repeat)(),m.setCursor(ue(m,m.getCursor("start")))})},redo:function(m,$){Ge(m,Pe.commands.redo,$.repeat)()},setRegister:function(m,$,k){k.inputState.registerName=$.selectedCharacter},insertRegister:function(m,$,k){var D=$.selectedCharacter,W=Be.registerController.getRegister(D),z=W&&W.toString();z&&m.replaceSelection(z)},oneNormalCommand:function(m,$,k){Hr(m,!0),k.insertModeReturn=!0,Pe.on(m,"vim-command-done",function D(){k.visualMode||(k.insertModeReturn&&(k.insertModeReturn=!1,k.insertMode||Nn.enterInsertMode(m,{},k)),Pe.off(m,"vim-command-done",D))})},setMark:function(m,$,k){var D=$.selectedCharacter;Zr(m,k,D,m.getCursor())},replace:function(m,$,k){var D=$.selectedCharacter,W=m.getCursor(),z,q,Y=m.listSelections();if(k.visualMode)W=m.getCursor("start"),q=m.getCursor("end");else{var Q=m.getLine(W.line);z=W.ch+$.repeat,z>Q.length&&(z=Q.length),q=new Ne(W.line,z)}var re=x(m,W,q);if(W=re.start,q=re.end,D==`
1451
1451
  `)k.visualMode||m.replaceRange("",W,q),(Pe.commands.newlineAndIndentContinueComment||Pe.commands.newlineAndIndent)(m);else{var se=m.getRange(W,q);if(se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/[^\n]/g,D),k.visualBlock){var ye=new Array(m.getOption("tabSize")+1).join(" ");se=m.getSelection(),se=se.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D),se=se.replace(/\t/g,ye).replace(/[^\n]/g,D).split(`
1452
1452
  `),m.replaceSelections(se)}else m.replaceRange(se,W,q);k.visualMode?(W=tt(Y[0].anchor,Y[0].head)?Y[0].anchor:Y[0].head,m.setCursor(W),xt(m,!1)):m.setCursor(fe(q,0,-1))}},incrementNumberToken:function(m,$){for(var k=m.getCursor(),D=m.getLine(k.line),W=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi,z,q,Y,Q;(z=W.exec(D))!==null&&(q=z.index,Y=q+z[0].length,!(k.ch<Y)););if(!(!$.backtrack&&Y<=k.ch)&&z){var re=z[2]||z[4],se=z[3]||z[5],ye=$.increase?1:-1,Ce={"0b":2,0:8,"":10,"0x":16}[re.toLowerCase()],me=parseInt(z[1]+se,Ce)+ye*$.repeat;Q=me.toString(Ce);var we=re?new Array(se.length-Q.length+1+z[1].length).join("0"):"";Q.charAt(0)==="-"?Q="-"+re+we+Q.substr(1):Q=re+we+Q;var Oe=new Ne(k.line,q),Le=new Ne(k.line,Y);m.replaceRange(Q,Oe,Le),m.setCursor(new Ne(k.line,q+Q.length-1))}},repeatLastEdit:function(m,$,k){var D=k.lastEditInputState;if(D){var W=$.repeat;W&&$.repeatIsExplicit?k.lastEditInputState.repeatOverride=W:W=k.lastEditInputState.repeatOverride||W,ia(m,k,W,!1)}},indent:function(m,$){m.indentLine(m.getCursor().line,$.indentRight)},exitInsertMode:Hr},ti={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},ni={bracket:{isComplete:function(m){if(m.nextCh===m.symb){if(m.depth++,m.depth>=1)return!0}else m.nextCh===m.reverseSymb&&m.depth--;return!1}},section:{init:function(m){m.curMoveThrough=!0,m.symb=(m.forward?"]":"[")===m.symb?"{":"}"},isComplete:function(m){return m.index===0&&m.nextCh===m.symb}},comment:{isComplete:function(m){var $=m.lastCh==="*"&&m.nextCh==="/";return m.lastCh=m.nextCh,$}},method:{init:function(m){m.symb=m.symb==="m"?"{":"}",m.reverseSymb=m.symb==="{"?"}":"{"},isComplete:function(m){return m.nextCh===m.symb}},preprocess:{init:function(m){m.index=0},isComplete:function(m){if(m.nextCh==="#"){var $=m.lineText.match(/^#(\w+)/)[1];if($==="endif"){if(m.forward&&m.depth===0)return!0;m.depth++}else if($==="if"){if(!m.forward&&m.depth===0)return!0;m.depth--}if($==="else"&&m.depth===0)return!0}return!1}}};I("pcre",!0,"boolean"),Ni.prototype={getQuery:function(){return Be.query},setQuery:function(m){Be.query=m},getOverlay:function(){return this.searchOverlay},setOverlay:function(m){this.searchOverlay=m},isReversed:function(){return Be.isReversed},setReversed:function(m){Be.isReversed=m},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(m){this.annotate=m}};var bi={"\\n":`
1453
- `,"\\r":"\r","\\t":" "},sr={"\\/":"/","\\\\":"\\","\\n":`
1454
- `,"\\r":"\r","\\t":" ","\\&":"&"},ar=0,gr=function(){this.buildCommandMap_()};gr.prototype={processCommand:function(m,$,k){var D=this;m.operation(function(){m.curOp.isVimOp=!0,D._processCommand(m,$,k)})},_processCommand:function(m,$,k){var D=m.state.vim,W=Be.registerController.getRegister(":"),z=W.toString(),q=new Pe.StringStream($);W.setText($);var Y=k||{};Y.input=$;try{this.parseInput_(m,q,Y)}catch(se){throw zt(m,se.toString()),se}D.visualMode&&xt(m);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&&W.setText(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){E(m,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(m,Q.toInput);return}}if(!re){zt(m,'Not an editor command ":'+$+'"');return}try{ks[re](m,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw zt(m,se.toString()),se}},parseInput_:function(m,$,k){if($.eatWhile(":"),$.eat("%")?(k.line=m.firstLine(),k.lineEnd=m.lastLine()):(k.line=this.parseLineSpec_(m,$),k.line!==void 0&&$.eat(",")&&(k.lineEnd=this.parseLineSpec_(m,$))),k.line==null)if(m.state.vim.visualMode){var D=jr(m,m.state.vim,"<");k.selectionLine=D&&D.line,D=jr(m,m.state.vim,">"),k.selectionLineEnd=D&&D.line}else k.selectionLine=m.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=$.match(/.*/)[0],k},parseLineSpec_:function(m,$){var k=$.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,m.getCursor().line);case"$":return this.parseLineSpecOffset_($,m.lastLine());case"'":var D=$.next(),W=jr(m,m.state.vim,D);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,m.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(m,$){var k=m.match(/^([+-])?(\d+)/);if(k){var D=parseInt(k[2],10);k[1]=="-"?$-=D:$+=D}return $},parseCommandArgs_:function(m,$,k){if(!m.eol()){$.argString=m.match(/.*/)[0];var D=k.argDelimiter||/\s+/,W=dr($.argString).split(D);W.length&&W[0]&&($.args=W)}},matchCommand_:function(m){for(var $=m.length;$>0;$--){var k=m.substring(0,$);if(this.commandMap_[k]){var D=this.commandMap_[k];if(D.name.indexOf(m)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var m=0;m<ei.length;m++){var $=ei[m],k=$.shortName||$.name;this.commandMap_[k]=$}},map:function(m,$,k,D){if(m!=":"&&m.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var W=m.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var z={keys:m,type:"keyToKey",toKeys:$,noremap:!!D};k&&(z.context=k),An.unshift(z)}},unmap:function(m,$){if(m!=":"&&m.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var k=m.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var D=m,W=0;W<An.length;W++)if(D==An[W].keys&&An[W].context===$)return An.splice(W,1),!0}};var ks={colorscheme:function(m,$){if(!$.args||$.args.length<1){zt(m,m.getOption("theme"));return}m.setOption("theme",$.args[0])},map:function(m,$,k,D){var W=$.args;if(!W||W.length<2){m&&zt(m,"Invalid mapping: "+$.input);return}fr.map(W[0],W[1],k,D)},imap:function(m,$){this.map(m,$,"insert")},nmap:function(m,$){this.map(m,$,"normal")},vmap:function(m,$){this.map(m,$,"visual")},omap:function(m,$){this.map(m,$,"operatorPending")},noremap:function(m,$){this.map(m,$,void 0,!0)},inoremap:function(m,$){this.map(m,$,"insert",!0)},nnoremap:function(m,$){this.map(m,$,"normal",!0)},vnoremap:function(m,$){this.map(m,$,"visual",!0)},onoremap:function(m,$){this.map(m,$,"operatorPending",!0)},unmap:function(m,$,k){var D=$.args;(!D||D.length<1||!fr.unmap(D[0],k))&&m&&zt(m,"No such mapping: "+$.input)},mapclear:function(m,$){wt.mapclear()},imapclear:function(m,$){wt.mapclear("insert")},nmapclear:function(m,$){wt.mapclear("normal")},vmapclear:function(m,$){wt.mapclear("visual")},omapclear:function(m,$){wt.mapclear("operatorPending")},move:function(m,$){Ln.processCommand(m,m.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(m,$){var k=$.args,D=$.setCfg||{};if(!k||k.length<1){m&&zt(m,"Invalid mapping: "+$.input);return}var W=k[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.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);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=jt[z]&&jt[z].type=="boolean";if(re&&(Q?q=!S(z,m,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=S(z,m,D);se instanceof Error?zt(m,se.message):se===!0||se===!1?zt(m," "+(se?"":"no")+z):zt(m," "+z+"="+se)}else{var ye=T(z,q,m,D);ye instanceof Error&&zt(m,ye.message)}},setlocal:function(m,$){$.setCfg={scope:"local"},this.set(m,$)},setglobal:function(m,$){$.setCfg={scope:"global"},this.set(m,$)},registers:function(m,$){var k=$.args,D=Be.registerController.registers,W=`----------Registers----------
1453
+ `,"\\r":"\r","\\t":" "},ar={"\\/":"/","\\\\":"\\","\\n":`
1454
+ `,"\\r":"\r","\\t":" ","\\&":"&"},lr=0,gr=function(){this.buildCommandMap_()};gr.prototype={processCommand:function(m,$,k){var D=this;m.operation(function(){m.curOp.isVimOp=!0,D._processCommand(m,$,k)})},_processCommand:function(m,$,k){var D=m.state.vim,W=Be.registerController.getRegister(":"),z=W.toString(),q=new Pe.StringStream($);W.setText($);var Y=k||{};Y.input=$;try{this.parseInput_(m,q,Y)}catch(se){throw zt(m,se.toString()),se}D.visualMode&&xt(m);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&&W.setText(z),this.parseCommandArgs_(q,Y,Q),Q.type=="exToKey"){E(m,Q.toKeys,Q);return}if(Q.type=="exToEx"){this.processCommand(m,Q.toInput);return}}if(!re){zt(m,'Not an editor command ":'+$+'"');return}try{ks[re](m,Y),(!Q||!Q.possiblyAsync)&&Y.callback&&Y.callback()}catch(se){throw zt(m,se.toString()),se}},parseInput_:function(m,$,k){if($.eatWhile(":"),$.eat("%")?(k.line=m.firstLine(),k.lineEnd=m.lastLine()):(k.line=this.parseLineSpec_(m,$),k.line!==void 0&&$.eat(",")&&(k.lineEnd=this.parseLineSpec_(m,$))),k.line==null)if(m.state.vim.visualMode){var D=jr(m,m.state.vim,"<");k.selectionLine=D&&D.line,D=jr(m,m.state.vim,">"),k.selectionLineEnd=D&&D.line}else k.selectionLine=m.getCursor().line;else k.selectionLine=k.line,k.selectionLineEnd=k.lineEnd;var W=$.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return W?k.commandName=W[1]:k.commandName=$.match(/.*/)[0],k},parseLineSpec_:function(m,$){var k=$.match(/^(\d+)/);if(k)return parseInt(k[1],10)-1;switch($.next()){case".":return this.parseLineSpecOffset_($,m.getCursor().line);case"$":return this.parseLineSpecOffset_($,m.lastLine());case"'":var D=$.next(),W=jr(m,m.state.vim,D);if(!W)throw new Error("Mark not set");return this.parseLineSpecOffset_($,W.line);case"-":case"+":return $.backUp(1),this.parseLineSpecOffset_($,m.getCursor().line);default:return $.backUp(1),void 0}},parseLineSpecOffset_:function(m,$){var k=m.match(/^([+-])?(\d+)/);if(k){var D=parseInt(k[2],10);k[1]=="-"?$-=D:$+=D}return $},parseCommandArgs_:function(m,$,k){if(!m.eol()){$.argString=m.match(/.*/)[0];var D=k.argDelimiter||/\s+/,W=dr($.argString).split(D);W.length&&W[0]&&($.args=W)}},matchCommand_:function(m){for(var $=m.length;$>0;$--){var k=m.substring(0,$);if(this.commandMap_[k]){var D=this.commandMap_[k];if(D.name.indexOf(m)===0)return D}}return null},buildCommandMap_:function(){this.commandMap_={};for(var m=0;m<ei.length;m++){var $=ei[m],k=$.shortName||$.name;this.commandMap_[k]=$}},map:function(m,$,k,D){if(m!=":"&&m.charAt(0)==":"){if(k)throw Error("Mode not supported for ex mappings");var W=m.substring(1);$!=":"&&$.charAt(0)==":"?this.commandMap_[W]={name:W,type:"exToEx",toInput:$.substring(1),user:!0}:this.commandMap_[W]={name:W,type:"exToKey",toKeys:$,user:!0}}else{var z={keys:m,type:"keyToKey",toKeys:$,noremap:!!D};k&&(z.context=k),_n.unshift(z)}},unmap:function(m,$){if(m!=":"&&m.charAt(0)==":"){if($)throw Error("Mode not supported for ex mappings");var k=m.substring(1);if(this.commandMap_[k]&&this.commandMap_[k].user)return delete this.commandMap_[k],!0}else for(var D=m,W=0;W<_n.length;W++)if(D==_n[W].keys&&_n[W].context===$)return _n.splice(W,1),!0}};var ks={colorscheme:function(m,$){if(!$.args||$.args.length<1){zt(m,m.getOption("theme"));return}m.setOption("theme",$.args[0])},map:function(m,$,k,D){var W=$.args;if(!W||W.length<2){m&&zt(m,"Invalid mapping: "+$.input);return}fr.map(W[0],W[1],k,D)},imap:function(m,$){this.map(m,$,"insert")},nmap:function(m,$){this.map(m,$,"normal")},vmap:function(m,$){this.map(m,$,"visual")},omap:function(m,$){this.map(m,$,"operatorPending")},noremap:function(m,$){this.map(m,$,void 0,!0)},inoremap:function(m,$){this.map(m,$,"insert",!0)},nnoremap:function(m,$){this.map(m,$,"normal",!0)},vnoremap:function(m,$){this.map(m,$,"visual",!0)},onoremap:function(m,$){this.map(m,$,"operatorPending",!0)},unmap:function(m,$,k){var D=$.args;(!D||D.length<1||!fr.unmap(D[0],k))&&m&&zt(m,"No such mapping: "+$.input)},mapclear:function(m,$){wt.mapclear()},imapclear:function(m,$){wt.mapclear("insert")},nmapclear:function(m,$){wt.mapclear("normal")},vmapclear:function(m,$){wt.mapclear("visual")},omapclear:function(m,$){wt.mapclear("operatorPending")},move:function(m,$){On.processCommand(m,m.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:$.line+1})},set:function(m,$){var k=$.args,D=$.setCfg||{};if(!k||k.length<1){m&&zt(m,"Invalid mapping: "+$.input);return}var W=k[0].split("="),z=W[0],q=W[1],Y=!1,Q=!1;if(z.charAt(z.length-1)=="?"){if(q)throw Error("Trailing characters: "+$.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);q===void 0&&z.substring(0,2)=="no"&&(z=z.substring(2),q=!1);var re=jt[z]&&jt[z].type=="boolean";if(re&&(Q?q=!S(z,m,D):q==null&&(q=!0)),!re&&q===void 0||Y){var se=S(z,m,D);se instanceof Error?zt(m,se.message):se===!0||se===!1?zt(m," "+(se?"":"no")+z):zt(m," "+z+"="+se)}else{var ye=T(z,q,m,D);ye instanceof Error&&zt(m,ye.message)}},setlocal:function(m,$){$.setCfg={scope:"local"},this.set(m,$)},setglobal:function(m,$){$.setCfg={scope:"global"},this.set(m,$)},registers:function(m,$){var k=$.args,D=Be.registerController.registers,W=`----------Registers----------
1455
1455
 
1456
1456
  `;if(k){var z;k=k.join("");for(var q=0;q<k.length;q++)if(z=k.charAt(q),!!Be.registerController.isValidRegister(z)){var Y=D[z]||new B;W+='"'+z+" "+Y.toString()+`
1457
1457
  `}}else for(var z in D){var Q=D[z].toString();Q.length&&(W+='"'+z+" "+Q+`
1458
- `)}zt(m,W)},sort:function(m,$){function k(){if($.argString){var kt=new Pe.StringStream($.argString);if(kt.eat("!")&&(z=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var Tt=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Tt&&!kt.eol())return"Invalid arguments";if(Tt[1]){q=Tt[1].indexOf("i")!=-1,Y=Tt[1].indexOf("u")!=-1;var Xn=Tt[1].indexOf("d")!=-1||Tt[1].indexOf("n")!=-1&&1,lr=Tt[1].indexOf("x")!=-1&&1,xn=Tt[1].indexOf("o")!=-1&&1;if(Xn+lr+xn>1)return"Invalid arguments";Q=Xn&&"decimal"||lr&&"hex"||xn&&"octal"}Tt[2]&&(re=new RegExp(Tt[2].substr(1,Tt[2].length-2),q?"i":""))}}function D(kt,Tt){if(z){var Xn;Xn=kt,kt=Tt,Tt=Xn}q&&(kt=kt.toLowerCase(),Tt=Tt.toLowerCase());var lr=Q&&Le.exec(kt),xn=Q&&Le.exec(Tt);return lr?(lr=parseInt((lr[1]+lr[2]).toLowerCase(),Ue),xn=parseInt((xn[1]+xn[2]).toLowerCase(),Ue),lr-xn):kt<Tt?-1:1}function W(kt,Tt){if(z){var Xn;Xn=kt,kt=Tt,Tt=Xn}return q&&(kt[0]=kt[0].toLowerCase(),Tt[0]=Tt[0].toLowerCase()),kt[0]<Tt[0]?-1:1}var z,q,Y,Q,re,se=k();if(se){zt(m,se+": "+$.argString);return}var ye=$.line||m.firstLine(),Ce=$.lineEnd||$.line||m.lastLine();if(ye!=Ce){var me=new Ne(ye,0),we=new Ne(Ce,qt(m,Ce)),Oe=m.getRange(me,we).split(`
1459
- `),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ue=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var et=0;et<Oe.length;et++){var fn=re?Oe[et].match(re):null;fn&&fn[0]!=""?st.push(fn):!re&&Le.exec(Oe[et])?st.push(Oe[et]):Qe.push(Oe[et])}else Qe=Oe;if(st.sort(re?W:D),re)for(var et=0;et<st.length;et++)st[et]=st[et].input;else Q||Qe.sort(D);if(Oe=z?st.concat(Qe):Qe.concat(st),Y){var at=Oe,bn;Oe=[];for(var et=0;et<at.length;et++)at[et]!=bn&&Oe.push(at[et]),bn=at[et]}m.replaceRange(Oe.join(`
1460
- `),me,we)}},vglobal:function(m,$){this.global(m,$)},normal:function(m,$){var k=$.argString;if(k&&k[0]=="!"&&(k=k.slice(1),sn=!0),k=k.trimStart(),!k){zt(m,"Argument is required.");return}var D=$.line;if(typeof D=="number")for(var W=isNaN($.lineEnd)?D:$.lineEnd,z=D;z<=W;z++)m.setCursor(z,0),E(m,$.argString.trimStart()),m.state.vim.insertMode&&Hr(m,!0);else E(m,$.argString.trimStart()),m.state.vim.insertMode&&Hr(m,!0)},global:function(m,$){var k=$.argString;if(!k){zt(m,"Regular Expression missing from global");return}var D=$.commandName[0]==="v";k[0]==="!"&&$.commandName[0]==="g"&&(D=!0,k=k.slice(1));var W=$.line!==void 0?$.line:m.firstLine(),z=$.lineEnd||$.line||m.lastLine(),q=Cr(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{pn(m,Y,!0,!0)}catch{zt(m,"Invalid regex: "+Y);return}for(var re=Sn(m).getQuery(),se=[],ye=W;ye<=z;ye++){var Ce=m.getLine(ye),me=re.test(Ce);me!==D&&se.push(Q?m.getLineHandle(ye):Ce)}if(!Q){zt(m,se.join(`
1461
- `));return}var we=0,Oe=function(){if(we<se.length){var Le=se[we++],Ue=m.getLineNumber(Le);if(Ue==null){Oe();return}var st=Ue+1+Q;fr.processCommand(m,st,{callback:Oe})}else m.releaseLineHandles&&m.releaseLineHandles()};Oe()},substitute:function(m,$){if(!m.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=$.argString,D=k?Di(k,k[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],S("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(S("pcre")?z=Ua(z.replace(/([^\\])&/g,"$1$$&")):z=Ha(z),Be.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(k&&k.length){zt(m,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),S("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{pn(m,W,!0,!0)}catch{zt(m,"Invalid regex: "+W);return}if(z=z||Be.lastSubstituteReplacePart,z===void 0){zt(m,"No previous substitute regular expression");return}var ye=Sn(m),Ce=ye.getQuery(),me=$.line!==void 0?$.line:m.getCursor().line,we=$.lineEnd||me;me==m.firstLine()&&we==m.lastLine()&&(we=1/0),Q&&(me=we,we=me+Q-1);var Oe=ue(m,new Ne(me,0)),Le=m.getSearchCursor(Ce,Oe);No(m,re,se,me,we,Le,Ce,z,$.callback)},startinsert:function(m,$){E(m,$.argString=="!"?"A":"i",{})},redo:Pe.commands.redo,undo:Pe.commands.undo,write:function(m){Pe.commands.save?Pe.commands.save(m):m.save&&m.save()},nohlsearch:function(m){Oo(m)},yank:function(m){var $=qe(m.getCursor()),k=$.line,D=m.getLine(k);Be.registerController.pushText("0","yank",D,!0,!0)},delete:function(m,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;Uo.delete(m,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(D+1,0)}])},join:function(m,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;m.setCursor(new Ne(k,0)),On.joinLines(m,{repeat:D-k},m.state.vim)},delmarks:function(m,$){if(!$.argString||!dr($.argString)){zt(m,"Argument required");return}for(var k=m.state.vim,D=new Pe.StringStream(dr($.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){zt(m,"Invalid argument: "+$.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){zt(m,"Invalid argument: "+$.argString.substring(W));return}var q=z,Y=D.next();if(!(u(q)&&u(Y)||c(q)&&c(Y))){zt(m,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){zt(m,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete k.marks[ye]}}else delete k.marks[z]}}},fr=new gr;I("insertModeEscKeysTimeout",200,"number"),Pe.Vim=wt;var Ar={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"},ri=wt.handleKey.bind(wt);wt.handleKey=function(m,$,k){return m.operation(function(){return ri(m,$,k)},!0)},L(),r.CodeMirror=Pe;var ii=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(m,$,k,D,W){var z=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=$.top,re=$.left;if(!z.insertMode){var se=D.cursor?rr.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Pi.translate(m,re,Q),Pi.setStyle(m.style,"width",q+"px"),Pi.setStyle(m.style,"height",Y+"px")},$getDirectionForHighlight:function(m){var $=m.state.cm,k=ii($);if(!k.insertMode)return m.session.selection.isBackwards()||m.session.selection.isEmpty()},handleKeyboard:function(m,$,k,D,W){var z=m.editor,q=z.state.cm,Y=ii(q);if(D!=-1){if(Y.insertMode||($==-1?(k.charCodeAt(0)>255&&m.inputKey&&(k=m.inputKey,k&&m.inputHash==4&&(k=k.toUpperCase())),m.inputChar=k):$==4||$==0?m.inputKey==k&&m.inputHash==$&&m.inputChar?(k=m.inputChar,$=-1):(m.inputChar=null,m.inputKey=k,m.inputHash=$):m.inputChar=m.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&$==0)return{command:"gotoleft"};if(k=="c"&&$==1&&!ho.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){xt(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=Sn(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&k.length>1){var se=Y.insertMode,ye=Cs($,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=co(q,ye,"user");return Y=ii(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(m){function $(){var D=ii(k).insertMode;k.ace.renderer.setStyle("normal-mode",!D),m.textInput.setCommandMode(!D),m.renderer.$keepTextAreaAtCursor=D,m.renderer.$blockCursor=!D}m.state||(m.state={});var k=new Pe(m);m.state.cm=k,m.$vimModeHandler=this,h(k),ii(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(ii(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||($(),k._signal("changeStatus"))}),$(),m.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(m){var $=m.state.cm;p($),$.destroy(),m.state.cm=null,m.$vimModeHandler=null,m.renderer.$cursorLayer.drawCursor=null,m.renderer.setStyle("normal-mode",!1),m.textInput.setCommandMode(!1),m.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(m){var $=m.state.cm,k=ii($);if(k.insertMode)return"INSERT";var D="";return k.visualMode&&(D+="VISUAL",k.visualLine&&(D+=" LINE"),k.visualBlock&&(D+=" BLOCK")),k.status&&(D+=(D?" ":"")+k.status),D}},wt.defineOption({name:"wrap",set:function(m,$){$&&$.ace.setOption("wrap",m)},type:"boolean"},!1),wt.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"}),wt.defineOperator("hardWrap",function(m,$,k,D,W){var z=k[0].anchor.line,q=k[0].head.line;return $.linewise&&q--,Zi(m.ace,{startRow:z,endRow:q}),Ne(q,0)}),I("textwidth",void 0,"number",["tw"],function(m,$){if($!==void 0){if(m===void 0){var k=$.ace.getOption("printMarginColumn");return k}var D=Math.round(m);D>1&&$.ace.setOption("printMarginColumn",D)}}),On.aceCommand=function(m,$,k){m.vimCmd=$,m.ace.inVirtualSelectionMode?m.ace.on("beforeEndOperation",mi):mi(null,m.ace)},On.fold=function(m,$,k){m.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},go=An.length,r.handler.defaultKeymap=An,r.handler.actions=On,r.Vim=wt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(Xg)),Xg.exports}DC();var Tl={exports:{}};/**
1458
+ `)}zt(m,W)},sort:function(m,$){function k(){if($.argString){var kt=new Pe.StringStream($.argString);if(kt.eat("!")&&(z=!0),kt.eol())return;if(!kt.eatSpace())return"Invalid arguments";var Tt=kt.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!Tt&&!kt.eol())return"Invalid arguments";if(Tt[1]){q=Tt[1].indexOf("i")!=-1,Y=Tt[1].indexOf("u")!=-1;var Qn=Tt[1].indexOf("d")!=-1||Tt[1].indexOf("n")!=-1&&1,cr=Tt[1].indexOf("x")!=-1&&1,Cn=Tt[1].indexOf("o")!=-1&&1;if(Qn+cr+Cn>1)return"Invalid arguments";Q=Qn&&"decimal"||cr&&"hex"||Cn&&"octal"}Tt[2]&&(re=new RegExp(Tt[2].substr(1,Tt[2].length-2),q?"i":""))}}function D(kt,Tt){if(z){var Qn;Qn=kt,kt=Tt,Tt=Qn}q&&(kt=kt.toLowerCase(),Tt=Tt.toLowerCase());var cr=Q&&Le.exec(kt),Cn=Q&&Le.exec(Tt);return cr?(cr=parseInt((cr[1]+cr[2]).toLowerCase(),Ue),Cn=parseInt((Cn[1]+Cn[2]).toLowerCase(),Ue),cr-Cn):kt<Tt?-1:1}function W(kt,Tt){if(z){var Qn;Qn=kt,kt=Tt,Tt=Qn}return q&&(kt[0]=kt[0].toLowerCase(),Tt[0]=Tt[0].toLowerCase()),kt[0]<Tt[0]?-1:1}var z,q,Y,Q,re,se=k();if(se){zt(m,se+": "+$.argString);return}var ye=$.line||m.firstLine(),Ce=$.lineEnd||$.line||m.lastLine();if(ye!=Ce){var me=new Ne(ye,0),we=new Ne(Ce,qt(m,Ce)),Oe=m.getRange(me,we).split(`
1459
+ `),Le=re||(Q=="decimal"?/(-?)([\d]+)/:Q=="hex"?/(-?)(?:0x)?([0-9a-f]+)/i:Q=="octal"?/([0-7]+)/:null),Ue=Q=="decimal"?10:Q=="hex"?16:Q=="octal"?8:null,st=[],Qe=[];if(Q||re)for(var et=0;et<Oe.length;et++){var mn=re?Oe[et].match(re):null;mn&&mn[0]!=""?st.push(mn):!re&&Le.exec(Oe[et])?st.push(Oe[et]):Qe.push(Oe[et])}else Qe=Oe;if(st.sort(re?W:D),re)for(var et=0;et<st.length;et++)st[et]=st[et].input;else Q||Qe.sort(D);if(Oe=z?st.concat(Qe):Qe.concat(st),Y){var at=Oe,xn;Oe=[];for(var et=0;et<at.length;et++)at[et]!=xn&&Oe.push(at[et]),xn=at[et]}m.replaceRange(Oe.join(`
1460
+ `),me,we)}},vglobal:function(m,$){this.global(m,$)},normal:function(m,$){var k=$.argString;if(k&&k[0]=="!"&&(k=k.slice(1),sn=!0),k=k.trimStart(),!k){zt(m,"Argument is required.");return}var D=$.line;if(typeof D=="number")for(var W=isNaN($.lineEnd)?D:$.lineEnd,z=D;z<=W;z++)m.setCursor(z,0),E(m,$.argString.trimStart()),m.state.vim.insertMode&&Hr(m,!0);else E(m,$.argString.trimStart()),m.state.vim.insertMode&&Hr(m,!0)},global:function(m,$){var k=$.argString;if(!k){zt(m,"Regular Expression missing from global");return}var D=$.commandName[0]==="v";k[0]==="!"&&$.commandName[0]==="g"&&(D=!0,k=k.slice(1));var W=$.line!==void 0?$.line:m.firstLine(),z=$.lineEnd||$.line||m.lastLine(),q=Cr(k),Y=k,Q;if(q.length&&(Y=q[0],Q=q.slice(1,q.length).join("/")),Y)try{gn(m,Y,!0,!0)}catch{zt(m,"Invalid regex: "+Y);return}for(var re=An(m).getQuery(),se=[],ye=W;ye<=z;ye++){var Ce=m.getLine(ye),me=re.test(Ce);me!==D&&se.push(Q?m.getLineHandle(ye):Ce)}if(!Q){zt(m,se.join(`
1461
+ `));return}var we=0,Oe=function(){if(we<se.length){var Le=se[we++],Ue=m.getLineNumber(Le);if(Ue==null){Oe();return}var st=Ue+1+Q;fr.processCommand(m,st,{callback:Oe})}else m.releaseLineHandles&&m.releaseLineHandles()};Oe()},substitute:function(m,$){if(!m.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var k=$.argString,D=k?Di(k,k[0]):[],W,z="",q,Y,Q,re=!1,se=!1;if(D.length)W=D[0],S("pcre")&&W!==""&&(W=new RegExp(W).source),z=D[1],z!==void 0&&(S("pcre")?z=Ua(z.replace(/([^\\])&/g,"$1$$&")):z=Ha(z),Be.lastSubstituteReplacePart=z),q=D[2]?D[2].split(" "):[];else if(k&&k.length){zt(m,"Substitutions should be of the form :s/pattern/replace/");return}if(q&&(Y=q[0],Q=parseInt(q[1]),Y&&(Y.indexOf("c")!=-1&&(re=!0),Y.indexOf("g")!=-1&&(se=!0),S("pcre")?W=W+"/"+Y:W=W.replace(/\//g,"\\/")+"/"+Y)),W)try{gn(m,W,!0,!0)}catch{zt(m,"Invalid regex: "+W);return}if(z=z||Be.lastSubstituteReplacePart,z===void 0){zt(m,"No previous substitute regular expression");return}var ye=An(m),Ce=ye.getQuery(),me=$.line!==void 0?$.line:m.getCursor().line,we=$.lineEnd||me;me==m.firstLine()&&we==m.lastLine()&&(we=1/0),Q&&(me=we,we=me+Q-1);var Oe=ue(m,new Ne(me,0)),Le=m.getSearchCursor(Ce,Oe);No(m,re,se,me,we,Le,Ce,z,$.callback)},startinsert:function(m,$){E(m,$.argString=="!"?"A":"i",{})},redo:Pe.commands.redo,undo:Pe.commands.undo,write:function(m){Pe.commands.save?Pe.commands.save(m):m.save&&m.save()},nohlsearch:function(m){Oo(m)},yank:function(m){var $=qe(m.getCursor()),k=$.line,D=m.getLine(k);Be.registerController.pushText("0","yank",D,!0,!0)},delete:function(m,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;Uo.delete(m,{linewise:!0},[{anchor:new Ne(k,0),head:new Ne(D+1,0)}])},join:function(m,$){var k=$.selectionLine,D=isNaN($.selectionLineEnd)?k:$.selectionLineEnd;m.setCursor(new Ne(k,0)),Nn.joinLines(m,{repeat:D-k},m.state.vim)},delmarks:function(m,$){if(!$.argString||!dr($.argString)){zt(m,"Argument required");return}for(var k=m.state.vim,D=new Pe.StringStream(dr($.argString));!D.eol();){D.eatSpace();var W=D.pos;if(!D.match(/[a-zA-Z]/,!1)){zt(m,"Invalid argument: "+$.argString.substring(W));return}var z=D.next();if(D.match("-",!0)){if(!D.match(/[a-zA-Z]/,!1)){zt(m,"Invalid argument: "+$.argString.substring(W));return}var q=z,Y=D.next();if(!(u(q)&&u(Y)||c(q)&&c(Y))){zt(m,"Invalid argument: "+q+"-");return}var Q=q.charCodeAt(0),re=Y.charCodeAt(0);if(Q>=re){zt(m,"Invalid argument: "+$.argString.substring(W));return}for(var se=0;se<=re-Q;se++){var ye=String.fromCharCode(Q+se);delete k.marks[ye]}}else delete k.marks[z]}}},fr=new gr;I("insertModeEscKeysTimeout",200,"number"),Pe.Vim=wt;var Ar={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"},ri=wt.handleKey.bind(wt);wt.handleKey=function(m,$,k){return m.operation(function(){return ri(m,$,k)},!0)},L(),r.CodeMirror=Pe;var ii=wt.maybeInitVimState_;r.handler={$id:"ace/keyboard/vim",drawCursor:function(m,$,k,D,W){var z=this.state.vim||{},q=k.characterWidth,Y=k.lineHeight,Q=$.top,re=$.left;if(!z.insertMode){var se=D.cursor?ir.comparePoints(D.cursor,D.start)<=0:W.selection.isBackwards()||W.selection.isEmpty();!se&&re>q&&(re-=q)}!z.insertMode&&z.status&&(Y/=2,Q+=Y),Pi.translate(m,re,Q),Pi.setStyle(m.style,"width",q+"px"),Pi.setStyle(m.style,"height",Y+"px")},$getDirectionForHighlight:function(m){var $=m.state.cm,k=ii($);if(!k.insertMode)return m.session.selection.isBackwards()||m.session.selection.isEmpty()},handleKeyboard:function(m,$,k,D,W){var z=m.editor,q=z.state.cm,Y=ii(q);if(D!=-1){if(Y.insertMode||($==-1?(k.charCodeAt(0)>255&&m.inputKey&&(k=m.inputKey,k&&m.inputHash==4&&(k=k.toUpperCase())),m.inputChar=k):$==4||$==0?m.inputKey==k&&m.inputHash==$&&m.inputChar?(k=m.inputChar,$=-1):(m.inputChar=null,m.inputKey=k,m.inputHash=$):m.inputChar=m.inputKey=null),q.state.overwrite&&Y.insertMode&&k=="backspace"&&$==0)return{command:"gotoleft"};if(k=="c"&&$==1&&!ho.isMac&&z.getCopyText())return z.once("copy",function(){Y.insertMode?z.selection.clearSelection():q.operation(function(){xt(q)})}),{command:"null",passEvent:!0};if(k=="esc"&&!Y.insertMode&&!Y.visualMode&&!q.ace.inMultiSelectMode){var Q=An(q),re=Q.getOverlay();re&&q.removeOverlay(re)}if($==-1||$&1||$===0&&k.length>1){var se=Y.insertMode,ye=Cs($,k,W||{},Y);Y.status==null&&(Y.status="");var Ce=co(q,ye,"user");return Y=ii(q),Ce&&Y.status!=null?Y.status+=ye:Y.status==null&&(Y.status=""),q._signal("changeStatus"),!Ce&&($!=-1||se)?void 0:{command:"null",passEvent:!Ce}}}},attach:function(m){function $(){var D=ii(k).insertMode;k.ace.renderer.setStyle("normal-mode",!D),m.textInput.setCommandMode(!D),m.renderer.$keepTextAreaAtCursor=D,m.renderer.$blockCursor=!D}m.state||(m.state={});var k=new Pe(m);m.state.cm=k,m.$vimModeHandler=this,h(k),ii(k).status=null,k.on("vim-command-done",function(){k.virtualSelectionMode()||(ii(k).status=null,k.ace._signal("changeStatus"),k.ace.session.markUndoGroup())}),k.on("changeStatus",function(){k.ace.renderer.updateCursor(),k.ace._signal("changeStatus")}),k.on("vim-mode-change",function(){k.virtualSelectionMode()||($(),k._signal("changeStatus"))}),$(),m.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(k)},detach:function(m){var $=m.state.cm;p($),$.destroy(),m.state.cm=null,m.$vimModeHandler=null,m.renderer.$cursorLayer.drawCursor=null,m.renderer.setStyle("normal-mode",!1),m.textInput.setCommandMode(!1),m.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(m){var $=m.state.cm,k=ii($);if(k.insertMode)return"INSERT";var D="";return k.visualMode&&(D+="VISUAL",k.visualLine&&(D+=" LINE"),k.visualBlock&&(D+=" BLOCK")),k.status&&(D+=(D?" ":"")+k.status),D}},wt.defineOption({name:"wrap",set:function(m,$){$&&$.ace.setOption("wrap",m)},type:"boolean"},!1),wt.defineEx("write","w",function(){console.log(":write is not implemented")}),_n.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"}}),_n.push({keys:"gq",type:"operator",operator:"hardWrap"}),wt.defineOperator("hardWrap",function(m,$,k,D,W){var z=k[0].anchor.line,q=k[0].head.line;return $.linewise&&q--,Zi(m.ace,{startRow:z,endRow:q}),Ne(q,0)}),I("textwidth",void 0,"number",["tw"],function(m,$){if($!==void 0){if(m===void 0){var k=$.ace.getOption("printMarginColumn");return k}var D=Math.round(m);D>1&&$.ace.setOption("printMarginColumn",D)}}),Nn.aceCommand=function(m,$,k){m.vimCmd=$,m.ace.inVirtualSelectionMode?m.ace.on("beforeEndOperation",mi):mi(null,m.ace)},Nn.fold=function(m,$,k){m.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][($.all?2:0)+($.open?1:0)])},go=_n.length,r.handler.defaultKeymap=_n,r.handler.actions=Nn,r.Vim=wt}),function(){ace.require(["ace/keyboard/vim"],function(e){n&&(n.exports=e)})}()}(Xg)),Xg.exports}DC();var Tl={exports:{}};/**
1462
1462
  * @license
1463
1463
  * Lodash <https://lodash.com/>
1464
1464
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1465
1465
  * Released under MIT license <https://lodash.com/license>
1466
1466
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1467
1467
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1468
- */var FC=Tl.exports,Zg;function PC(){return Zg||(Zg=1,function(n,t){(function(){var e,r="4.17.21",v=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",x="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,s="__lodash_placeholder__",a=1,u=2,l=4,o=1,c=2,d=1,w=2,b=4,I=8,T=16,S=32,C=64,R=128,L=256,F=512,E=30,H="...",P=800,O=16,_=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",R],["bind",d],["bindKey",w],["curry",I],["curryRight",T],["flip",F],["partial",S],["partialRight",C],["rearg",L]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",$e="[object Boolean]",Te="[object Date]",Ee="[object DOMException]",Ge="[object Error]",qe="[object Function]",ut="[object GeneratorFunction]",tt="[object Map]",ht="[object Number]",Zt="[object Null]",hn="[object Object]",qt="[object Promise]",dr="[object Proxy]",dn="[object RegExp]",Mn="[object Set]",En="[object String]",Gn="[object Symbol]",vt="[object Undefined]",He="[object WeakMap]",ke="[object WeakSet]",ze="[object ArrayBuffer]",Ye="[object DataView]",dt="[object Float32Array]",Ct="[object Float64Array]",xt="[object Int8Array]",Rt="[object Int16Array]",Et="[object Int32Array]",ct="[object Uint8Array]",yt="[object Uint8ClampedArray]",wn="[object Uint16Array]",br="[object Uint32Array]",zr=/\b__p \+= '';/g,Li=/\b(__p \+=) '' \+/g,oo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pr=/&(?:amp|lt|gt|quot|#39);/g,so=/[&<>"']/g,Lo=RegExp(pr.source),za=RegExp(so.source),Zr=/<%-([\s\S]+?)%>/g,ja=/<%([\s\S]+?)%>/g,fs=/<%=([\s\S]+?)%>/g,ta=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,Bn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(xr.source),Sn=/^\s+/,Cr=/\s/,Gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,ms=/,? & /,na=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ha=/[()=,{}\[\]\/\s]/,Ua=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jr=/\w*$/,zt=/^[-+]0x[0-9a-f]+$/i,ra=/^0b[01]+$/i,kr=/^\[object .+?Constructor\]$/,zn=/^0o[0-7]+$/i,pn=/^(?:0|[1-9]\d*)$/,In=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gi=/($^)/,Sr=/['\n\r\u2028\u2029\\]/g,fi="\\ud800-\\udfff",Oo="\\u0300-\\u036f",vs="\\ufe20-\\ufe2f",Yi="\\u20d0-\\u20ff",jr=Oo+vs+Yi,ao="\\u2700-\\u27bf",No="a-z\\xdf-\\xf6\\xf8-\\xff",Hr="\\xac\\xb1\\xd7\\xf7",Do="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ys="\\u2000-\\u206f",ws=" \\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",Fo="A-Z\\xc0-\\xd6\\xd8-\\xde",nr="\\ufe0e\\ufe0f",bs=Hr+Do+ys+ws,lo="['’]",Po="["+fi+"]",Wo="["+bs+"]",Xi="["+jr+"]",xs="\\d+",ia="["+ao+"]",Bo="["+No+"]",zo="[^"+fi+bs+xs+ao+No+Fo+"]",Cs="\\ud83c[\\udffb-\\udfff]",jo="(?:"+Xi+"|"+Cs+")",co="[^"+fi+"]",mi="(?:\\ud83c[\\udde6-\\uddff]){2}",rr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="["+Fo+"]",Pi="\\u200d",oa="(?:"+Bo+"|"+zo+")",Va="(?:"+Qi+"|"+zo+")",uo="(?:"+lo+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+lo+"(?:D|LL|M|RE|S|T|VE))?",ho=jo+"?",Ho="["+nr+"]?",po="(?:"+Pi+"(?:"+[co,mi,rr].join("|")+")"+Ho+ho+")*",sa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pe=Ho+ho+po,aa="(?:"+[ia,mi,rr].join("|")+")"+Pe,Ne="(?:"+[co+Xi+"?",Xi,mi,rr,Po].join("|")+")",An=RegExp(lo,"g"),go=RegExp(Xi,"g"),ei=RegExp(Cs+"(?="+Cs+")|"+Ne+Pe,"g"),jn=RegExp([Qi+"?"+Bo+"+"+uo+"(?="+[Wo,Qi,"$"].join("|")+")",Va+"+"+Wi+"(?="+[Wo,Qi+oa,"$"].join("|")+")",Qi+"?"+oa+"+"+uo,Qi+"+"+Wi,Zi,sa,xs,aa].join("|"),"g"),la=RegExp("["+Pi+fi+jr+nr+"]"),fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vi=["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"],Ji=-1,Jt={};Jt[dt]=Jt[Ct]=Jt[xt]=Jt[Rt]=Jt[Et]=Jt[ct]=Jt[yt]=Jt[wn]=Jt[br]=!0,Jt[ue]=Jt[ce]=Jt[ze]=Jt[$e]=Jt[Ye]=Jt[Te]=Jt[Ge]=Jt[qe]=Jt[tt]=Jt[ht]=Jt[hn]=Jt[dn]=Jt[Mn]=Jt[En]=Jt[He]=!1;var Yt={};Yt[ue]=Yt[ce]=Yt[ze]=Yt[Ye]=Yt[$e]=Yt[Te]=Yt[dt]=Yt[Ct]=Yt[xt]=Yt[Rt]=Yt[Et]=Yt[tt]=Yt[ht]=Yt[hn]=Yt[dn]=Yt[Mn]=Yt[En]=Yt[Gn]=Yt[ct]=Yt[yt]=Yt[wn]=Yt[br]=!0,Yt[Ge]=Yt[qe]=Yt[He]=!1;var en={À:"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"},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Rn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,gn=parseInt,wt=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo,Ir=typeof self=="object"&&self&&self.Object===Object&&self,sn=wt||Ir||Function("return this")(),vn=t&&!t.nodeType&&t,Yn=vn&&!0&&n&&!n.nodeType&&n,Rr=Yn&&Yn.exports===vn,wi=Rr&&wt.process,Ln=function(){try{var pe=Yn&&Yn.require&&Yn.require("util").types;return pe||wi&&wi.binding&&wi.binding("util")}catch{}}(),Ur=Ln&&Ln.isArrayBuffer,Uo=Ln&&Ln.isDate,On=Ln&&Ln.isMap,ti=Ln&&Ln.isRegExp,ni=Ln&&Ln.isSet,bi=Ln&&Ln.isTypedArray;function sr(pe,Se,xe){switch(xe.length){case 0:return pe.call(Se);case 1:return pe.call(Se,xe[0]);case 2:return pe.call(Se,xe[0],xe[1]);case 3:return pe.call(Se,xe[0],xe[1],xe[2])}return pe.apply(Se,xe)}function ar(pe,Se,xe,je){for(var lt=-1,Mt=pe==null?0:pe.length;++lt<Mt;){var Kt=pe[lt];Se(je,Kt,xe(Kt),pe)}return je}function gr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je&&Se(pe[xe],xe,pe)!==!1;);return pe}function ks(pe,Se){for(var xe=pe==null?0:pe.length;xe--&&Se(pe[xe],xe,pe)!==!1;);return pe}function fr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(!Se(pe[xe],xe,pe))return!1;return!0}function Ar(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];Se(Kt,xe,pe)&&(Mt[lt++]=Kt)}return Mt}function ri(pe,Se){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Se,0)>-1}function ii(pe,Se,xe){for(var je=-1,lt=pe==null?0:pe.length;++je<lt;)if(xe(Se,pe[je]))return!0;return!1}function m(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,lt=Array(je);++xe<je;)lt[xe]=Se(pe[xe],xe,pe);return lt}function $(pe,Se){for(var xe=-1,je=Se.length,lt=pe.length;++xe<je;)pe[lt+xe]=Se[xe];return pe}function k(pe,Se,xe,je){var lt=-1,Mt=pe==null?0:pe.length;for(je&&Mt&&(xe=pe[++lt]);++lt<Mt;)xe=Se(xe,pe[lt],lt,pe);return xe}function D(pe,Se,xe,je){var lt=pe==null?0:pe.length;for(je&&lt&&(xe=pe[--lt]);lt--;)xe=Se(xe,pe[lt],lt,pe);return xe}function W(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(Se(pe[xe],xe,pe))return!0;return!1}var z=we("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(na)||[]}function Q(pe,Se,xe){var je;return xe(pe,function(lt,Mt,Kt){if(Se(lt,Mt,Kt))return je=Mt,!1}),je}function re(pe,Se,xe,je){for(var lt=pe.length,Mt=xe+(je?1:-1);je?Mt--:++Mt<lt;)if(Se(pe[Mt],Mt,pe))return Mt;return-1}function se(pe,Se,xe){return Se===Se?Ze(pe,Se,xe):re(pe,Ce,xe)}function ye(pe,Se,xe,je){for(var lt=xe-1,Mt=pe.length;++lt<Mt;)if(je(pe[lt],Se))return lt;return-1}function Ce(pe){return pe!==pe}function me(pe,Se){var xe=pe==null?0:pe.length;return xe?st(pe,Se)/xe:Z}function we(pe){return function(Se){return Se==null?e:Se[pe]}}function Oe(pe){return function(Se){return pe==null?e:pe[Se]}}function Le(pe,Se,xe,je,lt){return lt(pe,function(Mt,Kt,Lt){xe=je?(je=!1,Mt):Se(xe,Mt,Kt,Lt)}),xe}function Ue(pe,Se){var xe=pe.length;for(pe.sort(Se);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,Se){for(var xe,je=-1,lt=pe.length;++je<lt;){var Mt=Se(pe[je]);Mt!==e&&(xe=xe===e?Mt:xe+Mt)}return xe}function Qe(pe,Se){for(var xe=-1,je=Array(pe);++xe<pe;)je[xe]=Se(xe);return je}function et(pe,Se){return m(Se,function(xe){return[xe,pe[xe]]})}function fn(pe){return pe&&pe.slice(0,Dt(pe)+1).replace(Sn,"")}function at(pe){return function(Se){return pe(Se)}}function bn(pe,Se){return m(Se,function(xe){return pe[xe]})}function kt(pe,Se){return pe.has(Se)}function Tt(pe,Se){for(var xe=-1,je=pe.length;++xe<je&&se(Se,pe[xe],0)>-1;);return xe}function Xn(pe,Se){for(var xe=pe.length;xe--&&se(Se,pe[xe],0)>-1;);return xe}function lr(pe,Se){for(var xe=pe.length,je=0;xe--;)pe[xe]===Se&&++je;return je}var xn=Oe(en),V=Oe(jt);function X(pe){return"\\"+Rn[pe]}function ie(pe,Se){return pe==null?e:pe[Se]}function oe(pe){return la.test(pe)}function ge(pe){return fo.test(pe)}function be(pe){for(var Se,xe=[];!(Se=pe.next()).done;)xe.push(Se.value);return xe}function Me(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je,lt){xe[++Se]=[lt,je]}),xe}function Fe(pe,Se){return function(xe){return pe(Se(xe))}}function We(pe,Se){for(var xe=-1,je=pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];(Kt===Se||Kt===s)&&(pe[xe]=s,Mt[lt++]=xe)}return Mt}function Ve(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=je}),xe}function Xe(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=[je,je]}),xe}function Ze(pe,Se,xe){for(var je=xe-1,lt=pe.length;++je<lt;)if(pe[je]===Se)return je;return-1}function bt(pe,Se,xe){for(var je=xe+1;je--;)if(pe[je]===Se)return je;return je}function Pt(pe){return oe(pe)?rt(pe):z(pe)}function St(pe){return oe(pe)?un(pe):q(pe)}function Dt(pe){for(var Se=pe.length;Se--&&Cr.test(pe.charAt(Se)););return Se}var pt=Oe(yi);function rt(pe){for(var Se=ei.lastIndex=0;ei.test(pe);)++Se;return Se}function un(pe){return pe.match(ei)||[]}function Cn(pe){return pe.match(jn)||[]}var Qn=function pe(Se){Se=Se==null?sn:Ut.defaults(sn.Object(),Se,Ut.pick(sn,vi));var xe=Se.Array,je=Se.Date,lt=Se.Error,Mt=Se.Function,Kt=Se.Math,Lt=Se.Object,Lr=Se.RegExp,xi=Se.String,an=Se.TypeError,cr=xe.prototype,mo=Mt.prototype,Nn=Lt.prototype,Ss=Se["__core-js_shared__"],uc=mo.toString,on=Nn.hasOwnProperty,AM=0,_y=function(){var i=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),hc=Nn.toString,_M=uc.call(Lt),$M=sn._,TM=Lr("^"+uc.call(on).replace(xr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dc=Rr?Se.Buffer:e,Vo=Se.Symbol,pc=Se.Uint8Array,$y=dc?dc.allocUnsafe:e,gc=Fe(Lt.getPrototypeOf,Lt),Ty=Lt.create,My=Nn.propertyIsEnumerable,fc=cr.splice,Ey=Vo?Vo.isConcatSpreadable:e,qa=Vo?Vo.iterator:e,As=Vo?Vo.toStringTag:e,mc=function(){try{var i=Es(Lt,"defineProperty");return i({},"",{}),i}catch{}}(),MM=Se.clearTimeout!==sn.clearTimeout&&Se.clearTimeout,EM=je&&je.now!==sn.Date.now&&je.now,IM=Se.setTimeout!==sn.setTimeout&&Se.setTimeout,vc=Kt.ceil,yc=Kt.floor,rd=Lt.getOwnPropertySymbols,RM=dc?dc.isBuffer:e,Iy=Se.isFinite,LM=cr.join,OM=Fe(Lt.keys,Lt),ir=Kt.max,_r=Kt.min,NM=je.now,DM=Se.parseInt,Ry=Kt.random,FM=cr.reverse,id=Es(Se,"DataView"),Ka=Es(Se,"Map"),od=Es(Se,"Promise"),ca=Es(Se,"Set"),Ga=Es(Se,"WeakMap"),Ya=Es(Lt,"create"),wc=Ga&&new Ga,ua={},PM=Is(id),WM=Is(Ka),BM=Is(od),zM=Is(ca),jM=Is(Ga),bc=Vo?Vo.prototype:e,Xa=bc?bc.valueOf:e,Ly=bc?bc.toString:e;function J(i){if(Dn(i)&&!At(i)&&!(i instanceof Ht)){if(i instanceof Ci)return i;if(on.call(i,"__wrapped__"))return Ow(i)}return new Ci(i)}var ha=function(){function i(){}return function(g){if(!_n(g))return{};if(Ty)return Ty(g);i.prototype=g;var M=new i;return i.prototype=e,M}}();function xc(){}function Ci(i,g){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=e}J.templateSettings={escape:Zr,evaluate:ja,interpolate:fs,variable:"",imports:{_:J}},J.prototype=xc.prototype,J.prototype.constructor=J,Ci.prototype=ha(xc.prototype),Ci.prototype.constructor=Ci;function Ht(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function HM(){var i=new Ht(this.__wrapped__);return i.__actions__=Vr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Vr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Vr(this.__views__),i}function UM(){if(this.__filtered__){var i=new Ht(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function VM(){var i=this.__wrapped__.value(),g=this.__dir__,M=At(i),j=g<0,G=M?i.length:0,ee=rI(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=j?de:le-1,Re=this.__iteratees__,De=Re.length,Ke=0,nt=_r(ve,this.__takeCount__);if(!M||!j&&G==ve&&nt==ve)return rw(i,this.__actions__);var ft=[];e:for(;ve--&&Ke<nt;){Ie+=g;for(var Ot=-1,mt=i[Ie];++Ot<De;){var Wt=Re[Ot],Vt=Wt.iteratee,ai=Wt.type,Dr=Vt(mt);if(ai==A)mt=Dr;else if(!Dr){if(ai==_)continue e;break e}}ft[Ke++]=mt}return ft}Ht.prototype=ha(xc.prototype),Ht.prototype.constructor=Ht;function _s(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function qM(){this.__data__=Ya?Ya(null):{},this.size=0}function KM(i){var g=this.has(i)&&delete this.__data__[i];return this.size-=g?1:0,g}function GM(i){var g=this.__data__;if(Ya){var M=g[i];return M===h?e:M}return on.call(g,i)?g[i]:e}function YM(i){var g=this.__data__;return Ya?g[i]!==e:on.call(g,i)}function XM(i,g){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=Ya&&g===e?h:g,this}_s.prototype.clear=qM,_s.prototype.delete=KM,_s.prototype.get=GM,_s.prototype.has=YM,_s.prototype.set=XM;function vo(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function QM(){this.__data__=[],this.size=0}function ZM(i){var g=this.__data__,M=Cc(g,i);if(M<0)return!1;var j=g.length-1;return M==j?g.pop():fc.call(g,M,1),--this.size,!0}function JM(i){var g=this.__data__,M=Cc(g,i);return M<0?e:g[M][1]}function eE(i){return Cc(this.__data__,i)>-1}function tE(i,g){var M=this.__data__,j=Cc(M,i);return j<0?(++this.size,M.push([i,g])):M[j][1]=g,this}vo.prototype.clear=QM,vo.prototype.delete=ZM,vo.prototype.get=JM,vo.prototype.has=eE,vo.prototype.set=tE;function yo(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function nE(){this.size=0,this.__data__={hash:new _s,map:new(Ka||vo),string:new _s}}function rE(i){var g=Oc(this,i).delete(i);return this.size-=g?1:0,g}function iE(i){return Oc(this,i).get(i)}function oE(i){return Oc(this,i).has(i)}function sE(i,g){var M=Oc(this,i),j=M.size;return M.set(i,g),this.size+=M.size==j?0:1,this}yo.prototype.clear=nE,yo.prototype.delete=rE,yo.prototype.get=iE,yo.prototype.has=oE,yo.prototype.set=sE;function $s(i){var g=-1,M=i==null?0:i.length;for(this.__data__=new yo;++g<M;)this.add(i[g])}function aE(i){return this.__data__.set(i,h),this}function lE(i){return this.__data__.has(i)}$s.prototype.add=$s.prototype.push=aE,$s.prototype.has=lE;function Bi(i){var g=this.__data__=new vo(i);this.size=g.size}function cE(){this.__data__=new vo,this.size=0}function uE(i){var g=this.__data__,M=g.delete(i);return this.size=g.size,M}function hE(i){return this.__data__.get(i)}function dE(i){return this.__data__.has(i)}function pE(i,g){var M=this.__data__;if(M instanceof vo){var j=M.__data__;if(!Ka||j.length<v-1)return j.push([i,g]),this.size=++M.size,this;M=this.__data__=new yo(j)}return M.set(i,g),this.size=M.size,this}Bi.prototype.clear=cE,Bi.prototype.delete=uE,Bi.prototype.get=hE,Bi.prototype.has=dE,Bi.prototype.set=pE;function Oy(i,g){var M=At(i),j=!M&&Rs(i),G=!M&&!j&&Xo(i),ee=!M&&!j&&!G&&fa(i),le=M||j||G||ee,de=le?Qe(i.length,xi):[],ve=de.length;for(var Ie in i)(g||on.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Co(Ie,ve)))&&de.push(Ie);return de}function Ny(i){var g=i.length;return g?i[md(0,g-1)]:e}function gE(i,g){return Nc(Vr(i),Ts(g,0,i.length))}function fE(i){return Nc(Vr(i))}function sd(i,g,M){(M!==e&&!zi(i[g],M)||M===e&&!(g in i))&&wo(i,g,M)}function Qa(i,g,M){var j=i[g];(!(on.call(i,g)&&zi(j,M))||M===e&&!(g in i))&&wo(i,g,M)}function Cc(i,g){for(var M=i.length;M--;)if(zi(i[M][0],g))return M;return-1}function mE(i,g,M,j){return qo(i,function(G,ee,le){g(j,G,M(G),le)}),j}function Dy(i,g){return i&&to(g,ur(g),i)}function vE(i,g){return i&&to(g,Kr(g),i)}function wo(i,g,M){g=="__proto__"&&mc?mc(i,g,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[g]=M}function ad(i,g){for(var M=-1,j=g.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?e:zd(i,g[M]);return G}function Ts(i,g,M){return i===i&&(M!==e&&(i=i<=M?i:M),g!==e&&(i=i>=g?i:g)),i}function ki(i,g,M,j,G,ee){var le,de=g&a,ve=g&u,Ie=g&l;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==e)return le;if(!_n(i))return i;var Re=At(i);if(Re){if(le=oI(i),!de)return Vr(i,le)}else{var De=$r(i),Ke=De==qe||De==ut;if(Xo(i))return sw(i,de);if(De==hn||De==ue||Ke&&!G){if(le=ve||Ke?{}:Aw(i),!de)return ve?GE(i,vE(le,i)):KE(i,Dy(le,i))}else{if(!Yt[De])return G?i:{};le=sI(i,De,de)}}ee||(ee=new Bi);var nt=ee.get(i);if(nt)return nt;ee.set(i,le),eb(i)?i.forEach(function(mt){le.add(ki(mt,g,M,mt,i,ee))}):Zw(i)&&i.forEach(function(mt,Wt){le.set(Wt,ki(mt,g,M,Wt,i,ee))});var ft=Ie?ve?$d:_d:ve?Kr:ur,Ot=Re?e:ft(i);return gr(Ot||i,function(mt,Wt){Ot&&(Wt=mt,mt=i[Wt]),Qa(le,Wt,ki(mt,g,M,Wt,i,ee))}),le}function yE(i){var g=ur(i);return function(M){return Fy(M,i,g)}}function Fy(i,g,M){var j=M.length;if(i==null)return!j;for(i=Lt(i);j--;){var G=M[j],ee=g[G],le=i[G];if(le===e&&!(G in i)||!ee(le))return!1}return!0}function Py(i,g,M){if(typeof i!="function")throw new an(y);return il(function(){i.apply(e,M)},g)}function Za(i,g,M,j){var G=-1,ee=ri,le=!0,de=i.length,ve=[],Ie=g.length;if(!de)return ve;M&&(g=m(g,at(M))),j?(ee=ii,le=!1):g.length>=v&&(ee=kt,le=!1,g=new $s(g));e:for(;++G<de;){var Re=i[G],De=M==null?Re:M(Re);if(Re=j||Re!==0?Re:0,le&&De===De){for(var Ke=Ie;Ke--;)if(g[Ke]===De)continue e;ve.push(Re)}else ee(g,De,j)||ve.push(Re)}return ve}var qo=hw(eo),Wy=hw(cd,!0);function wE(i,g){var M=!0;return qo(i,function(j,G,ee){return M=!!g(j,G,ee),M}),M}function kc(i,g,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=g(ee);if(le!=null&&(de===e?le===le&&!si(le):M(le,de)))var de=le,ve=ee}return ve}function bE(i,g,M,j){var G=i.length;for(M=It(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:It(j),j<0&&(j+=G),j=M>j?0:nb(j);M<j;)i[M++]=g;return i}function By(i,g){var M=[];return qo(i,function(j,G,ee){g(j,G,ee)&&M.push(j)}),M}function mr(i,g,M,j,G){var ee=-1,le=i.length;for(M||(M=lI),G||(G=[]);++ee<le;){var de=i[ee];g>0&&M(de)?g>1?mr(de,g-1,M,j,G):$(G,de):j||(G[G.length]=de)}return G}var ld=dw(),zy=dw(!0);function eo(i,g){return i&&ld(i,g,ur)}function cd(i,g){return i&&zy(i,g,ur)}function Sc(i,g){return Ar(g,function(M){return ko(i[M])})}function Ms(i,g){g=Go(g,i);for(var M=0,j=g.length;i!=null&&M<j;)i=i[no(g[M++])];return M&&M==j?i:e}function jy(i,g,M){var j=g(i);return At(i)?j:$(j,M(i))}function Or(i){return i==null?i===e?vt:Zt:As&&As in Lt(i)?nI(i):fI(i)}function ud(i,g){return i>g}function xE(i,g){return i!=null&&on.call(i,g)}function CE(i,g){return i!=null&&g in Lt(i)}function kE(i,g,M){return i>=_r(g,M)&&i<ir(g,M)}function hd(i,g,M){for(var j=M?ii:ri,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Re=i[le];le&&g&&(Re=m(Re,at(g))),ve=_r(Re.length,ve),de[le]=!M&&(g||G>=120&&Re.length>=120)?new $s(le&&Re):e}Re=i[0];var De=-1,Ke=de[0];e:for(;++De<G&&Ie.length<ve;){var nt=Re[De],ft=g?g(nt):nt;if(nt=M||nt!==0?nt:0,!(Ke?kt(Ke,ft):j(Ie,ft,M))){for(le=ee;--le;){var Ot=de[le];if(!(Ot?kt(Ot,ft):j(i[le],ft,M)))continue e}Ke&&Ke.push(ft),Ie.push(nt)}}return Ie}function SE(i,g,M,j){return eo(i,function(G,ee,le){g(j,M(G),ee,le)}),j}function Ja(i,g,M){g=Go(g,i),i=Mw(i,g);var j=i==null?i:i[no(Ai(g))];return j==null?e:sr(j,i,M)}function Hy(i){return Dn(i)&&Or(i)==ue}function AE(i){return Dn(i)&&Or(i)==ze}function _E(i){return Dn(i)&&Or(i)==Te}function el(i,g,M,j,G){return i===g?!0:i==null||g==null||!Dn(i)&&!Dn(g)?i!==i&&g!==g:$E(i,g,M,j,el,G)}function $E(i,g,M,j,G,ee){var le=At(i),de=At(g),ve=le?ce:$r(i),Ie=de?ce:$r(g);ve=ve==ue?hn:ve,Ie=Ie==ue?hn:Ie;var Re=ve==hn,De=Ie==hn,Ke=ve==Ie;if(Ke&&Xo(i)){if(!Xo(g))return!1;le=!0,Re=!1}if(Ke&&!Re)return ee||(ee=new Bi),le||fa(i)?Cw(i,g,M,j,G,ee):eI(i,g,ve,M,j,G,ee);if(!(M&o)){var nt=Re&&on.call(i,"__wrapped__"),ft=De&&on.call(g,"__wrapped__");if(nt||ft){var Ot=nt?i.value():i,mt=ft?g.value():g;return ee||(ee=new Bi),G(Ot,mt,M,j,ee)}}return Ke?(ee||(ee=new Bi),tI(i,g,M,j,G,ee)):!1}function TE(i){return Dn(i)&&$r(i)==tt}function dd(i,g,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Lt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Re=de[1];if(le&&de[2]){if(Ie===e&&!(ve in i))return!1}else{var De=new Bi;if(j)var Ke=j(Ie,Re,ve,i,g,De);if(!(Ke===e?el(Re,Ie,o|c,j,De):Ke))return!1}}return!0}function Uy(i){if(!_n(i)||uI(i))return!1;var g=ko(i)?TM:kr;return g.test(Is(i))}function ME(i){return Dn(i)&&Or(i)==dn}function EE(i){return Dn(i)&&$r(i)==Mn}function IE(i){return Dn(i)&&zc(i.length)&&!!Jt[Or(i)]}function Vy(i){return typeof i=="function"?i:i==null?Gr:typeof i=="object"?At(i)?Gy(i[0],i[1]):Ky(i):pb(i)}function pd(i){if(!rl(i))return OM(i);var g=[];for(var M in Lt(i))on.call(i,M)&&M!="constructor"&&g.push(M);return g}function RE(i){if(!_n(i))return gI(i);var g=rl(i),M=[];for(var j in i)j=="constructor"&&(g||!on.call(i,j))||M.push(j);return M}function gd(i,g){return i<g}function qy(i,g){var M=-1,j=qr(i)?xe(i.length):[];return qo(i,function(G,ee,le){j[++M]=g(G,ee,le)}),j}function Ky(i){var g=Md(i);return g.length==1&&g[0][2]?$w(g[0][0],g[0][1]):function(M){return M===i||dd(M,i,g)}}function Gy(i,g){return Id(i)&&_w(g)?$w(no(i),g):function(M){var j=zd(M,i);return j===e&&j===g?jd(M,i):el(g,j,o|c)}}function Ac(i,g,M,j,G){i!==g&&ld(g,function(ee,le){if(G||(G=new Bi),_n(ee))LE(i,g,le,M,Ac,j,G);else{var de=j?j(Ld(i,le),ee,le+"",i,g,G):e;de===e&&(de=ee),sd(i,le,de)}},Kr)}function LE(i,g,M,j,G,ee,le){var de=Ld(i,M),ve=Ld(g,M),Ie=le.get(ve);if(Ie){sd(i,M,Ie);return}var Re=ee?ee(de,ve,M+"",i,g,le):e,De=Re===e;if(De){var Ke=At(ve),nt=!Ke&&Xo(ve),ft=!Ke&&!nt&&fa(ve);Re=ve,Ke||nt||ft?At(de)?Re=de:Hn(de)?Re=Vr(de):nt?(De=!1,Re=sw(ve,!0)):ft?(De=!1,Re=aw(ve,!0)):Re=[]:ol(ve)||Rs(ve)?(Re=de,Rs(de)?Re=rb(de):(!_n(de)||ko(de))&&(Re=Aw(ve))):De=!1}De&&(le.set(ve,Re),G(Re,ve,j,ee,le),le.delete(ve)),sd(i,M,Re)}function Yy(i,g){var M=i.length;if(M)return g+=g<0?M:0,Co(g,M)?i[g]:e}function Xy(i,g,M){g.length?g=m(g,function(ee){return At(ee)?function(le){return Ms(le,ee.length===1?ee[0]:ee)}:ee}):g=[Gr];var j=-1;g=m(g,at(gt()));var G=qy(i,function(ee,le,de){var ve=m(g,function(Ie){return Ie(ee)});return{criteria:ve,index:++j,value:ee}});return Ue(G,function(ee,le){return qE(ee,le,M)})}function OE(i,g){return Qy(i,g,function(M,j){return jd(i,j)})}function Qy(i,g,M){for(var j=-1,G=g.length,ee={};++j<G;){var le=g[j],de=Ms(i,le);M(de,le)&&tl(ee,Go(le,i),de)}return ee}function NE(i){return function(g){return Ms(g,i)}}function fd(i,g,M,j){var G=j?ye:se,ee=-1,le=g.length,de=i;for(i===g&&(g=Vr(g)),M&&(de=m(i,at(M)));++ee<le;)for(var ve=0,Ie=g[ee],Re=M?M(Ie):Ie;(ve=G(de,Re,ve,j))>-1;)de!==i&&fc.call(de,ve,1),fc.call(i,ve,1);return i}function Zy(i,g){for(var M=i?g.length:0,j=M-1;M--;){var G=g[M];if(M==j||G!==ee){var ee=G;Co(G)?fc.call(i,G,1):wd(i,G)}}return i}function md(i,g){return i+yc(Ry()*(g-i+1))}function DE(i,g,M,j){for(var G=-1,ee=ir(vc((g-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function vd(i,g){var M="";if(!i||g<1||g>U)return M;do g%2&&(M+=i),g=yc(g/2),g&&(i+=i);while(g);return M}function Ft(i,g){return Od(Tw(i,g,Gr),i+"")}function FE(i){return Ny(ma(i))}function PE(i,g){var M=ma(i);return Nc(M,Ts(g,0,M.length))}function tl(i,g,M,j){if(!_n(i))return i;g=Go(g,i);for(var G=-1,ee=g.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=no(g[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Re=de[ve];Ie=j?j(Re,ve,de):e,Ie===e&&(Ie=_n(Re)?Re:Co(g[G+1])?[]:{})}Qa(de,ve,Ie),de=de[ve]}return i}var Jy=wc?function(i,g){return wc.set(i,g),i}:Gr,WE=mc?function(i,g){return mc(i,"toString",{configurable:!0,enumerable:!1,value:Ud(g),writable:!0})}:Gr;function BE(i){return Nc(ma(i))}function Si(i,g,M){var j=-1,G=i.length;g<0&&(g=-g>G?0:G+g),M=M>G?G:M,M<0&&(M+=G),G=g>M?0:M-g>>>0,g>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+g];return ee}function zE(i,g){var M;return qo(i,function(j,G,ee){return M=g(j,G,ee),!M}),!!M}function _c(i,g,M){var j=0,G=i==null?j:i.length;if(typeof g=="number"&&g===g&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!si(le)&&(M?le<=g:le<g)?j=ee+1:G=ee}return G}return yd(i,g,Gr,M)}function yd(i,g,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;g=M(g);for(var le=g!==g,de=g===null,ve=si(g),Ie=g===e;G<ee;){var Re=yc((G+ee)/2),De=M(i[Re]),Ke=De!==e,nt=De===null,ft=De===De,Ot=si(De);if(le)var mt=j||ft;else Ie?mt=ft&&(j||Ke):de?mt=ft&&Ke&&(j||!nt):ve?mt=ft&&Ke&&!nt&&(j||!Ot):nt||Ot?mt=!1:mt=j?De<=g:De<g;mt?G=Re+1:ee=Re}return _r(ee,he)}function ew(i,g){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=g?g(le):le;if(!M||!zi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function tw(i){return typeof i=="number"?i:si(i)?Z:+i}function oi(i){if(typeof i=="string")return i;if(At(i))return m(i,oi)+"";if(si(i))return Ly?Ly.call(i):"";var g=i+"";return g=="0"&&1/i==-1/0?"-0":g}function Ko(i,g,M){var j=-1,G=ri,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=ii;else if(ee>=v){var Ie=g?null:ZE(i);if(Ie)return Ve(Ie);le=!1,G=kt,ve=new $s}else ve=g?[]:de;e:for(;++j<ee;){var Re=i[j],De=g?g(Re):Re;if(Re=M||Re!==0?Re:0,le&&De===De){for(var Ke=ve.length;Ke--;)if(ve[Ke]===De)continue e;g&&ve.push(De),de.push(Re)}else G(ve,De,M)||(ve!==de&&ve.push(De),de.push(Re))}return de}function wd(i,g){return g=Go(g,i),i=Mw(i,g),i==null||delete i[no(Ai(g))]}function nw(i,g,M,j){return tl(i,g,M(Ms(i,g)),j)}function $c(i,g,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&g(i[ee],ee,i););return M?Si(i,j?0:ee,j?ee+1:G):Si(i,j?ee+1:0,j?G:ee)}function rw(i,g){var M=i;return M instanceof Ht&&(M=M.value()),k(g,function(j,G){return G.func.apply(G.thisArg,$([j],G.args))},M)}function bd(i,g,M){var j=i.length;if(j<2)return j?Ko(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=Za(ee[G]||le,i[de],g,M));return Ko(mr(ee,1),g,M)}function iw(i,g,M){for(var j=-1,G=i.length,ee=g.length,le={};++j<G;){var de=j<ee?g[j]:e;M(le,i[j],de)}return le}function xd(i){return Hn(i)?i:[]}function Cd(i){return typeof i=="function"?i:Gr}function Go(i,g){return At(i)?i:Id(i,g)?[i]:Lw(nn(i))}var jE=Ft;function Yo(i,g,M){var j=i.length;return M=M===e?j:M,!g&&M>=j?i:Si(i,g,M)}var ow=MM||function(i){return sn.clearTimeout(i)};function sw(i,g){if(g)return i.slice();var M=i.length,j=$y?$y(M):new i.constructor(M);return i.copy(j),j}function kd(i){var g=new i.constructor(i.byteLength);return new pc(g).set(new pc(i)),g}function HE(i,g){var M=g?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function UE(i){var g=new i.constructor(i.source,Jr.exec(i));return g.lastIndex=i.lastIndex,g}function VE(i){return Xa?Lt(Xa.call(i)):{}}function aw(i,g){var M=g?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function lw(i,g){if(i!==g){var M=i!==e,j=i===null,G=i===i,ee=si(i),le=g!==e,de=g===null,ve=g===g,Ie=si(g);if(!de&&!Ie&&!ee&&i>g||ee&&le&&ve&&!de&&!Ie||j&&le&&ve||!M&&ve||!G)return 1;if(!j&&!ee&&!Ie&&i<g||Ie&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function qE(i,g,M){for(var j=-1,G=i.criteria,ee=g.criteria,le=G.length,de=M.length;++j<le;){var ve=lw(G[j],ee[j]);if(ve){if(j>=de)return ve;var Ie=M[j];return ve*(Ie=="desc"?-1:1)}}return i.index-g.index}function cw(i,g,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=g.length,Ie=ir(ee-le,0),Re=xe(ve+Ie),De=!j;++de<ve;)Re[de]=g[de];for(;++G<le;)(De||G<ee)&&(Re[M[G]]=i[G]);for(;Ie--;)Re[de++]=i[G++];return Re}function uw(i,g,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=g.length,Re=ir(ee-de,0),De=xe(Re+Ie),Ke=!j;++G<Re;)De[G]=i[G];for(var nt=G;++ve<Ie;)De[nt+ve]=g[ve];for(;++le<de;)(Ke||G<ee)&&(De[nt+M[le]]=i[G++]);return De}function Vr(i,g){var M=-1,j=i.length;for(g||(g=xe(j));++M<j;)g[M]=i[M];return g}function to(i,g,M,j){var G=!M;M||(M={});for(var ee=-1,le=g.length;++ee<le;){var de=g[ee],ve=j?j(M[de],i[de],de,M,i):e;ve===e&&(ve=i[de]),G?wo(M,de,ve):Qa(M,de,ve)}return M}function KE(i,g){return to(i,Ed(i),g)}function GE(i,g){return to(i,kw(i),g)}function Tc(i,g){return function(M,j){var G=At(M)?ar:mE,ee=g?g():{};return G(M,i,gt(j,2),ee)}}function da(i){return Ft(function(g,M){var j=-1,G=M.length,ee=G>1?M[G-1]:e,le=G>2?M[2]:e;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):e,le&&Nr(M[0],M[1],le)&&(ee=G<3?e:ee,G=1),g=Lt(g);++j<G;){var de=M[j];de&&i(g,de,j,ee)}return g})}function hw(i,g){return function(M,j){if(M==null)return M;if(!qr(M))return i(M,j);for(var G=M.length,ee=g?G:-1,le=Lt(M);(g?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function dw(i){return function(g,M,j){for(var G=-1,ee=Lt(g),le=j(g),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return g}}function YE(i,g,M){var j=g&d,G=nl(i);function ee(){var le=this&&this!==sn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function pw(i){return function(g){g=nn(g);var M=oe(g)?St(g):e,j=M?M[0]:g.charAt(0),G=M?Yo(M,1).join(""):g.slice(1);return j[i]()+G}}function pa(i){return function(g){return k(hb(ub(g).replace(An,"")),i,"")}}function nl(i){return function(){var g=arguments;switch(g.length){case 0:return new i;case 1:return new i(g[0]);case 2:return new i(g[0],g[1]);case 3:return new i(g[0],g[1],g[2]);case 4:return new i(g[0],g[1],g[2],g[3]);case 5:return new i(g[0],g[1],g[2],g[3],g[4]);case 6:return new i(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new i(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var M=ha(i.prototype),j=i.apply(M,g);return _n(j)?j:M}}function XE(i,g,M){var j=nl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=ga(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:We(le,ve);if(ee-=Ie.length,ee<M)return yw(i,g,Mc,G.placeholder,e,le,Ie,e,e,M-ee);var Re=this&&this!==sn&&this instanceof G?j:i;return sr(Re,this,le)}return G}function gw(i){return function(g,M,j){var G=Lt(g);if(!qr(g)){var ee=gt(M,3);g=ur(g),M=function(de){return ee(G[de],de,G)}}var le=i(g,M,j);return le>-1?G[ee?g[le]:le]:e}}function fw(i){return xo(function(g){var M=g.length,j=M,G=Ci.prototype.thru;for(i&&g.reverse();j--;){var ee=g[j];if(typeof ee!="function")throw new an(y);if(G&&!le&&Lc(ee)=="wrapper")var le=new Ci([],!0)}for(j=le?j:M;++j<M;){ee=g[j];var de=Lc(ee),ve=de=="wrapper"?Td(ee):e;ve&&Rd(ve[0])&&ve[1]==(R|I|S|L)&&!ve[4].length&&ve[9]==1?le=le[Lc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Rd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Re=Ie[0];if(le&&Ie.length==1&&At(Re))return le.plant(Re).value();for(var De=0,Ke=M?g[De].apply(this,Ie):Re;++De<M;)Ke=g[De].call(this,Ke);return Ke}})}function Mc(i,g,M,j,G,ee,le,de,ve,Ie){var Re=g&R,De=g&d,Ke=g&w,nt=g&(I|T),ft=g&F,Ot=Ke?e:nl(i);function mt(){for(var Wt=arguments.length,Vt=xe(Wt),ai=Wt;ai--;)Vt[ai]=arguments[ai];if(nt)var Dr=ga(mt),li=lr(Vt,Dr);if(j&&(Vt=cw(Vt,j,G,nt)),ee&&(Vt=uw(Vt,ee,le,nt)),Wt-=li,nt&&Wt<Ie){var Un=We(Vt,Dr);return yw(i,g,Mc,mt.placeholder,M,Vt,Un,de,ve,Ie-Wt)}var ji=De?M:this,Ao=Ke?ji[i]:i;return Wt=Vt.length,de?Vt=mI(Vt,de):ft&&Wt>1&&Vt.reverse(),Re&&ve<Wt&&(Vt.length=ve),this&&this!==sn&&this instanceof mt&&(Ao=Ot||nl(Ao)),Ao.apply(ji,Vt)}return mt}function mw(i,g){return function(M,j){return SE(M,i,g(j),{})}}function Ec(i,g){return function(M,j){var G;if(M===e&&j===e)return g;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=oi(M),j=oi(j)):(M=tw(M),j=tw(j)),G=i(M,j)}return G}}function Sd(i){return xo(function(g){return g=m(g,at(gt())),Ft(function(M){var j=this;return i(g,function(G){return sr(G,j,M)})})})}function Ic(i,g){g=g===e?" ":oi(g);var M=g.length;if(M<2)return M?vd(g,i):g;var j=vd(g,vc(i/Pt(g)));return oe(g)?Yo(St(j),0,i).join(""):j.slice(0,i)}function QE(i,g,M,j){var G=g&d,ee=nl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Re=j.length,De=xe(Re+ve),Ke=this&&this!==sn&&this instanceof le?ee:i;++Ie<Re;)De[Ie]=j[Ie];for(;ve--;)De[Ie++]=arguments[++de];return sr(Ke,G?M:this,De)}return le}function vw(i){return function(g,M,j){return j&&typeof j!="number"&&Nr(g,M,j)&&(M=j=e),g=So(g),M===e?(M=g,g=0):M=So(M),j=j===e?g<M?1:-1:So(j),DE(g,M,j,i)}}function Rc(i){return function(g,M){return typeof g=="string"&&typeof M=="string"||(g=_i(g),M=_i(M)),i(g,M)}}function yw(i,g,M,j,G,ee,le,de,ve,Ie){var Re=g&I,De=Re?le:e,Ke=Re?e:le,nt=Re?ee:e,ft=Re?e:ee;g|=Re?S:C,g&=~(Re?C:S),g&b||(g&=-4);var Ot=[i,g,G,nt,De,ft,Ke,de,ve,Ie],mt=M.apply(e,Ot);return Rd(i)&&Ew(mt,Ot),mt.placeholder=j,Iw(mt,i,g)}function Ad(i){var g=Kt[i];return function(M,j){if(M=_i(M),j=j==null?0:_r(It(j),292),j&&Iy(M)){var G=(nn(M)+"e").split("e"),ee=g(G[0]+"e"+(+G[1]+j));return G=(nn(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return g(M)}}var ZE=ca&&1/Ve(new ca([,-0]))[1]==B?function(i){return new ca(i)}:Kd;function ww(i){return function(g){var M=$r(g);return M==tt?Me(g):M==Mn?Xe(g):et(g,i(g))}}function bo(i,g,M,j,G,ee,le,de){var ve=g&w;if(!ve&&typeof i!="function")throw new an(y);var Ie=j?j.length:0;if(Ie||(g&=-97,j=G=e),le=le===e?le:ir(It(le),0),de=de===e?de:It(de),Ie-=G?G.length:0,g&C){var Re=j,De=G;j=G=e}var Ke=ve?e:Td(i),nt=[i,g,M,j,G,Re,De,ee,le,de];if(Ke&&pI(nt,Ke),i=nt[0],g=nt[1],M=nt[2],j=nt[3],G=nt[4],de=nt[9]=nt[9]===e?ve?0:i.length:ir(nt[9]-Ie,0),!de&&g&(I|T)&&(g&=-25),!g||g==d)var ft=YE(i,g,M);else g==I||g==T?ft=XE(i,g,de):(g==S||g==(d|S))&&!G.length?ft=QE(i,g,M,j):ft=Mc.apply(e,nt);var Ot=Ke?Jy:Ew;return Iw(Ot(ft,nt),i,g)}function bw(i,g,M,j){return i===e||zi(i,Nn[M])&&!on.call(j,M)?g:i}function xw(i,g,M,j,G,ee){return _n(i)&&_n(g)&&(ee.set(g,i),Ac(i,g,e,xw,ee),ee.delete(g)),i}function JE(i){return ol(i)?e:i}function Cw(i,g,M,j,G,ee){var le=M&o,de=i.length,ve=g.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Re=ee.get(g);if(Ie&&Re)return Ie==g&&Re==i;var De=-1,Ke=!0,nt=M&c?new $s:e;for(ee.set(i,g),ee.set(g,i);++De<de;){var ft=i[De],Ot=g[De];if(j)var mt=le?j(Ot,ft,De,g,i,ee):j(ft,Ot,De,i,g,ee);if(mt!==e){if(mt)continue;Ke=!1;break}if(nt){if(!W(g,function(Wt,Vt){if(!kt(nt,Vt)&&(ft===Wt||G(ft,Wt,M,j,ee)))return nt.push(Vt)})){Ke=!1;break}}else if(!(ft===Ot||G(ft,Ot,M,j,ee))){Ke=!1;break}}return ee.delete(i),ee.delete(g),Ke}function eI(i,g,M,j,G,ee,le){switch(M){case Ye:if(i.byteLength!=g.byteLength||i.byteOffset!=g.byteOffset)return!1;i=i.buffer,g=g.buffer;case ze:return!(i.byteLength!=g.byteLength||!ee(new pc(i),new pc(g)));case $e:case Te:case ht:return zi(+i,+g);case Ge:return i.name==g.name&&i.message==g.message;case dn:case En:return i==g+"";case tt:var de=Me;case Mn:var ve=j&o;if(de||(de=Ve),i.size!=g.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==g;j|=c,le.set(i,g);var Re=Cw(de(i),de(g),j,G,ee,le);return le.delete(i),Re;case Gn:if(Xa)return Xa.call(i)==Xa.call(g)}return!1}function tI(i,g,M,j,G,ee){var le=M&o,de=_d(i),ve=de.length,Ie=_d(g),Re=Ie.length;if(ve!=Re&&!le)return!1;for(var De=ve;De--;){var Ke=de[De];if(!(le?Ke in g:on.call(g,Ke)))return!1}var nt=ee.get(i),ft=ee.get(g);if(nt&&ft)return nt==g&&ft==i;var Ot=!0;ee.set(i,g),ee.set(g,i);for(var mt=le;++De<ve;){Ke=de[De];var Wt=i[Ke],Vt=g[Ke];if(j)var ai=le?j(Vt,Wt,Ke,g,i,ee):j(Wt,Vt,Ke,i,g,ee);if(!(ai===e?Wt===Vt||G(Wt,Vt,M,j,ee):ai)){Ot=!1;break}mt||(mt=Ke=="constructor")}if(Ot&&!mt){var Dr=i.constructor,li=g.constructor;Dr!=li&&"constructor"in i&&"constructor"in g&&!(typeof Dr=="function"&&Dr instanceof Dr&&typeof li=="function"&&li instanceof li)&&(Ot=!1)}return ee.delete(i),ee.delete(g),Ot}function xo(i){return Od(Tw(i,e,Fw),i+"")}function _d(i){return jy(i,ur,Ed)}function $d(i){return jy(i,Kr,kw)}var Td=wc?function(i){return wc.get(i)}:Kd;function Lc(i){for(var g=i.name+"",M=ua[g],j=on.call(ua,g)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return g}function ga(i){var g=on.call(J,"placeholder")?J:i;return g.placeholder}function gt(){var i=J.iteratee||Vd;return i=i===Vd?Vy:i,arguments.length?i(arguments[0],arguments[1]):i}function Oc(i,g){var M=i.__data__;return cI(g)?M[typeof g=="string"?"string":"hash"]:M.map}function Md(i){for(var g=ur(i),M=g.length;M--;){var j=g[M],G=i[j];g[M]=[j,G,_w(G)]}return g}function Es(i,g){var M=ie(i,g);return Uy(M)?M:e}function nI(i){var g=on.call(i,As),M=i[As];try{i[As]=e;var j=!0}catch{}var G=hc.call(i);return j&&(g?i[As]=M:delete i[As]),G}var Ed=rd?function(i){return i==null?[]:(i=Lt(i),Ar(rd(i),function(g){return My.call(i,g)}))}:Gd,kw=rd?function(i){for(var g=[];i;)$(g,Ed(i)),i=gc(i);return g}:Gd,$r=Or;(id&&$r(new id(new ArrayBuffer(1)))!=Ye||Ka&&$r(new Ka)!=tt||od&&$r(od.resolve())!=qt||ca&&$r(new ca)!=Mn||Ga&&$r(new Ga)!=He)&&($r=function(i){var g=Or(i),M=g==hn?i.constructor:e,j=M?Is(M):"";if(j)switch(j){case PM:return Ye;case WM:return tt;case BM:return qt;case zM:return Mn;case jM:return He}return g});function rI(i,g,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":g-=le;break;case"take":g=_r(g,i+le);break;case"takeRight":i=ir(i,g-le);break}}return{start:i,end:g}}function iI(i){var g=i.match(Di);return g?g[1].split(ms):[]}function Sw(i,g,M){g=Go(g,i);for(var j=-1,G=g.length,ee=!1;++j<G;){var le=no(g[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&zc(G)&&Co(le,G)&&(At(i)||Rs(i)))}function oI(i){var g=i.length,M=new i.constructor(g);return g&&typeof i[0]=="string"&&on.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function Aw(i){return typeof i.constructor=="function"&&!rl(i)?ha(gc(i)):{}}function sI(i,g,M){var j=i.constructor;switch(g){case ze:return kd(i);case $e:case Te:return new j(+i);case Ye:return HE(i,M);case dt:case Ct:case xt:case Rt:case Et:case ct:case yt:case wn:case br:return aw(i,M);case tt:return new j;case ht:case En:return new j(i);case dn:return UE(i);case Mn:return new j;case Gn:return VE(i)}}function aI(i,g){var M=g.length;if(!M)return i;var j=M-1;return g[j]=(M>1?"& ":"")+g[j],g=g.join(M>2?", ":" "),i.replace(Gi,`{
1468
+ */var FC=Tl.exports,Zg;function PC(){return Zg||(Zg=1,function(n,t){(function(){var e,r="4.17.21",v=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",x="Invalid `variable` option passed into `_.template`",h="__lodash_hash_undefined__",p=500,s="__lodash_placeholder__",a=1,u=2,l=4,o=1,c=2,d=1,w=2,b=4,I=8,T=16,S=32,C=64,R=128,L=256,F=512,E=30,H="...",P=800,O=16,_=1,A=2,N=3,B=1/0,U=9007199254740991,K=17976931348623157e292,Z=NaN,te=4294967295,he=te-1,ne=te>>>1,ae=[["ary",R],["bind",d],["bindKey",w],["curry",I],["curryRight",T],["flip",F],["partial",S],["partialRight",C],["rearg",L]],ue="[object Arguments]",ce="[object Array]",fe="[object AsyncFunction]",$e="[object Boolean]",Te="[object Date]",Ee="[object DOMException]",Ge="[object Error]",qe="[object Function]",ut="[object GeneratorFunction]",tt="[object Map]",ht="[object Number]",Zt="[object Null]",dn="[object Object]",qt="[object Promise]",dr="[object Proxy]",pn="[object RegExp]",En="[object Set]",In="[object String]",Yn="[object Symbol]",vt="[object Undefined]",He="[object WeakMap]",ke="[object WeakSet]",ze="[object ArrayBuffer]",Ye="[object DataView]",dt="[object Float32Array]",Ct="[object Float64Array]",xt="[object Int8Array]",Rt="[object Int16Array]",Et="[object Int32Array]",ct="[object Uint8Array]",yt="[object Uint8ClampedArray]",bn="[object Uint16Array]",br="[object Uint32Array]",zr=/\b__p \+= '';/g,Li=/\b(__p \+=) '' \+/g,oo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pr=/&(?:amp|lt|gt|quot|#39);/g,so=/[&<>"']/g,Lo=RegExp(pr.source),za=RegExp(so.source),Zr=/<%-([\s\S]+?)%>/g,ja=/<%([\s\S]+?)%>/g,fs=/<%=([\s\S]+?)%>/g,ta=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Oi=/^\w*$/,zn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xr=/[\\^$.*+?()[\]{}|]/g,Ni=RegExp(xr.source),An=/^\s+/,Cr=/\s/,Gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Di=/\{\n\/\* \[wrapped with (.+)\] \*/,ms=/,? & /,na=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ha=/[()=,{}\[\]\/\s]/,Ua=/\\(\\)?/g,Fi=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Jr=/\w*$/,zt=/^[-+]0x[0-9a-f]+$/i,ra=/^0b[01]+$/i,kr=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,gn=/^(?:0|[1-9]\d*)$/,Rn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gi=/($^)/,Sr=/['\n\r\u2028\u2029\\]/g,fi="\\ud800-\\udfff",Oo="\\u0300-\\u036f",vs="\\ufe20-\\ufe2f",Yi="\\u20d0-\\u20ff",jr=Oo+vs+Yi,ao="\\u2700-\\u27bf",No="a-z\\xdf-\\xf6\\xf8-\\xff",Hr="\\xac\\xb1\\xd7\\xf7",Do="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ys="\\u2000-\\u206f",ws=" \\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",Fo="A-Z\\xc0-\\xd6\\xd8-\\xde",rr="\\ufe0e\\ufe0f",bs=Hr+Do+ys+ws,lo="['’]",Po="["+fi+"]",Wo="["+bs+"]",Xi="["+jr+"]",xs="\\d+",ia="["+ao+"]",Bo="["+No+"]",zo="[^"+fi+bs+xs+ao+No+Fo+"]",Cs="\\ud83c[\\udffb-\\udfff]",jo="(?:"+Xi+"|"+Cs+")",co="[^"+fi+"]",mi="(?:\\ud83c[\\udde6-\\uddff]){2}",ir="[\\ud800-\\udbff][\\udc00-\\udfff]",Qi="["+Fo+"]",Pi="\\u200d",oa="(?:"+Bo+"|"+zo+")",Va="(?:"+Qi+"|"+zo+")",uo="(?:"+lo+"(?:d|ll|m|re|s|t|ve))?",Wi="(?:"+lo+"(?:D|LL|M|RE|S|T|VE))?",ho=jo+"?",Ho="["+rr+"]?",po="(?:"+Pi+"(?:"+[co,mi,ir].join("|")+")"+Ho+ho+")*",sa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zi="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pe=Ho+ho+po,aa="(?:"+[ia,mi,ir].join("|")+")"+Pe,Ne="(?:"+[co+Xi+"?",Xi,mi,ir,Po].join("|")+")",_n=RegExp(lo,"g"),go=RegExp(Xi,"g"),ei=RegExp(Cs+"(?="+Cs+")|"+Ne+Pe,"g"),Hn=RegExp([Qi+"?"+Bo+"+"+uo+"(?="+[Wo,Qi,"$"].join("|")+")",Va+"+"+Wi+"(?="+[Wo,Qi+oa,"$"].join("|")+")",Qi+"?"+oa+"+"+uo,Qi+"+"+Wi,Zi,sa,xs,aa].join("|"),"g"),la=RegExp("["+Pi+fi+jr+rr+"]"),fo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vi=["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"],Ji=-1,Jt={};Jt[dt]=Jt[Ct]=Jt[xt]=Jt[Rt]=Jt[Et]=Jt[ct]=Jt[yt]=Jt[bn]=Jt[br]=!0,Jt[ue]=Jt[ce]=Jt[ze]=Jt[$e]=Jt[Ye]=Jt[Te]=Jt[Ge]=Jt[qe]=Jt[tt]=Jt[ht]=Jt[dn]=Jt[pn]=Jt[En]=Jt[In]=Jt[He]=!1;var Yt={};Yt[ue]=Yt[ce]=Yt[ze]=Yt[Ye]=Yt[$e]=Yt[Te]=Yt[dt]=Yt[Ct]=Yt[xt]=Yt[Rt]=Yt[Et]=Yt[tt]=Yt[ht]=Yt[dn]=Yt[pn]=Yt[En]=Yt[In]=Yt[Yn]=Yt[ct]=Yt[yt]=Yt[bn]=Yt[br]=!0,Yt[Ge]=Yt[qe]=Yt[He]=!1;var en={À:"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"},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},yi={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ln={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,fn=parseInt,wt=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo,Ir=typeof self=="object"&&self&&self.Object===Object&&self,sn=wt||Ir||Function("return this")(),yn=t&&!t.nodeType&&t,Xn=yn&&!0&&n&&!n.nodeType&&n,Rr=Xn&&Xn.exports===yn,wi=Rr&&wt.process,On=function(){try{var pe=Xn&&Xn.require&&Xn.require("util").types;return pe||wi&&wi.binding&&wi.binding("util")}catch{}}(),Ur=On&&On.isArrayBuffer,Uo=On&&On.isDate,Nn=On&&On.isMap,ti=On&&On.isRegExp,ni=On&&On.isSet,bi=On&&On.isTypedArray;function ar(pe,Se,xe){switch(xe.length){case 0:return pe.call(Se);case 1:return pe.call(Se,xe[0]);case 2:return pe.call(Se,xe[0],xe[1]);case 3:return pe.call(Se,xe[0],xe[1],xe[2])}return pe.apply(Se,xe)}function lr(pe,Se,xe,je){for(var lt=-1,Mt=pe==null?0:pe.length;++lt<Mt;){var Kt=pe[lt];Se(je,Kt,xe(Kt),pe)}return je}function gr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je&&Se(pe[xe],xe,pe)!==!1;);return pe}function ks(pe,Se){for(var xe=pe==null?0:pe.length;xe--&&Se(pe[xe],xe,pe)!==!1;);return pe}function fr(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(!Se(pe[xe],xe,pe))return!1;return!0}function Ar(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];Se(Kt,xe,pe)&&(Mt[lt++]=Kt)}return Mt}function ri(pe,Se){var xe=pe==null?0:pe.length;return!!xe&&se(pe,Se,0)>-1}function ii(pe,Se,xe){for(var je=-1,lt=pe==null?0:pe.length;++je<lt;)if(xe(Se,pe[je]))return!0;return!1}function m(pe,Se){for(var xe=-1,je=pe==null?0:pe.length,lt=Array(je);++xe<je;)lt[xe]=Se(pe[xe],xe,pe);return lt}function $(pe,Se){for(var xe=-1,je=Se.length,lt=pe.length;++xe<je;)pe[lt+xe]=Se[xe];return pe}function k(pe,Se,xe,je){var lt=-1,Mt=pe==null?0:pe.length;for(je&&Mt&&(xe=pe[++lt]);++lt<Mt;)xe=Se(xe,pe[lt],lt,pe);return xe}function D(pe,Se,xe,je){var lt=pe==null?0:pe.length;for(je&&lt&&(xe=pe[--lt]);lt--;)xe=Se(xe,pe[lt],lt,pe);return xe}function W(pe,Se){for(var xe=-1,je=pe==null?0:pe.length;++xe<je;)if(Se(pe[xe],xe,pe))return!0;return!1}var z=we("length");function q(pe){return pe.split("")}function Y(pe){return pe.match(na)||[]}function Q(pe,Se,xe){var je;return xe(pe,function(lt,Mt,Kt){if(Se(lt,Mt,Kt))return je=Mt,!1}),je}function re(pe,Se,xe,je){for(var lt=pe.length,Mt=xe+(je?1:-1);je?Mt--:++Mt<lt;)if(Se(pe[Mt],Mt,pe))return Mt;return-1}function se(pe,Se,xe){return Se===Se?Ze(pe,Se,xe):re(pe,Ce,xe)}function ye(pe,Se,xe,je){for(var lt=xe-1,Mt=pe.length;++lt<Mt;)if(je(pe[lt],Se))return lt;return-1}function Ce(pe){return pe!==pe}function me(pe,Se){var xe=pe==null?0:pe.length;return xe?st(pe,Se)/xe:Z}function we(pe){return function(Se){return Se==null?e:Se[pe]}}function Oe(pe){return function(Se){return pe==null?e:pe[Se]}}function Le(pe,Se,xe,je,lt){return lt(pe,function(Mt,Kt,Lt){xe=je?(je=!1,Mt):Se(xe,Mt,Kt,Lt)}),xe}function Ue(pe,Se){var xe=pe.length;for(pe.sort(Se);xe--;)pe[xe]=pe[xe].value;return pe}function st(pe,Se){for(var xe,je=-1,lt=pe.length;++je<lt;){var Mt=Se(pe[je]);Mt!==e&&(xe=xe===e?Mt:xe+Mt)}return xe}function Qe(pe,Se){for(var xe=-1,je=Array(pe);++xe<pe;)je[xe]=Se(xe);return je}function et(pe,Se){return m(Se,function(xe){return[xe,pe[xe]]})}function mn(pe){return pe&&pe.slice(0,Dt(pe)+1).replace(An,"")}function at(pe){return function(Se){return pe(Se)}}function xn(pe,Se){return m(Se,function(xe){return pe[xe]})}function kt(pe,Se){return pe.has(Se)}function Tt(pe,Se){for(var xe=-1,je=pe.length;++xe<je&&se(Se,pe[xe],0)>-1;);return xe}function Qn(pe,Se){for(var xe=pe.length;xe--&&se(Se,pe[xe],0)>-1;);return xe}function cr(pe,Se){for(var xe=pe.length,je=0;xe--;)pe[xe]===Se&&++je;return je}var Cn=Oe(en),V=Oe(jt);function X(pe){return"\\"+Ln[pe]}function ie(pe,Se){return pe==null?e:pe[Se]}function oe(pe){return la.test(pe)}function ge(pe){return fo.test(pe)}function be(pe){for(var Se,xe=[];!(Se=pe.next()).done;)xe.push(Se.value);return xe}function Me(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je,lt){xe[++Se]=[lt,je]}),xe}function Fe(pe,Se){return function(xe){return pe(Se(xe))}}function We(pe,Se){for(var xe=-1,je=pe.length,lt=0,Mt=[];++xe<je;){var Kt=pe[xe];(Kt===Se||Kt===s)&&(pe[xe]=s,Mt[lt++]=xe)}return Mt}function Ve(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=je}),xe}function Xe(pe){var Se=-1,xe=Array(pe.size);return pe.forEach(function(je){xe[++Se]=[je,je]}),xe}function Ze(pe,Se,xe){for(var je=xe-1,lt=pe.length;++je<lt;)if(pe[je]===Se)return je;return-1}function bt(pe,Se,xe){for(var je=xe+1;je--;)if(pe[je]===Se)return je;return je}function Pt(pe){return oe(pe)?rt(pe):z(pe)}function St(pe){return oe(pe)?hn(pe):q(pe)}function Dt(pe){for(var Se=pe.length;Se--&&Cr.test(pe.charAt(Se)););return Se}var pt=Oe(yi);function rt(pe){for(var Se=ei.lastIndex=0;ei.test(pe);)++Se;return Se}function hn(pe){return pe.match(ei)||[]}function kn(pe){return pe.match(Hn)||[]}var Zn=function pe(Se){Se=Se==null?sn:Ut.defaults(sn.Object(),Se,Ut.pick(sn,vi));var xe=Se.Array,je=Se.Date,lt=Se.Error,Mt=Se.Function,Kt=Se.Math,Lt=Se.Object,Lr=Se.RegExp,xi=Se.String,an=Se.TypeError,ur=xe.prototype,mo=Mt.prototype,Dn=Lt.prototype,Ss=Se["__core-js_shared__"],uc=mo.toString,on=Dn.hasOwnProperty,AM=0,_y=function(){var i=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),hc=Dn.toString,_M=uc.call(Lt),$M=sn._,TM=Lr("^"+uc.call(on).replace(xr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dc=Rr?Se.Buffer:e,Vo=Se.Symbol,pc=Se.Uint8Array,$y=dc?dc.allocUnsafe:e,gc=Fe(Lt.getPrototypeOf,Lt),Ty=Lt.create,My=Dn.propertyIsEnumerable,fc=ur.splice,Ey=Vo?Vo.isConcatSpreadable:e,qa=Vo?Vo.iterator:e,As=Vo?Vo.toStringTag:e,mc=function(){try{var i=Es(Lt,"defineProperty");return i({},"",{}),i}catch{}}(),MM=Se.clearTimeout!==sn.clearTimeout&&Se.clearTimeout,EM=je&&je.now!==sn.Date.now&&je.now,IM=Se.setTimeout!==sn.setTimeout&&Se.setTimeout,vc=Kt.ceil,yc=Kt.floor,rd=Lt.getOwnPropertySymbols,RM=dc?dc.isBuffer:e,Iy=Se.isFinite,LM=ur.join,OM=Fe(Lt.keys,Lt),or=Kt.max,_r=Kt.min,NM=je.now,DM=Se.parseInt,Ry=Kt.random,FM=ur.reverse,id=Es(Se,"DataView"),Ka=Es(Se,"Map"),od=Es(Se,"Promise"),ca=Es(Se,"Set"),Ga=Es(Se,"WeakMap"),Ya=Es(Lt,"create"),wc=Ga&&new Ga,ua={},PM=Is(id),WM=Is(Ka),BM=Is(od),zM=Is(ca),jM=Is(Ga),bc=Vo?Vo.prototype:e,Xa=bc?bc.valueOf:e,Ly=bc?bc.toString:e;function J(i){if(Fn(i)&&!At(i)&&!(i instanceof Ht)){if(i instanceof Ci)return i;if(on.call(i,"__wrapped__"))return Ow(i)}return new Ci(i)}var ha=function(){function i(){}return function(g){if(!$n(g))return{};if(Ty)return Ty(g);i.prototype=g;var M=new i;return i.prototype=e,M}}();function xc(){}function Ci(i,g){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!g,this.__index__=0,this.__values__=e}J.templateSettings={escape:Zr,evaluate:ja,interpolate:fs,variable:"",imports:{_:J}},J.prototype=xc.prototype,J.prototype.constructor=J,Ci.prototype=ha(xc.prototype),Ci.prototype.constructor=Ci;function Ht(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=te,this.__views__=[]}function HM(){var i=new Ht(this.__wrapped__);return i.__actions__=Vr(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Vr(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Vr(this.__views__),i}function UM(){if(this.__filtered__){var i=new Ht(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function VM(){var i=this.__wrapped__.value(),g=this.__dir__,M=At(i),j=g<0,G=M?i.length:0,ee=rI(0,G,this.__views__),le=ee.start,de=ee.end,ve=de-le,Ie=j?de:le-1,Re=this.__iteratees__,De=Re.length,Ke=0,nt=_r(ve,this.__takeCount__);if(!M||!j&&G==ve&&nt==ve)return rw(i,this.__actions__);var ft=[];e:for(;ve--&&Ke<nt;){Ie+=g;for(var Ot=-1,mt=i[Ie];++Ot<De;){var Wt=Re[Ot],Vt=Wt.iteratee,ai=Wt.type,Dr=Vt(mt);if(ai==A)mt=Dr;else if(!Dr){if(ai==_)continue e;break e}}ft[Ke++]=mt}return ft}Ht.prototype=ha(xc.prototype),Ht.prototype.constructor=Ht;function _s(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function qM(){this.__data__=Ya?Ya(null):{},this.size=0}function KM(i){var g=this.has(i)&&delete this.__data__[i];return this.size-=g?1:0,g}function GM(i){var g=this.__data__;if(Ya){var M=g[i];return M===h?e:M}return on.call(g,i)?g[i]:e}function YM(i){var g=this.__data__;return Ya?g[i]!==e:on.call(g,i)}function XM(i,g){var M=this.__data__;return this.size+=this.has(i)?0:1,M[i]=Ya&&g===e?h:g,this}_s.prototype.clear=qM,_s.prototype.delete=KM,_s.prototype.get=GM,_s.prototype.has=YM,_s.prototype.set=XM;function vo(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function QM(){this.__data__=[],this.size=0}function ZM(i){var g=this.__data__,M=Cc(g,i);if(M<0)return!1;var j=g.length-1;return M==j?g.pop():fc.call(g,M,1),--this.size,!0}function JM(i){var g=this.__data__,M=Cc(g,i);return M<0?e:g[M][1]}function eE(i){return Cc(this.__data__,i)>-1}function tE(i,g){var M=this.__data__,j=Cc(M,i);return j<0?(++this.size,M.push([i,g])):M[j][1]=g,this}vo.prototype.clear=QM,vo.prototype.delete=ZM,vo.prototype.get=JM,vo.prototype.has=eE,vo.prototype.set=tE;function yo(i){var g=-1,M=i==null?0:i.length;for(this.clear();++g<M;){var j=i[g];this.set(j[0],j[1])}}function nE(){this.size=0,this.__data__={hash:new _s,map:new(Ka||vo),string:new _s}}function rE(i){var g=Oc(this,i).delete(i);return this.size-=g?1:0,g}function iE(i){return Oc(this,i).get(i)}function oE(i){return Oc(this,i).has(i)}function sE(i,g){var M=Oc(this,i),j=M.size;return M.set(i,g),this.size+=M.size==j?0:1,this}yo.prototype.clear=nE,yo.prototype.delete=rE,yo.prototype.get=iE,yo.prototype.has=oE,yo.prototype.set=sE;function $s(i){var g=-1,M=i==null?0:i.length;for(this.__data__=new yo;++g<M;)this.add(i[g])}function aE(i){return this.__data__.set(i,h),this}function lE(i){return this.__data__.has(i)}$s.prototype.add=$s.prototype.push=aE,$s.prototype.has=lE;function Bi(i){var g=this.__data__=new vo(i);this.size=g.size}function cE(){this.__data__=new vo,this.size=0}function uE(i){var g=this.__data__,M=g.delete(i);return this.size=g.size,M}function hE(i){return this.__data__.get(i)}function dE(i){return this.__data__.has(i)}function pE(i,g){var M=this.__data__;if(M instanceof vo){var j=M.__data__;if(!Ka||j.length<v-1)return j.push([i,g]),this.size=++M.size,this;M=this.__data__=new yo(j)}return M.set(i,g),this.size=M.size,this}Bi.prototype.clear=cE,Bi.prototype.delete=uE,Bi.prototype.get=hE,Bi.prototype.has=dE,Bi.prototype.set=pE;function Oy(i,g){var M=At(i),j=!M&&Rs(i),G=!M&&!j&&Xo(i),ee=!M&&!j&&!G&&fa(i),le=M||j||G||ee,de=le?Qe(i.length,xi):[],ve=de.length;for(var Ie in i)(g||on.call(i,Ie))&&!(le&&(Ie=="length"||G&&(Ie=="offset"||Ie=="parent")||ee&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Co(Ie,ve)))&&de.push(Ie);return de}function Ny(i){var g=i.length;return g?i[md(0,g-1)]:e}function gE(i,g){return Nc(Vr(i),Ts(g,0,i.length))}function fE(i){return Nc(Vr(i))}function sd(i,g,M){(M!==e&&!zi(i[g],M)||M===e&&!(g in i))&&wo(i,g,M)}function Qa(i,g,M){var j=i[g];(!(on.call(i,g)&&zi(j,M))||M===e&&!(g in i))&&wo(i,g,M)}function Cc(i,g){for(var M=i.length;M--;)if(zi(i[M][0],g))return M;return-1}function mE(i,g,M,j){return qo(i,function(G,ee,le){g(j,G,M(G),le)}),j}function Dy(i,g){return i&&to(g,hr(g),i)}function vE(i,g){return i&&to(g,Kr(g),i)}function wo(i,g,M){g=="__proto__"&&mc?mc(i,g,{configurable:!0,enumerable:!0,value:M,writable:!0}):i[g]=M}function ad(i,g){for(var M=-1,j=g.length,G=xe(j),ee=i==null;++M<j;)G[M]=ee?e:zd(i,g[M]);return G}function Ts(i,g,M){return i===i&&(M!==e&&(i=i<=M?i:M),g!==e&&(i=i>=g?i:g)),i}function ki(i,g,M,j,G,ee){var le,de=g&a,ve=g&u,Ie=g&l;if(M&&(le=G?M(i,j,G,ee):M(i)),le!==e)return le;if(!$n(i))return i;var Re=At(i);if(Re){if(le=oI(i),!de)return Vr(i,le)}else{var De=$r(i),Ke=De==qe||De==ut;if(Xo(i))return sw(i,de);if(De==dn||De==ue||Ke&&!G){if(le=ve||Ke?{}:Aw(i),!de)return ve?GE(i,vE(le,i)):KE(i,Dy(le,i))}else{if(!Yt[De])return G?i:{};le=sI(i,De,de)}}ee||(ee=new Bi);var nt=ee.get(i);if(nt)return nt;ee.set(i,le),eb(i)?i.forEach(function(mt){le.add(ki(mt,g,M,mt,i,ee))}):Zw(i)&&i.forEach(function(mt,Wt){le.set(Wt,ki(mt,g,M,Wt,i,ee))});var ft=Ie?ve?$d:_d:ve?Kr:hr,Ot=Re?e:ft(i);return gr(Ot||i,function(mt,Wt){Ot&&(Wt=mt,mt=i[Wt]),Qa(le,Wt,ki(mt,g,M,Wt,i,ee))}),le}function yE(i){var g=hr(i);return function(M){return Fy(M,i,g)}}function Fy(i,g,M){var j=M.length;if(i==null)return!j;for(i=Lt(i);j--;){var G=M[j],ee=g[G],le=i[G];if(le===e&&!(G in i)||!ee(le))return!1}return!0}function Py(i,g,M){if(typeof i!="function")throw new an(y);return il(function(){i.apply(e,M)},g)}function Za(i,g,M,j){var G=-1,ee=ri,le=!0,de=i.length,ve=[],Ie=g.length;if(!de)return ve;M&&(g=m(g,at(M))),j?(ee=ii,le=!1):g.length>=v&&(ee=kt,le=!1,g=new $s(g));e:for(;++G<de;){var Re=i[G],De=M==null?Re:M(Re);if(Re=j||Re!==0?Re:0,le&&De===De){for(var Ke=Ie;Ke--;)if(g[Ke]===De)continue e;ve.push(Re)}else ee(g,De,j)||ve.push(Re)}return ve}var qo=hw(eo),Wy=hw(cd,!0);function wE(i,g){var M=!0;return qo(i,function(j,G,ee){return M=!!g(j,G,ee),M}),M}function kc(i,g,M){for(var j=-1,G=i.length;++j<G;){var ee=i[j],le=g(ee);if(le!=null&&(de===e?le===le&&!si(le):M(le,de)))var de=le,ve=ee}return ve}function bE(i,g,M,j){var G=i.length;for(M=It(M),M<0&&(M=-M>G?0:G+M),j=j===e||j>G?G:It(j),j<0&&(j+=G),j=M>j?0:nb(j);M<j;)i[M++]=g;return i}function By(i,g){var M=[];return qo(i,function(j,G,ee){g(j,G,ee)&&M.push(j)}),M}function mr(i,g,M,j,G){var ee=-1,le=i.length;for(M||(M=lI),G||(G=[]);++ee<le;){var de=i[ee];g>0&&M(de)?g>1?mr(de,g-1,M,j,G):$(G,de):j||(G[G.length]=de)}return G}var ld=dw(),zy=dw(!0);function eo(i,g){return i&&ld(i,g,hr)}function cd(i,g){return i&&zy(i,g,hr)}function Sc(i,g){return Ar(g,function(M){return ko(i[M])})}function Ms(i,g){g=Go(g,i);for(var M=0,j=g.length;i!=null&&M<j;)i=i[no(g[M++])];return M&&M==j?i:e}function jy(i,g,M){var j=g(i);return At(i)?j:$(j,M(i))}function Or(i){return i==null?i===e?vt:Zt:As&&As in Lt(i)?nI(i):fI(i)}function ud(i,g){return i>g}function xE(i,g){return i!=null&&on.call(i,g)}function CE(i,g){return i!=null&&g in Lt(i)}function kE(i,g,M){return i>=_r(g,M)&&i<or(g,M)}function hd(i,g,M){for(var j=M?ii:ri,G=i[0].length,ee=i.length,le=ee,de=xe(ee),ve=1/0,Ie=[];le--;){var Re=i[le];le&&g&&(Re=m(Re,at(g))),ve=_r(Re.length,ve),de[le]=!M&&(g||G>=120&&Re.length>=120)?new $s(le&&Re):e}Re=i[0];var De=-1,Ke=de[0];e:for(;++De<G&&Ie.length<ve;){var nt=Re[De],ft=g?g(nt):nt;if(nt=M||nt!==0?nt:0,!(Ke?kt(Ke,ft):j(Ie,ft,M))){for(le=ee;--le;){var Ot=de[le];if(!(Ot?kt(Ot,ft):j(i[le],ft,M)))continue e}Ke&&Ke.push(ft),Ie.push(nt)}}return Ie}function SE(i,g,M,j){return eo(i,function(G,ee,le){g(j,M(G),ee,le)}),j}function Ja(i,g,M){g=Go(g,i),i=Mw(i,g);var j=i==null?i:i[no(Ai(g))];return j==null?e:ar(j,i,M)}function Hy(i){return Fn(i)&&Or(i)==ue}function AE(i){return Fn(i)&&Or(i)==ze}function _E(i){return Fn(i)&&Or(i)==Te}function el(i,g,M,j,G){return i===g?!0:i==null||g==null||!Fn(i)&&!Fn(g)?i!==i&&g!==g:$E(i,g,M,j,el,G)}function $E(i,g,M,j,G,ee){var le=At(i),de=At(g),ve=le?ce:$r(i),Ie=de?ce:$r(g);ve=ve==ue?dn:ve,Ie=Ie==ue?dn:Ie;var Re=ve==dn,De=Ie==dn,Ke=ve==Ie;if(Ke&&Xo(i)){if(!Xo(g))return!1;le=!0,Re=!1}if(Ke&&!Re)return ee||(ee=new Bi),le||fa(i)?Cw(i,g,M,j,G,ee):eI(i,g,ve,M,j,G,ee);if(!(M&o)){var nt=Re&&on.call(i,"__wrapped__"),ft=De&&on.call(g,"__wrapped__");if(nt||ft){var Ot=nt?i.value():i,mt=ft?g.value():g;return ee||(ee=new Bi),G(Ot,mt,M,j,ee)}}return Ke?(ee||(ee=new Bi),tI(i,g,M,j,G,ee)):!1}function TE(i){return Fn(i)&&$r(i)==tt}function dd(i,g,M,j){var G=M.length,ee=G,le=!j;if(i==null)return!ee;for(i=Lt(i);G--;){var de=M[G];if(le&&de[2]?de[1]!==i[de[0]]:!(de[0]in i))return!1}for(;++G<ee;){de=M[G];var ve=de[0],Ie=i[ve],Re=de[1];if(le&&de[2]){if(Ie===e&&!(ve in i))return!1}else{var De=new Bi;if(j)var Ke=j(Ie,Re,ve,i,g,De);if(!(Ke===e?el(Re,Ie,o|c,j,De):Ke))return!1}}return!0}function Uy(i){if(!$n(i)||uI(i))return!1;var g=ko(i)?TM:kr;return g.test(Is(i))}function ME(i){return Fn(i)&&Or(i)==pn}function EE(i){return Fn(i)&&$r(i)==En}function IE(i){return Fn(i)&&zc(i.length)&&!!Jt[Or(i)]}function Vy(i){return typeof i=="function"?i:i==null?Gr:typeof i=="object"?At(i)?Gy(i[0],i[1]):Ky(i):pb(i)}function pd(i){if(!rl(i))return OM(i);var g=[];for(var M in Lt(i))on.call(i,M)&&M!="constructor"&&g.push(M);return g}function RE(i){if(!$n(i))return gI(i);var g=rl(i),M=[];for(var j in i)j=="constructor"&&(g||!on.call(i,j))||M.push(j);return M}function gd(i,g){return i<g}function qy(i,g){var M=-1,j=qr(i)?xe(i.length):[];return qo(i,function(G,ee,le){j[++M]=g(G,ee,le)}),j}function Ky(i){var g=Md(i);return g.length==1&&g[0][2]?$w(g[0][0],g[0][1]):function(M){return M===i||dd(M,i,g)}}function Gy(i,g){return Id(i)&&_w(g)?$w(no(i),g):function(M){var j=zd(M,i);return j===e&&j===g?jd(M,i):el(g,j,o|c)}}function Ac(i,g,M,j,G){i!==g&&ld(g,function(ee,le){if(G||(G=new Bi),$n(ee))LE(i,g,le,M,Ac,j,G);else{var de=j?j(Ld(i,le),ee,le+"",i,g,G):e;de===e&&(de=ee),sd(i,le,de)}},Kr)}function LE(i,g,M,j,G,ee,le){var de=Ld(i,M),ve=Ld(g,M),Ie=le.get(ve);if(Ie){sd(i,M,Ie);return}var Re=ee?ee(de,ve,M+"",i,g,le):e,De=Re===e;if(De){var Ke=At(ve),nt=!Ke&&Xo(ve),ft=!Ke&&!nt&&fa(ve);Re=ve,Ke||nt||ft?At(de)?Re=de:Un(de)?Re=Vr(de):nt?(De=!1,Re=sw(ve,!0)):ft?(De=!1,Re=aw(ve,!0)):Re=[]:ol(ve)||Rs(ve)?(Re=de,Rs(de)?Re=rb(de):(!$n(de)||ko(de))&&(Re=Aw(ve))):De=!1}De&&(le.set(ve,Re),G(Re,ve,j,ee,le),le.delete(ve)),sd(i,M,Re)}function Yy(i,g){var M=i.length;if(M)return g+=g<0?M:0,Co(g,M)?i[g]:e}function Xy(i,g,M){g.length?g=m(g,function(ee){return At(ee)?function(le){return Ms(le,ee.length===1?ee[0]:ee)}:ee}):g=[Gr];var j=-1;g=m(g,at(gt()));var G=qy(i,function(ee,le,de){var ve=m(g,function(Ie){return Ie(ee)});return{criteria:ve,index:++j,value:ee}});return Ue(G,function(ee,le){return qE(ee,le,M)})}function OE(i,g){return Qy(i,g,function(M,j){return jd(i,j)})}function Qy(i,g,M){for(var j=-1,G=g.length,ee={};++j<G;){var le=g[j],de=Ms(i,le);M(de,le)&&tl(ee,Go(le,i),de)}return ee}function NE(i){return function(g){return Ms(g,i)}}function fd(i,g,M,j){var G=j?ye:se,ee=-1,le=g.length,de=i;for(i===g&&(g=Vr(g)),M&&(de=m(i,at(M)));++ee<le;)for(var ve=0,Ie=g[ee],Re=M?M(Ie):Ie;(ve=G(de,Re,ve,j))>-1;)de!==i&&fc.call(de,ve,1),fc.call(i,ve,1);return i}function Zy(i,g){for(var M=i?g.length:0,j=M-1;M--;){var G=g[M];if(M==j||G!==ee){var ee=G;Co(G)?fc.call(i,G,1):wd(i,G)}}return i}function md(i,g){return i+yc(Ry()*(g-i+1))}function DE(i,g,M,j){for(var G=-1,ee=or(vc((g-i)/(M||1)),0),le=xe(ee);ee--;)le[j?ee:++G]=i,i+=M;return le}function vd(i,g){var M="";if(!i||g<1||g>U)return M;do g%2&&(M+=i),g=yc(g/2),g&&(i+=i);while(g);return M}function Ft(i,g){return Od(Tw(i,g,Gr),i+"")}function FE(i){return Ny(ma(i))}function PE(i,g){var M=ma(i);return Nc(M,Ts(g,0,M.length))}function tl(i,g,M,j){if(!$n(i))return i;g=Go(g,i);for(var G=-1,ee=g.length,le=ee-1,de=i;de!=null&&++G<ee;){var ve=no(g[G]),Ie=M;if(ve==="__proto__"||ve==="constructor"||ve==="prototype")return i;if(G!=le){var Re=de[ve];Ie=j?j(Re,ve,de):e,Ie===e&&(Ie=$n(Re)?Re:Co(g[G+1])?[]:{})}Qa(de,ve,Ie),de=de[ve]}return i}var Jy=wc?function(i,g){return wc.set(i,g),i}:Gr,WE=mc?function(i,g){return mc(i,"toString",{configurable:!0,enumerable:!1,value:Ud(g),writable:!0})}:Gr;function BE(i){return Nc(ma(i))}function Si(i,g,M){var j=-1,G=i.length;g<0&&(g=-g>G?0:G+g),M=M>G?G:M,M<0&&(M+=G),G=g>M?0:M-g>>>0,g>>>=0;for(var ee=xe(G);++j<G;)ee[j]=i[j+g];return ee}function zE(i,g){var M;return qo(i,function(j,G,ee){return M=g(j,G,ee),!M}),!!M}function _c(i,g,M){var j=0,G=i==null?j:i.length;if(typeof g=="number"&&g===g&&G<=ne){for(;j<G;){var ee=j+G>>>1,le=i[ee];le!==null&&!si(le)&&(M?le<=g:le<g)?j=ee+1:G=ee}return G}return yd(i,g,Gr,M)}function yd(i,g,M,j){var G=0,ee=i==null?0:i.length;if(ee===0)return 0;g=M(g);for(var le=g!==g,de=g===null,ve=si(g),Ie=g===e;G<ee;){var Re=yc((G+ee)/2),De=M(i[Re]),Ke=De!==e,nt=De===null,ft=De===De,Ot=si(De);if(le)var mt=j||ft;else Ie?mt=ft&&(j||Ke):de?mt=ft&&Ke&&(j||!nt):ve?mt=ft&&Ke&&!nt&&(j||!Ot):nt||Ot?mt=!1:mt=j?De<=g:De<g;mt?G=Re+1:ee=Re}return _r(ee,he)}function ew(i,g){for(var M=-1,j=i.length,G=0,ee=[];++M<j;){var le=i[M],de=g?g(le):le;if(!M||!zi(de,ve)){var ve=de;ee[G++]=le===0?0:le}}return ee}function tw(i){return typeof i=="number"?i:si(i)?Z:+i}function oi(i){if(typeof i=="string")return i;if(At(i))return m(i,oi)+"";if(si(i))return Ly?Ly.call(i):"";var g=i+"";return g=="0"&&1/i==-B?"-0":g}function Ko(i,g,M){var j=-1,G=ri,ee=i.length,le=!0,de=[],ve=de;if(M)le=!1,G=ii;else if(ee>=v){var Ie=g?null:ZE(i);if(Ie)return Ve(Ie);le=!1,G=kt,ve=new $s}else ve=g?[]:de;e:for(;++j<ee;){var Re=i[j],De=g?g(Re):Re;if(Re=M||Re!==0?Re:0,le&&De===De){for(var Ke=ve.length;Ke--;)if(ve[Ke]===De)continue e;g&&ve.push(De),de.push(Re)}else G(ve,De,M)||(ve!==de&&ve.push(De),de.push(Re))}return de}function wd(i,g){return g=Go(g,i),i=Mw(i,g),i==null||delete i[no(Ai(g))]}function nw(i,g,M,j){return tl(i,g,M(Ms(i,g)),j)}function $c(i,g,M,j){for(var G=i.length,ee=j?G:-1;(j?ee--:++ee<G)&&g(i[ee],ee,i););return M?Si(i,j?0:ee,j?ee+1:G):Si(i,j?ee+1:0,j?G:ee)}function rw(i,g){var M=i;return M instanceof Ht&&(M=M.value()),k(g,function(j,G){return G.func.apply(G.thisArg,$([j],G.args))},M)}function bd(i,g,M){var j=i.length;if(j<2)return j?Ko(i[0]):[];for(var G=-1,ee=xe(j);++G<j;)for(var le=i[G],de=-1;++de<j;)de!=G&&(ee[G]=Za(ee[G]||le,i[de],g,M));return Ko(mr(ee,1),g,M)}function iw(i,g,M){for(var j=-1,G=i.length,ee=g.length,le={};++j<G;){var de=j<ee?g[j]:e;M(le,i[j],de)}return le}function xd(i){return Un(i)?i:[]}function Cd(i){return typeof i=="function"?i:Gr}function Go(i,g){return At(i)?i:Id(i,g)?[i]:Lw(nn(i))}var jE=Ft;function Yo(i,g,M){var j=i.length;return M=M===e?j:M,!g&&M>=j?i:Si(i,g,M)}var ow=MM||function(i){return sn.clearTimeout(i)};function sw(i,g){if(g)return i.slice();var M=i.length,j=$y?$y(M):new i.constructor(M);return i.copy(j),j}function kd(i){var g=new i.constructor(i.byteLength);return new pc(g).set(new pc(i)),g}function HE(i,g){var M=g?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.byteLength)}function UE(i){var g=new i.constructor(i.source,Jr.exec(i));return g.lastIndex=i.lastIndex,g}function VE(i){return Xa?Lt(Xa.call(i)):{}}function aw(i,g){var M=g?kd(i.buffer):i.buffer;return new i.constructor(M,i.byteOffset,i.length)}function lw(i,g){if(i!==g){var M=i!==e,j=i===null,G=i===i,ee=si(i),le=g!==e,de=g===null,ve=g===g,Ie=si(g);if(!de&&!Ie&&!ee&&i>g||ee&&le&&ve&&!de&&!Ie||j&&le&&ve||!M&&ve||!G)return 1;if(!j&&!ee&&!Ie&&i<g||Ie&&M&&G&&!j&&!ee||de&&M&&G||!le&&G||!ve)return-1}return 0}function qE(i,g,M){for(var j=-1,G=i.criteria,ee=g.criteria,le=G.length,de=M.length;++j<le;){var ve=lw(G[j],ee[j]);if(ve){if(j>=de)return ve;var Ie=M[j];return ve*(Ie=="desc"?-1:1)}}return i.index-g.index}function cw(i,g,M,j){for(var G=-1,ee=i.length,le=M.length,de=-1,ve=g.length,Ie=or(ee-le,0),Re=xe(ve+Ie),De=!j;++de<ve;)Re[de]=g[de];for(;++G<le;)(De||G<ee)&&(Re[M[G]]=i[G]);for(;Ie--;)Re[de++]=i[G++];return Re}function uw(i,g,M,j){for(var G=-1,ee=i.length,le=-1,de=M.length,ve=-1,Ie=g.length,Re=or(ee-de,0),De=xe(Re+Ie),Ke=!j;++G<Re;)De[G]=i[G];for(var nt=G;++ve<Ie;)De[nt+ve]=g[ve];for(;++le<de;)(Ke||G<ee)&&(De[nt+M[le]]=i[G++]);return De}function Vr(i,g){var M=-1,j=i.length;for(g||(g=xe(j));++M<j;)g[M]=i[M];return g}function to(i,g,M,j){var G=!M;M||(M={});for(var ee=-1,le=g.length;++ee<le;){var de=g[ee],ve=j?j(M[de],i[de],de,M,i):e;ve===e&&(ve=i[de]),G?wo(M,de,ve):Qa(M,de,ve)}return M}function KE(i,g){return to(i,Ed(i),g)}function GE(i,g){return to(i,kw(i),g)}function Tc(i,g){return function(M,j){var G=At(M)?lr:mE,ee=g?g():{};return G(M,i,gt(j,2),ee)}}function da(i){return Ft(function(g,M){var j=-1,G=M.length,ee=G>1?M[G-1]:e,le=G>2?M[2]:e;for(ee=i.length>3&&typeof ee=="function"?(G--,ee):e,le&&Nr(M[0],M[1],le)&&(ee=G<3?e:ee,G=1),g=Lt(g);++j<G;){var de=M[j];de&&i(g,de,j,ee)}return g})}function hw(i,g){return function(M,j){if(M==null)return M;if(!qr(M))return i(M,j);for(var G=M.length,ee=g?G:-1,le=Lt(M);(g?ee--:++ee<G)&&j(le[ee],ee,le)!==!1;);return M}}function dw(i){return function(g,M,j){for(var G=-1,ee=Lt(g),le=j(g),de=le.length;de--;){var ve=le[i?de:++G];if(M(ee[ve],ve,ee)===!1)break}return g}}function YE(i,g,M){var j=g&d,G=nl(i);function ee(){var le=this&&this!==sn&&this instanceof ee?G:i;return le.apply(j?M:this,arguments)}return ee}function pw(i){return function(g){g=nn(g);var M=oe(g)?St(g):e,j=M?M[0]:g.charAt(0),G=M?Yo(M,1).join(""):g.slice(1);return j[i]()+G}}function pa(i){return function(g){return k(hb(ub(g).replace(_n,"")),i,"")}}function nl(i){return function(){var g=arguments;switch(g.length){case 0:return new i;case 1:return new i(g[0]);case 2:return new i(g[0],g[1]);case 3:return new i(g[0],g[1],g[2]);case 4:return new i(g[0],g[1],g[2],g[3]);case 5:return new i(g[0],g[1],g[2],g[3],g[4]);case 6:return new i(g[0],g[1],g[2],g[3],g[4],g[5]);case 7:return new i(g[0],g[1],g[2],g[3],g[4],g[5],g[6])}var M=ha(i.prototype),j=i.apply(M,g);return $n(j)?j:M}}function XE(i,g,M){var j=nl(i);function G(){for(var ee=arguments.length,le=xe(ee),de=ee,ve=ga(G);de--;)le[de]=arguments[de];var Ie=ee<3&&le[0]!==ve&&le[ee-1]!==ve?[]:We(le,ve);if(ee-=Ie.length,ee<M)return yw(i,g,Mc,G.placeholder,e,le,Ie,e,e,M-ee);var Re=this&&this!==sn&&this instanceof G?j:i;return ar(Re,this,le)}return G}function gw(i){return function(g,M,j){var G=Lt(g);if(!qr(g)){var ee=gt(M,3);g=hr(g),M=function(de){return ee(G[de],de,G)}}var le=i(g,M,j);return le>-1?G[ee?g[le]:le]:e}}function fw(i){return xo(function(g){var M=g.length,j=M,G=Ci.prototype.thru;for(i&&g.reverse();j--;){var ee=g[j];if(typeof ee!="function")throw new an(y);if(G&&!le&&Lc(ee)=="wrapper")var le=new Ci([],!0)}for(j=le?j:M;++j<M;){ee=g[j];var de=Lc(ee),ve=de=="wrapper"?Td(ee):e;ve&&Rd(ve[0])&&ve[1]==(R|I|S|L)&&!ve[4].length&&ve[9]==1?le=le[Lc(ve[0])].apply(le,ve[3]):le=ee.length==1&&Rd(ee)?le[de]():le.thru(ee)}return function(){var Ie=arguments,Re=Ie[0];if(le&&Ie.length==1&&At(Re))return le.plant(Re).value();for(var De=0,Ke=M?g[De].apply(this,Ie):Re;++De<M;)Ke=g[De].call(this,Ke);return Ke}})}function Mc(i,g,M,j,G,ee,le,de,ve,Ie){var Re=g&R,De=g&d,Ke=g&w,nt=g&(I|T),ft=g&F,Ot=Ke?e:nl(i);function mt(){for(var Wt=arguments.length,Vt=xe(Wt),ai=Wt;ai--;)Vt[ai]=arguments[ai];if(nt)var Dr=ga(mt),li=cr(Vt,Dr);if(j&&(Vt=cw(Vt,j,G,nt)),ee&&(Vt=uw(Vt,ee,le,nt)),Wt-=li,nt&&Wt<Ie){var Vn=We(Vt,Dr);return yw(i,g,Mc,mt.placeholder,M,Vt,Vn,de,ve,Ie-Wt)}var ji=De?M:this,Ao=Ke?ji[i]:i;return Wt=Vt.length,de?Vt=mI(Vt,de):ft&&Wt>1&&Vt.reverse(),Re&&ve<Wt&&(Vt.length=ve),this&&this!==sn&&this instanceof mt&&(Ao=Ot||nl(Ao)),Ao.apply(ji,Vt)}return mt}function mw(i,g){return function(M,j){return SE(M,i,g(j),{})}}function Ec(i,g){return function(M,j){var G;if(M===e&&j===e)return g;if(M!==e&&(G=M),j!==e){if(G===e)return j;typeof M=="string"||typeof j=="string"?(M=oi(M),j=oi(j)):(M=tw(M),j=tw(j)),G=i(M,j)}return G}}function Sd(i){return xo(function(g){return g=m(g,at(gt())),Ft(function(M){var j=this;return i(g,function(G){return ar(G,j,M)})})})}function Ic(i,g){g=g===e?" ":oi(g);var M=g.length;if(M<2)return M?vd(g,i):g;var j=vd(g,vc(i/Pt(g)));return oe(g)?Yo(St(j),0,i).join(""):j.slice(0,i)}function QE(i,g,M,j){var G=g&d,ee=nl(i);function le(){for(var de=-1,ve=arguments.length,Ie=-1,Re=j.length,De=xe(Re+ve),Ke=this&&this!==sn&&this instanceof le?ee:i;++Ie<Re;)De[Ie]=j[Ie];for(;ve--;)De[Ie++]=arguments[++de];return ar(Ke,G?M:this,De)}return le}function vw(i){return function(g,M,j){return j&&typeof j!="number"&&Nr(g,M,j)&&(M=j=e),g=So(g),M===e?(M=g,g=0):M=So(M),j=j===e?g<M?1:-1:So(j),DE(g,M,j,i)}}function Rc(i){return function(g,M){return typeof g=="string"&&typeof M=="string"||(g=_i(g),M=_i(M)),i(g,M)}}function yw(i,g,M,j,G,ee,le,de,ve,Ie){var Re=g&I,De=Re?le:e,Ke=Re?e:le,nt=Re?ee:e,ft=Re?e:ee;g|=Re?S:C,g&=~(Re?C:S),g&b||(g&=-4);var Ot=[i,g,G,nt,De,ft,Ke,de,ve,Ie],mt=M.apply(e,Ot);return Rd(i)&&Ew(mt,Ot),mt.placeholder=j,Iw(mt,i,g)}function Ad(i){var g=Kt[i];return function(M,j){if(M=_i(M),j=j==null?0:_r(It(j),292),j&&Iy(M)){var G=(nn(M)+"e").split("e"),ee=g(G[0]+"e"+(+G[1]+j));return G=(nn(ee)+"e").split("e"),+(G[0]+"e"+(+G[1]-j))}return g(M)}}var ZE=ca&&1/Ve(new ca([,-0]))[1]==B?function(i){return new ca(i)}:Kd;function ww(i){return function(g){var M=$r(g);return M==tt?Me(g):M==En?Xe(g):et(g,i(g))}}function bo(i,g,M,j,G,ee,le,de){var ve=g&w;if(!ve&&typeof i!="function")throw new an(y);var Ie=j?j.length:0;if(Ie||(g&=-97,j=G=e),le=le===e?le:or(It(le),0),de=de===e?de:It(de),Ie-=G?G.length:0,g&C){var Re=j,De=G;j=G=e}var Ke=ve?e:Td(i),nt=[i,g,M,j,G,Re,De,ee,le,de];if(Ke&&pI(nt,Ke),i=nt[0],g=nt[1],M=nt[2],j=nt[3],G=nt[4],de=nt[9]=nt[9]===e?ve?0:i.length:or(nt[9]-Ie,0),!de&&g&(I|T)&&(g&=-25),!g||g==d)var ft=YE(i,g,M);else g==I||g==T?ft=XE(i,g,de):(g==S||g==(d|S))&&!G.length?ft=QE(i,g,M,j):ft=Mc.apply(e,nt);var Ot=Ke?Jy:Ew;return Iw(Ot(ft,nt),i,g)}function bw(i,g,M,j){return i===e||zi(i,Dn[M])&&!on.call(j,M)?g:i}function xw(i,g,M,j,G,ee){return $n(i)&&$n(g)&&(ee.set(g,i),Ac(i,g,e,xw,ee),ee.delete(g)),i}function JE(i){return ol(i)?e:i}function Cw(i,g,M,j,G,ee){var le=M&o,de=i.length,ve=g.length;if(de!=ve&&!(le&&ve>de))return!1;var Ie=ee.get(i),Re=ee.get(g);if(Ie&&Re)return Ie==g&&Re==i;var De=-1,Ke=!0,nt=M&c?new $s:e;for(ee.set(i,g),ee.set(g,i);++De<de;){var ft=i[De],Ot=g[De];if(j)var mt=le?j(Ot,ft,De,g,i,ee):j(ft,Ot,De,i,g,ee);if(mt!==e){if(mt)continue;Ke=!1;break}if(nt){if(!W(g,function(Wt,Vt){if(!kt(nt,Vt)&&(ft===Wt||G(ft,Wt,M,j,ee)))return nt.push(Vt)})){Ke=!1;break}}else if(!(ft===Ot||G(ft,Ot,M,j,ee))){Ke=!1;break}}return ee.delete(i),ee.delete(g),Ke}function eI(i,g,M,j,G,ee,le){switch(M){case Ye:if(i.byteLength!=g.byteLength||i.byteOffset!=g.byteOffset)return!1;i=i.buffer,g=g.buffer;case ze:return!(i.byteLength!=g.byteLength||!ee(new pc(i),new pc(g)));case $e:case Te:case ht:return zi(+i,+g);case Ge:return i.name==g.name&&i.message==g.message;case pn:case In:return i==g+"";case tt:var de=Me;case En:var ve=j&o;if(de||(de=Ve),i.size!=g.size&&!ve)return!1;var Ie=le.get(i);if(Ie)return Ie==g;j|=c,le.set(i,g);var Re=Cw(de(i),de(g),j,G,ee,le);return le.delete(i),Re;case Yn:if(Xa)return Xa.call(i)==Xa.call(g)}return!1}function tI(i,g,M,j,G,ee){var le=M&o,de=_d(i),ve=de.length,Ie=_d(g),Re=Ie.length;if(ve!=Re&&!le)return!1;for(var De=ve;De--;){var Ke=de[De];if(!(le?Ke in g:on.call(g,Ke)))return!1}var nt=ee.get(i),ft=ee.get(g);if(nt&&ft)return nt==g&&ft==i;var Ot=!0;ee.set(i,g),ee.set(g,i);for(var mt=le;++De<ve;){Ke=de[De];var Wt=i[Ke],Vt=g[Ke];if(j)var ai=le?j(Vt,Wt,Ke,g,i,ee):j(Wt,Vt,Ke,i,g,ee);if(!(ai===e?Wt===Vt||G(Wt,Vt,M,j,ee):ai)){Ot=!1;break}mt||(mt=Ke=="constructor")}if(Ot&&!mt){var Dr=i.constructor,li=g.constructor;Dr!=li&&"constructor"in i&&"constructor"in g&&!(typeof Dr=="function"&&Dr instanceof Dr&&typeof li=="function"&&li instanceof li)&&(Ot=!1)}return ee.delete(i),ee.delete(g),Ot}function xo(i){return Od(Tw(i,e,Fw),i+"")}function _d(i){return jy(i,hr,Ed)}function $d(i){return jy(i,Kr,kw)}var Td=wc?function(i){return wc.get(i)}:Kd;function Lc(i){for(var g=i.name+"",M=ua[g],j=on.call(ua,g)?M.length:0;j--;){var G=M[j],ee=G.func;if(ee==null||ee==i)return G.name}return g}function ga(i){var g=on.call(J,"placeholder")?J:i;return g.placeholder}function gt(){var i=J.iteratee||Vd;return i=i===Vd?Vy:i,arguments.length?i(arguments[0],arguments[1]):i}function Oc(i,g){var M=i.__data__;return cI(g)?M[typeof g=="string"?"string":"hash"]:M.map}function Md(i){for(var g=hr(i),M=g.length;M--;){var j=g[M],G=i[j];g[M]=[j,G,_w(G)]}return g}function Es(i,g){var M=ie(i,g);return Uy(M)?M:e}function nI(i){var g=on.call(i,As),M=i[As];try{i[As]=e;var j=!0}catch{}var G=hc.call(i);return j&&(g?i[As]=M:delete i[As]),G}var Ed=rd?function(i){return i==null?[]:(i=Lt(i),Ar(rd(i),function(g){return My.call(i,g)}))}:Gd,kw=rd?function(i){for(var g=[];i;)$(g,Ed(i)),i=gc(i);return g}:Gd,$r=Or;(id&&$r(new id(new ArrayBuffer(1)))!=Ye||Ka&&$r(new Ka)!=tt||od&&$r(od.resolve())!=qt||ca&&$r(new ca)!=En||Ga&&$r(new Ga)!=He)&&($r=function(i){var g=Or(i),M=g==dn?i.constructor:e,j=M?Is(M):"";if(j)switch(j){case PM:return Ye;case WM:return tt;case BM:return qt;case zM:return En;case jM:return He}return g});function rI(i,g,M){for(var j=-1,G=M.length;++j<G;){var ee=M[j],le=ee.size;switch(ee.type){case"drop":i+=le;break;case"dropRight":g-=le;break;case"take":g=_r(g,i+le);break;case"takeRight":i=or(i,g-le);break}}return{start:i,end:g}}function iI(i){var g=i.match(Di);return g?g[1].split(ms):[]}function Sw(i,g,M){g=Go(g,i);for(var j=-1,G=g.length,ee=!1;++j<G;){var le=no(g[j]);if(!(ee=i!=null&&M(i,le)))break;i=i[le]}return ee||++j!=G?ee:(G=i==null?0:i.length,!!G&&zc(G)&&Co(le,G)&&(At(i)||Rs(i)))}function oI(i){var g=i.length,M=new i.constructor(g);return g&&typeof i[0]=="string"&&on.call(i,"index")&&(M.index=i.index,M.input=i.input),M}function Aw(i){return typeof i.constructor=="function"&&!rl(i)?ha(gc(i)):{}}function sI(i,g,M){var j=i.constructor;switch(g){case ze:return kd(i);case $e:case Te:return new j(+i);case Ye:return HE(i,M);case dt:case Ct:case xt:case Rt:case Et:case ct:case yt:case bn:case br:return aw(i,M);case tt:return new j;case ht:case In:return new j(i);case pn:return UE(i);case En:return new j;case Yn:return VE(i)}}function aI(i,g){var M=g.length;if(!M)return i;var j=M-1;return g[j]=(M>1?"& ":"")+g[j],g=g.join(M>2?", ":" "),i.replace(Gi,`{
1469
1469
  /* [wrapped with `+g+`] */
1470
- `)}function lI(i){return At(i)||Rs(i)||!!(Ey&&i&&i[Ey])}function Co(i,g){var M=typeof i;return g=g??U,!!g&&(M=="number"||M!="symbol"&&pn.test(i))&&i>-1&&i%1==0&&i<g}function Nr(i,g,M){if(!_n(M))return!1;var j=typeof g;return(j=="number"?qr(M)&&Co(g,M.length):j=="string"&&g in M)?zi(M[g],i):!1}function Id(i,g){if(At(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||si(i)?!0:Oi.test(i)||!ta.test(i)||g!=null&&i in Lt(g)}function cI(i){var g=typeof i;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?i!=="__proto__":i===null}function Rd(i){var g=Lc(i),M=J[g];if(typeof M!="function"||!(g in Ht.prototype))return!1;if(i===M)return!0;var j=Td(M);return!!j&&i===j[0]}function uI(i){return!!_y&&_y in i}var hI=Ss?ko:Yd;function rl(i){var g=i&&i.constructor,M=typeof g=="function"&&g.prototype||Nn;return i===M}function _w(i){return i===i&&!_n(i)}function $w(i,g){return function(M){return M==null?!1:M[i]===g&&(g!==e||i in Lt(M))}}function dI(i){var g=Wc(i,function(j){return M.size===p&&M.clear(),j}),M=g.cache;return g}function pI(i,g){var M=i[1],j=g[1],G=M|j,ee=G<(d|w|R),le=j==R&&M==I||j==R&&M==L&&i[7].length<=g[8]||j==(R|L)&&g[7].length<=g[8]&&M==I;if(!(ee||le))return i;j&d&&(i[2]=g[2],G|=M&d?0:b);var de=g[3];if(de){var ve=i[3];i[3]=ve?cw(ve,de,g[4]):de,i[4]=ve?We(i[3],s):g[4]}return de=g[5],de&&(ve=i[5],i[5]=ve?uw(ve,de,g[6]):de,i[6]=ve?We(i[5],s):g[6]),de=g[7],de&&(i[7]=de),j&R&&(i[8]=i[8]==null?g[8]:_r(i[8],g[8])),i[9]==null&&(i[9]=g[9]),i[0]=g[0],i[1]=G,i}function gI(i){var g=[];if(i!=null)for(var M in Lt(i))g.push(M);return g}function fI(i){return hc.call(i)}function Tw(i,g,M){return g=ir(g===e?i.length-1:g,0),function(){for(var j=arguments,G=-1,ee=ir(j.length-g,0),le=xe(ee);++G<ee;)le[G]=j[g+G];G=-1;for(var de=xe(g+1);++G<g;)de[G]=j[G];return de[g]=M(le),sr(i,this,de)}}function Mw(i,g){return g.length<2?i:Ms(i,Si(g,0,-1))}function mI(i,g){for(var M=i.length,j=_r(g.length,M),G=Vr(i);j--;){var ee=g[j];i[j]=Co(ee,M)?G[ee]:e}return i}function Ld(i,g){if(!(g==="constructor"&&typeof i[g]=="function")&&g!="__proto__")return i[g]}var Ew=Rw(Jy),il=IM||function(i,g){return sn.setTimeout(i,g)},Od=Rw(WE);function Iw(i,g,M){var j=g+"";return Od(i,aI(j,vI(iI(j),M)))}function Rw(i){var g=0,M=0;return function(){var j=NM(),G=O-(j-M);if(M=j,G>0){if(++g>=P)return arguments[0]}else g=0;return i.apply(e,arguments)}}function Nc(i,g){var M=-1,j=i.length,G=j-1;for(g=g===e?j:g;++M<g;){var ee=md(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=g,i}var Lw=dI(function(i){var g=[];return i.charCodeAt(0)===46&&g.push(""),i.replace(Bn,function(M,j,G,ee){g.push(G?ee.replace(Ua,"$1"):j||M)}),g});function no(i){if(typeof i=="string"||si(i))return i;var g=i+"";return g=="0"&&1/i==-1/0?"-0":g}function Is(i){if(i!=null){try{return uc.call(i)}catch{}try{return i+""}catch{}}return""}function vI(i,g){return gr(ae,function(M){var j="_."+M[0];g&M[1]&&!ri(i,j)&&i.push(j)}),i.sort()}function Ow(i){if(i instanceof Ht)return i.clone();var g=new Ci(i.__wrapped__,i.__chain__);return g.__actions__=Vr(i.__actions__),g.__index__=i.__index__,g.__values__=i.__values__,g}function yI(i,g,M){(M?Nr(i,g,M):g===e)?g=1:g=ir(It(g),0);var j=i==null?0:i.length;if(!j||g<1)return[];for(var G=0,ee=0,le=xe(vc(j/g));G<j;)le[ee++]=Si(i,G,G+=g);return le}function wI(i){for(var g=-1,M=i==null?0:i.length,j=0,G=[];++g<M;){var ee=i[g];ee&&(G[j++]=ee)}return G}function bI(){var i=arguments.length;if(!i)return[];for(var g=xe(i-1),M=arguments[0],j=i;j--;)g[j-1]=arguments[j];return $(At(M)?Vr(M):[M],mr(g,1))}var xI=Ft(function(i,g){return Hn(i)?Za(i,mr(g,1,Hn,!0)):[]}),CI=Ft(function(i,g){var M=Ai(g);return Hn(M)&&(M=e),Hn(i)?Za(i,mr(g,1,Hn,!0),gt(M,2)):[]}),kI=Ft(function(i,g){var M=Ai(g);return Hn(M)&&(M=e),Hn(i)?Za(i,mr(g,1,Hn,!0),e,M):[]});function SI(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),Si(i,g<0?0:g,j)):[]}function AI(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),g=j-g,Si(i,0,g<0?0:g)):[]}function _I(i,g){return i&&i.length?$c(i,gt(g,3),!0,!0):[]}function $I(i,g){return i&&i.length?$c(i,gt(g,3),!0):[]}function TI(i,g,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&Nr(i,g,M)&&(M=0,j=G),bE(i,g,M,j)):[]}function Nw(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=ir(j+G,0)),re(i,gt(g,3),G)}function Dw(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==e&&(G=It(M),G=M<0?ir(j+G,0):_r(G,j-1)),re(i,gt(g,3),G,!0)}function Fw(i){var g=i==null?0:i.length;return g?mr(i,1):[]}function MI(i){var g=i==null?0:i.length;return g?mr(i,B):[]}function EI(i,g){var M=i==null?0:i.length;return M?(g=g===e?1:It(g),mr(i,g)):[]}function II(i){for(var g=-1,M=i==null?0:i.length,j={};++g<M;){var G=i[g];j[G[0]]=G[1]}return j}function Pw(i){return i&&i.length?i[0]:e}function RI(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=ir(j+G,0)),se(i,g,G)}function LI(i){var g=i==null?0:i.length;return g?Si(i,0,-1):[]}var OI=Ft(function(i){var g=m(i,xd);return g.length&&g[0]===i[0]?hd(g):[]}),NI=Ft(function(i){var g=Ai(i),M=m(i,xd);return g===Ai(M)?g=e:M.pop(),M.length&&M[0]===i[0]?hd(M,gt(g,2)):[]}),DI=Ft(function(i){var g=Ai(i),M=m(i,xd);return g=typeof g=="function"?g:e,g&&M.pop(),M.length&&M[0]===i[0]?hd(M,e,g):[]});function FI(i,g){return i==null?"":LM.call(i,g)}function Ai(i){var g=i==null?0:i.length;return g?i[g-1]:e}function PI(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==e&&(G=It(M),G=G<0?ir(j+G,0):_r(G,j-1)),g===g?bt(i,g,G):re(i,Ce,G,!0)}function WI(i,g){return i&&i.length?Yy(i,It(g)):e}var BI=Ft(Ww);function Ww(i,g){return i&&i.length&&g&&g.length?fd(i,g):i}function zI(i,g,M){return i&&i.length&&g&&g.length?fd(i,g,gt(M,2)):i}function jI(i,g,M){return i&&i.length&&g&&g.length?fd(i,g,e,M):i}var HI=xo(function(i,g){var M=i==null?0:i.length,j=ad(i,g);return Zy(i,m(g,function(G){return Co(G,M)?+G:G}).sort(lw)),j});function UI(i,g){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(g=gt(g,3);++j<ee;){var le=i[j];g(le,j,i)&&(M.push(le),G.push(j))}return Zy(i,G),M}function Nd(i){return i==null?i:FM.call(i)}function VI(i,g,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&Nr(i,g,M)?(g=0,M=j):(g=g==null?0:It(g),M=M===e?j:It(M)),Si(i,g,M)):[]}function qI(i,g){return _c(i,g)}function KI(i,g,M){return yd(i,g,gt(M,2))}function GI(i,g){var M=i==null?0:i.length;if(M){var j=_c(i,g);if(j<M&&zi(i[j],g))return j}return-1}function YI(i,g){return _c(i,g,!0)}function XI(i,g,M){return yd(i,g,gt(M,2),!0)}function QI(i,g){var M=i==null?0:i.length;if(M){var j=_c(i,g,!0)-1;if(zi(i[j],g))return j}return-1}function ZI(i){return i&&i.length?ew(i):[]}function JI(i,g){return i&&i.length?ew(i,gt(g,2)):[]}function eR(i){var g=i==null?0:i.length;return g?Si(i,1,g):[]}function tR(i,g,M){return i&&i.length?(g=M||g===e?1:It(g),Si(i,0,g<0?0:g)):[]}function nR(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),g=j-g,Si(i,g<0?0:g,j)):[]}function rR(i,g){return i&&i.length?$c(i,gt(g,3),!1,!0):[]}function iR(i,g){return i&&i.length?$c(i,gt(g,3)):[]}var oR=Ft(function(i){return Ko(mr(i,1,Hn,!0))}),sR=Ft(function(i){var g=Ai(i);return Hn(g)&&(g=e),Ko(mr(i,1,Hn,!0),gt(g,2))}),aR=Ft(function(i){var g=Ai(i);return g=typeof g=="function"?g:e,Ko(mr(i,1,Hn,!0),e,g)});function lR(i){return i&&i.length?Ko(i):[]}function cR(i,g){return i&&i.length?Ko(i,gt(g,2)):[]}function uR(i,g){return g=typeof g=="function"?g:e,i&&i.length?Ko(i,e,g):[]}function Dd(i){if(!(i&&i.length))return[];var g=0;return i=Ar(i,function(M){if(Hn(M))return g=ir(M.length,g),!0}),Qe(g,function(M){return m(i,we(M))})}function Bw(i,g){if(!(i&&i.length))return[];var M=Dd(i);return g==null?M:m(M,function(j){return sr(g,e,j)})}var hR=Ft(function(i,g){return Hn(i)?Za(i,g):[]}),dR=Ft(function(i){return bd(Ar(i,Hn))}),pR=Ft(function(i){var g=Ai(i);return Hn(g)&&(g=e),bd(Ar(i,Hn),gt(g,2))}),gR=Ft(function(i){var g=Ai(i);return g=typeof g=="function"?g:e,bd(Ar(i,Hn),e,g)}),fR=Ft(Dd);function mR(i,g){return iw(i||[],g||[],Qa)}function vR(i,g){return iw(i||[],g||[],tl)}var yR=Ft(function(i){var g=i.length,M=g>1?i[g-1]:e;return M=typeof M=="function"?(i.pop(),M):e,Bw(i,M)});function zw(i){var g=J(i);return g.__chain__=!0,g}function wR(i,g){return g(i),i}function Dc(i,g){return g(i)}var bR=xo(function(i){var g=i.length,M=g?i[0]:0,j=this.__wrapped__,G=function(ee){return ad(ee,i)};return g>1||this.__actions__.length||!(j instanceof Ht)||!Co(M)?this.thru(G):(j=j.slice(M,+M+(g?1:0)),j.__actions__.push({func:Dc,args:[G],thisArg:e}),new Ci(j,this.__chain__).thru(function(ee){return g&&!ee.length&&ee.push(e),ee}))});function xR(){return zw(this)}function CR(){return new Ci(this.value(),this.__chain__)}function kR(){this.__values__===e&&(this.__values__=tb(this.value()));var i=this.__index__>=this.__values__.length,g=i?e:this.__values__[this.__index__++];return{done:i,value:g}}function SR(){return this}function AR(i){for(var g,M=this;M instanceof xc;){var j=Ow(M);j.__index__=0,j.__values__=e,g?G.__wrapped__=j:g=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,g}function _R(){var i=this.__wrapped__;if(i instanceof Ht){var g=i;return this.__actions__.length&&(g=new Ht(this)),g=g.reverse(),g.__actions__.push({func:Dc,args:[Nd],thisArg:e}),new Ci(g,this.__chain__)}return this.thru(Nd)}function $R(){return rw(this.__wrapped__,this.__actions__)}var TR=Tc(function(i,g,M){on.call(i,M)?++i[M]:wo(i,M,1)});function MR(i,g,M){var j=At(i)?fr:wE;return M&&Nr(i,g,M)&&(g=e),j(i,gt(g,3))}function ER(i,g){var M=At(i)?Ar:By;return M(i,gt(g,3))}var IR=gw(Nw),RR=gw(Dw);function LR(i,g){return mr(Fc(i,g),1)}function OR(i,g){return mr(Fc(i,g),B)}function NR(i,g,M){return M=M===e?1:It(M),mr(Fc(i,g),M)}function jw(i,g){var M=At(i)?gr:qo;return M(i,gt(g,3))}function Hw(i,g){var M=At(i)?ks:Wy;return M(i,gt(g,3))}var DR=Tc(function(i,g,M){on.call(i,M)?i[M].push(g):wo(i,M,[g])});function FR(i,g,M,j){i=qr(i)?i:ma(i),M=M&&!j?It(M):0;var G=i.length;return M<0&&(M=ir(G+M,0)),jc(i)?M<=G&&i.indexOf(g,M)>-1:!!G&&se(i,g,M)>-1}var PR=Ft(function(i,g,M){var j=-1,G=typeof g=="function",ee=qr(i)?xe(i.length):[];return qo(i,function(le){ee[++j]=G?sr(g,le,M):Ja(le,g,M)}),ee}),WR=Tc(function(i,g,M){wo(i,M,g)});function Fc(i,g){var M=At(i)?m:qy;return M(i,gt(g,3))}function BR(i,g,M,j){return i==null?[]:(At(g)||(g=g==null?[]:[g]),M=j?e:M,At(M)||(M=M==null?[]:[M]),Xy(i,g,M))}var zR=Tc(function(i,g,M){i[M?0:1].push(g)},function(){return[[],[]]});function jR(i,g,M){var j=At(i)?k:Le,G=arguments.length<3;return j(i,gt(g,4),M,G,qo)}function HR(i,g,M){var j=At(i)?D:Le,G=arguments.length<3;return j(i,gt(g,4),M,G,Wy)}function UR(i,g){var M=At(i)?Ar:By;return M(i,Bc(gt(g,3)))}function VR(i){var g=At(i)?Ny:FE;return g(i)}function qR(i,g,M){(M?Nr(i,g,M):g===e)?g=1:g=It(g);var j=At(i)?gE:PE;return j(i,g)}function KR(i){var g=At(i)?fE:BE;return g(i)}function GR(i){if(i==null)return 0;if(qr(i))return jc(i)?Pt(i):i.length;var g=$r(i);return g==tt||g==Mn?i.size:pd(i).length}function YR(i,g,M){var j=At(i)?W:zE;return M&&Nr(i,g,M)&&(g=e),j(i,gt(g,3))}var XR=Ft(function(i,g){if(i==null)return[];var M=g.length;return M>1&&Nr(i,g[0],g[1])?g=[]:M>2&&Nr(g[0],g[1],g[2])&&(g=[g[0]]),Xy(i,mr(g,1),[])}),Pc=EM||function(){return sn.Date.now()};function QR(i,g){if(typeof g!="function")throw new an(y);return i=It(i),function(){if(--i<1)return g.apply(this,arguments)}}function Uw(i,g,M){return g=M?e:g,g=i&&g==null?i.length:g,bo(i,R,e,e,e,e,g)}function Vw(i,g){var M;if(typeof g!="function")throw new an(y);return i=It(i),function(){return--i>0&&(M=g.apply(this,arguments)),i<=1&&(g=e),M}}var Fd=Ft(function(i,g,M){var j=d;if(M.length){var G=We(M,ga(Fd));j|=S}return bo(i,j,g,M,G)}),qw=Ft(function(i,g,M){var j=d|w;if(M.length){var G=We(M,ga(qw));j|=S}return bo(g,j,i,M,G)});function Kw(i,g,M){g=M?e:g;var j=bo(i,I,e,e,e,e,e,g);return j.placeholder=Kw.placeholder,j}function Gw(i,g,M){g=M?e:g;var j=bo(i,T,e,e,e,e,e,g);return j.placeholder=Gw.placeholder,j}function Yw(i,g,M){var j,G,ee,le,de,ve,Ie=0,Re=!1,De=!1,Ke=!0;if(typeof i!="function")throw new an(y);g=_i(g)||0,_n(M)&&(Re=!!M.leading,De="maxWait"in M,ee=De?ir(_i(M.maxWait)||0,g):ee,Ke="trailing"in M?!!M.trailing:Ke);function nt(Un){var ji=j,Ao=G;return j=G=e,Ie=Un,le=i.apply(Ao,ji),le}function ft(Un){return Ie=Un,de=il(Wt,g),Re?nt(Un):le}function Ot(Un){var ji=Un-ve,Ao=Un-Ie,gb=g-ji;return De?_r(gb,ee-Ao):gb}function mt(Un){var ji=Un-ve,Ao=Un-Ie;return ve===e||ji>=g||ji<0||De&&Ao>=ee}function Wt(){var Un=Pc();if(mt(Un))return Vt(Un);de=il(Wt,Ot(Un))}function Vt(Un){return de=e,Ke&&j?nt(Un):(j=G=e,le)}function ai(){de!==e&&ow(de),Ie=0,j=ve=G=de=e}function Dr(){return de===e?le:Vt(Pc())}function li(){var Un=Pc(),ji=mt(Un);if(j=arguments,G=this,ve=Un,ji){if(de===e)return ft(ve);if(De)return ow(de),de=il(Wt,g),nt(ve)}return de===e&&(de=il(Wt,g)),le}return li.cancel=ai,li.flush=Dr,li}var ZR=Ft(function(i,g){return Py(i,1,g)}),JR=Ft(function(i,g,M){return Py(i,_i(g)||0,M)});function eL(i){return bo(i,F)}function Wc(i,g){if(typeof i!="function"||g!=null&&typeof g!="function")throw new an(y);var M=function(){var j=arguments,G=g?g.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Wc.Cache||yo),M}Wc.Cache=yo;function Bc(i){if(typeof i!="function")throw new an(y);return function(){var g=arguments;switch(g.length){case 0:return!i.call(this);case 1:return!i.call(this,g[0]);case 2:return!i.call(this,g[0],g[1]);case 3:return!i.call(this,g[0],g[1],g[2])}return!i.apply(this,g)}}function tL(i){return Vw(2,i)}var nL=jE(function(i,g){g=g.length==1&&At(g[0])?m(g[0],at(gt())):m(mr(g,1),at(gt()));var M=g.length;return Ft(function(j){for(var G=-1,ee=_r(j.length,M);++G<ee;)j[G]=g[G].call(this,j[G]);return sr(i,this,j)})}),Pd=Ft(function(i,g){var M=We(g,ga(Pd));return bo(i,S,e,g,M)}),Xw=Ft(function(i,g){var M=We(g,ga(Xw));return bo(i,C,e,g,M)}),rL=xo(function(i,g){return bo(i,L,e,e,e,g)});function iL(i,g){if(typeof i!="function")throw new an(y);return g=g===e?g:It(g),Ft(i,g)}function oL(i,g){if(typeof i!="function")throw new an(y);return g=g==null?0:ir(It(g),0),Ft(function(M){var j=M[g],G=Yo(M,0,g);return j&&$(G,j),sr(i,this,G)})}function sL(i,g,M){var j=!0,G=!0;if(typeof i!="function")throw new an(y);return _n(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Yw(i,g,{leading:j,maxWait:g,trailing:G})}function aL(i){return Uw(i,1)}function lL(i,g){return Pd(Cd(g),i)}function cL(){if(!arguments.length)return[];var i=arguments[0];return At(i)?i:[i]}function uL(i){return ki(i,l)}function hL(i,g){return g=typeof g=="function"?g:e,ki(i,l,g)}function dL(i){return ki(i,a|l)}function pL(i,g){return g=typeof g=="function"?g:e,ki(i,a|l,g)}function gL(i,g){return g==null||Fy(i,g,ur(g))}function zi(i,g){return i===g||i!==i&&g!==g}var fL=Rc(ud),mL=Rc(function(i,g){return i>=g}),Rs=Hy(function(){return arguments}())?Hy:function(i){return Dn(i)&&on.call(i,"callee")&&!My.call(i,"callee")},At=xe.isArray,vL=Ur?at(Ur):AE;function qr(i){return i!=null&&zc(i.length)&&!ko(i)}function Hn(i){return Dn(i)&&qr(i)}function yL(i){return i===!0||i===!1||Dn(i)&&Or(i)==$e}var Xo=RM||Yd,wL=Uo?at(Uo):_E;function bL(i){return Dn(i)&&i.nodeType===1&&!ol(i)}function xL(i){if(i==null)return!0;if(qr(i)&&(At(i)||typeof i=="string"||typeof i.splice=="function"||Xo(i)||fa(i)||Rs(i)))return!i.length;var g=$r(i);if(g==tt||g==Mn)return!i.size;if(rl(i))return!pd(i).length;for(var M in i)if(on.call(i,M))return!1;return!0}function CL(i,g){return el(i,g)}function kL(i,g,M){M=typeof M=="function"?M:e;var j=M?M(i,g):e;return j===e?el(i,g,e,M):!!j}function Wd(i){if(!Dn(i))return!1;var g=Or(i);return g==Ge||g==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!ol(i)}function SL(i){return typeof i=="number"&&Iy(i)}function ko(i){if(!_n(i))return!1;var g=Or(i);return g==qe||g==ut||g==fe||g==dr}function Qw(i){return typeof i=="number"&&i==It(i)}function zc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function _n(i){var g=typeof i;return i!=null&&(g=="object"||g=="function")}function Dn(i){return i!=null&&typeof i=="object"}var Zw=On?at(On):TE;function AL(i,g){return i===g||dd(i,g,Md(g))}function _L(i,g,M){return M=typeof M=="function"?M:e,dd(i,g,Md(g),M)}function $L(i){return Jw(i)&&i!=+i}function TL(i){if(hI(i))throw new lt(f);return Uy(i)}function ML(i){return i===null}function EL(i){return i==null}function Jw(i){return typeof i=="number"||Dn(i)&&Or(i)==ht}function ol(i){if(!Dn(i)||Or(i)!=hn)return!1;var g=gc(i);if(g===null)return!0;var M=on.call(g,"constructor")&&g.constructor;return typeof M=="function"&&M instanceof M&&uc.call(M)==_M}var Bd=ti?at(ti):ME;function IL(i){return Qw(i)&&i>=-9007199254740991&&i<=U}var eb=ni?at(ni):EE;function jc(i){return typeof i=="string"||!At(i)&&Dn(i)&&Or(i)==En}function si(i){return typeof i=="symbol"||Dn(i)&&Or(i)==Gn}var fa=bi?at(bi):IE;function RL(i){return i===e}function LL(i){return Dn(i)&&$r(i)==He}function OL(i){return Dn(i)&&Or(i)==ke}var NL=Rc(gd),DL=Rc(function(i,g){return i<=g});function tb(i){if(!i)return[];if(qr(i))return jc(i)?St(i):Vr(i);if(qa&&i[qa])return be(i[qa]());var g=$r(i),M=g==tt?Me:g==Mn?Ve:ma;return M(i)}function So(i){if(!i)return i===0?i:0;if(i=_i(i),i===B||i===-1/0){var g=i<0?-1:1;return g*K}return i===i?i:0}function It(i){var g=So(i),M=g%1;return g===g?M?g-M:g:0}function nb(i){return i?Ts(It(i),0,te):0}function _i(i){if(typeof i=="number")return i;if(si(i))return Z;if(_n(i)){var g=typeof i.valueOf=="function"?i.valueOf():i;i=_n(g)?g+"":g}if(typeof i!="string")return i===0?i:+i;i=fn(i);var M=ra.test(i);return M||zn.test(i)?gn(i.slice(2),M?2:8):zt.test(i)?Z:+i}function rb(i){return to(i,Kr(i))}function FL(i){return i?Ts(It(i),-9007199254740991,U):i===0?i:0}function nn(i){return i==null?"":oi(i)}var PL=da(function(i,g){if(rl(g)||qr(g)){to(g,ur(g),i);return}for(var M in g)on.call(g,M)&&Qa(i,M,g[M])}),ib=da(function(i,g){to(g,Kr(g),i)}),Hc=da(function(i,g,M,j){to(g,Kr(g),i,j)}),WL=da(function(i,g,M,j){to(g,ur(g),i,j)}),BL=xo(ad);function zL(i,g){var M=ha(i);return g==null?M:Dy(M,g)}var jL=Ft(function(i,g){i=Lt(i);var M=-1,j=g.length,G=j>2?g[2]:e;for(G&&Nr(g[0],g[1],G)&&(j=1);++M<j;)for(var ee=g[M],le=Kr(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Re=i[Ie];(Re===e||zi(Re,Nn[Ie])&&!on.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),HL=Ft(function(i){return i.push(e,xw),sr(ob,e,i)});function UL(i,g){return Q(i,gt(g,3),eo)}function VL(i,g){return Q(i,gt(g,3),cd)}function qL(i,g){return i==null?i:ld(i,gt(g,3),Kr)}function KL(i,g){return i==null?i:zy(i,gt(g,3),Kr)}function GL(i,g){return i&&eo(i,gt(g,3))}function YL(i,g){return i&&cd(i,gt(g,3))}function XL(i){return i==null?[]:Sc(i,ur(i))}function QL(i){return i==null?[]:Sc(i,Kr(i))}function zd(i,g,M){var j=i==null?e:Ms(i,g);return j===e?M:j}function ZL(i,g){return i!=null&&Sw(i,g,xE)}function jd(i,g){return i!=null&&Sw(i,g,CE)}var JL=mw(function(i,g,M){g!=null&&typeof g.toString!="function"&&(g=hc.call(g)),i[g]=M},Ud(Gr)),eO=mw(function(i,g,M){g!=null&&typeof g.toString!="function"&&(g=hc.call(g)),on.call(i,g)?i[g].push(M):i[g]=[M]},gt),tO=Ft(Ja);function ur(i){return qr(i)?Oy(i):pd(i)}function Kr(i){return qr(i)?Oy(i,!0):RE(i)}function nO(i,g){var M={};return g=gt(g,3),eo(i,function(j,G,ee){wo(M,g(j,G,ee),j)}),M}function rO(i,g){var M={};return g=gt(g,3),eo(i,function(j,G,ee){wo(M,G,g(j,G,ee))}),M}var iO=da(function(i,g,M){Ac(i,g,M)}),ob=da(function(i,g,M,j){Ac(i,g,M,j)}),oO=xo(function(i,g){var M={};if(i==null)return M;var j=!1;g=m(g,function(ee){return ee=Go(ee,i),j||(j=ee.length>1),ee}),to(i,$d(i),M),j&&(M=ki(M,a|u|l,JE));for(var G=g.length;G--;)wd(M,g[G]);return M});function sO(i,g){return sb(i,Bc(gt(g)))}var aO=xo(function(i,g){return i==null?{}:OE(i,g)});function sb(i,g){if(i==null)return{};var M=m($d(i),function(j){return[j]});return g=gt(g),Qy(i,M,function(j,G){return g(j,G[0])})}function lO(i,g,M){g=Go(g,i);var j=-1,G=g.length;for(G||(G=1,i=e);++j<G;){var ee=i==null?e:i[no(g[j])];ee===e&&(j=G,ee=M),i=ko(ee)?ee.call(i):ee}return i}function cO(i,g,M){return i==null?i:tl(i,g,M)}function uO(i,g,M,j){return j=typeof j=="function"?j:e,i==null?i:tl(i,g,M,j)}var ab=ww(ur),lb=ww(Kr);function hO(i,g,M){var j=At(i),G=j||Xo(i)||fa(i);if(g=gt(g,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:_n(i)?M=ko(ee)?ha(gc(i)):{}:M={}}return(G?gr:eo)(i,function(le,de,ve){return g(M,le,de,ve)}),M}function dO(i,g){return i==null?!0:wd(i,g)}function pO(i,g,M){return i==null?i:nw(i,g,Cd(M))}function gO(i,g,M,j){return j=typeof j=="function"?j:e,i==null?i:nw(i,g,Cd(M),j)}function ma(i){return i==null?[]:bn(i,ur(i))}function fO(i){return i==null?[]:bn(i,Kr(i))}function mO(i,g,M){return M===e&&(M=g,g=e),M!==e&&(M=_i(M),M=M===M?M:0),g!==e&&(g=_i(g),g=g===g?g:0),Ts(_i(i),g,M)}function vO(i,g,M){return g=So(g),M===e?(M=g,g=0):M=So(M),i=_i(i),kE(i,g,M)}function yO(i,g,M){if(M&&typeof M!="boolean"&&Nr(i,g,M)&&(g=M=e),M===e&&(typeof g=="boolean"?(M=g,g=e):typeof i=="boolean"&&(M=i,i=e)),i===e&&g===e?(i=0,g=1):(i=So(i),g===e?(g=i,i=0):g=So(g)),i>g){var j=i;i=g,g=j}if(M||i%1||g%1){var G=Ry();return _r(i+G*(g-i+Be("1e-"+((G+"").length-1))),g)}return md(i,g)}var wO=pa(function(i,g,M){return g=g.toLowerCase(),i+(M?cb(g):g)});function cb(i){return Hd(nn(i).toLowerCase())}function ub(i){return i=nn(i),i&&i.replace(In,xn).replace(go,"")}function bO(i,g,M){i=nn(i),g=oi(g);var j=i.length;M=M===e?j:Ts(It(M),0,j);var G=M;return M-=g.length,M>=0&&i.slice(M,G)==g}function xO(i){return i=nn(i),i&&za.test(i)?i.replace(so,V):i}function CO(i){return i=nn(i),i&&Ni.test(i)?i.replace(xr,"\\$&"):i}var kO=pa(function(i,g,M){return i+(M?"-":"")+g.toLowerCase()}),SO=pa(function(i,g,M){return i+(M?" ":"")+g.toLowerCase()}),AO=pw("toLowerCase");function _O(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;if(!g||j>=g)return i;var G=(g-j)/2;return Ic(yc(G),M)+i+Ic(vc(G),M)}function $O(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;return g&&j<g?i+Ic(g-j,M):i}function TO(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;return g&&j<g?Ic(g-j,M)+i:i}function MO(i,g,M){return M||g==null?g=0:g&&(g=+g),DM(nn(i).replace(Sn,""),g||0)}function EO(i,g,M){return(M?Nr(i,g,M):g===e)?g=1:g=It(g),vd(nn(i),g)}function IO(){var i=arguments,g=nn(i[0]);return i.length<3?g:g.replace(i[1],i[2])}var RO=pa(function(i,g,M){return i+(M?"_":"")+g.toLowerCase()});function LO(i,g,M){return M&&typeof M!="number"&&Nr(i,g,M)&&(g=M=e),M=M===e?te:M>>>0,M?(i=nn(i),i&&(typeof g=="string"||g!=null&&!Bd(g))&&(g=oi(g),!g&&oe(i))?Yo(St(i),0,M):i.split(g,M)):[]}var OO=pa(function(i,g,M){return i+(M?" ":"")+Hd(g)});function NO(i,g,M){return i=nn(i),M=M==null?0:Ts(It(M),0,i.length),g=oi(g),i.slice(M,M+g.length)==g}function DO(i,g,M){var j=J.templateSettings;M&&Nr(i,g,M)&&(g=e),i=nn(i),g=Hc({},g,j,bw);var G=Hc({},g.imports,j.imports,bw),ee=ur(G),le=bn(G,ee),de,ve,Ie=0,Re=g.interpolate||gi,De="__p += '",Ke=Lr((g.escape||gi).source+"|"+Re.source+"|"+(Re===fs?Fi:gi).source+"|"+(g.evaluate||gi).source+"|$","g"),nt="//# sourceURL="+(on.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ji+"]")+`
1470
+ `)}function lI(i){return At(i)||Rs(i)||!!(Ey&&i&&i[Ey])}function Co(i,g){var M=typeof i;return g=g??U,!!g&&(M=="number"||M!="symbol"&&gn.test(i))&&i>-1&&i%1==0&&i<g}function Nr(i,g,M){if(!$n(M))return!1;var j=typeof g;return(j=="number"?qr(M)&&Co(g,M.length):j=="string"&&g in M)?zi(M[g],i):!1}function Id(i,g){if(At(i))return!1;var M=typeof i;return M=="number"||M=="symbol"||M=="boolean"||i==null||si(i)?!0:Oi.test(i)||!ta.test(i)||g!=null&&i in Lt(g)}function cI(i){var g=typeof i;return g=="string"||g=="number"||g=="symbol"||g=="boolean"?i!=="__proto__":i===null}function Rd(i){var g=Lc(i),M=J[g];if(typeof M!="function"||!(g in Ht.prototype))return!1;if(i===M)return!0;var j=Td(M);return!!j&&i===j[0]}function uI(i){return!!_y&&_y in i}var hI=Ss?ko:Yd;function rl(i){var g=i&&i.constructor,M=typeof g=="function"&&g.prototype||Dn;return i===M}function _w(i){return i===i&&!$n(i)}function $w(i,g){return function(M){return M==null?!1:M[i]===g&&(g!==e||i in Lt(M))}}function dI(i){var g=Wc(i,function(j){return M.size===p&&M.clear(),j}),M=g.cache;return g}function pI(i,g){var M=i[1],j=g[1],G=M|j,ee=G<(d|w|R),le=j==R&&M==I||j==R&&M==L&&i[7].length<=g[8]||j==(R|L)&&g[7].length<=g[8]&&M==I;if(!(ee||le))return i;j&d&&(i[2]=g[2],G|=M&d?0:b);var de=g[3];if(de){var ve=i[3];i[3]=ve?cw(ve,de,g[4]):de,i[4]=ve?We(i[3],s):g[4]}return de=g[5],de&&(ve=i[5],i[5]=ve?uw(ve,de,g[6]):de,i[6]=ve?We(i[5],s):g[6]),de=g[7],de&&(i[7]=de),j&R&&(i[8]=i[8]==null?g[8]:_r(i[8],g[8])),i[9]==null&&(i[9]=g[9]),i[0]=g[0],i[1]=G,i}function gI(i){var g=[];if(i!=null)for(var M in Lt(i))g.push(M);return g}function fI(i){return hc.call(i)}function Tw(i,g,M){return g=or(g===e?i.length-1:g,0),function(){for(var j=arguments,G=-1,ee=or(j.length-g,0),le=xe(ee);++G<ee;)le[G]=j[g+G];G=-1;for(var de=xe(g+1);++G<g;)de[G]=j[G];return de[g]=M(le),ar(i,this,de)}}function Mw(i,g){return g.length<2?i:Ms(i,Si(g,0,-1))}function mI(i,g){for(var M=i.length,j=_r(g.length,M),G=Vr(i);j--;){var ee=g[j];i[j]=Co(ee,M)?G[ee]:e}return i}function Ld(i,g){if(!(g==="constructor"&&typeof i[g]=="function")&&g!="__proto__")return i[g]}var Ew=Rw(Jy),il=IM||function(i,g){return sn.setTimeout(i,g)},Od=Rw(WE);function Iw(i,g,M){var j=g+"";return Od(i,aI(j,vI(iI(j),M)))}function Rw(i){var g=0,M=0;return function(){var j=NM(),G=O-(j-M);if(M=j,G>0){if(++g>=P)return arguments[0]}else g=0;return i.apply(e,arguments)}}function Nc(i,g){var M=-1,j=i.length,G=j-1;for(g=g===e?j:g;++M<g;){var ee=md(M,G),le=i[ee];i[ee]=i[M],i[M]=le}return i.length=g,i}var Lw=dI(function(i){var g=[];return i.charCodeAt(0)===46&&g.push(""),i.replace(zn,function(M,j,G,ee){g.push(G?ee.replace(Ua,"$1"):j||M)}),g});function no(i){if(typeof i=="string"||si(i))return i;var g=i+"";return g=="0"&&1/i==-B?"-0":g}function Is(i){if(i!=null){try{return uc.call(i)}catch{}try{return i+""}catch{}}return""}function vI(i,g){return gr(ae,function(M){var j="_."+M[0];g&M[1]&&!ri(i,j)&&i.push(j)}),i.sort()}function Ow(i){if(i instanceof Ht)return i.clone();var g=new Ci(i.__wrapped__,i.__chain__);return g.__actions__=Vr(i.__actions__),g.__index__=i.__index__,g.__values__=i.__values__,g}function yI(i,g,M){(M?Nr(i,g,M):g===e)?g=1:g=or(It(g),0);var j=i==null?0:i.length;if(!j||g<1)return[];for(var G=0,ee=0,le=xe(vc(j/g));G<j;)le[ee++]=Si(i,G,G+=g);return le}function wI(i){for(var g=-1,M=i==null?0:i.length,j=0,G=[];++g<M;){var ee=i[g];ee&&(G[j++]=ee)}return G}function bI(){var i=arguments.length;if(!i)return[];for(var g=xe(i-1),M=arguments[0],j=i;j--;)g[j-1]=arguments[j];return $(At(M)?Vr(M):[M],mr(g,1))}var xI=Ft(function(i,g){return Un(i)?Za(i,mr(g,1,Un,!0)):[]}),CI=Ft(function(i,g){var M=Ai(g);return Un(M)&&(M=e),Un(i)?Za(i,mr(g,1,Un,!0),gt(M,2)):[]}),kI=Ft(function(i,g){var M=Ai(g);return Un(M)&&(M=e),Un(i)?Za(i,mr(g,1,Un,!0),e,M):[]});function SI(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),Si(i,g<0?0:g,j)):[]}function AI(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),g=j-g,Si(i,0,g<0?0:g)):[]}function _I(i,g){return i&&i.length?$c(i,gt(g,3),!0,!0):[]}function $I(i,g){return i&&i.length?$c(i,gt(g,3),!0):[]}function TI(i,g,M,j){var G=i==null?0:i.length;return G?(M&&typeof M!="number"&&Nr(i,g,M)&&(M=0,j=G),bE(i,g,M,j)):[]}function Nw(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=or(j+G,0)),re(i,gt(g,3),G)}function Dw(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=j-1;return M!==e&&(G=It(M),G=M<0?or(j+G,0):_r(G,j-1)),re(i,gt(g,3),G,!0)}function Fw(i){var g=i==null?0:i.length;return g?mr(i,1):[]}function MI(i){var g=i==null?0:i.length;return g?mr(i,B):[]}function EI(i,g){var M=i==null?0:i.length;return M?(g=g===e?1:It(g),mr(i,g)):[]}function II(i){for(var g=-1,M=i==null?0:i.length,j={};++g<M;){var G=i[g];j[G[0]]=G[1]}return j}function Pw(i){return i&&i.length?i[0]:e}function RI(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=M==null?0:It(M);return G<0&&(G=or(j+G,0)),se(i,g,G)}function LI(i){var g=i==null?0:i.length;return g?Si(i,0,-1):[]}var OI=Ft(function(i){var g=m(i,xd);return g.length&&g[0]===i[0]?hd(g):[]}),NI=Ft(function(i){var g=Ai(i),M=m(i,xd);return g===Ai(M)?g=e:M.pop(),M.length&&M[0]===i[0]?hd(M,gt(g,2)):[]}),DI=Ft(function(i){var g=Ai(i),M=m(i,xd);return g=typeof g=="function"?g:e,g&&M.pop(),M.length&&M[0]===i[0]?hd(M,e,g):[]});function FI(i,g){return i==null?"":LM.call(i,g)}function Ai(i){var g=i==null?0:i.length;return g?i[g-1]:e}function PI(i,g,M){var j=i==null?0:i.length;if(!j)return-1;var G=j;return M!==e&&(G=It(M),G=G<0?or(j+G,0):_r(G,j-1)),g===g?bt(i,g,G):re(i,Ce,G,!0)}function WI(i,g){return i&&i.length?Yy(i,It(g)):e}var BI=Ft(Ww);function Ww(i,g){return i&&i.length&&g&&g.length?fd(i,g):i}function zI(i,g,M){return i&&i.length&&g&&g.length?fd(i,g,gt(M,2)):i}function jI(i,g,M){return i&&i.length&&g&&g.length?fd(i,g,e,M):i}var HI=xo(function(i,g){var M=i==null?0:i.length,j=ad(i,g);return Zy(i,m(g,function(G){return Co(G,M)?+G:G}).sort(lw)),j});function UI(i,g){var M=[];if(!(i&&i.length))return M;var j=-1,G=[],ee=i.length;for(g=gt(g,3);++j<ee;){var le=i[j];g(le,j,i)&&(M.push(le),G.push(j))}return Zy(i,G),M}function Nd(i){return i==null?i:FM.call(i)}function VI(i,g,M){var j=i==null?0:i.length;return j?(M&&typeof M!="number"&&Nr(i,g,M)?(g=0,M=j):(g=g==null?0:It(g),M=M===e?j:It(M)),Si(i,g,M)):[]}function qI(i,g){return _c(i,g)}function KI(i,g,M){return yd(i,g,gt(M,2))}function GI(i,g){var M=i==null?0:i.length;if(M){var j=_c(i,g);if(j<M&&zi(i[j],g))return j}return-1}function YI(i,g){return _c(i,g,!0)}function XI(i,g,M){return yd(i,g,gt(M,2),!0)}function QI(i,g){var M=i==null?0:i.length;if(M){var j=_c(i,g,!0)-1;if(zi(i[j],g))return j}return-1}function ZI(i){return i&&i.length?ew(i):[]}function JI(i,g){return i&&i.length?ew(i,gt(g,2)):[]}function eR(i){var g=i==null?0:i.length;return g?Si(i,1,g):[]}function tR(i,g,M){return i&&i.length?(g=M||g===e?1:It(g),Si(i,0,g<0?0:g)):[]}function nR(i,g,M){var j=i==null?0:i.length;return j?(g=M||g===e?1:It(g),g=j-g,Si(i,g<0?0:g,j)):[]}function rR(i,g){return i&&i.length?$c(i,gt(g,3),!1,!0):[]}function iR(i,g){return i&&i.length?$c(i,gt(g,3)):[]}var oR=Ft(function(i){return Ko(mr(i,1,Un,!0))}),sR=Ft(function(i){var g=Ai(i);return Un(g)&&(g=e),Ko(mr(i,1,Un,!0),gt(g,2))}),aR=Ft(function(i){var g=Ai(i);return g=typeof g=="function"?g:e,Ko(mr(i,1,Un,!0),e,g)});function lR(i){return i&&i.length?Ko(i):[]}function cR(i,g){return i&&i.length?Ko(i,gt(g,2)):[]}function uR(i,g){return g=typeof g=="function"?g:e,i&&i.length?Ko(i,e,g):[]}function Dd(i){if(!(i&&i.length))return[];var g=0;return i=Ar(i,function(M){if(Un(M))return g=or(M.length,g),!0}),Qe(g,function(M){return m(i,we(M))})}function Bw(i,g){if(!(i&&i.length))return[];var M=Dd(i);return g==null?M:m(M,function(j){return ar(g,e,j)})}var hR=Ft(function(i,g){return Un(i)?Za(i,g):[]}),dR=Ft(function(i){return bd(Ar(i,Un))}),pR=Ft(function(i){var g=Ai(i);return Un(g)&&(g=e),bd(Ar(i,Un),gt(g,2))}),gR=Ft(function(i){var g=Ai(i);return g=typeof g=="function"?g:e,bd(Ar(i,Un),e,g)}),fR=Ft(Dd);function mR(i,g){return iw(i||[],g||[],Qa)}function vR(i,g){return iw(i||[],g||[],tl)}var yR=Ft(function(i){var g=i.length,M=g>1?i[g-1]:e;return M=typeof M=="function"?(i.pop(),M):e,Bw(i,M)});function zw(i){var g=J(i);return g.__chain__=!0,g}function wR(i,g){return g(i),i}function Dc(i,g){return g(i)}var bR=xo(function(i){var g=i.length,M=g?i[0]:0,j=this.__wrapped__,G=function(ee){return ad(ee,i)};return g>1||this.__actions__.length||!(j instanceof Ht)||!Co(M)?this.thru(G):(j=j.slice(M,+M+(g?1:0)),j.__actions__.push({func:Dc,args:[G],thisArg:e}),new Ci(j,this.__chain__).thru(function(ee){return g&&!ee.length&&ee.push(e),ee}))});function xR(){return zw(this)}function CR(){return new Ci(this.value(),this.__chain__)}function kR(){this.__values__===e&&(this.__values__=tb(this.value()));var i=this.__index__>=this.__values__.length,g=i?e:this.__values__[this.__index__++];return{done:i,value:g}}function SR(){return this}function AR(i){for(var g,M=this;M instanceof xc;){var j=Ow(M);j.__index__=0,j.__values__=e,g?G.__wrapped__=j:g=j;var G=j;M=M.__wrapped__}return G.__wrapped__=i,g}function _R(){var i=this.__wrapped__;if(i instanceof Ht){var g=i;return this.__actions__.length&&(g=new Ht(this)),g=g.reverse(),g.__actions__.push({func:Dc,args:[Nd],thisArg:e}),new Ci(g,this.__chain__)}return this.thru(Nd)}function $R(){return rw(this.__wrapped__,this.__actions__)}var TR=Tc(function(i,g,M){on.call(i,M)?++i[M]:wo(i,M,1)});function MR(i,g,M){var j=At(i)?fr:wE;return M&&Nr(i,g,M)&&(g=e),j(i,gt(g,3))}function ER(i,g){var M=At(i)?Ar:By;return M(i,gt(g,3))}var IR=gw(Nw),RR=gw(Dw);function LR(i,g){return mr(Fc(i,g),1)}function OR(i,g){return mr(Fc(i,g),B)}function NR(i,g,M){return M=M===e?1:It(M),mr(Fc(i,g),M)}function jw(i,g){var M=At(i)?gr:qo;return M(i,gt(g,3))}function Hw(i,g){var M=At(i)?ks:Wy;return M(i,gt(g,3))}var DR=Tc(function(i,g,M){on.call(i,M)?i[M].push(g):wo(i,M,[g])});function FR(i,g,M,j){i=qr(i)?i:ma(i),M=M&&!j?It(M):0;var G=i.length;return M<0&&(M=or(G+M,0)),jc(i)?M<=G&&i.indexOf(g,M)>-1:!!G&&se(i,g,M)>-1}var PR=Ft(function(i,g,M){var j=-1,G=typeof g=="function",ee=qr(i)?xe(i.length):[];return qo(i,function(le){ee[++j]=G?ar(g,le,M):Ja(le,g,M)}),ee}),WR=Tc(function(i,g,M){wo(i,M,g)});function Fc(i,g){var M=At(i)?m:qy;return M(i,gt(g,3))}function BR(i,g,M,j){return i==null?[]:(At(g)||(g=g==null?[]:[g]),M=j?e:M,At(M)||(M=M==null?[]:[M]),Xy(i,g,M))}var zR=Tc(function(i,g,M){i[M?0:1].push(g)},function(){return[[],[]]});function jR(i,g,M){var j=At(i)?k:Le,G=arguments.length<3;return j(i,gt(g,4),M,G,qo)}function HR(i,g,M){var j=At(i)?D:Le,G=arguments.length<3;return j(i,gt(g,4),M,G,Wy)}function UR(i,g){var M=At(i)?Ar:By;return M(i,Bc(gt(g,3)))}function VR(i){var g=At(i)?Ny:FE;return g(i)}function qR(i,g,M){(M?Nr(i,g,M):g===e)?g=1:g=It(g);var j=At(i)?gE:PE;return j(i,g)}function KR(i){var g=At(i)?fE:BE;return g(i)}function GR(i){if(i==null)return 0;if(qr(i))return jc(i)?Pt(i):i.length;var g=$r(i);return g==tt||g==En?i.size:pd(i).length}function YR(i,g,M){var j=At(i)?W:zE;return M&&Nr(i,g,M)&&(g=e),j(i,gt(g,3))}var XR=Ft(function(i,g){if(i==null)return[];var M=g.length;return M>1&&Nr(i,g[0],g[1])?g=[]:M>2&&Nr(g[0],g[1],g[2])&&(g=[g[0]]),Xy(i,mr(g,1),[])}),Pc=EM||function(){return sn.Date.now()};function QR(i,g){if(typeof g!="function")throw new an(y);return i=It(i),function(){if(--i<1)return g.apply(this,arguments)}}function Uw(i,g,M){return g=M?e:g,g=i&&g==null?i.length:g,bo(i,R,e,e,e,e,g)}function Vw(i,g){var M;if(typeof g!="function")throw new an(y);return i=It(i),function(){return--i>0&&(M=g.apply(this,arguments)),i<=1&&(g=e),M}}var Fd=Ft(function(i,g,M){var j=d;if(M.length){var G=We(M,ga(Fd));j|=S}return bo(i,j,g,M,G)}),qw=Ft(function(i,g,M){var j=d|w;if(M.length){var G=We(M,ga(qw));j|=S}return bo(g,j,i,M,G)});function Kw(i,g,M){g=M?e:g;var j=bo(i,I,e,e,e,e,e,g);return j.placeholder=Kw.placeholder,j}function Gw(i,g,M){g=M?e:g;var j=bo(i,T,e,e,e,e,e,g);return j.placeholder=Gw.placeholder,j}function Yw(i,g,M){var j,G,ee,le,de,ve,Ie=0,Re=!1,De=!1,Ke=!0;if(typeof i!="function")throw new an(y);g=_i(g)||0,$n(M)&&(Re=!!M.leading,De="maxWait"in M,ee=De?or(_i(M.maxWait)||0,g):ee,Ke="trailing"in M?!!M.trailing:Ke);function nt(Vn){var ji=j,Ao=G;return j=G=e,Ie=Vn,le=i.apply(Ao,ji),le}function ft(Vn){return Ie=Vn,de=il(Wt,g),Re?nt(Vn):le}function Ot(Vn){var ji=Vn-ve,Ao=Vn-Ie,gb=g-ji;return De?_r(gb,ee-Ao):gb}function mt(Vn){var ji=Vn-ve,Ao=Vn-Ie;return ve===e||ji>=g||ji<0||De&&Ao>=ee}function Wt(){var Vn=Pc();if(mt(Vn))return Vt(Vn);de=il(Wt,Ot(Vn))}function Vt(Vn){return de=e,Ke&&j?nt(Vn):(j=G=e,le)}function ai(){de!==e&&ow(de),Ie=0,j=ve=G=de=e}function Dr(){return de===e?le:Vt(Pc())}function li(){var Vn=Pc(),ji=mt(Vn);if(j=arguments,G=this,ve=Vn,ji){if(de===e)return ft(ve);if(De)return ow(de),de=il(Wt,g),nt(ve)}return de===e&&(de=il(Wt,g)),le}return li.cancel=ai,li.flush=Dr,li}var ZR=Ft(function(i,g){return Py(i,1,g)}),JR=Ft(function(i,g,M){return Py(i,_i(g)||0,M)});function eL(i){return bo(i,F)}function Wc(i,g){if(typeof i!="function"||g!=null&&typeof g!="function")throw new an(y);var M=function(){var j=arguments,G=g?g.apply(this,j):j[0],ee=M.cache;if(ee.has(G))return ee.get(G);var le=i.apply(this,j);return M.cache=ee.set(G,le)||ee,le};return M.cache=new(Wc.Cache||yo),M}Wc.Cache=yo;function Bc(i){if(typeof i!="function")throw new an(y);return function(){var g=arguments;switch(g.length){case 0:return!i.call(this);case 1:return!i.call(this,g[0]);case 2:return!i.call(this,g[0],g[1]);case 3:return!i.call(this,g[0],g[1],g[2])}return!i.apply(this,g)}}function tL(i){return Vw(2,i)}var nL=jE(function(i,g){g=g.length==1&&At(g[0])?m(g[0],at(gt())):m(mr(g,1),at(gt()));var M=g.length;return Ft(function(j){for(var G=-1,ee=_r(j.length,M);++G<ee;)j[G]=g[G].call(this,j[G]);return ar(i,this,j)})}),Pd=Ft(function(i,g){var M=We(g,ga(Pd));return bo(i,S,e,g,M)}),Xw=Ft(function(i,g){var M=We(g,ga(Xw));return bo(i,C,e,g,M)}),rL=xo(function(i,g){return bo(i,L,e,e,e,g)});function iL(i,g){if(typeof i!="function")throw new an(y);return g=g===e?g:It(g),Ft(i,g)}function oL(i,g){if(typeof i!="function")throw new an(y);return g=g==null?0:or(It(g),0),Ft(function(M){var j=M[g],G=Yo(M,0,g);return j&&$(G,j),ar(i,this,G)})}function sL(i,g,M){var j=!0,G=!0;if(typeof i!="function")throw new an(y);return $n(M)&&(j="leading"in M?!!M.leading:j,G="trailing"in M?!!M.trailing:G),Yw(i,g,{leading:j,maxWait:g,trailing:G})}function aL(i){return Uw(i,1)}function lL(i,g){return Pd(Cd(g),i)}function cL(){if(!arguments.length)return[];var i=arguments[0];return At(i)?i:[i]}function uL(i){return ki(i,l)}function hL(i,g){return g=typeof g=="function"?g:e,ki(i,l,g)}function dL(i){return ki(i,a|l)}function pL(i,g){return g=typeof g=="function"?g:e,ki(i,a|l,g)}function gL(i,g){return g==null||Fy(i,g,hr(g))}function zi(i,g){return i===g||i!==i&&g!==g}var fL=Rc(ud),mL=Rc(function(i,g){return i>=g}),Rs=Hy(function(){return arguments}())?Hy:function(i){return Fn(i)&&on.call(i,"callee")&&!My.call(i,"callee")},At=xe.isArray,vL=Ur?at(Ur):AE;function qr(i){return i!=null&&zc(i.length)&&!ko(i)}function Un(i){return Fn(i)&&qr(i)}function yL(i){return i===!0||i===!1||Fn(i)&&Or(i)==$e}var Xo=RM||Yd,wL=Uo?at(Uo):_E;function bL(i){return Fn(i)&&i.nodeType===1&&!ol(i)}function xL(i){if(i==null)return!0;if(qr(i)&&(At(i)||typeof i=="string"||typeof i.splice=="function"||Xo(i)||fa(i)||Rs(i)))return!i.length;var g=$r(i);if(g==tt||g==En)return!i.size;if(rl(i))return!pd(i).length;for(var M in i)if(on.call(i,M))return!1;return!0}function CL(i,g){return el(i,g)}function kL(i,g,M){M=typeof M=="function"?M:e;var j=M?M(i,g):e;return j===e?el(i,g,e,M):!!j}function Wd(i){if(!Fn(i))return!1;var g=Or(i);return g==Ge||g==Ee||typeof i.message=="string"&&typeof i.name=="string"&&!ol(i)}function SL(i){return typeof i=="number"&&Iy(i)}function ko(i){if(!$n(i))return!1;var g=Or(i);return g==qe||g==ut||g==fe||g==dr}function Qw(i){return typeof i=="number"&&i==It(i)}function zc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U}function $n(i){var g=typeof i;return i!=null&&(g=="object"||g=="function")}function Fn(i){return i!=null&&typeof i=="object"}var Zw=Nn?at(Nn):TE;function AL(i,g){return i===g||dd(i,g,Md(g))}function _L(i,g,M){return M=typeof M=="function"?M:e,dd(i,g,Md(g),M)}function $L(i){return Jw(i)&&i!=+i}function TL(i){if(hI(i))throw new lt(f);return Uy(i)}function ML(i){return i===null}function EL(i){return i==null}function Jw(i){return typeof i=="number"||Fn(i)&&Or(i)==ht}function ol(i){if(!Fn(i)||Or(i)!=dn)return!1;var g=gc(i);if(g===null)return!0;var M=on.call(g,"constructor")&&g.constructor;return typeof M=="function"&&M instanceof M&&uc.call(M)==_M}var Bd=ti?at(ti):ME;function IL(i){return Qw(i)&&i>=-U&&i<=U}var eb=ni?at(ni):EE;function jc(i){return typeof i=="string"||!At(i)&&Fn(i)&&Or(i)==In}function si(i){return typeof i=="symbol"||Fn(i)&&Or(i)==Yn}var fa=bi?at(bi):IE;function RL(i){return i===e}function LL(i){return Fn(i)&&$r(i)==He}function OL(i){return Fn(i)&&Or(i)==ke}var NL=Rc(gd),DL=Rc(function(i,g){return i<=g});function tb(i){if(!i)return[];if(qr(i))return jc(i)?St(i):Vr(i);if(qa&&i[qa])return be(i[qa]());var g=$r(i),M=g==tt?Me:g==En?Ve:ma;return M(i)}function So(i){if(!i)return i===0?i:0;if(i=_i(i),i===B||i===-B){var g=i<0?-1:1;return g*K}return i===i?i:0}function It(i){var g=So(i),M=g%1;return g===g?M?g-M:g:0}function nb(i){return i?Ts(It(i),0,te):0}function _i(i){if(typeof i=="number")return i;if(si(i))return Z;if($n(i)){var g=typeof i.valueOf=="function"?i.valueOf():i;i=$n(g)?g+"":g}if(typeof i!="string")return i===0?i:+i;i=mn(i);var M=ra.test(i);return M||jn.test(i)?fn(i.slice(2),M?2:8):zt.test(i)?Z:+i}function rb(i){return to(i,Kr(i))}function FL(i){return i?Ts(It(i),-U,U):i===0?i:0}function nn(i){return i==null?"":oi(i)}var PL=da(function(i,g){if(rl(g)||qr(g)){to(g,hr(g),i);return}for(var M in g)on.call(g,M)&&Qa(i,M,g[M])}),ib=da(function(i,g){to(g,Kr(g),i)}),Hc=da(function(i,g,M,j){to(g,Kr(g),i,j)}),WL=da(function(i,g,M,j){to(g,hr(g),i,j)}),BL=xo(ad);function zL(i,g){var M=ha(i);return g==null?M:Dy(M,g)}var jL=Ft(function(i,g){i=Lt(i);var M=-1,j=g.length,G=j>2?g[2]:e;for(G&&Nr(g[0],g[1],G)&&(j=1);++M<j;)for(var ee=g[M],le=Kr(ee),de=-1,ve=le.length;++de<ve;){var Ie=le[de],Re=i[Ie];(Re===e||zi(Re,Dn[Ie])&&!on.call(i,Ie))&&(i[Ie]=ee[Ie])}return i}),HL=Ft(function(i){return i.push(e,xw),ar(ob,e,i)});function UL(i,g){return Q(i,gt(g,3),eo)}function VL(i,g){return Q(i,gt(g,3),cd)}function qL(i,g){return i==null?i:ld(i,gt(g,3),Kr)}function KL(i,g){return i==null?i:zy(i,gt(g,3),Kr)}function GL(i,g){return i&&eo(i,gt(g,3))}function YL(i,g){return i&&cd(i,gt(g,3))}function XL(i){return i==null?[]:Sc(i,hr(i))}function QL(i){return i==null?[]:Sc(i,Kr(i))}function zd(i,g,M){var j=i==null?e:Ms(i,g);return j===e?M:j}function ZL(i,g){return i!=null&&Sw(i,g,xE)}function jd(i,g){return i!=null&&Sw(i,g,CE)}var JL=mw(function(i,g,M){g!=null&&typeof g.toString!="function"&&(g=hc.call(g)),i[g]=M},Ud(Gr)),eO=mw(function(i,g,M){g!=null&&typeof g.toString!="function"&&(g=hc.call(g)),on.call(i,g)?i[g].push(M):i[g]=[M]},gt),tO=Ft(Ja);function hr(i){return qr(i)?Oy(i):pd(i)}function Kr(i){return qr(i)?Oy(i,!0):RE(i)}function nO(i,g){var M={};return g=gt(g,3),eo(i,function(j,G,ee){wo(M,g(j,G,ee),j)}),M}function rO(i,g){var M={};return g=gt(g,3),eo(i,function(j,G,ee){wo(M,G,g(j,G,ee))}),M}var iO=da(function(i,g,M){Ac(i,g,M)}),ob=da(function(i,g,M,j){Ac(i,g,M,j)}),oO=xo(function(i,g){var M={};if(i==null)return M;var j=!1;g=m(g,function(ee){return ee=Go(ee,i),j||(j=ee.length>1),ee}),to(i,$d(i),M),j&&(M=ki(M,a|u|l,JE));for(var G=g.length;G--;)wd(M,g[G]);return M});function sO(i,g){return sb(i,Bc(gt(g)))}var aO=xo(function(i,g){return i==null?{}:OE(i,g)});function sb(i,g){if(i==null)return{};var M=m($d(i),function(j){return[j]});return g=gt(g),Qy(i,M,function(j,G){return g(j,G[0])})}function lO(i,g,M){g=Go(g,i);var j=-1,G=g.length;for(G||(G=1,i=e);++j<G;){var ee=i==null?e:i[no(g[j])];ee===e&&(j=G,ee=M),i=ko(ee)?ee.call(i):ee}return i}function cO(i,g,M){return i==null?i:tl(i,g,M)}function uO(i,g,M,j){return j=typeof j=="function"?j:e,i==null?i:tl(i,g,M,j)}var ab=ww(hr),lb=ww(Kr);function hO(i,g,M){var j=At(i),G=j||Xo(i)||fa(i);if(g=gt(g,4),M==null){var ee=i&&i.constructor;G?M=j?new ee:[]:$n(i)?M=ko(ee)?ha(gc(i)):{}:M={}}return(G?gr:eo)(i,function(le,de,ve){return g(M,le,de,ve)}),M}function dO(i,g){return i==null?!0:wd(i,g)}function pO(i,g,M){return i==null?i:nw(i,g,Cd(M))}function gO(i,g,M,j){return j=typeof j=="function"?j:e,i==null?i:nw(i,g,Cd(M),j)}function ma(i){return i==null?[]:xn(i,hr(i))}function fO(i){return i==null?[]:xn(i,Kr(i))}function mO(i,g,M){return M===e&&(M=g,g=e),M!==e&&(M=_i(M),M=M===M?M:0),g!==e&&(g=_i(g),g=g===g?g:0),Ts(_i(i),g,M)}function vO(i,g,M){return g=So(g),M===e?(M=g,g=0):M=So(M),i=_i(i),kE(i,g,M)}function yO(i,g,M){if(M&&typeof M!="boolean"&&Nr(i,g,M)&&(g=M=e),M===e&&(typeof g=="boolean"?(M=g,g=e):typeof i=="boolean"&&(M=i,i=e)),i===e&&g===e?(i=0,g=1):(i=So(i),g===e?(g=i,i=0):g=So(g)),i>g){var j=i;i=g,g=j}if(M||i%1||g%1){var G=Ry();return _r(i+G*(g-i+Be("1e-"+((G+"").length-1))),g)}return md(i,g)}var wO=pa(function(i,g,M){return g=g.toLowerCase(),i+(M?cb(g):g)});function cb(i){return Hd(nn(i).toLowerCase())}function ub(i){return i=nn(i),i&&i.replace(Rn,Cn).replace(go,"")}function bO(i,g,M){i=nn(i),g=oi(g);var j=i.length;M=M===e?j:Ts(It(M),0,j);var G=M;return M-=g.length,M>=0&&i.slice(M,G)==g}function xO(i){return i=nn(i),i&&za.test(i)?i.replace(so,V):i}function CO(i){return i=nn(i),i&&Ni.test(i)?i.replace(xr,"\\$&"):i}var kO=pa(function(i,g,M){return i+(M?"-":"")+g.toLowerCase()}),SO=pa(function(i,g,M){return i+(M?" ":"")+g.toLowerCase()}),AO=pw("toLowerCase");function _O(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;if(!g||j>=g)return i;var G=(g-j)/2;return Ic(yc(G),M)+i+Ic(vc(G),M)}function $O(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;return g&&j<g?i+Ic(g-j,M):i}function TO(i,g,M){i=nn(i),g=It(g);var j=g?Pt(i):0;return g&&j<g?Ic(g-j,M)+i:i}function MO(i,g,M){return M||g==null?g=0:g&&(g=+g),DM(nn(i).replace(An,""),g||0)}function EO(i,g,M){return(M?Nr(i,g,M):g===e)?g=1:g=It(g),vd(nn(i),g)}function IO(){var i=arguments,g=nn(i[0]);return i.length<3?g:g.replace(i[1],i[2])}var RO=pa(function(i,g,M){return i+(M?"_":"")+g.toLowerCase()});function LO(i,g,M){return M&&typeof M!="number"&&Nr(i,g,M)&&(g=M=e),M=M===e?te:M>>>0,M?(i=nn(i),i&&(typeof g=="string"||g!=null&&!Bd(g))&&(g=oi(g),!g&&oe(i))?Yo(St(i),0,M):i.split(g,M)):[]}var OO=pa(function(i,g,M){return i+(M?" ":"")+Hd(g)});function NO(i,g,M){return i=nn(i),M=M==null?0:Ts(It(M),0,i.length),g=oi(g),i.slice(M,M+g.length)==g}function DO(i,g,M){var j=J.templateSettings;M&&Nr(i,g,M)&&(g=e),i=nn(i),g=Hc({},g,j,bw);var G=Hc({},g.imports,j.imports,bw),ee=hr(G),le=xn(G,ee),de,ve,Ie=0,Re=g.interpolate||gi,De="__p += '",Ke=Lr((g.escape||gi).source+"|"+Re.source+"|"+(Re===fs?Fi:gi).source+"|"+(g.evaluate||gi).source+"|$","g"),nt="//# sourceURL="+(on.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ji+"]")+`
1471
1471
  `;i.replace(Ke,function(mt,Wt,Vt,ai,Dr,li){return Vt||(Vt=ai),De+=i.slice(Ie,li).replace(Sr,X),Wt&&(de=!0,De+=`' +
1472
1472
  __e(`+Wt+`) +
1473
1473
  '`),Dr&&(ve=!0,De+=`';
@@ -1484,18 +1484,18 @@ __p += '`),Vt&&(De+=`' +
1484
1484
  function print() { __p += __j.call(arguments, '') }
1485
1485
  `:`;
1486
1486
  `)+De+`return __p
1487
- }`;var Ot=db(function(){return Mt(ee,nt+"return "+De).apply(e,le)});if(Ot.source=De,Wd(Ot))throw Ot;return Ot}function FO(i){return nn(i).toLowerCase()}function PO(i){return nn(i).toUpperCase()}function WO(i,g,M){if(i=nn(i),i&&(M||g===e))return fn(i);if(!i||!(g=oi(g)))return i;var j=St(i),G=St(g),ee=Tt(j,G),le=Xn(j,G)+1;return Yo(j,ee,le).join("")}function BO(i,g,M){if(i=nn(i),i&&(M||g===e))return i.slice(0,Dt(i)+1);if(!i||!(g=oi(g)))return i;var j=St(i),G=Xn(j,St(g))+1;return Yo(j,0,G).join("")}function zO(i,g,M){if(i=nn(i),i&&(M||g===e))return i.replace(Sn,"");if(!i||!(g=oi(g)))return i;var j=St(i),G=Tt(j,St(g));return Yo(j,G).join("")}function jO(i,g){var M=E,j=H;if(_n(g)){var G="separator"in g?g.separator:G;M="length"in g?It(g.length):M,j="omission"in g?oi(g.omission):j}i=nn(i);var ee=i.length;if(oe(i)){var le=St(i);ee=le.length}if(M>=ee)return i;var de=M-Pt(j);if(de<1)return j;var ve=le?Yo(le,0,de).join(""):i.slice(0,de);if(G===e)return ve+j;if(le&&(de+=ve.length-de),Bd(G)){if(i.slice(de).search(G)){var Ie,Re=ve;for(G.global||(G=Lr(G.source,nn(Jr.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Re);)var De=Ie.index;ve=ve.slice(0,De===e?de:De)}}else if(i.indexOf(oi(G),de)!=de){var Ke=ve.lastIndexOf(G);Ke>-1&&(ve=ve.slice(0,Ke))}return ve+j}function HO(i){return i=nn(i),i&&Lo.test(i)?i.replace(pr,pt):i}var UO=pa(function(i,g,M){return i+(M?" ":"")+g.toUpperCase()}),Hd=pw("toUpperCase");function hb(i,g,M){return i=nn(i),g=M?e:g,g===e?ge(i)?Cn(i):Y(i):i.match(g)||[]}var db=Ft(function(i,g){try{return sr(i,e,g)}catch(M){return Wd(M)?M:new lt(M)}}),VO=xo(function(i,g){return gr(g,function(M){M=no(M),wo(i,M,Fd(i[M],i))}),i});function qO(i){var g=i==null?0:i.length,M=gt();return i=g?m(i,function(j){if(typeof j[1]!="function")throw new an(y);return[M(j[0]),j[1]]}):[],Ft(function(j){for(var G=-1;++G<g;){var ee=i[G];if(sr(ee[0],this,j))return sr(ee[1],this,j)}})}function KO(i){return yE(ki(i,a))}function Ud(i){return function(){return i}}function GO(i,g){return i==null||i!==i?g:i}var YO=fw(),XO=fw(!0);function Gr(i){return i}function Vd(i){return Vy(typeof i=="function"?i:ki(i,a))}function QO(i){return Ky(ki(i,a))}function ZO(i,g){return Gy(i,ki(g,a))}var JO=Ft(function(i,g){return function(M){return Ja(M,i,g)}}),e2=Ft(function(i,g){return function(M){return Ja(i,M,g)}});function qd(i,g,M){var j=ur(g),G=Sc(g,j);M==null&&!(_n(g)&&(G.length||!j.length))&&(M=g,g=i,i=this,G=Sc(g,ur(g)));var ee=!(_n(M)&&"chain"in M)||!!M.chain,le=ko(i);return gr(G,function(de){var ve=g[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Re=i(this.__wrapped__),De=Re.__actions__=Vr(this.__actions__);return De.push({func:ve,args:arguments,thisArg:i}),Re.__chain__=Ie,Re}return ve.apply(i,$([this.value()],arguments))})}),i}function t2(){return sn._===this&&(sn._=$M),this}function Kd(){}function n2(i){return i=It(i),Ft(function(g){return Yy(g,i)})}var r2=Sd(m),i2=Sd(fr),o2=Sd(W);function pb(i){return Id(i)?we(no(i)):NE(i)}function s2(i){return function(g){return i==null?e:Ms(i,g)}}var a2=vw(),l2=vw(!0);function Gd(){return[]}function Yd(){return!1}function c2(){return{}}function u2(){return""}function h2(){return!0}function d2(i,g){if(i=It(i),i<1||i>U)return[];var M=te,j=_r(i,te);g=gt(g),i-=te;for(var G=Qe(j,g);++M<i;)g(M);return G}function p2(i){return At(i)?m(i,no):si(i)?[i]:Vr(Lw(nn(i)))}function g2(i){var g=++AM;return nn(i)+g}var f2=Ec(function(i,g){return i+g},0),m2=Ad("ceil"),v2=Ec(function(i,g){return i/g},1),y2=Ad("floor");function w2(i){return i&&i.length?kc(i,Gr,ud):e}function b2(i,g){return i&&i.length?kc(i,gt(g,2),ud):e}function x2(i){return me(i,Gr)}function C2(i,g){return me(i,gt(g,2))}function k2(i){return i&&i.length?kc(i,Gr,gd):e}function S2(i,g){return i&&i.length?kc(i,gt(g,2),gd):e}var A2=Ec(function(i,g){return i*g},1),_2=Ad("round"),$2=Ec(function(i,g){return i-g},0);function T2(i){return i&&i.length?st(i,Gr):0}function M2(i,g){return i&&i.length?st(i,gt(g,2)):0}return J.after=QR,J.ary=Uw,J.assign=PL,J.assignIn=ib,J.assignInWith=Hc,J.assignWith=WL,J.at=BL,J.before=Vw,J.bind=Fd,J.bindAll=VO,J.bindKey=qw,J.castArray=cL,J.chain=zw,J.chunk=yI,J.compact=wI,J.concat=bI,J.cond=qO,J.conforms=KO,J.constant=Ud,J.countBy=TR,J.create=zL,J.curry=Kw,J.curryRight=Gw,J.debounce=Yw,J.defaults=jL,J.defaultsDeep=HL,J.defer=ZR,J.delay=JR,J.difference=xI,J.differenceBy=CI,J.differenceWith=kI,J.drop=SI,J.dropRight=AI,J.dropRightWhile=_I,J.dropWhile=$I,J.fill=TI,J.filter=ER,J.flatMap=LR,J.flatMapDeep=OR,J.flatMapDepth=NR,J.flatten=Fw,J.flattenDeep=MI,J.flattenDepth=EI,J.flip=eL,J.flow=YO,J.flowRight=XO,J.fromPairs=II,J.functions=XL,J.functionsIn=QL,J.groupBy=DR,J.initial=LI,J.intersection=OI,J.intersectionBy=NI,J.intersectionWith=DI,J.invert=JL,J.invertBy=eO,J.invokeMap=PR,J.iteratee=Vd,J.keyBy=WR,J.keys=ur,J.keysIn=Kr,J.map=Fc,J.mapKeys=nO,J.mapValues=rO,J.matches=QO,J.matchesProperty=ZO,J.memoize=Wc,J.merge=iO,J.mergeWith=ob,J.method=JO,J.methodOf=e2,J.mixin=qd,J.negate=Bc,J.nthArg=n2,J.omit=oO,J.omitBy=sO,J.once=tL,J.orderBy=BR,J.over=r2,J.overArgs=nL,J.overEvery=i2,J.overSome=o2,J.partial=Pd,J.partialRight=Xw,J.partition=zR,J.pick=aO,J.pickBy=sb,J.property=pb,J.propertyOf=s2,J.pull=BI,J.pullAll=Ww,J.pullAllBy=zI,J.pullAllWith=jI,J.pullAt=HI,J.range=a2,J.rangeRight=l2,J.rearg=rL,J.reject=UR,J.remove=UI,J.rest=iL,J.reverse=Nd,J.sampleSize=qR,J.set=cO,J.setWith=uO,J.shuffle=KR,J.slice=VI,J.sortBy=XR,J.sortedUniq=ZI,J.sortedUniqBy=JI,J.split=LO,J.spread=oL,J.tail=eR,J.take=tR,J.takeRight=nR,J.takeRightWhile=rR,J.takeWhile=iR,J.tap=wR,J.throttle=sL,J.thru=Dc,J.toArray=tb,J.toPairs=ab,J.toPairsIn=lb,J.toPath=p2,J.toPlainObject=rb,J.transform=hO,J.unary=aL,J.union=oR,J.unionBy=sR,J.unionWith=aR,J.uniq=lR,J.uniqBy=cR,J.uniqWith=uR,J.unset=dO,J.unzip=Dd,J.unzipWith=Bw,J.update=pO,J.updateWith=gO,J.values=ma,J.valuesIn=fO,J.without=hR,J.words=hb,J.wrap=lL,J.xor=dR,J.xorBy=pR,J.xorWith=gR,J.zip=fR,J.zipObject=mR,J.zipObjectDeep=vR,J.zipWith=yR,J.entries=ab,J.entriesIn=lb,J.extend=ib,J.extendWith=Hc,qd(J,J),J.add=f2,J.attempt=db,J.camelCase=wO,J.capitalize=cb,J.ceil=m2,J.clamp=mO,J.clone=uL,J.cloneDeep=dL,J.cloneDeepWith=pL,J.cloneWith=hL,J.conformsTo=gL,J.deburr=ub,J.defaultTo=GO,J.divide=v2,J.endsWith=bO,J.eq=zi,J.escape=xO,J.escapeRegExp=CO,J.every=MR,J.find=IR,J.findIndex=Nw,J.findKey=UL,J.findLast=RR,J.findLastIndex=Dw,J.findLastKey=VL,J.floor=y2,J.forEach=jw,J.forEachRight=Hw,J.forIn=qL,J.forInRight=KL,J.forOwn=GL,J.forOwnRight=YL,J.get=zd,J.gt=fL,J.gte=mL,J.has=ZL,J.hasIn=jd,J.head=Pw,J.identity=Gr,J.includes=FR,J.indexOf=RI,J.inRange=vO,J.invoke=tO,J.isArguments=Rs,J.isArray=At,J.isArrayBuffer=vL,J.isArrayLike=qr,J.isArrayLikeObject=Hn,J.isBoolean=yL,J.isBuffer=Xo,J.isDate=wL,J.isElement=bL,J.isEmpty=xL,J.isEqual=CL,J.isEqualWith=kL,J.isError=Wd,J.isFinite=SL,J.isFunction=ko,J.isInteger=Qw,J.isLength=zc,J.isMap=Zw,J.isMatch=AL,J.isMatchWith=_L,J.isNaN=$L,J.isNative=TL,J.isNil=EL,J.isNull=ML,J.isNumber=Jw,J.isObject=_n,J.isObjectLike=Dn,J.isPlainObject=ol,J.isRegExp=Bd,J.isSafeInteger=IL,J.isSet=eb,J.isString=jc,J.isSymbol=si,J.isTypedArray=fa,J.isUndefined=RL,J.isWeakMap=LL,J.isWeakSet=OL,J.join=FI,J.kebabCase=kO,J.last=Ai,J.lastIndexOf=PI,J.lowerCase=SO,J.lowerFirst=AO,J.lt=NL,J.lte=DL,J.max=w2,J.maxBy=b2,J.mean=x2,J.meanBy=C2,J.min=k2,J.minBy=S2,J.stubArray=Gd,J.stubFalse=Yd,J.stubObject=c2,J.stubString=u2,J.stubTrue=h2,J.multiply=A2,J.nth=WI,J.noConflict=t2,J.noop=Kd,J.now=Pc,J.pad=_O,J.padEnd=$O,J.padStart=TO,J.parseInt=MO,J.random=yO,J.reduce=jR,J.reduceRight=HR,J.repeat=EO,J.replace=IO,J.result=lO,J.round=_2,J.runInContext=pe,J.sample=VR,J.size=GR,J.snakeCase=RO,J.some=YR,J.sortedIndex=qI,J.sortedIndexBy=KI,J.sortedIndexOf=GI,J.sortedLastIndex=YI,J.sortedLastIndexBy=XI,J.sortedLastIndexOf=QI,J.startCase=OO,J.startsWith=NO,J.subtract=$2,J.sum=T2,J.sumBy=M2,J.template=DO,J.times=d2,J.toFinite=So,J.toInteger=It,J.toLength=nb,J.toLower=FO,J.toNumber=_i,J.toSafeInteger=FL,J.toString=nn,J.toUpper=PO,J.trim=WO,J.trimEnd=BO,J.trimStart=zO,J.truncate=jO,J.unescape=HO,J.uniqueId=g2,J.upperCase=UO,J.upperFirst=Hd,J.each=jw,J.eachRight=Hw,J.first=Pw,qd(J,function(){var i={};return eo(J,function(g,M){on.call(J.prototype,M)||(i[M]=g)}),i}(),{chain:!1}),J.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),gr(["drop","take"],function(i,g){Ht.prototype[i]=function(M){M=M===e?1:ir(It(M),0);var j=this.__filtered__&&!g?new Ht(this):this.clone();return j.__filtered__?j.__takeCount__=_r(M,j.__takeCount__):j.__views__.push({size:_r(M,te),type:i+(j.__dir__<0?"Right":"")}),j},Ht.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),gr(["filter","map","takeWhile"],function(i,g){var M=g+1,j=M==_||M==N;Ht.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:gt(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),gr(["head","last"],function(i,g){var M="take"+(g?"Right":"");Ht.prototype[i]=function(){return this[M](1).value()[0]}}),gr(["initial","tail"],function(i,g){var M="drop"+(g?"":"Right");Ht.prototype[i]=function(){return this.__filtered__?new Ht(this):this[M](1)}}),Ht.prototype.compact=function(){return this.filter(Gr)},Ht.prototype.find=function(i){return this.filter(i).head()},Ht.prototype.findLast=function(i){return this.reverse().find(i)},Ht.prototype.invokeMap=Ft(function(i,g){return typeof i=="function"?new Ht(this):this.map(function(M){return Ja(M,i,g)})}),Ht.prototype.reject=function(i){return this.filter(Bc(gt(i)))},Ht.prototype.slice=function(i,g){i=It(i);var M=this;return M.__filtered__&&(i>0||g<0)?new Ht(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),g!==e&&(g=It(g),M=g<0?M.dropRight(-g):M.take(g-i)),M)},Ht.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ht.prototype.toArray=function(){return this.take(te)},eo(Ht.prototype,function(i,g){var M=/^(?:filter|find|map|reject)|While$/.test(g),j=/^(?:head|last)$/.test(g),G=J[j?"take"+(g=="last"?"Right":""):g],ee=j||/^find/.test(g);G&&(J.prototype[g]=function(){var le=this.__wrapped__,de=j?[1]:arguments,ve=le instanceof Ht,Ie=de[0],Re=ve||At(le),De=function(Wt){var Vt=G.apply(J,$([Wt],de));return j&&Ke?Vt[0]:Vt};Re&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Re=!1);var Ke=this.__chain__,nt=!!this.__actions__.length,ft=ee&&!Ke,Ot=ve&&!nt;if(!ee&&Re){le=Ot?le:new Ht(this);var mt=i.apply(le,de);return mt.__actions__.push({func:Dc,args:[De],thisArg:e}),new Ci(mt,Ke)}return ft&&Ot?i.apply(this,de):(mt=this.thru(De),ft?j?mt.value()[0]:mt.value():mt)})}),gr(["pop","push","shift","sort","splice","unshift"],function(i){var g=cr[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return g.apply(At(ee)?ee:[],G)}return this[M](function(le){return g.apply(At(le)?le:[],G)})}}),eo(Ht.prototype,function(i,g){var M=J[g];if(M){var j=M.name+"";on.call(ua,j)||(ua[j]=[]),ua[j].push({name:g,func:M})}}),ua[Mc(e,w).name]=[{name:"wrapper",func:e}],Ht.prototype.clone=HM,Ht.prototype.reverse=UM,Ht.prototype.value=VM,J.prototype.at=bR,J.prototype.chain=xR,J.prototype.commit=CR,J.prototype.next=kR,J.prototype.plant=AR,J.prototype.reverse=_R,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=$R,J.prototype.first=J.prototype.head,qa&&(J.prototype[qa]=SR),J},Ut=Qn();Yn?((Yn.exports=Ut)._=Ut,vn._=Ut):sn._=Ut}).call(FC)}(Tl,Tl.exports)),Tl.exports}var WC=PC();Tr("O",ll(WC)).debounce(function(){this.rebuildDisplayText()},300);var Jg={exports:{}},ef;function BC(){return ef||(ef=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Jg)),Jg.exports}BC();const zC=!0,Jn="u-",jC="uplot",HC=Jn+"hz",UC=Jn+"vt",VC=Jn+"title",qC=Jn+"wrap",KC=Jn+"under",GC=Jn+"over",YC=Jn+"axis",ss=Jn+"off",XC=Jn+"select",QC=Jn+"cursor-x",ZC=Jn+"cursor-y",JC=Jn+"cursor-pt",ek=Jn+"legend",tk=Jn+"live",nk=Jn+"inline",rk=Jn+"series",ik=Jn+"marker",tf=Jn+"label",ok=Jn+"value",$a="width",Ta="height",Ma="top",nf="bottom",js="left",xu="right",Cu="#000",rf=Cu+"0",ku="mousemove",of="mousedown",Su="mouseup",sf="mouseenter",af="mouseleave",lf="dblclick",sk="resize",ak="scroll",cf="change",Ml="dppxchange",Au="--",Hs=typeof window<"u",_u=Hs?document:null,Us=Hs?window:null,lk=Hs?navigator:null;let Xt,El;function $u(){let n=devicePixelRatio;Xt!=n&&(Xt=n,El&&Eu(cf,El,$u),El=matchMedia(`(min-resolution: ${Xt-.001}dppx) and (max-resolution: ${Xt+.001}dppx)`),as(cf,El,$u),Us.dispatchEvent(new CustomEvent(Ml)))}function Yr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Tu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function mn(n,t,e){n.style[t]=e+"px"}function Mi(n,t,e,r){let v=_u.createElement(n);return t!=null&&Yr(v,t),e!=null&&e.insertBefore(v,r),v}function di(n,t){return Mi("div",n,t)}const uf=new WeakMap;function Ui(n,t,e,r,v){let f="translate("+t+"px,"+e+"px)",y=uf.get(n);f!=y&&(n.style.transform=f,uf.set(n,f),t<0||e<0||t>r||e>v?Yr(n,ss):Tu(n,ss))}const hf=new WeakMap;function df(n,t,e){let r=t+e,v=hf.get(n);r!=v&&(hf.set(n,r),n.style.background=t,n.style.borderColor=e)}const pf=new WeakMap;function gf(n,t,e,r){let v=t+""+e,f=pf.get(n);v!=f&&(pf.set(n,v),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const Mu={passive:!0},ck={...Mu,capture:!0};function as(n,t,e,r){t.addEventListener(n,e,r?ck:Mu)}function Eu(n,t,e,r){t.removeEventListener(n,e,Mu)}Hs&&$u();function Ei(n,t,e,r){let v;e=e||0,r=r||t.length-1;let f=r<=2147483647;for(;r-e>1;)v=f?e+r>>1:Qr((e+r)/2),t[v]<n?e=v:r=v;return n-t[e]<=t[r]-n?e:r}function ff(n){return(t,e,r)=>{let v=-1,f=-1;for(let y=e;y<=r;y++)if(n(t[y])){v=y;break}for(let y=r;y>=e;y--)if(n(t[y])){f=y;break}return[v,f]}}const mf=n=>n!=null,vf=n=>n!=null&&n>0,Il=ff(mf),uk=ff(vf);function hk(n,t,e,r=0,v=!1){let f=v?uk:Il,y=v?vf:mf;[t,e]=f(n,t,e);let x=n[t],h=n[t];if(t>-1)if(r==1)x=n[t],h=n[e];else if(r==-1)x=n[e],h=n[t];else for(let p=t;p<=e;p++){let s=n[p];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??hr,h??-1/0]}function Rl(n,t,e,r){let v=bf(n),f=bf(t);n==t&&(v==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?ro:xf,x=v==1?Qr:pi,h=f==1?pi:Qr,p=x(y(er(n))),s=h(y(er(t))),a=Vs(e,p),u=Vs(e,s);return e==10&&(p<0&&(a=cn(a,-p)),s<0&&(u=cn(u,-s))),r||e==2?(n=a*v,t=u*f):(n=Tf(n,a),t=Nl(t,u)),[n,t]}function Iu(n,t,e,r){let v=Rl(n,t,e,r);return n==0&&(v[0]=0),t==0&&(v[1]=0),v}const Ru=.1,yf={mode:3,pad:Ru},Ea={pad:0,soft:null,mode:0},dk={min:Ea,max:Ea};function Ll(n,t,e,r){return Dl(e)?wf(n,t,e):(Ea.pad=e,Ea.soft=r?0:null,Ea.mode=r?3:0,wf(n,t,dk))}function Gt(n,t){return n??t}function pk(n,t,e){for(t=Gt(t,0),e=Gt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function wf(n,t,e){let r=e.min,v=e.max,f=Gt(r.pad,0),y=Gt(v.pad,0),x=Gt(r.hard,-1/0),h=Gt(v.hard,hr),p=Gt(r.soft,hr),s=Gt(v.soft,-1/0),a=Gt(r.mode,0),u=Gt(v.mode,0),l=t-n,o=ro(l),c=Mr(er(n),er(t)),d=ro(c),w=er(d-o);(l<1e-24||w>10)&&(l=0,(n==0||t==0)&&(l=1e-24,a==2&&p!=hr&&(f=0),u==2&&s!=-1/0&&(y=0)));let b=l||c||1e3,I=ro(b),T=Vs(10,Qr(I)),S=b*(l==0?n==0?.1:1:f),C=cn(Tf(n-S,T/10),24),R=n>=p&&(a==1||a==3&&C<=p||a==2&&C>=p)?p:hr,L=Mr(x,C<R&&n>=R?R:Ii(R,C)),F=b*(l==0?t==0?.1:1:y),E=cn(Nl(t+F,T/10),24),H=t<=s&&(u==1||u==3&&E>=s||u==2&&E<=s)?s:-1/0,P=Ii(h,E>H&&t<=H?H:Mr(H,E));return L==P&&L==0&&(P=100),[L,P]}const gk=new Intl.NumberFormat(Hs?lk.language:"en-US"),Lu=n=>gk.format(n),Xr=Math,Ol=Xr.PI,er=Xr.abs,Qr=Xr.floor,tr=Xr.round,pi=Xr.ceil,Ii=Xr.min,Mr=Xr.max,Vs=Xr.pow,bf=Xr.sign,ro=Xr.log10,xf=Xr.log2,fk=(n,t=1)=>Xr.sinh(n)*t,Ou=(n,t=1)=>Xr.asinh(n/t),hr=1/0;function Cf(n){return(ro((n^n>>31)-(n>>31))|0)+1}function Nu(n,t,e){return Ii(Mr(n,t),e)}function kf(n){return typeof n=="function"}function Bt(n){return kf(n)?n:()=>n}const mk=()=>{},Sf=n=>n,Af=(n,t)=>t,vk=n=>null,_f=n=>!0,$f=(n,t)=>n==t,yk=/\.\d*?(?=9{6,}|0{6,})/gm,ls=n=>{if(Ef(n)||Io.has(n))return n;const t=`${n}`,e=t.match(yk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[v,f]=t.split("e");return+`${ls(v)}e${f}`}return cn(n,r)};function cs(n,t){return ls(cn(ls(n/t))*t)}function Nl(n,t){return ls(pi(ls(n/t))*t)}function Tf(n,t){return ls(Qr(ls(n/t))*t)}function cn(n,t=0){if(Ef(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return tr(r)/e}const Io=new Map;function Mf(n){return((""+n).split(".")[1]||"").length}function Ia(n,t,e,r){let v=[],f=r.map(Mf);for(let y=t;y<e;y++){let x=er(y),h=cn(Vs(n,y),x);for(let p=0;p<r.length;p++){let s=n==10?+`${r[p]}e${y}`:r[p]*h,a=(y>=0?0:x)+(y>=f[p]?0:f[p]),u=n==10?s:cn(s,a);v.push(u),Io.set(u,a)}}return v}const Ra={},Du=[],qs=[null,null],Ro=Array.isArray,Ef=Number.isInteger,wk=n=>n===void 0;function If(n){return typeof n=="string"}function Dl(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function bk(n){return n!=null&&typeof n=="object"}const xk=Object.getPrototypeOf(Uint8Array),Rf="__proto__";function Ks(n,t=Dl){let e;if(Ro(n)){let r=n.find(v=>v!=null);if(Ro(r)||t(r)){e=Array(n.length);for(let v=0;v<n.length;v++)e[v]=Ks(n[v],t)}else e=n.slice()}else if(n instanceof xk)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Rf&&(e[r]=Ks(n[r],t))}else e=n;return e}function qn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let v in r)v!=Rf&&(Dl(n[v])?qn(n[v],Ks(r[v])):n[v]=Ks(r[v]))}return n}const Ck=0,kk=1,Sk=2;function Ak(n,t,e){for(let r=0,v,f=-1;r<t.length;r++){let y=t[r];if(y>f){for(v=y-1;v>=0&&n[v]==null;)n[v--]=null;for(v=y+1;v<e&&n[v]==null;)n[f=v++]=null}}}function _k(n,t){if(Mk(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Ek(y[0])||(y=Tk(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let p=0;p<h;p++)e.add(x[p])}let r=[Array.from(e).sort((y,x)=>y-x)],v=r[0].length,f=new Map;for(let y=0;y<v;y++)f.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let p=1;p<x.length;p++){let s=x[p],a=Array(v).fill(void 0),u=t?t[y][p]:kk,l=[];for(let o=0;o<s.length;o++){let c=s[o],d=f.get(h[o]);c===null?u!=Ck&&(a[d]=c,u==Sk&&l.push(d)):a[d]=c}Ak(a,l,v),r.push(a)}}return r}const $k=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Tk(n){let t=n[0],e=t.length,r=Array(e);for(let f=0;f<r.length;f++)r[f]=f;r.sort((f,y)=>t[f]-t[y]);let v=[];for(let f=0;f<n.length;f++){let y=n[f],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];v.push(x)}return v}function Mk(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let v=n[r][0];if(v.length!=e)return!1;if(v!=t){for(let f=0;f<e;f++)if(v[f]!=t[f])return!1}}return!0}function Ek(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,v=e-1;for(;r<=v&&n[r]==null;)r++;for(;v>=r&&n[v]==null;)v--;if(v<=r)return!0;const f=Mr(1,Qr((v-r+1)/t));for(let y=n[r],x=r+f;x<=v;x+=f){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const Lf=["January","February","March","April","May","June","July","August","September","October","November","December"],Of=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Nf(n){return n.slice(0,3)}const Ik=Of.map(Nf),Rk=Lf.map(Nf),Lk={MMMM:Lf,MMM:Rk,WWWW:Of,WWW:Ik};function La(n){return(n<10?"0":"")+n}function Ok(n){return(n<10?"00":n<100?"0":"")+n}const Nk={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>La(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>La(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>La(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>La(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>La(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Ok(n.getMilliseconds())};function Fu(n,t){t=t||Lk;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,v;for(;v=r.exec(n);)e.push(v[0][0]=="{"?Nk[v[1]]:v[0]);return f=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](f,t);return y}}const Dk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Fk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Dk?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Df=n=>n%1==0,Fl=[1,2,2.5,5],Pk=Ia(10,-32,0,Fl),Ff=Ia(10,0,32,Fl),Wk=Ff.filter(Df),us=Pk.concat(Ff),Pu=`
1488
- `,Pf="{YYYY}",Wf=Pu+Pf,Bf="{M}/{D}",Oa=Pu+Bf,Pl=Oa+"/{YY}",zf="{aa}",Bk="{h}:{mm}",Gs=Bk+zf,jf=Pu+Gs,Hf=":{ss}",tn=null;function Uf(n){let t=n*1e3,e=t*60,r=e*60,v=r*24,f=v*30,y=v*365,x=(n==1?Ia(10,0,3,Fl).filter(Df):Ia(10,-3,0,Fl)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,v,v*2,v*3,v*4,v*5,v*6,v*7,v*8,v*9,v*10,v*15,f,f*2,f*3,f*4,f*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Pf,tn,tn,tn,tn,tn,tn,1],[v*28,"{MMM}",Wf,tn,tn,tn,tn,tn,1],[v,Bf,Wf,tn,tn,tn,tn,tn,1],[r,"{h}"+zf,Pl,tn,Oa,tn,tn,tn,1],[e,Gs,Pl,tn,Oa,tn,tn,tn,1],[t,Hf,Pl+" "+Gs,tn,Oa+" "+Gs,tn,jf,tn,1],[n,Hf+".{fff}",Pl+" "+Gs,tn,Oa+" "+Gs,tn,jf,tn,1]];function p(s){return(a,u,l,o,c,d)=>{let w=[],b=c>=y,I=c>=f&&c<y,T=s(l),S=cn(T*n,3),C=Wu(T.getFullYear(),b?0:T.getMonth(),I||b?1:T.getDate()),R=cn(C*n,3);if(I||b){let L=I?c/f:0,F=b?c/y:0,E=S==R?S:cn(Wu(C.getFullYear()+F,C.getMonth()+L,1)*n,3),H=new Date(tr(E/n)),P=H.getFullYear(),O=H.getMonth();for(let _=0;E<=o;_++){let A=Wu(P+F*_,O+L*_,1),N=A-s(cn(A*n,3));E=cn((+A+N)*n,3),E<=o&&w.push(E)}}else{let L=c>=v?v:c,F=Qr(l)-Qr(S),E=R+F+Nl(S-R,L);w.push(E);let H=s(E),P=H.getHours()+H.getMinutes()/e+H.getSeconds()/r,O=c/r,_=a.axes[u]._space,A=d/_;for(;E=cn(E+c,n==1?0:3),!(E>o);)if(O>1){let N=Qr(cn(P+O,6))%24,B=s(E).getHours()-N;B>1&&(B=-1),E-=B*r,P=(P+O)%24;let U=w[w.length-1];cn((E-U)/c,3)*A>=.7&&w.push(E)}else w.push(E)}return w}}return[x,h,p]}const[zk,jk,Hk]=Uf(1),[Uk,Vk,qk]=Uf(.001);Ia(2,-53,53,[1]);function Vf(n,t){return n.map(e=>e.map((r,v)=>v==0||v==8||r==null?r:t(v==1||e[8]==0?r:e[1]+r)))}function qf(n,t){return(e,r,v,f,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,p,s,a,u,l;return r.map(o=>{let c=n(o),d=c.getFullYear(),w=c.getMonth(),b=c.getDate(),I=c.getHours(),T=c.getMinutes(),S=c.getSeconds(),C=d!=h&&x[2]||w!=p&&x[3]||b!=s&&x[4]||I!=a&&x[5]||T!=u&&x[6]||S!=l&&x[7]||x[1];return h=d,p=w,s=b,a=I,u=T,l=S,C(c)})}}function Kk(n,t){let e=Fu(t);return(r,v,f,y,x)=>v.map(h=>e(n(h)))}function Wu(n,t,e){return new Date(n,t,e)}function Kf(n,t){return t(n)}const Gk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Gf(n,t){return(e,r,v,f)=>f==null?Au:t(n(r))}function Yk(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function Xk(n,t){return n.series[t].fill(n,t)}const Qk={show:!0,live:!0,isolate:!1,mount:mk,markers:{show:!0,width:2,stroke:Yk,fill:Xk,dash:"solid"},idx:null,idxs:null,values:[]};function Zk(n,t){let e=n.cursor.points,r=di(),v=e.size(n,t);mn(r,$a,v),mn(r,Ta,v);let f=v/-2;mn(r,"marginLeft",f),mn(r,"marginTop",f);let y=e.width(n,t,v);return y&&mn(r,"borderWidth",y),r}function Jk(n,t){let e=n.series[t].points;return e._fill||e._stroke}function eS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function tS(n,t){return n.series[t].points.size}const Bu=[0,0];function nS(n,t,e){return Bu[0]=t,Bu[1]=e,Bu}function Wl(n,t,e,r=!0){return v=>{v.button==0&&(!r||v.target==t)&&e(v)}}function zu(n,t,e,r=!0){return v=>{(!r||v.target==t)&&e(v)}}const rS={show:!0,x:!0,y:!0,lock:!1,move:nS,points:{one:!1,show:Zk,size:tS,width:0,stroke:eS,fill:Jk},bind:{mousedown:Wl,mouseup:Wl,click:Wl,dblclick:Wl,mousemove:zu,mouseleave:zu,mouseenter:zu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,v)=>r-v,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Yf={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},ju=qn({},Yf,{filter:Af}),Xf=qn({},ju,{size:10}),Qf=qn({},Yf,{show:!1}),Hu='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"',Zf="bold "+Hu,Jf=1.5,em={show:!0,scale:"x",stroke:Cu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:2,grid:ju,ticks:Xf,border:Qf,font:Hu,lineGap:Jf,rotate:0},iS="Value",oS="Time",tm={show:!0,scale:"x",auto:!1,sorted:1,min:hr,max:-1/0,idxs:[]};function sS(n,t,e,r,v){return t.map(f=>f==null?"":Lu(f))}function aS(n,t,e,r,v,f,y){let x=[],h=Io.get(v)||0;e=y?e:cn(Nl(e,v),h);for(let p=e;p<=r;p=cn(p+v,h))x.push(Object.is(p,-0)?0:p);return x}function Uu(n,t,e,r,v,f,y){const x=[],h=n.scales[n.axes[t].scale].log,p=h==10?ro:xf,s=Qr(p(e));v=Vs(h,s),h==10&&(v=us[Ei(v,us)]);let a=e,u=v*h;h==10&&(u=us[Ei(u,us)]);do x.push(a),a=a+v,h==10&&!Io.has(a)&&(a=cn(a,Io.get(v))),a>=u&&(v=a,u=v*h,h==10&&(u=us[Ei(u,us)]));while(a<=r);return x}function lS(n,t,e,r,v,f,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Uu(n,t,Mr(x,e),r,v):[x],p=r>=0&&e<=0?[0]:[];return(e<-x?Uu(n,t,Mr(x,-r),-e,v):[x]).reverse().map(s=>-s).concat(p,h)}const nm=/./,cS=/[12357]/,uS=/[125]/,rm=/1/,Vu=(n,t,e,r)=>n.map((v,f)=>t==4&&v==0||f%r==0&&e.test(v.toExponential()[v<0?1:0])?v:null);function hS(n,t,e,r,v){let f=n.axes[e],y=f.scale,x=n.scales[y],h=n.valToPos,p=f._space,s=h(10,y),a=h(9,y)-s>=p?nm:h(7,y)-s>=p?cS:h(5,y)-s>=p?uS:rm;if(a==rm){let u=er(h(1,y)-s);if(u<p)return Vu(t.slice().reverse(),x.distr,a,pi(p/u)).reverse()}return Vu(t,x.distr,a,1)}function dS(n,t,e,r,v){let f=n.axes[e],y=f.scale,x=f._space,h=n.valToPos,p=er(h(1,y)-h(2,y));return p<x?Vu(t.slice().reverse(),3,nm,pi(x/p)).reverse():t}function pS(n,t,e,r){return r==null?Au:t==null?"":Lu(t)}const im={show:!0,scale:"y",stroke:Cu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:3,grid:ju,ticks:Xf,border:Qf,font:Hu,lineGap:Jf,rotate:0};function gS(n,t){let e=3+(n||1)*2;return cn(e*t,3)}function fS(n,t){let{scale:e,idxs:r}=n.series[0],v=n._data[0],f=n.valToPos(v[r[0]],e,!0),y=n.valToPos(v[r[1]],e,!0),x=er(y-f),h=n.series[t],p=x/(h.points.space*Xt);return r[1]-r[0]<=p}const om={scale:null,auto:!0,sorted:0,min:hr,max:-1/0},sm=(n,t,e,r,v)=>v,am={show:!0,auto:!0,sorted:0,gaps:sm,alpha:1,facets:[qn({},om,{scale:"x"}),qn({},om,{scale:"y"})]},lm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:sm,alpha:1,points:{show:fS,filter:null},values:null,min:hr,max:-1/0,idxs:[],path:null,clip:null};function mS(n,t,e,r,v){return e/10}const cm={time:zC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},vS=qn({},cm,{time:!1,ori:1}),um={};function hm(n,t){let e=um[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(v=>v!=r)},pub(r,v,f,y,x,h,p){for(let s=0;s<e.plots.length;s++)e.plots[s]!=v&&e.plots[s].pub(r,v,f,y,x,h,p)}},n!=null&&(um[n]=e)),e}const Ys=1,qu=2;function hs(n,t,e){const r=n.mode,v=n.series[t],f=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=f[0],p=r==2?f[1]:f[t],s=r==2?y[v.facets[0].scale]:y[n.series[0].scale],a=r==2?y[v.facets[1].scale]:y[v.scale],u=x.left,l=x.top,o=x.width,c=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(v,h,p,s,a,d,w,u,l,o,c,zl,Xs,Hl,gm,mm):e(v,h,p,s,a,w,d,l,u,c,o,jl,Qs,Yu,fm,vm)}function Ku(n,t){let e=0,r=0,v=Gt(n.bands,Du);for(let f=0;f<v.length;f++){let y=v[f];y.series[0]==t?e=y.dir:y.series[1]==t&&(y.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function yS(n,t,e,r,v){let f=n.mode,y=n.series[t],x=f==2?y.facets[1].scale:y.scale,h=n.scales[x];return v==-1?h.min:v==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function io(n,t,e,r,v,f){return hs(n,t,(y,x,h,p,s,a,u,l,o,c,d)=>{let w=y.pxRound;const b=p.dir*(p.ori==0?1:-1),I=p.ori==0?Xs:Qs;let T,S;b==1?(T=e,S=r):(T=r,S=e);let C=w(a(x[T],p,c,l)),R=w(u(h[T],s,d,o)),L=w(a(x[S],p,c,l)),F=w(u(f==1?s.max:s.min,s,d,o)),E=new Path2D(v);return I(E,L,F),I(E,C,F),I(E,C,R),E})}function Bl(n,t,e,r,v,f){let y=null;if(n.length>0){y=new Path2D;const x=t==0?Hl:Yu;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let l=u[0]-h;l>0&&x(y,h,r,l,r+f),h=u[1]}}let p=e+v-h,s=10;p>0&&x(y,h,r-s/2,p,r+f+s)}return y}function wS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Gu(n,t,e,r,v,f,y){let x=[],h=n.length;for(let p=v==1?e:r;p>=e&&p<=r;p+=v)if(t[p]===null){let s=p,a=p;if(v==1)for(;++p<=r&&t[p]===null;)a=p;else for(;--p>=e&&t[p]===null;)a=p;let u=f(n[s]),l=a==s?u:f(n[a]),o=s-v;u=y<=0&&o>=0&&o<h?f(n[o]):u;let c=a+v;l=y>=0&&c>=0&&c<h?f(n[c]):l,l>=u&&x.push([u,l])}return x}function dm(n){return n==0?Sf:n==1?tr:t=>cs(t,n)}function pm(n){let t=n==0?zl:jl,e=n==0?(v,f,y,x,h,p)=>{v.arcTo(f,y,x,h,p)}:(v,f,y,x,h,p)=>{v.arcTo(y,f,h,x,p)},r=n==0?(v,f,y,x,h)=>{v.rect(f,y,x,h)}:(v,f,y,x,h)=>{v.rect(y,f,h,x)};return(v,f,y,x,h,p=0,s=0)=>{p==0&&s==0?r(v,f,y,x,h):(p=Ii(p,x/2,h/2),s=Ii(s,x/2,h/2),t(v,f+p,y),e(v,f+x,y,f+x,y+h,p),e(v,f+x,y+h,f,y+h,s),e(v,f,y+h,f,y,s),e(v,f,y,f+x,y,p),v.closePath())}}const zl=(n,t,e)=>{n.moveTo(t,e)},jl=(n,t,e)=>{n.moveTo(e,t)},Xs=(n,t,e)=>{n.lineTo(t,e)},Qs=(n,t,e)=>{n.lineTo(e,t)},Hl=pm(0),Yu=pm(1),gm=(n,t,e,r,v,f)=>{n.arc(t,e,r,v,f)},fm=(n,t,e,r,v,f)=>{n.arc(e,t,r,v,f)},mm=(n,t,e,r,v,f,y)=>{n.bezierCurveTo(t,e,r,v,f,y)},vm=(n,t,e,r,v,f,y)=>{n.bezierCurveTo(e,t,v,r,y,f)};function ym(n){return(t,e,r,v,f)=>hs(t,e,(y,x,h,p,s,a,u,l,o,c,d)=>{let{pxRound:w,points:b}=y,I,T;p.ori==0?(I=zl,T=gm):(I=jl,T=fm);const S=cn(b.width*Xt,3);let C=(b.size-b.width)/2*Xt,R=cn(C*2,3),L=new Path2D,F=new Path2D,{left:E,top:H,width:P,height:O}=t.bbox;Hl(F,E-R,H-R,P+R*2,O+R*2);const _=A=>{if(h[A]!=null){let N=w(a(x[A],p,c,l)),B=w(u(h[A],s,d,o));I(L,N+C,B),T(L,N,B,C,0,Ol*2)}};if(f)f.forEach(_);else for(let A=r;A<=v;A++)_(A);return{stroke:S>0?L:null,fill:L,clip:F,flags:Ys|qu}})}function wm(n){return(t,e,r,v,f,y)=>{r!=v&&(f!=r&&y!=r&&n(t,e,r),f!=v&&y!=v&&n(t,e,v),n(t,e,y))}}const bS=wm(Xs),xS=wm(Qs);function bm(n){const t=Gt(n==null?void 0:n.alignGaps,0);return(e,r,v,f)=>hs(e,r,(y,x,h,p,s,a,u,l,o,c,d)=>{[v,f]=Il(h,v,f);let w=y.pxRound,b=P=>w(a(P,p,c,l)),I=P=>w(u(P,s,d,o)),T,S;p.ori==0?(T=Xs,S=bS):(T=Qs,S=xS);const C=p.dir*(p.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},L=R.stroke;let F=!1;if(f-v>=c*4){let P=he=>e.posToVal(he,p.key,!0),O=null,_=null,A,N,B,U=b(x[C==1?v:f]),K=b(x[v]),Z=b(x[f]),te=P(C==1?K+1:Z-1);for(let he=C==1?v:f;he>=v&&he<=f;he+=C){let ne=x[he],ae=(C==1?ne<te:ne>te)?U:b(ne),ue=h[he];ae==U?ue!=null?(N=ue,O==null?(T(L,ae,I(N)),A=O=_=N):N<O?O=N:N>_&&(_=N)):ue===null&&(F=!0):(O!=null&&S(L,U,I(O),I(_),I(A),I(N)),ue!=null?(N=ue,T(L,ae,I(N)),O=_=A=N):(O=_=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=_&&B!=U&&S(L,U,I(O),I(_),I(A),I(N))}else for(let P=C==1?v:f;P>=v&&P<=f;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(L,b(x[P]),I(O))}let[E,H]=Ku(e,r);if(y.fill!=null||E!=0){let P=R.fill=new Path2D(L),O=y.fillTo(e,r,y.min,y.max,E),_=I(O),A=b(x[v]),N=b(x[f]);C==-1&&([N,A]=[A,N]),T(P,N,_),T(P,A,_)}if(!y.spanGaps){let P=[];F&&P.push(...Gu(x,h,v,f,C,b,t)),R.gaps=P=y.gaps(e,r,v,f,P),R.clip=Bl(P,p.ori,l,o,c,d)}return H!=0&&(R.band=H==2?[io(e,r,v,f,L,-1),io(e,r,v,f,L,1)]:io(e,r,v,f,L,H)),R})}function CS(n){const t=Gt(n.align,1),e=Gt(n.ascDesc,!1),r=Gt(n.alignGaps,0),v=Gt(n.extend,!1);return(f,y,x,h)=>hs(f,y,(p,s,a,u,l,o,c,d,w,b,I)=>{[x,h]=Il(a,x,h);let T=p.pxRound,{left:S,width:C}=f.bbox,R=Z=>T(o(Z,u,b,d)),L=Z=>T(c(Z,l,I,w)),F=u.ori==0?Xs:Qs;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},H=E.stroke,P=u.dir*(u.ori==0?1:-1);let O=L(a[P==1?x:h]),_=R(s[P==1?x:h]),A=_,N=_;v&&t==-1&&(N=S,F(H,N,O)),F(H,_,O);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=R(s[Z]),ne=L(te);t==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;v&&t==1&&(B=S+C,F(H,B,O));let[U,K]=Ku(f,y);if(p.fill!=null||U!=0){let Z=E.fill=new Path2D(H),te=p.fillTo(f,y,p.min,p.max,U),he=L(te);F(Z,B,he),F(Z,N,he)}if(!p.spanGaps){let Z=[];Z.push(...Gu(s,a,x,h,P,R,r));let te=p.width*Xt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),E.gaps=Z=p.gaps(f,y,x,h,Z),E.clip=Bl(Z,u.ori,d,w,b,I)}return K!=0&&(E.band=K==2?[io(f,y,x,h,H,-1),io(f,y,x,h,H,1)]:io(f,y,x,h,H,K)),E})}function xm(n,t,e,r,v,f,y=hr){if(n.length>1){let x=null;for(let h=0,p=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=er(n[h]-n[x]);s<p&&(p=s,y=er(e(n[h],r,v,f)-e(n[x],r,v,f)))}x=h}}return y}function kS(n){n=n||Ra;const t=Gt(n.size,[.6,hr,1]),e=n.align||0,r=n.gap||0;let v=n.radius;v=v==null?[0,0]:typeof v=="number"?[v,0]:v;const f=Bt(v),y=1-t[0],x=Gt(t[1],hr),h=Gt(t[2],1),p=Gt(n.disp,Ra),s=Gt(n.each,l=>{}),{fill:a,stroke:u}=p;return(l,o,c,d)=>hs(l,o,(w,b,I,T,S,C,R,L,F,E,H)=>{let P=w.pxRound,O=e,_=r*Xt,A=x*Xt,N=h*Xt,B,U;T.ori==0?[B,U]=f(l,o):[U,B]=f(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Hl:Yu,te=T.ori==0?s:(He,ke,ze,Ye,dt,Ct,xt)=>{s(He,ke,ze,dt,Ye,xt,Ct)},he=Gt(l.bands,Du).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(R(ae,S,H,F)),ce,fe,$e,Te=E,Ee=P(w.width*Xt),Ge=!1,qe=null,ut=null,tt=null,ht=null;a!=null&&(Ee==0||u!=null)&&(Ge=!0,qe=a.values(l,o,c,d),ut=new Map,new Set(qe).forEach(He=>{He!=null&&ut.set(He,new Path2D)}),Ee>0&&(tt=u.values(l,o,c,d),ht=new Map,new Set(tt).forEach(He=>{He!=null&&ht.set(He,new Path2D)})));let{x0:Zt,size:hn}=p;if(Zt!=null&&hn!=null){O=1,b=Zt.values(l,o,c,d),Zt.unit==2&&(b=b.map(ke=>l.posToVal(L+ke*E,T.key,!0)));let He=hn.values(l,o,c,d);hn.unit==2?fe=He[0]*E:fe=C(He[0],T,E,L)-C(0,T,E,L),Te=xm(b,I,C,T,E,L,Te),$e=Te-fe+_}else Te=xm(b,I,C,T,E,L,Te),$e=Te*y+_,fe=Te-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(P=Sf);let qt=$e>0,dr=Te-$e-(qt?Ee:0);fe=P(Nu(dr,N,A)),ce=(O==0?fe/2:O==K?0:fe)-O*K*((O==0?_/2:0)+(qt?Ee/2:0));const dn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},Mn=Ge?null:new Path2D;let En=null;if(he!=null)En=l.data[he.series[1]];else{let{y0:He,y1:ke}=p;He!=null&&ke!=null&&(I=ke.values(l,o,c,d),En=He.values(l,o,c,d))}let Gn=B*fe,vt=U*fe;for(let He=K==1?c:d;He>=c&&He<=d;He+=K){let ke=I[He];if(ke==null)continue;if(En!=null){let ct=En[He]??0;if(ke-ct==0)continue;ue=R(ct,S,H,F)}let ze=T.distr!=2||p!=null?b[He]:He,Ye=C(ze,T,E,L),dt=R(Gt(ke,ae),S,H,F),Ct=P(Ye-ce),xt=P(Mr(dt,ue)),Rt=P(Ii(dt,ue)),Et=xt-Rt;if(ke!=null){let ct=ke<0?vt:Gn,yt=ke<0?Gn:vt;Ge?(Ee>0&&tt[He]!=null&&Z(ht.get(tt[He]),Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt),qe[He]!=null&&Z(ut.get(qe[He]),Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt)):Z(Mn,Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt),te(l,o,He,Ct-Ee/2,Rt,fe+Ee,Et)}}return Ee>0?dn.stroke=Ge?ht:Mn:Ge||(dn._fill=w.width==0?w._fill:w._stroke??w._fill,dn.width=0),dn.fill=Ge?ut:Mn,dn})}function SS(n,t){const e=Gt(t==null?void 0:t.alignGaps,0);return(r,v,f,y)=>hs(r,v,(x,h,p,s,a,u,l,o,c,d,w)=>{[f,y]=Il(p,f,y);let b=x.pxRound,I=B=>b(u(B,s,d,o)),T=B=>b(l(B,a,w,c)),S,C,R;s.ori==0?(S=zl,R=Xs,C=mm):(S=jl,R=Qs,C=vm);const L=s.dir*(s.ori==0?1:-1);let F=I(h[L==1?f:y]),E=F,H=[],P=[];for(let B=L==1?f:y;B>=f&&B<=y;B+=L)if(p[B]!=null){let U=h[B],K=I(U);H.push(E=K),P.push(T(p[B]))}const O={stroke:n(H,P,S,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Ys},_=O.stroke;let[A,N]=Ku(r,v);if(x.fill!=null||A!=0){let B=O.fill=new Path2D(_),U=x.fillTo(r,v,x.min,x.max,A),K=T(U);R(B,E,K),R(B,F,K)}if(!x.spanGaps){let B=[];B.push(...Gu(h,p,f,y,L,I,e)),O.gaps=B=x.gaps(r,v,f,y,B),O.clip=Bl(B,s.ori,o,c,d,w)}return N!=0&&(O.band=N==2?[io(r,v,f,y,_,-1),io(r,v,f,y,_,1)]:io(r,v,f,y,_,N)),O})}function AS(n){return SS(_S,n)}function _S(n,t,e,r,v,f){const y=n.length;if(y<2)return null;const x=new Path2D;if(e(x,n[0],t[0]),y==2)r(x,n[1],t[1]);else{let h=Array(y),p=Array(y-1),s=Array(y-1),a=Array(y-1);for(let u=0;u<y-1;u++)s[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],p[u]=s[u]/a[u];h[0]=p[0];for(let u=1;u<y-1;u++)p[u]===0||p[u-1]===0||p[u-1]>0!=p[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/p[u-1]+(a[u]+2*a[u-1])/p[u]),isFinite(h[u])||(h[u]=0));h[y-1]=p[y-2];for(let u=0;u<y-1;u++)v(x,n[u]+a[u]/3,t[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-h[u+1]*a[u]/3,n[u+1],t[u+1])}return x}const Xu=new Set;function Cm(){for(let n of Xu)n.syncRect(!0)}Hs&&(as(sk,Us,Cm),as(ak,Us,Cm,!0),as(Ml,Us,()=>{yr.pxRatio=Xt}));const $S=bm(),TS=ym();function km(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((v,f)=>Qu(v,f,t,e))}function MS(n,t){return n.map((e,r)=>r==0?{}:qn({},t,e))}function Qu(n,t,e,r){return qn({},t==0?e:r,n)}function Sm(n,t,e){return t==null?qs:[t,e]}const ES=Sm;function IS(n,t,e){return t==null?qs:Ll(t,e,Ru,!0)}function Am(n,t,e,r){return t==null?qs:Rl(t,e,n.scales[r].log,!1)}const RS=Am;function _m(n,t,e,r){return t==null?qs:Iu(t,e,n.scales[r].log,!1)}const LS=_m;function OS(n,t,e,r,v){let f=Mr(Cf(n),Cf(t)),y=t-n,x=Ei(v/r*y,e);do{let h=e[x],p=r*h/y;if(p>=v&&f+(h<5?Io.get(h):0)<=17)return[h,p]}while(++x<e.length);return[0,0]}function $m(n){let t,e;return n=n.replace(/(\d+)px/,(r,v)=>(t=tr((e=+v)*Xt))+"px"),[n,t,e]}function NS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=cn(t[2]*Xt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function yr(n,t,e){const r={mode:Gt(n.mode,1)},v=r.mode;function f(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function y(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function x(V,X,ie,oe){return X.ori==0?f(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=f,r.valToPosV=y;let h=!1;r.status=0;const p=r.root=di(jC);if(n.id!=null&&(p.id=n.id),Yr(p,n.class),n.title){let V=di(VC,p);V.textContent=n.title}const s=Mi("canvas"),a=r.ctx=s.getContext("2d"),u=di(qC,p);as("click",u,V=>{V.target===o&&(en!=vi||jt!=Ji)&&Rn.click(r,V)},!0);const l=r.under=di(KC,u);u.appendChild(s);const o=r.over=di(GC,u);n=Ks(n);const c=+Gt(n.pxAlign,1),d=dm(c);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=v==1?km(n.series||[],tm,lm,!1):MS(n.series||[null],am),I=r.axes=km(n.axes||[],em,im,!0),T=r.scales={},S=r.bands=n.bands||[];S.forEach(V=>{V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1)});const C=v==2?b[1].facets[0].scale:b[0].scale,R={axes:uo,series:ia},L=(n.drawOrder||["axes","series"]).map(V=>R[V]);function F(V){const X=V.distr==3?ie=>ro(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Ou(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:be}=V,Me=be-ge;return(oe-ge)/Me}}function E(V){let X=T[V];if(X==null){let ie=(n.scales||Ra)[V]||Ra;if(ie.from!=null){E(ie.from);let oe=qn({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=qn({},V==C?cm:vS,ie),X.key=V;let oe=X.time,ge=X.range,be=Ro(ge);if((V!=C||v==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?yf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?yf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Dl(ge))){let Me=ge;ge=(Fe,We,Ve)=>We==null?qs:Ll(We,Ve,Me)}X.range=Bt(ge||(oe?ES:V==C?X.distr==3?RS:X.distr==4?LS:Sm:X.distr==3?Am:X.distr==4?_m:IS)),X.auto=Bt(be?!1:X.auto),X.clamp=Bt(X.clamp||mS),X._min=X._max=null,X.valToPct=F(X)}}}E("x"),E("y"),v==1&&b.forEach(V=>{E(V.scale)}),I.forEach(V=>{E(V.scale)});for(let V in n.scales)E(V);const H=T[C],P=H.distr;let O,_;H.ori==0?(Yr(p,HC),O=f,_=y):(Yr(p,UC),O=y,_=f);const A={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(tr(V/w))),B=n.fmtDate||Fu,U=w==1?Hk(N):qk(N),K=qf(N,Vf(w==1?jk:Vk,B)),Z=Gf(N,Kf(Gk,B)),te=[],he=r.legend=qn({},Qk,n.legend),ne=r.cursor=qn({},rS,{drag:{y:v==2}},n.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Bt(ce.width),ce.dash=Bt(ce.dash),ce.stroke=Bt(ce.stroke),ce.fill=Bt(ce.fill);let fe,$e,Te,Ee=[],Ge=[],qe,ut=!1,tt={};if(he.live){const V=b[1]?b[1].values:null;ut=V!=null,qe=ut?V(r,1,0):{_:0};for(let X in qe)tt[X]=Au}if(ae)if(fe=Mi("table",ek,p),Te=Mi("tbody",null,fe),he.mount(r,fe),ut){$e=Mi("thead",null,fe,Te);let V=Mi("tr",null,$e);Mi("th",null,V);for(var ht in qe)Mi("th",tf,V).textContent=ht}else Yr(fe,nk),he.live&&Yr(fe,tk);const Zt={show:!0},hn={show:!1};function qt(V,X){if(X==0&&(ut||!he.live||v==2))return qs;let ie=[],oe=Mi("tr",rk,Te,Te.childNodes[X]);Yr(oe,V.class),V.show||Yr(oe,ss);let ge=Mi("th",null,oe);if(ce.show){let Fe=di(ik,ge);if(X>0){let We=ce.width(r,X);We&&(Fe.style.border=We+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Fe.style.background=ce.fill(r,X)}}let be=di(tf,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ce.show||(be.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),dn("click",ge,Fe=>{if(ne._lock)return;Oi(Fe);let We=b.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ve=b.some((Xe,Ze)=>Ze>0&&Ze!=We&&Xe.show);b.forEach((Xe,Ze)=>{Ze>0&&Rr(Ze,Ve?Ze==We?Zt:hn:Zt,!0,at.setSeries)})}else Rr(We,{show:!V.show},!0,at.setSeries)},!1),Ni&&dn(sf,ge,Fe=>{ne._lock||(Oi(Fe),Rr(b.indexOf(V),bi,!0,at.setSeries))},!1));for(var Me in qe){let Fe=Mi("td",ok,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const dr=new Map;function dn(V,X,ie,oe=!0){const ge=dr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(as(V,X,ge[V]=be),dr.set(X,ge))}function Mn(V,X,ie){const oe=dr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Eu(ge,X,oe[ge]),delete oe[ge]);V==null&&dr.delete(X)}let En=0,Gn=0,vt=0,He=0,ke=0,ze=0,Ye=ke,dt=ze,Ct=vt,xt=He,Rt=0,Et=0,ct=0,yt=0;r.bbox={};let wn=!1,br=!1,zr=!1,Li=!1,oo=!1,pr=!1;function so(V,X,ie){(ie||V!=r.width||X!=r.height)&&Lo(V,X),Wi(!1),zr=!0,br=!0,Zi()}function Lo(V,X){r.width=En=vt=V,r.height=Gn=He=X,ke=ze=0,fs(),ta();let ie=r.bbox;Rt=ie.left=cs(ke*Xt,.5),Et=ie.top=cs(ze*Xt,.5),ct=ie.width=cs(vt*Xt,.5),yt=ie.height=cs(He*Xt,.5)}const za=3;function Zr(){let V=!1,X=0;for(;!V;){X++;let ie=oa(X),oe=Va(X);V=X==za||ie&&oe,V||(Lo(r.width,r.height),br=!0)}}function ja({width:V,height:X}){so(V,X)}r.setSize=ja;function fs(){let V=!1,X=!1,ie=!1,oe=!1;I.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:Fe}=ge,We=Me%2,Ve=ge.label!=null?ge.labelSize:0,Xe=Fe+Ve;Xe>0&&(We?(vt-=Xe,Me==3?(ke+=Xe,oe=!0):ie=!0):(He-=Xe,Me==0?(ze+=Xe,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,vt-=kr[1]+kr[3],ke+=kr[3],He-=kr[2]+kr[0],ze+=kr[0]}function ta(){let V=ke+vt,X=ze+He,ie=ke,oe=ze;function ge(be,Me){switch(be){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}I.forEach((be,Me)=>{if(be.show&&be._show){let Fe=be.side;be._pos=ge(Fe,be._size),be.label!=null&&(be._lpos=ge(Fe,be.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Bt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,Fe)=>{if(be==0)return Me;let We=Me,Ve=ie(ge,be,Me,Fe)??hr,Xe=Ve>=0&&Ve<hr,Ze=H.ori==0?vt:He,bt=ne.left,Pt=t[0],St=t[be];if(X.has(St[Me])){We=null;let Dt=null,pt=null,rt;if(oe==0||oe==-1)for(rt=Me;Dt==null&&rt-- >0;)X.has(St[rt])||(Dt=rt);if(oe==0||oe==1)for(rt=Me;pt==null&&rt++<St.length;)X.has(St[rt])||(pt=rt);if(Dt!=null||pt!=null)if(Xe){let un=Dt==null?-1/0:O(Pt[Dt],H,Ze,0),Cn=pt==null?1/0:O(Pt[pt],H,Ze,0),Qn=bt-un,Ut=Cn-bt;Qn<=Ut?Qn<=Ve&&(We=Dt):Ut<=Ve&&(We=pt)}else We=pt==null?Dt:Dt==null?pt:Me-Dt<=pt-Me?Dt:pt}else Xe&&er(bt-O(Pt[Me],H,Ze,0))>Ve&&(We=null);return We}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let Bn=ne.points;Bn.show=Bt(Bn.show),Bn.size=Bt(Bn.size),Bn.stroke=Bt(Bn.stroke),Bn.width=Bt(Bn.width),Bn.fill=Bt(Bn.fill);const xr=r.focus=qn({},n.focus||{alpha:.3},ne.focus),Ni=xr.prox>=0,Sn=Ni&&Bn.one;let Cr=[],Gi=[],Di=[];function ms(V,X){let ie=Bn.show(r,X);if(ie instanceof HTMLElement)return Yr(ie,JC),Yr(ie,V.class),Ui(ie,-10,-10,vt,He),o.insertBefore(ie,Cr[X]),ie}function na(V,X){if(v==1||X>0){let ie=v==1&&T[V.scale].time,oe=V.value;V.value=ie?If(oe)?Gf(N,Kf(oe,B)):oe||Z:oe||pS,V.label=V.label||(ie?oS:iS)}if(Sn||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||$S||vk,V.fillTo=Bt(V.fillTo||yS),V.pxAlign=+Gt(V.pxAlign,c),V.pxRound=dm(V.pxAlign),V.stroke=Bt(V.stroke||null),V.fill=Bt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=gS(Mr(1,V.width),1),oe=V.points=qn({},{size:ie,width:Mr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:TS,_stroke:null,_fill:null},V.points);oe.show=Bt(oe.show),oe.filter=Bt(oe.filter),oe.fill=Bt(oe.fill),oe.stroke=Bt(oe.stroke),oe.paths=Bt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=qt(V,X);Ee.splice(X,0,ie[0]),Ge.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;Sn?X==0&&(ie=ms(V,X)):X>0&&(ie=ms(V,X)),Cr.splice(X,0,ie),Gi.splice(X,0,0),Di.splice(X,0,0)}et("addSeries",X)}function Ha(V,X){X=X??b.length,V=v==1?Qu(V,X,tm,lm):Qu(V,X,{},am),b.splice(X,0,V),na(b[X],X)}r.addSeries=Ha;function Ua(V){if(b.splice(V,1),ae){he.values.splice(V,1),Ge.splice(V,1);let X=Ee.splice(V,1)[0];Mn(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Cr.splice(V,1)[0].remove(),Gi.splice(V,1),Di.splice(V,1)),et("delSeries",V)}r.delSeries=Ua;const Fi=[!1,!1,!1,!1];function Jr(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=T[V.scale]);let ge=oe.time;V.size=Bt(V.size),V.space=Bt(V.space),V.rotate=Bt(V.rotate),Ro(V.incrs)&&V.incrs.forEach(Me=>{!Io.has(Me)&&Io.set(Me,Mf(Me))}),V.incrs=Bt(V.incrs||(oe.distr==2?Wk:ge?w==1?zk:Uk:us)),V.splits=Bt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Uu:oe.distr==4?lS:aS)),V.stroke=Bt(V.stroke),V.grid.stroke=Bt(V.grid.stroke),V.ticks.stroke=Bt(V.ticks.stroke),V.border.stroke=Bt(V.border.stroke);let be=V.values;V.values=Ro(be)&&!Ro(be[0])?Bt(be):ge?Ro(be)?qf(N,Vf(be,B)):If(be)?Kk(N,be):be||K:be||sS,V.filter=Bt(V.filter||(oe.distr>=3&&oe.log==10?hS:oe.distr==3&&oe.log==2?dS:Af)),V.font=$m(V.font),V.labelFont=$m(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Fi[X]=!0,V._el=di(YC,u))}}function zt(V,X,ie,oe){let[ge,be,Me,Fe]=ie,We=X%2,Ve=0;return We==0&&(Fe||be)&&(Ve=X==0&&!ge||X==2&&!Me?tr(em.size/3):0),We==1&&(ge||Me)&&(Ve=X==1&&!be||X==3&&!Fe?tr(im.size/2):0),Ve}const ra=r.padding=(n.padding||[zt,zt,zt,zt]).map(V=>Bt(Gt(V,zt))),kr=r._padding=ra.map((V,X)=>V(r,X,Fi,0));let zn,pn=null,In=null;const gi=v==1?b[0].idxs:null;let Sr=null,fi=!1;function Oo(V,X){if(t=V??[],r.data=r._data=t,v==2){zn=0;for(let ie=1;ie<b.length;ie++)zn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Sr=t[0],zn=Sr.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(zn);for(let ge=0;ge<zn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),et("setData"),P==2&&(zr=!0),X!==!1){let ie=H;ie.auto(r,fi)?vs():Yn(C,ie.min,ie.max),Li=Li||ne.left>=0,pr=!0,Zi()}}r.setData=Oo;function vs(){fi=!0;let V,X;v==1&&(zn>0?(pn=gi[0]=0,In=gi[1]=zn-1,V=t[0][pn],X=t[0][In],P==2?(V=pn,X=In):V==X&&(P==3?[V,X]=Rl(V,V,H.log,!1):P==4?[V,X]=Iu(V,V,H.log,!1):H.time?X=V+tr(86400/w):[V,X]=Ll(V,X,Ru,!0))):(pn=gi[0]=V=null,In=gi[1]=X=null)),Yn(C,V,X)}let Yi,jr,ao,No,Hr,Do,ys,ws,Fo,nr;function bs(V,X,ie,oe,ge,be){V??(V=rf),ie??(ie=Du),oe??(oe="butt"),ge??(ge=rf),be??(be="round"),V!=Yi&&(a.strokeStyle=Yi=V),ge!=jr&&(a.fillStyle=jr=ge),X!=ao&&(a.lineWidth=ao=X),be!=Hr&&(a.lineJoin=Hr=be),oe!=Do&&(a.lineCap=Do=oe),ie!=No&&a.setLineDash(No=ie)}function lo(V,X,ie,oe){X!=jr&&(a.fillStyle=jr=X),V!=ys&&(a.font=ys=V),ie!=ws&&(a.textAlign=ws=ie),oe!=Fo&&(a.textBaseline=Fo=oe)}function Po(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,fi)&&(X==null||X.min==null)){let be=Gt(pn,0),Me=Gt(In,oe.length-1),Fe=ie.min==null?hk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ii(V.min,ie.min=Fe[0]),V.max=Mr(V.max,ie.max=Fe[1])}}const Wo={min:null,max:null};function Xi(){for(let oe in T){let ge=T[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,fi))&&(A[oe]=Wo)}for(let oe in T){let ge=T[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=Wo)}A[C]!=null&&Wi(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let be=V[oe]=Ks(T[oe],bk);if(ge.min!=null)qn(be,ge);else if(oe!=C||v==2)if(zn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=hr,be.max=-1/0}}if(zn>0){b.forEach((oe,ge)=>{if(v==1){let be=oe.scale,Me=A[be];if(Me==null)return;let Fe=V[be];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,be);Fe.min=We[0],Fe.max=We[1],pn=Ei(Fe.min,t[0]),In=Ei(Fe.max,t[0]),In-pn>1&&(t[0][pn]<Fe.min&&pn++,t[0][In]>Fe.max&&In--),oe.min=Sr[pn],oe.max=Sr[In]}else oe.show&&oe.auto&&Po(Fe,Me,oe,t[ge],oe.sorted);oe.idxs[0]=pn,oe.idxs[1]=In}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,Fe=be.scale,We=Me.scale,[Ve,Xe]=t[ge],Ze=V[Fe],bt=V[We];Ze!=null&&Po(Ze,A[Fe],be,Ve,be.sorted),bt!=null&&Po(bt,A[We],Me,Xe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=A[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==hr?null:ge.min,ge.max==-1/0?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let be=V[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],be=T[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?ro(be.min):Me==4?Ou(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?ro(be.max):Me==4?Ou(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{v==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)zr=!0,et("setScale",oe);ue&&ne.left>=0&&(Li=pr=!0)}for(let oe in A)A[oe]=null}function xs(V){let X=Nu(pn-1,0,zn-1),ie=Nu(In+1,0,zn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<zn-1;)ie++;return[X,ie]}function ia(){if(zn>0){let V=b.some(X=>X._focus)&&nr!=xr.alpha;V&&(a.globalAlpha=nr=xr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(Bo(ie,!1),Bo(ie,!0),X._paths==null)){let oe=nr;nr!=X.alpha&&(a.globalAlpha=nr=X.alpha);let ge=v==2?[0,t[ie][0].length-1]:xs(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),nr!=oe&&(a.globalAlpha=nr=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=nr;nr!=X.alpha&&(a.globalAlpha=nr=X.alpha),X._paths!=null&&zo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,pn,In,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,pn,In,Me),zo(ie,!0))}nr!=oe&&(a.globalAlpha=nr=oe),et("drawSeries",ie)}}),V&&(a.globalAlpha=nr=1)}}function Bo(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function zo(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:Ve=ie.width}=ie._paths;Ve=cn(Ve*Xt,3);let Xe=null,Ze=Ve%2/2;X&&We==null&&(We=Ve>0?"#fff":Fe);let bt=ie.pxAlign==1&&Ze>0;if(bt&&a.translate(Ze,Ze),!X){let Pt=Rt-Ve/2,St=Et-Ve/2,Dt=ct+Ve,pt=yt+Ve;Xe=new Path2D,Xe.rect(Pt,St,Dt,pt)}X?co(Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,be):Cs(V,Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,Xe,be),bt&&a.translate(-Ze,-Ze)}function Cs(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe){let Ze=!1;We!=0&&S.forEach((bt,Pt)=>{if(bt.series[0]==V){let St=b[bt.series[1]],Dt=t[bt.series[1]],pt=(St._paths||Ra).band;Ro(pt)&&(pt=bt.dir==1?pt[0]:pt[1]);let rt,un=null;St.show&&pt&&pk(Dt,pn,In)?(un=bt.fill(r,Pt)||be,rt=St._paths.clip):pt=null,co(X,ie,oe,ge,un,Me,Fe,We,Ve,Xe,rt,pt),Ze=!0}}),Ze||co(X,ie,oe,ge,be,Me,Fe,We,Ve,Xe)}const jo=Ys|qu;function co(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe,Ze){bs(V,X,ie,oe,ge),(We||Ve||Ze)&&(a.save(),We&&a.clip(We),Ve&&a.clip(Ve)),Ze?(Fe&jo)==jo?(a.clip(Ze),Xe&&a.clip(Xe),rr(ge,Me),mi(V,be,X)):Fe&qu?(rr(ge,Me),a.clip(Ze),mi(V,be,X)):Fe&Ys&&(a.save(),a.clip(Ze),Xe&&a.clip(Xe),rr(ge,Me),a.restore(),mi(V,be,X)):(rr(ge,Me),mi(V,be,X)),(We||Ve||Ze)&&a.restore()}function mi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Yi=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function rr(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=jr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function Qi(V,X,ie,oe){let ge=I[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Fe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=OS(X,ie,Fe,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,Fe,We,Ve){let Xe=Me%2/2;c==1&&a.translate(Xe,Xe),bs(Fe,Me,We,Ve,Fe),a.beginPath();let Ze,bt,Pt,St,Dt=ge+(oe==0||oe==3?-be:be);ie==0?(bt=ge,St=Dt):(Ze=ge,Pt=Dt);for(let pt=0;pt<V.length;pt++)X[pt]!=null&&(ie==0?Ze=Pt=V[pt]:bt=St=V[pt],a.moveTo(Ze,bt),a.lineTo(Pt,St));a.stroke(),c==1&&a.translate(-Xe,-Xe)}function oa(V){let X=!0;return I.forEach((ie,oe)=>{if(!ie.show)return;let ge=T[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Wi(!1));return}else ie._show||(X=!1,ie._show=!0,Wi(!1));let be=ie.side,Me=be%2,{min:Fe,max:We}=ge,[Ve,Xe]=Qi(oe,Fe,We,Me==0?vt:He);if(Xe==0)return;let Ze=ge.distr==2,bt=ie._splits=ie.splits(r,oe,Fe,We,Ve,Xe,Ze),Pt=ge.distr==2?bt.map(rt=>Sr[rt]):bt,St=ge.distr==2?Sr[bt[1]]-Sr[bt[0]]:Ve,Dt=ie._values=ie.values(r,ie.filter(r,Pt,oe,Xe,St),oe,Xe,St);ie._rotate=be==2?ie.rotate(r,Dt,oe,Xe):0;let pt=ie._size;ie._size=pi(ie.size(r,Dt,oe,V)),pt!=null&&ie._size!=pt&&(X=!1)}),X}function Va(V){let X=!0;return ra.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=kr[oe]&&(X=!1),kr[oe]=ge}),X}function uo(){for(let V=0;V<I.length;V++){let X=I[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ve]=X._found;if(X.label!=null){let an=X.labelGap*Fe,cr=tr((X._lpos+an)*Xt);lo(X.labelFont[0],Me,"center",ie==2?Ma:nf),a.save(),oe==1?(ge=be=0,a.translate(cr,tr(Et+yt/2)),a.rotate((ie==3?-Ol:Ol)/2)):(ge=tr(Rt+ct/2),be=cr);let mo=kf(X.label)?X.label(r,V,We,Ve):X.label;a.fillText(mo,ge,be),a.restore()}if(Ve==0)continue;let Xe=T[X.scale],Ze=oe==0?ct:yt,bt=oe==0?Rt:Et,Pt=X._splits,St=Xe.distr==2?Pt.map(an=>Sr[an]):Pt,Dt=Xe.distr==2?Sr[Pt[1]]-Sr[Pt[0]]:We,pt=X.ticks,rt=X.border,un=pt.show?pt.size:0,Cn=tr(un*Xt),Qn=tr((X.alignTo==2?X._size-un-X.gap:X.gap)*Xt),Ut=X._rotate*-Ol/180,pe=d(X._pos*Xt),Se=(Cn+Qn)*Fe,xe=pe+Se;be=oe==0?xe:0,ge=oe==1?xe:0;let je=X.font[0],lt=X.align==1?js:X.align==2?xu:Ut>0?js:Ut<0?xu:oe==0?"center":ie==3?xu:js,Mt=Ut||oe==1?"middle":ie==2?Ma:nf;lo(je,Me,lt,Mt);let Kt=X.font[1]*X.lineGap,Lt=Pt.map(an=>d(x(an,Xe,Ze,bt))),Lr=X._values;for(let an=0;an<Lr.length;an++){let cr=Lr[an];if(cr!=null){oe==0?ge=Lt[an]:be=Lt[an],cr=""+cr;let mo=cr.indexOf(`
1489
- `)==-1?[cr]:cr.split(/\n/gm);for(let Nn=0;Nn<mo.length;Nn++){let Ss=mo[Nn];Ut?(a.save(),a.translate(ge,be+Nn*Kt),a.rotate(Ut),a.fillText(Ss,0,0),a.restore()):a.fillText(Ss,ge,be+Nn*Kt)}}}pt.show&&Pi(Lt,pt.filter(r,St,V,Ve,Dt),oe,ie,pe,Cn,cn(pt.width*Xt,3),pt.stroke(r,V),pt.dash,pt.cap);let xi=X.grid;xi.show&&Pi(Lt,xi.filter(r,St,V,Ve,Dt),oe,oe==0?2:1,oe==0?Et:Rt,oe==0?yt:ct,cn(xi.width*Xt,3),xi.stroke(r,V),xi.dash,xi.cap),rt.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Et:Rt,oe==1?yt:ct,cn(rt.width*Xt,3),rt.stroke(r,V),rt.dash,rt.cap)}et("drawAxes")}function Wi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(v==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let ho=!1,Ho=!1,po=[];function sa(){Ho=!1;for(let V=0;V<po.length;V++)et(...po[V]);po.length=0}function Zi(){ho||($k(aa),ho=!0)}function Pe(V,X=!1){ho=!0,Ho=X,V(r),aa(),X&&po.length>0&&queueMicrotask(sa)}r.batch=Pe;function aa(){if(wn&&(Xi(),wn=!1),zr&&(Zr(),zr=!1),br){if(mn(l,js,ke),mn(l,Ma,ze),mn(l,$a,vt),mn(l,Ta,He),mn(o,js,ke),mn(o,Ma,ze),mn(o,$a,vt),mn(o,Ta,He),mn(u,$a,En),mn(u,Ta,Gn),s.width=tr(En*Xt),s.height=tr(Gn*Xt),I.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let be=ge===3||ge===0?ie:0,Me=ge%2==1;mn(V,Me?"left":"top",oe-be),mn(V,Me?"width":"height",ie),mn(V,Me?"top":"left",Me?ze:ke),mn(V,Me?"height":"width",Me?He:vt),Tu(V,ss)}else Yr(V,ss)}),Yi=jr=ao=Hr=Do=ys=ws=Fo=No=null,nr=1,W(!0),ke!=Ye||ze!=dt||vt!=Ct||He!=xt){Wi(!1);let V=vt/Ct,X=He/xt;if(ue&&!Li&&ne.left>=0){ne.left*=V,ne.top*=X,ei&&Ui(ei,tr(ne.left),0,vt,He),jn&&Ui(jn,0,tr(ne.top),vt,He);for(let ie=0;ie<Cr.length;ie++){let oe=Cr[ie];oe!=null&&(Gi[ie]*=V,Di[ie]*=X,Ui(oe,pi(Gi[ie]),pi(Di[ie]),vt,He))}}if(wt.show&&!oo&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let ie in Y)mn(Ir,ie,wt[ie])}Ye=ke,dt=ze,Ct=vt,xt=He}et("setSize"),br=!1}En>0&&Gn>0&&(a.clearRect(0,0,s.width,s.height),et("drawClear"),L.forEach(V=>V()),et("draw")),wt.show&&oo&&(sn(wt),oo=!1),ue&&Li&&(k(null,!0,!1),Li=!1),he.show&&he.live&&pr&&(m(),pr=!1),h||(h=!0,r.status=1,et("ready")),fi=!1,ho=!1}r.redraw=(V,X)=>{zr=X||!1,V!==!1?Yn(C,H.min,H.max):Zi()};function Ne(V,X){let ie=T[V];if(ie.from==null){if(zn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(zn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&zn>0&&(X.min=Ei(X.min,t[0]),X.max=Ei(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,wn=!0,Zi()}}r.setScale=Ne;let An,go,ei,jn,la,fo,vi,Ji,Jt,Yt,en,jt,yi=!1;const Rn=ne.drag;let Be=Rn.x,gn=Rn.y;ue&&(ne.x&&(An=di(QC,o)),ne.y&&(go=di(ZC,o)),H.ori==0?(ei=An,jn=go):(ei=go,jn=An),en=ne.left,jt=ne.top);const wt=r.select=qn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Ir=wt.show?di(XC,wt.over?o:l):null;function sn(V,X){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&mn(Ir,ie,V[ie]);X!==!1&&et("setSelect")}}r.setSelect=sn;function vn(V){if(b[V].show)ae&&Tu(Ee[V],ss);else if(ae&&Yr(Ee[V],ss),ue){let X=Sn?Cr[0]:Cr[V];X!=null&&Ui(X,-10,-10,vt,He)}}function Yn(V,X,ie){Ne(V,{min:X,max:ie})}function Rr(V,X,ie,oe){X.focus!=null&&sr(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,vn(be),v==2?(Yn(ge.facets[0].scale,null,null),Yn(ge.facets[1].scale,null,null)):Yn(ge.scale,null,null),Zi())}),ie!==!1&&et("setSeries",V,X),oe&&Tt("setSeries",r,V,X)}r.setSeries=Rr;function wi(V,X){qn(S[V],X)}function Ln(V,X){V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1),X=X??S.length,S.splice(X,0,V)}function Ur(V){V==null?S.length=0:S.splice(V,1)}r.addBand=Ln,r.setBand=wi,r.delBand=Ur;function Uo(V,X){b[V].alpha=X,ue&&Cr[V]!=null&&(Cr[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let On,ti,ni;const bi={focus:!0};function sr(V){if(V!=ni){let X=V==null,ie=xr.alpha!=1;b.forEach((oe,ge)=>{if(v==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Uo(ge,be?1:xr.alpha)}}),ni=V,ie&&Zi()}}ae&&Ni&&dn(af,fe,V=>{ne._lock||(Oi(V),ni!=null&&Rr(null,bi,!0,at.setSeries))});function ar(V,X,ie){let oe=T[X];ie&&(V=V/Xt-(oe.ori==1?ze:ke));let ge=vt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,Fe=V/ge,We=be+(Me-be)*Fe,Ve=oe.distr;return Ve==3?Vs(10,We):Ve==4?fk(We,oe.asinh):Ve==100?oe.bwd(We):We}function gr(V,X){let ie=ar(V,C,X);return Ei(ie,t[0],pn,In)}r.valToIdx=V=>Ei(V,t[0]),r.posToIdx=gr,r.posToVal=ar,r.valToPos=(V,X,ie)=>T[X].ori==0?f(V,T[X],ie?ct:vt,ie?Rt:0):y(V,T[X],ie?yt:He,ie?Et:0),r.setCursor=(V,X,ie)=>{en=V.left,jt=V.top,k(null,X,ie)};function ks(V,X){mn(Ir,js,wt.left=V),mn(Ir,$a,wt.width=X)}function fr(V,X){mn(Ir,Ma,wt.top=V),mn(Ir,Ta,wt.height=X)}let Ar=H.ori==0?ks:fr,ri=H.ori==1?ks:fr;function ii(){if(ae&&he.live)for(let V=v==2?1:0;V<b.length;V++){if(V==0&&ut)continue;let X=he.values[V],ie=0;for(let oe in X)Ge[V][ie++].firstChild.nodeValue=X[oe]}}function m(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):wk(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||v==1&&!ut)&&$(ie,te[ie]);ii()}pr=!1,X!==!1&&et("setLegend")}r.setLegend=m;function $(V,X){let ie=b[V],oe=V==0&&P==2?Sr:t[V],ge;ut?ge=ie.values(r,V,X)??tt:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?tt:{_:ge}),he.values[V]=ge}function k(V,X,ie){Jt=en,Yt=jt,[en,jt]=ne.move(r,en,jt),ne.left=en,ne.top=jt,ue&&(ei&&Ui(ei,tr(en),0,vt,He),jn&&Ui(jn,0,tr(jt),vt,He));let oe,ge=pn>In;On=hr,ti=null;let be=H.ori==0?vt:He,Me=H.ori==1?vt:He;if(en<0||zn==0||ge){oe=ne.idx=null;for(let Fe=0;Fe<b.length;Fe++){let We=Cr[Fe];We!=null&&Ui(We,-10,-10,vt,He)}Ni&&Rr(null,bi,!0,V==null&&at.setSeries),he.live&&(te.fill(oe),pr=!0)}else{let Fe,We,Ve;v==1&&(Fe=H.ori==0?en:jt,We=ar(Fe,C),oe=ne.idx=Ei(We,t[0],pn,In),Ve=O(t[0][oe],H,be,0));let Xe=-10,Ze=-10,bt=0,Pt=0,St=!0,Dt="",pt="";for(let rt=v==2?1:0;rt<b.length;rt++){let un=b[rt],Cn=te[rt],Qn=Cn==null?null:v==1?t[rt][Cn]:t[rt][1][Cn],Ut=ne.dataIdx(r,rt,oe,We),pe=Ut==null?null:v==1?t[rt][Ut]:t[rt][1][Ut];if(pr=pr||pe!=Qn||Ut!=Cn,te[rt]=Ut,rt>0&&un.show){let Se=Ut==null?-10:Ut==oe?Ve:O(v==1?t[0][Ut]:t[rt][0][Ut],H,be,0),xe=pe==null?-10:_(pe,v==1?T[un.scale]:T[un.facets[1].scale],Me,0);if(Ni&&pe!=null){let je=H.ori==1?en:jt,lt=er(xr.dist(r,rt,Ut,xe,je));if(lt<On){let Mt=xr.bias;if(Mt!=0){let Kt=ar(je,un.scale),Lt=pe>=0?1:-1,Lr=Kt>=0?1:-1;Lr==Lt&&(Lr==1?Mt==1?pe>=Kt:pe<=Kt:Mt==1?pe<=Kt:pe>=Kt)&&(On=lt,ti=rt)}else On=lt,ti=rt}}if(pr||Sn){let je,lt;H.ori==0?(je=Se,lt=xe):(je=xe,lt=Se);let Mt,Kt,Lt,Lr,xi,an,cr=!0,mo=Bn.bbox;if(mo!=null){cr=!1;let Nn=mo(r,rt);Lt=Nn.left,Lr=Nn.top,Mt=Nn.width,Kt=Nn.height}else Lt=je,Lr=lt,Mt=Kt=Bn.size(r,rt);if(an=Bn.fill(r,rt),xi=Bn.stroke(r,rt),Sn)rt==ti&&On<=xr.prox&&(Xe=Lt,Ze=Lr,bt=Mt,Pt=Kt,St=cr,Dt=an,pt=xi);else{let Nn=Cr[rt];Nn!=null&&(Gi[rt]=Lt,Di[rt]=Lr,gf(Nn,Mt,Kt,cr),df(Nn,an,xi),Ui(Nn,pi(Lt),pi(Lr),vt,He))}}}}if(Sn){let rt=xr.prox,un=ni==null?On<=rt:On>rt||ti!=ni;if(pr||un){let Cn=Cr[0];Cn!=null&&(Gi[0]=Xe,Di[0]=Ze,gf(Cn,bt,Pt,St),df(Cn,Dt,pt),Ui(Cn,pi(Xe),pi(Ze),vt,He))}}}if(wt.show&&yi)if(V!=null){let[Fe,We]=at.scales,[Ve,Xe]=at.match,[Ze,bt]=V.cursor.sync.scales,Pt=V.cursor.drag;if(Be=Pt._x,gn=Pt._y,Be||gn){let{left:St,top:Dt,width:pt,height:rt}=V.select,un=V.scales[Ze].ori,Cn=V.posToVal,Qn,Ut,pe,Se,xe,je=Fe!=null&&Ve(Fe,Ze),lt=We!=null&&Xe(We,bt);je&&Be?(un==0?(Qn=St,Ut=pt):(Qn=Dt,Ut=rt),pe=T[Fe],Se=O(Cn(Qn,Ze),pe,be,0),xe=O(Cn(Qn+Ut,Ze),pe,be,0),Ar(Ii(Se,xe),er(xe-Se))):Ar(0,be),lt&&gn?(un==1?(Qn=St,Ut=pt):(Qn=Dt,Ut=rt),pe=T[We],Se=_(Cn(Qn,bt),pe,Me,0),xe=_(Cn(Qn+Ut,bt),pe,Me,0),ri(Ii(Se,xe),er(xe-Se))):ri(0,Me)}else Q()}else{let Fe=er(Jt-la),We=er(Yt-fo);if(H.ori==1){let bt=Fe;Fe=We,We=bt}Be=Rn.x&&Fe>=Rn.dist,gn=Rn.y&&We>=Rn.dist;let Ve=Rn.uni;Ve!=null?Be&&gn&&(Be=Fe>=Ve,gn=We>=Ve,!Be&&!gn&&(We>Fe?gn=!0:Be=!0)):Rn.x&&Rn.y&&(Be||gn)&&(Be=gn=!0);let Xe,Ze;Be&&(H.ori==0?(Xe=vi,Ze=en):(Xe=Ji,Ze=jt),Ar(Ii(Xe,Ze),er(Ze-Xe)),gn||ri(0,Me)),gn&&(H.ori==1?(Xe=vi,Ze=en):(Xe=Ji,Ze=jt),ri(Ii(Xe,Ze),er(Ze-Xe)),Be||Ar(0,be)),!Be&&!gn&&(Ar(0,0),ri(0,0))}if(Rn._x=Be,Rn._y=gn,V==null){if(ie){if(bn!=null){let[Fe,We]=at.scales;at.values[0]=Fe!=null?ar(H.ori==0?en:jt,Fe):null,at.values[1]=We!=null?ar(H.ori==1?en:jt,We):null}Tt(ku,r,en,jt,vt,He,oe)}if(Ni){let Fe=ie&&at.setSeries,We=xr.prox;ni==null?On<=We&&Rr(ti,bi,!0,Fe):On>We?Rr(null,bi,!0,Fe):ti!=ni&&Rr(ti,bi,!0,Fe)}}pr&&(he.idx=oe,m()),X!==!1&&et("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=o.getBoundingClientRect(),et("syncRect",D))}function z(V,X,ie,oe,ge,be,Me){ne._lock||yi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,ge,be,Me,Fe,We){if(D==null&&W(!1),Oi(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){en=-10,jt=-10;return}let[Ve,Xe]=at.scales,Ze=X.cursor.sync,[bt,Pt]=Ze.values,[St,Dt]=Ze.scales,[pt,rt]=at.match,un=X.axes[0].side%2==1,Cn=H.ori==0?vt:He,Qn=H.ori==1?vt:He,Ut=un?be:ge,pe=un?ge:be,Se=un?oe:ie,xe=un?ie:oe;if(St!=null?ie=pt(Ve,St)?x(bt,T[Ve],Cn,0):-10:ie=Cn*(Se/Ut),Dt!=null?oe=rt(Xe,Dt)?x(Pt,T[Xe],Qn,0):-10:oe=Qn*(xe/pe),H.ori==1){let je=ie;ie=oe,oe=je}}We&&(X==null||X.cursor.event.type==ku)&&((ie<=1||ie>=vt-1)&&(ie=cs(ie,vt)),(oe<=1||oe>=He-1)&&(oe=cs(oe,He))),Fe?(la=ie,fo=oe,[vi,Ji]=ne.move(r,ie,oe)):(en=ie,jt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){sn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,be,Me){yi=!0,Be=gn=Rn._x=Rn._y=!1,q(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(dn(Su,_u,we,!1),Tt(of,r,vi,Ji,vt,He,null));let{left:Fe,top:We,width:Ve,height:Xe}=wt;re=Fe,se=We,ye=Ve,Ce=Xe}function we(V,X,ie,oe,ge,be,Me){yi=Rn._x=Rn._y=!1,q(V,X,ie,oe,ge,be,Me,!1,!0);let{left:Fe,top:We,width:Ve,height:Xe}=wt,Ze=Ve>0||Xe>0,bt=re!=Fe||se!=We||ye!=Ve||Ce!=Xe;if(Ze&&bt&&sn(wt),Rn.setScale&&Ze&&bt){let Pt=Fe,St=Ve,Dt=We,pt=Xe;if(H.ori==1&&(Pt=We,St=Xe,Dt=Fe,pt=Ve),Be&&Yn(C,ar(Pt,C),ar(Pt+St,C)),gn)for(let rt in T){let un=T[rt];rt!=C&&un.from==null&&un.min!=hr&&Yn(rt,ar(Dt+pt,rt),ar(Dt,rt))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(Mn(Su,_u),Tt(Su,r,en,jt,vt,He,null))}function Oe(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let Fe=yi;if(yi){let We=!0,Ve=!0,Xe=10,Ze,bt;H.ori==0?(Ze=Be,bt=gn):(Ze=gn,bt=Be),Ze&&bt&&(We=en<=Xe||en>=vt-Xe,Ve=jt<=Xe||jt>=He-Xe),Ze&&We&&(en=en<vi?0:vt),bt&&Ve&&(jt=jt<Ji?0:He),k(null,!0,!0),yi=!1}en=-10,jt=-10,te.fill(null),k(null,!0,!0),Fe&&(yi=Fe)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),vs(),Q(),V!=null&&Tt(lf,r,en,jt,vt,He,null))}function Ue(){I.forEach(NS),so(r.width,r.height,!0)}as(Ml,Us,Ue);const st={};st.mousedown=me,st.mousemove=z,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=at.match[2];ie=ge(r,X,ie),ie!=-1&&Rr(ie,oe,!0,!1)},ue&&(dn(of,o,me),dn(ku,o,z),dn(sf,o,V=>{Oi(V),W(!1)}),dn(af,o,Oe),dn(lf,o,Le),Xu.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function et(V,X,ie){Ho?po.push([V,X,ie]):V in Qe&&Qe[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)Qe[X]=(Qe[X]||[]).concat(V.hooks[X])});const fn=(V,X,ie)=>ie,at=qn({key:null,setSeries:!1,filters:{pub:_f,sub:_f},scales:[C,b[1]?b[1].scale:null],match:[$f,$f,fn],values:[null,null]},ne.sync);at.match.length==2&&at.match.push(fn),ne.sync=at;const bn=at.key,kt=hm(bn);function Tt(V,X,ie,oe,ge,be,Me){at.filters.pub(V,X,ie,oe,ge,be,Me)&&kt.pub(V,X,ie,oe,ge,be,Me)}kt.sub(r);function Xn(V,X,ie,oe,ge,be,Me){at.filters.sub(V,X,ie,oe,ge,be,Me)&&st[V](null,X,ie,oe,ge,be,Me)}r.pub=Xn;function lr(){kt.unsub(r),Xu.delete(r),dr.clear(),Eu(Ml,Us,Ue),p.remove(),fe==null||fe.remove(),et("destroy")}r.destroy=lr;function xn(){et("init",n,t),Oo(t||n.data,!1),A[C]?Ne(C,A[C]):vs(),oo=wt.show&&(wt.width>0||wt.height>0),Li=pr=!0,so(n.width,n.height)}return b.forEach(na),I.forEach(Jr),e?e instanceof HTMLElement?(e.appendChild(p),xn()):e(r,xn):xn(),r}yr.assign=qn,yr.fmtNum=Lu,yr.rangeNum=Ll,yr.rangeLog=Rl,yr.rangeAsinh=Iu,yr.orient=hs,yr.pxRatio=Xt,yr.join=_k,yr.fmtDate=Fu,yr.tzDate=Fk,yr.sync=hm;{yr.addGap=wS,yr.clipGaps=Bl;let n=yr.paths={points:ym};n.linear=bm,n.stepped=CS,n.bars=kS,n.spline=AS}var Tm,Mm;function DS(){return Mm||(Mm=1,Tm=function(n,t,e,r,v){var f,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(v===void 0)v=n.length-1;else if(v=v|0,v<r||v>=n.length)throw new RangeError("invalid upper bound");for(;r<=v;)if(f=r+(v-r>>>1),y=+e(n[f],t,f,n),y<0)r=f+1;else if(y>0)v=f-1;else return f;return~r}),Tm}var FS=DS();const Q2=Tr("a",ll(FS));var Zu,Em;function PS(){if(Em)return Zu;Em=1;function n(t,e,r){var v=-1,f=t.length;e<0&&(e=-e>f?0:f+e),r=r>f?f:r,r<0&&(r+=f),f=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(f);++v<f;)y[v]=t[v+e];return y}return Zu=n,Zu}var Ju,Im;function WS(){if(Im)return Ju;Im=1;var n=PS();function t(e,r,v){var f=e.length;return v=v===void 0?f:v,!r&&v>=f?e:n(e,r,v)}return Ju=t,Ju}var eh,Rm;function Lm(){if(Rm)return eh;Rm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+v+f+"]");function h(p){return x.test(p)}return eh=h,eh}var th,Om;function BS(){if(Om)return th;Om=1;function n(t){return t.split("")}return th=n,th}var nh,Nm;function zS(){if(Nm)return nh;Nm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\ufe0e\\ufe0f",y="["+n+"]",x="["+v+"]",h="\\ud83c[\\udffb-\\udfff]",p="(?:"+x+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=p+"?",c="["+f+"]?",d="(?:"+l+"(?:"+[s,a,u].join("|")+")"+c+o+")*",w=c+o+d,b="(?:"+[s+x+"?",x,a,u,y].join("|")+")",I=RegExp(h+"(?="+h+")|"+b+w,"g");function T(S){return S.match(I)||[]}return nh=T,nh}var rh,Dm;function jS(){if(Dm)return rh;Dm=1;var n=BS(),t=Lm(),e=zS();function r(v){return t(v)?e(v):n(v)}return rh=r,rh}var ih,Fm;function HS(){if(Fm)return ih;Fm=1;var n=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo;return ih=n,ih}var oh,Pm;function US(){if(Pm)return oh;Pm=1;var n=HS(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return oh=e,oh}var sh,Wm;function ah(){if(Wm)return sh;Wm=1;var n=US(),t=n.Symbol;return sh=t,sh}var lh,Bm;function VS(){if(Bm)return lh;Bm=1;function n(t,e){for(var r=-1,v=t==null?0:t.length,f=Array(v);++r<v;)f[r]=e(t[r],r,t);return f}return lh=n,lh}var ch,zm;function qS(){if(zm)return ch;zm=1;var n=Array.isArray;return ch=n,ch}var uh,jm;function KS(){if(jm)return uh;jm=1;var n=ah(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,v=n?n.toStringTag:void 0;function f(y){var x=e.call(y,v),h=y[v];try{y[v]=void 0;var p=!0}catch{}var s=r.call(y);return p&&(x?y[v]=h:delete y[v]),s}return uh=f,uh}var hh,Hm;function GS(){if(Hm)return hh;Hm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return hh=e,hh}var dh,Um;function YS(){if(Um)return dh;Um=1;var n=ah(),t=KS(),e=GS(),r="[object Null]",v="[object Undefined]",f=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?v:r:f&&f in Object(x)?t(x):e(x)}return dh=y,dh}var ph,Vm;function XS(){if(Vm)return ph;Vm=1;function n(t){return t!=null&&typeof t=="object"}return ph=n,ph}var gh,qm;function QS(){if(qm)return gh;qm=1;var n=YS(),t=XS(),e="[object Symbol]";function r(v){return typeof v=="symbol"||t(v)&&n(v)==e}return gh=r,gh}var fh,Km;function ZS(){if(Km)return fh;Km=1;var n=ah(),t=VS(),e=qS(),r=QS(),v=n?n.prototype:void 0,f=v?v.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return f?f.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return fh=y,fh}var mh,Gm;function Ul(){if(Gm)return mh;Gm=1;var n=ZS();function t(e){return e==null?"":n(e)}return mh=t,mh}var vh,Ym;function JS(){if(Ym)return vh;Ym=1;var n=WS(),t=Lm(),e=jS(),r=Ul();function v(f){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),p=x?n(x,1).join(""):y.slice(1);return h[f]()+p}}return vh=v,vh}var yh,Xm;function Qm(){if(Xm)return yh;Xm=1;var n=JS(),t=n("toUpperCase");return yh=t,yh}var eA=Qm();const tA=ll(eA);var wh,Zm;function nA(){if(Zm)return wh;Zm=1;var n=Ul(),t=Qm();function e(r){return t(n(r).toLowerCase())}return wh=e,wh}var bh,Jm;function rA(){if(Jm)return bh;Jm=1;function n(t,e,r,v){var f=-1,y=t==null?0:t.length;for(v&&y&&(r=t[++f]);++f<y;)r=e(r,t[f],f,t);return r}return bh=n,bh}var xh,ev;function iA(){if(ev)return xh;ev=1;function n(t){return function(e){return t==null?void 0:t[e]}}return xh=n,xh}var Ch,tv;function oA(){if(tv)return Ch;tv=1;var n=iA(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return Ch=e,Ch}var kh,nv;function sA(){if(nv)return kh;nv=1;var n=oA(),t=Ul(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",v="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",y=r+v+f,x="["+y+"]",h=RegExp(x,"g");function p(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return kh=p,kh}var Sh,rv;function aA(){if(rv)return Sh;rv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Sh=t,Sh}var Ah,iv;function lA(){if(iv)return Ah;iv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return Ah=t,Ah}var _h,ov;function cA(){if(ov)return _h;ov=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",l=x+h+p+s,o="['’]",c="["+l+"]",d="["+v+"]",w="\\d+",b="["+f+"]",I="["+y+"]",T="[^"+n+l+w+f+y+a+"]",S="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+S+")",R="[^"+n+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",H="\\u200d",P="(?:"+I+"|"+T+")",O="(?:"+E+"|"+T+")",_="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[b,L,F].join("|")+")"+te,ne=RegExp([E+"?"+I+"+"+_+"(?="+[c,E,"$"].join("|")+")",O+"+"+A+"(?="+[c,E+P,"$"].join("|")+")",E+"?"+P+"+"+_,E+"+"+A,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return _h=ae,_h}var $h,sv;function uA(){if(sv)return $h;sv=1;var n=aA(),t=lA(),e=Ul(),r=cA();function v(f,y,x){return f=e(f),y=x?void 0:y,y===void 0?t(f)?r(f):n(f):f.match(y)||[]}return $h=v,$h}var Th,av;function hA(){if(av)return Th;av=1;var n=rA(),t=sA(),e=uA(),r="['’]",v=RegExp(r,"g");function f(y){return function(x){return n(e(t(x).replace(v,"")),y,"")}}return Th=f,Th}var Mh,lv;function dA(){if(lv)return Mh;lv=1;var n=nA(),t=hA(),e=t(function(r,v,f){return v=v.toLowerCase(),r+(f?n(v):v)});return Mh=e,Mh}var pA=dA();const gA=ll(pA),fA=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-D0fKsdTb-f0f8bb61c8ac001076cf.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-BmRSuGhA-e26fcf073e312dceb2b1.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-Dpxbw455-f2911693be4b145d39cc.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-8iOpXmpp-4898d8aa1f6beedd8249.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-B0iU38rA-b6b8904fa2c914f3f6a9.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-C9viSVBs-2dbde68bdc99154b1deb.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-CFiCpITu-8124aef76935c61281e0.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-fu6vbAY0-d33ae9045bd15eb0fda9.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-BVqHq3Vp-2ccc092480cf9b316359.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-BOFa8-NU-2ec7ec4cf0e141deaf0a.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-l3ko0QXk-83b407875e2961181282.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-BCZoO-Z6-6ea06b52ef07c6a3f2f0.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-BN7e1d5b-fecffc9a2e8bea6e5bd3.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-Bb5RGXDB-d70c808812db4c585098.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-Dggqab-F-dc0d26e6f356a28fa0a7.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-CfMtj7H8-a65d99195373abb692e3.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-B9_PbzY2-ff74a90fe613f621e128.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-BWgZL_Oz-b0937c61aa8e8ff0cf5c.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-yMYUnNB8-15f50369d0f8ae722376.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-C4zMx7z2-d191d0b59ca769974c0a.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-DA4P_mJT-e723858ead19fc1c7cd4.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-B1wK0hK4-098b5862b394475b8565.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-CY0saBoK-5a3c95d625a22791960c.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-B3ZOYaGy-ca6a1b8b5a029aba73a8.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-CmXcESTg-7b8ff2c8a931b7eb0f8f.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-D_yrQrn6-17fb855c3b251cf14e44.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-dNaNfsBE-854bb3c62f4d5afa58d3.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-3vNoH6Mc-94a7d0f093855f8c050a.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-7VppYVIN-b4cc9cbbd0f74dc8341b.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-BZ6nwifg-e3cc4d6460e742408c8e.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-IyuXLNsw-6585ae45caeeb504dfd6.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-DSxpmIOK-50ebc592ef283af5fd06.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-BoPTdVV5-3138230cbb1a9780ae76.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-Bt3qOvrv-d1a97b0759d0f2e8b9c8.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-Ce6YnUBz-a85b5995e0b21477c63e.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-XAbg0jj2-b316bf5e28edc978d06b.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-5MgJFZtz-55861419cbeb5dfe04c8.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-CDwDOFIy-f86891d133e0f3edd52c.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-cQ8V8LaD-f3d5aa6ac01e684d1f88.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-BvRnuGA2-f5c80e3fcd9b37498e20.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-aHmgV0qs-d1f1b38c653e4e205f69.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-D1jUPrUQ-9976792d7ec25e066c9e.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-Cn0o3b4E-6ec4f0d7b1ae0be5f005.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-BQBzqdU--76698f37bc8a9d4d8226.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-C0RmQY3t-12ffbfa88369bf0b3b97.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-BTH9rvcX-5b46f1b67e523b869929.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-C-aDdEoD-febc451fb8bea7d012e2.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-Dd2ccpUQ-4a21273b27209e479764.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-DY3aFTnP-a1583dd6195b967ccc54.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-C_site21-87895250eeaaa9e7aaaa.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-Bx81VfQD-adaca188166a227c8776.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-cbjxVV3B-853e1275e8f0e22fa582.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-cQb2o_xH-b6d60437cec5d403a07c.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-BBTuSCK9-25b1b10e08eb81ab7813.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-Ct7iGtu0-fa70b22703f8a8eb6cbf.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-DJn02myf-72f0a6db12f5197c1f52.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-DHQMxtF3-65540eb925a6ebc3975c.js"),void 0)}),mA=Object.entries(fA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=tA(gA(t.replace(/\.\w+$/,"")));return{...n,[r]:Qd(e)}},{}),Z2=Tr("U",{components:mA});function cv(n,t){return function(){return n.apply(t,arguments)}}const{toString:vA}=Object.prototype,{getPrototypeOf:Eh}=Object,{iterator:Vl,toStringTag:uv}=Symbol,ql=(n=>t=>{const e=vA.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=n=>(n=n.toLowerCase(),t=>ql(t)===n),Kl=n=>t=>typeof t===n,{isArray:Zs}=Array,Na=Kl("undefined");function yA(n){return n!==null&&!Na(n)&&n.constructor!==null&&!Na(n.constructor)&&Wr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const hv=Ri("ArrayBuffer");function wA(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hv(n.buffer),t}const bA=Kl("string"),Wr=Kl("function"),dv=Kl("number"),Gl=n=>n!==null&&typeof n=="object",xA=n=>n===!0||n===!1,Yl=n=>{if(ql(n)!=="object")return!1;const t=Eh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(uv in n)&&!(Vl in n)},CA=Ri("Date"),kA=Ri("File"),SA=Ri("Blob"),AA=Ri("FileList"),_A=n=>Gl(n)&&Wr(n.pipe),$A=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Wr(n.append)&&((t=ql(n))==="formdata"||t==="object"&&Wr(n.toString)&&n.toString()==="[object FormData]"))},TA=Ri("URLSearchParams"),[MA,EA,IA,RA]=["ReadableStream","Request","Response","Headers"].map(Ri),LA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Da(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,v;if(typeof n!="object"&&(n=[n]),Zs(n))for(r=0,v=n.length;r<v;r++)t.call(null,n[r],r,n);else{const f=e?Object.getOwnPropertyNames(n):Object.keys(n),y=f.length;let x;for(r=0;r<y;r++)x=f[r],t.call(null,n[x],x,n)}}function pv(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,v;for(;r-- >0;)if(v=e[r],t===v.toLowerCase())return v;return null}const ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gv=n=>!Na(n)&&n!==ds;function Ih(){const{caseless:n}=gv(this)&&this||{},t={},e=(r,v)=>{const f=n&&pv(t,v)||v;Yl(t[f])&&Yl(r)?t[f]=Ih(t[f],r):Yl(r)?t[f]=Ih({},r):Zs(r)?t[f]=r.slice():t[f]=r};for(let r=0,v=arguments.length;r<v;r++)arguments[r]&&Da(arguments[r],e);return t}const OA=(n,t,e,{allOwnKeys:r}={})=>(Da(t,(v,f)=>{e&&Wr(v)?n[f]=cv(v,e):n[f]=v},{allOwnKeys:r}),n),NA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),DA=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},FA=(n,t,e,r)=>{let v,f,y;const x={};if(t=t||{},n==null)return t;do{for(v=Object.getOwnPropertyNames(n),f=v.length;f-- >0;)y=v[f],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Eh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},PA=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},WA=n=>{if(!n)return null;if(Zs(n))return n;let t=n.length;if(!dv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},BA=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Eh(Uint8Array)),zA=(n,t)=>{const e=(n&&n[Vl]).call(n);let r;for(;(r=e.next())&&!r.done;){const v=r.value;t.call(n,v[0],v[1])}},jA=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},HA=Ri("HTMLFormElement"),UA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),fv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),VA=Ri("RegExp"),mv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Da(e,(v,f)=>{let y;(y=t(v,f,n))!==!1&&(r[f]=y||v)}),Object.defineProperties(n,r)},qA=n=>{mv(n,(t,e)=>{if(Wr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Wr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},KA=(n,t)=>{const e={},r=v=>{v.forEach(f=>{e[f]=!0})};return Zs(n)?r(n):r(String(n).split(t)),e},GA=()=>{},YA=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function XA(n){return!!(n&&Wr(n.append)&&n[uv]==="FormData"&&n[Vl])}const QA=n=>{const t=new Array(10),e=(r,v)=>{if(Gl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[v]=r;const f=Zs(r)?[]:{};return Da(r,(y,x)=>{const h=e(y,v+1);!Na(h)&&(f[x]=h)}),t[v]=void 0,f}}return r};return e(n,0)},ZA=Ri("AsyncFunction"),JA=n=>n&&(Gl(n)||Wr(n))&&Wr(n.then)&&Wr(n.catch),vv=((n,t)=>n?setImmediate:t?((e,r)=>(ds.addEventListener("message",({source:v,data:f})=>{v===ds&&f===e&&r.length&&r.shift()()},!1),v=>{r.push(v),ds.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Wr(ds.postMessage)),e_=typeof queueMicrotask<"u"?queueMicrotask.bind(ds):typeof process<"u"&&process.nextTick||vv,t_=n=>n!=null&&Wr(n[Vl]),_e={isArray:Zs,isArrayBuffer:hv,isBuffer:yA,isFormData:$A,isArrayBufferView:wA,isString:bA,isNumber:dv,isBoolean:xA,isObject:Gl,isPlainObject:Yl,isReadableStream:MA,isRequest:EA,isResponse:IA,isHeaders:RA,isUndefined:Na,isDate:CA,isFile:kA,isBlob:SA,isRegExp:VA,isFunction:Wr,isStream:_A,isURLSearchParams:TA,isTypedArray:BA,isFileList:AA,forEach:Da,merge:Ih,extend:OA,trim:LA,stripBOM:NA,inherits:DA,toFlatObject:FA,kindOf:ql,kindOfTest:Ri,endsWith:PA,toArray:WA,forEachEntry:zA,matchAll:jA,isHTMLForm:HA,hasOwnProperty:fv,hasOwnProp:fv,reduceDescriptors:mv,freezeMethods:qA,toObjectSet:KA,toCamelCase:UA,noop:GA,toFiniteNumber:YA,findKey:pv,global:ds,isContextDefined:gv,isSpecCompliantForm:XA,toJSONObject:QA,isAsyncFn:ZA,isThenable:JA,setImmediate:vv,asap:e_,isIterable:t_};function $t(n,t,e,r,v){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),v&&(this.response=v,this.status=v.status?v.status:null)}_e.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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const yv=$t.prototype,wv={};["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=>{wv[n]={value:n}}),Object.defineProperties($t,wv),Object.defineProperty(yv,"isAxiosError",{value:!0}),$t.from=(n,t,e,r,v,f)=>{const y=Object.create(yv);return _e.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),$t.call(y,n.message,t,e,r,v),y.cause=n,y.name=n.name,f&&Object.assign(y,f),y};const n_=null;function Rh(n){return _e.isPlainObject(n)||_e.isArray(n)}function bv(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function xv(n,t,e){return n?n.concat(t).map(function(r,v){return r=bv(r),!e&&v?"["+r+"]":r}).join(e?".":""):t}function r_(n){return _e.isArray(n)&&!n.some(Rh)}const i_=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function Xl(n,t,e){if(!_e.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!_e.isUndefined(o[l])});const r=e.metaTokens,v=e.visitor||p,f=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(v))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(_e.isDate(l))return l.toISOString();if(!x&&_e.isBlob(l))throw new $t("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(l)||_e.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function p(l,o,c){let d=l;if(l&&!c&&typeof l=="object"){if(_e.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(_e.isArray(l)&&r_(l)||(_e.isFileList(l)||_e.endsWith(o,"[]"))&&(d=_e.toArray(l)))return o=bv(o),d.forEach(function(w,b){!(_e.isUndefined(w)||w===null)&&t.append(y===!0?xv([o],b,f):y===null?o:o+"[]",h(w))}),!1}return Rh(l)?!0:(t.append(xv(c,o,f),h(l)),!1)}const s=[],a=Object.assign(i_,{defaultVisitor:p,convertValue:h,isVisitable:Rh});function u(l,o){if(!_e.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),_e.forEach(l,function(c,d){(!(_e.isUndefined(c)||c===null)&&v.call(t,c,_e.isString(d)?d.trim():d,o,a))===!0&&u(c,o?o.concat(d):[d])}),s.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Cv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Lh(n,t){this._pairs=[],n&&Xl(n,this,t)}const kv=Lh.prototype;kv.append=function(n,t){this._pairs.push([n,t])},kv.toString=function(n){const t=n?function(e){return n.call(this,e,Cv)}:Cv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function o_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sv(n,t,e){if(!t)return n;const r=e&&e.encode||o_;_e.isFunction(e)&&(e={serialize:e});const v=e&&e.serialize;let f;if(v?f=v(t,e):f=_e.isURLSearchParams(t)?t.toString():new Lh(t,e).toString(r),f){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let Av=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(e){e!==null&&t(e)})}};const _v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},s_=typeof URLSearchParams<"u"?URLSearchParams:Lh,a_=typeof FormData<"u"?FormData:null,l_=typeof Blob<"u"?Blob:null,c_={isBrowser:!0,classes:{URLSearchParams:s_,FormData:a_,Blob:l_},protocols:["http","https","file","blob","url","data"]},Oh=typeof window<"u"&&typeof document<"u",Nh=typeof navigator=="object"&&navigator||void 0,u_=Oh&&(!Nh||["ReactNative","NativeScript","NS"].indexOf(Nh.product)<0),h_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",d_=Oh&&window.location.href||"http://localhost",p_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oh,hasStandardBrowserEnv:u_,hasStandardBrowserWebWorkerEnv:h_,navigator:Nh,origin:d_},Symbol.toStringTag,{value:"Module"})),wr={...p_,...c_};function g_(n,t){return Xl(n,new wr.classes.URLSearchParams,Object.assign({visitor:function(e,r,v,f){return wr.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)}},t))}function f_(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function m_(n){const t={},e=Object.keys(n);let r;const v=e.length;let f;for(r=0;r<v;r++)f=e[r],t[f]=n[f];return t}function $v(n){function t(e,r,v,f){let y=e[f++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=f>=e.length;return y=!y&&_e.isArray(v)?v.length:y,h?(_e.hasOwnProp(v,y)?v[y]=[v[y],r]:v[y]=r,!x):((!v[y]||!_e.isObject(v[y]))&&(v[y]=[]),t(e,r,v[y],f)&&_e.isArray(v[y])&&(v[y]=m_(v[y])),!x)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const e={};return _e.forEachEntry(n,(r,v)=>{t(f_(r),v,e,0)}),e}return null}function v_(n,t,e){if(_e.isString(n))try{return(t||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Fa={transitional:_v,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,v=_e.isObject(n);if(v&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify($v(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(v){if(e.indexOf("application/x-www-form-urlencoded")>-1)return g_(n,this.formSerializer).toString();if((f=_e.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Xl(f?{"files[]":n}:n,y&&new y,this.formSerializer)}}return v||r?(t.setContentType("application/json",!1),v_(n)):n}],transformResponse:[function(n){const t=this.transitional||Fa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.isString(n)&&(e&&!this.responseType||r)){const v=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(f){if(v)throw f.name==="SyntaxError"?$t.from(f,$t.ERR_BAD_RESPONSE,this,null,this.response):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],n=>{Fa.headers[n]={}});const y_=_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"]),w_=n=>{const t={};let e,r,v;return n&&n.split(`
1487
+ }`;var Ot=db(function(){return Mt(ee,nt+"return "+De).apply(e,le)});if(Ot.source=De,Wd(Ot))throw Ot;return Ot}function FO(i){return nn(i).toLowerCase()}function PO(i){return nn(i).toUpperCase()}function WO(i,g,M){if(i=nn(i),i&&(M||g===e))return mn(i);if(!i||!(g=oi(g)))return i;var j=St(i),G=St(g),ee=Tt(j,G),le=Qn(j,G)+1;return Yo(j,ee,le).join("")}function BO(i,g,M){if(i=nn(i),i&&(M||g===e))return i.slice(0,Dt(i)+1);if(!i||!(g=oi(g)))return i;var j=St(i),G=Qn(j,St(g))+1;return Yo(j,0,G).join("")}function zO(i,g,M){if(i=nn(i),i&&(M||g===e))return i.replace(An,"");if(!i||!(g=oi(g)))return i;var j=St(i),G=Tt(j,St(g));return Yo(j,G).join("")}function jO(i,g){var M=E,j=H;if($n(g)){var G="separator"in g?g.separator:G;M="length"in g?It(g.length):M,j="omission"in g?oi(g.omission):j}i=nn(i);var ee=i.length;if(oe(i)){var le=St(i);ee=le.length}if(M>=ee)return i;var de=M-Pt(j);if(de<1)return j;var ve=le?Yo(le,0,de).join(""):i.slice(0,de);if(G===e)return ve+j;if(le&&(de+=ve.length-de),Bd(G)){if(i.slice(de).search(G)){var Ie,Re=ve;for(G.global||(G=Lr(G.source,nn(Jr.exec(G))+"g")),G.lastIndex=0;Ie=G.exec(Re);)var De=Ie.index;ve=ve.slice(0,De===e?de:De)}}else if(i.indexOf(oi(G),de)!=de){var Ke=ve.lastIndexOf(G);Ke>-1&&(ve=ve.slice(0,Ke))}return ve+j}function HO(i){return i=nn(i),i&&Lo.test(i)?i.replace(pr,pt):i}var UO=pa(function(i,g,M){return i+(M?" ":"")+g.toUpperCase()}),Hd=pw("toUpperCase");function hb(i,g,M){return i=nn(i),g=M?e:g,g===e?ge(i)?kn(i):Y(i):i.match(g)||[]}var db=Ft(function(i,g){try{return ar(i,e,g)}catch(M){return Wd(M)?M:new lt(M)}}),VO=xo(function(i,g){return gr(g,function(M){M=no(M),wo(i,M,Fd(i[M],i))}),i});function qO(i){var g=i==null?0:i.length,M=gt();return i=g?m(i,function(j){if(typeof j[1]!="function")throw new an(y);return[M(j[0]),j[1]]}):[],Ft(function(j){for(var G=-1;++G<g;){var ee=i[G];if(ar(ee[0],this,j))return ar(ee[1],this,j)}})}function KO(i){return yE(ki(i,a))}function Ud(i){return function(){return i}}function GO(i,g){return i==null||i!==i?g:i}var YO=fw(),XO=fw(!0);function Gr(i){return i}function Vd(i){return Vy(typeof i=="function"?i:ki(i,a))}function QO(i){return Ky(ki(i,a))}function ZO(i,g){return Gy(i,ki(g,a))}var JO=Ft(function(i,g){return function(M){return Ja(M,i,g)}}),e2=Ft(function(i,g){return function(M){return Ja(i,M,g)}});function qd(i,g,M){var j=hr(g),G=Sc(g,j);M==null&&!($n(g)&&(G.length||!j.length))&&(M=g,g=i,i=this,G=Sc(g,hr(g)));var ee=!($n(M)&&"chain"in M)||!!M.chain,le=ko(i);return gr(G,function(de){var ve=g[de];i[de]=ve,le&&(i.prototype[de]=function(){var Ie=this.__chain__;if(ee||Ie){var Re=i(this.__wrapped__),De=Re.__actions__=Vr(this.__actions__);return De.push({func:ve,args:arguments,thisArg:i}),Re.__chain__=Ie,Re}return ve.apply(i,$([this.value()],arguments))})}),i}function t2(){return sn._===this&&(sn._=$M),this}function Kd(){}function n2(i){return i=It(i),Ft(function(g){return Yy(g,i)})}var r2=Sd(m),i2=Sd(fr),o2=Sd(W);function pb(i){return Id(i)?we(no(i)):NE(i)}function s2(i){return function(g){return i==null?e:Ms(i,g)}}var a2=vw(),l2=vw(!0);function Gd(){return[]}function Yd(){return!1}function c2(){return{}}function u2(){return""}function h2(){return!0}function d2(i,g){if(i=It(i),i<1||i>U)return[];var M=te,j=_r(i,te);g=gt(g),i-=te;for(var G=Qe(j,g);++M<i;)g(M);return G}function p2(i){return At(i)?m(i,no):si(i)?[i]:Vr(Lw(nn(i)))}function g2(i){var g=++AM;return nn(i)+g}var f2=Ec(function(i,g){return i+g},0),m2=Ad("ceil"),v2=Ec(function(i,g){return i/g},1),y2=Ad("floor");function w2(i){return i&&i.length?kc(i,Gr,ud):e}function b2(i,g){return i&&i.length?kc(i,gt(g,2),ud):e}function x2(i){return me(i,Gr)}function C2(i,g){return me(i,gt(g,2))}function k2(i){return i&&i.length?kc(i,Gr,gd):e}function S2(i,g){return i&&i.length?kc(i,gt(g,2),gd):e}var A2=Ec(function(i,g){return i*g},1),_2=Ad("round"),$2=Ec(function(i,g){return i-g},0);function T2(i){return i&&i.length?st(i,Gr):0}function M2(i,g){return i&&i.length?st(i,gt(g,2)):0}return J.after=QR,J.ary=Uw,J.assign=PL,J.assignIn=ib,J.assignInWith=Hc,J.assignWith=WL,J.at=BL,J.before=Vw,J.bind=Fd,J.bindAll=VO,J.bindKey=qw,J.castArray=cL,J.chain=zw,J.chunk=yI,J.compact=wI,J.concat=bI,J.cond=qO,J.conforms=KO,J.constant=Ud,J.countBy=TR,J.create=zL,J.curry=Kw,J.curryRight=Gw,J.debounce=Yw,J.defaults=jL,J.defaultsDeep=HL,J.defer=ZR,J.delay=JR,J.difference=xI,J.differenceBy=CI,J.differenceWith=kI,J.drop=SI,J.dropRight=AI,J.dropRightWhile=_I,J.dropWhile=$I,J.fill=TI,J.filter=ER,J.flatMap=LR,J.flatMapDeep=OR,J.flatMapDepth=NR,J.flatten=Fw,J.flattenDeep=MI,J.flattenDepth=EI,J.flip=eL,J.flow=YO,J.flowRight=XO,J.fromPairs=II,J.functions=XL,J.functionsIn=QL,J.groupBy=DR,J.initial=LI,J.intersection=OI,J.intersectionBy=NI,J.intersectionWith=DI,J.invert=JL,J.invertBy=eO,J.invokeMap=PR,J.iteratee=Vd,J.keyBy=WR,J.keys=hr,J.keysIn=Kr,J.map=Fc,J.mapKeys=nO,J.mapValues=rO,J.matches=QO,J.matchesProperty=ZO,J.memoize=Wc,J.merge=iO,J.mergeWith=ob,J.method=JO,J.methodOf=e2,J.mixin=qd,J.negate=Bc,J.nthArg=n2,J.omit=oO,J.omitBy=sO,J.once=tL,J.orderBy=BR,J.over=r2,J.overArgs=nL,J.overEvery=i2,J.overSome=o2,J.partial=Pd,J.partialRight=Xw,J.partition=zR,J.pick=aO,J.pickBy=sb,J.property=pb,J.propertyOf=s2,J.pull=BI,J.pullAll=Ww,J.pullAllBy=zI,J.pullAllWith=jI,J.pullAt=HI,J.range=a2,J.rangeRight=l2,J.rearg=rL,J.reject=UR,J.remove=UI,J.rest=iL,J.reverse=Nd,J.sampleSize=qR,J.set=cO,J.setWith=uO,J.shuffle=KR,J.slice=VI,J.sortBy=XR,J.sortedUniq=ZI,J.sortedUniqBy=JI,J.split=LO,J.spread=oL,J.tail=eR,J.take=tR,J.takeRight=nR,J.takeRightWhile=rR,J.takeWhile=iR,J.tap=wR,J.throttle=sL,J.thru=Dc,J.toArray=tb,J.toPairs=ab,J.toPairsIn=lb,J.toPath=p2,J.toPlainObject=rb,J.transform=hO,J.unary=aL,J.union=oR,J.unionBy=sR,J.unionWith=aR,J.uniq=lR,J.uniqBy=cR,J.uniqWith=uR,J.unset=dO,J.unzip=Dd,J.unzipWith=Bw,J.update=pO,J.updateWith=gO,J.values=ma,J.valuesIn=fO,J.without=hR,J.words=hb,J.wrap=lL,J.xor=dR,J.xorBy=pR,J.xorWith=gR,J.zip=fR,J.zipObject=mR,J.zipObjectDeep=vR,J.zipWith=yR,J.entries=ab,J.entriesIn=lb,J.extend=ib,J.extendWith=Hc,qd(J,J),J.add=f2,J.attempt=db,J.camelCase=wO,J.capitalize=cb,J.ceil=m2,J.clamp=mO,J.clone=uL,J.cloneDeep=dL,J.cloneDeepWith=pL,J.cloneWith=hL,J.conformsTo=gL,J.deburr=ub,J.defaultTo=GO,J.divide=v2,J.endsWith=bO,J.eq=zi,J.escape=xO,J.escapeRegExp=CO,J.every=MR,J.find=IR,J.findIndex=Nw,J.findKey=UL,J.findLast=RR,J.findLastIndex=Dw,J.findLastKey=VL,J.floor=y2,J.forEach=jw,J.forEachRight=Hw,J.forIn=qL,J.forInRight=KL,J.forOwn=GL,J.forOwnRight=YL,J.get=zd,J.gt=fL,J.gte=mL,J.has=ZL,J.hasIn=jd,J.head=Pw,J.identity=Gr,J.includes=FR,J.indexOf=RI,J.inRange=vO,J.invoke=tO,J.isArguments=Rs,J.isArray=At,J.isArrayBuffer=vL,J.isArrayLike=qr,J.isArrayLikeObject=Un,J.isBoolean=yL,J.isBuffer=Xo,J.isDate=wL,J.isElement=bL,J.isEmpty=xL,J.isEqual=CL,J.isEqualWith=kL,J.isError=Wd,J.isFinite=SL,J.isFunction=ko,J.isInteger=Qw,J.isLength=zc,J.isMap=Zw,J.isMatch=AL,J.isMatchWith=_L,J.isNaN=$L,J.isNative=TL,J.isNil=EL,J.isNull=ML,J.isNumber=Jw,J.isObject=$n,J.isObjectLike=Fn,J.isPlainObject=ol,J.isRegExp=Bd,J.isSafeInteger=IL,J.isSet=eb,J.isString=jc,J.isSymbol=si,J.isTypedArray=fa,J.isUndefined=RL,J.isWeakMap=LL,J.isWeakSet=OL,J.join=FI,J.kebabCase=kO,J.last=Ai,J.lastIndexOf=PI,J.lowerCase=SO,J.lowerFirst=AO,J.lt=NL,J.lte=DL,J.max=w2,J.maxBy=b2,J.mean=x2,J.meanBy=C2,J.min=k2,J.minBy=S2,J.stubArray=Gd,J.stubFalse=Yd,J.stubObject=c2,J.stubString=u2,J.stubTrue=h2,J.multiply=A2,J.nth=WI,J.noConflict=t2,J.noop=Kd,J.now=Pc,J.pad=_O,J.padEnd=$O,J.padStart=TO,J.parseInt=MO,J.random=yO,J.reduce=jR,J.reduceRight=HR,J.repeat=EO,J.replace=IO,J.result=lO,J.round=_2,J.runInContext=pe,J.sample=VR,J.size=GR,J.snakeCase=RO,J.some=YR,J.sortedIndex=qI,J.sortedIndexBy=KI,J.sortedIndexOf=GI,J.sortedLastIndex=YI,J.sortedLastIndexBy=XI,J.sortedLastIndexOf=QI,J.startCase=OO,J.startsWith=NO,J.subtract=$2,J.sum=T2,J.sumBy=M2,J.template=DO,J.times=d2,J.toFinite=So,J.toInteger=It,J.toLength=nb,J.toLower=FO,J.toNumber=_i,J.toSafeInteger=FL,J.toString=nn,J.toUpper=PO,J.trim=WO,J.trimEnd=BO,J.trimStart=zO,J.truncate=jO,J.unescape=HO,J.uniqueId=g2,J.upperCase=UO,J.upperFirst=Hd,J.each=jw,J.eachRight=Hw,J.first=Pw,qd(J,function(){var i={};return eo(J,function(g,M){on.call(J.prototype,M)||(i[M]=g)}),i}(),{chain:!1}),J.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){J[i].placeholder=J}),gr(["drop","take"],function(i,g){Ht.prototype[i]=function(M){M=M===e?1:or(It(M),0);var j=this.__filtered__&&!g?new Ht(this):this.clone();return j.__filtered__?j.__takeCount__=_r(M,j.__takeCount__):j.__views__.push({size:_r(M,te),type:i+(j.__dir__<0?"Right":"")}),j},Ht.prototype[i+"Right"]=function(M){return this.reverse()[i](M).reverse()}}),gr(["filter","map","takeWhile"],function(i,g){var M=g+1,j=M==_||M==N;Ht.prototype[i]=function(G){var ee=this.clone();return ee.__iteratees__.push({iteratee:gt(G,3),type:M}),ee.__filtered__=ee.__filtered__||j,ee}}),gr(["head","last"],function(i,g){var M="take"+(g?"Right":"");Ht.prototype[i]=function(){return this[M](1).value()[0]}}),gr(["initial","tail"],function(i,g){var M="drop"+(g?"":"Right");Ht.prototype[i]=function(){return this.__filtered__?new Ht(this):this[M](1)}}),Ht.prototype.compact=function(){return this.filter(Gr)},Ht.prototype.find=function(i){return this.filter(i).head()},Ht.prototype.findLast=function(i){return this.reverse().find(i)},Ht.prototype.invokeMap=Ft(function(i,g){return typeof i=="function"?new Ht(this):this.map(function(M){return Ja(M,i,g)})}),Ht.prototype.reject=function(i){return this.filter(Bc(gt(i)))},Ht.prototype.slice=function(i,g){i=It(i);var M=this;return M.__filtered__&&(i>0||g<0)?new Ht(M):(i<0?M=M.takeRight(-i):i&&(M=M.drop(i)),g!==e&&(g=It(g),M=g<0?M.dropRight(-g):M.take(g-i)),M)},Ht.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Ht.prototype.toArray=function(){return this.take(te)},eo(Ht.prototype,function(i,g){var M=/^(?:filter|find|map|reject)|While$/.test(g),j=/^(?:head|last)$/.test(g),G=J[j?"take"+(g=="last"?"Right":""):g],ee=j||/^find/.test(g);G&&(J.prototype[g]=function(){var le=this.__wrapped__,de=j?[1]:arguments,ve=le instanceof Ht,Ie=de[0],Re=ve||At(le),De=function(Wt){var Vt=G.apply(J,$([Wt],de));return j&&Ke?Vt[0]:Vt};Re&&M&&typeof Ie=="function"&&Ie.length!=1&&(ve=Re=!1);var Ke=this.__chain__,nt=!!this.__actions__.length,ft=ee&&!Ke,Ot=ve&&!nt;if(!ee&&Re){le=Ot?le:new Ht(this);var mt=i.apply(le,de);return mt.__actions__.push({func:Dc,args:[De],thisArg:e}),new Ci(mt,Ke)}return ft&&Ot?i.apply(this,de):(mt=this.thru(De),ft?j?mt.value()[0]:mt.value():mt)})}),gr(["pop","push","shift","sort","splice","unshift"],function(i){var g=ur[i],M=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",j=/^(?:pop|shift)$/.test(i);J.prototype[i]=function(){var G=arguments;if(j&&!this.__chain__){var ee=this.value();return g.apply(At(ee)?ee:[],G)}return this[M](function(le){return g.apply(At(le)?le:[],G)})}}),eo(Ht.prototype,function(i,g){var M=J[g];if(M){var j=M.name+"";on.call(ua,j)||(ua[j]=[]),ua[j].push({name:g,func:M})}}),ua[Mc(e,w).name]=[{name:"wrapper",func:e}],Ht.prototype.clone=HM,Ht.prototype.reverse=UM,Ht.prototype.value=VM,J.prototype.at=bR,J.prototype.chain=xR,J.prototype.commit=CR,J.prototype.next=kR,J.prototype.plant=AR,J.prototype.reverse=_R,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=$R,J.prototype.first=J.prototype.head,qa&&(J.prototype[qa]=SR),J},Ut=Zn();Xn?((Xn.exports=Ut)._=Ut,yn._=Ut):sn._=Ut}).call(FC)}(Tl,Tl.exports)),Tl.exports}var WC=PC();Tr("O",ll(WC)).debounce(function(){this.rebuildDisplayText()},300);var Jg={exports:{}},ef;function BC(){return ef||(ef=1,function(n,t){(function(){ace.require(["ace/mode/text"],function(e){n&&(n.exports=e)})})()}(Jg)),Jg.exports}BC();const zC=!0,er="u-",jC="uplot",HC=er+"hz",UC=er+"vt",VC=er+"title",qC=er+"wrap",KC=er+"under",GC=er+"over",YC=er+"axis",ss=er+"off",XC=er+"select",QC=er+"cursor-x",ZC=er+"cursor-y",JC=er+"cursor-pt",ek=er+"legend",tk=er+"live",nk=er+"inline",rk=er+"series",ik=er+"marker",tf=er+"label",ok=er+"value",$a="width",Ta="height",Ma="top",nf="bottom",js="left",xu="right",Cu="#000",rf=Cu+"0",ku="mousemove",of="mousedown",Su="mouseup",sf="mouseenter",af="mouseleave",lf="dblclick",sk="resize",ak="scroll",cf="change",Ml="dppxchange",Au="--",Hs=typeof window<"u",_u=Hs?document:null,Us=Hs?window:null,lk=Hs?navigator:null;let Xt,El;function $u(){let n=devicePixelRatio;Xt!=n&&(Xt=n,El&&Eu(cf,El,$u),El=matchMedia(`(min-resolution: ${Xt-.001}dppx) and (max-resolution: ${Xt+.001}dppx)`),as(cf,El,$u),Us.dispatchEvent(new CustomEvent(Ml)))}function Yr(n,t){if(t!=null){let e=n.classList;!e.contains(t)&&e.add(t)}}function Tu(n,t){let e=n.classList;e.contains(t)&&e.remove(t)}function vn(n,t,e){n.style[t]=e+"px"}function Mi(n,t,e,r){let v=_u.createElement(n);return t!=null&&Yr(v,t),e!=null&&e.insertBefore(v,r),v}function di(n,t){return Mi("div",n,t)}const uf=new WeakMap;function Ui(n,t,e,r,v){let f="translate("+t+"px,"+e+"px)",y=uf.get(n);f!=y&&(n.style.transform=f,uf.set(n,f),t<0||e<0||t>r||e>v?Yr(n,ss):Tu(n,ss))}const hf=new WeakMap;function df(n,t,e){let r=t+e,v=hf.get(n);r!=v&&(hf.set(n,r),n.style.background=t,n.style.borderColor=e)}const pf=new WeakMap;function gf(n,t,e,r){let v=t+""+e,f=pf.get(n);v!=f&&(pf.set(n,v),n.style.height=e+"px",n.style.width=t+"px",n.style.marginLeft=r?-t/2+"px":0,n.style.marginTop=r?-e/2+"px":0)}const Mu={passive:!0},ck={...Mu,capture:!0};function as(n,t,e,r){t.addEventListener(n,e,r?ck:Mu)}function Eu(n,t,e,r){t.removeEventListener(n,e,Mu)}Hs&&$u();function Ei(n,t,e,r){let v;e=e||0,r=r||t.length-1;let f=r<=2147483647;for(;r-e>1;)v=f?e+r>>1:Qr((e+r)/2),t[v]<n?e=v:r=v;return n-t[e]<=t[r]-n?e:r}function ff(n){return(t,e,r)=>{let v=-1,f=-1;for(let y=e;y<=r;y++)if(n(t[y])){v=y;break}for(let y=r;y>=e;y--)if(n(t[y])){f=y;break}return[v,f]}}const mf=n=>n!=null,vf=n=>n!=null&&n>0,Il=ff(mf),uk=ff(vf);function hk(n,t,e,r=0,v=!1){let f=v?uk:Il,y=v?vf:mf;[t,e]=f(n,t,e);let x=n[t],h=n[t];if(t>-1)if(r==1)x=n[t],h=n[e];else if(r==-1)x=n[e],h=n[t];else for(let p=t;p<=e;p++){let s=n[p];y(s)&&(s<x?x=s:s>h&&(h=s))}return[x??cn,h??-cn]}function Rl(n,t,e,r){let v=bf(n),f=bf(t);n==t&&(v==-1?(n*=e,t/=e):(n/=e,t*=e));let y=e==10?ro:xf,x=v==1?Qr:pi,h=f==1?pi:Qr,p=x(y(tr(n))),s=h(y(tr(t))),a=Vs(e,p),u=Vs(e,s);return e==10&&(p<0&&(a=un(a,-p)),s<0&&(u=un(u,-s))),r||e==2?(n=a*v,t=u*f):(n=Tf(n,a),t=Nl(t,u)),[n,t]}function Iu(n,t,e,r){let v=Rl(n,t,e,r);return n==0&&(v[0]=0),t==0&&(v[1]=0),v}const Ru=.1,yf={mode:3,pad:Ru},Ea={pad:0,soft:null,mode:0},dk={min:Ea,max:Ea};function Ll(n,t,e,r){return Dl(e)?wf(n,t,e):(Ea.pad=e,Ea.soft=r?0:null,Ea.mode=r?3:0,wf(n,t,dk))}function Gt(n,t){return n??t}function pk(n,t,e){for(t=Gt(t,0),e=Gt(e,n.length-1);t<=e;){if(n[t]!=null)return!0;t++}return!1}function wf(n,t,e){let r=e.min,v=e.max,f=Gt(r.pad,0),y=Gt(v.pad,0),x=Gt(r.hard,-cn),h=Gt(v.hard,cn),p=Gt(r.soft,cn),s=Gt(v.soft,-cn),a=Gt(r.mode,0),u=Gt(v.mode,0),l=t-n,o=ro(l),c=Mr(tr(n),tr(t)),d=ro(c),w=tr(d-o);(l<1e-24||w>10)&&(l=0,(n==0||t==0)&&(l=1e-24,a==2&&p!=cn&&(f=0),u==2&&s!=-cn&&(y=0)));let b=l||c||1e3,I=ro(b),T=Vs(10,Qr(I)),S=b*(l==0?n==0?.1:1:f),C=un(Tf(n-S,T/10),24),R=n>=p&&(a==1||a==3&&C<=p||a==2&&C>=p)?p:cn,L=Mr(x,C<R&&n>=R?R:Ii(R,C)),F=b*(l==0?t==0?.1:1:y),E=un(Nl(t+F,T/10),24),H=t<=s&&(u==1||u==3&&E>=s||u==2&&E<=s)?s:-cn,P=Ii(h,E>H&&t<=H?H:Mr(H,E));return L==P&&L==0&&(P=100),[L,P]}const gk=new Intl.NumberFormat(Hs?lk.language:"en-US"),Lu=n=>gk.format(n),Xr=Math,Ol=Xr.PI,tr=Xr.abs,Qr=Xr.floor,nr=Xr.round,pi=Xr.ceil,Ii=Xr.min,Mr=Xr.max,Vs=Xr.pow,bf=Xr.sign,ro=Xr.log10,xf=Xr.log2,fk=(n,t=1)=>Xr.sinh(n)*t,Ou=(n,t=1)=>Xr.asinh(n/t),cn=1/0;function Cf(n){return(ro((n^n>>31)-(n>>31))|0)+1}function Nu(n,t,e){return Ii(Mr(n,t),e)}function kf(n){return typeof n=="function"}function Bt(n){return kf(n)?n:()=>n}const mk=()=>{},Sf=n=>n,Af=(n,t)=>t,vk=n=>null,_f=n=>!0,$f=(n,t)=>n==t,yk=/\.\d*?(?=9{6,}|0{6,})/gm,ls=n=>{if(Ef(n)||Io.has(n))return n;const t=`${n}`,e=t.match(yk);if(e==null)return n;let r=e[0].length-1;if(t.indexOf("e-")!=-1){let[v,f]=t.split("e");return+`${ls(v)}e${f}`}return un(n,r)};function cs(n,t){return ls(un(ls(n/t))*t)}function Nl(n,t){return ls(pi(ls(n/t))*t)}function Tf(n,t){return ls(Qr(ls(n/t))*t)}function un(n,t=0){if(Ef(n))return n;let e=10**t,r=n*e*(1+Number.EPSILON);return nr(r)/e}const Io=new Map;function Mf(n){return((""+n).split(".")[1]||"").length}function Ia(n,t,e,r){let v=[],f=r.map(Mf);for(let y=t;y<e;y++){let x=tr(y),h=un(Vs(n,y),x);for(let p=0;p<r.length;p++){let s=n==10?+`${r[p]}e${y}`:r[p]*h,a=(y>=0?0:x)+(y>=f[p]?0:f[p]),u=n==10?s:un(s,a);v.push(u),Io.set(u,a)}}return v}const Ra={},Du=[],qs=[null,null],Ro=Array.isArray,Ef=Number.isInteger,wk=n=>n===void 0;function If(n){return typeof n=="string"}function Dl(n){let t=!1;if(n!=null){let e=n.constructor;t=e==null||e==Object}return t}function bk(n){return n!=null&&typeof n=="object"}const xk=Object.getPrototypeOf(Uint8Array),Rf="__proto__";function Ks(n,t=Dl){let e;if(Ro(n)){let r=n.find(v=>v!=null);if(Ro(r)||t(r)){e=Array(n.length);for(let v=0;v<n.length;v++)e[v]=Ks(n[v],t)}else e=n.slice()}else if(n instanceof xk)e=n.slice();else if(t(n)){e={};for(let r in n)r!=Rf&&(e[r]=Ks(n[r],t))}else e=n;return e}function Kn(n){let t=arguments;for(let e=1;e<t.length;e++){let r=t[e];for(let v in r)v!=Rf&&(Dl(n[v])?Kn(n[v],Ks(r[v])):n[v]=Ks(r[v]))}return n}const Ck=0,kk=1,Sk=2;function Ak(n,t,e){for(let r=0,v,f=-1;r<t.length;r++){let y=t[r];if(y>f){for(v=y-1;v>=0&&n[v]==null;)n[v--]=null;for(v=y+1;v<e&&n[v]==null;)n[f=v++]=null}}}function _k(n,t){if(Mk(n)){let y=n[0].slice();for(let x=1;x<n.length;x++)y.push(...n[x].slice(1));return Ek(y[0])||(y=Tk(y)),y}let e=new Set;for(let y=0;y<n.length;y++){let x=n[y][0],h=x.length;for(let p=0;p<h;p++)e.add(x[p])}let r=[Array.from(e).sort((y,x)=>y-x)],v=r[0].length,f=new Map;for(let y=0;y<v;y++)f.set(r[0][y],y);for(let y=0;y<n.length;y++){let x=n[y],h=x[0];for(let p=1;p<x.length;p++){let s=x[p],a=Array(v).fill(void 0),u=t?t[y][p]:kk,l=[];for(let o=0;o<s.length;o++){let c=s[o],d=f.get(h[o]);c===null?u!=Ck&&(a[d]=c,u==Sk&&l.push(d)):a[d]=c}Ak(a,l,v),r.push(a)}}return r}const $k=typeof queueMicrotask>"u"?n=>Promise.resolve().then(n):queueMicrotask;function Tk(n){let t=n[0],e=t.length,r=Array(e);for(let f=0;f<r.length;f++)r[f]=f;r.sort((f,y)=>t[f]-t[y]);let v=[];for(let f=0;f<n.length;f++){let y=n[f],x=Array(e);for(let h=0;h<e;h++)x[h]=y[r[h]];v.push(x)}return v}function Mk(n){let t=n[0][0],e=t.length;for(let r=1;r<n.length;r++){let v=n[r][0];if(v.length!=e)return!1;if(v!=t){for(let f=0;f<e;f++)if(v[f]!=t[f])return!1}}return!0}function Ek(n,t=100){const e=n.length;if(e<=1)return!0;let r=0,v=e-1;for(;r<=v&&n[r]==null;)r++;for(;v>=r&&n[v]==null;)v--;if(v<=r)return!0;const f=Mr(1,Qr((v-r+1)/t));for(let y=n[r],x=r+f;x<=v;x+=f){const h=n[x];if(h!=null){if(h<=y)return!1;y=h}}return!0}const Lf=["January","February","March","April","May","June","July","August","September","October","November","December"],Of=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Nf(n){return n.slice(0,3)}const Ik=Of.map(Nf),Rk=Lf.map(Nf),Lk={MMMM:Lf,MMM:Rk,WWWW:Of,WWW:Ik};function La(n){return(n<10?"0":"")+n}function Ok(n){return(n<10?"00":n<100?"0":"")+n}const Nk={YYYY:n=>n.getFullYear(),YY:n=>(n.getFullYear()+"").slice(2),MMMM:(n,t)=>t.MMMM[n.getMonth()],MMM:(n,t)=>t.MMM[n.getMonth()],MM:n=>La(n.getMonth()+1),M:n=>n.getMonth()+1,DD:n=>La(n.getDate()),D:n=>n.getDate(),WWWW:(n,t)=>t.WWWW[n.getDay()],WWW:(n,t)=>t.WWW[n.getDay()],HH:n=>La(n.getHours()),H:n=>n.getHours(),h:n=>{let t=n.getHours();return t==0?12:t>12?t-12:t},AA:n=>n.getHours()>=12?"PM":"AM",aa:n=>n.getHours()>=12?"pm":"am",a:n=>n.getHours()>=12?"p":"a",mm:n=>La(n.getMinutes()),m:n=>n.getMinutes(),ss:n=>La(n.getSeconds()),s:n=>n.getSeconds(),fff:n=>Ok(n.getMilliseconds())};function Fu(n,t){t=t||Lk;let e=[],r=/\{([a-z]+)\}|[^{]+/gi,v;for(;v=r.exec(n);)e.push(v[0][0]=="{"?Nk[v[1]]:v[0]);return f=>{let y="";for(let x=0;x<e.length;x++)y+=typeof e[x]=="string"?e[x]:e[x](f,t);return y}}const Dk=new Intl.DateTimeFormat().resolvedOptions().timeZone;function Fk(n,t){let e;return t=="UTC"||t=="Etc/UTC"?e=new Date(+n+n.getTimezoneOffset()*6e4):t==Dk?e=n:(e=new Date(n.toLocaleString("en-US",{timeZone:t})),e.setMilliseconds(n.getMilliseconds())),e}const Df=n=>n%1==0,Fl=[1,2,2.5,5],Pk=Ia(10,-32,0,Fl),Ff=Ia(10,0,32,Fl),Wk=Ff.filter(Df),us=Pk.concat(Ff),Pu=`
1488
+ `,Pf="{YYYY}",Wf=Pu+Pf,Bf="{M}/{D}",Oa=Pu+Bf,Pl=Oa+"/{YY}",zf="{aa}",Bk="{h}:{mm}",Gs=Bk+zf,jf=Pu+Gs,Hf=":{ss}",tn=null;function Uf(n){let t=n*1e3,e=t*60,r=e*60,v=r*24,f=v*30,y=v*365,x=(n==1?Ia(10,0,3,Fl).filter(Df):Ia(10,-3,0,Fl)).concat([t,t*5,t*10,t*15,t*30,e,e*5,e*10,e*15,e*30,r,r*2,r*3,r*4,r*6,r*8,r*12,v,v*2,v*3,v*4,v*5,v*6,v*7,v*8,v*9,v*10,v*15,f,f*2,f*3,f*4,f*6,y,y*2,y*5,y*10,y*25,y*50,y*100]);const h=[[y,Pf,tn,tn,tn,tn,tn,tn,1],[v*28,"{MMM}",Wf,tn,tn,tn,tn,tn,1],[v,Bf,Wf,tn,tn,tn,tn,tn,1],[r,"{h}"+zf,Pl,tn,Oa,tn,tn,tn,1],[e,Gs,Pl,tn,Oa,tn,tn,tn,1],[t,Hf,Pl+" "+Gs,tn,Oa+" "+Gs,tn,jf,tn,1],[n,Hf+".{fff}",Pl+" "+Gs,tn,Oa+" "+Gs,tn,jf,tn,1]];function p(s){return(a,u,l,o,c,d)=>{let w=[],b=c>=y,I=c>=f&&c<y,T=s(l),S=un(T*n,3),C=Wu(T.getFullYear(),b?0:T.getMonth(),I||b?1:T.getDate()),R=un(C*n,3);if(I||b){let L=I?c/f:0,F=b?c/y:0,E=S==R?S:un(Wu(C.getFullYear()+F,C.getMonth()+L,1)*n,3),H=new Date(nr(E/n)),P=H.getFullYear(),O=H.getMonth();for(let _=0;E<=o;_++){let A=Wu(P+F*_,O+L*_,1),N=A-s(un(A*n,3));E=un((+A+N)*n,3),E<=o&&w.push(E)}}else{let L=c>=v?v:c,F=Qr(l)-Qr(S),E=R+F+Nl(S-R,L);w.push(E);let H=s(E),P=H.getHours()+H.getMinutes()/e+H.getSeconds()/r,O=c/r,_=a.axes[u]._space,A=d/_;for(;E=un(E+c,n==1?0:3),!(E>o);)if(O>1){let N=Qr(un(P+O,6))%24,B=s(E).getHours()-N;B>1&&(B=-1),E-=B*r,P=(P+O)%24;let U=w[w.length-1];un((E-U)/c,3)*A>=.7&&w.push(E)}else w.push(E)}return w}}return[x,h,p]}const[zk,jk,Hk]=Uf(1),[Uk,Vk,qk]=Uf(.001);Ia(2,-53,53,[1]);function Vf(n,t){return n.map(e=>e.map((r,v)=>v==0||v==8||r==null?r:t(v==1||e[8]==0?r:e[1]+r)))}function qf(n,t){return(e,r,v,f,y)=>{let x=t.find(o=>y>=o[0])||t[t.length-1],h,p,s,a,u,l;return r.map(o=>{let c=n(o),d=c.getFullYear(),w=c.getMonth(),b=c.getDate(),I=c.getHours(),T=c.getMinutes(),S=c.getSeconds(),C=d!=h&&x[2]||w!=p&&x[3]||b!=s&&x[4]||I!=a&&x[5]||T!=u&&x[6]||S!=l&&x[7]||x[1];return h=d,p=w,s=b,a=I,u=T,l=S,C(c)})}}function Kk(n,t){let e=Fu(t);return(r,v,f,y,x)=>v.map(h=>e(n(h)))}function Wu(n,t,e){return new Date(n,t,e)}function Kf(n,t){return t(n)}const Gk="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Gf(n,t){return(e,r,v,f)=>f==null?Au:t(n(r))}function Yk(n,t){let e=n.series[t];return e.width?e.stroke(n,t):e.points.width?e.points.stroke(n,t):null}function Xk(n,t){return n.series[t].fill(n,t)}const Qk={show:!0,live:!0,isolate:!1,mount:mk,markers:{show:!0,width:2,stroke:Yk,fill:Xk,dash:"solid"},idx:null,idxs:null,values:[]};function Zk(n,t){let e=n.cursor.points,r=di(),v=e.size(n,t);vn(r,$a,v),vn(r,Ta,v);let f=v/-2;vn(r,"marginLeft",f),vn(r,"marginTop",f);let y=e.width(n,t,v);return y&&vn(r,"borderWidth",y),r}function Jk(n,t){let e=n.series[t].points;return e._fill||e._stroke}function eS(n,t){let e=n.series[t].points;return e._stroke||e._fill}function tS(n,t){return n.series[t].points.size}const Bu=[0,0];function nS(n,t,e){return Bu[0]=t,Bu[1]=e,Bu}function Wl(n,t,e,r=!0){return v=>{v.button==0&&(!r||v.target==t)&&e(v)}}function zu(n,t,e,r=!0){return v=>{(!r||v.target==t)&&e(v)}}const rS={show:!0,x:!0,y:!0,lock:!1,move:nS,points:{one:!1,show:Zk,size:tS,width:0,stroke:eS,fill:Jk},bind:{mousedown:Wl,mouseup:Wl,click:Wl,dblclick:Wl,mousemove:zu,mouseleave:zu,mouseenter:zu},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(n,t)=>{t.stopPropagation(),t.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(n,t,e,r,v)=>r-v,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},Yf={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},ju=Kn({},Yf,{filter:Af}),Xf=Kn({},ju,{size:10}),Qf=Kn({},Yf,{show:!1}),Hu='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"',Zf="bold "+Hu,Jf=1.5,em={show:!0,scale:"x",stroke:Cu,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:2,grid:ju,ticks:Xf,border:Qf,font:Hu,lineGap:Jf,rotate:0},iS="Value",oS="Time",tm={show:!0,scale:"x",auto:!1,sorted:1,min:cn,max:-cn,idxs:[]};function sS(n,t,e,r,v){return t.map(f=>f==null?"":Lu(f))}function aS(n,t,e,r,v,f,y){let x=[],h=Io.get(v)||0;e=y?e:un(Nl(e,v),h);for(let p=e;p<=r;p=un(p+v,h))x.push(Object.is(p,-0)?0:p);return x}function Uu(n,t,e,r,v,f,y){const x=[],h=n.scales[n.axes[t].scale].log,p=h==10?ro:xf,s=Qr(p(e));v=Vs(h,s),h==10&&(v=us[Ei(v,us)]);let a=e,u=v*h;h==10&&(u=us[Ei(u,us)]);do x.push(a),a=a+v,h==10&&!Io.has(a)&&(a=un(a,Io.get(v))),a>=u&&(v=a,u=v*h,h==10&&(u=us[Ei(u,us)]));while(a<=r);return x}function lS(n,t,e,r,v,f,y){let x=n.scales[n.axes[t].scale].asinh,h=r>x?Uu(n,t,Mr(x,e),r,v):[x],p=r>=0&&e<=0?[0]:[];return(e<-x?Uu(n,t,Mr(x,-r),-e,v):[x]).reverse().map(s=>-s).concat(p,h)}const nm=/./,cS=/[12357]/,uS=/[125]/,rm=/1/,Vu=(n,t,e,r)=>n.map((v,f)=>t==4&&v==0||f%r==0&&e.test(v.toExponential()[v<0?1:0])?v:null);function hS(n,t,e,r,v){let f=n.axes[e],y=f.scale,x=n.scales[y],h=n.valToPos,p=f._space,s=h(10,y),a=h(9,y)-s>=p?nm:h(7,y)-s>=p?cS:h(5,y)-s>=p?uS:rm;if(a==rm){let u=tr(h(1,y)-s);if(u<p)return Vu(t.slice().reverse(),x.distr,a,pi(p/u)).reverse()}return Vu(t,x.distr,a,1)}function dS(n,t,e,r,v){let f=n.axes[e],y=f.scale,x=f._space,h=n.valToPos,p=tr(h(1,y)-h(2,y));return p<x?Vu(t.slice().reverse(),3,nm,pi(x/p)).reverse():t}function pS(n,t,e,r){return r==null?Au:t==null?"":Lu(t)}const im={show:!0,scale:"y",stroke:Cu,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:Zf,side:3,grid:ju,ticks:Xf,border:Qf,font:Hu,lineGap:Jf,rotate:0};function gS(n,t){let e=3+(n||1)*2;return un(e*t,3)}function fS(n,t){let{scale:e,idxs:r}=n.series[0],v=n._data[0],f=n.valToPos(v[r[0]],e,!0),y=n.valToPos(v[r[1]],e,!0),x=tr(y-f),h=n.series[t],p=x/(h.points.space*Xt);return r[1]-r[0]<=p}const om={scale:null,auto:!0,sorted:0,min:cn,max:-cn},sm=(n,t,e,r,v)=>v,am={show:!0,auto:!0,sorted:0,gaps:sm,alpha:1,facets:[Kn({},om,{scale:"x"}),Kn({},om,{scale:"y"})]},lm={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:sm,alpha:1,points:{show:fS,filter:null},values:null,min:cn,max:-cn,idxs:[],path:null,clip:null};function mS(n,t,e,r,v){return e/10}const cm={time:zC,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},vS=Kn({},cm,{time:!1,ori:1}),um={};function hm(n,t){let e=um[n];return e||(e={key:n,plots:[],sub(r){e.plots.push(r)},unsub(r){e.plots=e.plots.filter(v=>v!=r)},pub(r,v,f,y,x,h,p){for(let s=0;s<e.plots.length;s++)e.plots[s]!=v&&e.plots[s].pub(r,v,f,y,x,h,p)}},n!=null&&(um[n]=e)),e}const Ys=1,qu=2;function hs(n,t,e){const r=n.mode,v=n.series[t],f=r==2?n._data[t]:n._data,y=n.scales,x=n.bbox;let h=f[0],p=r==2?f[1]:f[t],s=r==2?y[v.facets[0].scale]:y[n.series[0].scale],a=r==2?y[v.facets[1].scale]:y[v.scale],u=x.left,l=x.top,o=x.width,c=x.height,d=n.valToPosH,w=n.valToPosV;return s.ori==0?e(v,h,p,s,a,d,w,u,l,o,c,zl,Xs,Hl,gm,mm):e(v,h,p,s,a,w,d,l,u,c,o,jl,Qs,Yu,fm,vm)}function Ku(n,t){let e=0,r=0,v=Gt(n.bands,Du);for(let f=0;f<v.length;f++){let y=v[f];y.series[0]==t?e=y.dir:y.series[1]==t&&(y.dir==1?r|=1:r|=2)}return[e,r==1?-1:r==2?1:r==3?2:0]}function yS(n,t,e,r,v){let f=n.mode,y=n.series[t],x=f==2?y.facets[1].scale:y.scale,h=n.scales[x];return v==-1?h.min:v==1?h.max:h.distr==3?h.dir==1?h.min:h.max:0}function io(n,t,e,r,v,f){return hs(n,t,(y,x,h,p,s,a,u,l,o,c,d)=>{let w=y.pxRound;const b=p.dir*(p.ori==0?1:-1),I=p.ori==0?Xs:Qs;let T,S;b==1?(T=e,S=r):(T=r,S=e);let C=w(a(x[T],p,c,l)),R=w(u(h[T],s,d,o)),L=w(a(x[S],p,c,l)),F=w(u(f==1?s.max:s.min,s,d,o)),E=new Path2D(v);return I(E,L,F),I(E,C,F),I(E,C,R),E})}function Bl(n,t,e,r,v,f){let y=null;if(n.length>0){y=new Path2D;const x=t==0?Hl:Yu;let h=e;for(let a=0;a<n.length;a++){let u=n[a];if(u[1]>u[0]){let l=u[0]-h;l>0&&x(y,h,r,l,r+f),h=u[1]}}let p=e+v-h,s=10;p>0&&x(y,h,r-s/2,p,r+f+s)}return y}function wS(n,t,e){let r=n[n.length-1];r&&r[0]==t?r[1]=e:n.push([t,e])}function Gu(n,t,e,r,v,f,y){let x=[],h=n.length;for(let p=v==1?e:r;p>=e&&p<=r;p+=v)if(t[p]===null){let s=p,a=p;if(v==1)for(;++p<=r&&t[p]===null;)a=p;else for(;--p>=e&&t[p]===null;)a=p;let u=f(n[s]),l=a==s?u:f(n[a]),o=s-v;u=y<=0&&o>=0&&o<h?f(n[o]):u;let c=a+v;l=y>=0&&c>=0&&c<h?f(n[c]):l,l>=u&&x.push([u,l])}return x}function dm(n){return n==0?Sf:n==1?nr:t=>cs(t,n)}function pm(n){let t=n==0?zl:jl,e=n==0?(v,f,y,x,h,p)=>{v.arcTo(f,y,x,h,p)}:(v,f,y,x,h,p)=>{v.arcTo(y,f,h,x,p)},r=n==0?(v,f,y,x,h)=>{v.rect(f,y,x,h)}:(v,f,y,x,h)=>{v.rect(y,f,h,x)};return(v,f,y,x,h,p=0,s=0)=>{p==0&&s==0?r(v,f,y,x,h):(p=Ii(p,x/2,h/2),s=Ii(s,x/2,h/2),t(v,f+p,y),e(v,f+x,y,f+x,y+h,p),e(v,f+x,y+h,f,y+h,s),e(v,f,y+h,f,y,s),e(v,f,y,f+x,y,p),v.closePath())}}const zl=(n,t,e)=>{n.moveTo(t,e)},jl=(n,t,e)=>{n.moveTo(e,t)},Xs=(n,t,e)=>{n.lineTo(t,e)},Qs=(n,t,e)=>{n.lineTo(e,t)},Hl=pm(0),Yu=pm(1),gm=(n,t,e,r,v,f)=>{n.arc(t,e,r,v,f)},fm=(n,t,e,r,v,f)=>{n.arc(e,t,r,v,f)},mm=(n,t,e,r,v,f,y)=>{n.bezierCurveTo(t,e,r,v,f,y)},vm=(n,t,e,r,v,f,y)=>{n.bezierCurveTo(e,t,v,r,y,f)};function ym(n){return(t,e,r,v,f)=>hs(t,e,(y,x,h,p,s,a,u,l,o,c,d)=>{let{pxRound:w,points:b}=y,I,T;p.ori==0?(I=zl,T=gm):(I=jl,T=fm);const S=un(b.width*Xt,3);let C=(b.size-b.width)/2*Xt,R=un(C*2,3),L=new Path2D,F=new Path2D,{left:E,top:H,width:P,height:O}=t.bbox;Hl(F,E-R,H-R,P+R*2,O+R*2);const _=A=>{if(h[A]!=null){let N=w(a(x[A],p,c,l)),B=w(u(h[A],s,d,o));I(L,N+C,B),T(L,N,B,C,0,Ol*2)}};if(f)f.forEach(_);else for(let A=r;A<=v;A++)_(A);return{stroke:S>0?L:null,fill:L,clip:F,flags:Ys|qu}})}function wm(n){return(t,e,r,v,f,y)=>{r!=v&&(f!=r&&y!=r&&n(t,e,r),f!=v&&y!=v&&n(t,e,v),n(t,e,y))}}const bS=wm(Xs),xS=wm(Qs);function bm(n){const t=Gt(n==null?void 0:n.alignGaps,0);return(e,r,v,f)=>hs(e,r,(y,x,h,p,s,a,u,l,o,c,d)=>{[v,f]=Il(h,v,f);let w=y.pxRound,b=P=>w(a(P,p,c,l)),I=P=>w(u(P,s,d,o)),T,S;p.ori==0?(T=Xs,S=bS):(T=Qs,S=xS);const C=p.dir*(p.ori==0?1:-1),R={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},L=R.stroke;let F=!1;if(f-v>=c*4){let P=he=>e.posToVal(he,p.key,!0),O=null,_=null,A,N,B,U=b(x[C==1?v:f]),K=b(x[v]),Z=b(x[f]),te=P(C==1?K+1:Z-1);for(let he=C==1?v:f;he>=v&&he<=f;he+=C){let ne=x[he],ae=(C==1?ne<te:ne>te)?U:b(ne),ue=h[he];ae==U?ue!=null?(N=ue,O==null?(T(L,ae,I(N)),A=O=_=N):N<O?O=N:N>_&&(_=N)):ue===null&&(F=!0):(O!=null&&S(L,U,I(O),I(_),I(A),I(N)),ue!=null?(N=ue,T(L,ae,I(N)),O=_=A=N):(O=_=null,ue===null&&(F=!0)),U=ae,te=P(U+C))}O!=null&&O!=_&&B!=U&&S(L,U,I(O),I(_),I(A),I(N))}else for(let P=C==1?v:f;P>=v&&P<=f;P+=C){let O=h[P];O===null?F=!0:O!=null&&T(L,b(x[P]),I(O))}let[E,H]=Ku(e,r);if(y.fill!=null||E!=0){let P=R.fill=new Path2D(L),O=y.fillTo(e,r,y.min,y.max,E),_=I(O),A=b(x[v]),N=b(x[f]);C==-1&&([N,A]=[A,N]),T(P,N,_),T(P,A,_)}if(!y.spanGaps){let P=[];F&&P.push(...Gu(x,h,v,f,C,b,t)),R.gaps=P=y.gaps(e,r,v,f,P),R.clip=Bl(P,p.ori,l,o,c,d)}return H!=0&&(R.band=H==2?[io(e,r,v,f,L,-1),io(e,r,v,f,L,1)]:io(e,r,v,f,L,H)),R})}function CS(n){const t=Gt(n.align,1),e=Gt(n.ascDesc,!1),r=Gt(n.alignGaps,0),v=Gt(n.extend,!1);return(f,y,x,h)=>hs(f,y,(p,s,a,u,l,o,c,d,w,b,I)=>{[x,h]=Il(a,x,h);let T=p.pxRound,{left:S,width:C}=f.bbox,R=Z=>T(o(Z,u,b,d)),L=Z=>T(c(Z,l,I,w)),F=u.ori==0?Xs:Qs;const E={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Ys},H=E.stroke,P=u.dir*(u.ori==0?1:-1);let O=L(a[P==1?x:h]),_=R(s[P==1?x:h]),A=_,N=_;v&&t==-1&&(N=S,F(H,N,O)),F(H,_,O);for(let Z=P==1?x:h;Z>=x&&Z<=h;Z+=P){let te=a[Z];if(te==null)continue;let he=R(s[Z]),ne=L(te);t==1?F(H,he,O):F(H,A,ne),F(H,he,ne),O=ne,A=he}let B=A;v&&t==1&&(B=S+C,F(H,B,O));let[U,K]=Ku(f,y);if(p.fill!=null||U!=0){let Z=E.fill=new Path2D(H),te=p.fillTo(f,y,p.min,p.max,U),he=L(te);F(Z,B,he),F(Z,N,he)}if(!p.spanGaps){let Z=[];Z.push(...Gu(s,a,x,h,P,R,r));let te=p.width*Xt/2,he=e||t==1?te:-te,ne=e||t==-1?-te:te;Z.forEach(ae=>{ae[0]+=he,ae[1]+=ne}),E.gaps=Z=p.gaps(f,y,x,h,Z),E.clip=Bl(Z,u.ori,d,w,b,I)}return K!=0&&(E.band=K==2?[io(f,y,x,h,H,-1),io(f,y,x,h,H,1)]:io(f,y,x,h,H,K)),E})}function xm(n,t,e,r,v,f,y=cn){if(n.length>1){let x=null;for(let h=0,p=1/0;h<n.length;h++)if(t[h]!==void 0){if(x!=null){let s=tr(n[h]-n[x]);s<p&&(p=s,y=tr(e(n[h],r,v,f)-e(n[x],r,v,f)))}x=h}}return y}function kS(n){n=n||Ra;const t=Gt(n.size,[.6,cn,1]),e=n.align||0,r=n.gap||0;let v=n.radius;v=v==null?[0,0]:typeof v=="number"?[v,0]:v;const f=Bt(v),y=1-t[0],x=Gt(t[1],cn),h=Gt(t[2],1),p=Gt(n.disp,Ra),s=Gt(n.each,l=>{}),{fill:a,stroke:u}=p;return(l,o,c,d)=>hs(l,o,(w,b,I,T,S,C,R,L,F,E,H)=>{let P=w.pxRound,O=e,_=r*Xt,A=x*Xt,N=h*Xt,B,U;T.ori==0?[B,U]=f(l,o):[U,B]=f(l,o);const K=T.dir*(T.ori==0?1:-1);let Z=T.ori==0?Hl:Yu,te=T.ori==0?s:(He,ke,ze,Ye,dt,Ct,xt)=>{s(He,ke,ze,dt,Ye,xt,Ct)},he=Gt(l.bands,Du).find(He=>He.series[0]==o),ne=he!=null?he.dir:0,ae=w.fillTo(l,o,w.min,w.max,ne),ue=P(R(ae,S,H,F)),ce,fe,$e,Te=E,Ee=P(w.width*Xt),Ge=!1,qe=null,ut=null,tt=null,ht=null;a!=null&&(Ee==0||u!=null)&&(Ge=!0,qe=a.values(l,o,c,d),ut=new Map,new Set(qe).forEach(He=>{He!=null&&ut.set(He,new Path2D)}),Ee>0&&(tt=u.values(l,o,c,d),ht=new Map,new Set(tt).forEach(He=>{He!=null&&ht.set(He,new Path2D)})));let{x0:Zt,size:dn}=p;if(Zt!=null&&dn!=null){O=1,b=Zt.values(l,o,c,d),Zt.unit==2&&(b=b.map(ke=>l.posToVal(L+ke*E,T.key,!0)));let He=dn.values(l,o,c,d);dn.unit==2?fe=He[0]*E:fe=C(He[0],T,E,L)-C(0,T,E,L),Te=xm(b,I,C,T,E,L,Te),$e=Te-fe+_}else Te=xm(b,I,C,T,E,L,Te),$e=Te*y+_,fe=Te-$e;$e<1&&($e=0),Ee>=fe/2&&(Ee=0),$e<5&&(P=Sf);let qt=$e>0,dr=Te-$e-(qt?Ee:0);fe=P(Nu(dr,N,A)),ce=(O==0?fe/2:O==K?0:fe)-O*K*((O==0?_/2:0)+(qt?Ee/2:0));const pn={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},En=Ge?null:new Path2D;let In=null;if(he!=null)In=l.data[he.series[1]];else{let{y0:He,y1:ke}=p;He!=null&&ke!=null&&(I=ke.values(l,o,c,d),In=He.values(l,o,c,d))}let Yn=B*fe,vt=U*fe;for(let He=K==1?c:d;He>=c&&He<=d;He+=K){let ke=I[He];if(ke==null)continue;if(In!=null){let ct=In[He]??0;if(ke-ct==0)continue;ue=R(ct,S,H,F)}let ze=T.distr!=2||p!=null?b[He]:He,Ye=C(ze,T,E,L),dt=R(Gt(ke,ae),S,H,F),Ct=P(Ye-ce),xt=P(Mr(dt,ue)),Rt=P(Ii(dt,ue)),Et=xt-Rt;if(ke!=null){let ct=ke<0?vt:Yn,yt=ke<0?Yn:vt;Ge?(Ee>0&&tt[He]!=null&&Z(ht.get(tt[He]),Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt),qe[He]!=null&&Z(ut.get(qe[He]),Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt)):Z(En,Ct,Rt+Qr(Ee/2),fe,Mr(0,Et-Ee),ct,yt),te(l,o,He,Ct-Ee/2,Rt,fe+Ee,Et)}}return Ee>0?pn.stroke=Ge?ht:En:Ge||(pn._fill=w.width==0?w._fill:w._stroke??w._fill,pn.width=0),pn.fill=Ge?ut:En,pn})}function SS(n,t){const e=Gt(t==null?void 0:t.alignGaps,0);return(r,v,f,y)=>hs(r,v,(x,h,p,s,a,u,l,o,c,d,w)=>{[f,y]=Il(p,f,y);let b=x.pxRound,I=B=>b(u(B,s,d,o)),T=B=>b(l(B,a,w,c)),S,C,R;s.ori==0?(S=zl,R=Xs,C=mm):(S=jl,R=Qs,C=vm);const L=s.dir*(s.ori==0?1:-1);let F=I(h[L==1?f:y]),E=F,H=[],P=[];for(let B=L==1?f:y;B>=f&&B<=y;B+=L)if(p[B]!=null){let U=h[B],K=I(U);H.push(E=K),P.push(T(p[B]))}const O={stroke:n(H,P,S,R,C,b),fill:null,clip:null,band:null,gaps:null,flags:Ys},_=O.stroke;let[A,N]=Ku(r,v);if(x.fill!=null||A!=0){let B=O.fill=new Path2D(_),U=x.fillTo(r,v,x.min,x.max,A),K=T(U);R(B,E,K),R(B,F,K)}if(!x.spanGaps){let B=[];B.push(...Gu(h,p,f,y,L,I,e)),O.gaps=B=x.gaps(r,v,f,y,B),O.clip=Bl(B,s.ori,o,c,d,w)}return N!=0&&(O.band=N==2?[io(r,v,f,y,_,-1),io(r,v,f,y,_,1)]:io(r,v,f,y,_,N)),O})}function AS(n){return SS(_S,n)}function _S(n,t,e,r,v,f){const y=n.length;if(y<2)return null;const x=new Path2D;if(e(x,n[0],t[0]),y==2)r(x,n[1],t[1]);else{let h=Array(y),p=Array(y-1),s=Array(y-1),a=Array(y-1);for(let u=0;u<y-1;u++)s[u]=t[u+1]-t[u],a[u]=n[u+1]-n[u],p[u]=s[u]/a[u];h[0]=p[0];for(let u=1;u<y-1;u++)p[u]===0||p[u-1]===0||p[u-1]>0!=p[u]>0?h[u]=0:(h[u]=3*(a[u-1]+a[u])/((2*a[u]+a[u-1])/p[u-1]+(a[u]+2*a[u-1])/p[u]),isFinite(h[u])||(h[u]=0));h[y-1]=p[y-2];for(let u=0;u<y-1;u++)v(x,n[u]+a[u]/3,t[u]+h[u]*a[u]/3,n[u+1]-a[u]/3,t[u+1]-h[u+1]*a[u]/3,n[u+1],t[u+1])}return x}const Xu=new Set;function Cm(){for(let n of Xu)n.syncRect(!0)}Hs&&(as(sk,Us,Cm),as(ak,Us,Cm,!0),as(Ml,Us,()=>{yr.pxRatio=Xt}));const $S=bm(),TS=ym();function km(n,t,e,r){return(r?[n[0],n[1]].concat(n.slice(2)):[n[0]].concat(n.slice(1))).map((v,f)=>Qu(v,f,t,e))}function MS(n,t){return n.map((e,r)=>r==0?{}:Kn({},t,e))}function Qu(n,t,e,r){return Kn({},t==0?e:r,n)}function Sm(n,t,e){return t==null?qs:[t,e]}const ES=Sm;function IS(n,t,e){return t==null?qs:Ll(t,e,Ru,!0)}function Am(n,t,e,r){return t==null?qs:Rl(t,e,n.scales[r].log,!1)}const RS=Am;function _m(n,t,e,r){return t==null?qs:Iu(t,e,n.scales[r].log,!1)}const LS=_m;function OS(n,t,e,r,v){let f=Mr(Cf(n),Cf(t)),y=t-n,x=Ei(v/r*y,e);do{let h=e[x],p=r*h/y;if(p>=v&&f+(h<5?Io.get(h):0)<=17)return[h,p]}while(++x<e.length);return[0,0]}function $m(n){let t,e;return n=n.replace(/(\d+)px/,(r,v)=>(t=nr((e=+v)*Xt))+"px"),[n,t,e]}function NS(n){n.show&&[n.font,n.labelFont].forEach(t=>{let e=un(t[2]*Xt,1);t[0]=t[0].replace(/[0-9.]+px/,e+"px"),t[1]=e})}function yr(n,t,e){const r={mode:Gt(n.mode,1)},v=r.mode;function f(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?1-ge:ge)}function y(V,X,ie,oe){let ge=X.valToPct(V);return oe+ie*(X.dir==-1?ge:1-ge)}function x(V,X,ie,oe){return X.ori==0?f(V,X,ie,oe):y(V,X,ie,oe)}r.valToPosH=f,r.valToPosV=y;let h=!1;r.status=0;const p=r.root=di(jC);if(n.id!=null&&(p.id=n.id),Yr(p,n.class),n.title){let V=di(VC,p);V.textContent=n.title}const s=Mi("canvas"),a=r.ctx=s.getContext("2d"),u=di(qC,p);as("click",u,V=>{V.target===o&&(en!=vi||jt!=Ji)&&Ln.click(r,V)},!0);const l=r.under=di(KC,u);u.appendChild(s);const o=r.over=di(GC,u);n=Ks(n);const c=+Gt(n.pxAlign,1),d=dm(c);(n.plugins||[]).forEach(V=>{V.opts&&(n=V.opts(r,n)||n)});const w=n.ms||.001,b=r.series=v==1?km(n.series||[],tm,lm,!1):MS(n.series||[null],am),I=r.axes=km(n.axes||[],em,im,!0),T=r.scales={},S=r.bands=n.bands||[];S.forEach(V=>{V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1)});const C=v==2?b[1].facets[0].scale:b[0].scale,R={axes:uo,series:ia},L=(n.drawOrder||["axes","series"]).map(V=>R[V]);function F(V){const X=V.distr==3?ie=>ro(ie>0?ie:V.clamp(r,ie,V.min,V.max,V.key)):V.distr==4?ie=>Ou(ie,V.asinh):V.distr==100?ie=>V.fwd(ie):ie=>ie;return ie=>{let oe=X(ie),{_min:ge,_max:be}=V,Me=be-ge;return(oe-ge)/Me}}function E(V){let X=T[V];if(X==null){let ie=(n.scales||Ra)[V]||Ra;if(ie.from!=null){E(ie.from);let oe=Kn({},T[ie.from],ie,{key:V});oe.valToPct=F(oe),T[V]=oe}else{X=T[V]=Kn({},V==C?cm:vS,ie),X.key=V;let oe=X.time,ge=X.range,be=Ro(ge);if((V!=C||v==2&&!oe)&&(be&&(ge[0]==null||ge[1]==null)&&(ge={min:ge[0]==null?yf:{mode:1,hard:ge[0],soft:ge[0]},max:ge[1]==null?yf:{mode:1,hard:ge[1],soft:ge[1]}},be=!1),!be&&Dl(ge))){let Me=ge;ge=(Fe,We,Ve)=>We==null?qs:Ll(We,Ve,Me)}X.range=Bt(ge||(oe?ES:V==C?X.distr==3?RS:X.distr==4?LS:Sm:X.distr==3?Am:X.distr==4?_m:IS)),X.auto=Bt(be?!1:X.auto),X.clamp=Bt(X.clamp||mS),X._min=X._max=null,X.valToPct=F(X)}}}E("x"),E("y"),v==1&&b.forEach(V=>{E(V.scale)}),I.forEach(V=>{E(V.scale)});for(let V in n.scales)E(V);const H=T[C],P=H.distr;let O,_;H.ori==0?(Yr(p,HC),O=f,_=y):(Yr(p,UC),O=y,_=f);const A={};for(let V in T){let X=T[V];(X.min!=null||X.max!=null)&&(A[V]={min:X.min,max:X.max},X.min=X.max=null)}const N=n.tzDate||(V=>new Date(nr(V/w))),B=n.fmtDate||Fu,U=w==1?Hk(N):qk(N),K=qf(N,Vf(w==1?jk:Vk,B)),Z=Gf(N,Kf(Gk,B)),te=[],he=r.legend=Kn({},Qk,n.legend),ne=r.cursor=Kn({},rS,{drag:{y:v==2}},n.cursor),ae=he.show,ue=ne.show,ce=he.markers;he.idxs=te,ce.width=Bt(ce.width),ce.dash=Bt(ce.dash),ce.stroke=Bt(ce.stroke),ce.fill=Bt(ce.fill);let fe,$e,Te,Ee=[],Ge=[],qe,ut=!1,tt={};if(he.live){const V=b[1]?b[1].values:null;ut=V!=null,qe=ut?V(r,1,0):{_:0};for(let X in qe)tt[X]=Au}if(ae)if(fe=Mi("table",ek,p),Te=Mi("tbody",null,fe),he.mount(r,fe),ut){$e=Mi("thead",null,fe,Te);let V=Mi("tr",null,$e);Mi("th",null,V);for(var ht in qe)Mi("th",tf,V).textContent=ht}else Yr(fe,nk),he.live&&Yr(fe,tk);const Zt={show:!0},dn={show:!1};function qt(V,X){if(X==0&&(ut||!he.live||v==2))return qs;let ie=[],oe=Mi("tr",rk,Te,Te.childNodes[X]);Yr(oe,V.class),V.show||Yr(oe,ss);let ge=Mi("th",null,oe);if(ce.show){let Fe=di(ik,ge);if(X>0){let We=ce.width(r,X);We&&(Fe.style.border=We+"px "+ce.dash(r,X)+" "+ce.stroke(r,X)),Fe.style.background=ce.fill(r,X)}}let be=di(tf,ge);V.label instanceof HTMLElement?be.appendChild(V.label):be.textContent=V.label,X>0&&(ce.show||(be.style.color=V.width>0?ce.stroke(r,X):ce.fill(r,X)),pn("click",ge,Fe=>{if(ne._lock)return;Oi(Fe);let We=b.indexOf(V);if((Fe.ctrlKey||Fe.metaKey)!=he.isolate){let Ve=b.some((Xe,Ze)=>Ze>0&&Ze!=We&&Xe.show);b.forEach((Xe,Ze)=>{Ze>0&&Rr(Ze,Ve?Ze==We?Zt:dn:Zt,!0,at.setSeries)})}else Rr(We,{show:!V.show},!0,at.setSeries)},!1),Ni&&pn(sf,ge,Fe=>{ne._lock||(Oi(Fe),Rr(b.indexOf(V),bi,!0,at.setSeries))},!1));for(var Me in qe){let Fe=Mi("td",ok,oe);Fe.textContent="--",ie.push(Fe)}return[oe,ie]}const dr=new Map;function pn(V,X,ie,oe=!0){const ge=dr.get(X)||{},be=ne.bind[V](r,X,ie,oe);be&&(as(V,X,ge[V]=be),dr.set(X,ge))}function En(V,X,ie){const oe=dr.get(X)||{};for(let ge in oe)(V==null||ge==V)&&(Eu(ge,X,oe[ge]),delete oe[ge]);V==null&&dr.delete(X)}let In=0,Yn=0,vt=0,He=0,ke=0,ze=0,Ye=ke,dt=ze,Ct=vt,xt=He,Rt=0,Et=0,ct=0,yt=0;r.bbox={};let bn=!1,br=!1,zr=!1,Li=!1,oo=!1,pr=!1;function so(V,X,ie){(ie||V!=r.width||X!=r.height)&&Lo(V,X),Wi(!1),zr=!0,br=!0,Zi()}function Lo(V,X){r.width=In=vt=V,r.height=Yn=He=X,ke=ze=0,fs(),ta();let ie=r.bbox;Rt=ie.left=cs(ke*Xt,.5),Et=ie.top=cs(ze*Xt,.5),ct=ie.width=cs(vt*Xt,.5),yt=ie.height=cs(He*Xt,.5)}const za=3;function Zr(){let V=!1,X=0;for(;!V;){X++;let ie=oa(X),oe=Va(X);V=X==za||ie&&oe,V||(Lo(r.width,r.height),br=!0)}}function ja({width:V,height:X}){so(V,X)}r.setSize=ja;function fs(){let V=!1,X=!1,ie=!1,oe=!1;I.forEach((ge,be)=>{if(ge.show&&ge._show){let{side:Me,_size:Fe}=ge,We=Me%2,Ve=ge.label!=null?ge.labelSize:0,Xe=Fe+Ve;Xe>0&&(We?(vt-=Xe,Me==3?(ke+=Xe,oe=!0):ie=!0):(He-=Xe,Me==0?(ze+=Xe,V=!0):X=!0))}}),Fi[0]=V,Fi[1]=ie,Fi[2]=X,Fi[3]=oe,vt-=kr[1]+kr[3],ke+=kr[3],He-=kr[2]+kr[0],ze+=kr[0]}function ta(){let V=ke+vt,X=ze+He,ie=ke,oe=ze;function ge(be,Me){switch(be){case 1:return V+=Me,V-Me;case 2:return X+=Me,X-Me;case 3:return ie-=Me,ie+Me;case 0:return oe-=Me,oe+Me}}I.forEach((be,Me)=>{if(be.show&&be._show){let Fe=be.side;be._pos=ge(Fe,be._size),be.label!=null&&(be._lpos=ge(Fe,be.labelSize))}})}if(ne.dataIdx==null){let V=ne.hover,X=V.skip=new Set(V.skip??[]);X.add(void 0);let ie=V.prox=Bt(V.prox),oe=V.bias??(V.bias=0);ne.dataIdx=(ge,be,Me,Fe)=>{if(be==0)return Me;let We=Me,Ve=ie(ge,be,Me,Fe)??cn,Xe=Ve>=0&&Ve<cn,Ze=H.ori==0?vt:He,bt=ne.left,Pt=t[0],St=t[be];if(X.has(St[Me])){We=null;let Dt=null,pt=null,rt;if(oe==0||oe==-1)for(rt=Me;Dt==null&&rt-- >0;)X.has(St[rt])||(Dt=rt);if(oe==0||oe==1)for(rt=Me;pt==null&&rt++<St.length;)X.has(St[rt])||(pt=rt);if(Dt!=null||pt!=null)if(Xe){let hn=Dt==null?-1/0:O(Pt[Dt],H,Ze,0),kn=pt==null?1/0:O(Pt[pt],H,Ze,0),Zn=bt-hn,Ut=kn-bt;Zn<=Ut?Zn<=Ve&&(We=Dt):Ut<=Ve&&(We=pt)}else We=pt==null?Dt:Dt==null?pt:Me-Dt<=pt-Me?Dt:pt}else Xe&&tr(bt-O(Pt[Me],H,Ze,0))>Ve&&(We=null);return We}}const Oi=V=>{ne.event=V};ne.idxs=te,ne._lock=!1;let zn=ne.points;zn.show=Bt(zn.show),zn.size=Bt(zn.size),zn.stroke=Bt(zn.stroke),zn.width=Bt(zn.width),zn.fill=Bt(zn.fill);const xr=r.focus=Kn({},n.focus||{alpha:.3},ne.focus),Ni=xr.prox>=0,An=Ni&&zn.one;let Cr=[],Gi=[],Di=[];function ms(V,X){let ie=zn.show(r,X);if(ie instanceof HTMLElement)return Yr(ie,JC),Yr(ie,V.class),Ui(ie,-10,-10,vt,He),o.insertBefore(ie,Cr[X]),ie}function na(V,X){if(v==1||X>0){let ie=v==1&&T[V.scale].time,oe=V.value;V.value=ie?If(oe)?Gf(N,Kf(oe,B)):oe||Z:oe||pS,V.label=V.label||(ie?oS:iS)}if(An||X>0){V.width=V.width==null?1:V.width,V.paths=V.paths||$S||vk,V.fillTo=Bt(V.fillTo||yS),V.pxAlign=+Gt(V.pxAlign,c),V.pxRound=dm(V.pxAlign),V.stroke=Bt(V.stroke||null),V.fill=Bt(V.fill||null),V._stroke=V._fill=V._paths=V._focus=null;let ie=gS(Mr(1,V.width),1),oe=V.points=Kn({},{size:ie,width:Mr(1,ie*.2),stroke:V.stroke,space:ie*2,paths:TS,_stroke:null,_fill:null},V.points);oe.show=Bt(oe.show),oe.filter=Bt(oe.filter),oe.fill=Bt(oe.fill),oe.stroke=Bt(oe.stroke),oe.paths=Bt(oe.paths),oe.pxAlign=V.pxAlign}if(ae){let ie=qt(V,X);Ee.splice(X,0,ie[0]),Ge.splice(X,0,ie[1]),he.values.push(null)}if(ue){te.splice(X,0,null);let ie=null;An?X==0&&(ie=ms(V,X)):X>0&&(ie=ms(V,X)),Cr.splice(X,0,ie),Gi.splice(X,0,0),Di.splice(X,0,0)}et("addSeries",X)}function Ha(V,X){X=X??b.length,V=v==1?Qu(V,X,tm,lm):Qu(V,X,{},am),b.splice(X,0,V),na(b[X],X)}r.addSeries=Ha;function Ua(V){if(b.splice(V,1),ae){he.values.splice(V,1),Ge.splice(V,1);let X=Ee.splice(V,1)[0];En(null,X.firstChild),X.remove()}ue&&(te.splice(V,1),Cr.splice(V,1)[0].remove(),Gi.splice(V,1),Di.splice(V,1)),et("delSeries",V)}r.delSeries=Ua;const Fi=[!1,!1,!1,!1];function Jr(V,X){if(V._show=V.show,V.show){let ie=V.side%2,oe=T[V.scale];oe==null&&(V.scale=ie?b[1].scale:C,oe=T[V.scale]);let ge=oe.time;V.size=Bt(V.size),V.space=Bt(V.space),V.rotate=Bt(V.rotate),Ro(V.incrs)&&V.incrs.forEach(Me=>{!Io.has(Me)&&Io.set(Me,Mf(Me))}),V.incrs=Bt(V.incrs||(oe.distr==2?Wk:ge?w==1?zk:Uk:us)),V.splits=Bt(V.splits||(ge&&oe.distr==1?U:oe.distr==3?Uu:oe.distr==4?lS:aS)),V.stroke=Bt(V.stroke),V.grid.stroke=Bt(V.grid.stroke),V.ticks.stroke=Bt(V.ticks.stroke),V.border.stroke=Bt(V.border.stroke);let be=V.values;V.values=Ro(be)&&!Ro(be[0])?Bt(be):ge?Ro(be)?qf(N,Vf(be,B)):If(be)?Kk(N,be):be||K:be||sS,V.filter=Bt(V.filter||(oe.distr>=3&&oe.log==10?hS:oe.distr==3&&oe.log==2?dS:Af)),V.font=$m(V.font),V.labelFont=$m(V.labelFont),V._size=V.size(r,null,X,0),V._space=V._rotate=V._incrs=V._found=V._splits=V._values=null,V._size>0&&(Fi[X]=!0,V._el=di(YC,u))}}function zt(V,X,ie,oe){let[ge,be,Me,Fe]=ie,We=X%2,Ve=0;return We==0&&(Fe||be)&&(Ve=X==0&&!ge||X==2&&!Me?nr(em.size/3):0),We==1&&(ge||Me)&&(Ve=X==1&&!be||X==3&&!Fe?nr(im.size/2):0),Ve}const ra=r.padding=(n.padding||[zt,zt,zt,zt]).map(V=>Bt(Gt(V,zt))),kr=r._padding=ra.map((V,X)=>V(r,X,Fi,0));let jn,gn=null,Rn=null;const gi=v==1?b[0].idxs:null;let Sr=null,fi=!1;function Oo(V,X){if(t=V??[],r.data=r._data=t,v==2){jn=0;for(let ie=1;ie<b.length;ie++)jn+=t[ie][0].length}else{t.length==0&&(r.data=r._data=t=[[]]),Sr=t[0],jn=Sr.length;let ie=t;if(P==2){ie=t.slice();let oe=ie[0]=Array(jn);for(let ge=0;ge<jn;ge++)oe[ge]=ge}r._data=t=ie}if(Wi(!0),et("setData"),P==2&&(zr=!0),X!==!1){let ie=H;ie.auto(r,fi)?vs():Xn(C,ie.min,ie.max),Li=Li||ne.left>=0,pr=!0,Zi()}}r.setData=Oo;function vs(){fi=!0;let V,X;v==1&&(jn>0?(gn=gi[0]=0,Rn=gi[1]=jn-1,V=t[0][gn],X=t[0][Rn],P==2?(V=gn,X=Rn):V==X&&(P==3?[V,X]=Rl(V,V,H.log,!1):P==4?[V,X]=Iu(V,V,H.log,!1):H.time?X=V+nr(86400/w):[V,X]=Ll(V,X,Ru,!0))):(gn=gi[0]=V=null,Rn=gi[1]=X=null)),Xn(C,V,X)}let Yi,jr,ao,No,Hr,Do,ys,ws,Fo,rr;function bs(V,X,ie,oe,ge,be){V??(V=rf),ie??(ie=Du),oe??(oe="butt"),ge??(ge=rf),be??(be="round"),V!=Yi&&(a.strokeStyle=Yi=V),ge!=jr&&(a.fillStyle=jr=ge),X!=ao&&(a.lineWidth=ao=X),be!=Hr&&(a.lineJoin=Hr=be),oe!=Do&&(a.lineCap=Do=oe),ie!=No&&a.setLineDash(No=ie)}function lo(V,X,ie,oe){X!=jr&&(a.fillStyle=jr=X),V!=ys&&(a.font=ys=V),ie!=ws&&(a.textAlign=ws=ie),oe!=Fo&&(a.textBaseline=Fo=oe)}function Po(V,X,ie,oe,ge=0){if(oe.length>0&&V.auto(r,fi)&&(X==null||X.min==null)){let be=Gt(gn,0),Me=Gt(Rn,oe.length-1),Fe=ie.min==null?hk(oe,be,Me,ge,V.distr==3):[ie.min,ie.max];V.min=Ii(V.min,ie.min=Fe[0]),V.max=Mr(V.max,ie.max=Fe[1])}}const Wo={min:null,max:null};function Xi(){for(let oe in T){let ge=T[oe];A[oe]==null&&(ge.min==null||A[C]!=null&&ge.auto(r,fi))&&(A[oe]=Wo)}for(let oe in T){let ge=T[oe];A[oe]==null&&ge.from!=null&&A[ge.from]!=null&&(A[oe]=Wo)}A[C]!=null&&Wi(!0);let V={};for(let oe in A){let ge=A[oe];if(ge!=null){let be=V[oe]=Ks(T[oe],bk);if(ge.min!=null)Kn(be,ge);else if(oe!=C||v==2)if(jn==0&&be.from==null){let Me=be.range(r,null,null,oe);be.min=Me[0],be.max=Me[1]}else be.min=cn,be.max=-cn}}if(jn>0){b.forEach((oe,ge)=>{if(v==1){let be=oe.scale,Me=A[be];if(Me==null)return;let Fe=V[be];if(ge==0){let We=Fe.range(r,Fe.min,Fe.max,be);Fe.min=We[0],Fe.max=We[1],gn=Ei(Fe.min,t[0]),Rn=Ei(Fe.max,t[0]),Rn-gn>1&&(t[0][gn]<Fe.min&&gn++,t[0][Rn]>Fe.max&&Rn--),oe.min=Sr[gn],oe.max=Sr[Rn]}else oe.show&&oe.auto&&Po(Fe,Me,oe,t[ge],oe.sorted);oe.idxs[0]=gn,oe.idxs[1]=Rn}else if(ge>0&&oe.show&&oe.auto){let[be,Me]=oe.facets,Fe=be.scale,We=Me.scale,[Ve,Xe]=t[ge],Ze=V[Fe],bt=V[We];Ze!=null&&Po(Ze,A[Fe],be,Ve,be.sorted),bt!=null&&Po(bt,A[We],Me,Xe,Me.sorted),oe.min=Me.min,oe.max=Me.max}});for(let oe in V){let ge=V[oe],be=A[oe];if(ge.from==null&&(be==null||be.min==null)){let Me=ge.range(r,ge.min==cn?null:ge.min,ge.max==-cn?null:ge.max,oe);ge.min=Me[0],ge.max=Me[1]}}}for(let oe in V){let ge=V[oe];if(ge.from!=null){let be=V[ge.from];if(be.min==null)ge.min=ge.max=null;else{let Me=ge.range(r,be.min,be.max,oe);ge.min=Me[0],ge.max=Me[1]}}}let X={},ie=!1;for(let oe in V){let ge=V[oe],be=T[oe];if(be.min!=ge.min||be.max!=ge.max){be.min=ge.min,be.max=ge.max;let Me=be.distr;be._min=Me==3?ro(be.min):Me==4?Ou(be.min,be.asinh):Me==100?be.fwd(be.min):be.min,be._max=Me==3?ro(be.max):Me==4?Ou(be.max,be.asinh):Me==100?be.fwd(be.max):be.max,X[oe]=ie=!0}}if(ie){b.forEach((oe,ge)=>{v==2?ge>0&&X.y&&(oe._paths=null):X[oe.scale]&&(oe._paths=null)});for(let oe in X)zr=!0,et("setScale",oe);ue&&ne.left>=0&&(Li=pr=!0)}for(let oe in A)A[oe]=null}function xs(V){let X=Nu(gn-1,0,jn-1),ie=Nu(Rn+1,0,jn-1);for(;V[X]==null&&X>0;)X--;for(;V[ie]==null&&ie<jn-1;)ie++;return[X,ie]}function ia(){if(jn>0){let V=b.some(X=>X._focus)&&rr!=xr.alpha;V&&(a.globalAlpha=rr=xr.alpha),b.forEach((X,ie)=>{if(ie>0&&X.show&&(Bo(ie,!1),Bo(ie,!0),X._paths==null)){let oe=rr;rr!=X.alpha&&(a.globalAlpha=rr=X.alpha);let ge=v==2?[0,t[ie][0].length-1]:xs(t[ie]);X._paths=X.paths(r,ie,ge[0],ge[1]),rr!=oe&&(a.globalAlpha=rr=oe)}}),b.forEach((X,ie)=>{if(ie>0&&X.show){let oe=rr;rr!=X.alpha&&(a.globalAlpha=rr=X.alpha),X._paths!=null&&zo(ie,!1);{let ge=X._paths!=null?X._paths.gaps:null,be=X.points.show(r,ie,gn,Rn,ge),Me=X.points.filter(r,ie,be,ge);(be||Me)&&(X.points._paths=X.points.paths(r,ie,gn,Rn,Me),zo(ie,!0))}rr!=oe&&(a.globalAlpha=rr=oe),et("drawSeries",ie)}}),V&&(a.globalAlpha=rr=1)}}function Bo(V,X){let ie=X?b[V].points:b[V];ie._stroke=ie.stroke(r,V),ie._fill=ie.fill(r,V)}function zo(V,X){let ie=X?b[V].points:b[V],{stroke:oe,fill:ge,clip:be,flags:Me,_stroke:Fe=ie._stroke,_fill:We=ie._fill,_width:Ve=ie.width}=ie._paths;Ve=un(Ve*Xt,3);let Xe=null,Ze=Ve%2/2;X&&We==null&&(We=Ve>0?"#fff":Fe);let bt=ie.pxAlign==1&&Ze>0;if(bt&&a.translate(Ze,Ze),!X){let Pt=Rt-Ve/2,St=Et-Ve/2,Dt=ct+Ve,pt=yt+Ve;Xe=new Path2D,Xe.rect(Pt,St,Dt,pt)}X?co(Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,be):Cs(V,Fe,Ve,ie.dash,ie.cap,We,oe,ge,Me,Xe,be),bt&&a.translate(-Ze,-Ze)}function Cs(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe){let Ze=!1;We!=0&&S.forEach((bt,Pt)=>{if(bt.series[0]==V){let St=b[bt.series[1]],Dt=t[bt.series[1]],pt=(St._paths||Ra).band;Ro(pt)&&(pt=bt.dir==1?pt[0]:pt[1]);let rt,hn=null;St.show&&pt&&pk(Dt,gn,Rn)?(hn=bt.fill(r,Pt)||be,rt=St._paths.clip):pt=null,co(X,ie,oe,ge,hn,Me,Fe,We,Ve,Xe,rt,pt),Ze=!0}}),Ze||co(X,ie,oe,ge,be,Me,Fe,We,Ve,Xe)}const jo=Ys|qu;function co(V,X,ie,oe,ge,be,Me,Fe,We,Ve,Xe,Ze){bs(V,X,ie,oe,ge),(We||Ve||Ze)&&(a.save(),We&&a.clip(We),Ve&&a.clip(Ve)),Ze?(Fe&jo)==jo?(a.clip(Ze),Xe&&a.clip(Xe),ir(ge,Me),mi(V,be,X)):Fe&qu?(ir(ge,Me),a.clip(Ze),mi(V,be,X)):Fe&Ys&&(a.save(),a.clip(Ze),Xe&&a.clip(Xe),ir(ge,Me),a.restore(),mi(V,be,X)):(ir(ge,Me),mi(V,be,X)),(We||Ve||Ze)&&a.restore()}function mi(V,X,ie){ie>0&&(X instanceof Map?X.forEach((oe,ge)=>{a.strokeStyle=Yi=ge,a.stroke(oe)}):X!=null&&V&&a.stroke(X))}function ir(V,X){X instanceof Map?X.forEach((ie,oe)=>{a.fillStyle=jr=oe,a.fill(ie)}):X!=null&&V&&a.fill(X)}function Qi(V,X,ie,oe){let ge=I[V],be;if(oe<=0)be=[0,0];else{let Me=ge._space=ge.space(r,V,X,ie,oe),Fe=ge._incrs=ge.incrs(r,V,X,ie,oe,Me);be=OS(X,ie,Fe,oe,Me)}return ge._found=be}function Pi(V,X,ie,oe,ge,be,Me,Fe,We,Ve){let Xe=Me%2/2;c==1&&a.translate(Xe,Xe),bs(Fe,Me,We,Ve,Fe),a.beginPath();let Ze,bt,Pt,St,Dt=ge+(oe==0||oe==3?-be:be);ie==0?(bt=ge,St=Dt):(Ze=ge,Pt=Dt);for(let pt=0;pt<V.length;pt++)X[pt]!=null&&(ie==0?Ze=Pt=V[pt]:bt=St=V[pt],a.moveTo(Ze,bt),a.lineTo(Pt,St));a.stroke(),c==1&&a.translate(-Xe,-Xe)}function oa(V){let X=!0;return I.forEach((ie,oe)=>{if(!ie.show)return;let ge=T[ie.scale];if(ge.min==null){ie._show&&(X=!1,ie._show=!1,Wi(!1));return}else ie._show||(X=!1,ie._show=!0,Wi(!1));let be=ie.side,Me=be%2,{min:Fe,max:We}=ge,[Ve,Xe]=Qi(oe,Fe,We,Me==0?vt:He);if(Xe==0)return;let Ze=ge.distr==2,bt=ie._splits=ie.splits(r,oe,Fe,We,Ve,Xe,Ze),Pt=ge.distr==2?bt.map(rt=>Sr[rt]):bt,St=ge.distr==2?Sr[bt[1]]-Sr[bt[0]]:Ve,Dt=ie._values=ie.values(r,ie.filter(r,Pt,oe,Xe,St),oe,Xe,St);ie._rotate=be==2?ie.rotate(r,Dt,oe,Xe):0;let pt=ie._size;ie._size=pi(ie.size(r,Dt,oe,V)),pt!=null&&ie._size!=pt&&(X=!1)}),X}function Va(V){let X=!0;return ra.forEach((ie,oe)=>{let ge=ie(r,oe,Fi,V);ge!=kr[oe]&&(X=!1),kr[oe]=ge}),X}function uo(){for(let V=0;V<I.length;V++){let X=I[V];if(!X.show||!X._show)continue;let ie=X.side,oe=ie%2,ge,be,Me=X.stroke(r,V),Fe=ie==0||ie==3?-1:1,[We,Ve]=X._found;if(X.label!=null){let an=X.labelGap*Fe,ur=nr((X._lpos+an)*Xt);lo(X.labelFont[0],Me,"center",ie==2?Ma:nf),a.save(),oe==1?(ge=be=0,a.translate(ur,nr(Et+yt/2)),a.rotate((ie==3?-Ol:Ol)/2)):(ge=nr(Rt+ct/2),be=ur);let mo=kf(X.label)?X.label(r,V,We,Ve):X.label;a.fillText(mo,ge,be),a.restore()}if(Ve==0)continue;let Xe=T[X.scale],Ze=oe==0?ct:yt,bt=oe==0?Rt:Et,Pt=X._splits,St=Xe.distr==2?Pt.map(an=>Sr[an]):Pt,Dt=Xe.distr==2?Sr[Pt[1]]-Sr[Pt[0]]:We,pt=X.ticks,rt=X.border,hn=pt.show?pt.size:0,kn=nr(hn*Xt),Zn=nr((X.alignTo==2?X._size-hn-X.gap:X.gap)*Xt),Ut=X._rotate*-Ol/180,pe=d(X._pos*Xt),Se=(kn+Zn)*Fe,xe=pe+Se;be=oe==0?xe:0,ge=oe==1?xe:0;let je=X.font[0],lt=X.align==1?js:X.align==2?xu:Ut>0?js:Ut<0?xu:oe==0?"center":ie==3?xu:js,Mt=Ut||oe==1?"middle":ie==2?Ma:nf;lo(je,Me,lt,Mt);let Kt=X.font[1]*X.lineGap,Lt=Pt.map(an=>d(x(an,Xe,Ze,bt))),Lr=X._values;for(let an=0;an<Lr.length;an++){let ur=Lr[an];if(ur!=null){oe==0?ge=Lt[an]:be=Lt[an],ur=""+ur;let mo=ur.indexOf(`
1489
+ `)==-1?[ur]:ur.split(/\n/gm);for(let Dn=0;Dn<mo.length;Dn++){let Ss=mo[Dn];Ut?(a.save(),a.translate(ge,be+Dn*Kt),a.rotate(Ut),a.fillText(Ss,0,0),a.restore()):a.fillText(Ss,ge,be+Dn*Kt)}}}pt.show&&Pi(Lt,pt.filter(r,St,V,Ve,Dt),oe,ie,pe,kn,un(pt.width*Xt,3),pt.stroke(r,V),pt.dash,pt.cap);let xi=X.grid;xi.show&&Pi(Lt,xi.filter(r,St,V,Ve,Dt),oe,oe==0?2:1,oe==0?Et:Rt,oe==0?yt:ct,un(xi.width*Xt,3),xi.stroke(r,V),xi.dash,xi.cap),rt.show&&Pi([pe],[1],oe==0?1:0,oe==0?1:2,oe==1?Et:Rt,oe==1?yt:ct,un(rt.width*Xt,3),rt.stroke(r,V),rt.dash,rt.cap)}et("drawAxes")}function Wi(V){b.forEach((X,ie)=>{ie>0&&(X._paths=null,V&&(v==1?(X.min=null,X.max=null):X.facets.forEach(oe=>{oe.min=null,oe.max=null})))})}let ho=!1,Ho=!1,po=[];function sa(){Ho=!1;for(let V=0;V<po.length;V++)et(...po[V]);po.length=0}function Zi(){ho||($k(aa),ho=!0)}function Pe(V,X=!1){ho=!0,Ho=X,V(r),aa(),X&&po.length>0&&queueMicrotask(sa)}r.batch=Pe;function aa(){if(bn&&(Xi(),bn=!1),zr&&(Zr(),zr=!1),br){if(vn(l,js,ke),vn(l,Ma,ze),vn(l,$a,vt),vn(l,Ta,He),vn(o,js,ke),vn(o,Ma,ze),vn(o,$a,vt),vn(o,Ta,He),vn(u,$a,In),vn(u,Ta,Yn),s.width=nr(In*Xt),s.height=nr(Yn*Xt),I.forEach(({_el:V,_show:X,_size:ie,_pos:oe,side:ge})=>{if(V!=null)if(X){let be=ge===3||ge===0?ie:0,Me=ge%2==1;vn(V,Me?"left":"top",oe-be),vn(V,Me?"width":"height",ie),vn(V,Me?"top":"left",Me?ze:ke),vn(V,Me?"height":"width",Me?He:vt),Tu(V,ss)}else Yr(V,ss)}),Yi=jr=ao=Hr=Do=ys=ws=Fo=No=null,rr=1,W(!0),ke!=Ye||ze!=dt||vt!=Ct||He!=xt){Wi(!1);let V=vt/Ct,X=He/xt;if(ue&&!Li&&ne.left>=0){ne.left*=V,ne.top*=X,ei&&Ui(ei,nr(ne.left),0,vt,He),Hn&&Ui(Hn,0,nr(ne.top),vt,He);for(let ie=0;ie<Cr.length;ie++){let oe=Cr[ie];oe!=null&&(Gi[ie]*=V,Di[ie]*=X,Ui(oe,pi(Gi[ie]),pi(Di[ie]),vt,He))}}if(wt.show&&!oo&&wt.left>=0&&wt.width>0){wt.left*=V,wt.width*=V,wt.top*=X,wt.height*=X;for(let ie in Y)vn(Ir,ie,wt[ie])}Ye=ke,dt=ze,Ct=vt,xt=He}et("setSize"),br=!1}In>0&&Yn>0&&(a.clearRect(0,0,s.width,s.height),et("drawClear"),L.forEach(V=>V()),et("draw")),wt.show&&oo&&(sn(wt),oo=!1),ue&&Li&&(k(null,!0,!1),Li=!1),he.show&&he.live&&pr&&(m(),pr=!1),h||(h=!0,r.status=1,et("ready")),fi=!1,ho=!1}r.redraw=(V,X)=>{zr=X||!1,V!==!1?Xn(C,H.min,H.max):Zi()};function Ne(V,X){let ie=T[V];if(ie.from==null){if(jn==0){let oe=ie.range(r,X.min,X.max,V);X.min=oe[0],X.max=oe[1]}if(X.min>X.max){let oe=X.min;X.min=X.max,X.max=oe}if(jn>1&&X.min!=null&&X.max!=null&&X.max-X.min<1e-16)return;V==C&&ie.distr==2&&jn>0&&(X.min=Ei(X.min,t[0]),X.max=Ei(X.max,t[0]),X.min==X.max&&X.max++),A[V]=X,bn=!0,Zi()}}r.setScale=Ne;let _n,go,ei,Hn,la,fo,vi,Ji,Jt,Yt,en,jt,yi=!1;const Ln=ne.drag;let Be=Ln.x,fn=Ln.y;ue&&(ne.x&&(_n=di(QC,o)),ne.y&&(go=di(ZC,o)),H.ori==0?(ei=_n,Hn=go):(ei=go,Hn=_n),en=ne.left,jt=ne.top);const wt=r.select=Kn({show:!0,over:!0,left:0,width:0,top:0,height:0},n.select),Ir=wt.show?di(XC,wt.over?o:l):null;function sn(V,X){if(wt.show){for(let ie in V)wt[ie]=V[ie],ie in Y&&vn(Ir,ie,V[ie]);X!==!1&&et("setSelect")}}r.setSelect=sn;function yn(V){if(b[V].show)ae&&Tu(Ee[V],ss);else if(ae&&Yr(Ee[V],ss),ue){let X=An?Cr[0]:Cr[V];X!=null&&Ui(X,-10,-10,vt,He)}}function Xn(V,X,ie){Ne(V,{min:X,max:ie})}function Rr(V,X,ie,oe){X.focus!=null&&ar(V),X.show!=null&&b.forEach((ge,be)=>{be>0&&(V==be||V==null)&&(ge.show=X.show,yn(be),v==2?(Xn(ge.facets[0].scale,null,null),Xn(ge.facets[1].scale,null,null)):Xn(ge.scale,null,null),Zi())}),ie!==!1&&et("setSeries",V,X),oe&&Tt("setSeries",r,V,X)}r.setSeries=Rr;function wi(V,X){Kn(S[V],X)}function On(V,X){V.fill=Bt(V.fill||null),V.dir=Gt(V.dir,-1),X=X??S.length,S.splice(X,0,V)}function Ur(V){V==null?S.length=0:S.splice(V,1)}r.addBand=On,r.setBand=wi,r.delBand=Ur;function Uo(V,X){b[V].alpha=X,ue&&Cr[V]!=null&&(Cr[V].style.opacity=X),ae&&Ee[V]&&(Ee[V].style.opacity=X)}let Nn,ti,ni;const bi={focus:!0};function ar(V){if(V!=ni){let X=V==null,ie=xr.alpha!=1;b.forEach((oe,ge)=>{if(v==1||ge>0){let be=X||ge==0||ge==V;oe._focus=X?null:be,ie&&Uo(ge,be?1:xr.alpha)}}),ni=V,ie&&Zi()}}ae&&Ni&&pn(af,fe,V=>{ne._lock||(Oi(V),ni!=null&&Rr(null,bi,!0,at.setSeries))});function lr(V,X,ie){let oe=T[X];ie&&(V=V/Xt-(oe.ori==1?ze:ke));let ge=vt;oe.ori==1&&(ge=He,V=ge-V),oe.dir==-1&&(V=ge-V);let be=oe._min,Me=oe._max,Fe=V/ge,We=be+(Me-be)*Fe,Ve=oe.distr;return Ve==3?Vs(10,We):Ve==4?fk(We,oe.asinh):Ve==100?oe.bwd(We):We}function gr(V,X){let ie=lr(V,C,X);return Ei(ie,t[0],gn,Rn)}r.valToIdx=V=>Ei(V,t[0]),r.posToIdx=gr,r.posToVal=lr,r.valToPos=(V,X,ie)=>T[X].ori==0?f(V,T[X],ie?ct:vt,ie?Rt:0):y(V,T[X],ie?yt:He,ie?Et:0),r.setCursor=(V,X,ie)=>{en=V.left,jt=V.top,k(null,X,ie)};function ks(V,X){vn(Ir,js,wt.left=V),vn(Ir,$a,wt.width=X)}function fr(V,X){vn(Ir,Ma,wt.top=V),vn(Ir,Ta,wt.height=X)}let Ar=H.ori==0?ks:fr,ri=H.ori==1?ks:fr;function ii(){if(ae&&he.live)for(let V=v==2?1:0;V<b.length;V++){if(V==0&&ut)continue;let X=he.values[V],ie=0;for(let oe in X)Ge[V][ie++].firstChild.nodeValue=X[oe]}}function m(V,X){if(V!=null&&(V.idxs?V.idxs.forEach((ie,oe)=>{te[oe]=ie}):wk(V.idx)||te.fill(V.idx),he.idx=te[0]),ae&&he.live){for(let ie=0;ie<b.length;ie++)(ie>0||v==1&&!ut)&&$(ie,te[ie]);ii()}pr=!1,X!==!1&&et("setLegend")}r.setLegend=m;function $(V,X){let ie=b[V],oe=V==0&&P==2?Sr:t[V],ge;ut?ge=ie.values(r,V,X)??tt:(ge=ie.value(r,X==null?null:oe[X],V,X),ge=ge==null?tt:{_:ge}),he.values[V]=ge}function k(V,X,ie){Jt=en,Yt=jt,[en,jt]=ne.move(r,en,jt),ne.left=en,ne.top=jt,ue&&(ei&&Ui(ei,nr(en),0,vt,He),Hn&&Ui(Hn,0,nr(jt),vt,He));let oe,ge=gn>Rn;Nn=cn,ti=null;let be=H.ori==0?vt:He,Me=H.ori==1?vt:He;if(en<0||jn==0||ge){oe=ne.idx=null;for(let Fe=0;Fe<b.length;Fe++){let We=Cr[Fe];We!=null&&Ui(We,-10,-10,vt,He)}Ni&&Rr(null,bi,!0,V==null&&at.setSeries),he.live&&(te.fill(oe),pr=!0)}else{let Fe,We,Ve;v==1&&(Fe=H.ori==0?en:jt,We=lr(Fe,C),oe=ne.idx=Ei(We,t[0],gn,Rn),Ve=O(t[0][oe],H,be,0));let Xe=-10,Ze=-10,bt=0,Pt=0,St=!0,Dt="",pt="";for(let rt=v==2?1:0;rt<b.length;rt++){let hn=b[rt],kn=te[rt],Zn=kn==null?null:v==1?t[rt][kn]:t[rt][1][kn],Ut=ne.dataIdx(r,rt,oe,We),pe=Ut==null?null:v==1?t[rt][Ut]:t[rt][1][Ut];if(pr=pr||pe!=Zn||Ut!=kn,te[rt]=Ut,rt>0&&hn.show){let Se=Ut==null?-10:Ut==oe?Ve:O(v==1?t[0][Ut]:t[rt][0][Ut],H,be,0),xe=pe==null?-10:_(pe,v==1?T[hn.scale]:T[hn.facets[1].scale],Me,0);if(Ni&&pe!=null){let je=H.ori==1?en:jt,lt=tr(xr.dist(r,rt,Ut,xe,je));if(lt<Nn){let Mt=xr.bias;if(Mt!=0){let Kt=lr(je,hn.scale),Lt=pe>=0?1:-1,Lr=Kt>=0?1:-1;Lr==Lt&&(Lr==1?Mt==1?pe>=Kt:pe<=Kt:Mt==1?pe<=Kt:pe>=Kt)&&(Nn=lt,ti=rt)}else Nn=lt,ti=rt}}if(pr||An){let je,lt;H.ori==0?(je=Se,lt=xe):(je=xe,lt=Se);let Mt,Kt,Lt,Lr,xi,an,ur=!0,mo=zn.bbox;if(mo!=null){ur=!1;let Dn=mo(r,rt);Lt=Dn.left,Lr=Dn.top,Mt=Dn.width,Kt=Dn.height}else Lt=je,Lr=lt,Mt=Kt=zn.size(r,rt);if(an=zn.fill(r,rt),xi=zn.stroke(r,rt),An)rt==ti&&Nn<=xr.prox&&(Xe=Lt,Ze=Lr,bt=Mt,Pt=Kt,St=ur,Dt=an,pt=xi);else{let Dn=Cr[rt];Dn!=null&&(Gi[rt]=Lt,Di[rt]=Lr,gf(Dn,Mt,Kt,ur),df(Dn,an,xi),Ui(Dn,pi(Lt),pi(Lr),vt,He))}}}}if(An){let rt=xr.prox,hn=ni==null?Nn<=rt:Nn>rt||ti!=ni;if(pr||hn){let kn=Cr[0];kn!=null&&(Gi[0]=Xe,Di[0]=Ze,gf(kn,bt,Pt,St),df(kn,Dt,pt),Ui(kn,pi(Xe),pi(Ze),vt,He))}}}if(wt.show&&yi)if(V!=null){let[Fe,We]=at.scales,[Ve,Xe]=at.match,[Ze,bt]=V.cursor.sync.scales,Pt=V.cursor.drag;if(Be=Pt._x,fn=Pt._y,Be||fn){let{left:St,top:Dt,width:pt,height:rt}=V.select,hn=V.scales[Ze].ori,kn=V.posToVal,Zn,Ut,pe,Se,xe,je=Fe!=null&&Ve(Fe,Ze),lt=We!=null&&Xe(We,bt);je&&Be?(hn==0?(Zn=St,Ut=pt):(Zn=Dt,Ut=rt),pe=T[Fe],Se=O(kn(Zn,Ze),pe,be,0),xe=O(kn(Zn+Ut,Ze),pe,be,0),Ar(Ii(Se,xe),tr(xe-Se))):Ar(0,be),lt&&fn?(hn==1?(Zn=St,Ut=pt):(Zn=Dt,Ut=rt),pe=T[We],Se=_(kn(Zn,bt),pe,Me,0),xe=_(kn(Zn+Ut,bt),pe,Me,0),ri(Ii(Se,xe),tr(xe-Se))):ri(0,Me)}else Q()}else{let Fe=tr(Jt-la),We=tr(Yt-fo);if(H.ori==1){let bt=Fe;Fe=We,We=bt}Be=Ln.x&&Fe>=Ln.dist,fn=Ln.y&&We>=Ln.dist;let Ve=Ln.uni;Ve!=null?Be&&fn&&(Be=Fe>=Ve,fn=We>=Ve,!Be&&!fn&&(We>Fe?fn=!0:Be=!0)):Ln.x&&Ln.y&&(Be||fn)&&(Be=fn=!0);let Xe,Ze;Be&&(H.ori==0?(Xe=vi,Ze=en):(Xe=Ji,Ze=jt),Ar(Ii(Xe,Ze),tr(Ze-Xe)),fn||ri(0,Me)),fn&&(H.ori==1?(Xe=vi,Ze=en):(Xe=Ji,Ze=jt),ri(Ii(Xe,Ze),tr(Ze-Xe)),Be||Ar(0,be)),!Be&&!fn&&(Ar(0,0),ri(0,0))}if(Ln._x=Be,Ln._y=fn,V==null){if(ie){if(xn!=null){let[Fe,We]=at.scales;at.values[0]=Fe!=null?lr(H.ori==0?en:jt,Fe):null,at.values[1]=We!=null?lr(H.ori==1?en:jt,We):null}Tt(ku,r,en,jt,vt,He,oe)}if(Ni){let Fe=ie&&at.setSeries,We=xr.prox;ni==null?Nn<=We&&Rr(ti,bi,!0,Fe):Nn>We?Rr(null,bi,!0,Fe):ti!=ni&&Rr(ti,bi,!0,Fe)}}pr&&(he.idx=oe,m()),X!==!1&&et("setCursor")}let D=null;Object.defineProperty(r,"rect",{get(){return D==null&&W(!1),D}});function W(V=!1){V?D=null:(D=o.getBoundingClientRect(),et("syncRect",D))}function z(V,X,ie,oe,ge,be,Me){ne._lock||yi&&V!=null&&V.movementX==0&&V.movementY==0||(q(V,X,ie,oe,ge,be,Me,!1,V!=null),V!=null?k(null,!0,!0):k(X,!0,!1))}function q(V,X,ie,oe,ge,be,Me,Fe,We){if(D==null&&W(!1),Oi(V),V!=null)ie=V.clientX-D.left,oe=V.clientY-D.top;else{if(ie<0||oe<0){en=-10,jt=-10;return}let[Ve,Xe]=at.scales,Ze=X.cursor.sync,[bt,Pt]=Ze.values,[St,Dt]=Ze.scales,[pt,rt]=at.match,hn=X.axes[0].side%2==1,kn=H.ori==0?vt:He,Zn=H.ori==1?vt:He,Ut=hn?be:ge,pe=hn?ge:be,Se=hn?oe:ie,xe=hn?ie:oe;if(St!=null?ie=pt(Ve,St)?x(bt,T[Ve],kn,0):-10:ie=kn*(Se/Ut),Dt!=null?oe=rt(Xe,Dt)?x(Pt,T[Xe],Zn,0):-10:oe=Zn*(xe/pe),H.ori==1){let je=ie;ie=oe,oe=je}}We&&(X==null||X.cursor.event.type==ku)&&((ie<=1||ie>=vt-1)&&(ie=cs(ie,vt)),(oe<=1||oe>=He-1)&&(oe=cs(oe,He))),Fe?(la=ie,fo=oe,[vi,Ji]=ne.move(r,ie,oe)):(en=ie,jt=oe)}const Y={width:0,height:0,left:0,top:0};function Q(){sn(Y,!1)}let re,se,ye,Ce;function me(V,X,ie,oe,ge,be,Me){yi=!0,Be=fn=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!0,!1),V!=null&&(pn(Su,_u,we,!1),Tt(of,r,vi,Ji,vt,He,null));let{left:Fe,top:We,width:Ve,height:Xe}=wt;re=Fe,se=We,ye=Ve,Ce=Xe}function we(V,X,ie,oe,ge,be,Me){yi=Ln._x=Ln._y=!1,q(V,X,ie,oe,ge,be,Me,!1,!0);let{left:Fe,top:We,width:Ve,height:Xe}=wt,Ze=Ve>0||Xe>0,bt=re!=Fe||se!=We||ye!=Ve||Ce!=Xe;if(Ze&&bt&&sn(wt),Ln.setScale&&Ze&&bt){let Pt=Fe,St=Ve,Dt=We,pt=Xe;if(H.ori==1&&(Pt=We,St=Xe,Dt=Fe,pt=Ve),Be&&Xn(C,lr(Pt,C),lr(Pt+St,C)),fn)for(let rt in T){let hn=T[rt];rt!=C&&hn.from==null&&hn.min!=cn&&Xn(rt,lr(Dt+pt,rt),lr(Dt,rt))}Q()}else ne.lock&&(ne._lock=!ne._lock,k(X,!0,V!=null));V!=null&&(En(Su,_u),Tt(Su,r,en,jt,vt,He,null))}function Oe(V,X,ie,oe,ge,be,Me){if(ne._lock)return;Oi(V);let Fe=yi;if(yi){let We=!0,Ve=!0,Xe=10,Ze,bt;H.ori==0?(Ze=Be,bt=fn):(Ze=fn,bt=Be),Ze&&bt&&(We=en<=Xe||en>=vt-Xe,Ve=jt<=Xe||jt>=He-Xe),Ze&&We&&(en=en<vi?0:vt),bt&&Ve&&(jt=jt<Ji?0:He),k(null,!0,!0),yi=!1}en=-10,jt=-10,te.fill(null),k(null,!0,!0),Fe&&(yi=Fe)}function Le(V,X,ie,oe,ge,be,Me){ne._lock||(Oi(V),vs(),Q(),V!=null&&Tt(lf,r,en,jt,vt,He,null))}function Ue(){I.forEach(NS),so(r.width,r.height,!0)}as(Ml,Us,Ue);const st={};st.mousedown=me,st.mousemove=z,st.mouseup=we,st.dblclick=Le,st.setSeries=(V,X,ie,oe)=>{let ge=at.match[2];ie=ge(r,X,ie),ie!=-1&&Rr(ie,oe,!0,!1)},ue&&(pn(of,o,me),pn(ku,o,z),pn(sf,o,V=>{Oi(V),W(!1)}),pn(af,o,Oe),pn(lf,o,Le),Xu.add(r),r.syncRect=W);const Qe=r.hooks=n.hooks||{};function et(V,X,ie){Ho?po.push([V,X,ie]):V in Qe&&Qe[V].forEach(oe=>{oe.call(null,r,X,ie)})}(n.plugins||[]).forEach(V=>{for(let X in V.hooks)Qe[X]=(Qe[X]||[]).concat(V.hooks[X])});const mn=(V,X,ie)=>ie,at=Kn({key:null,setSeries:!1,filters:{pub:_f,sub:_f},scales:[C,b[1]?b[1].scale:null],match:[$f,$f,mn],values:[null,null]},ne.sync);at.match.length==2&&at.match.push(mn),ne.sync=at;const xn=at.key,kt=hm(xn);function Tt(V,X,ie,oe,ge,be,Me){at.filters.pub(V,X,ie,oe,ge,be,Me)&&kt.pub(V,X,ie,oe,ge,be,Me)}kt.sub(r);function Qn(V,X,ie,oe,ge,be,Me){at.filters.sub(V,X,ie,oe,ge,be,Me)&&st[V](null,X,ie,oe,ge,be,Me)}r.pub=Qn;function cr(){kt.unsub(r),Xu.delete(r),dr.clear(),Eu(Ml,Us,Ue),p.remove(),fe==null||fe.remove(),et("destroy")}r.destroy=cr;function Cn(){et("init",n,t),Oo(t||n.data,!1),A[C]?Ne(C,A[C]):vs(),oo=wt.show&&(wt.width>0||wt.height>0),Li=pr=!0,so(n.width,n.height)}return b.forEach(na),I.forEach(Jr),e?e instanceof HTMLElement?(e.appendChild(p),Cn()):e(r,Cn):Cn(),r}yr.assign=Kn,yr.fmtNum=Lu,yr.rangeNum=Ll,yr.rangeLog=Rl,yr.rangeAsinh=Iu,yr.orient=hs,yr.pxRatio=Xt,yr.join=_k,yr.fmtDate=Fu,yr.tzDate=Fk,yr.sync=hm;{yr.addGap=wS,yr.clipGaps=Bl;let n=yr.paths={points:ym};n.linear=bm,n.stepped=CS,n.bars=kS,n.spline=AS}var Tm,Mm;function DS(){return Mm||(Mm=1,Tm=function(n,t,e,r,v){var f,y;if(r===void 0)r=0;else if(r=r|0,r<0||r>=n.length)throw new RangeError("invalid lower bound");if(v===void 0)v=n.length-1;else if(v=v|0,v<r||v>=n.length)throw new RangeError("invalid upper bound");for(;r<=v;)if(f=r+(v-r>>>1),y=+e(n[f],t,f,n),y<0)r=f+1;else if(y>0)v=f-1;else return f;return~r}),Tm}var FS=DS();const Q2=Tr("a",ll(FS));var Zu,Em;function PS(){if(Em)return Zu;Em=1;function n(t,e,r){var v=-1,f=t.length;e<0&&(e=-e>f?0:f+e),r=r>f?f:r,r<0&&(r+=f),f=e>r?0:r-e>>>0,e>>>=0;for(var y=Array(f);++v<f;)y[v]=t[v+e];return y}return Zu=n,Zu}var Ju,Im;function WS(){if(Im)return Ju;Im=1;var n=PS();function t(e,r,v){var f=e.length;return v=v===void 0?f:v,!r&&v>=f?e:n(e,r,v)}return Ju=t,Ju}var eh,Rm;function Lm(){if(Rm)return eh;Rm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\ufe0e\\ufe0f",y="\\u200d",x=RegExp("["+y+n+v+f+"]");function h(p){return x.test(p)}return eh=h,eh}var th,Om;function BS(){if(Om)return th;Om=1;function n(t){return t.split("")}return th=n,th}var nh,Nm;function zS(){if(Nm)return nh;Nm=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\ufe0e\\ufe0f",y="["+n+"]",x="["+v+"]",h="\\ud83c[\\udffb-\\udfff]",p="(?:"+x+"|"+h+")",s="[^"+n+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",o=p+"?",c="["+f+"]?",d="(?:"+l+"(?:"+[s,a,u].join("|")+")"+c+o+")*",w=c+o+d,b="(?:"+[s+x+"?",x,a,u,y].join("|")+")",I=RegExp(h+"(?="+h+")|"+b+w,"g");function T(S){return S.match(I)||[]}return nh=T,nh}var rh,Dm;function jS(){if(Dm)return rh;Dm=1;var n=BS(),t=Lm(),e=zS();function r(v){return t(v)?e(v):n(v)}return rh=r,rh}var ih,Fm;function HS(){if(Fm)return ih;Fm=1;var n=typeof Eo=="object"&&Eo&&Eo.Object===Object&&Eo;return ih=n,ih}var oh,Pm;function US(){if(Pm)return oh;Pm=1;var n=HS(),t=typeof self=="object"&&self&&self.Object===Object&&self,e=n||t||Function("return this")();return oh=e,oh}var sh,Wm;function ah(){if(Wm)return sh;Wm=1;var n=US(),t=n.Symbol;return sh=t,sh}var lh,Bm;function VS(){if(Bm)return lh;Bm=1;function n(t,e){for(var r=-1,v=t==null?0:t.length,f=Array(v);++r<v;)f[r]=e(t[r],r,t);return f}return lh=n,lh}var ch,zm;function qS(){if(zm)return ch;zm=1;var n=Array.isArray;return ch=n,ch}var uh,jm;function KS(){if(jm)return uh;jm=1;var n=ah(),t=Object.prototype,e=t.hasOwnProperty,r=t.toString,v=n?n.toStringTag:void 0;function f(y){var x=e.call(y,v),h=y[v];try{y[v]=void 0;var p=!0}catch{}var s=r.call(y);return p&&(x?y[v]=h:delete y[v]),s}return uh=f,uh}var hh,Hm;function GS(){if(Hm)return hh;Hm=1;var n=Object.prototype,t=n.toString;function e(r){return t.call(r)}return hh=e,hh}var dh,Um;function YS(){if(Um)return dh;Um=1;var n=ah(),t=KS(),e=GS(),r="[object Null]",v="[object Undefined]",f=n?n.toStringTag:void 0;function y(x){return x==null?x===void 0?v:r:f&&f in Object(x)?t(x):e(x)}return dh=y,dh}var ph,Vm;function XS(){if(Vm)return ph;Vm=1;function n(t){return t!=null&&typeof t=="object"}return ph=n,ph}var gh,qm;function QS(){if(qm)return gh;qm=1;var n=YS(),t=XS(),e="[object Symbol]";function r(v){return typeof v=="symbol"||t(v)&&n(v)==e}return gh=r,gh}var fh,Km;function ZS(){if(Km)return fh;Km=1;var n=ah(),t=VS(),e=qS(),r=QS(),v=n?n.prototype:void 0,f=v?v.toString:void 0;function y(x){if(typeof x=="string")return x;if(e(x))return t(x,y)+"";if(r(x))return f?f.call(x):"";var h=x+"";return h=="0"&&1/x==-1/0?"-0":h}return fh=y,fh}var mh,Gm;function Ul(){if(Gm)return mh;Gm=1;var n=ZS();function t(e){return e==null?"":n(e)}return mh=t,mh}var vh,Ym;function JS(){if(Ym)return vh;Ym=1;var n=WS(),t=Lm(),e=jS(),r=Ul();function v(f){return function(y){y=r(y);var x=t(y)?e(y):void 0,h=x?x[0]:y.charAt(0),p=x?n(x,1).join(""):y.slice(1);return h[f]()+p}}return vh=v,vh}var yh,Xm;function Qm(){if(Xm)return yh;Xm=1;var n=JS(),t=n("toUpperCase");return yh=t,yh}var eA=Qm();const tA=ll(eA);var wh,Zm;function nA(){if(Zm)return wh;Zm=1;var n=Ul(),t=Qm();function e(r){return t(n(r).toLowerCase())}return wh=e,wh}var bh,Jm;function rA(){if(Jm)return bh;Jm=1;function n(t,e,r,v){var f=-1,y=t==null?0:t.length;for(v&&y&&(r=t[++f]);++f<y;)r=e(r,t[f],f,t);return r}return bh=n,bh}var xh,ev;function iA(){if(ev)return xh;ev=1;function n(t){return function(e){return t==null?void 0:t[e]}}return xh=n,xh}var Ch,tv;function oA(){if(tv)return Ch;tv=1;var n=iA(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},e=n(t);return Ch=e,Ch}var kh,nv;function sA(){if(nv)return kh;nv=1;var n=oA(),t=Ul(),e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",v="\\ufe20-\\ufe2f",f="\\u20d0-\\u20ff",y=r+v+f,x="["+y+"]",h=RegExp(x,"g");function p(s){return s=t(s),s&&s.replace(e,n).replace(h,"")}return kh=p,kh}var Sh,rv;function aA(){if(rv)return Sh;rv=1;var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(e){return e.match(n)||[]}return Sh=t,Sh}var Ah,iv;function lA(){if(iv)return Ah;iv=1;var n=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(e){return n.test(e)}return Ah=t,Ah}var _h,ov;function cA(){if(ov)return _h;ov=1;var n="\\ud800-\\udfff",t="\\u0300-\\u036f",e="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",v=t+e+r,f="\\u2700-\\u27bf",y="a-z\\xdf-\\xf6\\xf8-\\xff",x="\\xac\\xb1\\xd7\\xf7",h="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",p="\\u2000-\\u206f",s=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="A-Z\\xc0-\\xd6\\xd8-\\xde",u="\\ufe0e\\ufe0f",l=x+h+p+s,o="['’]",c="["+l+"]",d="["+v+"]",w="\\d+",b="["+f+"]",I="["+y+"]",T="[^"+n+l+w+f+y+a+"]",S="\\ud83c[\\udffb-\\udfff]",C="(?:"+d+"|"+S+")",R="[^"+n+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",F="[\\ud800-\\udbff][\\udc00-\\udfff]",E="["+a+"]",H="\\u200d",P="(?:"+I+"|"+T+")",O="(?:"+E+"|"+T+")",_="(?:"+o+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+o+"(?:D|LL|M|RE|S|T|VE))?",N=C+"?",B="["+u+"]?",U="(?:"+H+"(?:"+[R,L,F].join("|")+")"+B+N+")*",K="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Z="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",te=B+N+U,he="(?:"+[b,L,F].join("|")+")"+te,ne=RegExp([E+"?"+I+"+"+_+"(?="+[c,E,"$"].join("|")+")",O+"+"+A+"(?="+[c,E+P,"$"].join("|")+")",E+"?"+P+"+"+_,E+"+"+A,Z,K,w,he].join("|"),"g");function ae(ue){return ue.match(ne)||[]}return _h=ae,_h}var $h,sv;function uA(){if(sv)return $h;sv=1;var n=aA(),t=lA(),e=Ul(),r=cA();function v(f,y,x){return f=e(f),y=x?void 0:y,y===void 0?t(f)?r(f):n(f):f.match(y)||[]}return $h=v,$h}var Th,av;function hA(){if(av)return Th;av=1;var n=rA(),t=sA(),e=uA(),r="['’]",v=RegExp(r,"g");function f(y){return function(x){return n(e(t(x).replace(v,"")),y,"")}}return Th=f,Th}var Mh,lv;function dA(){if(lv)return Mh;lv=1;var n=nA(),t=hA(),e=t(function(r,v,f){return v=v.toLowerCase(),r+(f?n(v):v)});return Mh=e,Mh}var pA=dA();const gA=ll(pA),fA=Object.assign({"./ArrayWidget.vue":()=>ot(()=>it.import("./ArrayWidget-CC3iwyQc-f16262c5e7548e8079dc.js"),void 0),"./ArrayplotWidget.vue":()=>ot(()=>it.import("./ArrayplotWidget-CiQdsmVy-dc49057dcce57b29bea9.js"),void 0),"./BlockWidget.vue":()=>ot(()=>it.import("./BlockWidget-LLPHBYVU-a5c7122ee80c889512bf.js"),void 0),"./ButtonWidget.vue":()=>ot(()=>it.import("./ButtonWidget-Co0KMkIG-a0a61e9e9dc2b698420d.js"),void 0),"./CanvasWidget.vue":()=>ot(()=>it.import("./CanvasWidget-DPrxnI7M-e5152f13433999756dcb.js"),void 0),"./CanvasdotWidget.vue":()=>ot(()=>it.import("./CanvasdotWidget-s1ALDR4k-e821752c98798c275990.js"),void 0),"./CanvasimageWidget.vue":()=>ot(()=>it.import("./CanvasimageWidget-Cs-KjdqK-1bfcffcb54067427f4c1.js"),void 0),"./CanvasimagevalueWidget.vue":()=>ot(()=>it.import("./CanvasimagevalueWidget-B-wBQisl-ed5a331659ddc6104635.js"),void 0),"./CanvaslabelWidget.vue":()=>ot(()=>it.import("./CanvaslabelWidget-CLBK52pP-3000bb4216f7ca88b20a.js"),void 0),"./CanvaslabelvalueWidget.vue":()=>ot(()=>it.import("./CanvaslabelvalueWidget-CAa70y_o-68ab40d404cf5107adf3.js"),void 0),"./CanvaslineWidget.vue":()=>ot(()=>it.import("./CanvaslineWidget-PdwVJOQ5-68dfe09e7afa882973e9.js"),void 0),"./CanvaslinevalueWidget.vue":()=>ot(()=>it.import("./CanvaslinevalueWidget-CKrp1f3Z-3e697a2a831a7728074d.js"),void 0),"./CheckbuttonWidget.vue":()=>ot(()=>it.import("./CheckbuttonWidget-CTSfH4NN-d475e2fd8a07dd17725b.js"),void 0),"./ComboboxWidget.vue":()=>ot(()=>it.import("./ComboboxWidget-BQzv9zk5-3d913480f3a0b937e507.js"),void 0),"./DateWidget.vue":()=>ot(()=>it.import("./DateWidget-DKXxXT1g-3926c4905e08b54f70c9.js"),void 0),"./DynamicWidget.vue":()=>ot(()=>it.import("./DynamicWidget-CfMtj7H8-18f20f21b99dd35d82a2.js"),void 0),"./FormatvalueWidget.vue":()=>ot(()=>it.import("./FormatvalueWidget-7Yp9jfgX-b1c47b82bc5ec8cbd76c.js"),void 0),"./HorizontalWidget.vue":()=>ot(()=>it.import("./HorizontalWidget-BFzi3rMl-d35706610552e2dd70eb.js"),void 0),"./HorizontalboxWidget.vue":()=>ot(()=>it.import("./HorizontalboxWidget-DIagyace-de14fa53e0414b667c75.js"),void 0),"./HorizontallineWidget.vue":()=>ot(()=>it.import("./HorizontallineWidget-BOZNWM3a-5652d76ab3a626d42f1d.js"),void 0),"./IframeWidget.vue":()=>ot(()=>it.import("./IframeWidget-BU24bhc2-78a2291f883648dbe438.js"),void 0),"./ImageviewerWidget.vue":()=>ot(()=>it.import("./ImageviewerWidget-YMA4CVsl-8a806a62294373ec9a2b.js"),void 0),"./LabelWidget.vue":()=>ot(()=>it.import("./LabelWidget-2402SA18-d420af1f6c8dee6965aa.js"),void 0),"./LabelledWidget.vue":()=>ot(()=>it.import("./LabelledWidget-Cbubzj_g-5bf027f9bc3560842bdd.js"),void 0),"./LabelprogressbarWidget.vue":()=>ot(()=>it.import("./LabelprogressbarWidget-s8V7w6LJ-a52f68dc8cb8cd4cfbbd.js"),void 0),"./LabelsparklineWidget.vue":()=>ot(()=>it.import("./LabelsparklineWidget-qbM_OXLh-2ada012ec5ecf44281ec.js"),void 0),"./LabelvalueWidget.vue":()=>ot(()=>it.import("./LabelvalueWidget-B5Ihc2yP-26cdb559a8c48f3d7a6d.js"),void 0),"./LabelvaluedescWidget.vue":()=>ot(()=>it.import("./LabelvaluedescWidget-Cl3JHPGR-df707668abbea4902d25.js"),void 0),"./LabelvaluelimitsbarWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitsbarWidget-DnpfRyHl-fa696bfa6d9550235c5f.js"),void 0),"./LabelvaluelimitscolumnWidget.vue":()=>ot(()=>it.import("./LabelvaluelimitscolumnWidget-D4L9L5oa-1e5634db083733c1d5fc.js"),void 0),"./LabelvaluerangebarWidget.vue":()=>ot(()=>it.import("./LabelvaluerangebarWidget-BivnHCbE-c17c5c68607aec748611.js"),void 0),"./LedWidget.vue":()=>ot(()=>it.import("./LedWidget-DpdthKEd-b0ddd2a959a62f911d5a.js"),void 0),"./LimitsbarWidget.vue":()=>ot(()=>it.import("./LimitsbarWidget-CLyj3Kb--d16f71139a6916bd24b4.js"),void 0),"./LimitscolorWidget.vue":()=>ot(()=>it.import("./LimitscolorWidget-ChvzYoug-af4898bcb16112d937a8.js"),void 0),"./LimitscolumnWidget.vue":()=>ot(()=>it.import("./LimitscolumnWidget-IOhsLFZ1-3f893e99fbbd70684f0c.js"),void 0),"./LinegraphWidget.vue":()=>ot(()=>it.import("./LinegraphWidget-DZdqMqjw-2e8191246f7f4f59e2f2.js"),void 0),"./MatrixbycolumnsWidget.vue":()=>ot(()=>it.import("./MatrixbycolumnsWidget-BzGYMhJ2-8832a0a18eac73375827.js"),void 0),"./ProgressbarWidget.vue":()=>ot(()=>it.import("./ProgressbarWidget-Bre-0zcS-6ecc1f122c9f55ba1649.js"),void 0),"./RadiobuttonWidget.vue":()=>ot(()=>it.import("./RadiobuttonWidget-CLbfhrkc-e9ef2c017e2a97cc6eb7.js"),void 0),"./RadiogroupWidget.vue":()=>ot(()=>it.import("./RadiogroupWidget-DvRc70_Q-70490ef193b318fe4acc.js"),void 0),"./RangebarWidget.vue":()=>ot(()=>it.import("./RangebarWidget-BvzVWcfZ-457e925240ae2de6f48f.js"),void 0),"./RollupWidget.vue":()=>ot(()=>it.import("./RollupWidget-KT243Ed8-9b03840bdcefcc01881b.js"),void 0),"./ScrollwindowWidget.vue":()=>ot(()=>it.import("./ScrollwindowWidget-DcpdXyrP-b95c2df643d57f810c27.js"),void 0),"./SignalWidget.vue":()=>ot(()=>it.import("./SignalWidget-CoTi0Uzy-f5c9b4c5dde35c672a0e.js"),void 0),"./SpacerWidget.vue":()=>ot(()=>it.import("./SpacerWidget-CTekSgNO-07d0c9bf6f93e7a95f70.js"),void 0),"./SparklineWidget.vue":()=>ot(()=>it.import("./SparklineWidget-BxwPKrIr-805c451d5b923f3d8dc4.js"),void 0),"./TabbookWidget.vue":()=>ot(()=>it.import("./TabbookWidget-B6Nx3Kmt-1a3b33accbb7305b5023.js"),void 0),"./TextboxWidget.vue":()=>ot(()=>it.import("./TextboxWidget-DJgAfLFU-ca2e3c76ae952a6e18f8.js"),void 0),"./TextfieldWidget.vue":()=>ot(()=>it.import("./TextfieldWidget-Bc2xGs8v-b839a49475af566d284f.js"),void 0),"./TimeWidget.vue":()=>ot(()=>it.import("./TimeWidget-DO6ZuMLO-99090e4b504353a585f4.js"),void 0),"./TitleWidget.vue":()=>ot(()=>it.import("./TitleWidget-CkZhMme1-3155acddb2f79847baa5.js"),void 0),"./ValueWidget.vue":()=>ot(()=>it.import("./ValueWidget-tieHz2H1-ef88e49c23cc4305366a.js"),void 0),"./ValuelimitsbarWidget.vue":()=>ot(()=>it.import("./ValuelimitsbarWidget-oFqxZu0t-d432b836497d9d822d71.js"),void 0),"./ValuelimitscolumnWidget.vue":()=>ot(()=>it.import("./ValuelimitscolumnWidget-DYBv8POg-056ee4ed5cbba422c007.js"),void 0),"./ValuerangebarWidget.vue":()=>ot(()=>it.import("./ValuerangebarWidget-m3gFyG4v-4ac37415f7c0fee71e9f.js"),void 0),"./VerticalWidget.vue":()=>ot(()=>it.import("./VerticalWidget-CcdRZmQK-492d71106b93b07c8461.js"),void 0),"./VerticalboxWidget.vue":()=>ot(()=>it.import("./VerticalboxWidget-DfsCYhrX-c75d48d17ee02be1821e.js"),void 0)}),mA=Object.entries(fA).reduce((n,[t,e])=>{t=t.split("/").pop();const r=tA(gA(t.replace(/\.\w+$/,"")));return{...n,[r]:Qd(e)}},{}),Z2=Tr("U",{components:mA});function cv(n,t){return function(){return n.apply(t,arguments)}}const{toString:vA}=Object.prototype,{getPrototypeOf:Eh}=Object,{iterator:Vl,toStringTag:uv}=Symbol,ql=(n=>t=>{const e=vA.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ri=n=>(n=n.toLowerCase(),t=>ql(t)===n),Kl=n=>t=>typeof t===n,{isArray:Zs}=Array,Na=Kl("undefined");function yA(n){return n!==null&&!Na(n)&&n.constructor!==null&&!Na(n.constructor)&&Wr(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const hv=Ri("ArrayBuffer");function wA(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&hv(n.buffer),t}const bA=Kl("string"),Wr=Kl("function"),dv=Kl("number"),Gl=n=>n!==null&&typeof n=="object",xA=n=>n===!0||n===!1,Yl=n=>{if(ql(n)!=="object")return!1;const t=Eh(n);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(uv in n)&&!(Vl in n)},CA=Ri("Date"),kA=Ri("File"),SA=Ri("Blob"),AA=Ri("FileList"),_A=n=>Gl(n)&&Wr(n.pipe),$A=n=>{let t;return n&&(typeof FormData=="function"&&n instanceof FormData||Wr(n.append)&&((t=ql(n))==="formdata"||t==="object"&&Wr(n.toString)&&n.toString()==="[object FormData]"))},TA=Ri("URLSearchParams"),[MA,EA,IA,RA]=["ReadableStream","Request","Response","Headers"].map(Ri),LA=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Da(n,t,{allOwnKeys:e=!1}={}){if(n===null||typeof n>"u")return;let r,v;if(typeof n!="object"&&(n=[n]),Zs(n))for(r=0,v=n.length;r<v;r++)t.call(null,n[r],r,n);else{const f=e?Object.getOwnPropertyNames(n):Object.keys(n),y=f.length;let x;for(r=0;r<y;r++)x=f[r],t.call(null,n[x],x,n)}}function pv(n,t){t=t.toLowerCase();const e=Object.keys(n);let r=e.length,v;for(;r-- >0;)if(v=e[r],t===v.toLowerCase())return v;return null}const ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gv=n=>!Na(n)&&n!==ds;function Ih(){const{caseless:n}=gv(this)&&this||{},t={},e=(r,v)=>{const f=n&&pv(t,v)||v;Yl(t[f])&&Yl(r)?t[f]=Ih(t[f],r):Yl(r)?t[f]=Ih({},r):Zs(r)?t[f]=r.slice():t[f]=r};for(let r=0,v=arguments.length;r<v;r++)arguments[r]&&Da(arguments[r],e);return t}const OA=(n,t,e,{allOwnKeys:r}={})=>(Da(t,(v,f)=>{e&&Wr(v)?n[f]=cv(v,e):n[f]=v},{allOwnKeys:r}),n),NA=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),DA=(n,t,e,r)=>{n.prototype=Object.create(t.prototype,r),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:t.prototype}),e&&Object.assign(n.prototype,e)},FA=(n,t,e,r)=>{let v,f,y;const x={};if(t=t||{},n==null)return t;do{for(v=Object.getOwnPropertyNames(n),f=v.length;f-- >0;)y=v[f],(!r||r(y,n,t))&&!x[y]&&(t[y]=n[y],x[y]=!0);n=e!==!1&&Eh(n)}while(n&&(!e||e(n,t))&&n!==Object.prototype);return t},PA=(n,t,e)=>{n=String(n),(e===void 0||e>n.length)&&(e=n.length),e-=t.length;const r=n.indexOf(t,e);return r!==-1&&r===e},WA=n=>{if(!n)return null;if(Zs(n))return n;let t=n.length;if(!dv(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=n[t];return e},BA=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&Eh(Uint8Array)),zA=(n,t)=>{const e=(n&&n[Vl]).call(n);let r;for(;(r=e.next())&&!r.done;){const v=r.value;t.call(n,v[0],v[1])}},jA=(n,t)=>{let e;const r=[];for(;(e=n.exec(t))!==null;)r.push(e);return r},HA=Ri("HTMLFormElement"),UA=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),fv=(({hasOwnProperty:n})=>(t,e)=>n.call(t,e))(Object.prototype),VA=Ri("RegExp"),mv=(n,t)=>{const e=Object.getOwnPropertyDescriptors(n),r={};Da(e,(v,f)=>{let y;(y=t(v,f,n))!==!1&&(r[f]=y||v)}),Object.defineProperties(n,r)},qA=n=>{mv(n,(t,e)=>{if(Wr(n)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const r=n[e];if(Wr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},KA=(n,t)=>{const e={},r=v=>{v.forEach(f=>{e[f]=!0})};return Zs(n)?r(n):r(String(n).split(t)),e},GA=()=>{},YA=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function XA(n){return!!(n&&Wr(n.append)&&n[uv]==="FormData"&&n[Vl])}const QA=n=>{const t=new Array(10),e=(r,v)=>{if(Gl(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[v]=r;const f=Zs(r)?[]:{};return Da(r,(y,x)=>{const h=e(y,v+1);!Na(h)&&(f[x]=h)}),t[v]=void 0,f}}return r};return e(n,0)},ZA=Ri("AsyncFunction"),JA=n=>n&&(Gl(n)||Wr(n))&&Wr(n.then)&&Wr(n.catch),vv=((n,t)=>n?setImmediate:t?((e,r)=>(ds.addEventListener("message",({source:v,data:f})=>{v===ds&&f===e&&r.length&&r.shift()()},!1),v=>{r.push(v),ds.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",Wr(ds.postMessage)),e_=typeof queueMicrotask<"u"?queueMicrotask.bind(ds):typeof process<"u"&&process.nextTick||vv,t_=n=>n!=null&&Wr(n[Vl]),_e={isArray:Zs,isArrayBuffer:hv,isBuffer:yA,isFormData:$A,isArrayBufferView:wA,isString:bA,isNumber:dv,isBoolean:xA,isObject:Gl,isPlainObject:Yl,isReadableStream:MA,isRequest:EA,isResponse:IA,isHeaders:RA,isUndefined:Na,isDate:CA,isFile:kA,isBlob:SA,isRegExp:VA,isFunction:Wr,isStream:_A,isURLSearchParams:TA,isTypedArray:BA,isFileList:AA,forEach:Da,merge:Ih,extend:OA,trim:LA,stripBOM:NA,inherits:DA,toFlatObject:FA,kindOf:ql,kindOfTest:Ri,endsWith:PA,toArray:WA,forEachEntry:zA,matchAll:jA,isHTMLForm:HA,hasOwnProperty:fv,hasOwnProp:fv,reduceDescriptors:mv,freezeMethods:qA,toObjectSet:KA,toCamelCase:UA,noop:GA,toFiniteNumber:YA,findKey:pv,global:ds,isContextDefined:gv,isSpecCompliantForm:XA,toJSONObject:QA,isAsyncFn:ZA,isThenable:JA,setImmediate:vv,asap:e_,isIterable:t_};function $t(n,t,e,r,v){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),r&&(this.request=r),v&&(this.response=v,this.status=v.status?v.status:null)}_e.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:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const yv=$t.prototype,wv={};["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=>{wv[n]={value:n}}),Object.defineProperties($t,wv),Object.defineProperty(yv,"isAxiosError",{value:!0}),$t.from=(n,t,e,r,v,f)=>{const y=Object.create(yv);return _e.toFlatObject(n,y,function(x){return x!==Error.prototype},x=>x!=="isAxiosError"),$t.call(y,n.message,t,e,r,v),y.cause=n,y.name=n.name,f&&Object.assign(y,f),y};const n_=null;function Rh(n){return _e.isPlainObject(n)||_e.isArray(n)}function bv(n){return _e.endsWith(n,"[]")?n.slice(0,-2):n}function xv(n,t,e){return n?n.concat(t).map(function(r,v){return r=bv(r),!e&&v?"["+r+"]":r}).join(e?".":""):t}function r_(n){return _e.isArray(n)&&!n.some(Rh)}const i_=_e.toFlatObject(_e,{},null,function(n){return/^is[A-Z]/.test(n)});function Xl(n,t,e){if(!_e.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,e=_e.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,o){return!_e.isUndefined(o[l])});const r=e.metaTokens,v=e.visitor||p,f=e.dots,y=e.indexes,x=(e.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(v))throw new TypeError("visitor must be a function");function h(l){if(l===null)return"";if(_e.isDate(l))return l.toISOString();if(!x&&_e.isBlob(l))throw new $t("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(l)||_e.isTypedArray(l)?x&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function p(l,o,c){let d=l;if(l&&!c&&typeof l=="object"){if(_e.endsWith(o,"{}"))o=r?o:o.slice(0,-2),l=JSON.stringify(l);else if(_e.isArray(l)&&r_(l)||(_e.isFileList(l)||_e.endsWith(o,"[]"))&&(d=_e.toArray(l)))return o=bv(o),d.forEach(function(w,b){!(_e.isUndefined(w)||w===null)&&t.append(y===!0?xv([o],b,f):y===null?o:o+"[]",h(w))}),!1}return Rh(l)?!0:(t.append(xv(c,o,f),h(l)),!1)}const s=[],a=Object.assign(i_,{defaultVisitor:p,convertValue:h,isVisitable:Rh});function u(l,o){if(!_e.isUndefined(l)){if(s.indexOf(l)!==-1)throw Error("Circular reference detected in "+o.join("."));s.push(l),_e.forEach(l,function(c,d){(!(_e.isUndefined(c)||c===null)&&v.call(t,c,_e.isString(d)?d.trim():d,o,a))===!0&&u(c,o?o.concat(d):[d])}),s.pop()}}if(!_e.isObject(n))throw new TypeError("data must be an object");return u(n),t}function Cv(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Lh(n,t){this._pairs=[],n&&Xl(n,this,t)}const kv=Lh.prototype;kv.append=function(n,t){this._pairs.push([n,t])},kv.toString=function(n){const t=n?function(e){return n.call(this,e,Cv)}:Cv;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};function o_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sv(n,t,e){if(!t)return n;const r=e&&e.encode||o_;_e.isFunction(e)&&(e={serialize:e});const v=e&&e.serialize;let f;if(v?f=v(t,e):f=_e.isURLSearchParams(t)?t.toString():new Lh(t,e).toString(r),f){const y=n.indexOf("#");y!==-1&&(n=n.slice(0,y)),n+=(n.indexOf("?")===-1?"?":"&")+f}return n}let Av=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(e){e!==null&&t(e)})}};const _v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},s_=typeof URLSearchParams<"u"?URLSearchParams:Lh,a_=typeof FormData<"u"?FormData:null,l_=typeof Blob<"u"?Blob:null,c_={isBrowser:!0,classes:{URLSearchParams:s_,FormData:a_,Blob:l_},protocols:["http","https","file","blob","url","data"]},Oh=typeof window<"u"&&typeof document<"u",Nh=typeof navigator=="object"&&navigator||void 0,u_=Oh&&(!Nh||["ReactNative","NativeScript","NS"].indexOf(Nh.product)<0),h_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",d_=Oh&&window.location.href||"http://localhost",p_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Oh,hasStandardBrowserEnv:u_,hasStandardBrowserWebWorkerEnv:h_,navigator:Nh,origin:d_},Symbol.toStringTag,{value:"Module"})),wr={...p_,...c_};function g_(n,t){return Xl(n,new wr.classes.URLSearchParams,Object.assign({visitor:function(e,r,v,f){return wr.isNode&&_e.isBuffer(e)?(this.append(r,e.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)}},t))}function f_(n){return _e.matchAll(/\w+|\[(\w*)]/g,n).map(t=>t[0]==="[]"?"":t[1]||t[0])}function m_(n){const t={},e=Object.keys(n);let r;const v=e.length;let f;for(r=0;r<v;r++)f=e[r],t[f]=n[f];return t}function $v(n){function t(e,r,v,f){let y=e[f++];if(y==="__proto__")return!0;const x=Number.isFinite(+y),h=f>=e.length;return y=!y&&_e.isArray(v)?v.length:y,h?(_e.hasOwnProp(v,y)?v[y]=[v[y],r]:v[y]=r,!x):((!v[y]||!_e.isObject(v[y]))&&(v[y]=[]),t(e,r,v[y],f)&&_e.isArray(v[y])&&(v[y]=m_(v[y])),!x)}if(_e.isFormData(n)&&_e.isFunction(n.entries)){const e={};return _e.forEachEntry(n,(r,v)=>{t(f_(r),v,e,0)}),e}return null}function v_(n,t,e){if(_e.isString(n))try{return(t||JSON.parse)(n),_e.trim(n)}catch(r){if(r.name!=="SyntaxError")throw r}return(e||JSON.stringify)(n)}const Fa={transitional:_v,adapter:["xhr","http","fetch"],transformRequest:[function(n,t){const e=t.getContentType()||"",r=e.indexOf("application/json")>-1,v=_e.isObject(n);if(v&&_e.isHTMLForm(n)&&(n=new FormData(n)),_e.isFormData(n))return r?JSON.stringify($v(n)):n;if(_e.isArrayBuffer(n)||_e.isBuffer(n)||_e.isStream(n)||_e.isFile(n)||_e.isBlob(n)||_e.isReadableStream(n))return n;if(_e.isArrayBufferView(n))return n.buffer;if(_e.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(v){if(e.indexOf("application/x-www-form-urlencoded")>-1)return g_(n,this.formSerializer).toString();if((f=_e.isFileList(n))||e.indexOf("multipart/form-data")>-1){const y=this.env&&this.env.FormData;return Xl(f?{"files[]":n}:n,y&&new y,this.formSerializer)}}return v||r?(t.setContentType("application/json",!1),v_(n)):n}],transformResponse:[function(n){const t=this.transitional||Fa.transitional,e=t&&t.forcedJSONParsing,r=this.responseType==="json";if(_e.isResponse(n)||_e.isReadableStream(n))return n;if(n&&_e.isString(n)&&(e&&!this.responseType||r)){const v=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(f){if(v)throw f.name==="SyntaxError"?$t.from(f,$t.ERR_BAD_RESPONSE,this,null,this.response):f}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wr.classes.FormData,Blob:wr.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],n=>{Fa.headers[n]={}});const y_=_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"]),w_=n=>{const t={};let e,r,v;return n&&n.split(`
1490
1490
  `).forEach(function(f){v=f.indexOf(":"),e=f.substring(0,v).trim().toLowerCase(),r=f.substring(v+1).trim(),!(!e||t[e]&&y_[e])&&(e==="set-cookie"?t[e]?t[e].push(r):t[e]=[r]:t[e]=t[e]?t[e]+", "+r:r)}),t},Tv=Symbol("internals");function Pa(n){return n&&String(n).trim().toLowerCase()}function Ql(n){return n===!1||n==null?n:_e.isArray(n)?n.map(Ql):String(n)}function b_(n){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=e.exec(n);)t[r[1]]=r[2];return t}const x_=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Dh(n,t,e,r,v){if(_e.isFunction(r))return r.call(this,t,e);if(v&&(t=e),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function C_(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function k_(n,t){const e=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(n,r+e,{value:function(v,f,y){return this[r].call(this,t,v,f,y)},configurable:!0})})}let Br=class{constructor(t){t&&this.set(t)}set(t,e,r){const v=this;function f(x,h,p){const s=Pa(h);if(!s)throw new Error("header name must be a non-empty string");const a=_e.findKey(v,s);(!a||v[a]===void 0||p===!0||p===void 0&&v[a]!==!1)&&(v[a||h]=Ql(x))}const y=(x,h)=>_e.forEach(x,(p,s)=>f(p,s,h));if(_e.isPlainObject(t)||t instanceof this.constructor)y(t,e);else if(_e.isString(t)&&(t=t.trim())&&!x_(t))y(w_(t),e);else if(_e.isObject(t)&&_e.isIterable(t)){let x={},h,p;for(const s of t){if(!_e.isArray(s))throw TypeError("Object iterator must return a key-value pair");x[p=s[0]]=(h=x[p])?_e.isArray(h)?[...h,s[1]]:[h,s[1]]:s[1]}y(x,e)}else t!=null&&f(e,t,r);return this}get(t,e){if(t=Pa(t),t){const r=_e.findKey(this,t);if(r){const v=this[r];if(!e)return v;if(e===!0)return b_(v);if(_e.isFunction(e))return e.call(this,v,r);if(_e.isRegExp(e))return e.exec(v);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Pa(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!e||Dh(this,this[r],r,e)))}return!1}delete(t,e){const r=this;let v=!1;function f(y){if(y=Pa(y),y){const x=_e.findKey(r,y);x&&(!e||Dh(r,r[x],x,e))&&(delete r[x],v=!0)}}return _e.isArray(t)?t.forEach(f):f(t),v}clear(t){const e=Object.keys(this);let r=e.length,v=!1;for(;r--;){const f=e[r];(!t||Dh(this,this[f],f,t,!0))&&(delete this[f],v=!0)}return v}normalize(t){const e=this,r={};return _e.forEach(this,(v,f)=>{const y=_e.findKey(r,f);if(y){e[y]=Ql(v),delete e[f];return}const x=t?C_(f):String(f).trim();x!==f&&delete e[f],e[x]=Ql(v),r[x]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return _e.forEach(this,(r,v)=>{r!=null&&r!==!1&&(e[v]=t&&_e.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
1491
1491
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach(v=>r.set(v)),r}static accessor(t){const e=(this[Tv]=this[Tv]={accessors:{}}).accessors,r=this.prototype;function v(f){const y=Pa(f);e[y]||(k_(r,f),e[y]=!0)}return _e.isArray(t)?t.forEach(v):v(t),this}};Br.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(Br.prototype,({value:n},t)=>{let e=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(r){this[e]=r}}}),_e.freezeMethods(Br);function Fh(n,t){const e=this||Fa,r=t||e,v=Br.from(r.headers);let f=r.data;return _e.forEach(n,function(y){f=y.call(e,f,v.normalize(),t?t.status:void 0)}),v.normalize(),f}function Mv(n){return!!(n&&n.__CANCEL__)}function Js(n,t,e){$t.call(this,n??"canceled",$t.ERR_CANCELED,t,e),this.name="CanceledError"}_e.inherits(Js,$t,{__CANCEL__:!0});function Ev(n,t,e){const r=e.config.validateStatus;!e.status||!r||r(e.status)?n(e):t(new $t("Request failed with status code "+e.status,[$t.ERR_BAD_REQUEST,$t.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function S_(n){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return t&&t[1]||""}function A_(n,t){n=n||10;const e=new Array(n),r=new Array(n);let v=0,f=0,y;return t=t!==void 0?t:1e3,function(x){const h=Date.now(),p=r[f];y||(y=h),e[v]=x,r[v]=h;let s=f,a=0;for(;s!==v;)a+=e[s++],s=s%n;if(v=(v+1)%n,v===f&&(f=(f+1)%n),h-y<t)return;const u=p&&h-p;return u?Math.round(a*1e3/u):void 0}}function __(n,t){let e=0,r=1e3/t,v,f;const y=(x,h=Date.now())=>{e=h,v=null,f&&(clearTimeout(f),f=null),n.apply(null,x)};return[(...x)=>{const h=Date.now(),p=h-e;p>=r?y(x,h):(v=x,f||(f=setTimeout(()=>{f=null,y(v)},r-p)))},()=>v&&y(v)]}const Zl=(n,t,e=3)=>{let r=0;const v=A_(50,250);return __(f=>{const y=f.loaded,x=f.lengthComputable?f.total:void 0,h=y-r,p=v(h),s=y<=x;r=y;const a={loaded:y,total:x,progress:x?y/x:void 0,bytes:h,rate:p||void 0,estimated:p&&x&&s?(x-y)/p:void 0,event:f,lengthComputable:x!=null,[t?"download":"upload"]:!0};n(a)},e)},Iv=(n,t)=>{const e=n!=null;return[r=>t[0]({lengthComputable:e,total:n,loaded:r}),t[1]]},Rv=n=>(...t)=>_e.asap(()=>n(...t)),$_=wr.hasStandardBrowserEnv?((n,t)=>e=>(e=new URL(e,wr.origin),n.protocol===e.protocol&&n.host===e.host&&(t||n.port===e.port)))(new URL(wr.origin),wr.navigator&&/(msie|trident)/i.test(wr.navigator.userAgent)):()=>!0,T_=wr.hasStandardBrowserEnv?{write(n,t,e,r,v,f){const y=[n+"="+encodeURIComponent(t)];_e.isNumber(e)&&y.push("expires="+new Date(e).toGMTString()),_e.isString(r)&&y.push("path="+r),_e.isString(v)&&y.push("domain="+v),f===!0&&y.push("secure"),document.cookie=y.join("; ")},read(n){const t=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function M_(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function E_(n,t){return t?n.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):n}function Lv(n,t,e){let r=!M_(t);return n&&(r||e==!1)?E_(n,t):t}const Ov=n=>n instanceof Br?{...n}:n;function ps(n,t){t=t||{};const e={};function r(p,s,a,u){return _e.isPlainObject(p)&&_e.isPlainObject(s)?_e.merge.call({caseless:u},p,s):_e.isPlainObject(s)?_e.merge({},s):_e.isArray(s)?s.slice():s}function v(p,s,a,u){if(_e.isUndefined(s)){if(!_e.isUndefined(p))return r(void 0,p,a,u)}else return r(p,s,a,u)}function f(p,s){if(!_e.isUndefined(s))return r(void 0,s)}function y(p,s){if(_e.isUndefined(s)){if(!_e.isUndefined(p))return r(void 0,p)}else return r(void 0,s)}function x(p,s,a){if(a in t)return r(p,s);if(a in n)return r(void 0,p)}const h={url:f,method:f,data:f,baseURL:y,transformRequest:y,transformResponse:y,paramsSerializer:y,timeout:y,timeoutMessage:y,withCredentials:y,withXSRFToken:y,adapter:y,responseType:y,xsrfCookieName:y,xsrfHeaderName:y,onUploadProgress:y,onDownloadProgress:y,decompress:y,maxContentLength:y,maxBodyLength:y,beforeRedirect:y,transport:y,httpAgent:y,httpsAgent:y,cancelToken:y,socketPath:y,responseEncoding:y,validateStatus:x,headers:(p,s,a)=>v(Ov(p),Ov(s),a,!0)};return _e.forEach(Object.keys(Object.assign({},n,t)),function(p){const s=h[p]||v,a=s(n[p],t[p],p);_e.isUndefined(a)&&s!==x||(e[p]=a)}),e}const Nv=n=>{const t=ps({},n);let{data:e,withXSRFToken:r,xsrfHeaderName:v,xsrfCookieName:f,headers:y,auth:x}=t;t.headers=y=Br.from(y),t.url=Sv(Lv(t.baseURL,t.url,t.allowAbsoluteUrls),n.params,n.paramsSerializer),x&&y.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let h;if(_e.isFormData(e)){if(wr.hasStandardBrowserEnv||wr.hasStandardBrowserWebWorkerEnv)y.setContentType(void 0);else if((h=y.getContentType())!==!1){const[p,...s]=h?h.split(";").map(a=>a.trim()).filter(Boolean):[];y.setContentType([p||"multipart/form-data",...s].join("; "))}}if(wr.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&$_(t.url))){const p=v&&f&&T_.read(f);p&&y.set(v,p)}return t},I_=typeof XMLHttpRequest<"u",R_=I_&&function(n){return new Promise(function(t,e){const r=Nv(n);let v=r.data;const f=Br.from(r.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:h}=r,p,s,a,u,l;function o(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(p),r.signal&&r.signal.removeEventListener("abort",p)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function d(){if(!c)return;const b=Br.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),I={data:!y||y==="text"||y==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:b,config:n,request:c};Ev(function(T){t(T),o()},function(T){e(T),o()},I),c=null}"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(e(new $t("Request aborted",$t.ECONNABORTED,n,c)),c=null)},c.onerror=function(){e(new $t("Network Error",$t.ERR_NETWORK,n,c)),c=null},c.ontimeout=function(){let b=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const I=r.transitional||_v;r.timeoutErrorMessage&&(b=r.timeoutErrorMessage),e(new $t(b,I.clarifyTimeoutError?$t.ETIMEDOUT:$t.ECONNABORTED,n,c)),c=null},v===void 0&&f.setContentType(null),"setRequestHeader"in c&&_e.forEach(f.toJSON(),function(b,I){c.setRequestHeader(I,b)}),_e.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),y&&y!=="json"&&(c.responseType=r.responseType),h&&([a,l]=Zl(h,!0),c.addEventListener("progress",a)),x&&c.upload&&([s,u]=Zl(x),c.upload.addEventListener("progress",s),c.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(p=b=>{c&&(e(!b||b.type?new Js(null,n,c):b),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(p),r.signal&&(r.signal.aborted?p():r.signal.addEventListener("abort",p)));const w=S_(r.url);if(w&&wr.protocols.indexOf(w)===-1){e(new $t("Unsupported protocol "+w+":",$t.ERR_BAD_REQUEST,n));return}c.send(v||null)})},L_=(n,t)=>{const{length:e}=n=n?n.filter(Boolean):[];if(t||e){let r=new AbortController,v;const f=function(p){if(!v){v=!0,x();const s=p instanceof Error?p:this.reason;r.abort(s instanceof $t?s:new Js(s instanceof Error?s.message:s))}};let y=t&&setTimeout(()=>{y=null,f(new $t(`timeout ${t} of ms exceeded`,$t.ETIMEDOUT))},t);const x=()=>{n&&(y&&clearTimeout(y),y=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(f):p.removeEventListener("abort",f)}),n=null)};n.forEach(p=>p.addEventListener("abort",f));const{signal:h}=r;return h.unsubscribe=()=>_e.asap(x),h}},O_=function*(n,t){let e=n.byteLength;if(e<t){yield n;return}let r=0,v;for(;r<e;)v=r+t,yield n.slice(r,v),r=v},N_=async function*(n,t){for await(const e of D_(n))yield*O_(e,t)},D_=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const t=n.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Dv=(n,t,e,r)=>{const v=N_(n,t);let f=0,y,x=h=>{y||(y=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:p,value:s}=await v.next();if(p){x(),h.close();return}let a=s.byteLength;if(e){let u=f+=a;e(u)}h.enqueue(new Uint8Array(s))}catch(p){throw x(p),p}},cancel(h){return x(h),v.return()}},{highWaterMark:2})},Jl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fv=Jl&&typeof ReadableStream=="function",F_=Jl&&(typeof TextEncoder=="function"?(n=>t=>n.encode(t))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),Pv=(n,...t)=>{try{return!!n(...t)}catch{return!1}},P_=Fv&&Pv(()=>{let n=!1;const t=new Request(wr.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!t}),Wv=64*1024,Ph=Fv&&Pv(()=>_e.isReadableStream(new Response("").body)),ec={stream:Ph&&(n=>n.body)};Jl&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ec[t]&&(ec[t]=_e.isFunction(n[t])?e=>e[t]():(e,r)=>{throw new $t(`Response type '${t}' is not supported`,$t.ERR_NOT_SUPPORT,r)})})})(new Response);const W_=async n=>{if(n==null)return 0;if(_e.isBlob(n))return n.size;if(_e.isSpecCompliantForm(n))return(await new Request(wr.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(n)||_e.isArrayBuffer(n))return n.byteLength;if(_e.isURLSearchParams(n)&&(n=n+""),_e.isString(n))return(await F_(n)).byteLength},B_=async(n,t)=>_e.toFiniteNumber(n.getContentLength())??W_(t),z_=Jl&&(async n=>{let{url:t,method:e,data:r,signal:v,cancelToken:f,timeout:y,onDownloadProgress:x,onUploadProgress:h,responseType:p,headers:s,withCredentials:a="same-origin",fetchOptions:u}=Nv(n);p=p?(p+"").toLowerCase():"text";let l=L_([v,f&&f.toAbortSignal()],y),o;const c=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let d;try{if(h&&P_&&e!=="get"&&e!=="head"&&(d=await B_(s,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=S.headers.get("content-type"))&&s.setContentType(C),S.body){const[R,L]=Iv(d,Zl(Rv(h)));r=Dv(S.body,Wv,R,L)}}_e.isString(a)||(a=a?"include":"omit");const w="credentials"in Request.prototype;o=new Request(t,{...u,signal:l,method:e.toUpperCase(),headers:s.normalize().toJSON(),body:r,duplex:"half",credentials:w?a:void 0});let b=await fetch(o);const I=Ph&&(p==="stream"||p==="response");if(Ph&&(x||I&&c)){const S={};["status","statusText","headers"].forEach(F=>{S[F]=b[F]});const C=_e.toFiniteNumber(b.headers.get("content-length")),[R,L]=x&&Iv(C,Zl(Rv(x),!0))||[];b=new Response(Dv(b.body,Wv,R,()=>{L&&L(),c&&c()}),S)}p=p||"text";let T=await ec[_e.findKey(ec,p)||"text"](b,n);return!I&&c&&c(),await new Promise((S,C)=>{Ev(S,C,{data:T,headers:Br.from(b.headers),status:b.status,statusText:b.statusText,config:n,request:o})})}catch(w){throw c&&c(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new $t("Network Error",$t.ERR_NETWORK,n,o),{cause:w.cause||w}):$t.from(w,w&&w.code,n,o)}}),Wh={http:n_,xhr:R_,fetch:z_};_e.forEach(Wh,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{value:t})}catch{}Object.defineProperty(n,"adapterName",{value:t})}});const Bv=n=>`- ${n}`,j_=n=>_e.isFunction(n)||n===null||n===!1,zv={getAdapter:n=>{n=_e.isArray(n)?n:[n];const{length:t}=n;let e,r;const v={};for(let f=0;f<t;f++){e=n[f];let y;if(r=e,!j_(e)&&(r=Wh[(y=String(e)).toLowerCase()],r===void 0))throw new $t(`Unknown adapter '${y}'`);if(r)break;v[y||"#"+f]=r}if(!r){const f=Object.entries(v).map(([x,h])=>`adapter ${x} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=t?f.length>1?`since :
1492
1492
  `+f.map(Bv).join(`
1493
1493
  `):" "+Bv(f[0]):"as no adapter specified";throw new $t("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return r},adapters:Wh};function Bh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Js(null,n)}function jv(n){return Bh(n),n.headers=Br.from(n.headers),n.data=Fh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),zv.getAdapter(n.adapter||Fa.adapter)(n).then(function(t){return Bh(n),t.data=Fh.call(n,n.transformResponse,t),t.headers=Br.from(t.headers),t},function(t){return Mv(t)||(Bh(n),t&&t.response&&(t.response.data=Fh.call(n,n.transformResponse,t.response),t.response.headers=Br.from(t.response.headers))),Promise.reject(t)})}const Hv="1.9.0",tc={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{tc[n]=function(e){return typeof e===n||"a"+(t<1?"n ":" ")+n}});const Uv={};tc.transitional=function(n,t,e){function r(v,f){return"[Axios v"+Hv+"] Transitional option '"+v+"'"+f+(e?". "+e:"")}return(v,f,y)=>{if(n===!1)throw new $t(r(f," has been removed"+(t?" in "+t:"")),$t.ERR_DEPRECATED);return t&&!Uv[f]&&(Uv[f]=!0,console.warn(r(f," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(v,f,y):!0}},tc.spelling=function(n){return(t,e)=>(console.warn(`${e} is likely a misspelling of ${n}`),!0)};function H_(n,t,e){if(typeof n!="object")throw new $t("options must be an object",$t.ERR_BAD_OPTION_VALUE);const r=Object.keys(n);let v=r.length;for(;v-- >0;){const f=r[v],y=t[f];if(y){const x=n[f],h=x===void 0||y(x,f,n);if(h!==!0)throw new $t("option "+f+" must be "+h,$t.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new $t("Unknown option "+f,$t.ERR_BAD_OPTION)}}const nc={assertOptions:H_,validators:tc},Vi=nc.validators;let gs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Av,response:new Av}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let v={};Error.captureStackTrace?Error.captureStackTrace(v):v=new Error;const f=v.stack?v.stack.replace(/^.+\n/,""):"";try{r.stack?f&&!String(r.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(r.stack+=`
1494
- `+f):r.stack=f}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ps(this.defaults,e);const{transitional:r,paramsSerializer:v,headers:f}=e;r!==void 0&&nc.assertOptions(r,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),v!=null&&(_e.isFunction(v)?e.paramsSerializer={serialize:v}:nc.assertOptions(v,{encode:Vi.function,serialize:Vi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),nc.assertOptions(e,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let y=f&&_e.merge(f.common,f[e.method]);f&&_e.forEach(["delete","get","head","post","put","patch","common"],o=>{delete f[o]}),e.headers=Br.concat(y,f);const x=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(e)===!1||(h=h&&o.synchronous,x.unshift(o.fulfilled,o.rejected))});const p=[];this.interceptors.response.forEach(function(o){p.push(o.fulfilled,o.rejected)});let s,a=0,u;if(!h){const o=[jv.bind(this),void 0];for(o.unshift.apply(o,x),o.push.apply(o,p),u=o.length,s=Promise.resolve(e);a<u;)s=s.then(o[a++],o[a++]);return s}u=x.length;let l=e;for(a=0;a<u;){const o=x[a++],c=x[a++];try{l=o(l)}catch(d){c.call(this,d);break}}try{s=jv.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,u=p.length;a<u;)s=s.then(p[a++],p[a++]);return s}getUri(t){t=ps(this.defaults,t);const e=Lv(t.baseURL,t.url,t.allowAbsoluteUrls);return Sv(e,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){gs.prototype[n]=function(t,e){return this.request(ps(e||{},{method:n,url:t,data:(e||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,f){return this.request(ps(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}gs.prototype[n]=t(),gs.prototype[n+"Form"]=t(!0)});let U_=class mb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](v);r._listeners=null}),this.promise.then=v=>{let f;const y=new Promise(x=>{r.subscribe(x),f=x}).then(v);return y.cancel=function(){r.unsubscribe(f)},y},t(function(v,f,y){r.reason||(r.reason=new Js(v,f,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new mb(function(e){t=e}),cancel:t}}};function V_(n){return function(t){return n.apply(null,t)}}function q_(n){return _e.isObject(n)&&n.isAxiosError===!0}const zh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zh).forEach(([n,t])=>{zh[t]=n});function Vv(n){const t=new gs(n),e=cv(gs.prototype.request,t);return _e.extend(e,gs.prototype,t,{allOwnKeys:!0}),_e.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Vv(ps(n,r))},e}const Kn=Tr("E",Vv(Fa));Kn.Axios=gs,Kn.CanceledError=Js,Kn.CancelToken=U_,Kn.isCancel=Mv,Kn.VERSION=Hv,Kn.toFormData=Xl,Kn.AxiosError=$t,Kn.Cancel=Kn.CanceledError,Kn.all=function(n){return Promise.all(n)},Kn.spread=V_,Kn.isAxiosError=q_,Kn.mergeConfig=ps,Kn.AxiosHeaders=Br,Kn.formToJSON=n=>$v(_e.isHTMLForm(n)?new FormData(n):n),Kn.getAdapter=zv.getAdapter,Kn.HttpStatusCode=zh,Kn.default=Kn;const{Axios:J2,AxiosError:eN,CanceledError:tN,isCancel:nN,CancelToken:rN,VERSION:iN,all:oN,Cancel:sN,isAxiosError:aN,spread:lN,toFormData:cN,AxiosHeaders:uN,HttpStatusCode:hN,formToJSON:dN,getAdapter:pN,mergeConfig:gN}=Kn;function qv(){return Object.assign({},Ds())}function K_(n,t,e){const r=yn(n,void 0);return r.setTime(r.getTime()+t*sl),r}function G_(n,t){const e=()=>Vn(void 0,NaN),r=Z_(n);let v;if(r.date){const h=J_(r.date,2);v=e$(h.restDateString,h.year)}if(!v||isNaN(+v))return e();const f=+v;let y=0,x;if(r.time&&(y=t$(r.time),isNaN(y)))return e();if(r.timezone){if(x=n$(r.timezone),isNaN(x))return e()}else{const h=new Date(f+y),p=yn(0,void 0);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}return yn(f+y+x,void 0)}const rc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Y_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,X_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Q_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Z_(n){const t={},e=n.split(rc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],rc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(rc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const v=rc.timezone.exec(r);v?(t.time=r.replace(v[1],""),t.timezone=v[1]):t.time=r}return t}function J_(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const v=r[1]?parseInt(r[1]):null,f=r[2]?parseInt(r[2]):null;return{year:f===null?v:f*100,restDateString:n.slice((r[1]||r[2]).length)}}function e$(n,t){if(t===null)return new Date(NaN);const e=n.match(Y_);if(!e)return new Date(NaN);const r=!!e[4],v=Wa(e[1]),f=Wa(e[2])-1,y=Wa(e[3]),x=Wa(e[4]),h=Wa(e[5])-1;if(r)return a$(t,x,h)?r$(t,x,h):new Date(NaN);{const p=new Date(0);return!o$(t,f,y)||!s$(t,v)?new Date(NaN):(p.setUTCFullYear(t,f,Math.max(v,y)),p)}}function Wa(n){return n?parseInt(n):1}function t$(n){const t=n.match(X_);if(!t)return NaN;const e=jh(t[1]),r=jh(t[2]),v=jh(t[3]);return l$(e,r,v)?e*Gc+r*sl+v*1e3:NaN}function jh(n){return n&&parseFloat(n.replace(",","."))||0}function n$(n){if(n==="Z")return 0;const t=n.match(Q_);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),v=t[3]&&parseInt(t[3])||0;return c$(r,v)?e*(r*Gc+v*sl):NaN}function r$(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,f=(t-1)*7+e+1-v;return r.setUTCDate(r.getUTCDate()+f),r}const i$=[31,null,31,30,31,30,31,31,30,31,30,31];function Kv(n){return n%400===0||n%4===0&&n%100!==0}function o$(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(i$[t]||(Kv(n)?29:28))}function s$(n,t){return t>=1&&t<=(Kv(n)?366:365)}function a$(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function l$(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function c$(n,t){return t>=0&&t<=59}function u$(n,t,e){return K_(n,-t)}function Gv(n,t,e){const r=qv(),v=p$(n,e.timeZone,e.locale??r.locale);return"formatToParts"in v?h$(v,t):d$(v,t)}function h$(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function d$(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function p$(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function g$(n,t){const e=w$(t);return"formatToParts"in e?m$(e,n):v$(e,n)}const f$={year:0,month:1,day:2,hour:3,minute:4,second:5};function m$(n,t){try{const e=n.formatToParts(t),r=[];for(let v=0;v<e.length;v++){const f=f$[e[v].type];f!==void 0&&(r[f]=parseInt(e[v].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function v$(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Hh={},Yv=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")),y$=Yv==="06/25/2014, 00:00:00"||Yv==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function w$(n){return Hh[n]||(Hh[n]=y$?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"})),Hh[n]}function Xv(n,t,e,r,v,f,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,v,f,y),x}const Qv=36e5,b$=6e4,Uh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Vh(n,t,e){if(!n)return 0;let r=Uh.timezoneZ.exec(n);if(r)return 0;let v,f;if(r=Uh.timezoneHH.exec(n),r)return v=parseInt(r[1],10),Zv(v)?-(v*Qv):NaN;if(r=Uh.timezoneHHMM.exec(n),r){v=parseInt(r[2],10);const y=parseInt(r[3],10);return Zv(v,y)?(f=Math.abs(v)*Qv+y*b$,r[1]==="+"?-f:f):NaN}if(k$(n)){t=new Date(t||Date.now());const y=e?t:x$(t),x=qh(y,n);return-(e?x:C$(t,x,n))}return NaN}function x$(n){return Xv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function qh(n,t){const e=g$(n,t),r=Xv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let v=n.getTime();const f=v%1e3;return v-=f>=0?f:1e3+f,r-v}function C$(n,t,e){let r=n.getTime()-t;const v=qh(new Date(r),e);if(t===v)return t;r-=v-t;const f=qh(new Date(r),e);return v===f?v:Math.max(v,f)}function Zv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Jv={};function k$(n){if(Jv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Jv[n]=!0,!0}catch{return!1}}const S$=60*1e3,A$={X:function(n,t,e){const r=Kh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return ey(r);case"XXXX":case"XX":return ea(r);case"XXXXX":case"XXX":default:return ea(r,":")}},x:function(n,t,e){const r=Kh(e.timeZone,n);switch(t){case"x":return ey(r);case"xxxx":case"xx":return ea(r);case"xxxxx":case"xxx":default:return ea(r,":")}},O:function(n,t,e){const r=Kh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+_$(r,":");case"OOOO":default:return"GMT"+ea(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Gv("short",n,e);case"zzzz":default:return Gv("long",n,e)}}};function Kh(n,t){const e=n?Vh(n,t,!0)/S$:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ic(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ea(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=ic(Math.floor(r/60),2),f=ic(Math.floor(r%60),2);return e+v+t+f}function ey(n,t){return n%60===0?(n>0?"-":"+")+ic(Math.abs(n)/60,2):ea(n,t)}function _$(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.floor(r/60),f=r%60;return f===0?e+String(v):e+String(v)+t+ic(f,2)}function ty(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const $$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Gh=36e5,ny=6e4,T$=2,Er={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:$$};function ry(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?T$:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=M$(n),{year:v,restDateString:f}=E$(r.date,e),y=I$(f,v);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,p;if(r.time&&(h=R$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(p=Vh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(p))return new Date(NaN)}else p=ty(new Date(x+h)),p=ty(new Date(x+h+p));return new Date(x+h+p)}else return new Date(NaN)}function M$(n){const t={};let e=Er.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Er.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const v=Er.timeZone.exec(r);v?(t.time=r.replace(v[1],""),t.timeZone=v[1].trim()):t.time=r}return t}function E$(n,t){if(n){const e=Er.YYY[t],r=Er.YYYYY[t];let v=Er.YYYY.exec(n)||r.exec(n);if(v){const f=v[1];return{year:parseInt(f,10),restDateString:n.slice(f.length)}}if(v=Er.YY.exec(n)||e.exec(n),v){const f=v[1];return{year:parseInt(f,10)*100,restDateString:n.slice(f.length)}}}return{year:null}}function I$(n,t){if(t===null)return null;let e,r,v;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let f=Er.MM.exec(n);if(f)return e=new Date(0),r=parseInt(f[1],10)-1,sy(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(f=Er.DDD.exec(n),f){e=new Date(0);const y=parseInt(f[1],10);return N$(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(f=Er.MMDD.exec(n),f){e=new Date(0),r=parseInt(f[1],10)-1;const y=parseInt(f[2],10);return sy(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(f=Er.Www.exec(n),f)return v=parseInt(f[1],10)-1,ay(v)?iy(t,v):new Date(NaN);if(f=Er.WwwD.exec(n),f){v=parseInt(f[1],10)-1;const y=parseInt(f[2],10)-1;return ay(v,y)?iy(t,v,y):new Date(NaN)}return null}function R$(n){let t,e,r=Er.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Yh(t)?t%24*Gh:NaN;if(r=Er.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Yh(t,e)?t%24*Gh+e*ny:NaN;if(r=Er.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const v=parseFloat(r[3].replace(",","."));return Yh(t,e,v)?t%24*Gh+e*ny+v*1e3:NaN}return null}function iy(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,f=t*7+e+1-v;return r.setUTCDate(r.getUTCDate()+f),r}const L$=[31,28,31,30,31,30,31,31,30,31,30,31],O$=[31,29,31,30,31,30,31,31,30,31,30,31];function oy(n){return n%400===0||n%4===0&&n%100!==0}function sy(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=oy(n);if(r&&e>O$[t]||!r&&e>L$[t])return!1}return!0}function N$(n,t){if(t<1)return!1;const e=oy(n);return!(e&&t>366||!e&&t>365)}function ay(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Yh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const D$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function F$(n,t,e={}){t=String(t);const r=t.match(D$);if(r){const v=ry(e.originalDate||n,e);t=r.reduce(function(f,y){if(y[0]==="'")return f;const x=f.indexOf(y),h=f[x-1]==="'",p=f.replace(y,"'"+A$[y[0]](v,y,e)+"'");return h?p.substring(0,x-1)+p.substring(x+1):p},t)}return es(n,t,e)}function P$(n,t,e){n=ry(n,e);const r=Vh(t,n,!0),v=new Date(n.getTime()-r),f=new Date(0);return f.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),f.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),f}function oc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},F$(P$(n,t,{timeZone:r.timeZone}),e,r)}const sc="yyyy-MM-dd",ly="HH:mm:ss.SSS",cy="HH:mm:ss",ac=`${sc} ${ly}`,uy=`${sc} ${cy}`,fN=Tr("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return es(!t||t==="local"?u$(n,n.getTimezoneOffset()):n,ac)},formatDateTime(n,t){return!t||t==="local"?es(n,ac):oc(n,t,ac)},formatDateTimeHMS(n,t){return!t||t==="local"?es(n,uy):oc(n,t,uy)},formatDate:function(n,t){return!t||t==="local"?es(n,sc):oc(n,this.timeZone,sc)},formatTime:function(n,t,e=ly){return!t||t==="local"?es(n,e):oc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,cy)},formatTimestamp(n,t){return this.formatDateTime(G_(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}});var W$=Object.defineProperty,B$=(n,t,e)=>t in n?W$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>B$(n,typeof t!="symbol"?t+"":t,e);function Xh(n,t,e){const r=yn(n,e==null?void 0:e.in);return isNaN(t)?Vn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function z$(n,t){const e=yn(n,void 0).getDay();return e===0?7:e}function j$(n,t){const e=H$(t)?new t(0):Vn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function H$(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const U$=10;class hy{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}}class V$ extends hy{constructor(t,e,r,v,f){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=v,f&&(this.subPriority=f)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class q$ extends hy{constructor(t,e){super(),Je(this,"priority",U$),Je(this,"subPriority",-1),this.context=t||(r=>Vn(e,r))}set(t,e){return e.timestampIsSet?t:Vn(t,j$(t,this.context))}}class Qt{run(t,e,r,v){const f=this.parse(t,e,r,v);return f?{setter:new V$(f.value,this.validate,this.set,this.priority,this.subPriority),rest:f.rest}:null}validate(t,e,r){return!0}}class K$ extends Qt{constructor(){super(...arguments),Je(this,"priority",140),Je(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}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}/},qi={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 Wn(n,t){return n&&{value:t(n.value),rest:n.rest}}function kn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ki(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,v=e[2]?parseInt(e[2],10):0,f=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(v*Gc+f*sl+y*Ob),rest:t.slice(e[0].length)}}function dy(n){return kn(Pn.anyDigitsSigned,n)}function Tn(n,t){switch(n){case 1:return kn(Pn.singleDigit,t);case 2:return kn(Pn.twoDigits,t);case 3:return kn(Pn.threeDigits,t);case 4:return kn(Pn.fourDigits,t);default:return kn(new RegExp("^\\d{1,"+n+"}"),t)}}function py(n,t){switch(n){case 1:return kn(Pn.singleDigitSigned,t);case 2:return kn(Pn.twoDigitsSigned,t);case 3:return kn(Pn.threeDigitsSigned,t);case 4:return kn(Pn.fourDigitsSigned,t);default:return kn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Qh(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 gy(n,t){const e=t>0,r=e?t:1-t;let v;if(r<=50)v=n||100;else{const f=r+50,y=Math.trunc(f/100)*100,x=n>=f%100;v=n+y-(x?100:0)}return e?v:1-v}function fy(n){return n%400===0||n%4===0&&n%100!==0}class G$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const v=f=>({year:f,isTwoDigitYear:e==="yy"});switch(e){case"y":return Wn(Tn(4,t),v);case"yo":return Wn(r.ordinalNumber(t,{unit:"year"}),v);default:return Wn(Tn(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const v=t.getFullYear();if(r.isTwoDigitYear){const y=gy(r.year,v);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const f=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}}let Y$=class extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const v=f=>({year:f,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Wn(Tn(4,t),v);case"Yo":return Wn(r.ordinalNumber(t,{unit:"year"}),v);default:return Wn(Tn(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,v){const f=Xc(t,v);if(r.isTwoDigitYear){const x=gy(r.year,f);return t.setFullYear(x,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,v)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,v)}};class X$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return py(e==="R"?4:e.length,t)}set(t,e,r){const v=Vn(t,0);return v.setFullYear(r,0,4),v.setHours(0,0,0,0),Fs(v)}}class Q$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return py(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class Z$ extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return Tn(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class J$ extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return Tn(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class eT extends Qt{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const v=f=>f-1;switch(e){case"M":return Wn(kn(Pn.month,t),v);case"MM":return Wn(Tn(2,t),v);case"Mo":return Wn(r.ordinalNumber(t,{unit:"month"}),v);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class tT extends Qt{constructor(){super(...arguments),Je(this,"priority",110),Je(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const v=f=>f-1;switch(e){case"L":return Wn(kn(Pn.month,t),v);case"LL":return Wn(Tn(2,t),v);case"Lo":return Wn(r.ordinalNumber(t,{unit:"month"}),v);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function nT(n,t,e){const r=yn(n,e==null?void 0:e.in),v=Sp(r,e)-t;return r.setDate(r.getDate()-v*7),yn(r,e==null?void 0:e.in)}class rT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return kn(Pn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Tn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,v){return To(nT(t,r,v),v)}}function iT(n,t,e){const r=yn(n,void 0),v=kp(r)-t;return r.setDate(r.getDate()-v*7),r}class oT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return kn(Pn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Tn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Fs(iT(t,r))}}const sT=[31,28,31,30,31,30,31,31,30,31,30,31],aT=[31,29,31,30,31,30,31,31,30,31,30,31];class lT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return kn(Pn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Tn(e.length,t)}}validate(t,e){const r=t.getFullYear(),v=fy(r),f=t.getMonth();return v?e>=1&&e<=aT[f]:e>=1&&e<=sT[f]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class cT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return kn(Pn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Tn(e.length,t)}}validate(t,e){const r=t.getFullYear();return fy(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function Zh(n,t,e){var r,v,f,y;const x=Ds(),h=(e==null?void 0:e.weekStartsOn)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.weekStartsOn)??x.weekStartsOn??((y=(f=x.locale)==null?void 0:f.options)==null?void 0:y.weekStartsOn)??0,p=yn(n,e==null?void 0:e.in),s=p.getDay(),a=(t%7+7)%7,u=7-h,l=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return Xh(p,l,e)}class uT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}class hT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,v){const f=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return Wn(Tn(e.length,t),f);case"eo":return Wn(r.ordinalNumber(t,{unit:"day"}),f);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}class dT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,v){const f=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return Wn(Tn(e.length,t),f);case"co":return Wn(r.ordinalNumber(t,{unit:"day"}),f);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}function pT(n,t,e){const r=yn(n,void 0),v=z$(r),f=t-v;return Xh(r,f,e)}class gT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const v=f=>f===0?7:f;switch(e){case"i":case"ii":return Tn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Wn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiii":return Wn(r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiiii":return Wn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiii":default:return Wn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=pT(t,r),t.setHours(0,0,0,0),t}}class fT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class mT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class vT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class yT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return kn(Pn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Tn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const v=t.getHours()>=12;return v&&r<12?t.setHours(r+12,0,0,0):!v&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class wT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return kn(Pn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Tn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class bT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return kn(Pn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Tn(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class xT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return kn(Pn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Tn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const v=r<=24?r%24:r;return t.setHours(v,0,0,0),t}}class CT extends Qt{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return kn(Pn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Tn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class kT extends Qt{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return kn(Pn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Tn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class ST extends Qt{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=v=>Math.trunc(v*Math.pow(10,-e.length+3));return Wn(Tn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class AT extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Ki(qi.basicOptionalMinutes,t);case"XX":return Ki(qi.basic,t);case"XXXX":return Ki(qi.basicOptionalSeconds,t);case"XXXXX":return Ki(qi.extendedOptionalSeconds,t);case"XXX":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Vn(t,t.getTime()-al(t)-r)}}class _T extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Ki(qi.basicOptionalMinutes,t);case"xx":return Ki(qi.basic,t);case"xxxx":return Ki(qi.basicOptionalSeconds,t);case"xxxxx":return Ki(qi.extendedOptionalSeconds,t);case"xxx":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:Vn(t,t.getTime()-al(t)-r)}}class $T extends Qt{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return dy(t)}set(t,e,r){return[Vn(t,r*1e3),{timestampIsSet:!0}]}}class TT extends Qt{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return dy(t)}set(t,e,r){return[Vn(t,r),{timestampIsSet:!0}]}}const MT={G:new K$,y:new G$,Y:new Y$,R:new X$,u:new Q$,Q:new Z$,q:new J$,M:new eT,L:new tT,w:new rT,I:new oT,d:new lT,D:new cT,E:new uT,e:new hT,c:new dT,i:new gT,a:new fT,b:new mT,B:new vT,h:new yT,H:new wT,K:new bT,k:new xT,m:new CT,s:new kT,S:new ST,X:new AT,x:new _T,t:new $T,T:new TT},ET=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IT=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RT=/^'([^]*?)'?$/,LT=/''/g,OT=/\S/,NT=/[a-zA-Z]/;function DT(n,t,e,r){var v,f,y,x;const h=()=>Vn(e,NaN),p=qv(),s=p.locale??Cp,a=p.firstWeekContainsDate??((f=(v=p.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,u=p.weekStartsOn??((x=(y=p.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():yn(e,void 0);const l={firstWeekContainsDate:a,weekStartsOn:u,locale:s},o=[new q$(void 0,e)],c=t.match(IT).map(T=>{const S=T[0];if(S in Qc){const C=Qc[S];return C(T,s.formatLong)}return T}).join("").match(ET),d=[];for(let T of c){Ip(T)&&Zc(T,t,n),Ep(T)&&Zc(T,t,n);const S=T[0],C=MT[S];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const F=d.find(E=>R.includes(E.token)||E.token===S);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);d.push({token:S,fullToken:T});const L=C.run(n,T,s.match,l);if(!L)return h();o.push(L.setter),n=L.rest}else{if(S.match(NT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(T==="''"?T="'":S==="'"&&(T=FT(T)),n.indexOf(T)===0)n=n.slice(T.length);else return h()}}if(n.length>0&&OT.test(n))return h();const w=o.map(T=>T.priority).sort((T,S)=>S-T).filter((T,S,C)=>C.indexOf(T)===S).map(T=>o.filter(S=>S.priority===T).sort((S,C)=>C.subPriority-S.subPriority)).map(T=>T[0]);let b=yn(e,void 0);if(isNaN(+b))return h();const I={};for(const T of w){if(!T.validate(b,l))return h();const S=T.set(b,I,l);Array.isArray(S)?(b=S[0],Object.assign(I,S[1])):b=S}return b}function FT(n){return n.match(RT)[1].replace(LT,"'")}const PT="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",WT={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return PT},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=qT.indexOf(my[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,v=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*v}px;`,`background-size: ${e}px ${r}px;`,`height: ${v}px;`,`width: ${v}px;`,`padding-top: ${n-1}px;`].join("")}}};function BT(n,t,e,r,v,f){return Zn(),ci("div",{style:va(f.iconStyle)},null,4)}const zT=Ns(WT,[["render",BT]]),jT={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function HT(n,t,e,r,v,f){const y=$n("rux-icon");return Zn(),_o(y,{size:e.size,icon:e.icon,style:va(f.colorStyle)},null,8,["size","icon","style"])}const UT=Ns(jT,[["render",HT],["__scopeId","data-v-9af48e85"]]),my={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},Jh={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},VT=function(n){const t="#000000",e="#ffffff",r=Jh[my[n]];if(r){const v=+`0x${r.slice(1,3)}`,f=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((v*299+f*587+y*114)/1e3>128)return t}return e},qT=Object.keys(Jh),KT={astro:{component:n=>Os(UT,{...n})},"astro-status":{component:n=>Os(zT,{...n,status:n.icon})}},GT={extras:{component:n=>Os(Lb,{...n})}},vy="single-spa:app-change",YT={data(){return{show:!1}},created(){window.addEventListener(vy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=hp().length===0},150)},unmounted(){window.removeEventListener(vy,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},XT={class:"mx-1"};function QT(n,t,e,r,v,f){const y=$n("v-card-title"),x=$n("v-card-text"),h=$n("v-card");return v.show?(Zn(),_o(h,{key:0},{default:or(()=>[ln(y,null,{default:or(()=>t[0]||(t[0]=[ui(" 404 Not Found ")])),_:1}),ln(x,{class:"d-flex align-center mt-3"},{default:or(()=>[t[1]||(t[1]=ui(" The requested URL ")),Ls("code",XT,hi(n.$route.fullPath),1),t[2]||(t[2]=ui(" was not routable. ")),t[3]||(t[3]=Ls("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):$o("",!0)}const yy=[{path:"/:target?/:packet?",name:"Handbooks",component:()=>ot(()=>it.import("./Handbooks-a7223db6964365035fd4.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Ns(YT,[["render",QT]])}];yy.forEach(fp);const ZT=cp({history:up(),routes:yy}),JT={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},eM={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},tM=["innerHTML"],nM={key:2},rM={key:3,class:"validate mt-4"};function iM(n,t,e,r,v,f){const y=$n("v-spacer"),x=$n("v-toolbar"),h=$n("v-icon"),p=$n("v-text-field"),s=$n("v-card-text"),a=$n("v-btn"),u=$n("v-card-actions"),l=$n("v-card"),o=$n("v-dialog"),c=$n("v-app");return Zn(),_o(c,null,{default:or(()=>[ln(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:or(()=>[ln(l,null,{default:or(()=>[ln(x,{height:"24"},{default:or(()=>[ln(y),Ls("span",null,hi(n.params.title),1),ln(y)]),_:1}),ln(s,{class:"mt-4 pa-3"},{default:or(()=>[n.params.validateText?(Zn(),_o(h,{key:0,class:"mr-2"},{default:or(()=>t[2]||(t[2]=[ui(" mdi-alert ")])),_:1})):$o("",!0),n.params.html?(Zn(),ci("span",{key:1,innerHTML:n.params.text},null,8,tM)):(Zn(),ci("span",nM,hi(n.params.text),1)),n.params.validateText?(Zn(),ci("div",rM,[ui(" Enter "+hi(n.params.validateText)+" to confirm! ",1),ln(p,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):$o("",!0)]),_:1}),ln(u,{class:"px-2"},{default:or(()=>[ln(y),n.params.cancelText?(Zn(),_o(a,{key:0,variant:"outlined","data-test":f.dataTestCancel,onClick:f.cancel},{default:or(()=>[ui(hi(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):$o("",!0),ln(a,{variant:"flat",color:n.params.okClass,"data-test":f.dataTestOk,onClick:f.ok},{default:or(()=>[ui(hi(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const oM=Ns(eM,[["render",iM],["__scopeId","data-v-de532a0f"]]);class sM{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(oM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:v,validateText:f,cancelText:y,html:x}){return this.mount(),new Promise((h,p)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:v,validateText:f,cancelText:y,html:x},h,p)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:v="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:v,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:v="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:v,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:v="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:f,validateText:r,cancelText:v,html:!1})}}const aM={install(n,t){const e=new sM;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},lM={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1494
+ `+f):r.stack=f}catch{}}throw r}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=ps(this.defaults,e);const{transitional:r,paramsSerializer:v,headers:f}=e;r!==void 0&&nc.assertOptions(r,{silentJSONParsing:Vi.transitional(Vi.boolean),forcedJSONParsing:Vi.transitional(Vi.boolean),clarifyTimeoutError:Vi.transitional(Vi.boolean)},!1),v!=null&&(_e.isFunction(v)?e.paramsSerializer={serialize:v}:nc.assertOptions(v,{encode:Vi.function,serialize:Vi.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),nc.assertOptions(e,{baseUrl:Vi.spelling("baseURL"),withXsrfToken:Vi.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let y=f&&_e.merge(f.common,f[e.method]);f&&_e.forEach(["delete","get","head","post","put","patch","common"],o=>{delete f[o]}),e.headers=Br.concat(y,f);const x=[];let h=!0;this.interceptors.request.forEach(function(o){typeof o.runWhen=="function"&&o.runWhen(e)===!1||(h=h&&o.synchronous,x.unshift(o.fulfilled,o.rejected))});const p=[];this.interceptors.response.forEach(function(o){p.push(o.fulfilled,o.rejected)});let s,a=0,u;if(!h){const o=[jv.bind(this),void 0];for(o.unshift.apply(o,x),o.push.apply(o,p),u=o.length,s=Promise.resolve(e);a<u;)s=s.then(o[a++],o[a++]);return s}u=x.length;let l=e;for(a=0;a<u;){const o=x[a++],c=x[a++];try{l=o(l)}catch(d){c.call(this,d);break}}try{s=jv.call(this,l)}catch(o){return Promise.reject(o)}for(a=0,u=p.length;a<u;)s=s.then(p[a++],p[a++]);return s}getUri(t){t=ps(this.defaults,t);const e=Lv(t.baseURL,t.url,t.allowAbsoluteUrls);return Sv(e,t.params,t.paramsSerializer)}};_e.forEach(["delete","get","head","options"],function(n){gs.prototype[n]=function(t,e){return this.request(ps(e||{},{method:n,url:t,data:(e||{}).data}))}}),_e.forEach(["post","put","patch"],function(n){function t(e){return function(r,v,f){return this.request(ps(f||{},{method:n,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:v}))}}gs.prototype[n]=t(),gs.prototype[n+"Form"]=t(!0)});let U_=class mb{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(v){e=v});const r=this;this.promise.then(v=>{if(!r._listeners)return;let f=r._listeners.length;for(;f-- >0;)r._listeners[f](v);r._listeners=null}),this.promise.then=v=>{let f;const y=new Promise(x=>{r.subscribe(x),f=x}).then(v);return y.cancel=function(){r.unsubscribe(f)},y},t(function(v,f,y){r.reason||(r.reason=new Js(v,f,y),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=r=>{t.abort(r)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new mb(function(e){t=e}),cancel:t}}};function V_(n){return function(t){return n.apply(null,t)}}function q_(n){return _e.isObject(n)&&n.isAxiosError===!0}const zh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(zh).forEach(([n,t])=>{zh[t]=n});function Vv(n){const t=new gs(n),e=cv(gs.prototype.request,t);return _e.extend(e,gs.prototype,t,{allOwnKeys:!0}),_e.extend(e,t,null,{allOwnKeys:!0}),e.create=function(r){return Vv(ps(n,r))},e}const Gn=Tr("E",Vv(Fa));Gn.Axios=gs,Gn.CanceledError=Js,Gn.CancelToken=U_,Gn.isCancel=Mv,Gn.VERSION=Hv,Gn.toFormData=Xl,Gn.AxiosError=$t,Gn.Cancel=Gn.CanceledError,Gn.all=function(n){return Promise.all(n)},Gn.spread=V_,Gn.isAxiosError=q_,Gn.mergeConfig=ps,Gn.AxiosHeaders=Br,Gn.formToJSON=n=>$v(_e.isHTMLForm(n)?new FormData(n):n),Gn.getAdapter=zv.getAdapter,Gn.HttpStatusCode=zh,Gn.default=Gn;const{Axios:J2,AxiosError:eN,CanceledError:tN,isCancel:nN,CancelToken:rN,VERSION:iN,all:oN,Cancel:sN,isAxiosError:aN,spread:lN,toFormData:cN,AxiosHeaders:uN,HttpStatusCode:hN,formToJSON:dN,getAdapter:pN,mergeConfig:gN}=Gn;function qv(){return Object.assign({},Ds())}function K_(n,t,e){const r=wn(n,void 0);return r.setTime(r.getTime()+t*sl),r}function G_(n,t){const e=()=>qn(void 0,NaN),r=Z_(n);let v;if(r.date){const h=J_(r.date,2);v=e$(h.restDateString,h.year)}if(!v||isNaN(+v))return e();const f=+v;let y=0,x;if(r.time&&(y=t$(r.time),isNaN(y)))return e();if(r.timezone){if(x=n$(r.timezone),isNaN(x))return e()}else{const h=new Date(f+y),p=wn(0,void 0);return p.setFullYear(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate()),p.setHours(h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),h.getUTCMilliseconds()),p}return wn(f+y+x,void 0)}const rc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Y_=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,X_=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Q_=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Z_(n){const t={},e=n.split(rc.dateTimeDelimiter);let r;if(e.length>2)return t;if(/:/.test(e[0])?r=e[0]:(t.date=e[0],r=e[1],rc.timeZoneDelimiter.test(t.date)&&(t.date=n.split(rc.timeZoneDelimiter)[0],r=n.substr(t.date.length,n.length))),r){const v=rc.timezone.exec(r);v?(t.time=r.replace(v[1],""),t.timezone=v[1]):t.time=r}return t}function J_(n,t){const e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=n.match(e);if(!r)return{year:NaN,restDateString:""};const v=r[1]?parseInt(r[1]):null,f=r[2]?parseInt(r[2]):null;return{year:f===null?v:f*100,restDateString:n.slice((r[1]||r[2]).length)}}function e$(n,t){if(t===null)return new Date(NaN);const e=n.match(Y_);if(!e)return new Date(NaN);const r=!!e[4],v=Wa(e[1]),f=Wa(e[2])-1,y=Wa(e[3]),x=Wa(e[4]),h=Wa(e[5])-1;if(r)return a$(t,x,h)?r$(t,x,h):new Date(NaN);{const p=new Date(0);return!o$(t,f,y)||!s$(t,v)?new Date(NaN):(p.setUTCFullYear(t,f,Math.max(v,y)),p)}}function Wa(n){return n?parseInt(n):1}function t$(n){const t=n.match(X_);if(!t)return NaN;const e=jh(t[1]),r=jh(t[2]),v=jh(t[3]);return l$(e,r,v)?e*Gc+r*sl+v*1e3:NaN}function jh(n){return n&&parseFloat(n.replace(",","."))||0}function n$(n){if(n==="Z")return 0;const t=n.match(Q_);if(!t)return 0;const e=t[1]==="+"?-1:1,r=parseInt(t[2]),v=t[3]&&parseInt(t[3])||0;return c$(r,v)?e*(r*Gc+v*sl):NaN}function r$(n,t,e){const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,f=(t-1)*7+e+1-v;return r.setUTCDate(r.getUTCDate()+f),r}const i$=[31,null,31,30,31,30,31,31,30,31,30,31];function Kv(n){return n%400===0||n%4===0&&n%100!==0}function o$(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(i$[t]||(Kv(n)?29:28))}function s$(n,t){return t>=1&&t<=(Kv(n)?366:365)}function a$(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function l$(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function c$(n,t){return t>=0&&t<=59}function u$(n,t,e){return K_(n,-t)}function Gv(n,t,e){const r=qv(),v=p$(n,e.timeZone,e.locale??r.locale);return"formatToParts"in v?h$(v,t):d$(v,t)}function h$(n,t){const e=n.formatToParts(t);for(let r=e.length-1;r>=0;--r)if(e[r].type==="timeZoneName")return e[r].value}function d$(n,t){const e=n.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(e);return r?r[0].substr(1):""}function p$(n,t,e){return new Intl.DateTimeFormat(e?[e.code,"en-US"]:void 0,{timeZone:t,timeZoneName:n})}function g$(n,t){const e=w$(t);return"formatToParts"in e?m$(e,n):v$(e,n)}const f$={year:0,month:1,day:2,hour:3,minute:4,second:5};function m$(n,t){try{const e=n.formatToParts(t),r=[];for(let v=0;v<e.length;v++){const f=f$[e[v].type];f!==void 0&&(r[f]=parseInt(e[v].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}function v$(n,t){const e=n.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e);return[parseInt(r[3],10),parseInt(r[1],10),parseInt(r[2],10),parseInt(r[4],10),parseInt(r[5],10),parseInt(r[6],10)]}const Hh={},Yv=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")),y$=Yv==="06/25/2014, 00:00:00"||Yv==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";function w$(n){return Hh[n]||(Hh[n]=y$?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"})),Hh[n]}function Xv(n,t,e,r,v,f,y){const x=new Date(0);return x.setUTCFullYear(n,t,e),x.setUTCHours(r,v,f,y),x}const Qv=36e5,b$=6e4,Uh={timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Vh(n,t,e){if(!n)return 0;let r=Uh.timezoneZ.exec(n);if(r)return 0;let v,f;if(r=Uh.timezoneHH.exec(n),r)return v=parseInt(r[1],10),Zv(v)?-(v*Qv):NaN;if(r=Uh.timezoneHHMM.exec(n),r){v=parseInt(r[2],10);const y=parseInt(r[3],10);return Zv(v,y)?(f=Math.abs(v)*Qv+y*b$,r[1]==="+"?-f:f):NaN}if(k$(n)){t=new Date(t||Date.now());const y=e?t:x$(t),x=qh(y,n);return-(e?x:C$(t,x,n))}return NaN}function x$(n){return Xv(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())}function qh(n,t){const e=g$(n,t),r=Xv(e[0],e[1]-1,e[2],e[3]%24,e[4],e[5],0).getTime();let v=n.getTime();const f=v%1e3;return v-=f>=0?f:1e3+f,r-v}function C$(n,t,e){let r=n.getTime()-t;const v=qh(new Date(r),e);if(t===v)return t;r-=v-t;const f=qh(new Date(r),e);return v===f?v:Math.max(v,f)}function Zv(n,t){return-23<=n&&n<=23&&(t==null||0<=t&&t<=59)}const Jv={};function k$(n){if(Jv[n])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),Jv[n]=!0,!0}catch{return!1}}const S$=60*1e3,A$={X:function(n,t,e){const r=Kh(e.timeZone,n);if(r===0)return"Z";switch(t){case"X":return ey(r);case"XXXX":case"XX":return ea(r);case"XXXXX":case"XXX":default:return ea(r,":")}},x:function(n,t,e){const r=Kh(e.timeZone,n);switch(t){case"x":return ey(r);case"xxxx":case"xx":return ea(r);case"xxxxx":case"xxx":default:return ea(r,":")}},O:function(n,t,e){const r=Kh(e.timeZone,n);switch(t){case"O":case"OO":case"OOO":return"GMT"+_$(r,":");case"OOOO":default:return"GMT"+ea(r,":")}},z:function(n,t,e){switch(t){case"z":case"zz":case"zzz":return Gv("short",n,e);case"zzzz":default:return Gv("long",n,e)}}};function Kh(n,t){const e=n?Vh(n,t,!0)/S$:(t==null?void 0:t.getTimezoneOffset())??0;if(Number.isNaN(e))throw new RangeError("Invalid time zone specified: "+n);return e}function ic(n,t){const e=n<0?"-":"";let r=Math.abs(n).toString();for(;r.length<t;)r="0"+r;return e+r}function ea(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=ic(Math.floor(r/60),2),f=ic(Math.floor(r%60),2);return e+v+t+f}function ey(n,t){return n%60===0?(n>0?"-":"+")+ic(Math.abs(n)/60,2):ea(n,t)}function _$(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),v=Math.floor(r/60),f=r%60;return f===0?e+String(v):e+String(v)+t+ic(f,2)}function ty(n){const t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+n-+t}const $$=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,Gh=36e5,ny=6e4,T$=2,Er={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:$$};function ry(n,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(n===null)return new Date(NaN);const e=t.additionalDigits==null?T$:Number(t.additionalDigits);if(e!==2&&e!==1&&e!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]")return new Date(n.getTime());if(typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]")return new Date(n);if(Object.prototype.toString.call(n)!=="[object String]")return new Date(NaN);const r=M$(n),{year:v,restDateString:f}=E$(r.date,e),y=I$(f,v);if(y===null||isNaN(y.getTime()))return new Date(NaN);if(y){const x=y.getTime();let h=0,p;if(r.time&&(h=R$(r.time),h===null||isNaN(h)))return new Date(NaN);if(r.timeZone||t.timeZone){if(p=Vh(r.timeZone||t.timeZone,new Date(x+h)),isNaN(p))return new Date(NaN)}else p=ty(new Date(x+h)),p=ty(new Date(x+h+p));return new Date(x+h+p)}else return new Date(NaN)}function M$(n){const t={};let e=Er.dateTimePattern.exec(n),r;if(e?(t.date=e[1],r=e[3]):(e=Er.datePattern.exec(n),e?(t.date=e[1],r=e[2]):(t.date=null,r=n)),r){const v=Er.timeZone.exec(r);v?(t.time=r.replace(v[1],""),t.timeZone=v[1].trim()):t.time=r}return t}function E$(n,t){if(n){const e=Er.YYY[t],r=Er.YYYYY[t];let v=Er.YYYY.exec(n)||r.exec(n);if(v){const f=v[1];return{year:parseInt(f,10),restDateString:n.slice(f.length)}}if(v=Er.YY.exec(n)||e.exec(n),v){const f=v[1];return{year:parseInt(f,10)*100,restDateString:n.slice(f.length)}}}return{year:null}}function I$(n,t){if(t===null)return null;let e,r,v;if(!n||!n.length)return e=new Date(0),e.setUTCFullYear(t),e;let f=Er.MM.exec(n);if(f)return e=new Date(0),r=parseInt(f[1],10)-1,sy(t,r)?(e.setUTCFullYear(t,r),e):new Date(NaN);if(f=Er.DDD.exec(n),f){e=new Date(0);const y=parseInt(f[1],10);return N$(t,y)?(e.setUTCFullYear(t,0,y),e):new Date(NaN)}if(f=Er.MMDD.exec(n),f){e=new Date(0),r=parseInt(f[1],10)-1;const y=parseInt(f[2],10);return sy(t,r,y)?(e.setUTCFullYear(t,r,y),e):new Date(NaN)}if(f=Er.Www.exec(n),f)return v=parseInt(f[1],10)-1,ay(v)?iy(t,v):new Date(NaN);if(f=Er.WwwD.exec(n),f){v=parseInt(f[1],10)-1;const y=parseInt(f[2],10)-1;return ay(v,y)?iy(t,v,y):new Date(NaN)}return null}function R$(n){let t,e,r=Er.HH.exec(n);if(r)return t=parseFloat(r[1].replace(",",".")),Yh(t)?t%24*Gh:NaN;if(r=Er.HHMM.exec(n),r)return t=parseInt(r[1],10),e=parseFloat(r[2].replace(",",".")),Yh(t,e)?t%24*Gh+e*ny:NaN;if(r=Er.HHMMSS.exec(n),r){t=parseInt(r[1],10),e=parseInt(r[2],10);const v=parseFloat(r[3].replace(",","."));return Yh(t,e,v)?t%24*Gh+e*ny+v*1e3:NaN}return null}function iy(n,t,e){t=t||0,e=e||0;const r=new Date(0);r.setUTCFullYear(n,0,4);const v=r.getUTCDay()||7,f=t*7+e+1-v;return r.setUTCDate(r.getUTCDate()+f),r}const L$=[31,28,31,30,31,30,31,31,30,31,30,31],O$=[31,29,31,30,31,30,31,31,30,31,30,31];function oy(n){return n%400===0||n%4===0&&n%100!==0}function sy(n,t,e){if(t<0||t>11)return!1;if(e!=null){if(e<1)return!1;const r=oy(n);if(r&&e>O$[t]||!r&&e>L$[t])return!1}return!0}function N$(n,t){if(t<1)return!1;const e=oy(n);return!(e&&t>366||!e&&t>365)}function ay(n,t){return!(n<0||n>52||t!=null&&(t<0||t>6))}function Yh(n,t,e){return!(n<0||n>=25||t!=null&&(t<0||t>=60)||e!=null&&(e<0||e>=60))}const D$=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function F$(n,t,e={}){t=String(t);const r=t.match(D$);if(r){const v=ry(e.originalDate||n,e);t=r.reduce(function(f,y){if(y[0]==="'")return f;const x=f.indexOf(y),h=f[x-1]==="'",p=f.replace(y,"'"+A$[y[0]](v,y,e)+"'");return h?p.substring(0,x-1)+p.substring(x+1):p},t)}return es(n,t,e)}function P$(n,t,e){n=ry(n,e);const r=Vh(t,n,!0),v=new Date(n.getTime()-r),f=new Date(0);return f.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),f.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),f}function oc(n,t,e,r){return r={...r,timeZone:t,originalDate:n},F$(P$(n,t,{timeZone:r.timeZone}),e,r)}const sc="yyyy-MM-dd",ly="HH:mm:ss.SSS",cy="HH:mm:ss",ac=`${sc} ${ly}`,uy=`${sc} ${cy}`,fN=Tr("R",{methods:{parseDateTime(n,t){return n.includes(" ")&&(n=n.replace(" ","T")),t&&t==="UTC"&&(n+="Z"),Date.parse(n)},formatUtcToLocal(n,t){return es(!t||t==="local"?u$(n,n.getTimezoneOffset()):n,ac)},formatDateTime(n,t){return!t||t==="local"?es(n,ac):oc(n,t,ac)},formatDateTimeHMS(n,t){return!t||t==="local"?es(n,uy):oc(n,t,uy)},formatDate:function(n,t){return!t||t==="local"?es(n,sc):oc(n,this.timeZone,sc)},formatTime:function(n,t,e=ly){return!t||t==="local"?es(n,e):oc(n,this.timeZone,e)},formatTimeHMS:function(n,t){return this.formatTime(n,t,cy)},formatTimestamp(n,t){return this.formatDateTime(G_(n),t)},formatSeconds(n,t){return this.formatDateTime(new Date(n*1e3),t)},formatNanoseconds(n,t){return this.formatDateTime(new Date(parseInt(n)/1e6),t)}}});var W$=Object.defineProperty,B$=(n,t,e)=>t in n?W$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Je=(n,t,e)=>B$(n,typeof t!="symbol"?t+"":t,e);function Xh(n,t,e){const r=wn(n,e==null?void 0:e.in);return isNaN(t)?qn((e==null?void 0:e.in)||n,NaN):(t&&r.setDate(r.getDate()+t),r)}function z$(n,t){const e=wn(n,void 0).getDay();return e===0?7:e}function j$(n,t){const e=H$(t)?new t(0):qn(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function H$(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}const U$=10;class hy{constructor(){Je(this,"subPriority",0)}validate(t,e){return!0}}class V$ extends hy{constructor(t,e,r,v,f){super(),this.value=t,this.validateValue=e,this.setValue=r,this.priority=v,f&&(this.subPriority=f)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,r){return this.setValue(t,e,this.value,r)}}class q$ extends hy{constructor(t,e){super(),Je(this,"priority",U$),Je(this,"subPriority",-1),this.context=t||(r=>qn(e,r))}set(t,e){return e.timestampIsSet?t:qn(t,j$(t,this.context))}}class Qt{run(t,e,r,v){const f=this.parse(t,e,r,v);return f?{setter:new V$(f.value,this.validate,this.set,this.priority,this.subPriority),rest:f.rest}:null}validate(t,e,r){return!0}}class K$ extends Qt{constructor(){super(...arguments),Je(this,"priority",140),Je(this,"incompatibleTokens",["R","u","t","T"])}parse(t,e,r){switch(e){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,e,r){return e.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}const Wn={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}/},qi={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,t){return n&&{value:t(n.value),rest:n.rest}}function Sn(n,t){const e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function Ki(n,t){const e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};const r=e[1]==="+"?1:-1,v=e[2]?parseInt(e[2],10):0,f=e[3]?parseInt(e[3],10):0,y=e[5]?parseInt(e[5],10):0;return{value:r*(v*Gc+f*sl+y*Ob),rest:t.slice(e[0].length)}}function dy(n){return Sn(Wn.anyDigitsSigned,n)}function Mn(n,t){switch(n){case 1:return Sn(Wn.singleDigit,t);case 2:return Sn(Wn.twoDigits,t);case 3:return Sn(Wn.threeDigits,t);case 4:return Sn(Wn.fourDigits,t);default:return Sn(new RegExp("^\\d{1,"+n+"}"),t)}}function py(n,t){switch(n){case 1:return Sn(Wn.singleDigitSigned,t);case 2:return Sn(Wn.twoDigitsSigned,t);case 3:return Sn(Wn.threeDigitsSigned,t);case 4:return Sn(Wn.fourDigitsSigned,t);default:return Sn(new RegExp("^-?\\d{1,"+n+"}"),t)}}function Qh(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 gy(n,t){const e=t>0,r=e?t:1-t;let v;if(r<=50)v=n||100;else{const f=r+50,y=Math.trunc(f/100)*100,x=n>=f%100;v=n+y-(x?100:0)}return e?v:1-v}function fy(n){return n%400===0||n%4===0&&n%100!==0}class G$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(t,e,r){const v=f=>({year:f,isTwoDigitYear:e==="yy"});switch(e){case"y":return Bn(Mn(4,t),v);case"yo":return Bn(r.ordinalNumber(t,{unit:"year"}),v);default:return Bn(Mn(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r){const v=t.getFullYear();if(r.isTwoDigitYear){const y=gy(r.year,v);return t.setFullYear(y,0,1),t.setHours(0,0,0,0),t}const f=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(f,0,1),t.setHours(0,0,0,0),t}}let Y$=class extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(t,e,r){const v=f=>({year:f,isTwoDigitYear:e==="YY"});switch(e){case"Y":return Bn(Mn(4,t),v);case"Yo":return Bn(r.ordinalNumber(t,{unit:"year"}),v);default:return Bn(Mn(e.length,t),v)}}validate(t,e){return e.isTwoDigitYear||e.year>0}set(t,e,r,v){const f=Xc(t,v);if(r.isTwoDigitYear){const x=gy(r.year,f);return t.setFullYear(x,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,v)}const y=!("era"in e)||e.era===1?r.year:1-r.year;return t.setFullYear(y,0,v.firstWeekContainsDate),t.setHours(0,0,0,0),To(t,v)}};class X$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(t,e){return py(e==="R"?4:e.length,t)}set(t,e,r){const v=qn(t,0);return v.setFullYear(r,0,4),v.setHours(0,0,0,0),Fs(v)}}class Q$ extends Qt{constructor(){super(...arguments),Je(this,"priority",130),Je(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(t,e){return py(e==="u"?4:e.length,t)}set(t,e,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}}class Z$ extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"Q":case"QQ":return Mn(e.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class J$ extends Qt{constructor(){super(...arguments),Je(this,"priority",120),Je(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"q":case"qq":return Mn(e.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=1&&e<=4}set(t,e,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}}class eT extends Qt{constructor(){super(...arguments),Je(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Je(this,"priority",110)}parse(t,e,r){const v=f=>f-1;switch(e){case"M":return Bn(Sn(Wn.month,t),v);case"MM":return Bn(Mn(2,t),v);case"Mo":return Bn(r.ordinalNumber(t,{unit:"month"}),v);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class tT extends Qt{constructor(){super(...arguments),Je(this,"priority",110),Je(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(t,e,r){const v=f=>f-1;switch(e){case"L":return Bn(Sn(Wn.month,t),v);case"LL":return Bn(Mn(2,t),v);case"Lo":return Bn(r.ordinalNumber(t,{unit:"month"}),v);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}function nT(n,t,e){const r=wn(n,e==null?void 0:e.in),v=Sp(r,e)-t;return r.setDate(r.getDate()-v*7),wn(r,e==null?void 0:e.in)}class rT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(t,e,r){switch(e){case"w":return Sn(Wn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r,v){return To(nT(t,r,v),v)}}function iT(n,t,e){const r=wn(n,void 0),v=kp(r)-t;return r.setDate(r.getDate()-v*7),r}class oT extends Qt{constructor(){super(...arguments),Je(this,"priority",100),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(t,e,r){switch(e){case"I":return Sn(Wn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=53}set(t,e,r){return Fs(iT(t,r))}}const sT=[31,28,31,30,31,30,31,31,30,31,30,31],aT=[31,29,31,30,31,30,31,31,30,31,30,31];class lT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subPriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"d":return Sn(Wn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear(),v=fy(r),f=t.getMonth();return v?e>=1&&e<=aT[f]:e>=1&&e<=sT[f]}set(t,e,r){return t.setDate(r),t.setHours(0,0,0,0),t}}class cT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"subpriority",1),Je(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(t,e,r){switch(e){case"D":case"DD":return Sn(Wn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Mn(e.length,t)}}validate(t,e){const r=t.getFullYear();return fy(r)?e>=1&&e<=366:e>=1&&e<=365}set(t,e,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}}function Zh(n,t,e){var r,v,f,y;const x=Ds(),h=(e==null?void 0:e.weekStartsOn)??((v=(r=e==null?void 0:e.locale)==null?void 0:r.options)==null?void 0:v.weekStartsOn)??x.weekStartsOn??((y=(f=x.locale)==null?void 0:f.options)==null?void 0:y.weekStartsOn)??0,p=wn(n,e==null?void 0:e.in),s=p.getDay(),a=(t%7+7)%7,u=7-h,l=t<0||t>6?t-(s+u)%7:(a+u)%7-(s+u)%7;return Xh(p,l,e)}class uT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(t,e,r){switch(e){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}class hT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(t,e,r,v){const f=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"e":case"ee":return Bn(Mn(e.length,t),f);case"eo":return Bn(r.ordinalNumber(t,{unit:"day"}),f);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}class dT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(t,e,r,v){const f=y=>{const x=Math.floor((y-1)/7)*7;return(y+v.weekStartsOn+6)%7+x};switch(e){case"c":case"cc":return Bn(Mn(e.length,t),f);case"co":return Bn(r.ordinalNumber(t,{unit:"day"}),f);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,e){return e>=0&&e<=6}set(t,e,r,v){return t=Zh(t,r,v),t.setHours(0,0,0,0),t}}function pT(n,t,e){const r=wn(n,void 0),v=z$(r),f=t-v;return Xh(r,f,e)}class gT extends Qt{constructor(){super(...arguments),Je(this,"priority",90),Je(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(t,e,r){const v=f=>f===0?7:f;switch(e){case"i":case"ii":return Mn(e.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Bn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiii":return Bn(r.day(t,{width:"narrow",context:"formatting"}),v);case"iiiiii":return Bn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v);case"iiii":default:return Bn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),v)}}validate(t,e){return e>=1&&e<=7}set(t,e,r){return t=pT(t,r),t.setHours(0,0,0,0),t}}class fT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(t,e,r){switch(e){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class mT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(t,e,r){switch(e){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class vT extends Qt{constructor(){super(...arguments),Je(this,"priority",80),Je(this,"incompatibleTokens",["a","b","t","T"])}parse(t,e,r){switch(e){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,e,r){return t.setHours(Qh(r),0,0,0),t}}class yT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["H","K","k","t","T"])}parse(t,e,r){switch(e){case"h":return Sn(Wn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=12}set(t,e,r){const v=t.getHours()>=12;return v&&r<12?t.setHours(r+12,0,0,0):!v&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}}class wT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(t,e,r){switch(e){case"H":return Sn(Wn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=23}set(t,e,r){return t.setHours(r,0,0,0),t}}class bT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["h","H","k","t","T"])}parse(t,e,r){switch(e){case"K":return Sn(Wn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=11}set(t,e,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}}class xT extends Qt{constructor(){super(...arguments),Je(this,"priority",70),Je(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(t,e,r){switch(e){case"k":return Sn(Wn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Mn(e.length,t)}}validate(t,e){return e>=1&&e<=24}set(t,e,r){const v=r<=24?r%24:r;return t.setHours(v,0,0,0),t}}class CT extends Qt{constructor(){super(...arguments),Je(this,"priority",60),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"m":return Sn(Wn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setMinutes(r,0,0),t}}class kT extends Qt{constructor(){super(...arguments),Je(this,"priority",50),Je(this,"incompatibleTokens",["t","T"])}parse(t,e,r){switch(e){case"s":return Sn(Wn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Mn(e.length,t)}}validate(t,e){return e>=0&&e<=59}set(t,e,r){return t.setSeconds(r,0),t}}class ST extends Qt{constructor(){super(...arguments),Je(this,"priority",30),Je(this,"incompatibleTokens",["t","T"])}parse(t,e){const r=v=>Math.trunc(v*Math.pow(10,-e.length+3));return Bn(Mn(e.length,t),r)}set(t,e,r){return t.setMilliseconds(r),t}}class AT extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","x"])}parse(t,e){switch(e){case"X":return Ki(qi.basicOptionalMinutes,t);case"XX":return Ki(qi.basic,t);case"XXXX":return Ki(qi.basicOptionalSeconds,t);case"XXXXX":return Ki(qi.extendedOptionalSeconds,t);case"XXX":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:qn(t,t.getTime()-al(t)-r)}}class _T extends Qt{constructor(){super(...arguments),Je(this,"priority",10),Je(this,"incompatibleTokens",["t","T","X"])}parse(t,e){switch(e){case"x":return Ki(qi.basicOptionalMinutes,t);case"xx":return Ki(qi.basic,t);case"xxxx":return Ki(qi.basicOptionalSeconds,t);case"xxxxx":return Ki(qi.extendedOptionalSeconds,t);case"xxx":default:return Ki(qi.extended,t)}}set(t,e,r){return e.timestampIsSet?t:qn(t,t.getTime()-al(t)-r)}}class $T extends Qt{constructor(){super(...arguments),Je(this,"priority",40),Je(this,"incompatibleTokens","*")}parse(t){return dy(t)}set(t,e,r){return[qn(t,r*1e3),{timestampIsSet:!0}]}}class TT extends Qt{constructor(){super(...arguments),Je(this,"priority",20),Je(this,"incompatibleTokens","*")}parse(t){return dy(t)}set(t,e,r){return[qn(t,r),{timestampIsSet:!0}]}}const MT={G:new K$,y:new G$,Y:new Y$,R:new X$,u:new Q$,Q:new Z$,q:new J$,M:new eT,L:new tT,w:new rT,I:new oT,d:new lT,D:new cT,E:new uT,e:new hT,c:new dT,i:new gT,a:new fT,b:new mT,B:new vT,h:new yT,H:new wT,K:new bT,k:new xT,m:new CT,s:new kT,S:new ST,X:new AT,x:new _T,t:new $T,T:new TT},ET=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,IT=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RT=/^'([^]*?)'?$/,LT=/''/g,OT=/\S/,NT=/[a-zA-Z]/;function DT(n,t,e,r){var v,f,y,x;const h=()=>qn(e,NaN),p=qv(),s=p.locale??Cp,a=p.firstWeekContainsDate??((f=(v=p.locale)==null?void 0:v.options)==null?void 0:f.firstWeekContainsDate)??1,u=p.weekStartsOn??((x=(y=p.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0;if(!t)return n?h():wn(e,void 0);const l={firstWeekContainsDate:a,weekStartsOn:u,locale:s},o=[new q$(void 0,e)],c=t.match(IT).map(T=>{const S=T[0];if(S in Qc){const C=Qc[S];return C(T,s.formatLong)}return T}).join("").match(ET),d=[];for(let T of c){Ip(T)&&Zc(T,t,n),Ep(T)&&Zc(T,t,n);const S=T[0],C=MT[S];if(C){const{incompatibleTokens:R}=C;if(Array.isArray(R)){const F=d.find(E=>R.includes(E.token)||E.token===S);if(F)throw new RangeError(`The format string mustn't contain \`${F.fullToken}\` and \`${T}\` at the same time`)}else if(C.incompatibleTokens==="*"&&d.length>0)throw new RangeError(`The format string mustn't contain \`${T}\` and any other token at the same time`);d.push({token:S,fullToken:T});const L=C.run(n,T,s.match,l);if(!L)return h();o.push(L.setter),n=L.rest}else{if(S.match(NT))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");if(T==="''"?T="'":S==="'"&&(T=FT(T)),n.indexOf(T)===0)n=n.slice(T.length);else return h()}}if(n.length>0&&OT.test(n))return h();const w=o.map(T=>T.priority).sort((T,S)=>S-T).filter((T,S,C)=>C.indexOf(T)===S).map(T=>o.filter(S=>S.priority===T).sort((S,C)=>C.subPriority-S.subPriority)).map(T=>T[0]);let b=wn(e,void 0);if(isNaN(+b))return h();const I={};for(const T of w){if(!T.validate(b,l))return h();const S=T.set(b,I,l);Array.isArray(S)?(b=S[0],Object.assign(I,S[1])):b=S}return b}function FT(n){return n.match(RT)[1].replace(LT,"'")}const PT="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAAAgCAYAAAALxXRVAAAAxHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjabVDbDcMwCPxnio5gc8TB4zhtKnWDjl8IJEranmReh84Are/Xk24OrkIyzdp6a8UgXToPC7QExmZrkc1uWJOy/FIn3gm2EswjUm3Zv9frIRBuWDSdhPSexHIluqS+fgnlz/CJPH6kUE8hcBA1BUasVVrX+bzCcuyW0HjkRvQ69k8+2/Uek/0D5hUVxSwgMQD8gTAsaGYBb6zmhxFeEWiK2UH+3WkHfQAmGFlDwtBoyQAAAYVpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW7UiFRE7iIhkqE7WQUUcaxWKUCHUCq06mLz0D5o0JCkujoJrwcGfxaqDi7OuDq6CIPgD4uripOgiJd6XFFrEeOHxPs675/DefYC/Xmaq2REDVM0yUom4kMmuCsFXdGEE/fBhQmKmPieKSXjW1z31Ud1FeZZ335/Vq+RMBvgE4hjTDYt4g3hm09I57xOHWVFSiM+Jxw26IPEj12WX3zgXHPbzzLCRTs0Th4mFQhvLbcyKhko8TRxRVI3y/RmXFc5bnNVylTXvyV8Yymkry1ynNYwEFrEEEQJkVFFCGRaitGukmEjRedzDP+T4RXLJ5CqBkWMBFaiQHD/4H/yerZmfmnSTQnGg88W2P0aB4C7QqNn297FtN06AwDNwpbX8lTow+0l6raVFjoC+beDiuqXJe8DlDjD4pEuG5EgBWv58Hng/o2/KAgO3QM+aO7fmOU4fgDTNKnkDHBwCYwXKXvd4d3f73P7tac7vB5UicrQ0WLbfAAANemlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAtRXhpdjIiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iCiAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgeG1sbnM6R0lNUD0iaHR0cDovL3d3dy5naW1wLm9yZy94bXAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgIHhtcE1NOkRvY3VtZW50SUQ9ImdpbXA6ZG9jaWQ6Z2ltcDozYjNlMzQ0NC03YTU4LTQxYjItYTZjYi0wMzljNWI3NjRmN2IiCiAgIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MGUxZjUyNzQtNTMyNC00MzE5LWE3MjYtOGQyNjJlNjI1Y2YwIgogICB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDkzZGI3ODgtMmQwNi00NjdhLWI2OGItZWJlNmJiNGU1ODQ2IgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJNYWMgT1MiCiAgIEdJTVA6VGltZVN0YW1wPSIxNjg4MTUzMjA5MTAxNDUxIgogICBHSU1QOlZlcnNpb249IjIuMTAuMzQiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICB0aWZmOk9yaWVudGF0aW9uPSIxIgogICB4bXA6Q3JlYXRvclRvb2w9IkdJTVAgMi4xMCIKICAgeG1wOk1ldGFkYXRhRGF0ZT0iMjAyMzowNjozMFQxMzoyNjo0OC0wNjowMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjM6MDY6MzBUMTM6MjY6NDgtMDY6MDAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDozNWQ3MTYyZi0xYWQ1LTQwNWUtODAxOS03NmExMTI4MDI1YmYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTWFjIE9TKSIKICAgICAgc3RFdnQ6d2hlbj0iMjAyMy0wNi0zMFQxMzoyNjo0OS0wNjowMCIvPgogICAgPC9yZGY6U2VxPgogICA8L3htcE1NOkhpc3Rvcnk+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5gv8dKAAAABmJLR0QA9QAHANj00CgxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wYeExoxB4CzXgAAB65JREFUeNrtnF9sFNcVh78z6z8kEwgPTUVxTZqYh2lVbAKVKleuiuEJkGzIAzFSpEQukaoqQUUhiUiLSkRD2hQ1FYmqqnEtUqUK7UPBVozUBzBpUHkproGXrVqXAoKgKg/EZKFre+f0YcftFs967/zz7rrze5y999yd2fn2d8+9ZwZSpUqVKlWqVKmMpb9vcvT9zB90xF6RXo1UYWWllyAcfEzPjKL6ddy7oymEqcJKTBvmmrN7gR8bNt9v550fLG74KIUui3Vft2zN3Ywaf+bm1zTJ79+w4o8Stu/OO7ToNNsUtgJtqqwEEOEGMCEwIo2ceO9+rifx3TvGtdUt0CuwBaVNxRtfuYEwoXDSyjB0Ya1cW1QABoQvEoTa2XkG1W8kc7bygZw7tyFm+GKFsBYB3HmHFneKAyr0oxVmTYIryqDVxIG4QHxsTFcWXF5R2GV4Uw9kLL7/53Vyo+6noCHhAziYa85+L3CvTOZAYmcbIXYF+ACcxTgd7ZukpzBFVmFXRfgAFEthV2GKbN8kPVHHbx/TnhnXG9/0t4JdMy7Z9jHtqWsAI8AXGkI5e/YMIh8k4n5nz55JCL5FCWHfJ+x2lePAAyG6P+Aqx/s+YXfY8dec12fVZQhYGqL7UnUZWnNen61LAGOAL7wTJuGCIWMGgG9RQdg3SY8Lbxi53jxu6MIbYZywfUx7UN6MnrTzZi07oZSBbx9w6J7DN4BXgU7gyTLx3gXOAd+FYoJcopftvPNaVXLBkLlfCPgi54S1kAPuvENLYYpsSOfz06eZJhzTnPCxMV0545It43y3LTgsGYaXN/E3gFtTrNYCPS7sLdenwcKJIye8fPIpe3Sy90WBXkXbihDJhMJQ97Kh1x/Z8k4uEoBlnO8ysAX4C7AK+Caw3we+Q16bNmAUaAm7MKNdXRuYmRmN565r6A46/YwIX2gIawHAJ27xdpCcy3Rh5DfLecbI/f6kvuOLcFoyPF1ulbNjXFu1wFFVNvqNf/Er8kyUcxj87e82UtBB4OEyTa6Qkf7+HY+fjgKg3w1wyIPHzTVnLe9f5vkSCI8D+4C/em3EA/anwOrSQHbeMV6Fi8UFQ7hfTPCFgrDaAO68Q0thmquRpp7+d5qbaWRVJRfsGNdWd4arfvBdXC+bjAA+r6f8ILQaWBV2i8KD75RZuiObTCE0vciPAl/INWfFzjsuMAn8HPgOcB14ZRY+r/3ngM97brngeVuUGDHDV3c5oU6zLXb4vHxQp9lWqZlboNdvCikZnjZmvdj2tmFso2mn53xmKujg5ZNP2XEC2Af0z86v7byjwEcehF3ApVn4cs3Z5cCPvM+aIv1pRl0RDbjymQB8dQeht8letdhSnDnde5MeDuJcF9bKNQsOm8Q20ehk74vzTDv99LDXJzYA8RZWDuaas0tKIJwGrpbA91ngW/Ms0iysCwbomyB89QZhW1Vj69w2kmE48H+vXx8Nd25CcOc07RN0qrEb+FmuOdvkQeiWwLfEc8nX4vzFQrtg0H2/6cIvEoTvvxDqv16taQfUOavXCxp7trysVLOrnUHk18cvtplza1tSfcLM9RuBh8os6Ewn8suFccGgfWTJDiCb6N0t8uE/rCd3kypVSADfBfbYeee653rirYpi5527wCDF1dB479ugLhii6kW25m5i3dedGIRF+DYH3SdaaHmF1VWLLTq3za2p/11JN5FfH7/YZtNJmUiqTxAA9wHP23nn45JjnwEe9bYdAG4BR5OAMJCjhcwbE4OwTuDzNFHV2DK3jRaCV9L49pFw56YwlFQfUwB/CPzazjv/nD3g5Xw/AY4Aa7wtCrXzzk3gV8DmqrhghJrPRCCsL/gQGKlmbIWT9x5zYW/HuLaajtMxrq1eVUzF2CbqXjb0OnAlQJcrXp/YAPzQzjvXSuB7CHib4mrnZor7gF8tccKPKO4FLrwLxrB3GBuEdQYfgDRyAsFNgD5XGjlR8YbM+DrHUi1wNID7HcWnJK1M7Ip6ZMs7OTLSb36fSr/pb+4H4As+xwZzzdkvefDZFCtgSrcatgEvAV/2IFwNHPSJsz9RF4zofrFCWIfwAbx3P9dFGYydP2XQpBb0wlq5JjAwByplY/t5PTWfE3aMa2u5KhiBgSgP6vbvePw0GdlUwQmvBKmC8b7XXM1TjP1t4IuU32o4Afyd4sZ9pGLssv9u89WIhqj5rDjeiL0C9+4o4CwEfGkx9v95MXYJhHE9jgQxv6LCt0Y04tPusUEY0flq5Yn4vkl6XOV45LI0wbWE7ceWBdtMbx/THu9ZwOjua9F7cZ0MU4Mqe3HtvHO4zHS0qvCVzfMSfJLeeDpap9NOPx1bxrAFeyLlg4JrwZ6g8AFcXCfDCM/FkHs+V6vwVVyEiQHCRF7ONCcXjDH3Cw3hIoLvPxA+yBFL2A58GmbaaQnbjz3IkbDjX1ovb4lFLz6F1Qa6LRa9l9bLW7V8jStOLyJAmOyb0UodL8n3yJhAuAjhK3XCTBOOwICRGwquwECmCSeM8/k5YYPljW+eVw00WDi17HwVc8CIOeGCvJZQOzvPACSV+xnlhDHDl76WsLwW42sJ61ra1bVBu7o2VGXsEXuFvp/5pelzX6lSpUqVKlWqVKlSpUpVA/o34/Ptc3zCsREAAAAASUVORK5CYII=",WT={props:{status:{type:String,required:!0},large:{type:Boolean},small:{type:Boolean},scale:{type:Number}},computed:{icons:function(){return PT},scaleFactor:function(){return this.scale?this.scale:this.large?1:this.small?.3:.5},iconStyle:function(){const n=qT.indexOf(my[this.status]),t=1-(n-1)*.05,e=224*this.scaleFactor*t,r=32*this.scaleFactor*t,v=32*this.scaleFactor*t;return[`background-image: url(${this.icons});`,`background-position-x: -${n*v}px;`,`background-size: ${e}px ${r}px;`,`height: ${v}px;`,`width: ${v}px;`,`padding-top: ${n-1}px;`].join("")}}};function BT(n,t,e,r,v,f){return Jn(),ci("div",{style:va(f.iconStyle)},null,4)}const zT=Ns(WT,[["render",BT]]),jT={props:{icon:{type:String},size:{type:String,default:"small"},color:{type:String,default:"white"}},computed:{colorStyle:function(){return{"--iconColor":this.color}}}};function HT(n,t,e,r,v,f){const y=Tn("rux-icon");return Jn(),_o(y,{size:e.size,icon:e.icon,style:va(f.colorStyle)},null,8,["size","icon","style"])}const UT=Ns(jT,[["render",HT],["__scopeId","data-v-9af48e85"]]),my={fatal:"critical",FATAL:"critical",error:"critical",ERROR:"critical",warn:"caution",WARN:"caution",info:"normal",INFO:"normal",debug:"off",DEBUG:"off",critical:"critical",CRITICAL:"critical",serious:"serious",SERIOUS:"serious",caution:"caution",CAUTION:"caution",normal:"normal",NORMAL:"normal",standby:"standby",STANDBY:"standby",off:"off",OFF:"OFF"},Jh={fatal:"#ff69B4",critical:"#ff3838",serious:"#ffb302",caution:"#fce83a",normal:"#56f000",standby:"#2dccff",off:"#a4abb6"},VT=function(n){const t="#000000",e="#ffffff",r=Jh[my[n]];if(r){const v=+`0x${r.slice(1,3)}`,f=+`0x${r.slice(3,5)}`,y=+`0x${r.slice(5,7)}`;if((v*299+f*587+y*114)/1e3>128)return t}return e},qT=Object.keys(Jh),KT={astro:{component:n=>Os(UT,{...n})},"astro-status":{component:n=>Os(zT,{...n,status:n.icon})}},GT={extras:{component:n=>Os(Lb,{...n})}},vy="single-spa:app-change",YT={data(){return{show:!1}},created(){window.addEventListener(vy,this.handleAppChange)},mounted(){setTimeout(()=>{this.show=hp().length===0},150)},unmounted(){window.removeEventListener(vy,this.handleAppChange)},methods:{handleAppChange:function(n){this.show=!n.detail.appsByNewStatus.MOUNTED}}},XT={class:"mx-1"};function QT(n,t,e,r,v,f){const y=Tn("v-card-title"),x=Tn("v-card-text"),h=Tn("v-card");return v.show?(Jn(),_o(h,{key:0},{default:sr(()=>[ln(y,null,{default:sr(()=>t[0]||(t[0]=[ui(" 404 Not Found ")])),_:1}),ln(x,{class:"d-flex align-center mt-3"},{default:sr(()=>[t[1]||(t[1]=ui(" The requested URL ")),Ls("code",XT,hi(n.$route.fullPath),1),t[2]||(t[2]=ui(" was not routable. ")),t[3]||(t[3]=Ls("span",{class:"text-h3 mx-1"}," 🦄 ",-1))]),_:1})]),_:1})):$o("",!0)}const yy=[{path:"/:target?/:packet?",name:"Handbooks",component:()=>ot(()=>it.import("./Handbooks-6cf6cebc8d43a1fe411a.js"),void 0)},{path:"/:pathMatch(.*)*",name:"NotFound",component:Ns(YT,[["render",QT]])}];yy.forEach(fp);const ZT=cp({history:up(),routes:yy}),JT={dark:!0,colors:{primary:"#005A8F",secondary:"#4DACFF",tertiary:"#BBC1C9","openc3-green":"#56f000","openc3-yellow":"#fce83a","openc3-red":"#ff3838","openc3-blue":"#2dccff","openc3-purple":"#c800c8","openc3-black":"#ffffff","openc3-white":"#ffffff"}},eM={data:function(){return{show:!1,params:{title:"Title",text:"The text that is displayed",okText:"Ok",okClass:"primary",validateText:"CONFIRM",cancelText:"Cancel",html:!1},resolve:null,reject:null,validationText:null,rules:{required:n=>!!n||"Required.",match:n=>n===this.params.validateText||"Value mismatch."}}},computed:{dataTestOk:function(){return`confirm-dialog-${this.params.okText.toLowerCase()}`},dataTestCancel:function(){return`confirm-dialog-${this.params.cancelText.toLowerCase()}`}},methods:{dialog:function(n,t,e){this.params=n,this.show=!0,this.resolve=t,this.reject=e},ok:function(){(!this.params.validateText||this.params.validateText===this.validationText)&&(this.show=!1,this.resolve(!0),this.refresh())},cancel:function(){this.show=!1,this.reject(!0),this.refresh()},refresh:function(){this.validationText=""}}},tM=["innerHTML"],nM={key:2},rM={key:3,class:"validate mt-4"};function iM(n,t,e,r,v,f){const y=Tn("v-spacer"),x=Tn("v-toolbar"),h=Tn("v-icon"),p=Tn("v-text-field"),s=Tn("v-card-text"),a=Tn("v-btn"),u=Tn("v-card-actions"),l=Tn("v-card"),o=Tn("v-dialog"),c=Tn("v-app");return Jn(),_o(c,null,{default:sr(()=>[ln(o,{modelValue:n.show,"onUpdate:modelValue":t[1]||(t[1]=d=>n.show=d),width:"600"},{default:sr(()=>[ln(l,null,{default:sr(()=>[ln(x,{height:"24"},{default:sr(()=>[ln(y),Ls("span",null,hi(n.params.title),1),ln(y)]),_:1}),ln(s,{class:"mt-4 pa-3"},{default:sr(()=>[n.params.validateText?(Jn(),_o(h,{key:0,class:"mr-2"},{default:sr(()=>t[2]||(t[2]=[ui(" mdi-alert ")])),_:1})):$o("",!0),n.params.html?(Jn(),ci("span",{key:1,innerHTML:n.params.text},null,8,tM)):(Jn(),ci("span",nM,hi(n.params.text),1)),n.params.validateText?(Jn(),ci("div",rM,[ui(" Enter "+hi(n.params.validateText)+" to confirm! ",1),ln(p,{modelValue:n.validationText,"onUpdate:modelValue":t[0]||(t[0]=d=>n.validationText=d),variant:"solo",density:"compact","single-line":"",rules:[n.rules.required,n.rules.match],"data-test":"confirm-dialog-validate"},null,8,["modelValue","rules"])])):$o("",!0)]),_:1}),ln(u,{class:"px-2"},{default:sr(()=>[ln(y),n.params.cancelText?(Jn(),_o(a,{key:0,variant:"outlined","data-test":f.dataTestCancel,onClick:f.cancel},{default:sr(()=>[ui(hi(n.params.cancelText),1)]),_:1},8,["data-test","onClick"])):$o("",!0),ln(a,{variant:"flat",color:n.params.okClass,"data-test":f.dataTestOk,onClick:f.ok},{default:sr(()=>[ui(hi(n.params.okText),1)]),_:1},8,["color","data-test","onClick"])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}const oM=Ns(eM,[["render",iM],["__scopeId","data-v-de532a0f"]]);class sM{constructor(){this.mounted=!1,this.$root=null}mount(){if(this.mounted)return;const t=window.Vue.createApp(oM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({title:t,text:e,okText:r,okClass:v,validateText:f,cancelText:y,html:x}){return this.mount(),new Promise((h,p)=>{this.$root.dialog({title:t,text:e,okText:r,okClass:v,validateText:f,cancelText:y,html:x},h,p)})}confirm(t,{okText:e="Ok",cancelText:r="Cancel",okClass:v="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:v,validateText:null,cancelText:r,html:!1})}alert(t,{okText:e="Ok",html:r=!1,okClass:v="primary"}){return this.open({title:"Alert",text:t,okText:e,okClass:v,validateText:null,cancelText:null,html:r})}validate(t,{okText:e="Ok",validateText:r="CONFIRM",cancelText:v="Cancel",okClass:f="primary"}){return this.open({title:"Confirm",text:t,okText:e,okClass:f,validateText:r,cancelText:v,html:!1})}}const aM={install(n,t){const e=new sM;n.provide("dialog",e),n.config.globalProperties.hasOwnProperty("$dialog")||(n.config.globalProperties.$dialog=e)}},lM={data:function(){return{showToast:!1,expanded:!1,toastNotification:{title:"Title here",body:"This is the notification body",message:"Overall message here"},timeout:null,noToastPaths:["/login"]}},computed:{toastNotificationIcon:function(){switch(this.toastNotification.type){case"notification":return"mdi-bell";case"alert":default:return"mdi-alert-box"}},toastStyle:function(){return`
1495
1495
  --toast-bg-color:${Jh[this.toastNotification.level]};
1496
1496
  --toast-fg-color:${VT(this.toastNotification.level)};
1497
1497
  `},contentStyle:function(){return`
1498
1498
  white-space: ${this.expanded?"normal":"nowrap"};
1499
1499
  overflow-x: ${this.expanded?"visible":"hidden"};
1500
1500
  text-overflow: ${this.expanded?"unset":"ellipsis"};
1501
- `}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},cM={key:0,class:"text-subtitle-1 mr-1 notification-text"},uM={key:1,class:"text-body-2 notification-text"},hM={key:2,class:"text-body-2 notification-text"};function dM(n,t,e,r,v,f){const y=$n("v-icon"),x=$n("v-spacer"),h=$n("v-btn"),p=$n("v-sheet"),s=$n("v-slide-y-transition");return Zn(),_o(s,null,{default:or(()=>[op(ln(p,{style:va(f.toastStyle),class:"toast-notification",onClick:f.expand},{default:or(()=>[ln(y,{class:"mr-1 notification-text"},{default:or(()=>[ui(hi(f.toastNotificationIcon),1)]),_:1}),Ls("div",{class:"toast-content",style:va(f.contentStyle)},[n.toastNotification.title?(Zn(),ci("span",cM,[n.toastNotification.body||n.toastNotification.message?(Zn(),ci(qc,{key:0},[ui(hi(n.toastNotification.title)+": ",1)],64)):(Zn(),ci(qc,{key:1},[ui(hi(n.toastNotification.title),1)],64))])):$o("",!0),n.toastNotification.body?(Zn(),ci("span",uM,hi(n.toastNotification.body),1)):$o("",!0),n.toastNotification.message?(Zn(),ci("span",hM,hi(n.toastNotification.message),1)):$o("",!0)],4),ln(x),ln(h,{variant:"text",class:"notification-text",onClick:sp(f.hide,["stop"])},{default:or(()=>t[0]||(t[0]=[ui(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ap,n.showToast]])]),_:1})}const pM=Ns(lM,[["render",dM],["__scopeId","data-v-84833581"]]);class gM{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=Vc(pM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:v,level:f,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:p=!0}){this.mount(),h&&console.log(v?`${f.toUpperCase()} - ${v}`:`${f.toUpperCase()} - ${e}: ${r}`),p&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:v,level:f}),this[t]({title:e,body:r,message:v,level:f,duration:y,type:x})}toast({title:t,body:e,message:r,level:v,duration:f,type:y}){this.$root.toast({title:t,body:e,message:r,level:v,type:y},f)}critical({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}}const fM={install(n,t){const e=new gM(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},wy=100,by=dp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory:(n,t)=>{n.notifyHistory.length>=wy&&(n.notifyHistory.length=wy-1),n.notifyHistory.unshift(t)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,t)=>{Object.assign(n.namedWidgets,t)},clearNamedWidget:(n,t)=>{delete n.namedWidgets[t]}},modules:{}});function xy(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function mM(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Cy(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const v in n)r[v]=n[v];for(const v in t){const f=n[v],y=t[v];if(xy(f)&&xy(y)){r[v]=Cy(f,y,e);continue}if(e&&Array.isArray(f)&&Array.isArray(y)){r[v]=e(f,y);continue}r[v]=y}return r}function Ba(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ba.cache.has(n))return Ba.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ba.cache.set(n,t),t}Ba.cache=new Map;function vM(n){Jd(`Vuetify: ${n}`)}function ky(n,t){return e=>Object.keys(n).reduce((r,v)=>{const f=typeof n[v]=="object"&&n[v]!=null&&!Array.isArray(n[v])?n[v]:{type:n[v]};return e&&v in e?r[v]={...f,default:e[v]}:r[v]=f,t&&!r[v].source&&(r[v].source=t),r},{})}function Sy(n,t){const e=rp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function yM(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sy("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const ed=Symbol.for("vuetify:defaults");function Ay(){const n=ep(ed);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function wM(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ba(t)]<"u")}function bM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ay();const r=Sy("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const v=Uc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),f=new Proxy(n,{get(h,p){var s,a,u,l;const o=Reflect.get(h,p);if(p==="class"||p==="style")return[(s=v.value)==null?void 0:s[p],o].filter(w=>w!=null);if(wM(r.vnode,p))return o;const c=(a=v.value)==null?void 0:a[p];if(c!==void 0)return c;const d=(l=(u=e.value)==null?void 0:u.global)==null?void 0:l[p];return d!==void 0?d:o}}),y=tp();np(()=>{if(v.value){const h=Object.entries(v.value).filter(p=>{let[s]=p;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=yM(ed,r);ip(ed,Uc(()=>y.value?Cy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:f,provideSubDefaults:x}}function lc(n){if(n._setup=n._setup??n.setup,!n.name)return vM("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=ky(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return mM(e,t)},n.props._as=String,n.setup=function(e,r){const v=Ay();if(!v.value)return n._setup(e,r);const{props:f,provideSubDefaults:y}=bM(e,e._as??n.name,v),x=n._setup(f,r);return y(),x}}return n}function xM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?lc:Zd)(t)}const CM=[String,Function,Object,Array],cc=ky({icon:{type:CM},tag:{type:[String,Object,Function],required:!0}},"icon");xM()({name:"VComponentIcon",props:cc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return ln(n.tag,null,{default:()=>{var v;return[n.icon?ln(r,null,null):(v=e.default)==null?void 0:v.call(e)]}})}}}),lc({name:"VSvgIcon",inheritAttrs:!1,props:cc(),setup(n,t){let{attrs:e}=t;return()=>ln(n.tag,lp(e,{style:null}),{default:()=>[ln("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?ln("path",{d:r[0],"fill-opacity":r[1]},null):ln("path",{d:r},null)):ln("path",{d:n.icon},null)])]})}}),lc({name:"VLigatureIcon",props:cc(),setup(n){return()=>ln(n.tag,null,{default:()=>[n.icon]})}});const kM=lc({name:"VClassIcon",props:cc(),setup(n){return()=>ln(n.tag,{class:n.icon},null)}}),SM={component:n=>Os(kM,{...n,class:"mdi"})},td=pp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:JT}},icons:{defaultSet:"mdi",sets:{mdi:SM,...KT,...GT}}}),nd=wb({createApp:Vc,appOptions:{render(){return Os($b,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(ZT),n.use(by),n.use(td),n.use(aM),n.use(fM,{store:by})}}),vN=Tr("e",nd.bootstrap),yN=Tr("f",nd.mount),wN=Tr("u",nd.unmount)}}});
1501
+ `}},methods:{toast:function(n,t){this.noToastPaths.includes(window.location.pathname)||(t===void 0&&(t=5e3),this.toastNotification=n,this.showToast=!0,this.cancelAutohide(),t&&(this.timeout=setTimeout(()=>{this.hide()},t)))},hide:function(){this.cancelAutohide(),this.showToast=!1},cancelAutohide:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},expand:function(){this.cancelAutohide(),this.expanded=!0}}},cM={key:0,class:"text-subtitle-1 mr-1 notification-text"},uM={key:1,class:"text-body-2 notification-text"},hM={key:2,class:"text-body-2 notification-text"};function dM(n,t,e,r,v,f){const y=Tn("v-icon"),x=Tn("v-spacer"),h=Tn("v-btn"),p=Tn("v-sheet"),s=Tn("v-slide-y-transition");return Jn(),_o(s,null,{default:sr(()=>[op(ln(p,{style:va(f.toastStyle),class:"toast-notification",onClick:f.expand},{default:sr(()=>[ln(y,{class:"mr-1 notification-text"},{default:sr(()=>[ui(hi(f.toastNotificationIcon),1)]),_:1}),Ls("div",{class:"toast-content",style:va(f.contentStyle)},[n.toastNotification.title?(Jn(),ci("span",cM,[n.toastNotification.body||n.toastNotification.message?(Jn(),ci(qc,{key:0},[ui(hi(n.toastNotification.title)+": ",1)],64)):(Jn(),ci(qc,{key:1},[ui(hi(n.toastNotification.title),1)],64))])):$o("",!0),n.toastNotification.body?(Jn(),ci("span",uM,hi(n.toastNotification.body),1)):$o("",!0),n.toastNotification.message?(Jn(),ci("span",hM,hi(n.toastNotification.message),1)):$o("",!0)],4),ln(x),ln(h,{variant:"text",class:"notification-text",onClick:sp(f.hide,["stop"])},{default:sr(()=>t[0]||(t[0]=[ui(" Dismiss ")])),_:1},8,["onClick"])]),_:1},8,["style","onClick"]),[[ap,n.showToast]])]),_:1})}const pM=Ns(lM,[["render",dM],["__scopeId","data-v-84833581"]]);class gM{constructor(t={}){var e;this.$store=t.store,this.mounted=!1,this.$root=null,(e=window.$cosmosNotify)!=null&&e.$root?(this.mounted=!0,this.$root=window.$cosmosNotify.$root):window.$cosmosNotify=this}mount(){if(this.mounted)return;const t=Vc(pM);t.use(td);const e=document.createElement("div");document.querySelector("#openc3-app-toolbar > div").appendChild(e),this.$root=t.mount(e),this.mounted=!0}open({method:t,title:e,body:r,message:v,level:f,duration:y,type:x="alert",logToConsole:h=!1,saveToHistory:p=!0}){this.mount(),h&&console.log(v?`${f.toUpperCase()} - ${v}`:`${f.toUpperCase()} - ${e}: ${r}`),p&&this.$store.commit("notifyAddHistory",{title:e,body:r,message:v,level:f}),this[t]({title:e,body:r,message:v,level:f,duration:y,type:x})}toast({title:t,body:e,message:r,level:v,duration:f,type:y}){this.$root.toast({title:t,body:e,message:r,level:v,type:y},f)}critical({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"critical",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}FATAL(t){this.critical(t)}ERROR(t){this.critical(t)}serious({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"serious",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}caution({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"caution",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}WARN(t){this.caution(t)}normal({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"normal",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}INFO(t){this.normal(t)}DEBUG(t){this.normal(t)}standby({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"standby",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}off({title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x}){this.open({method:"toast",level:"off",title:t,body:e,message:r,type:v,duration:f,logToConsole:y,saveToHistory:x})}}const fM={install(n,t){const e=new gM(t);n.provide("notify",e),n.config.globalProperties.hasOwnProperty("$notify")||(n.config.globalProperties.$notify=e)}},wy=100,by=dp({state:{notifyHistory:[],namedWidgets:{}},getters:{namedWidget:n=>t=>n.namedWidgets[t]},mutations:{notifyAddHistory:(n,t)=>{n.notifyHistory.length>=wy&&(n.notifyHistory.length=wy-1),n.notifyHistory.unshift(t)},notifyClearHistory:n=>{n.notifyHistory=[]},setNamedWidget:(n,t)=>{Object.assign(n.namedWidgets,t)},clearNamedWidget:(n,t)=>{delete n.namedWidgets[t]}},modules:{}});function xy(n){let t;return n!==null&&typeof n=="object"&&((t=Object.getPrototypeOf(n))===Object.prototype||t===null)}function mM(n,t){const e={};for(const r of t)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}function Cy(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2?arguments[2]:void 0;const r={};for(const v in n)r[v]=n[v];for(const v in t){const f=n[v],y=t[v];if(xy(f)&&xy(y)){r[v]=Cy(f,y,e);continue}if(e&&Array.isArray(f)&&Array.isArray(y)){r[v]=e(f,y);continue}r[v]=y}return r}function Ba(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(Ba.cache.has(n))return Ba.cache.get(n);const t=n.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return Ba.cache.set(n,t),t}Ba.cache=new Map;function vM(n){Jd(`Vuetify: ${n}`)}function ky(n,t){return e=>Object.keys(n).reduce((r,v)=>{const f=typeof n[v]=="object"&&n[v]!=null&&!Array.isArray(n[v])?n[v]:{type:n[v]};return e&&v in e?r[v]={...f,default:e[v]}:r[v]=f,t&&!r[v].source&&(r[v].source=t),r},{})}function Sy(n,t){const e=rp();if(!e)throw new Error(`[Vuetify] ${n} must be called from inside a setup function`);return e}function yM(n){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Sy("injectSelf");const{provides:e}=t;if(e&&n in e)return e[n]}const ed=Symbol.for("vuetify:defaults");function Ay(){const n=ep(ed);if(!n)throw new Error("[Vuetify] Could not find defaults instance");return n}function wM(n,t){return n.props&&(typeof n.props[t]<"u"||typeof n.props[Ba(t)]<"u")}function bM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ay();const r=Sy("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const v=Uc(()=>{var h;return(h=e.value)==null?void 0:h[n._as??t]}),f=new Proxy(n,{get(h,p){var s,a,u,l;const o=Reflect.get(h,p);if(p==="class"||p==="style")return[(s=v.value)==null?void 0:s[p],o].filter(w=>w!=null);if(wM(r.vnode,p))return o;const c=(a=v.value)==null?void 0:a[p];if(c!==void 0)return c;const d=(l=(u=e.value)==null?void 0:u.global)==null?void 0:l[p];return d!==void 0?d:o}}),y=tp();np(()=>{if(v.value){const h=Object.entries(v.value).filter(p=>{let[s]=p;return s.startsWith(s[0].toUpperCase())});y.value=h.length?Object.fromEntries(h):void 0}else y.value=void 0});function x(){const h=yM(ed,r);ip(ed,Uc(()=>y.value?Cy((h==null?void 0:h.value)??{},y.value):h==null?void 0:h.value))}return{props:f,provideSubDefaults:x}}function lc(n){if(n._setup=n._setup??n.setup,!n.name)return vM("The component is missing an explicit name, unable to generate default prop value"),n;if(n._setup){n.props=ky(n.props??{},n.name)();const t=Object.keys(n.props).filter(e=>e!=="class"&&e!=="style");n.filterProps=function(e){return mM(e,t)},n.props._as=String,n.setup=function(e,r){const v=Ay();if(!v.value)return n._setup(e,r);const{props:f,provideSubDefaults:y}=bM(e,e._as??n.name,v),x=n._setup(f,r);return y(),x}}return n}function xM(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(n?lc:Zd)(t)}const CM=[String,Function,Object,Array],cc=ky({icon:{type:CM},tag:{type:[String,Object,Function],required:!0}},"icon");xM()({name:"VComponentIcon",props:cc(),setup(n,t){let{slots:e}=t;return()=>{const r=n.icon;return ln(n.tag,null,{default:()=>{var v;return[n.icon?ln(r,null,null):(v=e.default)==null?void 0:v.call(e)]}})}}}),lc({name:"VSvgIcon",inheritAttrs:!1,props:cc(),setup(n,t){let{attrs:e}=t;return()=>ln(n.tag,lp(e,{style:null}),{default:()=>[ln("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(n.icon)?n.icon.map(r=>Array.isArray(r)?ln("path",{d:r[0],"fill-opacity":r[1]},null):ln("path",{d:r},null)):ln("path",{d:n.icon},null)])]})}}),lc({name:"VLigatureIcon",props:cc(),setup(n){return()=>ln(n.tag,null,{default:()=>[n.icon]})}});const kM=lc({name:"VClassIcon",props:cc(),setup(n){return()=>ln(n.tag,{class:n.icon},null)}}),SM={component:n=>Os(kM,{...n,class:"mdi"})},td=pp({theme:{defaultTheme:"cosmosDark",themes:{cosmosDark:JT}},icons:{defaultSet:"mdi",sets:{mdi:SM,...KT,...GT}}}),nd=wb({createApp:Vc,appOptions:{render(){return Os($b,{})},el:"#openc3-tool"},handleInstance:n=>{n.use(ZT),n.use(by),n.use(td),n.use(aM),n.use(fM,{store:by})}}),vN=Tr("e",nd.bootstrap),yN=Tr("f",nd.mount),wN=Tr("u",nd.unmount)}}});