mihari 7.0.4 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mihari/analyzers/base.rb +9 -1
- data/lib/mihari/cli/application.rb +12 -9
- data/lib/mihari/clients/fofa.rb +4 -1
- data/lib/mihari/commands/alert.rb +37 -2
- data/lib/mihari/commands/artifact.rb +37 -2
- data/lib/mihari/commands/config.rb +1 -1
- data/lib/mihari/commands/rule.rb +37 -2
- data/lib/mihari/commands/tag.rb +37 -2
- data/lib/mihari/concerns/error_unwrappable.rb +3 -2
- data/lib/mihari/concerns/retriable.rb +24 -11
- data/lib/mihari/data_type.rb +3 -3
- data/lib/mihari/emitters/webhook.rb +15 -53
- data/lib/mihari/errors.rb +35 -9
- data/lib/mihari/http.rb +1 -6
- data/lib/mihari/rule.rb +16 -2
- data/lib/mihari/services/renderer.rb +31 -0
- data/lib/mihari/structs/fofa.rb +5 -0
- data/lib/mihari/version.rb +1 -1
- data/lib/mihari/web/endpoints/ip_addresses.rb +1 -1
- data/lib/mihari/web/public/assets/{index-yeHDhqt5.js → index-U5u7qHZZ.js} +47 -47
- data/lib/mihari/web/public/index.html +1 -1
- data/lib/mihari.rb +1 -0
- data/mihari.gemspec +5 -2
- data/test.json.jbuilder +7 -0
- metadata +51 -7
@@ -1,6 +1,6 @@
|
|
1
|
-
var Sp=Object.defineProperty;var Cp=(e,t,n)=>t in e?Sp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>(Cp(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const u of f)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function n(f){const u={};return f.integrity&&(u.integrity=f.integrity),f.referrerPolicy&&(u.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?u.credentials="include":f.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(f){if(f.ep)return;f.ep=!0;const u=n(f);fetch(f.href,u)}})();function
|
1
|
+
var Sp=Object.defineProperty;var Cp=(e,t,n)=>t in e?Sp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Te=(e,t,n)=>(Cp(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const u of f)if(u.type==="childList")for(const h of u.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function n(f){const u={};return f.integrity&&(u.integrity=f.integrity),f.referrerPolicy&&(u.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?u.credentials="include":f.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(f){if(f.ep)return;f.ep=!0;const u=n(f);fetch(f.href,u)}})();function Fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fl(Object(n),!0).forEach(function(r){tt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fl(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function io(e){"@babel/helpers - typeof";return io=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},io(e)}function Ap(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kp(e,t,n){return t&&Nl(e.prototype,t),n&&Nl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e,t){return Rp(e)||Tp(e,t)||Tu(e,t)||Mp()}function pi(e){return Ep(e)||xp(e)||Tu(e)||Lp()}function Ep(e){if(Array.isArray(e))return Ns(e)}function Rp(e){if(Array.isArray(e))return e}function xp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tp(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],f=!0,u=!1,h,g;try{for(n=n.call(e);!(f=(h=n.next()).done)&&(r.push(h.value),!(t&&r.length===t));f=!0);}catch(s){u=!0,g=s}finally{try{!f&&n.return!=null&&n.return()}finally{if(u)throw g}}return r}}function Tu(e,t){if(e){if(typeof e=="string")return Ns(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ns(e,t)}}function Ns(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Dl=function(){},xa={},Lu={},Mu=null,Ou={mark:Dl,measure:Dl};try{typeof window<"u"&&(xa=window),typeof document<"u"&&(Lu=document),typeof MutationObserver<"u"&&(Mu=MutationObserver),typeof performance<"u"&&(Ou=performance)}catch{}var Op=xa.navigator||{},Pl=Op.userAgent,Bl=Pl===void 0?"":Pl,Sn=xa,je=Lu,Wl=Mu,xi=Ou;Sn.document;var on=!!je.documentElement&&!!je.head&&typeof je.addEventListener=="function"&&typeof je.createElement=="function",Iu=~Bl.indexOf("MSIE")||~Bl.indexOf("Trident/"),Ti,Li,Mi,Oi,Ii,tn="___FONT_AWESOME___",Ds=16,Fu="fa",Nu="svg-inline--fa",Vn="data-fa-i2svg",Ps="data-fa-pseudo-element",Ip="data-fa-pseudo-element-pending",Ta="data-prefix",La="data-icon",Hl="fontawesome-i2svg",Fp="async",Np=["HTML","HEAD","STYLE","SCRIPT"],Du=function(){try{return!0}catch{return!1}}(),Ve="classic",Ze="sharp",Ma=[Ve,Ze];function gi(e){return new Proxy(e,{get:function(n,r){return r in n?n[r]:n[Ve]}})}var Jr=gi((Ti={},tt(Ti,Ve,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit",fakd:"kit","fa-kit":"kit","fa-kit-duotone":"kit"}),tt(Ti,Ze,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"}),Ti)),Qr=gi((Li={},tt(Li,Ve,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),tt(Li,Ze,{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"}),Li)),ei=gi((Mi={},tt(Mi,Ve,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),tt(Mi,Ze,{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"}),Mi)),Dp=gi((Oi={},tt(Oi,Ve,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),tt(Oi,Ze,{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"}),Oi)),Pp=/fa(s|r|l|t|d|b|k|ss|sr|sl|st)?[\-\ ]/,Pu="fa-layers-text",Bp=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,Wp=gi((Ii={},tt(Ii,Ve,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),tt(Ii,Ze,{900:"fass",400:"fasr",300:"fasl",100:"fast"}),Ii)),Bu=[1,2,3,4,5,6,7,8,9,10],Hp=Bu.concat([11,12,13,14,15,16,17,18,19,20]),Up=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Nn={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},ti=new Set;Object.keys(Qr[Ve]).map(ti.add.bind(ti));Object.keys(Qr[Ze]).map(ti.add.bind(ti));var zp=[].concat(Ma,pi(ti),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Nn.GROUP,Nn.SWAP_OPACITY,Nn.PRIMARY,Nn.SECONDARY]).concat(Bu.map(function(e){return"".concat(e,"x")})).concat(Hp.map(function(e){return"w-".concat(e)})),Hr=Sn.FontAwesomeConfig||{};function Vp(e){var t=je.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function jp(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(je&&typeof je.querySelector=="function"){var Gp=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];Gp.forEach(function(e){var t=Ra(e,2),n=t[0],r=t[1],f=jp(Vp(n));f!=null&&(Hr[r]=f)})}var Wu={styleDefault:"solid",familyDefault:"classic",cssPrefix:Fu,replacementClass:Nu,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Hr.familyPrefix&&(Hr.cssPrefix=Hr.familyPrefix);var dr=ge(ge({},Wu),Hr);dr.autoReplaceSvg||(dr.observeMutations=!1);var we={};Object.keys(Wu).forEach(function(e){Object.defineProperty(we,e,{enumerable:!0,set:function(n){dr[e]=n,Ur.forEach(function(r){return r(we)})},get:function(){return dr[e]}})});Object.defineProperty(we,"familyPrefix",{enumerable:!0,set:function(t){dr.cssPrefix=t,Ur.forEach(function(n){return n(we)})},get:function(){return dr.cssPrefix}});Sn.FontAwesomeConfig=we;var Ur=[];function Kp(e){return Ur.push(e),function(){Ur.splice(Ur.indexOf(e),1)}}var un=Ds,Bt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Yp(e){if(!(!e||!on)){var t=je.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=je.head.childNodes,r=null,f=n.length-1;f>-1;f--){var u=n[f],h=(u.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(h)>-1&&(r=u)}return je.head.insertBefore(t,r),e}}var Xp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function ni(){for(var e=12,t="";e-- >0;)t+=Xp[Math.random()*62|0];return t}function Sr(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Oa(e){return e.classList?Sr(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function Hu(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Zp(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(Hu(e[n]),'" ')},"").trim()}function Co(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function Ia(e){return e.size!==Bt.size||e.x!==Bt.x||e.y!==Bt.y||e.rotate!==Bt.rotate||e.flipX||e.flipY}function qp(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,f={transform:"translate(".concat(n/2," 256)")},u="translate(".concat(t.x*32,", ").concat(t.y*32,") "),h="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),g="rotate(".concat(t.rotate," 0 0)"),s={transform:"".concat(u," ").concat(h," ").concat(g)},p={transform:"translate(".concat(r/2*-1," -256)")};return{outer:f,inner:s,path:p}}function Jp(e){var t=e.transform,n=e.width,r=n===void 0?Ds:n,f=e.height,u=f===void 0?Ds:f,h=e.startCentered,g=h===void 0?!1:h,s="";return g&&Iu?s+="translate(".concat(t.x/un-r/2,"em, ").concat(t.y/un-u/2,"em) "):g?s+="translate(calc(-50% + ".concat(t.x/un,"em), calc(-50% + ").concat(t.y/un,"em)) "):s+="translate(".concat(t.x/un,"em, ").concat(t.y/un,"em) "),s+="scale(".concat(t.size/un*(t.flipX?-1:1),", ").concat(t.size/un*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var Qp=`:root, :host {
|
4
4
|
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";
|
5
5
|
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";
|
6
6
|
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";
|
@@ -757,35 +757,35 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
757
757
|
.fad.fa-inverse,
|
758
758
|
.fa-duotone.fa-inverse {
|
759
759
|
color: var(--fa-inverse, #fff);
|
760
|
-
}`;function Uu(){var e=Fu,t=Nu,n=we.cssPrefix,r=we.replacementClass,f=Qp;if(n!==e||r!==t){var u=new RegExp("\\.".concat(e,"\\-"),"g"),h=new RegExp("\\--".concat(e,"\\-"),"g"),g=new RegExp("\\.".concat(t),"g");f=f.replace(u,".".concat(n,"-")).replace(h,"--".concat(n,"-")).replace(g,".".concat(r))}return f}var Hl=!1;function hs(){we.autoAddCss&&!Hl&&(Yp(Uu()),Hl=!0)}var eg={mixout:function(){return{dom:{css:Uu,insertCss:hs}}},hooks:function(){return{beforeDOMElementCreation:function(){hs()},beforeI2svg:function(){hs()}}}},rn=Cn||{};rn[nn]||(rn[nn]={});rn[nn].styles||(rn[nn].styles={});rn[nn].hooks||(rn[nn].hooks={});rn[nn].shims||(rn[nn].shims=[]);var It=rn[nn],zu=[],tg=function e(){je.removeEventListener("DOMContentLoaded",e),oo=1,zu.map(function(t){return t()})},oo=!1;sn&&(oo=(je.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(je.readyState),oo||je.addEventListener("DOMContentLoaded",tg));function ng(e){sn&&(oo?setTimeout(e,0):zu.push(e))}function mi(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,f=e.children,u=f===void 0?[]:f;return typeof e=="string"?Hu(e):"<".concat(t," ").concat(Zp(r),">").concat(u.map(mi).join(""),"</").concat(t,">")}function Ul(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var rg=function(t,n){return function(r,f,u,h){return t.call(n,r,f,u,h)}},fs=function(t,n,r,f){var u=Object.keys(t),h=u.length,g=f!==void 0?rg(n,f):n,s,p,o;for(r===void 0?(s=1,o=t[u[0]]):(s=0,o=r);s<h;s++)p=u[s],o=g(o,t[p],p,t);return o};function ig(e){for(var t=[],n=0,r=e.length;n<r;){var f=e.charCodeAt(n++);if(f>=55296&&f<=56319&&n<r){var u=e.charCodeAt(n++);(u&64512)==56320?t.push(((f&1023)<<10)+(u&1023)+65536):(t.push(f),n--)}else t.push(f)}return t}function Bs(e){var t=ig(e);return t.length===1?t[0].toString(16):null}function og(e,t){var n=e.length,r=e.charCodeAt(t),f;return r>=55296&&r<=56319&&n>t+1&&(f=e.charCodeAt(t+1),f>=56320&&f<=57343)?(r-55296)*1024+f-56320+65536:r}function zl(e){return Object.keys(e).reduce(function(t,n){var r=e[n],f=!!r.icon;return f?t[r.iconName]=r.icon:t[n]=r,t},{})}function Ws(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,f=r===void 0?!1:r,u=zl(t);typeof It.hooks.addPack=="function"&&!f?It.hooks.addPack(e,zl(t)):It.styles[e]=ge(ge({},It.styles[e]||{}),u),e==="fas"&&Ws("fa",t)}var Fi,Ni,Di,or=It.styles,sg=It.shims,ag=(Fi={},tt(Fi,Ve,Object.values(ti[Ve])),tt(Fi,Ze,Object.values(ti[Ze])),Fi),Ia=null,Vu={},ju={},Gu={},Ku={},Yu={},lg=(Ni={},tt(Ni,Ve,Object.keys(Qr[Ve])),tt(Ni,Ze,Object.keys(Qr[Ze])),Ni);function cg(e){return~zp.indexOf(e)}function ug(e,t){var n=t.split("-"),r=n[0],f=n.slice(1).join("-");return r===e&&f!==""&&!cg(f)?f:null}var Xu=function(){var t=function(u){return fs(or,function(h,g,s){return h[s]=fs(g,u,{}),h},{})};Vu=t(function(f,u,h){if(u[3]&&(f[u[3]]=h),u[2]){var g=u[2].filter(function(s){return typeof s=="number"});g.forEach(function(s){f[s.toString(16)]=h})}return f}),ju=t(function(f,u,h){if(f[h]=h,u[2]){var g=u[2].filter(function(s){return typeof s=="string"});g.forEach(function(s){f[s]=h})}return f}),Yu=t(function(f,u,h){var g=u[2];return f[h]=h,g.forEach(function(s){f[s]=h}),f});var n="far"in or||we.autoFetchSvg,r=fs(sg,function(f,u){var h=u[0],g=u[1],s=u[2];return g==="far"&&!n&&(g="fas"),typeof h=="string"&&(f.names[h]={prefix:g,iconName:s}),typeof h=="number"&&(f.unicodes[h.toString(16)]={prefix:g,iconName:s}),f},{names:{},unicodes:{}});Gu=r.names,Ku=r.unicodes,Ia=Ao(we.styleDefault,{family:we.familyDefault})};Kp(function(e){Ia=Ao(e.styleDefault,{family:we.familyDefault})});Xu();function Fa(e,t){return(Vu[e]||{})[t]}function hg(e,t){return(ju[e]||{})[t]}function Pn(e,t){return(Yu[e]||{})[t]}function Zu(e){return Gu[e]||{prefix:null,iconName:null}}function fg(e){var t=Ku[e],n=Fa("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function An(){return Ia}var Na=function(){return{prefix:null,iconName:null,rest:[]}};function Ao(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ve:n,f=Qr[r][e],u=ei[r][e]||ei[r][f],h=e in It.styles?e:null;return u||h||null}var Vl=(Di={},tt(Di,Ve,Object.keys(ti[Ve])),tt(Di,Ze,Object.keys(ti[Ze])),Di);function ko(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,f=r===void 0?!1:r,u=(t={},tt(t,Ve,"".concat(we.cssPrefix,"-").concat(Ve)),tt(t,Ze,"".concat(we.cssPrefix,"-").concat(Ze)),t),h=null,g=Ve;(e.includes(u[Ve])||e.some(function(p){return Vl[Ve].includes(p)}))&&(g=Ve),(e.includes(u[Ze])||e.some(function(p){return Vl[Ze].includes(p)}))&&(g=Ze);var s=e.reduce(function(p,o){var i=ug(we.cssPrefix,o);if(or[o]?(o=ag[g].includes(o)?Dp[g][o]:o,h=o,p.prefix=o):lg[g].indexOf(o)>-1?(h=o,p.prefix=Ao(o,{family:g})):i?p.iconName=i:o!==we.replacementClass&&o!==u[Ve]&&o!==u[Ze]&&p.rest.push(o),!f&&p.prefix&&p.iconName){var a=h==="fa"?Zu(p.iconName):{},c=Pn(p.prefix,p.iconName);a.prefix&&(h=null),p.iconName=a.iconName||c||p.iconName,p.prefix=a.prefix||p.prefix,p.prefix==="far"&&!or.far&&or.fas&&!we.autoFetchSvg&&(p.prefix="fas")}return p},Na());return(e.includes("fa-brands")||e.includes("fab"))&&(s.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(s.prefix="fad"),!s.prefix&&g===Ze&&(or.fass||we.autoFetchSvg)&&(s.prefix="fass",s.iconName=Pn(s.prefix,s.iconName)||s.iconName),(s.prefix==="fa"||h==="fa")&&(s.prefix=An()||"fas"),s}var dg=function(){function e(){Ap(this,e),this.definitions={}}return kp(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,f=new Array(r),u=0;u<r;u++)f[u]=arguments[u];var h=f.reduce(this._pullDefinitions,{});Object.keys(h).forEach(function(g){n.definitions[g]=ge(ge({},n.definitions[g]||{}),h[g]),Ws(g,h[g]);var s=ti[Ve][g];s&&Ws(s,h[g]),Xu()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var f=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(f).map(function(u){var h=f[u],g=h.prefix,s=h.iconName,p=h.icon,o=p[2];n[g]||(n[g]={}),o.length>0&&o.forEach(function(i){typeof i=="string"&&(n[g][i]=p)}),n[g][s]=p}),n}}]),e}(),jl=[],sr={},lr={},pg=Object.keys(lr);function gg(e,t){var n=t.mixoutsTo;return jl=e,sr={},Object.keys(lr).forEach(function(r){pg.indexOf(r)===-1&&delete lr[r]}),jl.forEach(function(r){var f=r.mixout?r.mixout():{};if(Object.keys(f).forEach(function(h){typeof f[h]=="function"&&(n[h]=f[h]),io(f[h])==="object"&&Object.keys(f[h]).forEach(function(g){n[h]||(n[h]={}),n[h][g]=f[h][g]})}),r.hooks){var u=r.hooks();Object.keys(u).forEach(function(h){sr[h]||(sr[h]=[]),sr[h].push(u[h])})}r.provides&&r.provides(lr)}),n}function Hs(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),f=2;f<n;f++)r[f-2]=arguments[f];var u=sr[e]||[];return u.forEach(function(h){t=h.apply(null,[t].concat(r))}),t}function Gn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var f=sr[e]||[];f.forEach(function(u){u.apply(null,n)})}function on(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return lr[e]?lr[e].apply(null,t):void 0}function Us(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||An();if(t)return t=Pn(n,t)||t,Ul(qu.definitions,n,t)||Ul(It.styles,n,t)}var qu=new dg,mg=function(){we.autoReplaceSvg=!1,we.observeMutations=!1,Gn("noAuto")},vg={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return sn?(Gn("beforeI2svg",t),on("pseudoElements2svg",t),on("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;we.autoReplaceSvg===!1&&(we.autoReplaceSvg=!0),we.observeMutations=!0,ng(function(){bg({autoReplaceSvgRoot:n}),Gn("watch",t)})}},yg={icon:function(t){if(t===null)return null;if(io(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Pn(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=Ao(t[0]);return{prefix:r,iconName:Pn(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(we.cssPrefix,"-"))>-1||t.match(Pp))){var f=ko(t.split(" "),{skipLookups:!0});return{prefix:f.prefix||An(),iconName:Pn(f.prefix,f.iconName)||f.iconName}}if(typeof t=="string"){var u=An();return{prefix:u,iconName:Pn(u,t)||t}}}},At={noAuto:mg,config:we,dom:vg,parse:yg,library:qu,findIconDefinition:Us,toHtml:mi},bg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?je:n;(Object.keys(It.styles).length>0||we.autoFetchSvg)&&sn&&we.autoReplaceSvg&&At.dom.i2svg({node:r})};function Eo(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return mi(r)})}}),Object.defineProperty(e,"node",{get:function(){if(sn){var r=je.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function wg(e){var t=e.children,n=e.main,r=e.mask,f=e.attributes,u=e.styles,h=e.transform;if(Oa(h)&&n.found&&!r.found){var g=n.width,s=n.height,p={x:g/s/2,y:.5};f.style=Co(ge(ge({},u),{},{"transform-origin":"".concat(p.x+h.x/16,"em ").concat(p.y+h.y/16,"em")}))}return[{tag:"svg",attributes:f,children:t}]}function $g(e){var t=e.prefix,n=e.iconName,r=e.children,f=e.attributes,u=e.symbol,h=u===!0?"".concat(t,"-").concat(we.cssPrefix,"-").concat(n):u;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ge(ge({},f),{},{id:h}),children:r}]}]}function Da(e){var t=e.icons,n=t.main,r=t.mask,f=e.prefix,u=e.iconName,h=e.transform,g=e.symbol,s=e.title,p=e.maskId,o=e.titleId,i=e.extra,a=e.watchable,c=a===void 0?!1:a,l=r.found?r:n,d=l.width,m=l.height,v=f==="fak",y=[we.replacementClass,u?"".concat(we.cssPrefix,"-").concat(u):""].filter(function(E){return i.classes.indexOf(E)===-1}).filter(function(E){return E!==""||!!E}).concat(i.classes).join(" "),A={children:[],attributes:ge(ge({},i.attributes),{},{"data-prefix":f,"data-icon":u,class:y,role:i.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(d," ").concat(m)})},S=v&&!~i.classes.indexOf("fa-fw")?{width:"".concat(d/m*16*.0625,"em")}:{};c&&(A.attributes[jn]=""),s&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(o||ri())},children:[s]}),delete A.attributes.title);var C=ge(ge({},A),{},{prefix:f,iconName:u,main:n,mask:r,maskId:p,transform:h,symbol:g,styles:ge(ge({},S),i.styles)}),b=r.found&&n.found?on("generateAbstractMask",C)||{children:[],attributes:{}}:on("generateAbstractIcon",C)||{children:[],attributes:{}},x=b.children,L=b.attributes;return C.children=x,C.attributes=L,g?$g(C):wg(C)}function Gl(e){var t=e.content,n=e.width,r=e.height,f=e.transform,u=e.title,h=e.extra,g=e.watchable,s=g===void 0?!1:g,p=ge(ge(ge({},h.attributes),u?{title:u}:{}),{},{class:h.classes.join(" ")});s&&(p[jn]="");var o=ge({},h.styles);Oa(f)&&(o.transform=Jp({transform:f,startCentered:!0,width:n,height:r}),o["-webkit-transform"]=o.transform);var i=Co(o);i.length>0&&(p.style=i);var a=[];return a.push({tag:"span",attributes:p,children:[t]}),u&&a.push({tag:"span",attributes:{class:"sr-only"},children:[u]}),a}function _g(e){var t=e.content,n=e.title,r=e.extra,f=ge(ge(ge({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),u=Co(r.styles);u.length>0&&(f.style=u);var h=[];return h.push({tag:"span",attributes:f,children:[t]}),n&&h.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),h}var ds=It.styles;function zs(e){var t=e[0],n=e[1],r=e.slice(4),f=Ea(r,1),u=f[0],h=null;return Array.isArray(u)?h={tag:"g",attributes:{class:"".concat(we.cssPrefix,"-").concat(Dn.GROUP)},children:[{tag:"path",attributes:{class:"".concat(we.cssPrefix,"-").concat(Dn.SECONDARY),fill:"currentColor",d:u[0]}},{tag:"path",attributes:{class:"".concat(we.cssPrefix,"-").concat(Dn.PRIMARY),fill:"currentColor",d:u[1]}}]}:h={tag:"path",attributes:{fill:"currentColor",d:u}},{found:!0,width:t,height:n,icon:h}}var Sg={found:!1,width:512,height:512};function Cg(e,t){!Du&&!we.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Vs(e,t){var n=t;return t==="fa"&&we.styleDefault!==null&&(t=An()),new Promise(function(r,f){if(on("missingIconAbstract"),n==="fa"){var u=Zu(e)||{};e=u.iconName||e,t=u.prefix||t}if(e&&t&&ds[t]&&ds[t][e]){var h=ds[t][e];return r(zs(h))}Cg(e,t),r(ge(ge({},Sg),{},{icon:we.showMissingIcons&&e?on("missingIconAbstract")||{}:{}}))})}var Kl=function(){},js=we.measurePerformance&&Ri&&Ri.mark&&Ri.measure?Ri:{mark:Kl,measure:Kl},Br='FA "6.5.1"',Ag=function(t){return js.mark("".concat(Br," ").concat(t," begins")),function(){return Ju(t)}},Ju=function(t){js.mark("".concat(Br," ").concat(t," ends")),js.measure("".concat(Br," ").concat(t),"".concat(Br," ").concat(t," begins"),"".concat(Br," ").concat(t," ends"))},Pa={begin:Ag,end:Ju},Zi=function(){};function Yl(e){var t=e.getAttribute?e.getAttribute(jn):null;return typeof t=="string"}function kg(e){var t=e.getAttribute?e.getAttribute(Ra):null,n=e.getAttribute?e.getAttribute(Ta):null;return t&&n}function Eg(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(we.replacementClass)}function xg(){if(we.autoReplaceSvg===!0)return qi.replace;var e=qi[we.autoReplaceSvg];return e||qi.replace}function Rg(e){return je.createElementNS("http://www.w3.org/2000/svg",e)}function Tg(e){return je.createElement(e)}function Qu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?Rg:Tg:n;if(typeof e=="string")return je.createTextNode(e);var f=r(e.tag);Object.keys(e.attributes||[]).forEach(function(h){f.setAttribute(h,e.attributes[h])});var u=e.children||[];return u.forEach(function(h){f.appendChild(Qu(h,{ceFn:r}))}),f}function Lg(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var qi={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(f){n.parentNode.insertBefore(Qu(f),n)}),n.getAttribute(jn)===null&&we.keepOriginalSource){var r=je.createComment(Lg(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~Ma(n).indexOf(we.replacementClass))return qi.replace(t);var f=new RegExp("".concat(we.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var u=r[0].attributes.class.split(" ").reduce(function(g,s){return s===we.replacementClass||s.match(f)?g.toSvg.push(s):g.toNode.push(s),g},{toNode:[],toSvg:[]});r[0].attributes.class=u.toSvg.join(" "),u.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",u.toNode.join(" "))}var h=r.map(function(g){return mi(g)}).join(`
|
761
|
-
`);n.setAttribute(
|
762
|
-
`),e.removeAttribute(n),r()}).catch(f)}else r()}else r()})}function Kg(e){return Promise.all([ec(e,"::before"),ec(e,"::after")])}function Yg(e){return e.parentNode!==document.head&&!~Np.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Ps)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function tc(e){if(sn)return new Promise(function(t,n){var r=Cr(e.querySelectorAll("*")).filter(Yg).map(Kg),f=Pa.begin("searchPseudoElements");th(),Promise.all(r).then(function(){f(),Gs(),t()}).catch(function(){f(),Gs(),n()})})}var Xg={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=tc,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,f=r===void 0?je:r;we.searchPseudoElements&&tc(f)}}},nc=!1,Zg={mixout:function(){return{dom:{unwatch:function(){th(),nc=!0}}}},hooks:function(){return{bootstrap:function(){Zl(Hs("mutationObserverCallbacks",{}))},noAuto:function(){Mg()},watch:function(n){var r=n.observeMutationsRoot;nc?Gs():Zl(Hs("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},rc=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,f){var u=f.toLowerCase().split("-"),h=u[0],g=u.slice(1).join("-");if(h&&g==="h")return r.flipX=!0,r;if(h&&g==="v")return r.flipY=!0,r;if(g=parseFloat(g),isNaN(g))return r;switch(h){case"grow":r.size=r.size+g;break;case"shrink":r.size=r.size-g;break;case"left":r.x=r.x-g;break;case"right":r.x=r.x+g;break;case"up":r.y=r.y-g;break;case"down":r.y=r.y+g;break;case"rotate":r.rotate=r.rotate+g;break}return r},n)},qg={mixout:function(){return{parse:{transform:function(n){return rc(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-transform");return f&&(n.transform=rc(f)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,f=n.transform,u=n.containerWidth,h=n.iconWidth,g={transform:"translate(".concat(u/2," 256)")},s="translate(".concat(f.x*32,", ").concat(f.y*32,") "),p="scale(".concat(f.size/16*(f.flipX?-1:1),", ").concat(f.size/16*(f.flipY?-1:1),") "),o="rotate(".concat(f.rotate," 0 0)"),i={transform:"".concat(s," ").concat(p," ").concat(o)},a={transform:"translate(".concat(h/2*-1," -256)")},c={outer:g,inner:i,path:a};return{tag:"g",attributes:ge({},c.outer),children:[{tag:"g",attributes:ge({},c.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ge(ge({},r.icon.attributes),c.path)}]}]}}}},ps={x:0,y:0,width:"100%",height:"100%"};function ic(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Jg(e){return e.tag==="g"?e.children:[e]}var Qg={hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-mask"),u=f?ko(f.split(" ").map(function(h){return h.trim()})):Na();return u.prefix||(u.prefix=An()),n.mask=u,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,f=n.attributes,u=n.main,h=n.mask,g=n.maskId,s=n.transform,p=u.width,o=u.icon,i=h.width,a=h.icon,c=qp({transform:s,containerWidth:i,iconWidth:p}),l={tag:"rect",attributes:ge(ge({},ps),{},{fill:"white"})},d=o.children?{children:o.children.map(ic)}:{},m={tag:"g",attributes:ge({},c.inner),children:[ic(ge({tag:o.tag,attributes:ge(ge({},o.attributes),c.path)},d))]},v={tag:"g",attributes:ge({},c.outer),children:[m]},y="mask-".concat(g||ri()),A="clip-".concat(g||ri()),S={tag:"mask",attributes:ge(ge({},ps),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[l,v]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:Jg(a)},S]};return r.push(C,{tag:"rect",attributes:ge({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(y,")")},ps)}),{children:r,attributes:f}}}},em={provides:function(t){var n=!1;Cn.matchMedia&&(n=Cn.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],f={fill:"currentColor"},u={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:ge(ge({},f),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var h=ge(ge({},u),{},{attributeName:"opacity"}),g={tag:"circle",attributes:ge(ge({},f),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||g.children.push({tag:"animate",attributes:ge(ge({},u),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ge(ge({},h),{},{values:"1;0;1;1;0;1;"})}),r.push(g),r.push({tag:"path",attributes:ge(ge({},f),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:ge(ge({},h),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:ge(ge({},f),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:ge(ge({},h),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},tm={hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-symbol"),u=f===null?!1:f===""?!0:f;return n.symbol=u,n}}}},nm=[eg,Hg,Ug,zg,Vg,Xg,Zg,qg,Qg,em,tm];gg(nm,{mixoutsTo:At});At.noAuto;At.config;var rm=At.library;At.dom;var Ks=At.parse;At.findIconDefinition;At.toHtml;var im=At.icon;At.layer;At.text;At.counter;var om={prefix:"fas",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"]},sm={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},am=sm,lm={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},cm={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},um={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},hm=um,fm={prefix:"fas",iconName:"ticket",icon:[576,512,[127903],"f145","M64 64C28.7 64 0 92.7 0 128v64c0 8.8 7.4 15.7 15.7 18.6C34.5 217.1 48 235 48 256s-13.5 38.9-32.3 45.4C7.4 304.3 0 311.2 0 320v64c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V320c0-8.8-7.4-15.7-15.7-18.6C541.5 294.9 528 277 528 256s13.5-38.9 32.3-45.4c8.3-2.9 15.7-9.8 15.7-18.6V128c0-35.3-28.7-64-64-64H64zm64 112l0 160c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V176c0-8.8-7.2-16-16-16H144c-8.8 0-16 7.2-16 16zM96 160c0-17.7 14.3-32 32-32H448c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H128c-17.7 0-32-14.3-32-32V160z"]},dm={prefix:"fas",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"]},pm={prefix:"fas",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z"]},rh={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},gm=rh,mm={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},vm={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},ym=vm,bm={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},wm={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},$m={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},_m={prefix:"fas",iconName:"exclamation",icon:[64,512,[10069,10071,61738],"21","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},Sm={prefix:"fas",iconName:"barcode",icon:[512,512,[],"f02a","M24 32C10.7 32 0 42.7 0 56V456c0 13.3 10.7 24 24 24H40c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H24zm88 0c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16zm72 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H184zm96 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H280zM448 56V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H472c-13.3 0-24 10.7-24 24zm-64-8V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16s-16 7.2-16 16z"]};function xo(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Pe={},cr=[],pt=()=>{},Cm=()=>!1,vi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Wa=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ha=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Am=Object.prototype.hasOwnProperty,Ie=(e,t)=>Am.call(e,t),me=Array.isArray,ur=e=>Ar(e)==="[object Map]",Qn=e=>Ar(e)==="[object Set]",oc=e=>Ar(e)==="[object Date]",km=e=>Ar(e)==="[object RegExp]",Ee=e=>typeof e=="function",Ke=e=>typeof e=="string",En=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",Ua=e=>(We(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),ih=Object.prototype.toString,Ar=e=>ih.call(e),Em=e=>Ar(e).slice(8,-1),oh=e=>Ar(e)==="[object Object]",za=e=>Ke(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Vr=xo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ro=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},xm=/-(\w)/g,gt=Ro(e=>e.replace(xm,(t,n)=>n?n.toUpperCase():"")),Rm=/\B([A-Z])/g,xt=Ro(e=>e.replace(Rm,"-$1").toLowerCase()),kr=Ro(e=>e.charAt(0).toUpperCase()+e.slice(1)),jr=Ro(e=>e?`on${kr(e)}`:""),Ft=(e,t)=>!Object.is(e,t),hr=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ao=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},lo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},co=e=>{const t=Ke(e)?Number(e):NaN;return isNaN(t)?e:t};let sc;const sh=()=>sc||(sc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Tm="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",Lm=xo(Tm);function yi(e){if(me(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],f=Ke(r)?Fm(r):yi(r);if(f)for(const u in f)t[u]=f[u]}return t}else if(Ke(e)||We(e))return e}const Mm=/;(?![^(]*\))/g,Om=/:([^]+)/,Im=/\/\*[^]*?\*\//g;function Fm(e){const t={};return e.replace(Im,"").split(Mm).forEach(n=>{if(n){const r=n.split(Om);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Er(e){let t="";if(Ke(e))t=e;else if(me(e))for(let n=0;n<e.length;n++){const r=Er(e[n]);r&&(t+=r+" ")}else if(We(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Nm(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ke(t)&&(e.class=Er(t)),n&&(e.style=yi(n)),e}const Dm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pm=xo(Dm);function ah(e){return!!e||e===""}function Bm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=xn(e[r],t[r]);return n}function xn(e,t){if(e===t)return!0;let n=oc(e),r=oc(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=En(e),r=En(t),n||r)return e===t;if(n=me(e),r=me(t),n||r)return n&&r?Bm(e,t):!1;if(n=We(e),r=We(t),n||r){if(!n||!r)return!1;const f=Object.keys(e).length,u=Object.keys(t).length;if(f!==u)return!1;for(const h in e){const g=e.hasOwnProperty(h),s=t.hasOwnProperty(h);if(g&&!s||!g&&s||!xn(e[h],t[h]))return!1}}return String(e)===String(t)}function To(e,t){return e.findIndex(n=>xn(n,t))}const ye=e=>Ke(e)?e:e==null?"":me(e)||We(e)&&(e.toString===ih||!Ee(e.toString))?JSON.stringify(e,lh,2):String(e),lh=(e,t)=>t&&t.__v_isRef?lh(e,t.value):ur(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,f],u)=>(n[gs(r,u)+" =>"]=f,n),{})}:Qn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>gs(n))}:En(t)?gs(t):We(t)&&!me(t)&&!oh(t)?String(t):t,gs=(e,t="")=>{var n;return En(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let _t;class Va{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_t,!t&&_t&&(this.index=(_t.scopes||(_t.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_t;try{return _t=this,t()}finally{_t=n}}}on(){_t=this}off(){_t=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.parent=void 0,this._active=!1}}}function ch(e){return new Va(e)}function uh(e,t=_t){t&&t.active&&t.effects.push(e)}function ja(){return _t}function hh(e){_t&&_t.cleanups.push(e)}let Wn;class gr{constructor(t,n,r,f){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,uh(this,f)}get dirty(){if(this._dirtyLevel===1){this._dirtyLevel=0,this._queryings++,er();for(const t of this.deps)if(t.computed&&(Wm(t.computed),this._dirtyLevel>=2))break;tr(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=_n,n=Wn;try{return _n=!0,Wn=this,this._runnings++,ac(this),this.fn()}finally{lc(this),this._runnings--,Wn=n,_n=t}}stop(){var t;this.active&&(ac(this),lc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Wm(e){return e.value}function ac(e){e._trackId++,e._depsLength=0}function lc(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)fh(e.deps[t],e);e.deps.length=e._depsLength}}function fh(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function Hm(e,t){e.effect instanceof gr&&(e=e.effect.fn);const n=new gr(e,pt,()=>{n.dirty&&n.run()});t&&(Ge(n,t),t.scope&&uh(n,t.scope)),(!t||!t.lazy)&&n.run();const r=n.run.bind(n);return r.effect=n,r}function Um(e){e.effect.stop()}let _n=!0,Ys=0;const dh=[];function er(){dh.push(_n),_n=!1}function tr(){const e=dh.pop();_n=e===void 0?!0:e}function Ga(){Ys++}function Ka(){for(Ys--;!Ys&&Xs.length;)Xs.shift()()}function ph(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&fh(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Xs=[];function gh(e,t,n){Ga();for(const r of e.keys())if(!(!r.allowRecurse&&r._runnings)&&r._dirtyLevel<t&&(!r._runnings||t!==2)){const f=r._dirtyLevel;r._dirtyLevel=t,f===0&&(!r._queryings||t!==2)&&(r.trigger(),r.scheduler&&Xs.push(r.scheduler))}Ka()}const mh=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},uo=new WeakMap,Hn=Symbol(""),Zs=Symbol("");function wt(e,t,n){if(_n&&Wn){let r=uo.get(e);r||uo.set(e,r=new Map);let f=r.get(n);f||r.set(n,f=mh(()=>r.delete(n))),ph(Wn,f)}}function Jt(e,t,n,r,f,u){const h=uo.get(e);if(!h)return;let g=[];if(t==="clear")g=[...h.values()];else if(n==="length"&&me(e)){const s=Number(r);h.forEach((p,o)=>{(o==="length"||!En(o)&&o>=s)&&g.push(p)})}else switch(n!==void 0&&g.push(h.get(n)),t){case"add":me(e)?za(n)&&g.push(h.get("length")):(g.push(h.get(Hn)),ur(e)&&g.push(h.get(Zs)));break;case"delete":me(e)||(g.push(h.get(Hn)),ur(e)&&g.push(h.get(Zs)));break;case"set":ur(e)&&g.push(h.get(Hn));break}Ga();for(const s of g)s&&gh(s,3);Ka()}function zm(e,t){var n;return(n=uo.get(e))==null?void 0:n.get(t)}const Vm=xo("__proto__,__v_isRef,__isVue"),vh=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(En)),cc=jm();function jm(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Me(this);for(let u=0,h=this.length;u<h;u++)wt(r,"get",u+"");const f=r[t](...n);return f===-1||f===!1?r[t](...n.map(Me)):f}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){er(),Ga();const r=Me(this)[t].apply(this,n);return Ka(),tr(),r}}),e}function Gm(e){const t=Me(this);return wt(t,"has",e),t.hasOwnProperty(e)}class yh{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,r){const f=this._isReadonly,u=this._shallow;if(n==="__v_isReactive")return!f;if(n==="__v_isReadonly")return f;if(n==="__v_isShallow")return u;if(n==="__v_raw")return r===(f?u?Ch:Sh:u?_h:$h).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const h=me(t);if(!f){if(h&&Ie(cc,n))return Reflect.get(cc,n,r);if(n==="hasOwnProperty")return Gm}const g=Reflect.get(t,n,r);return(En(n)?vh.has(n):Vm(n))||(f||wt(t,"get",n),u)?g:at(g)?h&&za(n)?g:g.value:We(g)?f?Oo(g):xr(g):g}}class bh extends yh{constructor(t=!1){super(!1,t)}set(t,n,r,f){let u=t[n];if(!this._shallow){const s=Kn(u);if(!Bn(r)&&!Kn(r)&&(u=Me(u),r=Me(r)),!me(t)&&at(u)&&!at(r))return s?!1:(u.value=r,!0)}const h=me(t)&&za(n)?Number(n)<t.length:Ie(t,n),g=Reflect.set(t,n,r,f);return t===Me(f)&&(h?Ft(r,u)&&Jt(t,"set",n,r):Jt(t,"add",n,r)),g}deleteProperty(t,n){const r=Ie(t,n);t[n];const f=Reflect.deleteProperty(t,n);return f&&r&&Jt(t,"delete",n,void 0),f}has(t,n){const r=Reflect.has(t,n);return(!En(n)||!vh.has(n))&&wt(t,"has",n),r}ownKeys(t){return wt(t,"iterate",me(t)?"length":Hn),Reflect.ownKeys(t)}}class wh extends yh{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Km=new bh,Ym=new wh,Xm=new bh(!0),Zm=new wh(!0),Ya=e=>e,Lo=e=>Reflect.getPrototypeOf(e);function Pi(e,t,n=!1,r=!1){e=e.__v_raw;const f=Me(e),u=Me(t);n||(Ft(t,u)&&wt(f,"get",t),wt(f,"get",u));const{has:h}=Lo(f),g=r?Ya:n?qa:ii;if(h.call(f,t))return g(e.get(t));if(h.call(f,u))return g(e.get(u));e!==f&&e.get(t)}function Bi(e,t=!1){const n=this.__v_raw,r=Me(n),f=Me(e);return t||(Ft(e,f)&&wt(r,"has",e),wt(r,"has",f)),e===f?n.has(e):n.has(e)||n.has(f)}function Wi(e,t=!1){return e=e.__v_raw,!t&&wt(Me(e),"iterate",Hn),Reflect.get(e,"size",e)}function uc(e){e=Me(e);const t=Me(this);return Lo(t).has.call(t,e)||(t.add(e),Jt(t,"add",e,e)),this}function hc(e,t){t=Me(t);const n=Me(this),{has:r,get:f}=Lo(n);let u=r.call(n,e);u||(e=Me(e),u=r.call(n,e));const h=f.call(n,e);return n.set(e,t),u?Ft(t,h)&&Jt(n,"set",e,t):Jt(n,"add",e,t),this}function fc(e){const t=Me(this),{has:n,get:r}=Lo(t);let f=n.call(t,e);f||(e=Me(e),f=n.call(t,e)),r&&r.call(t,e);const u=t.delete(e);return f&&Jt(t,"delete",e,void 0),u}function dc(){const e=Me(this),t=e.size!==0,n=e.clear();return t&&Jt(e,"clear",void 0,void 0),n}function Hi(e,t){return function(r,f){const u=this,h=u.__v_raw,g=Me(h),s=t?Ya:e?qa:ii;return!e&&wt(g,"iterate",Hn),h.forEach((p,o)=>r.call(f,s(p),s(o),u))}}function Ui(e,t,n){return function(...r){const f=this.__v_raw,u=Me(f),h=ur(u),g=e==="entries"||e===Symbol.iterator&&h,s=e==="keys"&&h,p=f[e](...r),o=n?Ya:t?qa:ii;return!t&&wt(u,"iterate",s?Zs:Hn),{next(){const{value:i,done:a}=p.next();return a?{value:i,done:a}:{value:g?[o(i[0]),o(i[1])]:o(i),done:a}},[Symbol.iterator](){return this}}}}function fn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qm(){const e={get(u){return Pi(this,u)},get size(){return Wi(this)},has:Bi,add:uc,set:hc,delete:fc,clear:dc,forEach:Hi(!1,!1)},t={get(u){return Pi(this,u,!1,!0)},get size(){return Wi(this)},has:Bi,add:uc,set:hc,delete:fc,clear:dc,forEach:Hi(!1,!0)},n={get(u){return Pi(this,u,!0)},get size(){return Wi(this,!0)},has(u){return Bi.call(this,u,!0)},add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear"),forEach:Hi(!0,!1)},r={get(u){return Pi(this,u,!0,!0)},get size(){return Wi(this,!0)},has(u){return Bi.call(this,u,!0)},add:fn("add"),set:fn("set"),delete:fn("delete"),clear:fn("clear"),forEach:Hi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(u=>{e[u]=Ui(u,!1,!1),n[u]=Ui(u,!0,!1),t[u]=Ui(u,!1,!0),r[u]=Ui(u,!0,!0)}),[e,n,t,r]}const[Jm,Qm,ev,tv]=qm();function Mo(e,t){const n=t?e?tv:ev:e?Qm:Jm;return(r,f,u)=>f==="__v_isReactive"?!e:f==="__v_isReadonly"?e:f==="__v_raw"?r:Reflect.get(Ie(n,f)&&f in r?n:r,f,u)}const nv={get:Mo(!1,!1)},rv={get:Mo(!1,!0)},iv={get:Mo(!0,!1)},ov={get:Mo(!0,!0)},$h=new WeakMap,_h=new WeakMap,Sh=new WeakMap,Ch=new WeakMap;function sv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function av(e){return e.__v_skip||!Object.isExtensible(e)?0:sv(Em(e))}function xr(e){return Kn(e)?e:Io(e,!1,Km,nv,$h)}function Xa(e){return Io(e,!1,Xm,rv,_h)}function Oo(e){return Io(e,!0,Ym,iv,Sh)}function lv(e){return Io(e,!0,Zm,ov,Ch)}function Io(e,t,n,r,f){if(!We(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const u=f.get(e);if(u)return u;const h=av(e);if(h===0)return e;const g=new Proxy(e,h===2?r:n);return f.set(e,g),g}function Un(e){return Kn(e)?Un(e.__v_raw):!!(e&&e.__v_isReactive)}function Kn(e){return!!(e&&e.__v_isReadonly)}function Bn(e){return!!(e&&e.__v_isShallow)}function Za(e){return Un(e)||Kn(e)}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function Fo(e){return ao(e,"__v_skip",!0),e}const ii=e=>We(e)?xr(e):e,qa=e=>We(e)?Oo(e):e;class Ah{constructor(t,n,r,f){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new gr(()=>t(this._value),()=>oi(this,1)),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=r}get value(){const t=Me(this);return Ja(t),(!t._cacheable||t.effect.dirty)&&Ft(t._value,t._value=t.effect.run())&&oi(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function cv(e,t,n=!1){let r,f;const u=Ee(e);return u?(r=e,f=pt):(r=e.get,f=e.set),new Ah(r,f,u||!f,n)}function Ja(e){_n&&Wn&&(e=Me(e),ph(Wn,e.dep||(e.dep=mh(()=>e.dep=void 0,e instanceof Ah?e:void 0))))}function oi(e,t=3,n){e=Me(e);const r=e.dep;r&&gh(r,t)}function at(e){return!!(e&&e.__v_isRef===!0)}function Fe(e){return Eh(e,!1)}function kh(e){return Eh(e,!0)}function Eh(e,t){return at(e)?e:new uv(e,t)}class uv{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Me(t),this._value=n?t:ii(t)}get value(){return Ja(this),this._value}set value(t){const n=this.__v_isShallow||Bn(t)||Kn(t);t=n?t:Me(t),Ft(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ii(t),oi(this,3))}}function hv(e){oi(e,3)}function Qt(e){return at(e)?e.value:e}function fv(e){return Ee(e)?e():Qt(e)}const dv={get:(e,t,n)=>Qt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const f=e[t];return at(f)&&!at(n)?(f.value=n,!0):Reflect.set(e,t,n,r)}};function Qa(e){return Un(e)?e:new Proxy(e,dv)}class pv{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Ja(this),()=>oi(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function No(e){return new pv(e)}function gv(e){const t=me(e)?new Array(e.length):{};for(const n in e)t[n]=xh(e,n);return t}class mv{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return zm(Me(this._object),this._key)}}class vv{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Do(e,t,n){return at(e)?e:Ee(e)?new vv(e):We(e)&&arguments.length>1?xh(e,t,n):Fe(e)}function xh(e,t,n){const r=e[t];return at(r)?r:new mv(e,t,n)}const yv={GET:"get",HAS:"has",ITERATE:"iterate"},bv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function wv(e,t){}const $v={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},_v={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function en(e,t,n,r){let f;try{f=r?e(...r):e()}catch(u){nr(u,t,n)}return f}function Ct(e,t,n,r){if(Ee(e)){const u=en(e,t,n,r);return u&&Ua(u)&&u.catch(h=>{nr(h,t,n)}),u}const f=[];for(let u=0;u<e.length;u++)f.push(Ct(e[u],t,n,r));return f}function nr(e,t,n,r=!0){const f=t?t.vnode:null;if(t){let u=t.parent;const h=t.proxy,g=`https://vuejs.org/errors/#runtime-${n}`;for(;u;){const p=u.ec;if(p){for(let o=0;o<p.length;o++)if(p[o](e,h,g)===!1)return}u=u.parent}const s=t.appContext.config.errorHandler;if(s){en(s,null,10,[e,h,g]);return}}Sv(e,n,f,r)}function Sv(e,t,n,r=!0){console.error(e)}let si=!1,qs=!1;const ct=[];let Pt=0;const fr=[];let Kt=null,Nn=0;const Rh=Promise.resolve();let el=null;function bi(e){const t=el||Rh;return e?t.then(this?e.bind(this):e):t}function Cv(e){let t=Pt+1,n=ct.length;for(;t<n;){const r=t+n>>>1,f=ct[r],u=ai(f);u<e||u===e&&f.pre?t=r+1:n=r}return t}function Po(e){(!ct.length||!ct.includes(e,si&&e.allowRecurse?Pt+1:Pt))&&(e.id==null?ct.push(e):ct.splice(Cv(e.id),0,e),Th())}function Th(){!si&&!qs&&(qs=!0,el=Rh.then(Lh))}function Av(e){const t=ct.indexOf(e);t>Pt&&ct.splice(t,1)}function ho(e){me(e)?fr.push(...e):(!Kt||!Kt.includes(e,e.allowRecurse?Nn+1:Nn))&&fr.push(e),Th()}function pc(e,t,n=si?Pt+1:0){for(;n<ct.length;n++){const r=ct[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;ct.splice(n,1),n--,r()}}}function fo(e){if(fr.length){const t=[...new Set(fr)];if(fr.length=0,Kt){Kt.push(...t);return}for(Kt=t,Kt.sort((n,r)=>ai(n)-ai(r)),Nn=0;Nn<Kt.length;Nn++)Kt[Nn]();Kt=null,Nn=0}}const ai=e=>e.id==null?1/0:e.id,kv=(e,t)=>{const n=ai(e)-ai(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Lh(e){qs=!1,si=!0,ct.sort(kv);try{for(Pt=0;Pt<ct.length;Pt++){const t=ct[Pt];t&&t.active!==!1&&en(t,null,14)}}finally{Pt=0,ct.length=0,fo(),si=!1,el=null,(ct.length||fr.length)&&Lh()}}function Ev(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Pe;let f=n;const u=t.startsWith("update:"),h=u&&t.slice(7);if(h&&h in r){const o=`${h==="modelValue"?"model":h}Modifiers`,{number:i,trim:a}=r[o]||Pe;a&&(f=n.map(c=>Ke(c)?c.trim():c)),i&&(f=n.map(lo))}let g,s=r[g=jr(t)]||r[g=jr(gt(t))];!s&&u&&(s=r[g=jr(xt(t))]),s&&Ct(s,e,6,f);const p=r[g+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[g])return;e.emitted[g]=!0,Ct(p,e,6,f)}}function Mh(e,t,n=!1){const r=t.emitsCache,f=r.get(e);if(f!==void 0)return f;const u=e.emits;let h={},g=!1;if(!Ee(e)){const s=p=>{const o=Mh(p,t,!0);o&&(g=!0,Ge(h,o))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!u&&!g?(We(e)&&r.set(e,null),null):(me(u)?u.forEach(s=>h[s]=null):Ge(h,u),We(e)&&r.set(e,h),h)}function Bo(e,t){return!e||!vi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ie(e,t[0].toLowerCase()+t.slice(1))||Ie(e,xt(t))||Ie(e,t))}let nt=null,Wo=null;function li(e){const t=nt;return nt=e,Wo=e&&e.type.__scopeId||null,t}function Ho(e){Wo=e}function Uo(){Wo=null}const xv=e=>Je;function Je(e,t=nt,n){if(!t||e._n)return e;const r=(...f)=>{r._d&&ia(-1);const u=li(t);let h;try{h=e(...f)}finally{li(u),r._d&&ia(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function Ji(e){const{type:t,vnode:n,proxy:r,withProxy:f,props:u,propsOptions:[h],slots:g,attrs:s,emit:p,render:o,renderCache:i,data:a,setupState:c,ctx:l,inheritAttrs:d}=e;let m,v;const y=li(e);try{if(n.shapeFlag&4){const S=f||r,C=S;m=St(o.call(C,S,i,u,c,a,l)),v=s}else{const S=t;m=St(S.length>1?S(u,{attrs:s,slots:g,emit:p}):S(u,null)),v=t.props?s:Tv(s)}}catch(S){Xr.length=0,nr(S,e,1),m=ae(ut)}let A=m;if(v&&d!==!1){const S=Object.keys(v),{shapeFlag:C}=A;S.length&&C&7&&(h&&S.some(Wa)&&(v=Lv(v,h)),A=Ut(A,v))}return n.dirs&&(A=Ut(A),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),m=A,li(y),m}function Rv(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(Rn(r)){if(r.type!==ut||r.children==="v-if"){if(t)return;t=r}}else return}return t}const Tv=e=>{let t;for(const n in e)(n==="class"||n==="style"||vi(n))&&((t||(t={}))[n]=e[n]);return t},Lv=(e,t)=>{const n={};for(const r in e)(!Wa(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mv(e,t,n){const{props:r,children:f,component:u}=e,{props:h,children:g,patchFlag:s}=t,p=u.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return r?gc(r,h,p):!!h;if(s&8){const o=t.dynamicProps;for(let i=0;i<o.length;i++){const a=o[i];if(h[a]!==r[a]&&!Bo(p,a))return!0}}}else return(f||g)&&(!g||!g.$stable)?!0:r===h?!1:r?h?gc(r,h,p):!0:!!h;return!1}function gc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let f=0;f<r.length;f++){const u=r[f];if(t[u]!==e[u]&&!Bo(n,u))return!0}return!1}function tl({vnode:e,parent:t},n){if(n)for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const nl="components",Ov="directives";function oe(e,t){return rl(nl,e,!0,t)||e}const Oh=Symbol.for("v-ndc");function Iv(e){return Ke(e)?rl(nl,e,!1)||e:e||Oh}function Fv(e){return rl(Ov,e)}function rl(e,t,n=!0,r=!1){const f=nt||Qe;if(f){const u=f.type;if(e===nl){const g=la(u,!1);if(g&&(g===t||g===gt(t)||g===kr(gt(t))))return u}const h=mc(f[e]||u[e],t)||mc(f.appContext[e],t);return!h&&r?u:h}}function mc(e,t){return e&&(e[t]||e[gt(t)]||e[kr(gt(t))])}const Ih=e=>e.__isSuspense;let vc=0;const Nv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,f,u,h,g,s,p){e==null?Pv(t,n,r,f,u,h,g,s,p):Bv(e,t,n,r,f,h,g,s,p)},hydrate:Wv,create:il,normalize:Hv},Dv=Nv;function ci(e,t){const n=e.props&&e.props[t];Ee(n)&&n()}function Pv(e,t,n,r,f,u,h,g,s){const{p,o:{createElement:o}}=s,i=o("div"),a=e.suspense=il(e,f,r,t,i,n,u,h,g,s);p(null,a.pendingBranch=e.ssContent,i,null,r,a,u,h),a.deps>0?(ci(e,"onPending"),ci(e,"onFallback"),p(null,e.ssFallback,t,n,r,null,u,h),dr(a,e.ssFallback)):a.resolve(!1,!0)}function Bv(e,t,n,r,f,u,h,g,{p:s,um:p,o:{createElement:o}}){const i=t.suspense=e.suspense;i.vnode=t,t.el=e.el;const a=t.ssContent,c=t.ssFallback,{activeBranch:l,pendingBranch:d,isInFallback:m,isHydrating:v}=i;if(d)i.pendingBranch=a,Ot(a,d)?(s(d,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0?i.resolve():m&&(v||(s(l,c,n,r,f,null,u,h,g),dr(i,c)))):(i.pendingId=vc++,v?(i.isHydrating=!1,i.activeBranch=d):p(d,f,i),i.deps=0,i.effects.length=0,i.hiddenContainer=o("div"),m?(s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0?i.resolve():(s(l,c,n,r,f,null,u,h,g),dr(i,c))):l&&Ot(a,l)?(s(l,a,n,r,f,i,u,h,g),i.resolve(!0)):(s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0&&i.resolve()));else if(l&&Ot(a,l))s(l,a,n,r,f,i,u,h,g),dr(i,a);else if(ci(t,"onPending"),i.pendingBranch=a,a.shapeFlag&512?i.pendingId=a.component.suspenseId:i.pendingId=vc++,s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0)i.resolve();else{const{timeout:y,pendingId:A}=i;y>0?setTimeout(()=>{i.pendingId===A&&i.fallback(c)},y):y===0&&i.fallback(c)}}function il(e,t,n,r,f,u,h,g,s,p,o=!1){const{p:i,m:a,um:c,n:l,o:{parentNode:d,remove:m}}=p;let v;const y=Uv(e);y&&t!=null&&t.pendingBranch&&(v=t.pendingId,t.deps++);const A=e.props?co(e.props.timeout):void 0,S={vnode:e,parent:t,parentComponent:n,namespace:h,container:r,hiddenContainer:f,anchor:u,deps:0,pendingId:0,timeout:typeof A=="number"?A:-1,activeBranch:null,pendingBranch:null,isInFallback:!o,isHydrating:o,isUnmounted:!1,effects:[],resolve(C=!1,b=!1){const{vnode:x,activeBranch:L,pendingBranch:E,pendingId:M,effects:$,parentComponent:k,container:_}=S;let w=!1;if(S.isHydrating)S.isHydrating=!1;else if(!C){w=L&&E.transition&&E.transition.mode==="out-in",w&&(L.transition.afterLeave=()=>{M===S.pendingId&&(a(E,_,l(L),0),ho($))});let{anchor:O}=S;L&&(O=l(L),c(L,k,S,!0)),w||a(E,_,O,0)}dr(S,E),S.pendingBranch=null,S.isInFallback=!1;let R=S.parent,T=!1;for(;R;){if(R.pendingBranch){R.effects.push(...$),T=!0;break}R=R.parent}!T&&!w&&ho($),S.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!b&&t.resolve()),ci(x,"onResolve")},fallback(C){if(!S.pendingBranch)return;const{vnode:b,activeBranch:x,parentComponent:L,container:E,namespace:M}=S;ci(b,"onFallback");const $=l(x),k=()=>{S.isInFallback&&(i(null,C,E,$,L,null,M,g,s),dr(S,C))},_=C.transition&&C.transition.mode==="out-in";_&&(x.transition.afterLeave=k),S.isInFallback=!0,c(x,L,null,!0),_||k()},move(C,b,x){S.activeBranch&&a(S.activeBranch,C,b,x),S.container=C},next(){return S.activeBranch&&l(S.activeBranch)},registerDep(C,b){const x=!!S.pendingBranch;x&&S.deps++;const L=C.vnode.el;C.asyncDep.catch(E=>{nr(E,C,0)}).then(E=>{if(C.isUnmounted||S.isUnmounted||S.pendingId!==C.suspenseId)return;C.asyncResolved=!0;const{vnode:M}=C;sa(C,E,!1),L&&(M.el=L);const $=!L&&C.subTree.el;b(C,M,d(L||C.subTree.el),L?null:l(C.subTree),S,h,s),$&&m($),tl(C,M.el),x&&--S.deps===0&&S.resolve()})},unmount(C,b){S.isUnmounted=!0,S.activeBranch&&c(S.activeBranch,n,C,b),S.pendingBranch&&c(S.pendingBranch,n,C,b)}};return S}function Wv(e,t,n,r,f,u,h,g,s){const p=t.suspense=il(t,r,n,e.parentNode,document.createElement("div"),null,f,u,h,g,!0),o=s(e,p.pendingBranch=t.ssContent,n,p,u,h);return p.deps===0&&p.resolve(!1,!0),o}function Hv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=yc(r?n.default:n),e.ssFallback=r?yc(n.fallback):ae(ut)}function yc(e){let t;if(Ee(e)){const n=Zn&&e._c;n&&(e._d=!1,Z()),e=e(),n&&(e._d=!0,t=bt,gf())}return me(e)&&(e=Rv(e)),e=St(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Fh(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):ho(e)}function dr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,f=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=f,tl(r,f))}function Uv(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const Nh=Symbol.for("v-scx"),Dh=()=>Rt(Nh);function Ph(e,t){return wi(e,null,t)}function Bh(e,t){return wi(e,null,{flush:"post"})}function Wh(e,t){return wi(e,null,{flush:"sync"})}const zi={};function qe(e,t,n){return wi(e,t,n)}function wi(e,t,{immediate:n,deep:r,flush:f,once:u,onTrack:h,onTrigger:g}=Pe){var s;if(t&&u){const C=t;t=(...b)=>{C(...b),S()}}const p=ja()===((s=Qe)==null?void 0:s.scope)?Qe:null;let o,i=!1,a=!1;if(at(e)?(o=()=>e.value,i=Bn(e)):Un(e)?(o=Bn(e)||r===!1?()=>Zt(e,1):()=>Zt(e),i=!0):me(e)?(a=!0,i=e.some(C=>Un(C)||Bn(C)),o=()=>e.map(C=>{if(at(C))return C.value;if(Un(C))return Zt(C,Bn(C)||r===!1?1:void 0);if(Ee(C))return en(C,p,2)})):Ee(e)?t?o=()=>en(e,p,2):o=()=>{if(!(p&&p.isUnmounted))return c&&c(),Ct(e,p,3,[l])}:o=pt,t&&r){const C=o;o=()=>Zt(C())}let c,l=C=>{c=A.onStop=()=>{en(C,p,4),c=A.onStop=void 0}},d;if(_i)if(l=pt,t?n&&Ct(t,p,3,[o(),a?[]:void 0,l]):o(),f==="sync"){const C=Dh();d=C.__watcherHandles||(C.__watcherHandles=[])}else return pt;let m=a?new Array(e.length).fill(zi):zi;const v=()=>{if(!(!A.active||!A.dirty))if(t){const C=A.run();(r||i||(a?C.some((b,x)=>Ft(b,m[x])):Ft(C,m)))&&(c&&c(),Ct(t,p,3,[C,m===zi?void 0:a&&m[0]===zi?[]:m,l]),m=C)}else A.run()};v.allowRecurse=!!t;let y;f==="sync"?y=v:f==="post"?y=()=>ot(v,p&&p.suspense):(v.pre=!0,p&&(v.id=p.uid),y=()=>Po(v));const A=new gr(o,pt,y),S=()=>{A.stop(),p&&p.scope&&Ha(p.scope.effects,A)};return t?n?v():m=A.run():f==="post"?ot(A.run.bind(A),p&&p.suspense):A.run(),d&&d.push(S),S}function zv(e,t,n){const r=this.proxy,f=Ke(e)?e.includes(".")?Hh(r,e):()=>r[e]:e.bind(r,r);let u;Ee(t)?u=t:(u=t.handler,n=t);const h=Qe;Tn(this);const g=wi(f,u.bind(r),n);return h?Tn(h):Sn(),g}function Hh(e,t){const n=t.split(".");return()=>{let r=e;for(let f=0;f<n.length&&r;f++)r=r[n[f]];return r}}function Zt(e,t,n=0,r){if(!We(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),at(e))Zt(e.value,t,n,r);else if(me(e))for(let f=0;f<e.length;f++)Zt(e[f],t,n,r);else if(Qn(e)||ur(e))e.forEach(f=>{Zt(f,t,n,r)});else if(oh(e))for(const f in e)Zt(e[f],t,n,r);return e}function zo(e,t){const n=nt;if(n===null)return e;const r=Zo(n)||n.proxy,f=e.dirs||(e.dirs=[]);for(let u=0;u<t.length;u++){let[h,g,s,p=Pe]=t[u];h&&(Ee(h)&&(h={mounted:h,updated:h}),h.deep&&Zt(g),f.push({dir:h,instance:r,value:g,oldValue:void 0,arg:s,modifiers:p}))}return e}function Dt(e,t,n,r){const f=e.dirs,u=t&&t.dirs;for(let h=0;h<f.length;h++){const g=f[h];u&&(g.oldValue=u[h].value);let s=g.dir[r];s&&(er(),Ct(s,n,8,[e.el,g,e,t]),tr())}}const yn=Symbol("_leaveCb"),Vi=Symbol("_enterCb");function ol(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ye(()=>{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}const Et=[Function,Array],sl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Et,onEnter:Et,onAfterEnter:Et,onEnterCancelled:Et,onBeforeLeave:Et,onLeave:Et,onAfterLeave:Et,onLeaveCancelled:Et,onBeforeAppear:Et,onAppear:Et,onAfterAppear:Et,onAppearCancelled:Et},Vv={name:"BaseTransition",props:sl,setup(e,{slots:t}){const n=Mt(),r=ol();let f;return()=>{const u=t.default&&Vo(t.default(),!0);if(!u||!u.length)return;let h=u[0];if(u.length>1){for(const d of u)if(d.type!==ut){h=d;break}}const g=Me(e),{mode:s}=g;if(r.isLeaving)return ms(h);const p=bc(h);if(!p)return ms(h);const o=mr(p,g,r,n);Yn(p,o);const i=n.subTree,a=i&&bc(i);let c=!1;const{getTransitionKey:l}=p.type;if(l){const d=l();f===void 0?f=d:d!==f&&(f=d,c=!0)}if(a&&a.type!==ut&&(!Ot(p,a)||c)){const d=mr(a,g,r,n);if(Yn(a,d),s==="out-in")return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ms(h);s==="in-out"&&p.type!==ut&&(d.delayLeave=(m,v,y)=>{const A=zh(r,a);A[String(a.key)]=a,m[yn]=()=>{v(),m[yn]=void 0,delete o.delayedLeave},o.delayedLeave=y})}return h}}},Uh=Vv;function zh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function mr(e,t,n,r){const{appear:f,mode:u,persisted:h=!1,onBeforeEnter:g,onEnter:s,onAfterEnter:p,onEnterCancelled:o,onBeforeLeave:i,onLeave:a,onAfterLeave:c,onLeaveCancelled:l,onBeforeAppear:d,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=t,A=String(e.key),S=zh(n,e),C=(L,E)=>{L&&Ct(L,r,9,E)},b=(L,E)=>{const M=E[1];C(L,E),me(L)?L.every($=>$.length<=1)&&M():L.length<=1&&M()},x={mode:u,persisted:h,beforeEnter(L){let E=g;if(!n.isMounted)if(f)E=d||g;else return;L[yn]&&L[yn](!0);const M=S[A];M&&Ot(e,M)&&M.el[yn]&&M.el[yn](),C(E,[L])},enter(L){let E=s,M=p,$=o;if(!n.isMounted)if(f)E=m||s,M=v||p,$=y||o;else return;let k=!1;const _=L[Vi]=w=>{k||(k=!0,w?C($,[L]):C(M,[L]),x.delayedLeave&&x.delayedLeave(),L[Vi]=void 0)};E?b(E,[L,_]):_()},leave(L,E){const M=String(e.key);if(L[Vi]&&L[Vi](!0),n.isUnmounting)return E();C(i,[L]);let $=!1;const k=L[yn]=_=>{$||($=!0,E(),_?C(l,[L]):C(c,[L]),L[yn]=void 0,S[M]===e&&delete S[M])};S[M]=e,a?b(a,[L,k]):k()},clone(L){return mr(L,t,n,r)}};return x}function ms(e){if($i(e))return e=Ut(e),e.children=null,e}function bc(e){return $i(e)?e.children?e.children[0]:void 0:e}function Yn(e,t){e.shapeFlag&6&&e.component?Yn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vo(e,t=!1,n){let r=[],f=0;for(let u=0;u<e.length;u++){let h=e[u];const g=n==null?h.key:String(n)+String(h.key!=null?h.key:u);h.type===xe?(h.patchFlag&128&&f++,r=r.concat(Vo(h.children,t,g))):(t||h.type!==ut)&&r.push(g!=null?Ut(h,{key:g}):h)}if(f>1)for(let u=0;u<r.length;u++)r[u].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function be(e,t){return Ee(e)?Ge({name:e.name},t,{setup:e}):e}const zn=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function jv(e){Ee(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:f=200,timeout:u,suspensible:h=!0,onError:g}=e;let s=null,p,o=0;const i=()=>(o++,s=null,a()),a=()=>{let c;return s||(c=s=t().catch(l=>{if(l=l instanceof Error?l:new Error(String(l)),g)return new Promise((d,m)=>{g(l,()=>d(i()),()=>m(l),o+1)});throw l}).then(l=>c!==s&&s?s:(l&&(l.__esModule||l[Symbol.toStringTag]==="Module")&&(l=l.default),p=l,l)))};return be({name:"AsyncComponentWrapper",__asyncLoader:a,get __asyncResolved(){return p},setup(){const c=Qe;if(p)return()=>vs(p,c);const l=y=>{s=null,nr(y,c,13,!r)};if(h&&c.suspense||_i)return a().then(y=>()=>vs(y,c)).catch(y=>(l(y),()=>r?ae(r,{error:y}):null));const d=Fe(!1),m=Fe(),v=Fe(!!f);return f&&setTimeout(()=>{v.value=!1},f),u!=null&&setTimeout(()=>{if(!d.value&&!m.value){const y=new Error(`Async component timed out after ${u}ms.`);l(y),m.value=y}},u),a().then(()=>{d.value=!0,c.parent&&$i(c.parent.vnode)&&(c.parent.effect.dirty=!0,Po(c.parent.update))}).catch(y=>{l(y),m.value=y}),()=>{if(d.value&&p)return vs(p,c);if(m.value&&r)return ae(r,{error:m.value});if(n&&!v.value)return ae(n)}}})}function vs(e,t){const{ref:n,props:r,children:f,ce:u}=t.vnode,h=ae(e,r,f);return h.ref=n,h.ce=u,delete t.vnode.ce,h}const $i=e=>e.type.__isKeepAlive,Gv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Mt(),r=n.ctx;if(!r.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const f=new Map,u=new Set;let h=null;const g=n.suspense,{renderer:{p:s,m:p,um:o,o:{createElement:i}}}=r,a=i("div");r.activate=(y,A,S,C,b)=>{const x=y.component;p(y,A,S,0,g),s(x.vnode,y,A,S,x,g,C,y.slotScopeIds,b),ot(()=>{x.isDeactivated=!1,x.a&&hr(x.a);const L=y.props&&y.props.onVnodeMounted;L&&yt(L,x.parent,y)},g)},r.deactivate=y=>{const A=y.component;p(y,a,null,1,g),ot(()=>{A.da&&hr(A.da);const S=y.props&&y.props.onVnodeUnmounted;S&&yt(S,A.parent,y),A.isDeactivated=!0},g)};function c(y){ys(y),o(y,n,g,!0)}function l(y){f.forEach((A,S)=>{const C=la(A.type);C&&(!y||!y(C))&&d(S)})}function d(y){const A=f.get(y);!h||!Ot(A,h)?c(A):h&&ys(h),f.delete(y),u.delete(y)}qe(()=>[e.include,e.exclude],([y,A])=>{y&&l(S=>Wr(y,S)),A&&l(S=>!Wr(A,S))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&f.set(m,bs(n.subTree))};return Ye(v),Go(v),Rr(()=>{f.forEach(y=>{const{subTree:A,suspense:S}=n,C=bs(A);if(y.type===C.type&&y.key===C.key){ys(C);const b=C.component.da;b&&ot(b,S);return}c(y)})}),()=>{if(m=null,!t.default)return null;const y=t.default(),A=y[0];if(y.length>1)return h=null,y;if(!Rn(A)||!(A.shapeFlag&4)&&!(A.shapeFlag&128))return h=null,A;let S=bs(A);const C=S.type,b=la(zn(S)?S.type.__asyncResolved||{}:C),{include:x,exclude:L,max:E}=e;if(x&&(!b||!Wr(x,b))||L&&b&&Wr(L,b))return h=S,A;const M=S.key==null?C:S.key,$=f.get(M);return S.el&&(S=Ut(S),A.shapeFlag&128&&(A.ssContent=S)),m=M,$?(S.el=$.el,S.component=$.component,S.transition&&Yn(S,S.transition),S.shapeFlag|=512,u.delete(M),u.add(M)):(u.add(M),E&&u.size>parseInt(E,10)&&d(u.values().next().value)),S.shapeFlag|=256,h=S,Ih(A.type)?A:S}}},Kv=Gv;function Wr(e,t){return me(e)?e.some(n=>Wr(n,t)):Ke(e)?e.split(",").includes(t):km(e)?e.test(t):!1}function Vh(e,t){Gh(e,"a",t)}function jh(e,t){Gh(e,"da",t)}function Gh(e,t,n=Qe){const r=e.__wdc||(e.__wdc=()=>{let f=n;for(;f;){if(f.isDeactivated)return;f=f.parent}return e()});if(jo(t,r,n),n){let f=n.parent;for(;f&&f.parent;)$i(f.parent.vnode)&&Yv(r,t,n,f),f=f.parent}}function Yv(e,t,n,r){const f=jo(t,e,r,!0);Ko(()=>{Ha(r[t],f)},n)}function ys(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function bs(e){return e.shapeFlag&128?e.ssContent:e}function jo(e,t,n=Qe,r=!1){if(n){const f=n[e]||(n[e]=[]),u=t.__weh||(t.__weh=(...h)=>{if(n.isUnmounted)return;er(),Tn(n);const g=Ct(t,n,e,h);return Sn(),tr(),g});return r?f.unshift(u):f.push(u),u}}const an=e=>(t,n=Qe)=>(!_i||e==="sp")&&jo(e,(...r)=>t(...r),n),Kh=an("bm"),Ye=an("m"),Yh=an("bu"),Go=an("u"),Rr=an("bum"),Ko=an("um"),Xh=an("sp"),Zh=an("rtg"),qh=an("rtc");function Jh(e,t=Qe){jo("ec",e,t)}function $t(e,t,n,r){let f;const u=n&&n[r];if(me(e)||Ke(e)){f=new Array(e.length);for(let h=0,g=e.length;h<g;h++)f[h]=t(e[h],h,void 0,u&&u[h])}else if(typeof e=="number"){f=new Array(e);for(let h=0;h<e;h++)f[h]=t(h+1,h,void 0,u&&u[h])}else if(We(e))if(e[Symbol.iterator])f=Array.from(e,(h,g)=>t(h,g,void 0,u&&u[g]));else{const h=Object.keys(e);f=new Array(h.length);for(let g=0,s=h.length;g<s;g++){const p=h[g];f[g]=t(e[p],p,g,u&&u[g])}}else f=[];return n&&(n[r]=f),f}function Xv(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(me(r))for(let f=0;f<r.length;f++)e[r[f].name]=r[f].fn;else r&&(e[r.name]=r.key?(...f)=>{const u=r.fn(...f);return u&&(u.key=r.key),u}:r.fn)}return e}function Zv(e,t,n={},r,f){if(nt.isCE||nt.parent&&zn(nt.parent)&&nt.parent.isCE)return t!=="default"&&(n.name=t),ae("slot",n,r&&r());let u=e[t];u&&u._c&&(u._d=!1),Z();const h=u&&Qh(u(n)),g=_e(xe,{key:n.key||h&&h.key||`_${t}`},h||(r?r():[]),h&&e._===1?64:-2);return!f&&g.scopeId&&(g.slotScopeIds=[g.scopeId+"-s"]),u&&u._c&&(u._d=!0),g}function Qh(e){return e.some(t=>Rn(t)?!(t.type===ut||t.type===xe&&!Qh(t.children)):!0)?e:null}function qv(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:jr(r)]=e[r];return n}const Js=e=>e?$f(e)?Zo(e)||e.proxy:Js(e.parent):null,Gr=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Js(e.parent),$root:e=>Js(e.root),$emit:e=>e.emit,$options:e=>al(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Po(e.update)}),$nextTick:e=>e.n||(e.n=bi.bind(e.proxy)),$watch:e=>zv.bind(e)}),ws=(e,t)=>e!==Pe&&!e.__isScriptSetup&&Ie(e,t),Qs={get({_:e},t){const{ctx:n,setupState:r,data:f,props:u,accessCache:h,type:g,appContext:s}=e;let p;if(t[0]!=="$"){const c=h[t];if(c!==void 0)switch(c){case 1:return r[t];case 2:return f[t];case 4:return n[t];case 3:return u[t]}else{if(ws(r,t))return h[t]=1,r[t];if(f!==Pe&&Ie(f,t))return h[t]=2,f[t];if((p=e.propsOptions[0])&&Ie(p,t))return h[t]=3,u[t];if(n!==Pe&&Ie(n,t))return h[t]=4,n[t];ea&&(h[t]=0)}}const o=Gr[t];let i,a;if(o)return t==="$attrs"&&wt(e,"get",t),o(e);if((i=g.__cssModules)&&(i=i[t]))return i;if(n!==Pe&&Ie(n,t))return h[t]=4,n[t];if(a=s.config.globalProperties,Ie(a,t))return a[t]},set({_:e},t,n){const{data:r,setupState:f,ctx:u}=e;return ws(f,t)?(f[t]=n,!0):r!==Pe&&Ie(r,t)?(r[t]=n,!0):Ie(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(u[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:f,propsOptions:u}},h){let g;return!!n[h]||e!==Pe&&Ie(e,h)||ws(t,h)||(g=u[0])&&Ie(g,h)||Ie(r,h)||Ie(Gr,h)||Ie(f.config.globalProperties,h)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ie(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Jv=Ge({},Qs,{get(e,t){if(t!==Symbol.unscopables)return Qs.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Lm(t)}});function Qv(){return null}function ey(){return null}function ty(e){}function ny(e){}function ry(){return null}function iy(){}function oy(e,t){return null}function sy(){return ef().slots}function ay(){return ef().attrs}function ly(e,t,n=Pe){const r=Mt(),f=gt(t),u=No((g,s)=>{let p;return Wh(()=>{const o=e[t];Ft(p,o)&&(p=o,s())}),{get(){return g(),n.get?n.get(p):p},set(o){const i=r.vnode.props;!(i&&(t in i||f in i)&&(`onUpdate:${t}`in i||`onUpdate:${f}`in i))&&Ft(o,p)&&(p=o,s()),r.emit(`update:${t}`,n.set?n.set(o):o)}}}),h=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return u[Symbol.iterator]=()=>{let g=0;return{next(){return g<2?{value:g++?e[h]||{}:u,done:!1}:{done:!0}}}},u}function ef(){const e=Mt();return e.setupContext||(e.setupContext=Cf(e))}function ui(e){return me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function cy(e,t){const n=ui(e);for(const r in t){if(r.startsWith("__skip"))continue;let f=n[r];f?me(f)||Ee(f)?f=n[r]={type:f,default:t[r]}:f.default=t[r]:f===null&&(f=n[r]={default:t[r]}),f&&t[`__skip_${r}`]&&(f.skipFactory=!0)}return n}function uy(e,t){return!e||!t?e||t:me(e)&&me(t)?e.concat(t):Ge({},ui(e),ui(t))}function hy(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function fy(e){const t=Mt();let n=e();return Sn(),Ua(n)&&(n=n.catch(r=>{throw Tn(t),r})),[n,()=>Tn(t)]}let ea=!0;function dy(e){const t=al(e),n=e.proxy,r=e.ctx;ea=!1,t.beforeCreate&&wc(t.beforeCreate,e,"bc");const{data:f,computed:u,methods:h,watch:g,provide:s,inject:p,created:o,beforeMount:i,mounted:a,beforeUpdate:c,updated:l,activated:d,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:A,unmounted:S,render:C,renderTracked:b,renderTriggered:x,errorCaptured:L,serverPrefetch:E,expose:M,inheritAttrs:$,components:k,directives:_,filters:w}=t;if(p&&py(p,r,null),h)for(const O in h){const I=h[O];Ee(I)&&(r[O]=I.bind(n))}if(f){const O=f.call(n,n);We(O)&&(e.data=xr(O))}if(ea=!0,u)for(const O in u){const I=u[O],F=Ee(I)?I.bind(n,n):Ee(I.get)?I.get.bind(n,n):pt,P=!Ee(I)&&Ee(I.set)?I.set.bind(n):pt,W=ke({get:F,set:P});Object.defineProperty(r,O,{enumerable:!0,configurable:!0,get:()=>W.value,set:j=>W.value=j})}if(g)for(const O in g)tf(g[O],r,n,O);if(s){const O=Ee(s)?s.call(n):s;Reflect.ownKeys(O).forEach(I=>{Kr(I,O[I])})}o&&wc(o,e,"c");function T(O,I){me(I)?I.forEach(F=>O(F.bind(n))):I&&O(I.bind(n))}if(T(Kh,i),T(Ye,a),T(Yh,c),T(Go,l),T(Vh,d),T(jh,m),T(Jh,L),T(qh,b),T(Zh,x),T(Rr,y),T(Ko,S),T(Xh,E),me(M))if(M.length){const O=e.exposed||(e.exposed={});M.forEach(I=>{Object.defineProperty(O,I,{get:()=>n[I],set:F=>n[I]=F})})}else e.exposed||(e.exposed={});C&&e.render===pt&&(e.render=C),$!=null&&(e.inheritAttrs=$),k&&(e.components=k),_&&(e.directives=_)}function py(e,t,n=pt){me(e)&&(e=ta(e));for(const r in e){const f=e[r];let u;We(f)?"default"in f?u=Rt(f.from||r,f.default,!0):u=Rt(f.from||r):u=Rt(f),at(u)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>u.value,set:h=>u.value=h}):t[r]=u}}function wc(e,t,n){Ct(me(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function tf(e,t,n,r){const f=r.includes(".")?Hh(n,r):()=>n[r];if(Ke(e)){const u=t[e];Ee(u)&&qe(f,u)}else if(Ee(e))qe(f,e.bind(n));else if(We(e))if(me(e))e.forEach(u=>tf(u,t,n,r));else{const u=Ee(e.handler)?e.handler.bind(n):t[e.handler];Ee(u)&&qe(f,u,e)}}function al(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:f,optionsCache:u,config:{optionMergeStrategies:h}}=e.appContext,g=u.get(t);let s;return g?s=g:!f.length&&!n&&!r?s=t:(s={},f.length&&f.forEach(p=>po(s,p,h,!0)),po(s,t,h)),We(t)&&u.set(t,s),s}function po(e,t,n,r=!1){const{mixins:f,extends:u}=t;u&&po(e,u,n,!0),f&&f.forEach(h=>po(e,h,n,!0));for(const h in t)if(!(r&&h==="expose")){const g=gy[h]||n&&n[h];e[h]=g?g(e[h],t[h]):t[h]}return e}const gy={data:$c,props:_c,emits:_c,methods:Hr,computed:Hr,beforeCreate:dt,created:dt,beforeMount:dt,mounted:dt,beforeUpdate:dt,updated:dt,beforeDestroy:dt,beforeUnmount:dt,destroyed:dt,unmounted:dt,activated:dt,deactivated:dt,errorCaptured:dt,serverPrefetch:dt,components:Hr,directives:Hr,watch:vy,provide:$c,inject:my};function $c(e,t){return t?e?function(){return Ge(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function my(e,t){return Hr(ta(e),ta(t))}function ta(e){if(me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function dt(e,t){return e?[...new Set([].concat(e,t))]:t}function Hr(e,t){return e?Ge(Object.create(null),e,t):t}function _c(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:Ge(Object.create(null),ui(e),ui(t??{})):t}function vy(e,t){if(!e)return t;if(!t)return e;const n=Ge(Object.create(null),e);for(const r in t)n[r]=dt(e[r],t[r]);return n}function nf(){return{app:null,config:{isNativeTag:Cm,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let yy=0;function by(e,t){return function(r,f=null){Ee(r)||(r=Ge({},r)),f!=null&&!We(f)&&(f=null);const u=nf(),h=new WeakSet;let g=!1;const s=u.app={_uid:yy++,_component:r,_props:f,_container:null,_context:u,_instance:null,version:kf,get config(){return u.config},set config(p){},use(p,...o){return h.has(p)||(p&&Ee(p.install)?(h.add(p),p.install(s,...o)):Ee(p)&&(h.add(p),p(s,...o))),s},mixin(p){return u.mixins.includes(p)||u.mixins.push(p),s},component(p,o){return o?(u.components[p]=o,s):u.components[p]},directive(p,o){return o?(u.directives[p]=o,s):u.directives[p]},mount(p,o,i){if(!g){const a=ae(r,f);return a.appContext=u,i===!0?i="svg":i===!1&&(i=void 0),o&&t?t(a,p):e(a,p,i),g=!0,s._container=p,p.__vue_app__=s,Zo(a.component)||a.component.proxy}},unmount(){g&&(e(null,s._container),delete s._container.__vue_app__)},provide(p,o){return u.provides[p]=o,s},runWithContext(p){hi=s;try{return p()}finally{hi=null}}};return s}}let hi=null;function Kr(e,t){if(Qe){let n=Qe.provides;const r=Qe.parent&&Qe.parent.provides;r===n&&(n=Qe.provides=Object.create(r)),n[e]=t}}function Rt(e,t,n=!1){const r=Qe||nt;if(r||hi){const f=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:hi._context.provides;if(f&&e in f)return f[e];if(arguments.length>1)return n&&Ee(t)?t.call(r&&r.proxy):t}}function wy(){return!!(Qe||nt||hi)}function $y(e,t,n,r=!1){const f={},u={};ao(u,Yo,1),e.propsDefaults=Object.create(null),rf(e,t,f,u);for(const h in e.propsOptions[0])h in f||(f[h]=void 0);n?e.props=r?f:Xa(f):e.type.props?e.props=f:e.props=u,e.attrs=u}function _y(e,t,n,r){const{props:f,attrs:u,vnode:{patchFlag:h}}=e,g=Me(f),[s]=e.propsOptions;let p=!1;if((r||h>0)&&!(h&16)){if(h&8){const o=e.vnode.dynamicProps;for(let i=0;i<o.length;i++){let a=o[i];if(Bo(e.emitsOptions,a))continue;const c=t[a];if(s)if(Ie(u,a))c!==u[a]&&(u[a]=c,p=!0);else{const l=gt(a);f[l]=na(s,g,l,c,e,!1)}else c!==u[a]&&(u[a]=c,p=!0)}}}else{rf(e,t,f,u)&&(p=!0);let o;for(const i in g)(!t||!Ie(t,i)&&((o=xt(i))===i||!Ie(t,o)))&&(s?n&&(n[i]!==void 0||n[o]!==void 0)&&(f[i]=na(s,g,i,void 0,e,!0)):delete f[i]);if(u!==g)for(const i in u)(!t||!Ie(t,i))&&(delete u[i],p=!0)}p&&Jt(e,"set","$attrs")}function rf(e,t,n,r){const[f,u]=e.propsOptions;let h=!1,g;if(t)for(let s in t){if(Vr(s))continue;const p=t[s];let o;f&&Ie(f,o=gt(s))?!u||!u.includes(o)?n[o]=p:(g||(g={}))[o]=p:Bo(e.emitsOptions,s)||(!(s in r)||p!==r[s])&&(r[s]=p,h=!0)}if(u){const s=Me(n),p=g||Pe;for(let o=0;o<u.length;o++){const i=u[o];n[i]=na(f,s,i,p[i],e,!Ie(p,i))}}return h}function na(e,t,n,r,f,u){const h=e[n];if(h!=null){const g=Ie(h,"default");if(g&&r===void 0){const s=h.default;if(h.type!==Function&&!h.skipFactory&&Ee(s)){const{propsDefaults:p}=f;n in p?r=p[n]:(Tn(f),r=p[n]=s.call(null,t),Sn())}else r=s}h[0]&&(u&&!g?r=!1:h[1]&&(r===""||r===xt(n))&&(r=!0))}return r}function of(e,t,n=!1){const r=t.propsCache,f=r.get(e);if(f)return f;const u=e.props,h={},g=[];let s=!1;if(!Ee(e)){const o=i=>{s=!0;const[a,c]=of(i,t,!0);Ge(h,a),c&&g.push(...c)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!u&&!s)return We(e)&&r.set(e,cr),cr;if(me(u))for(let o=0;o<u.length;o++){const i=gt(u[o]);Sc(i)&&(h[i]=Pe)}else if(u)for(const o in u){const i=gt(o);if(Sc(i)){const a=u[o],c=h[i]=me(a)||Ee(a)?{type:a}:Ge({},a);if(c){const l=kc(Boolean,c.type),d=kc(String,c.type);c[0]=l>-1,c[1]=d<0||l<d,(l>-1||Ie(c,"default"))&&g.push(i)}}}const p=[h,g];return We(e)&&r.set(e,p),p}function Sc(e){return e[0]!=="$"}function Cc(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ac(e,t){return Cc(e)===Cc(t)}function kc(e,t){return me(t)?t.findIndex(n=>Ac(n,e)):Ee(t)&&Ac(t,e)?0:-1}const sf=e=>e[0]==="_"||e==="$stable",ll=e=>me(e)?e.map(St):[St(e)],Sy=(e,t,n)=>{if(t._n)return t;const r=Je((...f)=>ll(t(...f)),n);return r._c=!1,r},af=(e,t,n)=>{const r=e._ctx;for(const f in e){if(sf(f))continue;const u=e[f];if(Ee(u))t[f]=Sy(f,u,r);else if(u!=null){const h=ll(u);t[f]=()=>h}}},lf=(e,t)=>{const n=ll(t);e.slots.default=()=>n},Cy=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Me(t),ao(t,"_",n)):af(t,e.slots={})}else e.slots={},t&&lf(e,t);ao(e.slots,Yo,1)},Ay=(e,t,n)=>{const{vnode:r,slots:f}=e;let u=!0,h=Pe;if(r.shapeFlag&32){const g=t._;g?n&&g===1?u=!1:(Ge(f,t),!n&&g===1&&delete f._):(u=!t.$stable,af(t,f)),h=t}else t&&(lf(e,t),h={default:1});if(u)for(const g in f)!sf(g)&&h[g]==null&&delete f[g]};function go(e,t,n,r,f=!1){if(me(e)){e.forEach((a,c)=>go(a,t&&(me(t)?t[c]:t),n,r,f));return}if(zn(r)&&!f)return;const u=r.shapeFlag&4?Zo(r.component)||r.component.proxy:r.el,h=f?null:u,{i:g,r:s}=e,p=t&&t.r,o=g.refs===Pe?g.refs={}:g.refs,i=g.setupState;if(p!=null&&p!==s&&(Ke(p)?(o[p]=null,Ie(i,p)&&(i[p]=null)):at(p)&&(p.value=null)),Ee(s))en(s,g,12,[h,o]);else{const a=Ke(s),c=at(s);if(a||c){const l=()=>{if(e.f){const d=a?Ie(i,s)?i[s]:o[s]:s.value;f?me(d)&&Ha(d,u):me(d)?d.includes(u)||d.push(u):a?(o[s]=[u],Ie(i,s)&&(i[s]=o[s])):(s.value=[u],e.k&&(o[e.k]=s.value))}else a?(o[s]=h,Ie(i,s)&&(i[s]=h)):c&&(s.value=h,e.k&&(o[e.k]=h))};h?(l.id=-1,ot(l,n)):l()}}}let dn=!1;const ky=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Ey=e=>e.namespaceURI.includes("MathML"),ji=e=>{if(ky(e))return"svg";if(Ey(e))return"mathml"},Gi=e=>e.nodeType===8;function xy(e){const{mt:t,p:n,o:{patchProp:r,createText:f,nextSibling:u,parentNode:h,remove:g,insert:s,createComment:p}}=e,o=(A,S)=>{if(!S.hasChildNodes()){n(null,A,S),fo(),S._vnode=A;return}dn=!1,i(S.firstChild,A,null,null,null),fo(),S._vnode=A,dn&&console.error("Hydration completed but contains mismatches.")},i=(A,S,C,b,x,L=!1)=>{const E=Gi(A)&&A.data==="[",M=()=>d(A,S,C,b,x,E),{type:$,ref:k,shapeFlag:_,patchFlag:w}=S;let R=A.nodeType;S.el=A,w===-2&&(L=!1,S.dynamicChildren=null);let T=null;switch($){case Xn:R!==3?S.children===""?(s(S.el=f(""),h(A),A),T=A):T=M():(A.data!==S.children&&(dn=!0,A.data=S.children),T=u(A));break;case ut:y(A)?(T=u(A),v(S.el=A.content.firstChild,A,C)):R!==8||E?T=M():T=u(A);break;case Vn:if(E&&(A=u(A),R=A.nodeType),R===1||R===3){T=A;const O=!S.children.length;for(let I=0;I<S.staticCount;I++)O&&(S.children+=T.nodeType===1?T.outerHTML:T.data),I===S.staticCount-1&&(S.anchor=T),T=u(T);return E?u(T):T}else M();break;case xe:E?T=l(A,S,C,b,x,L):T=M();break;default:if(_&1)(R!==1||S.type.toLowerCase()!==A.tagName.toLowerCase())&&!y(A)?T=M():T=a(A,S,C,b,x,L);else if(_&6){S.slotScopeIds=x;const O=h(A);if(E?T=m(A):Gi(A)&&A.data==="teleport start"?T=m(A,A.data,"teleport end"):T=u(A),t(S,O,null,C,b,ji(O),L),zn(S)){let I;E?(I=ae(xe),I.anchor=T?T.previousSibling:O.lastChild):I=A.nodeType===3?et(""):ae("div"),I.el=A,S.component.subTree=I}}else _&64?R!==8?T=M():T=S.type.hydrate(A,S,C,b,x,L,e,c):_&128&&(T=S.type.hydrate(A,S,C,b,ji(h(A)),x,L,e,i))}return k!=null&&go(k,null,b,S),T},a=(A,S,C,b,x,L)=>{L=L||!!S.dynamicChildren;const{type:E,props:M,patchFlag:$,shapeFlag:k,dirs:_,transition:w}=S,R=E==="input"||E==="option";if(R||$!==-1){_&&Dt(S,null,C,"created");let T=!1;if(y(A)){T=ff(b,w)&&C&&C.vnode.props&&C.vnode.props.appear;const I=A.content.firstChild;T&&w.beforeEnter(I),v(I,A,C),S.el=A=I}if(k&16&&!(M&&(M.innerHTML||M.textContent))){let I=c(A.firstChild,S,A,C,b,x,L);for(;I;){dn=!0;const F=I;I=I.nextSibling,g(F)}}else k&8&&A.textContent!==S.children&&(dn=!0,A.textContent=S.children);if(M)if(R||!L||$&48)for(const I in M)(R&&(I.endsWith("value")||I==="indeterminate")||vi(I)&&!Vr(I)||I[0]===".")&&r(A,I,null,M[I],void 0,void 0,C);else M.onClick&&r(A,"onClick",null,M.onClick,void 0,void 0,C);let O;(O=M&&M.onVnodeBeforeMount)&&yt(O,C,S),_&&Dt(S,null,C,"beforeMount"),((O=M&&M.onVnodeMounted)||_||T)&&Fh(()=>{O&&yt(O,C,S),T&&w.enter(A),_&&Dt(S,null,C,"mounted")},b)}return A.nextSibling},c=(A,S,C,b,x,L,E)=>{E=E||!!S.dynamicChildren;const M=S.children,$=M.length;for(let k=0;k<$;k++){const _=E?M[k]:M[k]=St(M[k]);if(A)A=i(A,_,b,x,L,E);else{if(_.type===Xn&&!_.children)continue;dn=!0,n(null,_,C,null,b,x,ji(C),L)}}return A},l=(A,S,C,b,x,L)=>{const{slotScopeIds:E}=S;E&&(x=x?x.concat(E):E);const M=h(A),$=c(u(A),S,M,C,b,x,L);return $&&Gi($)&&$.data==="]"?u(S.anchor=$):(dn=!0,s(S.anchor=p("]"),M,$),$)},d=(A,S,C,b,x,L)=>{if(dn=!0,S.el=null,L){const $=m(A);for(;;){const k=u(A);if(k&&k!==$)g(k);else break}}const E=u(A),M=h(A);return g(A),n(null,S,M,E,C,b,ji(M),x),E},m=(A,S="[",C="]")=>{let b=0;for(;A;)if(A=u(A),A&&Gi(A)&&(A.data===S&&b++,A.data===C)){if(b===0)return u(A);b--}return A},v=(A,S,C)=>{const b=S.parentNode;b&&b.replaceChild(A,S);let x=C;for(;x;)x.vnode.el===S&&(x.vnode.el=x.subTree.el=A),x=x.parent},y=A=>A.nodeType===1&&A.tagName.toLowerCase()==="template";return[o,i]}const ot=Fh;function cf(e){return hf(e)}function uf(e){return hf(e,xy)}function hf(e,t){const n=sh();n.__VUE__=!0;const{insert:r,remove:f,patchProp:u,createElement:h,createText:g,createComment:s,setText:p,setElementText:o,parentNode:i,nextSibling:a,setScopeId:c=pt,insertStaticContent:l}=e,d=(D,B,G,J=null,te=null,re=null,ue=void 0,le=null,he=!!B.dynamicChildren)=>{if(D===B)return;D&&!Ot(D,B)&&(J=U(D),j(D,te,re,!0),D=null),B.patchFlag===-2&&(he=!1,B.dynamicChildren=null);const{type:se,ref:pe,shapeFlag:$e}=B;switch(se){case Xn:m(D,B,G,J);break;case ut:v(D,B,G,J);break;case Vn:D==null&&y(B,G,J,ue);break;case xe:k(D,B,G,J,te,re,ue,le,he);break;default:$e&1?C(D,B,G,J,te,re,ue,le,he):$e&6?_(D,B,G,J,te,re,ue,le,he):($e&64||$e&128)&&se.process(D,B,G,J,te,re,ue,le,he,Y)}pe!=null&&te&&go(pe,D&&D.ref,re,B||D,!B)},m=(D,B,G,J)=>{if(D==null)r(B.el=g(B.children),G,J);else{const te=B.el=D.el;B.children!==D.children&&p(te,B.children)}},v=(D,B,G,J)=>{D==null?r(B.el=s(B.children||""),G,J):B.el=D.el},y=(D,B,G,J)=>{[D.el,D.anchor]=l(D.children,B,G,J,D.el,D.anchor)},A=({el:D,anchor:B},G,J)=>{let te;for(;D&&D!==B;)te=a(D),r(D,G,J),D=te;r(B,G,J)},S=({el:D,anchor:B})=>{let G;for(;D&&D!==B;)G=a(D),f(D),D=G;f(B)},C=(D,B,G,J,te,re,ue,le,he)=>{B.type==="svg"?ue="svg":B.type==="math"&&(ue="mathml"),D==null?b(B,G,J,te,re,ue,le,he):E(D,B,te,re,ue,le,he)},b=(D,B,G,J,te,re,ue,le)=>{let he,se;const{props:pe,shapeFlag:$e,transition:ve,dirs:Ae}=D;if(he=D.el=h(D.type,re,pe&&pe.is,pe),$e&8?o(he,D.children):$e&16&&L(D.children,he,null,J,te,$s(D,re),ue,le),Ae&&Dt(D,null,J,"created"),x(he,D,D.scopeId,ue,J),pe){for(const ce in pe)ce!=="value"&&!Vr(ce)&&u(he,ce,null,pe[ce],re,D.children,J,te,q);"value"in pe&&u(he,"value",null,pe.value,re),(se=pe.onVnodeBeforeMount)&&yt(se,J,D)}Ae&&Dt(D,null,J,"beforeMount");const Q=ff(te,ve);Q&&ve.beforeEnter(he),r(he,B,G),((se=pe&&pe.onVnodeMounted)||Q||Ae)&&ot(()=>{se&&yt(se,J,D),Q&&ve.enter(he),Ae&&Dt(D,null,J,"mounted")},te)},x=(D,B,G,J,te)=>{if(G&&c(D,G),J)for(let re=0;re<J.length;re++)c(D,J[re]);if(te){let re=te.subTree;if(B===re){const ue=te.vnode;x(D,ue,ue.scopeId,ue.slotScopeIds,te.parent)}}},L=(D,B,G,J,te,re,ue,le,he=0)=>{for(let se=he;se<D.length;se++){const pe=D[se]=le?bn(D[se]):St(D[se]);d(null,pe,B,G,J,te,re,ue,le)}},E=(D,B,G,J,te,re,ue)=>{const le=B.el=D.el;let{patchFlag:he,dynamicChildren:se,dirs:pe}=B;he|=D.patchFlag&16;const $e=D.props||Pe,ve=B.props||Pe;let Ae;if(G&&On(G,!1),(Ae=ve.onVnodeBeforeUpdate)&&yt(Ae,G,B,D),pe&&Dt(B,D,G,"beforeUpdate"),G&&On(G,!0),se?M(D.dynamicChildren,se,le,G,J,$s(B,te),re):ue||I(D,B,le,null,G,J,$s(B,te),re,!1),he>0){if(he&16)$(le,B,$e,ve,G,J,te);else if(he&2&&$e.class!==ve.class&&u(le,"class",null,ve.class,te),he&4&&u(le,"style",$e.style,ve.style,te),he&8){const Q=B.dynamicProps;for(let ce=0;ce<Q.length;ce++){const fe=Q[ce],Ce=$e[fe],Le=ve[fe];(Le!==Ce||fe==="value")&&u(le,fe,Ce,Le,te,D.children,G,J,q)}}he&1&&D.children!==B.children&&o(le,B.children)}else!ue&&se==null&&$(le,B,$e,ve,G,J,te);((Ae=ve.onVnodeUpdated)||pe)&&ot(()=>{Ae&&yt(Ae,G,B,D),pe&&Dt(B,D,G,"updated")},J)},M=(D,B,G,J,te,re,ue)=>{for(let le=0;le<B.length;le++){const he=D[le],se=B[le],pe=he.el&&(he.type===xe||!Ot(he,se)||he.shapeFlag&70)?i(he.el):G;d(he,se,pe,null,J,te,re,ue,!0)}},$=(D,B,G,J,te,re,ue)=>{if(G!==J){if(G!==Pe)for(const le in G)!Vr(le)&&!(le in J)&&u(D,le,G[le],null,ue,B.children,te,re,q);for(const le in J){if(Vr(le))continue;const he=J[le],se=G[le];he!==se&&le!=="value"&&u(D,le,se,he,ue,B.children,te,re,q)}"value"in J&&u(D,"value",G.value,J.value,ue)}},k=(D,B,G,J,te,re,ue,le,he)=>{const se=B.el=D?D.el:g(""),pe=B.anchor=D?D.anchor:g("");let{patchFlag:$e,dynamicChildren:ve,slotScopeIds:Ae}=B;Ae&&(le=le?le.concat(Ae):Ae),D==null?(r(se,G,J),r(pe,G,J),L(B.children,G,pe,te,re,ue,le,he)):$e>0&&$e&64&&ve&&D.dynamicChildren?(M(D.dynamicChildren,ve,G,te,re,ue,le),(B.key!=null||te&&B===te.subTree)&&cl(D,B,!0)):I(D,B,G,pe,te,re,ue,le,he)},_=(D,B,G,J,te,re,ue,le,he)=>{B.slotScopeIds=le,D==null?B.shapeFlag&512?te.ctx.activate(B,G,J,ue,he):w(B,G,J,te,re,ue,he):R(D,B,he)},w=(D,B,G,J,te,re,ue)=>{const le=D.component=wf(D,J,te);if($i(D)&&(le.ctx.renderer=Y),_f(le),le.asyncDep){if(te&&te.registerDep(le,T),!D.el){const he=le.subTree=ae(ut);v(null,he,B,G)}}else T(le,D,B,G,te,re,ue)},R=(D,B,G)=>{const J=B.component=D.component;if(Mv(D,B,G))if(J.asyncDep&&!J.asyncResolved){O(J,B,G);return}else J.next=B,Av(J.update),J.effect.dirty=!0,J.update();else B.el=D.el,J.vnode=B},T=(D,B,G,J,te,re,ue)=>{const le=()=>{if(D.isMounted){let{next:pe,bu:$e,u:ve,parent:Ae,vnode:Q}=D;{const Ne=df(D);if(Ne){pe&&(pe.el=Q.el,O(D,pe,ue)),Ne.asyncDep.then(()=>{D.isUnmounted||le()});return}}let ce=pe,fe;On(D,!1),pe?(pe.el=Q.el,O(D,pe,ue)):pe=Q,$e&&hr($e),(fe=pe.props&&pe.props.onVnodeBeforeUpdate)&&yt(fe,Ae,pe,Q),On(D,!0);const Ce=Ji(D),Le=D.subTree;D.subTree=Ce,d(Le,Ce,i(Le.el),U(Le),D,te,re),pe.el=Ce.el,ce===null&&tl(D,Ce.el),ve&&ot(ve,te),(fe=pe.props&&pe.props.onVnodeUpdated)&&ot(()=>yt(fe,Ae,pe,Q),te)}else{let pe;const{el:$e,props:ve}=B,{bm:Ae,m:Q,parent:ce}=D,fe=zn(B);if(On(D,!1),Ae&&hr(Ae),!fe&&(pe=ve&&ve.onVnodeBeforeMount)&&yt(pe,ce,B),On(D,!0),$e&&ee){const Ce=()=>{D.subTree=Ji(D),ee($e,D.subTree,D,te,null)};fe?B.type.__asyncLoader().then(()=>!D.isUnmounted&&Ce()):Ce()}else{const Ce=D.subTree=Ji(D);d(null,Ce,G,J,D,te,re),B.el=Ce.el}if(Q&&ot(Q,te),!fe&&(pe=ve&&ve.onVnodeMounted)){const Ce=B;ot(()=>yt(pe,ce,Ce),te)}(B.shapeFlag&256||ce&&zn(ce.vnode)&&ce.vnode.shapeFlag&256)&&D.a&&ot(D.a,te),D.isMounted=!0,B=G=J=null}},he=D.effect=new gr(le,pt,()=>Po(se),D.scope),se=D.update=()=>{he.dirty&&he.run()};se.id=D.uid,On(D,!0),se()},O=(D,B,G)=>{B.component=D;const J=D.vnode.props;D.vnode=B,D.next=null,_y(D,B.props,J,G),Ay(D,B.children,G),er(),pc(D),tr()},I=(D,B,G,J,te,re,ue,le,he=!1)=>{const se=D&&D.children,pe=D?D.shapeFlag:0,$e=B.children,{patchFlag:ve,shapeFlag:Ae}=B;if(ve>0){if(ve&128){P(se,$e,G,J,te,re,ue,le,he);return}else if(ve&256){F(se,$e,G,J,te,re,ue,le,he);return}}Ae&8?(pe&16&&q(se,te,re),$e!==se&&o(G,$e)):pe&16?Ae&16?P(se,$e,G,J,te,re,ue,le,he):q(se,te,re,!0):(pe&8&&o(G,""),Ae&16&&L($e,G,J,te,re,ue,le,he))},F=(D,B,G,J,te,re,ue,le,he)=>{D=D||cr,B=B||cr;const se=D.length,pe=B.length,$e=Math.min(se,pe);let ve;for(ve=0;ve<$e;ve++){const Ae=B[ve]=he?bn(B[ve]):St(B[ve]);d(D[ve],Ae,G,null,te,re,ue,le,he)}se>pe?q(D,te,re,!0,!1,$e):L(B,G,J,te,re,ue,le,he,$e)},P=(D,B,G,J,te,re,ue,le,he)=>{let se=0;const pe=B.length;let $e=D.length-1,ve=pe-1;for(;se<=$e&&se<=ve;){const Ae=D[se],Q=B[se]=he?bn(B[se]):St(B[se]);if(Ot(Ae,Q))d(Ae,Q,G,null,te,re,ue,le,he);else break;se++}for(;se<=$e&&se<=ve;){const Ae=D[$e],Q=B[ve]=he?bn(B[ve]):St(B[ve]);if(Ot(Ae,Q))d(Ae,Q,G,null,te,re,ue,le,he);else break;$e--,ve--}if(se>$e){if(se<=ve){const Ae=ve+1,Q=Ae<pe?B[Ae].el:J;for(;se<=ve;)d(null,B[se]=he?bn(B[se]):St(B[se]),G,Q,te,re,ue,le,he),se++}}else if(se>ve)for(;se<=$e;)j(D[se],te,re,!0),se++;else{const Ae=se,Q=se,ce=new Map;for(se=Q;se<=ve;se++){const Re=B[se]=he?bn(B[se]):St(B[se]);Re.key!=null&&ce.set(Re.key,se)}let fe,Ce=0;const Le=ve-Q+1;let Ne=!1,Xe=0;const Be=new Array(Le);for(se=0;se<Le;se++)Be[se]=0;for(se=Ae;se<=$e;se++){const Re=D[se];if(Ce>=Le){j(Re,te,re,!0);continue}let ze;if(Re.key!=null)ze=ce.get(Re.key);else for(fe=Q;fe<=ve;fe++)if(Be[fe-Q]===0&&Ot(Re,B[fe])){ze=fe;break}ze===void 0?j(Re,te,re,!0):(Be[ze-Q]=se+1,ze>=Xe?Xe=ze:Ne=!0,d(Re,B[ze],G,null,te,re,ue,le,he),Ce++)}const He=Ne?Ry(Be):cr;for(fe=He.length-1,se=Le-1;se>=0;se--){const Re=Q+se,ze=B[Re],un=Re+1<pe?B[Re+1].el:J;Be[se]===0?d(null,ze,G,un,te,re,ue,le,he):Ne&&(fe<0||se!==He[fe]?W(ze,G,un,2):fe--)}}},W=(D,B,G,J,te=null)=>{const{el:re,type:ue,transition:le,children:he,shapeFlag:se}=D;if(se&6){W(D.component.subTree,B,G,J);return}if(se&128){D.suspense.move(B,G,J);return}if(se&64){ue.move(D,B,G,Y);return}if(ue===xe){r(re,B,G);for(let $e=0;$e<he.length;$e++)W(he[$e],B,G,J);r(D.anchor,B,G);return}if(ue===Vn){A(D,B,G);return}if(J!==2&&se&1&&le)if(J===0)le.beforeEnter(re),r(re,B,G),ot(()=>le.enter(re),te);else{const{leave:$e,delayLeave:ve,afterLeave:Ae}=le,Q=()=>r(re,B,G),ce=()=>{$e(re,()=>{Q(),Ae&&Ae()})};ve?ve(re,Q,ce):ce()}else r(re,B,G)},j=(D,B,G,J=!1,te=!1)=>{const{type:re,props:ue,ref:le,children:he,dynamicChildren:se,shapeFlag:pe,patchFlag:$e,dirs:ve}=D;if(le!=null&&go(le,null,G,D,!0),pe&256){B.ctx.deactivate(D);return}const Ae=pe&1&&ve,Q=!zn(D);let ce;if(Q&&(ce=ue&&ue.onVnodeBeforeUnmount)&&yt(ce,B,D),pe&6)K(D.component,G,J);else{if(pe&128){D.suspense.unmount(G,J);return}Ae&&Dt(D,null,B,"beforeUnmount"),pe&64?D.type.remove(D,B,G,te,Y,J):se&&(re!==xe||$e>0&&$e&64)?q(se,B,G,!1,!0):(re===xe&&$e&384||!te&&pe&16)&&q(he,B,G),J&&H(D)}(Q&&(ce=ue&&ue.onVnodeUnmounted)||Ae)&&ot(()=>{ce&&yt(ce,B,D),Ae&&Dt(D,null,B,"unmounted")},G)},H=D=>{const{type:B,el:G,anchor:J,transition:te}=D;if(B===xe){z(G,J);return}if(B===Vn){S(D);return}const re=()=>{f(G),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(D.shapeFlag&1&&te&&!te.persisted){const{leave:ue,delayLeave:le}=te,he=()=>ue(G,re);le?le(D.el,re,he):he()}else re()},z=(D,B)=>{let G;for(;D!==B;)G=a(D),f(D),D=G;f(B)},K=(D,B,G)=>{const{bum:J,scope:te,update:re,subTree:ue,um:le}=D;J&&hr(J),te.stop(),re&&(re.active=!1,j(ue,D,B,G)),le&&ot(le,B),ot(()=>{D.isUnmounted=!0},B),B&&B.pendingBranch&&!B.isUnmounted&&D.asyncDep&&!D.asyncResolved&&D.suspenseId===B.pendingId&&(B.deps--,B.deps===0&&B.resolve())},q=(D,B,G,J=!1,te=!1,re=0)=>{for(let ue=re;ue<D.length;ue++)j(D[ue],B,G,J,te)},U=D=>D.shapeFlag&6?U(D.component.subTree):D.shapeFlag&128?D.suspense.next():a(D.anchor||D.el),X=(D,B,G)=>{D==null?B._vnode&&j(B._vnode,null,null,!0):d(B._vnode||null,D,B,null,null,null,G),pc(),fo(),B._vnode=D},Y={p:d,um:j,m:W,r:H,mt:w,mc:L,pc:I,pbc:M,n:U,o:e};let V,ee;return t&&([V,ee]=t(Y)),{render:X,hydrate:V,createApp:by(X,V)}}function $s({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function On({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ff(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function cl(e,t,n=!1){const r=e.children,f=t.children;if(me(r)&&me(f))for(let u=0;u<r.length;u++){const h=r[u];let g=f[u];g.shapeFlag&1&&!g.dynamicChildren&&((g.patchFlag<=0||g.patchFlag===32)&&(g=f[u]=bn(f[u]),g.el=h.el),n||cl(h,g)),g.type===Xn&&(g.el=h.el)}}function Ry(e){const t=e.slice(),n=[0];let r,f,u,h,g;const s=e.length;for(r=0;r<s;r++){const p=e[r];if(p!==0){if(f=n[n.length-1],e[f]<p){t[r]=f,n.push(r);continue}for(u=0,h=n.length-1;u<h;)g=u+h>>1,e[n[g]]<p?u=g+1:h=g;p<e[n[u]]&&(u>0&&(t[r]=n[u-1]),n[u]=r)}}for(u=n.length,h=n[u-1];u-- >0;)n[u]=h,h=t[h];return n}function df(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:df(t)}const Ty=e=>e.__isTeleport,Yr=e=>e&&(e.disabled||e.disabled===""),Ec=e=>typeof SVGElement<"u"&&e instanceof SVGElement,xc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ra=(e,t)=>{const n=e&&e.to;return Ke(n)?t?t(n):null:n},Ly={name:"Teleport",__isTeleport:!0,process(e,t,n,r,f,u,h,g,s,p){const{mc:o,pc:i,pbc:a,o:{insert:c,querySelector:l,createText:d,createComment:m}}=p,v=Yr(t.props);let{shapeFlag:y,children:A,dynamicChildren:S}=t;if(e==null){const C=t.el=d(""),b=t.anchor=d("");c(C,n,r),c(b,n,r);const x=t.target=ra(t.props,l),L=t.targetAnchor=d("");x&&(c(L,x),h==="svg"||Ec(x)?h="svg":(h==="mathml"||xc(x))&&(h="mathml"));const E=(M,$)=>{y&16&&o(A,M,$,f,u,h,g,s)};v?E(n,b):x&&E(x,L)}else{t.el=e.el;const C=t.anchor=e.anchor,b=t.target=e.target,x=t.targetAnchor=e.targetAnchor,L=Yr(e.props),E=L?n:b,M=L?C:x;if(h==="svg"||Ec(b)?h="svg":(h==="mathml"||xc(b))&&(h="mathml"),S?(a(e.dynamicChildren,S,E,f,u,h,g),cl(e,t,!0)):s||i(e,t,E,M,f,u,h,g,!1),v)L?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ki(t,n,C,p,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=ra(t.props,l);$&&Ki(t,$,null,p,0)}else L&&Ki(t,b,x,p,1)}pf(t)},remove(e,t,n,r,{um:f,o:{remove:u}},h){const{shapeFlag:g,children:s,anchor:p,targetAnchor:o,target:i,props:a}=e;if(i&&u(o),h&&u(p),g&16){const c=h||!Yr(a);for(let l=0;l<s.length;l++){const d=s[l];f(d,t,n,c,!!d.dynamicChildren)}}},move:Ki,hydrate:My};function Ki(e,t,n,{o:{insert:r},m:f},u=2){u===0&&r(e.targetAnchor,t,n);const{el:h,anchor:g,shapeFlag:s,children:p,props:o}=e,i=u===2;if(i&&r(h,t,n),(!i||Yr(o))&&s&16)for(let a=0;a<p.length;a++)f(p[a],t,n,2);i&&r(g,t,n)}function My(e,t,n,r,f,u,{o:{nextSibling:h,parentNode:g,querySelector:s}},p){const o=t.target=ra(t.props,s);if(o){const i=o._lpa||o.firstChild;if(t.shapeFlag&16)if(Yr(t.props))t.anchor=p(h(e),t,g(e),n,r,f,u),t.targetAnchor=i;else{t.anchor=h(e);let a=i;for(;a;)if(a=h(a),a&&a.nodeType===8&&a.data==="teleport anchor"){t.targetAnchor=a,o._lpa=t.targetAnchor&&h(t.targetAnchor);break}p(i,t,o,n,r,f,u)}pf(t)}return t.anchor&&h(t.anchor)}const Oy=Ly;function pf(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const xe=Symbol.for("v-fgt"),Xn=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),Vn=Symbol.for("v-stc"),Xr=[];let bt=null;function Z(e=!1){Xr.push(bt=e?null:[])}function gf(){Xr.pop(),bt=Xr[Xr.length-1]||null}let Zn=1;function ia(e){Zn+=e}function mf(e){return e.dynamicChildren=Zn>0?bt||cr:null,gf(),Zn>0&&bt&&bt.push(e),e}function ie(e,t,n,r,f,u){return mf(N(e,t,n,r,f,u,!0))}function _e(e,t,n,r,f){return mf(ae(e,t,n,r,f,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function Ot(e,t){return e.type===t.type&&e.key===t.key}function Iy(e){}const Yo="__vInternal",vf=({key:e})=>e??null,Qi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ke(e)||at(e)||Ee(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,f=null,u=e===xe?0:1,h=!1,g=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vf(t),ref:t&&Qi(t),scopeId:Wo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:r,dynamicProps:f,dynamicChildren:null,appContext:null,ctx:nt};return g?(ul(s,n),u&128&&e.normalize(s)):n&&(s.shapeFlag|=Ke(n)?8:16),Zn>0&&!h&&bt&&(s.patchFlag>0||u&6)&&s.patchFlag!==32&&bt.push(s),s}const ae=Fy;function Fy(e,t=null,n=null,r=0,f=null,u=!1){if((!e||e===Oh)&&(e=ut),Rn(e)){const g=Ut(e,t,!0);return n&&ul(g,n),Zn>0&&!u&&bt&&(g.shapeFlag&6?bt[bt.indexOf(e)]=g:bt.push(g)),g.patchFlag|=-2,g}if(Uy(e)&&(e=e.__vccOpts),t){t=yf(t);let{class:g,style:s}=t;g&&!Ke(g)&&(t.class=Er(g)),We(s)&&(Za(s)&&!me(s)&&(s=Ge({},s)),t.style=yi(s))}const h=Ke(e)?1:Ih(e)?128:Ty(e)?64:We(e)?4:Ee(e)?2:0;return N(e,t,n,r,f,h,u,!0)}function yf(e){return e?Za(e)||Yo in e?Ge({},e):e:null}function Ut(e,t,n=!1){const{props:r,ref:f,patchFlag:u,children:h}=e,g=t?bf(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&vf(g),ref:t&&t.ref?n&&f?me(f)?f.concat(Qi(t)):[f,Qi(t)]:Qi(t):f,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:h,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ut(e.ssContent),ssFallback:e.ssFallback&&Ut(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function et(e=" ",t=0){return ae(Xn,null,e,t)}function Xo(e,t){const n=ae(Vn,null,e);return n.staticCount=t,n}function de(e="",t=!1){return t?(Z(),_e(ut,null,e)):ae(ut,null,e)}function St(e){return e==null||typeof e=="boolean"?ae(ut):me(e)?ae(xe,null,e.slice()):typeof e=="object"?bn(e):ae(Xn,null,String(e))}function bn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ut(e)}function ul(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(me(t))n=16;else if(typeof t=="object")if(r&65){const f=t.default;f&&(f._c&&(f._d=!1),ul(e,f()),f._c&&(f._d=!0));return}else{n=32;const f=t._;!f&&!(Yo in t)?t._ctx=nt:f===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[et(t)]):n=8);e.children=t,e.shapeFlag|=n}function bf(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const f in r)if(f==="class")t.class!==r.class&&(t.class=Er([t.class,r.class]));else if(f==="style")t.style=yi([t.style,r.style]);else if(vi(f)){const u=t[f],h=r[f];h&&u!==h&&!(me(u)&&u.includes(h))&&(t[f]=u?[].concat(u,h):h)}else f!==""&&(t[f]=r[f])}return t}function yt(e,t,n,r=null){Ct(e,t,7,[n,r])}const Ny=nf();let Dy=0;function wf(e,t,n){const r=e.type,f=(t?t.appContext:e.appContext)||Ny,u={uid:Dy++,vnode:e,type:r,parent:t,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new Va(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:of(r,f),emitsOptions:Mh(r,f),emit:null,emitted:null,propsDefaults:Pe,inheritAttrs:r.inheritAttrs,ctx:Pe,data:Pe,props:Pe,attrs:Pe,slots:Pe,refs:Pe,setupState:Pe,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return u.ctx={_:u},u.root=t?t.root:u,u.emit=Ev.bind(null,u),e.ce&&e.ce(u),u}let Qe=null;const Mt=()=>Qe||nt;let hl,oa;{const e=sh(),t=(n,r)=>{let f;return(f=e[n])||(f=e[n]=[]),f.push(r),u=>{f.length>1?f.forEach(h=>h(u)):f[0](u)}};hl=t("__VUE_INSTANCE_SETTERS__",n=>Qe=n),oa=t("__VUE_SSR_SETTERS__",n=>_i=n)}const Tn=e=>{hl(e),e.scope.on()},Sn=()=>{Qe&&Qe.scope.off(),hl(null)};function $f(e){return e.vnode.shapeFlag&4}let _i=!1;function _f(e,t=!1){t&&oa(t);const{props:n,children:r}=e.vnode,f=$f(e);$y(e,n,f,t),Cy(e,r);const u=f?Py(e,t):void 0;return t&&oa(!1),u}function Py(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Fo(new Proxy(e.ctx,Qs));const{setup:r}=n;if(r){const f=e.setupContext=r.length>1?Cf(e):null;Tn(e),er();const u=en(r,e,0,[e.props,f]);if(tr(),Sn(),Ua(u)){if(u.then(Sn,Sn),t)return u.then(h=>{sa(e,h,t)}).catch(h=>{nr(h,e,0)});e.asyncDep=u}else sa(e,u,t)}else Sf(e,t)}function sa(e,t,n){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:We(t)&&(e.setupState=Qa(t)),Sf(e,n)}let mo,aa;function By(e){mo=e,aa=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Jv))}}const Wy=()=>!mo;function Sf(e,t,n){const r=e.type;if(!e.render){if(!t&&mo&&!r.render){const f=r.template||al(e).template;if(f){const{isCustomElement:u,compilerOptions:h}=e.appContext.config,{delimiters:g,compilerOptions:s}=r,p=Ge(Ge({isCustomElement:u,delimiters:g},h),s);r.render=mo(f,p)}}e.render=r.render||pt,aa&&aa(e)}{Tn(e),er();try{dy(e)}finally{tr(),Sn()}}}function Hy(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return wt(e,"get","$attrs"),t[n]}}))}function Cf(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Hy(e)},slots:e.slots,emit:e.emit,expose:t}}function Zo(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Qa(Fo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Gr)return Gr[n](e)},has(t,n){return n in t||n in Gr}}))}function la(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Uy(e){return Ee(e)&&"__vccOpts"in e}const ke=(e,t)=>cv(e,t,_i);function Tr(e,t,n){const r=arguments.length;return r===2?We(t)&&!me(t)?Rn(t)?ae(e,null,[t]):ae(e,t):ae(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Rn(n)&&(n=[n]),ae(e,t,n))}function zy(){}function Vy(e,t,n,r){const f=n[r];if(f&&Af(f,e))return f;const u=t();return u.memo=e.slice(),n[r]=u}function Af(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Ft(n[r],t[r]))return!1;return Zn>0&&bt&&bt.push(e),!0}const kf="3.4.3",jy=pt,Gy=_v,Ky=void 0,Yy=pt,Xy={createComponentInstance:wf,setupComponent:_f,renderComponentRoot:Ji,setCurrentRenderingInstance:li,isVNode:Rn,normalizeVNode:St},Zy=Xy,qy=null,Jy=null,Qy=null,e0="http://www.w3.org/2000/svg",t0="http://www.w3.org/1998/Math/MathML",wn=typeof document<"u"?document:null,Rc=wn&&wn.createElement("template"),n0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const f=t==="svg"?wn.createElementNS(e0,e):t==="mathml"?wn.createElementNS(t0,e):wn.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&f.setAttribute("multiple",r.multiple),f},createText:e=>wn.createTextNode(e),createComment:e=>wn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,f,u){const h=n?n.previousSibling:t.lastChild;if(f&&(f===u||f.nextSibling))for(;t.insertBefore(f.cloneNode(!0),n),!(f===u||!(f=f.nextSibling)););else{Rc.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const g=Rc.content;if(r==="svg"||r==="mathml"){const s=g.firstChild;for(;s.firstChild;)g.appendChild(s.firstChild);g.removeChild(s)}t.insertBefore(g,n)}return[h?h.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pn="transition",Ir="animation",vr=Symbol("_vtc"),fl=(e,{slots:t})=>Tr(Uh,xf(e),t);fl.displayName="Transition";const Ef={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},r0=fl.props=Ge({},sl,Ef),In=(e,t=[])=>{me(e)?e.forEach(n=>n(...t)):e&&e(...t)},Tc=e=>e?me(e)?e.some(t=>t.length>1):e.length>1:!1;function xf(e){const t={};for(const k in e)k in Ef||(t[k]=e[k]);if(e.css===!1)return t;const{name:n="v",type:r,duration:f,enterFromClass:u=`${n}-enter-from`,enterActiveClass:h=`${n}-enter-active`,enterToClass:g=`${n}-enter-to`,appearFromClass:s=u,appearActiveClass:p=h,appearToClass:o=g,leaveFromClass:i=`${n}-leave-from`,leaveActiveClass:a=`${n}-leave-active`,leaveToClass:c=`${n}-leave-to`}=e,l=i0(f),d=l&&l[0],m=l&&l[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:A,onLeave:S,onLeaveCancelled:C,onBeforeAppear:b=v,onAppear:x=y,onAppearCancelled:L=A}=t,E=(k,_,w)=>{vn(k,_?o:g),vn(k,_?p:h),w&&w()},M=(k,_)=>{k._isLeaving=!1,vn(k,i),vn(k,c),vn(k,a),_&&_()},$=k=>(_,w)=>{const R=k?x:y,T=()=>E(_,k,w);In(R,[_,T]),Lc(()=>{vn(_,k?s:u),Gt(_,k?o:g),Tc(R)||Mc(_,r,d,T)})};return Ge(t,{onBeforeEnter(k){In(v,[k]),Gt(k,u),Gt(k,h)},onBeforeAppear(k){In(b,[k]),Gt(k,s),Gt(k,p)},onEnter:$(!1),onAppear:$(!0),onLeave(k,_){k._isLeaving=!0;const w=()=>M(k,_);Gt(k,i),Tf(),Gt(k,a),Lc(()=>{k._isLeaving&&(vn(k,i),Gt(k,c),Tc(S)||Mc(k,r,m,w))}),In(S,[k,w])},onEnterCancelled(k){E(k,!1),In(A,[k])},onAppearCancelled(k){E(k,!0),In(L,[k])},onLeaveCancelled(k){M(k),In(C,[k])}})}function i0(e){if(e==null)return null;if(We(e))return[_s(e.enter),_s(e.leave)];{const t=_s(e);return[t,t]}}function _s(e){return co(e)}function Gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vr]||(e[vr]=new Set)).add(t)}function vn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[vr];n&&(n.delete(t),n.size||(e[vr]=void 0))}function Lc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let o0=0;function Mc(e,t,n,r){const f=e._endId=++o0,u=()=>{f===e._endId&&r()};if(n)return setTimeout(u,n);const{type:h,timeout:g,propCount:s}=Rf(e,t);if(!h)return r();const p=h+"end";let o=0;const i=()=>{e.removeEventListener(p,a),u()},a=c=>{c.target===e&&++o>=s&&i()};setTimeout(()=>{o<s&&i()},g+1),e.addEventListener(p,a)}function Rf(e,t){const n=window.getComputedStyle(e),r=l=>(n[l]||"").split(", "),f=r(`${pn}Delay`),u=r(`${pn}Duration`),h=Oc(f,u),g=r(`${Ir}Delay`),s=r(`${Ir}Duration`),p=Oc(g,s);let o=null,i=0,a=0;t===pn?h>0&&(o=pn,i=h,a=u.length):t===Ir?p>0&&(o=Ir,i=p,a=s.length):(i=Math.max(h,p),o=i>0?h>p?pn:Ir:null,a=o?o===pn?u.length:s.length:0);const c=o===pn&&/\b(transform|all)(,|$)/.test(r(`${pn}Property`).toString());return{type:o,timeout:i,propCount:a,hasTransform:c}}function Oc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ic(n)+Ic(e[r])))}function Ic(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Tf(){return document.body.offsetHeight}function s0(e,t,n){const r=e[vr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const dl=Symbol("_vod"),Lf={beforeMount(e,{value:t},{transition:n}){e[dl]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Fr(e,!0),r.enter(e)):r.leave(e,()=>{Fr(e,!1)}):Fr(e,t))},beforeUnmount(e,{value:t}){Fr(e,t)}};function Fr(e,t){e.style.display=t?e[dl]:"none"}function a0(){Lf.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Mf=Symbol("");function l0(e){const t=Mt();if(!t)return;const n=t.ut=(f=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(u=>ua(u,f))},r=()=>{const f=e(t.proxy);ca(t.subTree,f),n(f)};Bh(r),Ye(()=>{const f=new MutationObserver(r);f.observe(t.subTree.el.parentNode,{childList:!0}),Ko(()=>f.disconnect())})}function ca(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ca(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ua(e.el,t);else if(e.type===xe)e.children.forEach(n=>ca(n,t));else if(e.type===Vn){let{el:n,anchor:r}=e;for(;n&&(ua(n,t),n!==r);)n=n.nextSibling}}function ua(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const f in t)n.setProperty(`--${f}`,t[f]),r+=`--${f}: ${t[f]};`;n[Mf]=r}}function c0(e,t,n){const r=e.style,f=Ke(n);if(n&&!f){if(t&&!Ke(t))for(const u in t)n[u]==null&&ha(r,u,"");for(const u in n)ha(r,u,n[u])}else{const u=r.display;if(f){if(t!==n){const h=r[Mf];h&&(n+=";"+h),r.cssText=n}}else t&&e.removeAttribute("style");dl in e&&(r.display=u)}}const Fc=/\s*!important$/;function ha(e,t,n){if(me(n))n.forEach(r=>ha(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=u0(e,t);Fc.test(n)?e.setProperty(xt(r),n.replace(Fc,""),"important"):e[r]=n}}const Nc=["Webkit","Moz","ms"],Ss={};function u0(e,t){const n=Ss[t];if(n)return n;let r=gt(t);if(r!=="filter"&&r in e)return Ss[t]=r;r=kr(r);for(let f=0;f<Nc.length;f++){const u=Nc[f]+r;if(u in e)return Ss[t]=u}return t}const Dc="http://www.w3.org/1999/xlink";function h0(e,t,n,r,f){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Dc,t.slice(6,t.length)):e.setAttributeNS(Dc,t,n);else{const u=Pm(t);n==null||u&&!ah(n)?e.removeAttribute(t):e.setAttribute(t,u?"":n)}}function f0(e,t,n,r,f,u,h){if(t==="innerHTML"||t==="textContent"){r&&h(r,f,u),e[t]=n??"";return}const g=e.tagName;if(t==="value"&&g!=="PROGRESS"&&!g.includes("-")){e._value=n;const p=g==="OPTION"?e.getAttribute("value"):e.value,o=n??"";p!==o&&(e.value=o),n==null&&e.removeAttribute(t);return}let s=!1;if(n===""||n==null){const p=typeof e[t];p==="boolean"?n=ah(n):n==null&&p==="string"?(n="",s=!0):p==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(t)}function Yt(e,t,n,r){e.addEventListener(t,n,r)}function d0(e,t,n,r){e.removeEventListener(t,n,r)}const Pc=Symbol("_vei");function p0(e,t,n,r,f=null){const u=e[Pc]||(e[Pc]={}),h=u[t];if(r&&h)h.value=r;else{const[g,s]=g0(t);if(r){const p=u[t]=y0(r,f);Yt(e,g,p,s)}else h&&(d0(e,g,h,s),u[t]=void 0)}}const Bc=/(?:Once|Passive|Capture)$/;function g0(e){let t;if(Bc.test(e)){t={};let r;for(;r=e.match(Bc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):xt(e.slice(2)),t]}let Cs=0;const m0=Promise.resolve(),v0=()=>Cs||(m0.then(()=>Cs=0),Cs=Date.now());function y0(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Ct(b0(r,n.value),t,5,[r])};return n.value=e,n.attached=v0(),n}function b0(e,t){if(me(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>f=>!f._stopped&&r&&r(f))}else return t}const Wc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,w0=(e,t,n,r,f,u,h,g,s)=>{const p=f==="svg";t==="class"?s0(e,r,p):t==="style"?c0(e,n,r):vi(t)?Wa(t)||p0(e,t,n,r,h):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$0(e,t,r,p))?f0(e,t,r,u,h,g,s):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),h0(e,t,r,p))};function $0(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wc(t)&&Ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const f=e.tagName;if(f==="IMG"||f==="VIDEO"||f==="CANVAS"||f==="SOURCE")return!1}return Wc(t)&&Ke(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function Of(e,t){const n=be(e);class r extends qo{constructor(u){super(n,u,t)}}return r.def=n,r}/*! #__NO_SIDE_EFFECTS__ */const _0=e=>Of(e,Vf),S0=typeof HTMLElement<"u"?HTMLElement:class{};class qo extends S0{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),bi(()=>{this._connected||(fa(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const f of r)this._setAttr(f.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,f=!1)=>{const{props:u,styles:h}=r;let g;if(u&&!me(u))for(const s in u){const p=u[s];(p===Number||p&&p.type===Number)&&(s in this._props&&(this._props[s]=co(this._props[s])),(g||(g=Object.create(null)))[gt(s)]=!0)}this._numberProps=g,f&&this._resolveProps(r),this._applyStyles(h),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=me(n)?n:Object.keys(n||{});for(const f of Object.keys(this))f[0]!=="_"&&r.includes(f)&&this._setProp(f,this[f],!0,!1);for(const f of r.map(gt))Object.defineProperty(this,f,{get(){return this._getProp(f)},set(u){this._setProp(f,u)}})}_setAttr(t){let n=this.getAttribute(t);const r=gt(t);this._numberProps&&this._numberProps[r]&&(n=co(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,f=!0){n!==this._props[t]&&(this._props[t]=n,f&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(xt(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(xt(t),n+""):n||this.removeAttribute(xt(t))))}_update(){fa(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ae(this._def,Ge({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(u,h)=>{this.dispatchEvent(new CustomEvent(u,{detail:h}))};n.emit=(u,...h)=>{r(u,h),xt(u)!==u&&r(xt(u),h)};let f=this;for(;f=f&&(f.parentNode||f.host);)if(f instanceof qo){n.parent=f._instance,n.provides=f._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function C0(e="$style"){{const t=Mt();if(!t)return Pe;const n=t.type.__cssModules;if(!n)return Pe;const r=n[e];return r||Pe}}const If=new WeakMap,Ff=new WeakMap,vo=Symbol("_moveCb"),Hc=Symbol("_enterCb"),Nf={name:"TransitionGroup",props:Ge({},r0,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Mt(),r=ol();let f,u;return Go(()=>{if(!f.length)return;const h=e.moveClass||`${e.name||"v"}-move`;if(!T0(f[0].el,n.vnode.el,h))return;f.forEach(E0),f.forEach(x0);const g=f.filter(R0);Tf(),g.forEach(s=>{const p=s.el,o=p.style;Gt(p,h),o.transform=o.webkitTransform=o.transitionDuration="";const i=p[vo]=a=>{a&&a.target!==p||(!a||/transform$/.test(a.propertyName))&&(p.removeEventListener("transitionend",i),p[vo]=null,vn(p,h))};p.addEventListener("transitionend",i)})}),()=>{const h=Me(e),g=xf(h);let s=h.tag||xe;f=u,u=t.default?Vo(t.default()):[];for(let p=0;p<u.length;p++){const o=u[p];o.key!=null&&Yn(o,mr(o,g,r,n))}if(f)for(let p=0;p<f.length;p++){const o=f[p];Yn(o,mr(o,g,r,n)),If.set(o,o.el.getBoundingClientRect())}return ae(s,null,u)}}},A0=e=>delete e.mode;Nf.props;const k0=Nf;function E0(e){const t=e.el;t[vo]&&t[vo](),t[Hc]&&t[Hc]()}function x0(e){Ff.set(e,e.el.getBoundingClientRect())}function R0(e){const t=If.get(e),n=Ff.get(e),r=t.left-n.left,f=t.top-n.top;if(r||f){const u=e.el.style;return u.transform=u.webkitTransform=`translate(${r}px,${f}px)`,u.transitionDuration="0s",e}}function T0(e,t,n){const r=e.cloneNode(),f=e[vr];f&&f.forEach(g=>{g.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(g=>g&&r.classList.add(g)),r.style.display="none";const u=t.nodeType===1?t:t.parentNode;u.appendChild(r);const{hasTransform:h}=Rf(r);return u.removeChild(r),h}const Ln=e=>{const t=e.props["onUpdate:modelValue"]||!1;return me(t)?n=>hr(t,n):t};function L0(e){e.target.composing=!0}function Uc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tt=Symbol("_assign"),qn={created(e,{modifiers:{lazy:t,trim:n,number:r}},f){e[Tt]=Ln(f);const u=r||f.props&&f.props.type==="number";Yt(e,t?"change":"input",h=>{if(h.target.composing)return;let g=e.value;n&&(g=g.trim()),u&&(g=lo(g)),e[Tt](g)}),n&&Yt(e,"change",()=>{e.value=e.value.trim()}),t||(Yt(e,"compositionstart",L0),Yt(e,"compositionend",Uc),Yt(e,"change",Uc))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:f}},u){if(e[Tt]=Ln(u),e.composing)return;const h=f||e.type==="number"?lo(e.value):e.value,g=t??"";h!==g&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===g)||(e.value=g))}},pl={deep:!0,created(e,t,n){e[Tt]=Ln(n),Yt(e,"change",()=>{const r=e._modelValue,f=yr(e),u=e.checked,h=e[Tt];if(me(r)){const g=To(r,f),s=g!==-1;if(u&&!s)h(r.concat(f));else if(!u&&s){const p=[...r];p.splice(g,1),h(p)}}else if(Qn(r)){const g=new Set(r);u?g.add(f):g.delete(f),h(g)}else h(Pf(e,u))})},mounted:zc,beforeUpdate(e,t,n){e[Tt]=Ln(n),zc(e,t,n)}};function zc(e,{value:t,oldValue:n},r){e._modelValue=t,me(t)?e.checked=To(t,r.props.value)>-1:Qn(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=xn(t,Pf(e,!0)))}const gl={created(e,{value:t},n){e.checked=xn(t,n.props.value),e[Tt]=Ln(n),Yt(e,"change",()=>{e[Tt](yr(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Tt]=Ln(r),t!==n&&(e.checked=xn(t,r.props.value))}},Df={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const f=Qn(t);Yt(e,"change",()=>{const u=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?lo(yr(h)):yr(h));e[Tt](e.multiple?f?new Set(u):u:u[0])}),e[Tt]=Ln(r)},mounted(e,{value:t}){Vc(e,t)},beforeUpdate(e,t,n){e[Tt]=Ln(n)},updated(e,{value:t}){Vc(e,t)}};function Vc(e,t){const n=e.multiple;if(!(n&&!me(t)&&!Qn(t))){for(let r=0,f=e.options.length;r<f;r++){const u=e.options[r],h=yr(u);if(n)me(t)?u.selected=To(t,h)>-1:u.selected=t.has(h);else if(xn(yr(u),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function yr(e){return"_value"in e?e._value:e.value}function Pf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Bf={created(e,t,n){Yi(e,t,n,null,"created")},mounted(e,t,n){Yi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Yi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Yi(e,t,n,r,"updated")}};function Wf(e,t){switch(e){case"SELECT":return Df;case"TEXTAREA":return qn;default:switch(t){case"checkbox":return pl;case"radio":return gl;default:return qn}}}function Yi(e,t,n,r,f){const h=Wf(e.tagName,n.props&&n.props.type)[f];h&&h(e,t,n,r)}function M0(){qn.getSSRProps=({value:e})=>({value:e}),gl.getSSRProps=({value:e},t)=>{if(t.props&&xn(t.props.value,e))return{checked:!0}},pl.getSSRProps=({value:e},t)=>{if(me(e)){if(t.props&&To(e,t.props.value)>-1)return{checked:!0}}else if(Qn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Bf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Wf(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const O0=["ctrl","shift","alt","meta"],I0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>O0.some(n=>e[`${n}Key`]&&!t.includes(n))},F0=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(f,...u)=>{for(let h=0;h<t.length;h++){const g=I0[t[h]];if(g&&g(f,t))return}return e(f,...u)})},N0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},D0=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=f=>{if(!("key"in f))return;const u=xt(f.key);if(t.some(h=>h===u||N0[h]===u))return e(f)})},Hf=Ge({patchProp:w0},n0);let Zr,jc=!1;function Uf(){return Zr||(Zr=cf(Hf))}function zf(){return Zr=jc?Zr:uf(Hf),jc=!0,Zr}const fa=(...e)=>{Uf().render(...e)},Vf=(...e)=>{zf().hydrate(...e)},jf=(...e)=>{const t=Uf().createApp(...e),{mount:n}=t;return t.mount=r=>{const f=Kf(r);if(!f)return;const u=t._component;!Ee(u)&&!u.render&&!u.template&&(u.template=f.innerHTML),f.innerHTML="";const h=n(f,!1,Gf(f));return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),h},t},P0=(...e)=>{const t=zf().createApp(...e),{mount:n}=t;return t.mount=r=>{const f=Kf(r);if(f)return n(f,!0,Gf(f))},t};function Gf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Kf(e){return Ke(e)?document.querySelector(e):e}let Gc=!1;const B0=()=>{Gc||(Gc=!0,M0(),a0())},W0=()=>{},H0=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Uh,BaseTransitionPropsValidators:sl,Comment:ut,DeprecationTypes:Qy,EffectScope:Va,ErrorCodes:$v,ErrorTypeStrings:Gy,Fragment:xe,KeepAlive:Kv,ReactiveEffect:gr,Static:Vn,Suspense:Dv,Teleport:Oy,Text:Xn,TrackOpTypes:yv,Transition:fl,TransitionGroup:k0,TriggerOpTypes:bv,VueElement:qo,assertNumber:wv,callWithAsyncErrorHandling:Ct,callWithErrorHandling:en,camelize:gt,capitalize:kr,cloneVNode:Ut,compatUtils:Jy,compile:W0,computed:ke,createApp:jf,createBlock:_e,createCommentVNode:de,createElementBlock:ie,createElementVNode:N,createHydrationRenderer:uf,createPropsRestProxy:hy,createRenderer:cf,createSSRApp:P0,createSlots:Xv,createStaticVNode:Xo,createTextVNode:et,createVNode:ae,customRef:No,defineAsyncComponent:jv,defineComponent:be,defineCustomElement:Of,defineEmits:ey,defineExpose:ty,defineModel:iy,defineOptions:ny,defineProps:Qv,defineSSRCustomElement:_0,defineSlots:ry,devtools:Ky,effect:Hm,effectScope:ch,getCurrentInstance:Mt,getCurrentScope:ja,getTransitionRawChildren:Vo,guardReactiveProps:yf,h:Tr,handleError:nr,hasInjectionContext:wy,hydrate:Vf,initCustomFormatter:zy,initDirectivesForSSR:B0,inject:Rt,isMemoSame:Af,isProxy:Za,isReactive:Un,isReadonly:Kn,isRef:at,isRuntimeOnly:Wy,isShallow:Bn,isVNode:Rn,markRaw:Fo,mergeDefaults:cy,mergeModels:uy,mergeProps:bf,nextTick:bi,normalizeClass:Er,normalizeProps:Nm,normalizeStyle:yi,onActivated:Vh,onBeforeMount:Kh,onBeforeUnmount:Rr,onBeforeUpdate:Yh,onDeactivated:jh,onErrorCaptured:Jh,onMounted:Ye,onRenderTracked:qh,onRenderTriggered:Zh,onScopeDispose:hh,onServerPrefetch:Xh,onUnmounted:Ko,onUpdated:Go,openBlock:Z,popScopeId:Uo,provide:Kr,proxyRefs:Qa,pushScopeId:Ho,queuePostFlushCb:ho,reactive:xr,readonly:Oo,ref:Fe,registerRuntimeCompiler:By,render:fa,renderList:$t,renderSlot:Zv,resolveComponent:oe,resolveDirective:Fv,resolveDynamicComponent:Iv,resolveFilter:qy,resolveTransitionHooks:mr,setBlockTracking:ia,setDevtoolsHook:Yy,setTransitionHooks:Yn,shallowReactive:Xa,shallowReadonly:lv,shallowRef:kh,ssrContextKey:Nh,ssrUtils:Zy,stop:Um,toDisplayString:ye,toHandlerKey:jr,toHandlers:qv,toRaw:Me,toRef:Do,toRefs:gv,toValue:fv,transformVNodeArgs:Iy,triggerRef:hv,unref:Qt,useAttrs:ay,useCssModule:C0,useCssVars:l0,useModel:ly,useSSRContext:Dh,useSlots:sy,useTransitionState:ol,vModelCheckbox:pl,vModelDynamic:Bf,vModelRadio:gl,vModelSelect:Df,vModelText:qn,vShow:Lf,version:kf,warn:jy,watch:qe,watchEffect:Ph,watchPostEffect:Bh,watchSyncEffect:Wh,withAsyncContext:fy,withCtx:Je,withDefaults:oy,withDirectives:zo,withKeys:D0,withMemo:Vy,withModifiers:F0,withScopeId:xv},Symbol.toStringTag,{value:"Module"}));function Kc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kc(Object(n),!0).forEach(function(r){vt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yo(e){"@babel/helpers - typeof";return yo=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},yo(e)}function vt(e,t,n){return t=j0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U0(e,t){if(e==null)return{};var n={},r=Object.keys(e),f,u;for(u=0;u<r.length;u++)f=r[u],!(t.indexOf(f)>=0)&&(n[f]=e[f]);return n}function z0(e,t){if(e==null)return{};var n=U0(e,t),r,f;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(f=0;f<u.length;f++)r=u[f],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V0(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j0(e){var t=V0(e,"string");return typeof t=="symbol"?t:String(t)}var G0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yf={exports:{}};(function(e){(function(t){var n=function(v,y,A){if(!p(y)||i(y)||a(y)||c(y)||s(y))return y;var S,C=0,b=0;if(o(y))for(S=[],b=y.length;C<b;C++)S.push(n(v,y[C],A));else{S={};for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(S[v(x,A)]=n(v,y[x],A))}return S},r=function(v,y){y=y||{};var A=y.separator||"_",S=y.split||/(?=[A-Z])/;return v.split(S).join(A)},f=function(v){return l(v)?v:(v=v.replace(/[\-_\s]+(.)?/g,function(y,A){return A?A.toUpperCase():""}),v.substr(0,1).toLowerCase()+v.substr(1))},u=function(v){var y=f(v);return y.substr(0,1).toUpperCase()+y.substr(1)},h=function(v,y){return r(v,y).toLowerCase()},g=Object.prototype.toString,s=function(v){return typeof v=="function"},p=function(v){return v===Object(v)},o=function(v){return g.call(v)=="[object Array]"},i=function(v){return g.call(v)=="[object Date]"},a=function(v){return g.call(v)=="[object RegExp]"},c=function(v){return g.call(v)=="[object Boolean]"},l=function(v){return v=v-0,v===v},d=function(v,y){var A=y&&"process"in y?y.process:y;return typeof A!="function"?v:function(S,C){return A(S,v,C)}},m={camelize:f,decamelize:h,pascalize:u,depascalize:h,camelizeKeys:function(v,y){return n(d(f,y),v)},decamelizeKeys:function(v,y){return n(d(h,y),v,y)},pascalizeKeys:function(v,y){return n(d(u,y),v)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=m:t.humps=m})(G0)})(Yf);var K0=Yf.exports,Y0=["class","style"];function X0(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),f=K0.camelize(n.slice(0,r)),u=n.slice(r+1).trim();return t[f]=u,t},{})}function Z0(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function Xf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(s){return Xf(s)}),f=Object.keys(e.attributes||{}).reduce(function(s,p){var o=e.attributes[p];switch(p){case"class":s.class=Z0(o);break;case"style":s.style=X0(o);break;default:s.attrs[p]=o}return s},{attrs:{},class:{},style:{}});n.class;var u=n.style,h=u===void 0?{}:u,g=z0(n,Y0);return Tr(e.tag,Xt(Xt(Xt({},t),{},{class:f.class,style:Xt(Xt({},f.style),h)},f.attrs),g),r)}var Zf=!1;try{Zf=!0}catch{}function q0(){if(!Zf&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function As(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?vt({},e,t):{}}function J0(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},vt(t,"fa-".concat(e.size),e.size!==null),vt(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),vt(t,"fa-pull-".concat(e.pull),e.pull!==null),vt(t,"fa-swap-opacity",e.swapOpacity),vt(t,"fa-bounce",e.bounce),vt(t,"fa-shake",e.shake),vt(t,"fa-beat",e.beat),vt(t,"fa-fade",e.fade),vt(t,"fa-beat-fade",e.beatFade),vt(t,"fa-flash",e.flash),vt(t,"fa-spin-pulse",e.spinPulse),vt(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function Yc(e){if(e&&yo(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Ks.icon)return Ks.icon(e);if(e===null)return null;if(yo(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var Q0=be({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,f=ke(function(){return Yc(t.icon)}),u=ke(function(){return As("classes",J0(t))}),h=ke(function(){return As("transform",typeof t.transform=="string"?Ks.transform(t.transform):t.transform)}),g=ke(function(){return As("mask",Yc(t.mask))}),s=ke(function(){return im(f.value,Xt(Xt(Xt(Xt({},u.value),h.value),g.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});qe(s,function(o){if(!o)return q0("Could not find one or more icon(s)",f.value,g.value)},{immediate:!0});var p=ke(function(){return s.value?Xf(s.value.abstract[0],{},r):null});return function(){return p.value}}});const eb=be({name:"NavbarItem"}),Se=(e,t)=>{const n=e.__vccOpts||e;for(const[r,f]of t)n[r]=f;return n},Jo=e=>(Ho("data-v-907b90b2"),e=e(),Uo(),e),tb={role:"navigation","aria-label":"main navigation",class:"navbar is-fixed-top"},nb=Jo(()=>N("div",{class:"navbar-brand"},[N("a",{class:"navbar-item"},[N("h1",{class:"title"},"Mihari")])],-1)),rb={class:"navbar-menu"},ib=Jo(()=>N("div",{class:"navbar-start"},null,-1)),ob={class:"navbar-end"},sb=Jo(()=>N("a",{class:"navbar-item"},[N("a",{href:"/redoc-static.html",target:"_blank",class:"navbar-item"},"API")],-1)),ab=Jo(()=>N("a",{class:"navbar-item"},[N("a",{href:"https://github.com/ninoseki/mihari",target:"_blank",class:"navbar-item"},"GitHub")],-1));function lb(e,t,n,r,f,u){const h=oe("router-link");return Z(),ie("nav",tb,[nb,N("div",rb,[ib,N("div",ob,[ae(h,{class:"navbar-item",to:{name:"Alerts"}},{default:Je(()=>[et("Alerts")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Artifacts"}},{default:Je(()=>[et("Artifacts")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Rules"}},{default:Je(()=>[et("Rules")]),_:1}),ae(h,{class:"navbar-item",to:{name:"NewRule"}},{default:Je(()=>[et("New Rule")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Config"}},{default:Je(()=>[et("Config")]),_:1}),sb,ab])])])}const cb=Se(eb,[["render",lb],["__scopeId","data-v-907b90b2"]]),ub=be({name:"App",components:{Navbar:cb}}),hb={class:"section is-medium"},fb={class:"container"};function db(e,t,n,r,f,u){const h=oe("Navbar"),g=oe("router-view");return Z(),ie(xe,null,[ae(h),N("section",hb,[N("div",fb,[ae(g)])])],64)}const pb=Se(ub,[["render",db]]);/*!
|
760
|
+
}`;function Uu(){var e=Fu,t=Nu,n=we.cssPrefix,r=we.replacementClass,f=Qp;if(n!==e||r!==t){var u=new RegExp("\\.".concat(e,"\\-"),"g"),h=new RegExp("\\--".concat(e,"\\-"),"g"),g=new RegExp("\\.".concat(t),"g");f=f.replace(u,".".concat(n,"-")).replace(h,"--".concat(n,"-")).replace(g,".".concat(r))}return f}var Ul=!1;function hs(){we.autoAddCss&&!Ul&&(Yp(Uu()),Ul=!0)}var eg={mixout:function(){return{dom:{css:Uu,insertCss:hs}}},hooks:function(){return{beforeDOMElementCreation:function(){hs()},beforeI2svg:function(){hs()}}}},nn=Sn||{};nn[tn]||(nn[tn]={});nn[tn].styles||(nn[tn].styles={});nn[tn].hooks||(nn[tn].hooks={});nn[tn].shims||(nn[tn].shims=[]);var It=nn[tn],zu=[],tg=function e(){je.removeEventListener("DOMContentLoaded",e),oo=1,zu.map(function(t){return t()})},oo=!1;on&&(oo=(je.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(je.readyState),oo||je.addEventListener("DOMContentLoaded",tg));function ng(e){on&&(oo?setTimeout(e,0):zu.push(e))}function mi(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,f=e.children,u=f===void 0?[]:f;return typeof e=="string"?Hu(e):"<".concat(t," ").concat(Zp(r),">").concat(u.map(mi).join(""),"</").concat(t,">")}function zl(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var rg=function(t,n){return function(r,f,u,h){return t.call(n,r,f,u,h)}},fs=function(t,n,r,f){var u=Object.keys(t),h=u.length,g=f!==void 0?rg(n,f):n,s,p,o;for(r===void 0?(s=1,o=t[u[0]]):(s=0,o=r);s<h;s++)p=u[s],o=g(o,t[p],p,t);return o};function ig(e){for(var t=[],n=0,r=e.length;n<r;){var f=e.charCodeAt(n++);if(f>=55296&&f<=56319&&n<r){var u=e.charCodeAt(n++);(u&64512)==56320?t.push(((f&1023)<<10)+(u&1023)+65536):(t.push(f),n--)}else t.push(f)}return t}function Bs(e){var t=ig(e);return t.length===1?t[0].toString(16):null}function og(e,t){var n=e.length,r=e.charCodeAt(t),f;return r>=55296&&r<=56319&&n>t+1&&(f=e.charCodeAt(t+1),f>=56320&&f<=57343)?(r-55296)*1024+f-56320+65536:r}function Vl(e){return Object.keys(e).reduce(function(t,n){var r=e[n],f=!!r.icon;return f?t[r.iconName]=r.icon:t[n]=r,t},{})}function Ws(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,f=r===void 0?!1:r,u=Vl(t);typeof It.hooks.addPack=="function"&&!f?It.hooks.addPack(e,Vl(t)):It.styles[e]=ge(ge({},It.styles[e]||{}),u),e==="fas"&&Ws("fa",t)}var Fi,Ni,Di,ir=It.styles,sg=It.shims,ag=(Fi={},tt(Fi,Ve,Object.values(ei[Ve])),tt(Fi,Ze,Object.values(ei[Ze])),Fi),Fa=null,Vu={},ju={},Gu={},Ku={},Yu={},lg=(Ni={},tt(Ni,Ve,Object.keys(Jr[Ve])),tt(Ni,Ze,Object.keys(Jr[Ze])),Ni);function cg(e){return~zp.indexOf(e)}function ug(e,t){var n=t.split("-"),r=n[0],f=n.slice(1).join("-");return r===e&&f!==""&&!cg(f)?f:null}var Xu=function(){var t=function(u){return fs(ir,function(h,g,s){return h[s]=fs(g,u,{}),h},{})};Vu=t(function(f,u,h){if(u[3]&&(f[u[3]]=h),u[2]){var g=u[2].filter(function(s){return typeof s=="number"});g.forEach(function(s){f[s.toString(16)]=h})}return f}),ju=t(function(f,u,h){if(f[h]=h,u[2]){var g=u[2].filter(function(s){return typeof s=="string"});g.forEach(function(s){f[s]=h})}return f}),Yu=t(function(f,u,h){var g=u[2];return f[h]=h,g.forEach(function(s){f[s]=h}),f});var n="far"in ir||we.autoFetchSvg,r=fs(sg,function(f,u){var h=u[0],g=u[1],s=u[2];return g==="far"&&!n&&(g="fas"),typeof h=="string"&&(f.names[h]={prefix:g,iconName:s}),typeof h=="number"&&(f.unicodes[h.toString(16)]={prefix:g,iconName:s}),f},{names:{},unicodes:{}});Gu=r.names,Ku=r.unicodes,Fa=Ao(we.styleDefault,{family:we.familyDefault})};Kp(function(e){Fa=Ao(e.styleDefault,{family:we.familyDefault})});Xu();function Na(e,t){return(Vu[e]||{})[t]}function hg(e,t){return(ju[e]||{})[t]}function Dn(e,t){return(Yu[e]||{})[t]}function Zu(e){return Gu[e]||{prefix:null,iconName:null}}function fg(e){var t=Ku[e],n=Na("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Cn(){return Fa}var Da=function(){return{prefix:null,iconName:null,rest:[]}};function Ao(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?Ve:n,f=Jr[r][e],u=Qr[r][e]||Qr[r][f],h=e in It.styles?e:null;return u||h||null}var jl=(Di={},tt(Di,Ve,Object.keys(ei[Ve])),tt(Di,Ze,Object.keys(ei[Ze])),Di);function ko(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,f=r===void 0?!1:r,u=(t={},tt(t,Ve,"".concat(we.cssPrefix,"-").concat(Ve)),tt(t,Ze,"".concat(we.cssPrefix,"-").concat(Ze)),t),h=null,g=Ve;(e.includes(u[Ve])||e.some(function(p){return jl[Ve].includes(p)}))&&(g=Ve),(e.includes(u[Ze])||e.some(function(p){return jl[Ze].includes(p)}))&&(g=Ze);var s=e.reduce(function(p,o){var i=ug(we.cssPrefix,o);if(ir[o]?(o=ag[g].includes(o)?Dp[g][o]:o,h=o,p.prefix=o):lg[g].indexOf(o)>-1?(h=o,p.prefix=Ao(o,{family:g})):i?p.iconName=i:o!==we.replacementClass&&o!==u[Ve]&&o!==u[Ze]&&p.rest.push(o),!f&&p.prefix&&p.iconName){var a=h==="fa"?Zu(p.iconName):{},c=Dn(p.prefix,p.iconName);a.prefix&&(h=null),p.iconName=a.iconName||c||p.iconName,p.prefix=a.prefix||p.prefix,p.prefix==="far"&&!ir.far&&ir.fas&&!we.autoFetchSvg&&(p.prefix="fas")}return p},Da());return(e.includes("fa-brands")||e.includes("fab"))&&(s.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(s.prefix="fad"),!s.prefix&&g===Ze&&(ir.fass||we.autoFetchSvg)&&(s.prefix="fass",s.iconName=Dn(s.prefix,s.iconName)||s.iconName),(s.prefix==="fa"||h==="fa")&&(s.prefix=Cn()||"fas"),s}var dg=function(){function e(){Ap(this,e),this.definitions={}}return kp(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,f=new Array(r),u=0;u<r;u++)f[u]=arguments[u];var h=f.reduce(this._pullDefinitions,{});Object.keys(h).forEach(function(g){n.definitions[g]=ge(ge({},n.definitions[g]||{}),h[g]),Ws(g,h[g]);var s=ei[Ve][g];s&&Ws(s,h[g]),Xu()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var f=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(f).map(function(u){var h=f[u],g=h.prefix,s=h.iconName,p=h.icon,o=p[2];n[g]||(n[g]={}),o.length>0&&o.forEach(function(i){typeof i=="string"&&(n[g][i]=p)}),n[g][s]=p}),n}}]),e}(),Gl=[],or={},ar={},pg=Object.keys(ar);function gg(e,t){var n=t.mixoutsTo;return Gl=e,or={},Object.keys(ar).forEach(function(r){pg.indexOf(r)===-1&&delete ar[r]}),Gl.forEach(function(r){var f=r.mixout?r.mixout():{};if(Object.keys(f).forEach(function(h){typeof f[h]=="function"&&(n[h]=f[h]),io(f[h])==="object"&&Object.keys(f[h]).forEach(function(g){n[h]||(n[h]={}),n[h][g]=f[h][g]})}),r.hooks){var u=r.hooks();Object.keys(u).forEach(function(h){or[h]||(or[h]=[]),or[h].push(u[h])})}r.provides&&r.provides(ar)}),n}function Hs(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),f=2;f<n;f++)r[f-2]=arguments[f];var u=or[e]||[];return u.forEach(function(h){t=h.apply(null,[t].concat(r))}),t}function jn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var f=or[e]||[];f.forEach(function(u){u.apply(null,n)})}function rn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return ar[e]?ar[e].apply(null,t):void 0}function Us(e){e.prefix==="fa"&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Cn();if(t)return t=Dn(n,t)||t,zl(qu.definitions,n,t)||zl(It.styles,n,t)}var qu=new dg,mg=function(){we.autoReplaceSvg=!1,we.observeMutations=!1,jn("noAuto")},vg={i2svg:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return on?(jn("beforeI2svg",t),rn("pseudoElements2svg",t),rn("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;we.autoReplaceSvg===!1&&(we.autoReplaceSvg=!0),we.observeMutations=!0,ng(function(){bg({autoReplaceSvgRoot:n}),jn("watch",t)})}},yg={icon:function(t){if(t===null)return null;if(io(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Dn(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=Ao(t[0]);return{prefix:r,iconName:Dn(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(we.cssPrefix,"-"))>-1||t.match(Pp))){var f=ko(t.split(" "),{skipLookups:!0});return{prefix:f.prefix||Cn(),iconName:Dn(f.prefix,f.iconName)||f.iconName}}if(typeof t=="string"){var u=Cn();return{prefix:u,iconName:Dn(u,t)||t}}}},kt={noAuto:mg,config:we,dom:vg,parse:yg,library:qu,findIconDefinition:Us,toHtml:mi},bg=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?je:n;(Object.keys(It.styles).length>0||we.autoFetchSvg)&&on&&we.autoReplaceSvg&&kt.dom.i2svg({node:r})};function Eo(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return mi(r)})}}),Object.defineProperty(e,"node",{get:function(){if(on){var r=je.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function wg(e){var t=e.children,n=e.main,r=e.mask,f=e.attributes,u=e.styles,h=e.transform;if(Ia(h)&&n.found&&!r.found){var g=n.width,s=n.height,p={x:g/s/2,y:.5};f.style=Co(ge(ge({},u),{},{"transform-origin":"".concat(p.x+h.x/16,"em ").concat(p.y+h.y/16,"em")}))}return[{tag:"svg",attributes:f,children:t}]}function $g(e){var t=e.prefix,n=e.iconName,r=e.children,f=e.attributes,u=e.symbol,h=u===!0?"".concat(t,"-").concat(we.cssPrefix,"-").concat(n):u;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ge(ge({},f),{},{id:h}),children:r}]}]}function Pa(e){var t=e.icons,n=t.main,r=t.mask,f=e.prefix,u=e.iconName,h=e.transform,g=e.symbol,s=e.title,p=e.maskId,o=e.titleId,i=e.extra,a=e.watchable,c=a===void 0?!1:a,l=r.found?r:n,d=l.width,m=l.height,v=f==="fak",y=[we.replacementClass,u?"".concat(we.cssPrefix,"-").concat(u):""].filter(function(E){return i.classes.indexOf(E)===-1}).filter(function(E){return E!==""||!!E}).concat(i.classes).join(" "),A={children:[],attributes:ge(ge({},i.attributes),{},{"data-prefix":f,"data-icon":u,class:y,role:i.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(d," ").concat(m)})},S=v&&!~i.classes.indexOf("fa-fw")?{width:"".concat(d/m*16*.0625,"em")}:{};c&&(A.attributes[Vn]=""),s&&(A.children.push({tag:"title",attributes:{id:A.attributes["aria-labelledby"]||"title-".concat(o||ni())},children:[s]}),delete A.attributes.title);var C=ge(ge({},A),{},{prefix:f,iconName:u,main:n,mask:r,maskId:p,transform:h,symbol:g,styles:ge(ge({},S),i.styles)}),b=r.found&&n.found?rn("generateAbstractMask",C)||{children:[],attributes:{}}:rn("generateAbstractIcon",C)||{children:[],attributes:{}},R=b.children,L=b.attributes;return C.children=R,C.attributes=L,g?$g(C):wg(C)}function Kl(e){var t=e.content,n=e.width,r=e.height,f=e.transform,u=e.title,h=e.extra,g=e.watchable,s=g===void 0?!1:g,p=ge(ge(ge({},h.attributes),u?{title:u}:{}),{},{class:h.classes.join(" ")});s&&(p[Vn]="");var o=ge({},h.styles);Ia(f)&&(o.transform=Jp({transform:f,startCentered:!0,width:n,height:r}),o["-webkit-transform"]=o.transform);var i=Co(o);i.length>0&&(p.style=i);var a=[];return a.push({tag:"span",attributes:p,children:[t]}),u&&a.push({tag:"span",attributes:{class:"sr-only"},children:[u]}),a}function _g(e){var t=e.content,n=e.title,r=e.extra,f=ge(ge(ge({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),u=Co(r.styles);u.length>0&&(f.style=u);var h=[];return h.push({tag:"span",attributes:f,children:[t]}),n&&h.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),h}var ds=It.styles;function zs(e){var t=e[0],n=e[1],r=e.slice(4),f=Ra(r,1),u=f[0],h=null;return Array.isArray(u)?h={tag:"g",attributes:{class:"".concat(we.cssPrefix,"-").concat(Nn.GROUP)},children:[{tag:"path",attributes:{class:"".concat(we.cssPrefix,"-").concat(Nn.SECONDARY),fill:"currentColor",d:u[0]}},{tag:"path",attributes:{class:"".concat(we.cssPrefix,"-").concat(Nn.PRIMARY),fill:"currentColor",d:u[1]}}]}:h={tag:"path",attributes:{fill:"currentColor",d:u}},{found:!0,width:t,height:n,icon:h}}var Sg={found:!1,width:512,height:512};function Cg(e,t){!Du&&!we.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Vs(e,t){var n=t;return t==="fa"&&we.styleDefault!==null&&(t=Cn()),new Promise(function(r,f){if(rn("missingIconAbstract"),n==="fa"){var u=Zu(e)||{};e=u.iconName||e,t=u.prefix||t}if(e&&t&&ds[t]&&ds[t][e]){var h=ds[t][e];return r(zs(h))}Cg(e,t),r(ge(ge({},Sg),{},{icon:we.showMissingIcons&&e?rn("missingIconAbstract")||{}:{}}))})}var Yl=function(){},js=we.measurePerformance&&xi&&xi.mark&&xi.measure?xi:{mark:Yl,measure:Yl},Pr='FA "6.5.1"',Ag=function(t){return js.mark("".concat(Pr," ").concat(t," begins")),function(){return Ju(t)}},Ju=function(t){js.mark("".concat(Pr," ").concat(t," ends")),js.measure("".concat(Pr," ").concat(t),"".concat(Pr," ").concat(t," begins"),"".concat(Pr," ").concat(t," ends"))},Ba={begin:Ag,end:Ju},Zi=function(){};function Xl(e){var t=e.getAttribute?e.getAttribute(Vn):null;return typeof t=="string"}function kg(e){var t=e.getAttribute?e.getAttribute(Ta):null,n=e.getAttribute?e.getAttribute(La):null;return t&&n}function Eg(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(we.replacementClass)}function Rg(){if(we.autoReplaceSvg===!0)return qi.replace;var e=qi[we.autoReplaceSvg];return e||qi.replace}function xg(e){return je.createElementNS("http://www.w3.org/2000/svg",e)}function Tg(e){return je.createElement(e)}function Qu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?xg:Tg:n;if(typeof e=="string")return je.createTextNode(e);var f=r(e.tag);Object.keys(e.attributes||[]).forEach(function(h){f.setAttribute(h,e.attributes[h])});var u=e.children||[];return u.forEach(function(h){f.appendChild(Qu(h,{ceFn:r}))}),f}function Lg(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var qi={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(f){n.parentNode.insertBefore(Qu(f),n)}),n.getAttribute(Vn)===null&&we.keepOriginalSource){var r=je.createComment(Lg(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~Oa(n).indexOf(we.replacementClass))return qi.replace(t);var f=new RegExp("".concat(we.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var u=r[0].attributes.class.split(" ").reduce(function(g,s){return s===we.replacementClass||s.match(f)?g.toSvg.push(s):g.toNode.push(s),g},{toNode:[],toSvg:[]});r[0].attributes.class=u.toSvg.join(" "),u.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",u.toNode.join(" "))}var h=r.map(function(g){return mi(g)}).join(`
|
761
|
+
`);n.setAttribute(Vn,""),n.innerHTML=h}};function Zl(e){e()}function eh(e,t){var n=typeof t=="function"?t:Zi;if(e.length===0)n();else{var r=Zl;we.mutateApproach===Fp&&(r=Sn.requestAnimationFrame||Zl),r(function(){var f=Rg(),u=Ba.begin("mutate");e.map(f),u(),n()})}}var Wa=!1;function th(){Wa=!0}function Gs(){Wa=!1}var so=null;function ql(e){if(Wl&&we.observeMutations){var t=e.treeCallback,n=t===void 0?Zi:t,r=e.nodeCallback,f=r===void 0?Zi:r,u=e.pseudoElementsCallback,h=u===void 0?Zi:u,g=e.observeMutationsRoot,s=g===void 0?je:g;so=new Wl(function(p){if(!Wa){var o=Cn();Sr(p).forEach(function(i){if(i.type==="childList"&&i.addedNodes.length>0&&!Xl(i.addedNodes[0])&&(we.searchPseudoElements&&h(i.target),n(i.target)),i.type==="attributes"&&i.target.parentNode&&we.searchPseudoElements&&h(i.target.parentNode),i.type==="attributes"&&Xl(i.target)&&~Up.indexOf(i.attributeName))if(i.attributeName==="class"&&kg(i.target)){var a=ko(Oa(i.target)),c=a.prefix,l=a.iconName;i.target.setAttribute(Ta,c||o),l&&i.target.setAttribute(La,l)}else Eg(i.target)&&f(i.target)})}}),on&&so.observe(s,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Mg(){so&&so.disconnect()}function Og(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,f){var u=f.split(":"),h=u[0],g=u.slice(1);return h&&g.length>0&&(r[h]=g.join(":").trim()),r},{})),n}function Ig(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",f=ko(Oa(e));return f.prefix||(f.prefix=Cn()),t&&n&&(f.prefix=t,f.iconName=n),f.iconName&&f.prefix||(f.prefix&&r.length>0&&(f.iconName=hg(f.prefix,e.innerText)||Na(f.prefix,Bs(e.innerText))),!f.iconName&&we.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(f.iconName=e.firstChild.data)),f}function Fg(e){var t=Sr(e.attributes).reduce(function(f,u){return f.name!=="class"&&f.name!=="style"&&(f[u.name]=u.value),f},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return we.autoA11y&&(n?t["aria-labelledby"]="".concat(we.replacementClass,"-title-").concat(r||ni()):(t["aria-hidden"]="true",t.focusable="false")),t}function Ng(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Bt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Jl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=Ig(e),r=n.iconName,f=n.prefix,u=n.rest,h=Fg(e),g=Hs("parseNodeAttributes",{},e),s=t.styleParser?Og(e):[];return ge({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:f,transform:Bt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:u,styles:s,attributes:h}},g)}var Dg=It.styles;function nh(e){var t=we.autoReplaceSvg==="nest"?Jl(e,{styleParser:!1}):Jl(e);return~t.extra.classes.indexOf(Pu)?rn("generateLayersText",e,t):rn("generateSvgReplacementMutation",e,t)}var An=new Set;Ma.map(function(e){An.add("fa-".concat(e))});Object.keys(Jr[Ve]).map(An.add.bind(An));Object.keys(Jr[Ze]).map(An.add.bind(An));An=pi(An);function Ql(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!on)return Promise.resolve();var n=je.documentElement.classList,r=function(i){return n.add("".concat(Hl,"-").concat(i))},f=function(i){return n.remove("".concat(Hl,"-").concat(i))},u=we.autoFetchSvg?An:Ma.map(function(o){return"fa-".concat(o)}).concat(Object.keys(Dg));u.includes("fa")||u.push("fa");var h=[".".concat(Pu,":not([").concat(Vn,"])")].concat(u.map(function(o){return".".concat(o,":not([").concat(Vn,"])")})).join(", ");if(h.length===0)return Promise.resolve();var g=[];try{g=Sr(e.querySelectorAll(h))}catch{}if(g.length>0)r("pending"),f("complete");else return Promise.resolve();var s=Ba.begin("onTree"),p=g.reduce(function(o,i){try{var a=nh(i);a&&o.push(a)}catch(c){Du||c.name==="MissingIcon"&&console.error(c)}return o},[]);return new Promise(function(o,i){Promise.all(p).then(function(a){eh(a,function(){r("active"),r("complete"),f("pending"),typeof t=="function"&&t(),s(),o()})}).catch(function(a){s(),i(a)})})}function Pg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;nh(e).then(function(n){n&&eh([n],t)})}function Bg(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:Us(t||{}),f=n.mask;return f&&(f=(f||{}).icon?f:Us(f||{})),e(r,ge(ge({},n),{},{mask:f}))}}var Wg=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,f=r===void 0?Bt:r,u=n.symbol,h=u===void 0?!1:u,g=n.mask,s=g===void 0?null:g,p=n.maskId,o=p===void 0?null:p,i=n.title,a=i===void 0?null:i,c=n.titleId,l=c===void 0?null:c,d=n.classes,m=d===void 0?[]:d,v=n.attributes,y=v===void 0?{}:v,A=n.styles,S=A===void 0?{}:A;if(t){var C=t.prefix,b=t.iconName,R=t.icon;return Eo(ge({type:"icon"},t),function(){return jn("beforeDOMElementCreation",{iconDefinition:t,params:n}),we.autoA11y&&(a?y["aria-labelledby"]="".concat(we.replacementClass,"-title-").concat(l||ni()):(y["aria-hidden"]="true",y.focusable="false")),Pa({icons:{main:zs(R),mask:s?zs(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:C,iconName:b,transform:ge(ge({},Bt),f),symbol:h,title:a,maskId:o,titleId:l,extra:{attributes:y,styles:S,classes:m}})})}},Hg={mixout:function(){return{icon:Bg(Wg)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=Ql,n.nodeCallback=Pg,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,f=r===void 0?je:r,u=n.callback,h=u===void 0?function(){}:u;return Ql(f,h)},t.generateSvgReplacementMutation=function(n,r){var f=r.iconName,u=r.title,h=r.titleId,g=r.prefix,s=r.transform,p=r.symbol,o=r.mask,i=r.maskId,a=r.extra;return new Promise(function(c,l){Promise.all([Vs(f,g),o.iconName?Vs(o.iconName,o.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(d){var m=Ra(d,2),v=m[0],y=m[1];c([n,Pa({icons:{main:v,mask:y},prefix:g,iconName:f,transform:s,symbol:p,maskId:i,title:u,titleId:h,extra:a,watchable:!0})])}).catch(l)})},t.generateAbstractIcon=function(n){var r=n.children,f=n.attributes,u=n.main,h=n.transform,g=n.styles,s=Co(g);s.length>0&&(f.style=s);var p;return Ia(h)&&(p=rn("generateAbstractTransformGrouping",{main:u,transform:h,containerWidth:u.width,iconWidth:u.width})),r.push(p||u.icon),{children:r,attributes:f}}}},Ug={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=r.classes,u=f===void 0?[]:f;return Eo({type:"layer"},function(){jn("beforeDOMElementCreation",{assembler:n,params:r});var h=[];return n(function(g){Array.isArray(g)?g.map(function(s){h=h.concat(s.abstract)}):h=h.concat(g.abstract)}),[{tag:"span",attributes:{class:["".concat(we.cssPrefix,"-layers")].concat(pi(u)).join(" ")},children:h}]})}}}},zg={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=r.title,u=f===void 0?null:f,h=r.classes,g=h===void 0?[]:h,s=r.attributes,p=s===void 0?{}:s,o=r.styles,i=o===void 0?{}:o;return Eo({type:"counter",content:n},function(){return jn("beforeDOMElementCreation",{content:n,params:r}),_g({content:n.toString(),title:u,extra:{attributes:p,styles:i,classes:["".concat(we.cssPrefix,"-layers-counter")].concat(pi(g))}})})}}}},Vg={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f=r.transform,u=f===void 0?Bt:f,h=r.title,g=h===void 0?null:h,s=r.classes,p=s===void 0?[]:s,o=r.attributes,i=o===void 0?{}:o,a=r.styles,c=a===void 0?{}:a;return Eo({type:"text",content:n},function(){return jn("beforeDOMElementCreation",{content:n,params:r}),Kl({content:n,transform:ge(ge({},Bt),u),title:g,extra:{attributes:i,styles:c,classes:["".concat(we.cssPrefix,"-layers-text")].concat(pi(p))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var f=r.title,u=r.transform,h=r.extra,g=null,s=null;if(Iu){var p=parseInt(getComputedStyle(n).fontSize,10),o=n.getBoundingClientRect();g=o.width/p,s=o.height/p}return we.autoA11y&&!f&&(h.attributes["aria-hidden"]="true"),Promise.resolve([n,Kl({content:n.innerHTML,width:g,height:s,transform:u,title:f,extra:h,watchable:!0})])}}},jg=new RegExp('"',"ug"),ec=[1105920,1112319];function Gg(e){var t=e.replace(jg,""),n=og(t,0),r=n>=ec[0]&&n<=ec[1],f=t.length===2?t[0]===t[1]:!1;return{value:Bs(f?t[0]:t),isSecondary:r||f}}function tc(e,t){var n="".concat(Ip).concat(t.replace(":","-"));return new Promise(function(r,f){if(e.getAttribute(n)!==null)return r();var u=Sr(e.children),h=u.filter(function(R){return R.getAttribute(Ps)===t})[0],g=Sn.getComputedStyle(e,t),s=g.getPropertyValue("font-family").match(Bp),p=g.getPropertyValue("font-weight"),o=g.getPropertyValue("content");if(h&&!s)return e.removeChild(h),r();if(s&&o!=="none"&&o!==""){var i=g.getPropertyValue("content"),a=~["Sharp"].indexOf(s[2])?Ze:Ve,c=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(s[2])?Qr[a][s[2].toLowerCase()]:Wp[a][p],l=Gg(i),d=l.value,m=l.isSecondary,v=s[0].startsWith("FontAwesome"),y=Na(c,d),A=y;if(v){var S=fg(d);S.iconName&&S.prefix&&(y=S.iconName,c=S.prefix)}if(y&&!m&&(!h||h.getAttribute(Ta)!==c||h.getAttribute(La)!==A)){e.setAttribute(n,A),h&&e.removeChild(h);var C=Ng(),b=C.extra;b.attributes[Ps]=t,Vs(y,c).then(function(R){var L=Pa(ge(ge({},C),{},{icons:{main:R,mask:Da()},prefix:c,iconName:A,extra:b,watchable:!0})),E=je.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(E,e.firstChild):e.appendChild(E),E.outerHTML=L.map(function(M){return mi(M)}).join(`
|
762
|
+
`),e.removeAttribute(n),r()}).catch(f)}else r()}else r()})}function Kg(e){return Promise.all([tc(e,"::before"),tc(e,"::after")])}function Yg(e){return e.parentNode!==document.head&&!~Np.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(Ps)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function nc(e){if(on)return new Promise(function(t,n){var r=Sr(e.querySelectorAll("*")).filter(Yg).map(Kg),f=Ba.begin("searchPseudoElements");th(),Promise.all(r).then(function(){f(),Gs(),t()}).catch(function(){f(),Gs(),n()})})}var Xg={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=nc,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,f=r===void 0?je:r;we.searchPseudoElements&&nc(f)}}},rc=!1,Zg={mixout:function(){return{dom:{unwatch:function(){th(),rc=!0}}}},hooks:function(){return{bootstrap:function(){ql(Hs("mutationObserverCallbacks",{}))},noAuto:function(){Mg()},watch:function(n){var r=n.observeMutationsRoot;rc?Gs():ql(Hs("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},ic=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,f){var u=f.toLowerCase().split("-"),h=u[0],g=u.slice(1).join("-");if(h&&g==="h")return r.flipX=!0,r;if(h&&g==="v")return r.flipY=!0,r;if(g=parseFloat(g),isNaN(g))return r;switch(h){case"grow":r.size=r.size+g;break;case"shrink":r.size=r.size-g;break;case"left":r.x=r.x-g;break;case"right":r.x=r.x+g;break;case"up":r.y=r.y-g;break;case"down":r.y=r.y+g;break;case"rotate":r.rotate=r.rotate+g;break}return r},n)},qg={mixout:function(){return{parse:{transform:function(n){return ic(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-transform");return f&&(n.transform=ic(f)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,f=n.transform,u=n.containerWidth,h=n.iconWidth,g={transform:"translate(".concat(u/2," 256)")},s="translate(".concat(f.x*32,", ").concat(f.y*32,") "),p="scale(".concat(f.size/16*(f.flipX?-1:1),", ").concat(f.size/16*(f.flipY?-1:1),") "),o="rotate(".concat(f.rotate," 0 0)"),i={transform:"".concat(s," ").concat(p," ").concat(o)},a={transform:"translate(".concat(h/2*-1," -256)")},c={outer:g,inner:i,path:a};return{tag:"g",attributes:ge({},c.outer),children:[{tag:"g",attributes:ge({},c.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ge(ge({},r.icon.attributes),c.path)}]}]}}}},ps={x:0,y:0,width:"100%",height:"100%"};function oc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Jg(e){return e.tag==="g"?e.children:[e]}var Qg={hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-mask"),u=f?ko(f.split(" ").map(function(h){return h.trim()})):Da();return u.prefix||(u.prefix=Cn()),n.mask=u,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,f=n.attributes,u=n.main,h=n.mask,g=n.maskId,s=n.transform,p=u.width,o=u.icon,i=h.width,a=h.icon,c=qp({transform:s,containerWidth:i,iconWidth:p}),l={tag:"rect",attributes:ge(ge({},ps),{},{fill:"white"})},d=o.children?{children:o.children.map(oc)}:{},m={tag:"g",attributes:ge({},c.inner),children:[oc(ge({tag:o.tag,attributes:ge(ge({},o.attributes),c.path)},d))]},v={tag:"g",attributes:ge({},c.outer),children:[m]},y="mask-".concat(g||ni()),A="clip-".concat(g||ni()),S={tag:"mask",attributes:ge(ge({},ps),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[l,v]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:A},children:Jg(a)},S]};return r.push(C,{tag:"rect",attributes:ge({fill:"currentColor","clip-path":"url(#".concat(A,")"),mask:"url(#".concat(y,")")},ps)}),{children:r,attributes:f}}}},em={provides:function(t){var n=!1;Sn.matchMedia&&(n=Sn.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],f={fill:"currentColor"},u={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:ge(ge({},f),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var h=ge(ge({},u),{},{attributeName:"opacity"}),g={tag:"circle",attributes:ge(ge({},f),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||g.children.push({tag:"animate",attributes:ge(ge({},u),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ge(ge({},h),{},{values:"1;0;1;1;0;1;"})}),r.push(g),r.push({tag:"path",attributes:ge(ge({},f),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:ge(ge({},h),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:ge(ge({},f),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:ge(ge({},h),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},tm={hooks:function(){return{parseNodeAttributes:function(n,r){var f=r.getAttribute("data-fa-symbol"),u=f===null?!1:f===""?!0:f;return n.symbol=u,n}}}},nm=[eg,Hg,Ug,zg,Vg,Xg,Zg,qg,Qg,em,tm];gg(nm,{mixoutsTo:kt});kt.noAuto;kt.config;var rm=kt.library;kt.dom;var Ks=kt.parse;kt.findIconDefinition;kt.toHtml;var im=kt.icon;kt.layer;kt.text;kt.counter;var om={prefix:"fas",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M272 384c9.6-31.9 29.5-59.1 49.2-86.2l0 0c5.2-7.1 10.4-14.2 15.4-21.4c19.8-28.5 31.4-63 31.4-100.3C368 78.8 289.2 0 192 0S16 78.8 16 176c0 37.3 11.6 71.9 31.4 100.3c5 7.2 10.2 14.3 15.4 21.4l0 0c19.8 27.1 39.7 54.4 49.2 86.2H272zM192 512c44.2 0 80-35.8 80-80V416H112v16c0 44.2 35.8 80 80 80zM112 176c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-61.9 50.1-112 112-112c8.8 0 16 7.2 16 16s-7.2 16-16 16c-44.2 0-80 35.8-80 80z"]},sm={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160V416c0 53 43 96 96 96H352c53 0 96-43 96-96V320c0-17.7-14.3-32-32-32s-32 14.3-32 32v96c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V160c0-17.7 14.3-32 32-32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H96z"]},am=sm,lm={prefix:"fas",iconName:"question",icon:[320,512,[10067,10068,61736],"3f","M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},cm={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},um={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},hm=um,fm={prefix:"fas",iconName:"ticket",icon:[576,512,[127903],"f145","M64 64C28.7 64 0 92.7 0 128v64c0 8.8 7.4 15.7 15.7 18.6C34.5 217.1 48 235 48 256s-13.5 38.9-32.3 45.4C7.4 304.3 0 311.2 0 320v64c0 35.3 28.7 64 64 64H512c35.3 0 64-28.7 64-64V320c0-8.8-7.4-15.7-15.7-18.6C541.5 294.9 528 277 528 256s13.5-38.9 32.3-45.4c8.3-2.9 15.7-9.8 15.7-18.6V128c0-35.3-28.7-64-64-64H64zm64 112l0 160c0 8.8 7.2 16 16 16H432c8.8 0 16-7.2 16-16V176c0-8.8-7.2-16-16-16H144c-8.8 0-16 7.2-16 16zM96 160c0-17.7 14.3-32 32-32H448c17.7 0 32 14.3 32 32V352c0 17.7-14.3 32-32 32H128c-17.7 0-32-14.3-32-32V160z"]},dm={prefix:"fas",iconName:"bell",icon:[448,512,[128276,61602],"f0f3","M224 0c-17.7 0-32 14.3-32 32V51.2C119 66 64 130.6 64 208v18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416H416c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8V208c0-77.4-55-142-128-156.8V32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3H224 160c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"]},pm={prefix:"fas",iconName:"file",icon:[384,512,[128196,128459,61462],"f15b","M0 64C0 28.7 28.7 0 64 0H224V128c0 17.7 14.3 32 32 32H384V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zm384 64H256V0L384 128z"]},rh={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},gm=rh,mm={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H48c-17.7 0-32 14.3-32 32s14.3 32 32 32H192V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H400c17.7 0 32-14.3 32-32s-14.3-32-32-32H256V80z"]},vm={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},ym=vm,bm={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zm0 416a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM48 304a48 48 0 1 0 0-96 48 48 0 1 0 0 96zm464-48a48 48 0 1 0 -96 0 48 48 0 1 0 96 0zM142.9 437A48 48 0 1 0 75 369.1 48 48 0 1 0 142.9 437zm0-294.2A48 48 0 1 0 75 75a48 48 0 1 0 67.9 67.9zM369.1 437A48 48 0 1 0 437 369.1 48 48 0 1 0 369.1 437z"]},wm={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},$m={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},_m={prefix:"fas",iconName:"exclamation",icon:[64,512,[10069,10071,61738],"21","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},Sm={prefix:"fas",iconName:"barcode",icon:[512,512,[],"f02a","M24 32C10.7 32 0 42.7 0 56V456c0 13.3 10.7 24 24 24H40c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H24zm88 0c-8.8 0-16 7.2-16 16V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16zm72 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H184zm96 0c-13.3 0-24 10.7-24 24V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H280zM448 56V456c0 13.3 10.7 24 24 24h16c13.3 0 24-10.7 24-24V56c0-13.3-10.7-24-24-24H472c-13.3 0-24 10.7-24 24zm-64-8V464c0 8.8 7.2 16 16 16s16-7.2 16-16V48c0-8.8-7.2-16-16-16s-16 7.2-16 16z"]};function Ro(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Pe={},lr=[],pt=()=>{},Cm=()=>!1,vi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ha=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Ua=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Am=Object.prototype.hasOwnProperty,Ie=(e,t)=>Am.call(e,t),me=Array.isArray,cr=e=>Cr(e)==="[object Map]",Jn=e=>Cr(e)==="[object Set]",sc=e=>Cr(e)==="[object Date]",km=e=>Cr(e)==="[object RegExp]",Ee=e=>typeof e=="function",Ke=e=>typeof e=="string",kn=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",za=e=>(We(e)||Ee(e))&&Ee(e.then)&&Ee(e.catch),ih=Object.prototype.toString,Cr=e=>ih.call(e),Em=e=>Cr(e).slice(8,-1),oh=e=>Cr(e)==="[object Object]",Va=e=>Ke(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zr=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),xo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Rm=/-(\w)/g,gt=xo(e=>e.replace(Rm,(t,n)=>n?n.toUpperCase():"")),xm=/\B([A-Z])/g,Ct=xo(e=>e.replace(xm,"-$1").toLowerCase()),Ar=xo(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vr=xo(e=>e?`on${Ar(e)}`:""),Ft=(e,t)=>!Object.is(e,t),ur=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},ao=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},lo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},co=e=>{const t=Ke(e)?Number(e):NaN;return isNaN(t)?e:t};let ac;const sh=()=>ac||(ac=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Tm="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",Lm=Ro(Tm);function yi(e){if(me(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],f=Ke(r)?Fm(r):yi(r);if(f)for(const u in f)t[u]=f[u]}return t}else if(Ke(e)||We(e))return e}const Mm=/;(?![^(]*\))/g,Om=/:([^]+)/,Im=/\/\*[^]*?\*\//g;function Fm(e){const t={};return e.replace(Im,"").split(Mm).forEach(n=>{if(n){const r=n.split(Om);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function kr(e){let t="";if(Ke(e))t=e;else if(me(e))for(let n=0;n<e.length;n++){const r=kr(e[n]);r&&(t+=r+" ")}else if(We(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Nm(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ke(t)&&(e.class=kr(t)),n&&(e.style=yi(n)),e}const Dm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pm=Ro(Dm);function ah(e){return!!e||e===""}function Bm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=En(e[r],t[r]);return n}function En(e,t){if(e===t)return!0;let n=sc(e),r=sc(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=kn(e),r=kn(t),n||r)return e===t;if(n=me(e),r=me(t),n||r)return n&&r?Bm(e,t):!1;if(n=We(e),r=We(t),n||r){if(!n||!r)return!1;const f=Object.keys(e).length,u=Object.keys(t).length;if(f!==u)return!1;for(const h in e){const g=e.hasOwnProperty(h),s=t.hasOwnProperty(h);if(g&&!s||!g&&s||!En(e[h],t[h]))return!1}}return String(e)===String(t)}function To(e,t){return e.findIndex(n=>En(n,t))}const ye=e=>Ke(e)?e:e==null?"":me(e)||We(e)&&(e.toString===ih||!Ee(e.toString))?JSON.stringify(e,lh,2):String(e),lh=(e,t)=>t&&t.__v_isRef?lh(e,t.value):cr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,f],u)=>(n[gs(r,u)+" =>"]=f,n),{})}:Jn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>gs(n))}:kn(t)?gs(t):We(t)&&!me(t)&&!oh(t)?String(t):t,gs=(e,t="")=>{var n;return kn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let _t;class ja{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_t,!t&&_t&&(this.index=(_t.scopes||(_t.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_t;try{return _t=this,t()}finally{_t=n}}}on(){_t=this}off(){_t=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const f=this.parent.scopes.pop();f&&f!==this&&(this.parent.scopes[this.index]=f,f.index=this.index)}this.parent=void 0,this._active=!1}}}function ch(e){return new ja(e)}function uh(e,t=_t){t&&t.active&&t.effects.push(e)}function Ga(){return _t}function hh(e){_t&&_t.cleanups.push(e)}let Bn;class pr{constructor(t,n,r,f){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=3,this._trackId=0,this._runnings=0,this._queryings=0,this._depsLength=0,uh(this,f)}get dirty(){if(this._dirtyLevel===1){this._dirtyLevel=0,this._queryings++,Qn();for(const t of this.deps)if(t.computed&&(Wm(t.computed),this._dirtyLevel>=2))break;er(),this._queryings--}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?3:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=$n,n=Bn;try{return $n=!0,Bn=this,this._runnings++,lc(this),this.fn()}finally{cc(this),this._runnings--,Bn=n,$n=t}}stop(){var t;this.active&&(lc(this),cc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Wm(e){return e.value}function lc(e){e._trackId++,e._depsLength=0}function cc(e){if(e.deps&&e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)fh(e.deps[t],e);e.deps.length=e._depsLength}}function fh(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function Hm(e,t){e.effect instanceof pr&&(e=e.effect.fn);const n=new pr(e,pt,()=>{n.dirty&&n.run()});t&&(Ge(n,t),t.scope&&uh(n,t.scope)),(!t||!t.lazy)&&n.run();const r=n.run.bind(n);return r.effect=n,r}function Um(e){e.effect.stop()}let $n=!0,Ys=0;const dh=[];function Qn(){dh.push($n),$n=!1}function er(){const e=dh.pop();$n=e===void 0?!0:e}function Ka(){Ys++}function Ya(){for(Ys--;!Ys&&Xs.length;)Xs.shift()()}function ph(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&fh(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Xs=[];function gh(e,t,n){Ka();for(const r of e.keys())if(!(!r.allowRecurse&&r._runnings)&&r._dirtyLevel<t&&(!r._runnings||t!==2)){const f=r._dirtyLevel;r._dirtyLevel=t,f===0&&(!r._queryings||t!==2)&&(r.trigger(),r.scheduler&&Xs.push(r.scheduler))}Ya()}const mh=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},uo=new WeakMap,Wn=Symbol(""),Zs=Symbol("");function wt(e,t,n){if($n&&Bn){let r=uo.get(e);r||uo.set(e,r=new Map);let f=r.get(n);f||r.set(n,f=mh(()=>r.delete(n))),ph(Bn,f)}}function qt(e,t,n,r,f,u){const h=uo.get(e);if(!h)return;let g=[];if(t==="clear")g=[...h.values()];else if(n==="length"&&me(e)){const s=Number(r);h.forEach((p,o)=>{(o==="length"||!kn(o)&&o>=s)&&g.push(p)})}else switch(n!==void 0&&g.push(h.get(n)),t){case"add":me(e)?Va(n)&&g.push(h.get("length")):(g.push(h.get(Wn)),cr(e)&&g.push(h.get(Zs)));break;case"delete":me(e)||(g.push(h.get(Wn)),cr(e)&&g.push(h.get(Zs)));break;case"set":cr(e)&&g.push(h.get(Wn));break}Ka();for(const s of g)s&&gh(s,3);Ya()}function zm(e,t){var n;return(n=uo.get(e))==null?void 0:n.get(t)}const Vm=Ro("__proto__,__v_isRef,__isVue"),vh=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kn)),uc=jm();function jm(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Me(this);for(let u=0,h=this.length;u<h;u++)wt(r,"get",u+"");const f=r[t](...n);return f===-1||f===!1?r[t](...n.map(Me)):f}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Qn(),Ka();const r=Me(this)[t].apply(this,n);return Ya(),er(),r}}),e}function Gm(e){const t=Me(this);return wt(t,"has",e),t.hasOwnProperty(e)}class yh{constructor(t=!1,n=!1){this._isReadonly=t,this._shallow=n}get(t,n,r){const f=this._isReadonly,u=this._shallow;if(n==="__v_isReactive")return!f;if(n==="__v_isReadonly")return f;if(n==="__v_isShallow")return u;if(n==="__v_raw")return r===(f?u?Ch:Sh:u?_h:$h).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const h=me(t);if(!f){if(h&&Ie(uc,n))return Reflect.get(uc,n,r);if(n==="hasOwnProperty")return Gm}const g=Reflect.get(t,n,r);return(kn(n)?vh.has(n):Vm(n))||(f||wt(t,"get",n),u)?g:at(g)?h&&Va(n)?g:g.value:We(g)?f?Oo(g):Er(g):g}}class bh extends yh{constructor(t=!1){super(!1,t)}set(t,n,r,f){let u=t[n];if(!this._shallow){const s=Gn(u);if(!ri(r)&&!Gn(r)&&(u=Me(u),r=Me(r)),!me(t)&&at(u)&&!at(r))return s?!1:(u.value=r,!0)}const h=me(t)&&Va(n)?Number(n)<t.length:Ie(t,n),g=Reflect.set(t,n,r,f);return t===Me(f)&&(h?Ft(r,u)&&qt(t,"set",n,r):qt(t,"add",n,r)),g}deleteProperty(t,n){const r=Ie(t,n);t[n];const f=Reflect.deleteProperty(t,n);return f&&r&&qt(t,"delete",n,void 0),f}has(t,n){const r=Reflect.has(t,n);return(!kn(n)||!vh.has(n))&&wt(t,"has",n),r}ownKeys(t){return wt(t,"iterate",me(t)?"length":Wn),Reflect.ownKeys(t)}}class wh extends yh{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Km=new bh,Ym=new wh,Xm=new bh(!0),Zm=new wh(!0),Xa=e=>e,Lo=e=>Reflect.getPrototypeOf(e);function Pi(e,t,n=!1,r=!1){e=e.__v_raw;const f=Me(e),u=Me(t);n||(Ft(t,u)&&wt(f,"get",t),wt(f,"get",u));const{has:h}=Lo(f),g=r?Xa:n?Ja:ii;if(h.call(f,t))return g(e.get(t));if(h.call(f,u))return g(e.get(u));e!==f&&e.get(t)}function Bi(e,t=!1){const n=this.__v_raw,r=Me(n),f=Me(e);return t||(Ft(e,f)&&wt(r,"has",e),wt(r,"has",f)),e===f?n.has(e):n.has(e)||n.has(f)}function Wi(e,t=!1){return e=e.__v_raw,!t&&wt(Me(e),"iterate",Wn),Reflect.get(e,"size",e)}function hc(e){e=Me(e);const t=Me(this);return Lo(t).has.call(t,e)||(t.add(e),qt(t,"add",e,e)),this}function fc(e,t){t=Me(t);const n=Me(this),{has:r,get:f}=Lo(n);let u=r.call(n,e);u||(e=Me(e),u=r.call(n,e));const h=f.call(n,e);return n.set(e,t),u?Ft(t,h)&&qt(n,"set",e,t):qt(n,"add",e,t),this}function dc(e){const t=Me(this),{has:n,get:r}=Lo(t);let f=n.call(t,e);f||(e=Me(e),f=n.call(t,e)),r&&r.call(t,e);const u=t.delete(e);return f&&qt(t,"delete",e,void 0),u}function pc(){const e=Me(this),t=e.size!==0,n=e.clear();return t&&qt(e,"clear",void 0,void 0),n}function Hi(e,t){return function(r,f){const u=this,h=u.__v_raw,g=Me(h),s=t?Xa:e?Ja:ii;return!e&&wt(g,"iterate",Wn),h.forEach((p,o)=>r.call(f,s(p),s(o),u))}}function Ui(e,t,n){return function(...r){const f=this.__v_raw,u=Me(f),h=cr(u),g=e==="entries"||e===Symbol.iterator&&h,s=e==="keys"&&h,p=f[e](...r),o=n?Xa:t?Ja:ii;return!t&&wt(u,"iterate",s?Zs:Wn),{next(){const{value:i,done:a}=p.next();return a?{value:i,done:a}:{value:g?[o(i[0]),o(i[1])]:o(i),done:a}},[Symbol.iterator](){return this}}}}function hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qm(){const e={get(u){return Pi(this,u)},get size(){return Wi(this)},has:Bi,add:hc,set:fc,delete:dc,clear:pc,forEach:Hi(!1,!1)},t={get(u){return Pi(this,u,!1,!0)},get size(){return Wi(this)},has:Bi,add:hc,set:fc,delete:dc,clear:pc,forEach:Hi(!1,!0)},n={get(u){return Pi(this,u,!0)},get size(){return Wi(this,!0)},has(u){return Bi.call(this,u,!0)},add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear"),forEach:Hi(!0,!1)},r={get(u){return Pi(this,u,!0,!0)},get size(){return Wi(this,!0)},has(u){return Bi.call(this,u,!0)},add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear"),forEach:Hi(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(u=>{e[u]=Ui(u,!1,!1),n[u]=Ui(u,!0,!1),t[u]=Ui(u,!1,!0),r[u]=Ui(u,!0,!0)}),[e,n,t,r]}const[Jm,Qm,ev,tv]=qm();function Mo(e,t){const n=t?e?tv:ev:e?Qm:Jm;return(r,f,u)=>f==="__v_isReactive"?!e:f==="__v_isReadonly"?e:f==="__v_raw"?r:Reflect.get(Ie(n,f)&&f in r?n:r,f,u)}const nv={get:Mo(!1,!1)},rv={get:Mo(!1,!0)},iv={get:Mo(!0,!1)},ov={get:Mo(!0,!0)},$h=new WeakMap,_h=new WeakMap,Sh=new WeakMap,Ch=new WeakMap;function sv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function av(e){return e.__v_skip||!Object.isExtensible(e)?0:sv(Em(e))}function Er(e){return Gn(e)?e:Io(e,!1,Km,nv,$h)}function Za(e){return Io(e,!1,Xm,rv,_h)}function Oo(e){return Io(e,!0,Ym,iv,Sh)}function lv(e){return Io(e,!0,Zm,ov,Ch)}function Io(e,t,n,r,f){if(!We(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const u=f.get(e);if(u)return u;const h=av(e);if(h===0)return e;const g=new Proxy(e,h===2?r:n);return f.set(e,g),g}function Hn(e){return Gn(e)?Hn(e.__v_raw):!!(e&&e.__v_isReactive)}function Gn(e){return!!(e&&e.__v_isReadonly)}function ri(e){return!!(e&&e.__v_isShallow)}function qa(e){return Hn(e)||Gn(e)}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}function Fo(e){return ao(e,"__v_skip",!0),e}const ii=e=>We(e)?Er(e):e,Ja=e=>We(e)?Oo(e):e;class Ah{constructor(t,n,r,f){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new pr(()=>t(this._value),()=>oi(this,1)),this.effect.computed=this,this.effect.active=this._cacheable=!f,this.__v_isReadonly=r}get value(){const t=Me(this);return Qa(t),(!t._cacheable||t.effect.dirty)&&Ft(t._value,t._value=t.effect.run())&&oi(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function cv(e,t,n=!1){let r,f;const u=Ee(e);return u?(r=e,f=pt):(r=e.get,f=e.set),new Ah(r,f,u||!f,n)}function Qa(e){$n&&Bn&&(e=Me(e),ph(Bn,e.dep||(e.dep=mh(()=>e.dep=void 0,e instanceof Ah?e:void 0))))}function oi(e,t=3,n){e=Me(e);const r=e.dep;r&&gh(r,t)}function at(e){return!!(e&&e.__v_isRef===!0)}function Fe(e){return Eh(e,!1)}function kh(e){return Eh(e,!0)}function Eh(e,t){return at(e)?e:new uv(e,t)}class uv{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Me(t),this._value=n?t:ii(t)}get value(){return Qa(this),this._value}set value(t){const n=this.__v_isShallow||ri(t)||Gn(t);t=n?t:Me(t),Ft(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ii(t),oi(this,3))}}function hv(e){oi(e,3)}function Jt(e){return at(e)?e.value:e}function fv(e){return Ee(e)?e():Jt(e)}const dv={get:(e,t,n)=>Jt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const f=e[t];return at(f)&&!at(n)?(f.value=n,!0):Reflect.set(e,t,n,r)}};function el(e){return Hn(e)?e:new Proxy(e,dv)}class pv{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Qa(this),()=>oi(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function No(e){return new pv(e)}function gv(e){const t=me(e)?new Array(e.length):{};for(const n in e)t[n]=Rh(e,n);return t}class mv{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return zm(Me(this._object),this._key)}}class vv{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Do(e,t,n){return at(e)?e:Ee(e)?new vv(e):We(e)&&arguments.length>1?Rh(e,t,n):Fe(e)}function Rh(e,t,n){const r=e[t];return at(r)?r:new mv(e,t,n)}const yv={GET:"get",HAS:"has",ITERATE:"iterate"},bv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};function wv(e,t){}const $v={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},_v={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Qt(e,t,n,r){let f;try{f=r?e(...r):e()}catch(u){tr(u,t,n)}return f}function At(e,t,n,r){if(Ee(e)){const u=Qt(e,t,n,r);return u&&za(u)&&u.catch(h=>{tr(h,t,n)}),u}const f=[];for(let u=0;u<e.length;u++)f.push(At(e[u],t,n,r));return f}function tr(e,t,n,r=!0){const f=t?t.vnode:null;if(t){let u=t.parent;const h=t.proxy,g=`https://vuejs.org/errors/#runtime-${n}`;for(;u;){const p=u.ec;if(p){for(let o=0;o<p.length;o++)if(p[o](e,h,g)===!1)return}u=u.parent}const s=t.appContext.config.errorHandler;if(s){Qt(s,null,10,[e,h,g]);return}}Sv(e,n,f,r)}function Sv(e,t,n,r=!0){console.error(e)}let si=!1,qs=!1;const ct=[];let Pt=0;const hr=[];let Kt=null,Fn=0;const xh=Promise.resolve();let tl=null;function bi(e){const t=tl||xh;return e?t.then(this?e.bind(this):e):t}function Cv(e){let t=Pt+1,n=ct.length;for(;t<n;){const r=t+n>>>1,f=ct[r],u=ai(f);u<e||u===e&&f.pre?t=r+1:n=r}return t}function Po(e){(!ct.length||!ct.includes(e,si&&e.allowRecurse?Pt+1:Pt))&&(e.id==null?ct.push(e):ct.splice(Cv(e.id),0,e),Th())}function Th(){!si&&!qs&&(qs=!0,tl=xh.then(Lh))}function Av(e){const t=ct.indexOf(e);t>Pt&&ct.splice(t,1)}function ho(e){me(e)?hr.push(...e):(!Kt||!Kt.includes(e,e.allowRecurse?Fn+1:Fn))&&hr.push(e),Th()}function gc(e,t,n=si?Pt+1:0){for(;n<ct.length;n++){const r=ct[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;ct.splice(n,1),n--,r()}}}function fo(e){if(hr.length){const t=[...new Set(hr)];if(hr.length=0,Kt){Kt.push(...t);return}for(Kt=t,Kt.sort((n,r)=>ai(n)-ai(r)),Fn=0;Fn<Kt.length;Fn++)Kt[Fn]();Kt=null,Fn=0}}const ai=e=>e.id==null?1/0:e.id,kv=(e,t)=>{const n=ai(e)-ai(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Lh(e){qs=!1,si=!0,ct.sort(kv);try{for(Pt=0;Pt<ct.length;Pt++){const t=ct[Pt];t&&t.active!==!1&&Qt(t,null,14)}}finally{Pt=0,ct.length=0,fo(),si=!1,tl=null,(ct.length||hr.length)&&Lh()}}function Ev(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Pe;let f=n;const u=t.startsWith("update:"),h=u&&t.slice(7);if(h&&h in r){const o=`${h==="modelValue"?"model":h}Modifiers`,{number:i,trim:a}=r[o]||Pe;a&&(f=n.map(c=>Ke(c)?c.trim():c)),i&&(f=n.map(lo))}let g,s=r[g=Vr(t)]||r[g=Vr(gt(t))];!s&&u&&(s=r[g=Vr(Ct(t))]),s&&At(s,e,6,f);const p=r[g+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[g])return;e.emitted[g]=!0,At(p,e,6,f)}}function Mh(e,t,n=!1){const r=t.emitsCache,f=r.get(e);if(f!==void 0)return f;const u=e.emits;let h={},g=!1;if(!Ee(e)){const s=p=>{const o=Mh(p,t,!0);o&&(g=!0,Ge(h,o))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return!u&&!g?(We(e)&&r.set(e,null),null):(me(u)?u.forEach(s=>h[s]=null):Ge(h,u),We(e)&&r.set(e,h),h)}function Bo(e,t){return!e||!vi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ie(e,t[0].toLowerCase()+t.slice(1))||Ie(e,Ct(t))||Ie(e,t))}let nt=null,Wo=null;function li(e){const t=nt;return nt=e,Wo=e&&e.type.__scopeId||null,t}function Ho(e){Wo=e}function Uo(){Wo=null}const Rv=e=>Je;function Je(e,t=nt,n){if(!t||e._n)return e;const r=(...f)=>{r._d&&oa(-1);const u=li(t);let h;try{h=e(...f)}finally{li(u),r._d&&oa(1)}return h};return r._n=!0,r._c=!0,r._d=!0,r}function Ji(e){const{type:t,vnode:n,proxy:r,withProxy:f,props:u,propsOptions:[h],slots:g,attrs:s,emit:p,render:o,renderCache:i,data:a,setupState:c,ctx:l,inheritAttrs:d}=e;let m,v;const y=li(e);try{if(n.shapeFlag&4){const S=f||r,C=S;m=St(o.call(C,S,i,u,c,a,l)),v=s}else{const S=t;m=St(S.length>1?S(u,{attrs:s,slots:g,emit:p}):S(u,null)),v=t.props?s:Tv(s)}}catch(S){Yr.length=0,tr(S,e,1),m=ae(ut)}let A=m;if(v&&d!==!1){const S=Object.keys(v),{shapeFlag:C}=A;S.length&&C&7&&(h&&S.some(Ha)&&(v=Lv(v,h)),A=Ut(A,v))}return n.dirs&&(A=Ut(A),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&(A.transition=n.transition),m=A,li(y),m}function xv(e){let t;for(let n=0;n<e.length;n++){const r=e[n];if(Rn(r)){if(r.type!==ut||r.children==="v-if"){if(t)return;t=r}}else return}return t}const Tv=e=>{let t;for(const n in e)(n==="class"||n==="style"||vi(n))&&((t||(t={}))[n]=e[n]);return t},Lv=(e,t)=>{const n={};for(const r in e)(!Ha(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Mv(e,t,n){const{props:r,children:f,component:u}=e,{props:h,children:g,patchFlag:s}=t,p=u.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&s>=0){if(s&1024)return!0;if(s&16)return r?mc(r,h,p):!!h;if(s&8){const o=t.dynamicProps;for(let i=0;i<o.length;i++){const a=o[i];if(h[a]!==r[a]&&!Bo(p,a))return!0}}}else return(f||g)&&(!g||!g.$stable)?!0:r===h?!1:r?h?mc(r,h,p):!0:!!h;return!1}function mc(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let f=0;f<r.length;f++){const u=r[f];if(t[u]!==e[u]&&!Bo(n,u))return!0}return!1}function nl({vnode:e,parent:t},n){if(n)for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const rl="components",Ov="directives";function oe(e,t){return il(rl,e,!0,t)||e}const Oh=Symbol.for("v-ndc");function Iv(e){return Ke(e)?il(rl,e,!1)||e:e||Oh}function Fv(e){return il(Ov,e)}function il(e,t,n=!0,r=!1){const f=nt||et;if(f){const u=f.type;if(e===rl){const g=ca(u,!1);if(g&&(g===t||g===gt(t)||g===Ar(gt(t))))return u}const h=vc(f[e]||u[e],t)||vc(f.appContext[e],t);return!h&&r?u:h}}function vc(e,t){return e&&(e[t]||e[gt(t)]||e[Ar(gt(t))])}const Ih=e=>e.__isSuspense;let Js=0;const Nv={name:"Suspense",__isSuspense:!0,process(e,t,n,r,f,u,h,g,s,p){e==null?Pv(t,n,r,f,u,h,g,s,p):Bv(e,t,n,r,f,h,g,s,p)},hydrate:Wv,create:ol,normalize:Hv},Dv=Nv;function ci(e,t){const n=e.props&&e.props[t];Ee(n)&&n()}function Pv(e,t,n,r,f,u,h,g,s){const{p,o:{createElement:o}}=s,i=o("div"),a=e.suspense=ol(e,f,r,t,i,n,u,h,g,s);p(null,a.pendingBranch=e.ssContent,i,null,r,a,u,h),a.deps>0?(ci(e,"onPending"),ci(e,"onFallback"),p(null,e.ssFallback,t,n,r,null,u,h),fr(a,e.ssFallback)):a.resolve(!1,!0)}function Bv(e,t,n,r,f,u,h,g,{p:s,um:p,o:{createElement:o}}){const i=t.suspense=e.suspense;i.vnode=t,t.el=e.el;const a=t.ssContent,c=t.ssFallback,{activeBranch:l,pendingBranch:d,isInFallback:m,isHydrating:v}=i;if(d)i.pendingBranch=a,Ot(a,d)?(s(d,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0?i.resolve():m&&(v||(s(l,c,n,r,f,null,u,h,g),fr(i,c)))):(i.pendingId=Js++,v?(i.isHydrating=!1,i.activeBranch=d):p(d,f,i),i.deps=0,i.effects.length=0,i.hiddenContainer=o("div"),m?(s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0?i.resolve():(s(l,c,n,r,f,null,u,h,g),fr(i,c))):l&&Ot(a,l)?(s(l,a,n,r,f,i,u,h,g),i.resolve(!0)):(s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0&&i.resolve()));else if(l&&Ot(a,l))s(l,a,n,r,f,i,u,h,g),fr(i,a);else if(ci(t,"onPending"),i.pendingBranch=a,a.shapeFlag&512?i.pendingId=a.component.suspenseId:i.pendingId=Js++,s(null,a,i.hiddenContainer,null,f,i,u,h,g),i.deps<=0)i.resolve();else{const{timeout:y,pendingId:A}=i;y>0?setTimeout(()=>{i.pendingId===A&&i.fallback(c)},y):y===0&&i.fallback(c)}}function ol(e,t,n,r,f,u,h,g,s,p,o=!1){const{p:i,m:a,um:c,n:l,o:{parentNode:d,remove:m}}=p;let v;const y=Uv(e);y&&t!=null&&t.pendingBranch&&(v=t.pendingId,t.deps++);const A=e.props?co(e.props.timeout):void 0,S={vnode:e,parent:t,parentComponent:n,namespace:h,container:r,hiddenContainer:f,anchor:u,deps:0,pendingId:Js++,timeout:typeof A=="number"?A:-1,activeBranch:null,pendingBranch:null,isInFallback:!o,isHydrating:o,isUnmounted:!1,effects:[],resolve(C=!1,b=!1){const{vnode:R,activeBranch:L,pendingBranch:E,pendingId:M,effects:$,parentComponent:k,container:_}=S;let w=!1;if(S.isHydrating)S.isHydrating=!1;else if(!C){w=L&&E.transition&&E.transition.mode==="out-in",w&&(L.transition.afterLeave=()=>{M===S.pendingId&&(a(E,_,l(L),0),ho($))});let{anchor:O}=S;L&&(O=l(L),c(L,k,S,!0)),w||a(E,_,O,0)}fr(S,E),S.pendingBranch=null,S.isInFallback=!1;let x=S.parent,T=!1;for(;x;){if(x.pendingBranch){x.effects.push(...$),T=!0;break}x=x.parent}!T&&!w&&ho($),S.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!b&&t.resolve()),ci(R,"onResolve")},fallback(C){if(!S.pendingBranch)return;const{vnode:b,activeBranch:R,parentComponent:L,container:E,namespace:M}=S;ci(b,"onFallback");const $=l(R),k=()=>{S.isInFallback&&(i(null,C,E,$,L,null,M,g,s),fr(S,C))},_=C.transition&&C.transition.mode==="out-in";_&&(R.transition.afterLeave=k),S.isInFallback=!0,c(R,L,null,!0),_||k()},move(C,b,R){S.activeBranch&&a(S.activeBranch,C,b,R),S.container=C},next(){return S.activeBranch&&l(S.activeBranch)},registerDep(C,b){const R=!!S.pendingBranch;R&&S.deps++;const L=C.vnode.el;C.asyncDep.catch(E=>{tr(E,C,0)}).then(E=>{if(C.isUnmounted||S.isUnmounted||S.pendingId!==C.suspenseId)return;C.asyncResolved=!0;const{vnode:M}=C;aa(C,E,!1),L&&(M.el=L);const $=!L&&C.subTree.el;b(C,M,d(L||C.subTree.el),L?null:l(C.subTree),S,h,s),$&&m($),nl(C,M.el),R&&--S.deps===0&&S.resolve()})},unmount(C,b){S.isUnmounted=!0,S.activeBranch&&c(S.activeBranch,n,C,b),S.pendingBranch&&c(S.pendingBranch,n,C,b)}};return S}function Wv(e,t,n,r,f,u,h,g,s){const p=t.suspense=ol(t,r,n,e.parentNode,document.createElement("div"),null,f,u,h,g,!0),o=s(e,p.pendingBranch=t.ssContent,n,p,u,h);return p.deps===0&&p.resolve(!1,!0),o}function Hv(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=yc(r?n.default:n),e.ssFallback=r?yc(n.fallback):ae(ut)}function yc(e){let t;if(Ee(e)){const n=Xn&&e._c;n&&(e._d=!1,Z()),e=e(),n&&(e._d=!0,t=bt,gf())}return me(e)&&(e=xv(e)),e=St(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Fh(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):ho(e)}function fr(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e,f=n.el=t.el;r&&r.subTree===n&&(r.vnode.el=f,nl(r,f))}function Uv(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const Nh=Symbol.for("v-scx"),Dh=()=>xt(Nh);function Ph(e,t){return wi(e,null,t)}function Bh(e,t){return wi(e,null,{flush:"post"})}function Wh(e,t){return wi(e,null,{flush:"sync"})}const zi={};function qe(e,t,n){return wi(e,t,n)}function wi(e,t,{immediate:n,deep:r,flush:f,once:u,onTrack:h,onTrigger:g}=Pe){if(t&&u){const b=t;t=(...R)=>{b(...R),C()}}const s=et,p=b=>r===!0?b:Pn(b,r===!1?1:void 0);let o,i=!1,a=!1;if(at(e)?(o=()=>e.value,i=ri(e)):Hn(e)?(o=()=>p(e),i=!0):me(e)?(a=!0,i=e.some(b=>Hn(b)||ri(b)),o=()=>e.map(b=>{if(at(b))return b.value;if(Hn(b))return p(b);if(Ee(b))return Qt(b,s,2)})):Ee(e)?t?o=()=>Qt(e,s,2):o=()=>(c&&c(),At(e,s,3,[l])):o=pt,t&&r){const b=o;o=()=>Pn(b())}let c,l=b=>{c=A.onStop=()=>{Qt(b,s,4),c=A.onStop=void 0}},d;if(_i)if(l=pt,t?n&&At(t,s,3,[o(),a?[]:void 0,l]):o(),f==="sync"){const b=Dh();d=b.__watcherHandles||(b.__watcherHandles=[])}else return pt;let m=a?new Array(e.length).fill(zi):zi;const v=()=>{if(!(!A.active||!A.dirty))if(t){const b=A.run();(r||i||(a?b.some((R,L)=>Ft(R,m[L])):Ft(b,m)))&&(c&&c(),At(t,s,3,[b,m===zi?void 0:a&&m[0]===zi?[]:m,l]),m=b)}else A.run()};v.allowRecurse=!!t;let y;f==="sync"?y=v:f==="post"?y=()=>ot(v,s&&s.suspense):(v.pre=!0,s&&(v.id=s.uid),y=()=>Po(v));const A=new pr(o,pt,y),S=Ga(),C=()=>{A.stop(),S&&Ua(S.effects,A)};return t?n?v():m=A.run():f==="post"?ot(A.run.bind(A),s&&s.suspense):A.run(),d&&d.push(C),C}function zv(e,t,n){const r=this.proxy,f=Ke(e)?e.includes(".")?Hh(r,e):()=>r[e]:e.bind(r,r);let u;Ee(t)?u=t:(u=t.handler,n=t);const h=et;xn(this);const g=wi(f,u.bind(r),n);return h?xn(h):_n(),g}function Hh(e,t){const n=t.split(".");return()=>{let r=e;for(let f=0;f<n.length&&r;f++)r=r[n[f]];return r}}function Pn(e,t,n=0,r){if(!We(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),at(e))Pn(e.value,t,n,r);else if(me(e))for(let f=0;f<e.length;f++)Pn(e[f],t,n,r);else if(Jn(e)||cr(e))e.forEach(f=>{Pn(f,t,n,r)});else if(oh(e))for(const f in e)Pn(e[f],t,n,r);return e}function zo(e,t){const n=nt;if(n===null)return e;const r=Zo(n)||n.proxy,f=e.dirs||(e.dirs=[]);for(let u=0;u<t.length;u++){let[h,g,s,p=Pe]=t[u];h&&(Ee(h)&&(h={mounted:h,updated:h}),h.deep&&Pn(g),f.push({dir:h,instance:r,value:g,oldValue:void 0,arg:s,modifiers:p}))}return e}function Dt(e,t,n,r){const f=e.dirs,u=t&&t.dirs;for(let h=0;h<f.length;h++){const g=f[h];u&&(g.oldValue=u[h].value);let s=g.dir[r];s&&(Qn(),At(s,n,8,[e.el,g,e,t]),er())}}const vn=Symbol("_leaveCb"),Vi=Symbol("_enterCb");function sl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ye(()=>{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}const Rt=[Function,Array],al={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Rt,onEnter:Rt,onAfterEnter:Rt,onEnterCancelled:Rt,onBeforeLeave:Rt,onLeave:Rt,onAfterLeave:Rt,onLeaveCancelled:Rt,onBeforeAppear:Rt,onAppear:Rt,onAfterAppear:Rt,onAppearCancelled:Rt},Vv={name:"BaseTransition",props:al,setup(e,{slots:t}){const n=Mt(),r=sl();let f;return()=>{const u=t.default&&Vo(t.default(),!0);if(!u||!u.length)return;let h=u[0];if(u.length>1){for(const d of u)if(d.type!==ut){h=d;break}}const g=Me(e),{mode:s}=g;if(r.isLeaving)return ms(h);const p=bc(h);if(!p)return ms(h);const o=gr(p,g,r,n);Kn(p,o);const i=n.subTree,a=i&&bc(i);let c=!1;const{getTransitionKey:l}=p.type;if(l){const d=l();f===void 0?f=d:d!==f&&(f=d,c=!0)}if(a&&a.type!==ut&&(!Ot(p,a)||c)){const d=gr(a,g,r,n);if(Kn(a,d),s==="out-in")return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ms(h);s==="in-out"&&p.type!==ut&&(d.delayLeave=(m,v,y)=>{const A=zh(r,a);A[String(a.key)]=a,m[vn]=()=>{v(),m[vn]=void 0,delete o.delayedLeave},o.delayedLeave=y})}return h}}},Uh=Vv;function zh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function gr(e,t,n,r){const{appear:f,mode:u,persisted:h=!1,onBeforeEnter:g,onEnter:s,onAfterEnter:p,onEnterCancelled:o,onBeforeLeave:i,onLeave:a,onAfterLeave:c,onLeaveCancelled:l,onBeforeAppear:d,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=t,A=String(e.key),S=zh(n,e),C=(L,E)=>{L&&At(L,r,9,E)},b=(L,E)=>{const M=E[1];C(L,E),me(L)?L.every($=>$.length<=1)&&M():L.length<=1&&M()},R={mode:u,persisted:h,beforeEnter(L){let E=g;if(!n.isMounted)if(f)E=d||g;else return;L[vn]&&L[vn](!0);const M=S[A];M&&Ot(e,M)&&M.el[vn]&&M.el[vn](),C(E,[L])},enter(L){let E=s,M=p,$=o;if(!n.isMounted)if(f)E=m||s,M=v||p,$=y||o;else return;let k=!1;const _=L[Vi]=w=>{k||(k=!0,w?C($,[L]):C(M,[L]),R.delayedLeave&&R.delayedLeave(),L[Vi]=void 0)};E?b(E,[L,_]):_()},leave(L,E){const M=String(e.key);if(L[Vi]&&L[Vi](!0),n.isUnmounting)return E();C(i,[L]);let $=!1;const k=L[vn]=_=>{$||($=!0,E(),_?C(l,[L]):C(c,[L]),L[vn]=void 0,S[M]===e&&delete S[M])};S[M]=e,a?b(a,[L,k]):k()},clone(L){return gr(L,t,n,r)}};return R}function ms(e){if($i(e))return e=Ut(e),e.children=null,e}function bc(e){return $i(e)?e.children?e.children[0]:void 0:e}function Kn(e,t){e.shapeFlag&6&&e.component?Kn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vo(e,t=!1,n){let r=[],f=0;for(let u=0;u<e.length;u++){let h=e[u];const g=n==null?h.key:String(n)+String(h.key!=null?h.key:u);h.type===Re?(h.patchFlag&128&&f++,r=r.concat(Vo(h.children,t,g))):(t||h.type!==ut)&&r.push(g!=null?Ut(h,{key:g}):h)}if(f>1)for(let u=0;u<r.length;u++)r[u].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function be(e,t){return Ee(e)?Ge({name:e.name},t,{setup:e}):e}const Un=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function jv(e){Ee(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:f=200,timeout:u,suspensible:h=!0,onError:g}=e;let s=null,p,o=0;const i=()=>(o++,s=null,a()),a=()=>{let c;return s||(c=s=t().catch(l=>{if(l=l instanceof Error?l:new Error(String(l)),g)return new Promise((d,m)=>{g(l,()=>d(i()),()=>m(l),o+1)});throw l}).then(l=>c!==s&&s?s:(l&&(l.__esModule||l[Symbol.toStringTag]==="Module")&&(l=l.default),p=l,l)))};return be({name:"AsyncComponentWrapper",__asyncLoader:a,get __asyncResolved(){return p},setup(){const c=et;if(p)return()=>vs(p,c);const l=y=>{s=null,tr(y,c,13,!r)};if(h&&c.suspense||_i)return a().then(y=>()=>vs(y,c)).catch(y=>(l(y),()=>r?ae(r,{error:y}):null));const d=Fe(!1),m=Fe(),v=Fe(!!f);return f&&setTimeout(()=>{v.value=!1},f),u!=null&&setTimeout(()=>{if(!d.value&&!m.value){const y=new Error(`Async component timed out after ${u}ms.`);l(y),m.value=y}},u),a().then(()=>{d.value=!0,c.parent&&$i(c.parent.vnode)&&(c.parent.effect.dirty=!0,Po(c.parent.update))}).catch(y=>{l(y),m.value=y}),()=>{if(d.value&&p)return vs(p,c);if(m.value&&r)return ae(r,{error:m.value});if(n&&!v.value)return ae(n)}}})}function vs(e,t){const{ref:n,props:r,children:f,ce:u}=t.vnode,h=ae(e,r,f);return h.ref=n,h.ce=u,delete t.vnode.ce,h}const $i=e=>e.type.__isKeepAlive,Gv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Mt(),r=n.ctx;if(!r.renderer)return()=>{const y=t.default&&t.default();return y&&y.length===1?y[0]:y};const f=new Map,u=new Set;let h=null;const g=n.suspense,{renderer:{p:s,m:p,um:o,o:{createElement:i}}}=r,a=i("div");r.activate=(y,A,S,C,b)=>{const R=y.component;p(y,A,S,0,g),s(R.vnode,y,A,S,R,g,C,y.slotScopeIds,b),ot(()=>{R.isDeactivated=!1,R.a&&ur(R.a);const L=y.props&&y.props.onVnodeMounted;L&&yt(L,R.parent,y)},g)},r.deactivate=y=>{const A=y.component;p(y,a,null,1,g),ot(()=>{A.da&&ur(A.da);const S=y.props&&y.props.onVnodeUnmounted;S&&yt(S,A.parent,y),A.isDeactivated=!0},g)};function c(y){ys(y),o(y,n,g,!0)}function l(y){f.forEach((A,S)=>{const C=ca(A.type);C&&(!y||!y(C))&&d(S)})}function d(y){const A=f.get(y);!h||!Ot(A,h)?c(A):h&&ys(h),f.delete(y),u.delete(y)}qe(()=>[e.include,e.exclude],([y,A])=>{y&&l(S=>Br(y,S)),A&&l(S=>!Br(A,S))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&f.set(m,bs(n.subTree))};return Ye(v),Go(v),Rr(()=>{f.forEach(y=>{const{subTree:A,suspense:S}=n,C=bs(A);if(y.type===C.type&&y.key===C.key){ys(C);const b=C.component.da;b&&ot(b,S);return}c(y)})}),()=>{if(m=null,!t.default)return null;const y=t.default(),A=y[0];if(y.length>1)return h=null,y;if(!Rn(A)||!(A.shapeFlag&4)&&!(A.shapeFlag&128))return h=null,A;let S=bs(A);const C=S.type,b=ca(Un(S)?S.type.__asyncResolved||{}:C),{include:R,exclude:L,max:E}=e;if(R&&(!b||!Br(R,b))||L&&b&&Br(L,b))return h=S,A;const M=S.key==null?C:S.key,$=f.get(M);return S.el&&(S=Ut(S),A.shapeFlag&128&&(A.ssContent=S)),m=M,$?(S.el=$.el,S.component=$.component,S.transition&&Kn(S,S.transition),S.shapeFlag|=512,u.delete(M),u.add(M)):(u.add(M),E&&u.size>parseInt(E,10)&&d(u.values().next().value)),S.shapeFlag|=256,h=S,Ih(A.type)?A:S}}},Kv=Gv;function Br(e,t){return me(e)?e.some(n=>Br(n,t)):Ke(e)?e.split(",").includes(t):km(e)?e.test(t):!1}function Vh(e,t){Gh(e,"a",t)}function jh(e,t){Gh(e,"da",t)}function Gh(e,t,n=et){const r=e.__wdc||(e.__wdc=()=>{let f=n;for(;f;){if(f.isDeactivated)return;f=f.parent}return e()});if(jo(t,r,n),n){let f=n.parent;for(;f&&f.parent;)$i(f.parent.vnode)&&Yv(r,t,n,f),f=f.parent}}function Yv(e,t,n,r){const f=jo(t,e,r,!0);Ko(()=>{Ua(r[t],f)},n)}function ys(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function bs(e){return e.shapeFlag&128?e.ssContent:e}function jo(e,t,n=et,r=!1){if(n){const f=n[e]||(n[e]=[]),u=t.__weh||(t.__weh=(...h)=>{if(n.isUnmounted)return;Qn(),xn(n);const g=At(t,n,e,h);return _n(),er(),g});return r?f.unshift(u):f.push(u),u}}const sn=e=>(t,n=et)=>(!_i||e==="sp")&&jo(e,(...r)=>t(...r),n),Kh=sn("bm"),Ye=sn("m"),Yh=sn("bu"),Go=sn("u"),Rr=sn("bum"),Ko=sn("um"),Xh=sn("sp"),Zh=sn("rtg"),qh=sn("rtc");function Jh(e,t=et){jo("ec",e,t)}function $t(e,t,n,r){let f;const u=n&&n[r];if(me(e)||Ke(e)){f=new Array(e.length);for(let h=0,g=e.length;h<g;h++)f[h]=t(e[h],h,void 0,u&&u[h])}else if(typeof e=="number"){f=new Array(e);for(let h=0;h<e;h++)f[h]=t(h+1,h,void 0,u&&u[h])}else if(We(e))if(e[Symbol.iterator])f=Array.from(e,(h,g)=>t(h,g,void 0,u&&u[g]));else{const h=Object.keys(e);f=new Array(h.length);for(let g=0,s=h.length;g<s;g++){const p=h[g];f[g]=t(e[p],p,g,u&&u[g])}}else f=[];return n&&(n[r]=f),f}function Xv(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(me(r))for(let f=0;f<r.length;f++)e[r[f].name]=r[f].fn;else r&&(e[r.name]=r.key?(...f)=>{const u=r.fn(...f);return u&&(u.key=r.key),u}:r.fn)}return e}function Zv(e,t,n={},r,f){if(nt.isCE||nt.parent&&Un(nt.parent)&&nt.parent.isCE)return t!=="default"&&(n.name=t),ae("slot",n,r&&r());let u=e[t];u&&u._c&&(u._d=!1),Z();const h=u&&Qh(u(n)),g=_e(Re,{key:n.key||h&&h.key||`_${t}`},h||(r?r():[]),h&&e._===1?64:-2);return!f&&g.scopeId&&(g.slotScopeIds=[g.scopeId+"-s"]),u&&u._c&&(u._d=!0),g}function Qh(e){return e.some(t=>Rn(t)?!(t.type===ut||t.type===Re&&!Qh(t.children)):!0)?e:null}function qv(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Vr(r)]=e[r];return n}const Qs=e=>e?$f(e)?Zo(e)||e.proxy:Qs(e.parent):null,jr=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qs(e.parent),$root:e=>Qs(e.root),$emit:e=>e.emit,$options:e=>ll(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Po(e.update)}),$nextTick:e=>e.n||(e.n=bi.bind(e.proxy)),$watch:e=>zv.bind(e)}),ws=(e,t)=>e!==Pe&&!e.__isScriptSetup&&Ie(e,t),ea={get({_:e},t){const{ctx:n,setupState:r,data:f,props:u,accessCache:h,type:g,appContext:s}=e;let p;if(t[0]!=="$"){const c=h[t];if(c!==void 0)switch(c){case 1:return r[t];case 2:return f[t];case 4:return n[t];case 3:return u[t]}else{if(ws(r,t))return h[t]=1,r[t];if(f!==Pe&&Ie(f,t))return h[t]=2,f[t];if((p=e.propsOptions[0])&&Ie(p,t))return h[t]=3,u[t];if(n!==Pe&&Ie(n,t))return h[t]=4,n[t];ta&&(h[t]=0)}}const o=jr[t];let i,a;if(o)return t==="$attrs"&&wt(e,"get",t),o(e);if((i=g.__cssModules)&&(i=i[t]))return i;if(n!==Pe&&Ie(n,t))return h[t]=4,n[t];if(a=s.config.globalProperties,Ie(a,t))return a[t]},set({_:e},t,n){const{data:r,setupState:f,ctx:u}=e;return ws(f,t)?(f[t]=n,!0):r!==Pe&&Ie(r,t)?(r[t]=n,!0):Ie(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(u[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:f,propsOptions:u}},h){let g;return!!n[h]||e!==Pe&&Ie(e,h)||ws(t,h)||(g=u[0])&&Ie(g,h)||Ie(r,h)||Ie(jr,h)||Ie(f.config.globalProperties,h)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ie(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Jv=Ge({},ea,{get(e,t){if(t!==Symbol.unscopables)return ea.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Lm(t)}});function Qv(){return null}function ey(){return null}function ty(e){}function ny(e){}function ry(){return null}function iy(){}function oy(e,t){return null}function sy(){return ef().slots}function ay(){return ef().attrs}function ly(e,t,n=Pe){const r=Mt(),f=gt(t),u=Ct(t),h=No((s,p)=>{let o;return Wh(()=>{const i=e[t];Ft(o,i)&&(o=i,p())}),{get(){return s(),n.get?n.get(o):o},set(i){const a=r.vnode.props;!(a&&(t in a||f in a||u in a)&&(`onUpdate:${t}`in a||`onUpdate:${f}`in a||`onUpdate:${u}`in a))&&Ft(i,o)&&(o=i,p()),r.emit(`update:${t}`,n.set?n.set(i):i)}}}),g=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return h[Symbol.iterator]=()=>{let s=0;return{next(){return s<2?{value:s++?e[g]||{}:h,done:!1}:{done:!0}}}},h}function ef(){const e=Mt();return e.setupContext||(e.setupContext=Cf(e))}function ui(e){return me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function cy(e,t){const n=ui(e);for(const r in t){if(r.startsWith("__skip"))continue;let f=n[r];f?me(f)||Ee(f)?f=n[r]={type:f,default:t[r]}:f.default=t[r]:f===null&&(f=n[r]={default:t[r]}),f&&t[`__skip_${r}`]&&(f.skipFactory=!0)}return n}function uy(e,t){return!e||!t?e||t:me(e)&&me(t)?e.concat(t):Ge({},ui(e),ui(t))}function hy(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function fy(e){const t=Mt();let n=e();return _n(),za(n)&&(n=n.catch(r=>{throw xn(t),r})),[n,()=>xn(t)]}let ta=!0;function dy(e){const t=ll(e),n=e.proxy,r=e.ctx;ta=!1,t.beforeCreate&&wc(t.beforeCreate,e,"bc");const{data:f,computed:u,methods:h,watch:g,provide:s,inject:p,created:o,beforeMount:i,mounted:a,beforeUpdate:c,updated:l,activated:d,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:A,unmounted:S,render:C,renderTracked:b,renderTriggered:R,errorCaptured:L,serverPrefetch:E,expose:M,inheritAttrs:$,components:k,directives:_,filters:w}=t;if(p&&py(p,r,null),h)for(const O in h){const I=h[O];Ee(I)&&(r[O]=I.bind(n))}if(f){const O=f.call(n,n);We(O)&&(e.data=Er(O))}if(ta=!0,u)for(const O in u){const I=u[O],F=Ee(I)?I.bind(n,n):Ee(I.get)?I.get.bind(n,n):pt,P=!Ee(I)&&Ee(I.set)?I.set.bind(n):pt,W=ke({get:F,set:P});Object.defineProperty(r,O,{enumerable:!0,configurable:!0,get:()=>W.value,set:j=>W.value=j})}if(g)for(const O in g)tf(g[O],r,n,O);if(s){const O=Ee(s)?s.call(n):s;Reflect.ownKeys(O).forEach(I=>{Gr(I,O[I])})}o&&wc(o,e,"c");function T(O,I){me(I)?I.forEach(F=>O(F.bind(n))):I&&O(I.bind(n))}if(T(Kh,i),T(Ye,a),T(Yh,c),T(Go,l),T(Vh,d),T(jh,m),T(Jh,L),T(qh,b),T(Zh,R),T(Rr,y),T(Ko,S),T(Xh,E),me(M))if(M.length){const O=e.exposed||(e.exposed={});M.forEach(I=>{Object.defineProperty(O,I,{get:()=>n[I],set:F=>n[I]=F})})}else e.exposed||(e.exposed={});C&&e.render===pt&&(e.render=C),$!=null&&(e.inheritAttrs=$),k&&(e.components=k),_&&(e.directives=_)}function py(e,t,n=pt){me(e)&&(e=na(e));for(const r in e){const f=e[r];let u;We(f)?"default"in f?u=xt(f.from||r,f.default,!0):u=xt(f.from||r):u=xt(f),at(u)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>u.value,set:h=>u.value=h}):t[r]=u}}function wc(e,t,n){At(me(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function tf(e,t,n,r){const f=r.includes(".")?Hh(n,r):()=>n[r];if(Ke(e)){const u=t[e];Ee(u)&&qe(f,u)}else if(Ee(e))qe(f,e.bind(n));else if(We(e))if(me(e))e.forEach(u=>tf(u,t,n,r));else{const u=Ee(e.handler)?e.handler.bind(n):t[e.handler];Ee(u)&&qe(f,u,e)}}function ll(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:f,optionsCache:u,config:{optionMergeStrategies:h}}=e.appContext,g=u.get(t);let s;return g?s=g:!f.length&&!n&&!r?s=t:(s={},f.length&&f.forEach(p=>po(s,p,h,!0)),po(s,t,h)),We(t)&&u.set(t,s),s}function po(e,t,n,r=!1){const{mixins:f,extends:u}=t;u&&po(e,u,n,!0),f&&f.forEach(h=>po(e,h,n,!0));for(const h in t)if(!(r&&h==="expose")){const g=gy[h]||n&&n[h];e[h]=g?g(e[h],t[h]):t[h]}return e}const gy={data:$c,props:_c,emits:_c,methods:Wr,computed:Wr,beforeCreate:dt,created:dt,beforeMount:dt,mounted:dt,beforeUpdate:dt,updated:dt,beforeDestroy:dt,beforeUnmount:dt,destroyed:dt,unmounted:dt,activated:dt,deactivated:dt,errorCaptured:dt,serverPrefetch:dt,components:Wr,directives:Wr,watch:vy,provide:$c,inject:my};function $c(e,t){return t?e?function(){return Ge(Ee(e)?e.call(this,this):e,Ee(t)?t.call(this,this):t)}:t:e}function my(e,t){return Wr(na(e),na(t))}function na(e){if(me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function dt(e,t){return e?[...new Set([].concat(e,t))]:t}function Wr(e,t){return e?Ge(Object.create(null),e,t):t}function _c(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:Ge(Object.create(null),ui(e),ui(t??{})):t}function vy(e,t){if(!e)return t;if(!t)return e;const n=Ge(Object.create(null),e);for(const r in t)n[r]=dt(e[r],t[r]);return n}function nf(){return{app:null,config:{isNativeTag:Cm,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let yy=0;function by(e,t){return function(r,f=null){Ee(r)||(r=Ge({},r)),f!=null&&!We(f)&&(f=null);const u=nf(),h=new WeakSet;let g=!1;const s=u.app={_uid:yy++,_component:r,_props:f,_container:null,_context:u,_instance:null,version:kf,get config(){return u.config},set config(p){},use(p,...o){return h.has(p)||(p&&Ee(p.install)?(h.add(p),p.install(s,...o)):Ee(p)&&(h.add(p),p(s,...o))),s},mixin(p){return u.mixins.includes(p)||u.mixins.push(p),s},component(p,o){return o?(u.components[p]=o,s):u.components[p]},directive(p,o){return o?(u.directives[p]=o,s):u.directives[p]},mount(p,o,i){if(!g){const a=ae(r,f);return a.appContext=u,i===!0?i="svg":i===!1&&(i=void 0),o&&t?t(a,p):e(a,p,i),g=!0,s._container=p,p.__vue_app__=s,Zo(a.component)||a.component.proxy}},unmount(){g&&(e(null,s._container),delete s._container.__vue_app__)},provide(p,o){return u.provides[p]=o,s},runWithContext(p){hi=s;try{return p()}finally{hi=null}}};return s}}let hi=null;function Gr(e,t){if(et){let n=et.provides;const r=et.parent&&et.parent.provides;r===n&&(n=et.provides=Object.create(r)),n[e]=t}}function xt(e,t,n=!1){const r=et||nt;if(r||hi){const f=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:hi._context.provides;if(f&&e in f)return f[e];if(arguments.length>1)return n&&Ee(t)?t.call(r&&r.proxy):t}}function wy(){return!!(et||nt||hi)}function $y(e,t,n,r=!1){const f={},u={};ao(u,Yo,1),e.propsDefaults=Object.create(null),rf(e,t,f,u);for(const h in e.propsOptions[0])h in f||(f[h]=void 0);n?e.props=r?f:Za(f):e.type.props?e.props=f:e.props=u,e.attrs=u}function _y(e,t,n,r){const{props:f,attrs:u,vnode:{patchFlag:h}}=e,g=Me(f),[s]=e.propsOptions;let p=!1;if((r||h>0)&&!(h&16)){if(h&8){const o=e.vnode.dynamicProps;for(let i=0;i<o.length;i++){let a=o[i];if(Bo(e.emitsOptions,a))continue;const c=t[a];if(s)if(Ie(u,a))c!==u[a]&&(u[a]=c,p=!0);else{const l=gt(a);f[l]=ra(s,g,l,c,e,!1)}else c!==u[a]&&(u[a]=c,p=!0)}}}else{rf(e,t,f,u)&&(p=!0);let o;for(const i in g)(!t||!Ie(t,i)&&((o=Ct(i))===i||!Ie(t,o)))&&(s?n&&(n[i]!==void 0||n[o]!==void 0)&&(f[i]=ra(s,g,i,void 0,e,!0)):delete f[i]);if(u!==g)for(const i in u)(!t||!Ie(t,i))&&(delete u[i],p=!0)}p&&qt(e,"set","$attrs")}function rf(e,t,n,r){const[f,u]=e.propsOptions;let h=!1,g;if(t)for(let s in t){if(zr(s))continue;const p=t[s];let o;f&&Ie(f,o=gt(s))?!u||!u.includes(o)?n[o]=p:(g||(g={}))[o]=p:Bo(e.emitsOptions,s)||(!(s in r)||p!==r[s])&&(r[s]=p,h=!0)}if(u){const s=Me(n),p=g||Pe;for(let o=0;o<u.length;o++){const i=u[o];n[i]=ra(f,s,i,p[i],e,!Ie(p,i))}}return h}function ra(e,t,n,r,f,u){const h=e[n];if(h!=null){const g=Ie(h,"default");if(g&&r===void 0){const s=h.default;if(h.type!==Function&&!h.skipFactory&&Ee(s)){const{propsDefaults:p}=f;n in p?r=p[n]:(xn(f),r=p[n]=s.call(null,t),_n())}else r=s}h[0]&&(u&&!g?r=!1:h[1]&&(r===""||r===Ct(n))&&(r=!0))}return r}function of(e,t,n=!1){const r=t.propsCache,f=r.get(e);if(f)return f;const u=e.props,h={},g=[];let s=!1;if(!Ee(e)){const o=i=>{s=!0;const[a,c]=of(i,t,!0);Ge(h,a),c&&g.push(...c)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!u&&!s)return We(e)&&r.set(e,lr),lr;if(me(u))for(let o=0;o<u.length;o++){const i=gt(u[o]);Sc(i)&&(h[i]=Pe)}else if(u)for(const o in u){const i=gt(o);if(Sc(i)){const a=u[o],c=h[i]=me(a)||Ee(a)?{type:a}:Ge({},a);if(c){const l=kc(Boolean,c.type),d=kc(String,c.type);c[0]=l>-1,c[1]=d<0||l<d,(l>-1||Ie(c,"default"))&&g.push(i)}}}const p=[h,g];return We(e)&&r.set(e,p),p}function Sc(e){return e[0]!=="$"}function Cc(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ac(e,t){return Cc(e)===Cc(t)}function kc(e,t){return me(t)?t.findIndex(n=>Ac(n,e)):Ee(t)&&Ac(t,e)?0:-1}const sf=e=>e[0]==="_"||e==="$stable",cl=e=>me(e)?e.map(St):[St(e)],Sy=(e,t,n)=>{if(t._n)return t;const r=Je((...f)=>cl(t(...f)),n);return r._c=!1,r},af=(e,t,n)=>{const r=e._ctx;for(const f in e){if(sf(f))continue;const u=e[f];if(Ee(u))t[f]=Sy(f,u,r);else if(u!=null){const h=cl(u);t[f]=()=>h}}},lf=(e,t)=>{const n=cl(t);e.slots.default=()=>n},Cy=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Me(t),ao(t,"_",n)):af(t,e.slots={})}else e.slots={},t&&lf(e,t);ao(e.slots,Yo,1)},Ay=(e,t,n)=>{const{vnode:r,slots:f}=e;let u=!0,h=Pe;if(r.shapeFlag&32){const g=t._;g?n&&g===1?u=!1:(Ge(f,t),!n&&g===1&&delete f._):(u=!t.$stable,af(t,f)),h=t}else t&&(lf(e,t),h={default:1});if(u)for(const g in f)!sf(g)&&h[g]==null&&delete f[g]};function go(e,t,n,r,f=!1){if(me(e)){e.forEach((a,c)=>go(a,t&&(me(t)?t[c]:t),n,r,f));return}if(Un(r)&&!f)return;const u=r.shapeFlag&4?Zo(r.component)||r.component.proxy:r.el,h=f?null:u,{i:g,r:s}=e,p=t&&t.r,o=g.refs===Pe?g.refs={}:g.refs,i=g.setupState;if(p!=null&&p!==s&&(Ke(p)?(o[p]=null,Ie(i,p)&&(i[p]=null)):at(p)&&(p.value=null)),Ee(s))Qt(s,g,12,[h,o]);else{const a=Ke(s),c=at(s);if(a||c){const l=()=>{if(e.f){const d=a?Ie(i,s)?i[s]:o[s]:s.value;f?me(d)&&Ua(d,u):me(d)?d.includes(u)||d.push(u):a?(o[s]=[u],Ie(i,s)&&(i[s]=o[s])):(s.value=[u],e.k&&(o[e.k]=s.value))}else a?(o[s]=h,Ie(i,s)&&(i[s]=h)):c&&(s.value=h,e.k&&(o[e.k]=h))};h?(l.id=-1,ot(l,n)):l()}}}let fn=!1;const ky=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Ey=e=>e.namespaceURI.includes("MathML"),ji=e=>{if(ky(e))return"svg";if(Ey(e))return"mathml"},Gi=e=>e.nodeType===8;function Ry(e){const{mt:t,p:n,o:{patchProp:r,createText:f,nextSibling:u,parentNode:h,remove:g,insert:s,createComment:p}}=e,o=(A,S)=>{if(!S.hasChildNodes()){n(null,A,S),fo(),S._vnode=A;return}fn=!1,i(S.firstChild,A,null,null,null),fo(),S._vnode=A,fn&&console.error("Hydration completed but contains mismatches.")},i=(A,S,C,b,R,L=!1)=>{const E=Gi(A)&&A.data==="[",M=()=>d(A,S,C,b,R,E),{type:$,ref:k,shapeFlag:_,patchFlag:w}=S;let x=A.nodeType;S.el=A,w===-2&&(L=!1,S.dynamicChildren=null);let T=null;switch($){case Yn:x!==3?S.children===""?(s(S.el=f(""),h(A),A),T=A):T=M():(A.data!==S.children&&(fn=!0,A.data=S.children),T=u(A));break;case ut:y(A)?(T=u(A),v(S.el=A.content.firstChild,A,C)):x!==8||E?T=M():T=u(A);break;case zn:if(E&&(A=u(A),x=A.nodeType),x===1||x===3){T=A;const O=!S.children.length;for(let I=0;I<S.staticCount;I++)O&&(S.children+=T.nodeType===1?T.outerHTML:T.data),I===S.staticCount-1&&(S.anchor=T),T=u(T);return E?u(T):T}else M();break;case Re:E?T=l(A,S,C,b,R,L):T=M();break;default:if(_&1)(x!==1||S.type.toLowerCase()!==A.tagName.toLowerCase())&&!y(A)?T=M():T=a(A,S,C,b,R,L);else if(_&6){S.slotScopeIds=R;const O=h(A);if(E?T=m(A):Gi(A)&&A.data==="teleport start"?T=m(A,A.data,"teleport end"):T=u(A),t(S,O,null,C,b,ji(O),L),Un(S)){let I;E?(I=ae(Re),I.anchor=T?T.previousSibling:O.lastChild):I=A.nodeType===3?Qe(""):ae("div"),I.el=A,S.component.subTree=I}}else _&64?x!==8?T=M():T=S.type.hydrate(A,S,C,b,R,L,e,c):_&128&&(T=S.type.hydrate(A,S,C,b,ji(h(A)),R,L,e,i))}return k!=null&&go(k,null,b,S),T},a=(A,S,C,b,R,L)=>{L=L||!!S.dynamicChildren;const{type:E,props:M,patchFlag:$,shapeFlag:k,dirs:_,transition:w}=S,x=E==="input"||E==="option";if(x||$!==-1){_&&Dt(S,null,C,"created");let T=!1;if(y(A)){T=ff(b,w)&&C&&C.vnode.props&&C.vnode.props.appear;const I=A.content.firstChild;T&&w.beforeEnter(I),v(I,A,C),S.el=A=I}if(k&16&&!(M&&(M.innerHTML||M.textContent))){let I=c(A.firstChild,S,A,C,b,R,L);for(;I;){fn=!0;const F=I;I=I.nextSibling,g(F)}}else k&8&&A.textContent!==S.children&&(fn=!0,A.textContent=S.children);if(M)if(x||!L||$&48)for(const I in M)(x&&(I.endsWith("value")||I==="indeterminate")||vi(I)&&!zr(I)||I[0]===".")&&r(A,I,null,M[I],void 0,void 0,C);else M.onClick&&r(A,"onClick",null,M.onClick,void 0,void 0,C);let O;(O=M&&M.onVnodeBeforeMount)&&yt(O,C,S),_&&Dt(S,null,C,"beforeMount"),((O=M&&M.onVnodeMounted)||_||T)&&Fh(()=>{O&&yt(O,C,S),T&&w.enter(A),_&&Dt(S,null,C,"mounted")},b)}return A.nextSibling},c=(A,S,C,b,R,L,E)=>{E=E||!!S.dynamicChildren;const M=S.children,$=M.length;for(let k=0;k<$;k++){const _=E?M[k]:M[k]=St(M[k]);if(A)A=i(A,_,b,R,L,E);else{if(_.type===Yn&&!_.children)continue;fn=!0,n(null,_,C,null,b,R,ji(C),L)}}return A},l=(A,S,C,b,R,L)=>{const{slotScopeIds:E}=S;E&&(R=R?R.concat(E):E);const M=h(A),$=c(u(A),S,M,C,b,R,L);return $&&Gi($)&&$.data==="]"?u(S.anchor=$):(fn=!0,s(S.anchor=p("]"),M,$),$)},d=(A,S,C,b,R,L)=>{if(fn=!0,S.el=null,L){const $=m(A);for(;;){const k=u(A);if(k&&k!==$)g(k);else break}}const E=u(A),M=h(A);return g(A),n(null,S,M,E,C,b,ji(M),R),E},m=(A,S="[",C="]")=>{let b=0;for(;A;)if(A=u(A),A&&Gi(A)&&(A.data===S&&b++,A.data===C)){if(b===0)return u(A);b--}return A},v=(A,S,C)=>{const b=S.parentNode;b&&b.replaceChild(A,S);let R=C;for(;R;)R.vnode.el===S&&(R.vnode.el=R.subTree.el=A),R=R.parent},y=A=>A.nodeType===1&&A.tagName.toLowerCase()==="template";return[o,i]}const ot=Fh;function cf(e){return hf(e)}function uf(e){return hf(e,Ry)}function hf(e,t){const n=sh();n.__VUE__=!0;const{insert:r,remove:f,patchProp:u,createElement:h,createText:g,createComment:s,setText:p,setElementText:o,parentNode:i,nextSibling:a,setScopeId:c=pt,insertStaticContent:l}=e,d=(D,B,G,J=null,te=null,re=null,ue=void 0,le=null,he=!!B.dynamicChildren)=>{if(D===B)return;D&&!Ot(D,B)&&(J=U(D),j(D,te,re,!0),D=null),B.patchFlag===-2&&(he=!1,B.dynamicChildren=null);const{type:se,ref:pe,shapeFlag:$e}=B;switch(se){case Yn:m(D,B,G,J);break;case ut:v(D,B,G,J);break;case zn:D==null&&y(B,G,J,ue);break;case Re:k(D,B,G,J,te,re,ue,le,he);break;default:$e&1?C(D,B,G,J,te,re,ue,le,he):$e&6?_(D,B,G,J,te,re,ue,le,he):($e&64||$e&128)&&se.process(D,B,G,J,te,re,ue,le,he,Y)}pe!=null&&te&&go(pe,D&&D.ref,re,B||D,!B)},m=(D,B,G,J)=>{if(D==null)r(B.el=g(B.children),G,J);else{const te=B.el=D.el;B.children!==D.children&&p(te,B.children)}},v=(D,B,G,J)=>{D==null?r(B.el=s(B.children||""),G,J):B.el=D.el},y=(D,B,G,J)=>{[D.el,D.anchor]=l(D.children,B,G,J,D.el,D.anchor)},A=({el:D,anchor:B},G,J)=>{let te;for(;D&&D!==B;)te=a(D),r(D,G,J),D=te;r(B,G,J)},S=({el:D,anchor:B})=>{let G;for(;D&&D!==B;)G=a(D),f(D),D=G;f(B)},C=(D,B,G,J,te,re,ue,le,he)=>{B.type==="svg"?ue="svg":B.type==="math"&&(ue="mathml"),D==null?b(B,G,J,te,re,ue,le,he):E(D,B,te,re,ue,le,he)},b=(D,B,G,J,te,re,ue,le)=>{let he,se;const{props:pe,shapeFlag:$e,transition:ve,dirs:Ae}=D;if(he=D.el=h(D.type,re,pe&&pe.is,pe),$e&8?o(he,D.children):$e&16&&L(D.children,he,null,J,te,$s(D,re),ue,le),Ae&&Dt(D,null,J,"created"),R(he,D,D.scopeId,ue,J),pe){for(const ce in pe)ce!=="value"&&!zr(ce)&&u(he,ce,null,pe[ce],re,D.children,J,te,q);"value"in pe&&u(he,"value",null,pe.value,re),(se=pe.onVnodeBeforeMount)&&yt(se,J,D)}Ae&&Dt(D,null,J,"beforeMount");const Q=ff(te,ve);Q&&ve.beforeEnter(he),r(he,B,G),((se=pe&&pe.onVnodeMounted)||Q||Ae)&&ot(()=>{se&&yt(se,J,D),Q&&ve.enter(he),Ae&&Dt(D,null,J,"mounted")},te)},R=(D,B,G,J,te)=>{if(G&&c(D,G),J)for(let re=0;re<J.length;re++)c(D,J[re]);if(te){let re=te.subTree;if(B===re){const ue=te.vnode;R(D,ue,ue.scopeId,ue.slotScopeIds,te.parent)}}},L=(D,B,G,J,te,re,ue,le,he=0)=>{for(let se=he;se<D.length;se++){const pe=D[se]=le?yn(D[se]):St(D[se]);d(null,pe,B,G,J,te,re,ue,le)}},E=(D,B,G,J,te,re,ue)=>{const le=B.el=D.el;let{patchFlag:he,dynamicChildren:se,dirs:pe}=B;he|=D.patchFlag&16;const $e=D.props||Pe,ve=B.props||Pe;let Ae;if(G&&Mn(G,!1),(Ae=ve.onVnodeBeforeUpdate)&&yt(Ae,G,B,D),pe&&Dt(B,D,G,"beforeUpdate"),G&&Mn(G,!0),se?M(D.dynamicChildren,se,le,G,J,$s(B,te),re):ue||I(D,B,le,null,G,J,$s(B,te),re,!1),he>0){if(he&16)$(le,B,$e,ve,G,J,te);else if(he&2&&$e.class!==ve.class&&u(le,"class",null,ve.class,te),he&4&&u(le,"style",$e.style,ve.style,te),he&8){const Q=B.dynamicProps;for(let ce=0;ce<Q.length;ce++){const fe=Q[ce],Ce=$e[fe],Le=ve[fe];(Le!==Ce||fe==="value")&&u(le,fe,Ce,Le,te,D.children,G,J,q)}}he&1&&D.children!==B.children&&o(le,B.children)}else!ue&&se==null&&$(le,B,$e,ve,G,J,te);((Ae=ve.onVnodeUpdated)||pe)&&ot(()=>{Ae&&yt(Ae,G,B,D),pe&&Dt(B,D,G,"updated")},J)},M=(D,B,G,J,te,re,ue)=>{for(let le=0;le<B.length;le++){const he=D[le],se=B[le],pe=he.el&&(he.type===Re||!Ot(he,se)||he.shapeFlag&70)?i(he.el):G;d(he,se,pe,null,J,te,re,ue,!0)}},$=(D,B,G,J,te,re,ue)=>{if(G!==J){if(G!==Pe)for(const le in G)!zr(le)&&!(le in J)&&u(D,le,G[le],null,ue,B.children,te,re,q);for(const le in J){if(zr(le))continue;const he=J[le],se=G[le];he!==se&&le!=="value"&&u(D,le,se,he,ue,B.children,te,re,q)}"value"in J&&u(D,"value",G.value,J.value,ue)}},k=(D,B,G,J,te,re,ue,le,he)=>{const se=B.el=D?D.el:g(""),pe=B.anchor=D?D.anchor:g("");let{patchFlag:$e,dynamicChildren:ve,slotScopeIds:Ae}=B;Ae&&(le=le?le.concat(Ae):Ae),D==null?(r(se,G,J),r(pe,G,J),L(B.children,G,pe,te,re,ue,le,he)):$e>0&&$e&64&&ve&&D.dynamicChildren?(M(D.dynamicChildren,ve,G,te,re,ue,le),(B.key!=null||te&&B===te.subTree)&&ul(D,B,!0)):I(D,B,G,pe,te,re,ue,le,he)},_=(D,B,G,J,te,re,ue,le,he)=>{B.slotScopeIds=le,D==null?B.shapeFlag&512?te.ctx.activate(B,G,J,ue,he):w(B,G,J,te,re,ue,he):x(D,B,he)},w=(D,B,G,J,te,re,ue)=>{const le=D.component=wf(D,J,te);if($i(D)&&(le.ctx.renderer=Y),_f(le),le.asyncDep){if(te&&te.registerDep(le,T),!D.el){const he=le.subTree=ae(ut);v(null,he,B,G)}}else T(le,D,B,G,te,re,ue)},x=(D,B,G)=>{const J=B.component=D.component;if(Mv(D,B,G))if(J.asyncDep&&!J.asyncResolved){O(J,B,G);return}else J.next=B,Av(J.update),J.effect.dirty=!0,J.update();else B.el=D.el,J.vnode=B},T=(D,B,G,J,te,re,ue)=>{const le=()=>{if(D.isMounted){let{next:pe,bu:$e,u:ve,parent:Ae,vnode:Q}=D;{const Ne=df(D);if(Ne){pe&&(pe.el=Q.el,O(D,pe,ue)),Ne.asyncDep.then(()=>{D.isUnmounted||le()});return}}let ce=pe,fe;Mn(D,!1),pe?(pe.el=Q.el,O(D,pe,ue)):pe=Q,$e&&ur($e),(fe=pe.props&&pe.props.onVnodeBeforeUpdate)&&yt(fe,Ae,pe,Q),Mn(D,!0);const Ce=Ji(D),Le=D.subTree;D.subTree=Ce,d(Le,Ce,i(Le.el),U(Le),D,te,re),pe.el=Ce.el,ce===null&&nl(D,Ce.el),ve&&ot(ve,te),(fe=pe.props&&pe.props.onVnodeUpdated)&&ot(()=>yt(fe,Ae,pe,Q),te)}else{let pe;const{el:$e,props:ve}=B,{bm:Ae,m:Q,parent:ce}=D,fe=Un(B);if(Mn(D,!1),Ae&&ur(Ae),!fe&&(pe=ve&&ve.onVnodeBeforeMount)&&yt(pe,ce,B),Mn(D,!0),$e&&ee){const Ce=()=>{D.subTree=Ji(D),ee($e,D.subTree,D,te,null)};fe?B.type.__asyncLoader().then(()=>!D.isUnmounted&&Ce()):Ce()}else{const Ce=D.subTree=Ji(D);d(null,Ce,G,J,D,te,re),B.el=Ce.el}if(Q&&ot(Q,te),!fe&&(pe=ve&&ve.onVnodeMounted)){const Ce=B;ot(()=>yt(pe,ce,Ce),te)}(B.shapeFlag&256||ce&&Un(ce.vnode)&&ce.vnode.shapeFlag&256)&&D.a&&ot(D.a,te),D.isMounted=!0,B=G=J=null}},he=D.effect=new pr(le,pt,()=>Po(se),D.scope),se=D.update=()=>{he.dirty&&he.run()};se.id=D.uid,Mn(D,!0),se()},O=(D,B,G)=>{B.component=D;const J=D.vnode.props;D.vnode=B,D.next=null,_y(D,B.props,J,G),Ay(D,B.children,G),Qn(),gc(D),er()},I=(D,B,G,J,te,re,ue,le,he=!1)=>{const se=D&&D.children,pe=D?D.shapeFlag:0,$e=B.children,{patchFlag:ve,shapeFlag:Ae}=B;if(ve>0){if(ve&128){P(se,$e,G,J,te,re,ue,le,he);return}else if(ve&256){F(se,$e,G,J,te,re,ue,le,he);return}}Ae&8?(pe&16&&q(se,te,re),$e!==se&&o(G,$e)):pe&16?Ae&16?P(se,$e,G,J,te,re,ue,le,he):q(se,te,re,!0):(pe&8&&o(G,""),Ae&16&&L($e,G,J,te,re,ue,le,he))},F=(D,B,G,J,te,re,ue,le,he)=>{D=D||lr,B=B||lr;const se=D.length,pe=B.length,$e=Math.min(se,pe);let ve;for(ve=0;ve<$e;ve++){const Ae=B[ve]=he?yn(B[ve]):St(B[ve]);d(D[ve],Ae,G,null,te,re,ue,le,he)}se>pe?q(D,te,re,!0,!1,$e):L(B,G,J,te,re,ue,le,he,$e)},P=(D,B,G,J,te,re,ue,le,he)=>{let se=0;const pe=B.length;let $e=D.length-1,ve=pe-1;for(;se<=$e&&se<=ve;){const Ae=D[se],Q=B[se]=he?yn(B[se]):St(B[se]);if(Ot(Ae,Q))d(Ae,Q,G,null,te,re,ue,le,he);else break;se++}for(;se<=$e&&se<=ve;){const Ae=D[$e],Q=B[ve]=he?yn(B[ve]):St(B[ve]);if(Ot(Ae,Q))d(Ae,Q,G,null,te,re,ue,le,he);else break;$e--,ve--}if(se>$e){if(se<=ve){const Ae=ve+1,Q=Ae<pe?B[Ae].el:J;for(;se<=ve;)d(null,B[se]=he?yn(B[se]):St(B[se]),G,Q,te,re,ue,le,he),se++}}else if(se>ve)for(;se<=$e;)j(D[se],te,re,!0),se++;else{const Ae=se,Q=se,ce=new Map;for(se=Q;se<=ve;se++){const xe=B[se]=he?yn(B[se]):St(B[se]);xe.key!=null&&ce.set(xe.key,se)}let fe,Ce=0;const Le=ve-Q+1;let Ne=!1,Xe=0;const Be=new Array(Le);for(se=0;se<Le;se++)Be[se]=0;for(se=Ae;se<=$e;se++){const xe=D[se];if(Ce>=Le){j(xe,te,re,!0);continue}let ze;if(xe.key!=null)ze=ce.get(xe.key);else for(fe=Q;fe<=ve;fe++)if(Be[fe-Q]===0&&Ot(xe,B[fe])){ze=fe;break}ze===void 0?j(xe,te,re,!0):(Be[ze-Q]=se+1,ze>=Xe?Xe=ze:Ne=!0,d(xe,B[ze],G,null,te,re,ue,le,he),Ce++)}const He=Ne?xy(Be):lr;for(fe=He.length-1,se=Le-1;se>=0;se--){const xe=Q+se,ze=B[xe],cn=xe+1<pe?B[xe+1].el:J;Be[se]===0?d(null,ze,G,cn,te,re,ue,le,he):Ne&&(fe<0||se!==He[fe]?W(ze,G,cn,2):fe--)}}},W=(D,B,G,J,te=null)=>{const{el:re,type:ue,transition:le,children:he,shapeFlag:se}=D;if(se&6){W(D.component.subTree,B,G,J);return}if(se&128){D.suspense.move(B,G,J);return}if(se&64){ue.move(D,B,G,Y);return}if(ue===Re){r(re,B,G);for(let $e=0;$e<he.length;$e++)W(he[$e],B,G,J);r(D.anchor,B,G);return}if(ue===zn){A(D,B,G);return}if(J!==2&&se&1&&le)if(J===0)le.beforeEnter(re),r(re,B,G),ot(()=>le.enter(re),te);else{const{leave:$e,delayLeave:ve,afterLeave:Ae}=le,Q=()=>r(re,B,G),ce=()=>{$e(re,()=>{Q(),Ae&&Ae()})};ve?ve(re,Q,ce):ce()}else r(re,B,G)},j=(D,B,G,J=!1,te=!1)=>{const{type:re,props:ue,ref:le,children:he,dynamicChildren:se,shapeFlag:pe,patchFlag:$e,dirs:ve}=D;if(le!=null&&go(le,null,G,D,!0),pe&256){B.ctx.deactivate(D);return}const Ae=pe&1&&ve,Q=!Un(D);let ce;if(Q&&(ce=ue&&ue.onVnodeBeforeUnmount)&&yt(ce,B,D),pe&6)K(D.component,G,J);else{if(pe&128){D.suspense.unmount(G,J);return}Ae&&Dt(D,null,B,"beforeUnmount"),pe&64?D.type.remove(D,B,G,te,Y,J):se&&(re!==Re||$e>0&&$e&64)?q(se,B,G,!1,!0):(re===Re&&$e&384||!te&&pe&16)&&q(he,B,G),J&&H(D)}(Q&&(ce=ue&&ue.onVnodeUnmounted)||Ae)&&ot(()=>{ce&&yt(ce,B,D),Ae&&Dt(D,null,B,"unmounted")},G)},H=D=>{const{type:B,el:G,anchor:J,transition:te}=D;if(B===Re){z(G,J);return}if(B===zn){S(D);return}const re=()=>{f(G),te&&!te.persisted&&te.afterLeave&&te.afterLeave()};if(D.shapeFlag&1&&te&&!te.persisted){const{leave:ue,delayLeave:le}=te,he=()=>ue(G,re);le?le(D.el,re,he):he()}else re()},z=(D,B)=>{let G;for(;D!==B;)G=a(D),f(D),D=G;f(B)},K=(D,B,G)=>{const{bum:J,scope:te,update:re,subTree:ue,um:le}=D;J&&ur(J),te.stop(),re&&(re.active=!1,j(ue,D,B,G)),le&&ot(le,B),ot(()=>{D.isUnmounted=!0},B),B&&B.pendingBranch&&!B.isUnmounted&&D.asyncDep&&!D.asyncResolved&&D.suspenseId===B.pendingId&&(B.deps--,B.deps===0&&B.resolve())},q=(D,B,G,J=!1,te=!1,re=0)=>{for(let ue=re;ue<D.length;ue++)j(D[ue],B,G,J,te)},U=D=>D.shapeFlag&6?U(D.component.subTree):D.shapeFlag&128?D.suspense.next():a(D.anchor||D.el),X=(D,B,G)=>{D==null?B._vnode&&j(B._vnode,null,null,!0):d(B._vnode||null,D,B,null,null,null,G),gc(),fo(),B._vnode=D},Y={p:d,um:j,m:W,r:H,mt:w,mc:L,pc:I,pbc:M,n:U,o:e};let V,ee;return t&&([V,ee]=t(Y)),{render:X,hydrate:V,createApp:by(X,V)}}function $s({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Mn({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ff(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ul(e,t,n=!1){const r=e.children,f=t.children;if(me(r)&&me(f))for(let u=0;u<r.length;u++){const h=r[u];let g=f[u];g.shapeFlag&1&&!g.dynamicChildren&&((g.patchFlag<=0||g.patchFlag===32)&&(g=f[u]=yn(f[u]),g.el=h.el),n||ul(h,g)),g.type===Yn&&(g.el=h.el)}}function xy(e){const t=e.slice(),n=[0];let r,f,u,h,g;const s=e.length;for(r=0;r<s;r++){const p=e[r];if(p!==0){if(f=n[n.length-1],e[f]<p){t[r]=f,n.push(r);continue}for(u=0,h=n.length-1;u<h;)g=u+h>>1,e[n[g]]<p?u=g+1:h=g;p<e[n[u]]&&(u>0&&(t[r]=n[u-1]),n[u]=r)}}for(u=n.length,h=n[u-1];u-- >0;)n[u]=h,h=t[h];return n}function df(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:df(t)}const Ty=e=>e.__isTeleport,Kr=e=>e&&(e.disabled||e.disabled===""),Ec=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Rc=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ia=(e,t)=>{const n=e&&e.to;return Ke(n)?t?t(n):null:n},Ly={name:"Teleport",__isTeleport:!0,process(e,t,n,r,f,u,h,g,s,p){const{mc:o,pc:i,pbc:a,o:{insert:c,querySelector:l,createText:d,createComment:m}}=p,v=Kr(t.props);let{shapeFlag:y,children:A,dynamicChildren:S}=t;if(e==null){const C=t.el=d(""),b=t.anchor=d("");c(C,n,r),c(b,n,r);const R=t.target=ia(t.props,l),L=t.targetAnchor=d("");R&&(c(L,R),h==="svg"||Ec(R)?h="svg":(h==="mathml"||Rc(R))&&(h="mathml"));const E=(M,$)=>{y&16&&o(A,M,$,f,u,h,g,s)};v?E(n,b):R&&E(R,L)}else{t.el=e.el;const C=t.anchor=e.anchor,b=t.target=e.target,R=t.targetAnchor=e.targetAnchor,L=Kr(e.props),E=L?n:b,M=L?C:R;if(h==="svg"||Ec(b)?h="svg":(h==="mathml"||Rc(b))&&(h="mathml"),S?(a(e.dynamicChildren,S,E,f,u,h,g),ul(e,t,!0)):s||i(e,t,E,M,f,u,h,g,!1),v)L?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ki(t,n,C,p,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $=t.target=ia(t.props,l);$&&Ki(t,$,null,p,0)}else L&&Ki(t,b,R,p,1)}pf(t)},remove(e,t,n,r,{um:f,o:{remove:u}},h){const{shapeFlag:g,children:s,anchor:p,targetAnchor:o,target:i,props:a}=e;if(i&&u(o),h&&u(p),g&16){const c=h||!Kr(a);for(let l=0;l<s.length;l++){const d=s[l];f(d,t,n,c,!!d.dynamicChildren)}}},move:Ki,hydrate:My};function Ki(e,t,n,{o:{insert:r},m:f},u=2){u===0&&r(e.targetAnchor,t,n);const{el:h,anchor:g,shapeFlag:s,children:p,props:o}=e,i=u===2;if(i&&r(h,t,n),(!i||Kr(o))&&s&16)for(let a=0;a<p.length;a++)f(p[a],t,n,2);i&&r(g,t,n)}function My(e,t,n,r,f,u,{o:{nextSibling:h,parentNode:g,querySelector:s}},p){const o=t.target=ia(t.props,s);if(o){const i=o._lpa||o.firstChild;if(t.shapeFlag&16)if(Kr(t.props))t.anchor=p(h(e),t,g(e),n,r,f,u),t.targetAnchor=i;else{t.anchor=h(e);let a=i;for(;a;)if(a=h(a),a&&a.nodeType===8&&a.data==="teleport anchor"){t.targetAnchor=a,o._lpa=t.targetAnchor&&h(t.targetAnchor);break}p(i,t,o,n,r,f,u)}pf(t)}return t.anchor&&h(t.anchor)}const Oy=Ly;function pf(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Re=Symbol.for("v-fgt"),Yn=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),zn=Symbol.for("v-stc"),Yr=[];let bt=null;function Z(e=!1){Yr.push(bt=e?null:[])}function gf(){Yr.pop(),bt=Yr[Yr.length-1]||null}let Xn=1;function oa(e){Xn+=e}function mf(e){return e.dynamicChildren=Xn>0?bt||lr:null,gf(),Xn>0&&bt&&bt.push(e),e}function ie(e,t,n,r,f,u){return mf(N(e,t,n,r,f,u,!0))}function _e(e,t,n,r,f){return mf(ae(e,t,n,r,f,!0))}function Rn(e){return e?e.__v_isVNode===!0:!1}function Ot(e,t){return e.type===t.type&&e.key===t.key}function Iy(e){}const Yo="__vInternal",vf=({key:e})=>e??null,Qi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ke(e)||at(e)||Ee(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function N(e,t=null,n=null,r=0,f=null,u=e===Re?0:1,h=!1,g=!1){const s={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vf(t),ref:t&&Qi(t),scopeId:Wo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:r,dynamicProps:f,dynamicChildren:null,appContext:null,ctx:nt};return g?(hl(s,n),u&128&&e.normalize(s)):n&&(s.shapeFlag|=Ke(n)?8:16),Xn>0&&!h&&bt&&(s.patchFlag>0||u&6)&&s.patchFlag!==32&&bt.push(s),s}const ae=Fy;function Fy(e,t=null,n=null,r=0,f=null,u=!1){if((!e||e===Oh)&&(e=ut),Rn(e)){const g=Ut(e,t,!0);return n&&hl(g,n),Xn>0&&!u&&bt&&(g.shapeFlag&6?bt[bt.indexOf(e)]=g:bt.push(g)),g.patchFlag|=-2,g}if(Uy(e)&&(e=e.__vccOpts),t){t=yf(t);let{class:g,style:s}=t;g&&!Ke(g)&&(t.class=kr(g)),We(s)&&(qa(s)&&!me(s)&&(s=Ge({},s)),t.style=yi(s))}const h=Ke(e)?1:Ih(e)?128:Ty(e)?64:We(e)?4:Ee(e)?2:0;return N(e,t,n,r,f,h,u,!0)}function yf(e){return e?qa(e)||Yo in e?Ge({},e):e:null}function Ut(e,t,n=!1){const{props:r,ref:f,patchFlag:u,children:h}=e,g=t?bf(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&vf(g),ref:t&&t.ref?n&&f?me(f)?f.concat(Qi(t)):[f,Qi(t)]:Qi(t):f,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:h,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Re?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ut(e.ssContent),ssFallback:e.ssFallback&&Ut(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Qe(e=" ",t=0){return ae(Yn,null,e,t)}function Xo(e,t){const n=ae(zn,null,e);return n.staticCount=t,n}function de(e="",t=!1){return t?(Z(),_e(ut,null,e)):ae(ut,null,e)}function St(e){return e==null||typeof e=="boolean"?ae(ut):me(e)?ae(Re,null,e.slice()):typeof e=="object"?yn(e):ae(Yn,null,String(e))}function yn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ut(e)}function hl(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(me(t))n=16;else if(typeof t=="object")if(r&65){const f=t.default;f&&(f._c&&(f._d=!1),hl(e,f()),f._c&&(f._d=!0));return}else{n=32;const f=t._;!f&&!(Yo in t)?t._ctx=nt:f===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ee(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),r&64?(n=16,t=[Qe(t)]):n=8);e.children=t,e.shapeFlag|=n}function bf(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const f in r)if(f==="class")t.class!==r.class&&(t.class=kr([t.class,r.class]));else if(f==="style")t.style=yi([t.style,r.style]);else if(vi(f)){const u=t[f],h=r[f];h&&u!==h&&!(me(u)&&u.includes(h))&&(t[f]=u?[].concat(u,h):h)}else f!==""&&(t[f]=r[f])}return t}function yt(e,t,n,r=null){At(e,t,7,[n,r])}const Ny=nf();let Dy=0;function wf(e,t,n){const r=e.type,f=(t?t.appContext:e.appContext)||Ny,u={uid:Dy++,vnode:e,type:r,parent:t,appContext:f,root:null,next:null,subTree:null,effect:null,update:null,scope:new ja(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(f.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:of(r,f),emitsOptions:Mh(r,f),emit:null,emitted:null,propsDefaults:Pe,inheritAttrs:r.inheritAttrs,ctx:Pe,data:Pe,props:Pe,attrs:Pe,slots:Pe,refs:Pe,setupState:Pe,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return u.ctx={_:u},u.root=t?t.root:u,u.emit=Ev.bind(null,u),e.ce&&e.ce(u),u}let et=null;const Mt=()=>et||nt;let fl,sa;{const e=sh(),t=(n,r)=>{let f;return(f=e[n])||(f=e[n]=[]),f.push(r),u=>{f.length>1?f.forEach(h=>h(u)):f[0](u)}};fl=t("__VUE_INSTANCE_SETTERS__",n=>et=n),sa=t("__VUE_SSR_SETTERS__",n=>_i=n)}const xn=e=>{fl(e),e.scope.on()},_n=()=>{et&&et.scope.off(),fl(null)};function $f(e){return e.vnode.shapeFlag&4}let _i=!1;function _f(e,t=!1){t&&sa(t);const{props:n,children:r}=e.vnode,f=$f(e);$y(e,n,f,t),Cy(e,r);const u=f?Py(e,t):void 0;return t&&sa(!1),u}function Py(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Fo(new Proxy(e.ctx,ea));const{setup:r}=n;if(r){const f=e.setupContext=r.length>1?Cf(e):null;xn(e),Qn();const u=Qt(r,e,0,[e.props,f]);if(er(),_n(),za(u)){if(u.then(_n,_n),t)return u.then(h=>{aa(e,h,t)}).catch(h=>{tr(h,e,0)});e.asyncDep=u}else aa(e,u,t)}else Sf(e,t)}function aa(e,t,n){Ee(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:We(t)&&(e.setupState=el(t)),Sf(e,n)}let mo,la;function By(e){mo=e,la=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Jv))}}const Wy=()=>!mo;function Sf(e,t,n){const r=e.type;if(!e.render){if(!t&&mo&&!r.render){const f=r.template||ll(e).template;if(f){const{isCustomElement:u,compilerOptions:h}=e.appContext.config,{delimiters:g,compilerOptions:s}=r,p=Ge(Ge({isCustomElement:u,delimiters:g},h),s);r.render=mo(f,p)}}e.render=r.render||pt,la&&la(e)}{xn(e),Qn();try{dy(e)}finally{er(),_n()}}}function Hy(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return wt(e,"get","$attrs"),t[n]}}))}function Cf(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Hy(e)},slots:e.slots,emit:e.emit,expose:t}}function Zo(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(el(Fo(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in jr)return jr[n](e)},has(t,n){return n in t||n in jr}}))}function ca(e,t=!0){return Ee(e)?e.displayName||e.name:e.name||t&&e.__name}function Uy(e){return Ee(e)&&"__vccOpts"in e}const ke=(e,t)=>cv(e,t,_i);function xr(e,t,n){const r=arguments.length;return r===2?We(t)&&!me(t)?Rn(t)?ae(e,null,[t]):ae(e,t):ae(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Rn(n)&&(n=[n]),ae(e,t,n))}function zy(){}function Vy(e,t,n,r){const f=n[r];if(f&&Af(f,e))return f;const u=t();return u.memo=e.slice(),n[r]=u}function Af(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Ft(n[r],t[r]))return!1;return Xn>0&&bt&&bt.push(e),!0}const kf="3.4.5",jy=pt,Gy=_v,Ky=void 0,Yy=pt,Xy={createComponentInstance:wf,setupComponent:_f,renderComponentRoot:Ji,setCurrentRenderingInstance:li,isVNode:Rn,normalizeVNode:St},Zy=Xy,qy=null,Jy=null,Qy=null,e0="http://www.w3.org/2000/svg",t0="http://www.w3.org/1998/Math/MathML",bn=typeof document<"u"?document:null,xc=bn&&bn.createElement("template"),n0={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const f=t==="svg"?bn.createElementNS(e0,e):t==="mathml"?bn.createElementNS(t0,e):bn.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&f.setAttribute("multiple",r.multiple),f},createText:e=>bn.createTextNode(e),createComment:e=>bn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>bn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,f,u){const h=n?n.previousSibling:t.lastChild;if(f&&(f===u||f.nextSibling))for(;t.insertBefore(f.cloneNode(!0),n),!(f===u||!(f=f.nextSibling)););else{xc.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const g=xc.content;if(r==="svg"||r==="mathml"){const s=g.firstChild;for(;s.firstChild;)g.appendChild(s.firstChild);g.removeChild(s)}t.insertBefore(g,n)}return[h?h.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},dn="transition",Or="animation",mr=Symbol("_vtc"),dl=(e,{slots:t})=>xr(Uh,Rf(e),t);dl.displayName="Transition";const Ef={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},r0=dl.props=Ge({},al,Ef),On=(e,t=[])=>{me(e)?e.forEach(n=>n(...t)):e&&e(...t)},Tc=e=>e?me(e)?e.some(t=>t.length>1):e.length>1:!1;function Rf(e){const t={};for(const k in e)k in Ef||(t[k]=e[k]);if(e.css===!1)return t;const{name:n="v",type:r,duration:f,enterFromClass:u=`${n}-enter-from`,enterActiveClass:h=`${n}-enter-active`,enterToClass:g=`${n}-enter-to`,appearFromClass:s=u,appearActiveClass:p=h,appearToClass:o=g,leaveFromClass:i=`${n}-leave-from`,leaveActiveClass:a=`${n}-leave-active`,leaveToClass:c=`${n}-leave-to`}=e,l=i0(f),d=l&&l[0],m=l&&l[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:A,onLeave:S,onLeaveCancelled:C,onBeforeAppear:b=v,onAppear:R=y,onAppearCancelled:L=A}=t,E=(k,_,w)=>{mn(k,_?o:g),mn(k,_?p:h),w&&w()},M=(k,_)=>{k._isLeaving=!1,mn(k,i),mn(k,c),mn(k,a),_&&_()},$=k=>(_,w)=>{const x=k?R:y,T=()=>E(_,k,w);On(x,[_,T]),Lc(()=>{mn(_,k?s:u),Gt(_,k?o:g),Tc(x)||Mc(_,r,d,T)})};return Ge(t,{onBeforeEnter(k){On(v,[k]),Gt(k,u),Gt(k,h)},onBeforeAppear(k){On(b,[k]),Gt(k,s),Gt(k,p)},onEnter:$(!1),onAppear:$(!0),onLeave(k,_){k._isLeaving=!0;const w=()=>M(k,_);Gt(k,i),Tf(),Gt(k,a),Lc(()=>{k._isLeaving&&(mn(k,i),Gt(k,c),Tc(S)||Mc(k,r,m,w))}),On(S,[k,w])},onEnterCancelled(k){E(k,!1),On(A,[k])},onAppearCancelled(k){E(k,!0),On(L,[k])},onLeaveCancelled(k){M(k),On(C,[k])}})}function i0(e){if(e==null)return null;if(We(e))return[_s(e.enter),_s(e.leave)];{const t=_s(e);return[t,t]}}function _s(e){return co(e)}function Gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[mr]||(e[mr]=new Set)).add(t)}function mn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[mr];n&&(n.delete(t),n.size||(e[mr]=void 0))}function Lc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let o0=0;function Mc(e,t,n,r){const f=e._endId=++o0,u=()=>{f===e._endId&&r()};if(n)return setTimeout(u,n);const{type:h,timeout:g,propCount:s}=xf(e,t);if(!h)return r();const p=h+"end";let o=0;const i=()=>{e.removeEventListener(p,a),u()},a=c=>{c.target===e&&++o>=s&&i()};setTimeout(()=>{o<s&&i()},g+1),e.addEventListener(p,a)}function xf(e,t){const n=window.getComputedStyle(e),r=l=>(n[l]||"").split(", "),f=r(`${dn}Delay`),u=r(`${dn}Duration`),h=Oc(f,u),g=r(`${Or}Delay`),s=r(`${Or}Duration`),p=Oc(g,s);let o=null,i=0,a=0;t===dn?h>0&&(o=dn,i=h,a=u.length):t===Or?p>0&&(o=Or,i=p,a=s.length):(i=Math.max(h,p),o=i>0?h>p?dn:Or:null,a=o?o===dn?u.length:s.length:0);const c=o===dn&&/\b(transform|all)(,|$)/.test(r(`${dn}Property`).toString());return{type:o,timeout:i,propCount:a,hasTransform:c}}function Oc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ic(n)+Ic(e[r])))}function Ic(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Tf(){return document.body.offsetHeight}function s0(e,t,n){const r=e[mr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const pl=Symbol("_vod"),Lf={beforeMount(e,{value:t},{transition:n}){e[pl]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ir(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ir(e,!0),r.enter(e)):r.leave(e,()=>{Ir(e,!1)}):Ir(e,t))},beforeUnmount(e,{value:t}){Ir(e,t)}};function Ir(e,t){e.style.display=t?e[pl]:"none"}function a0(){Lf.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Mf=Symbol("");function l0(e){const t=Mt();if(!t)return;const n=t.ut=(f=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(u=>ha(u,f))},r=()=>{const f=e(t.proxy);ua(t.subTree,f),n(f)};Bh(r),Ye(()=>{const f=new MutationObserver(r);f.observe(t.subTree.el.parentNode,{childList:!0}),Ko(()=>f.disconnect())})}function ua(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ua(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ha(e.el,t);else if(e.type===Re)e.children.forEach(n=>ua(n,t));else if(e.type===zn){let{el:n,anchor:r}=e;for(;n&&(ha(n,t),n!==r);)n=n.nextSibling}}function ha(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const f in t)n.setProperty(`--${f}`,t[f]),r+=`--${f}: ${t[f]};`;n[Mf]=r}}function c0(e,t,n){const r=e.style,f=Ke(n);if(n&&!f){if(t&&!Ke(t))for(const u in t)n[u]==null&&fa(r,u,"");for(const u in n)fa(r,u,n[u])}else{const u=r.display;if(f){if(t!==n){const h=r[Mf];h&&(n+=";"+h),r.cssText=n}}else t&&e.removeAttribute("style");pl in e&&(r.display=u)}}const Fc=/\s*!important$/;function fa(e,t,n){if(me(n))n.forEach(r=>fa(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=u0(e,t);Fc.test(n)?e.setProperty(Ct(r),n.replace(Fc,""),"important"):e[r]=n}}const Nc=["Webkit","Moz","ms"],Ss={};function u0(e,t){const n=Ss[t];if(n)return n;let r=gt(t);if(r!=="filter"&&r in e)return Ss[t]=r;r=Ar(r);for(let f=0;f<Nc.length;f++){const u=Nc[f]+r;if(u in e)return Ss[t]=u}return t}const Dc="http://www.w3.org/1999/xlink";function h0(e,t,n,r,f){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Dc,t.slice(6,t.length)):e.setAttributeNS(Dc,t,n);else{const u=Pm(t);n==null||u&&!ah(n)?e.removeAttribute(t):e.setAttribute(t,u?"":n)}}function f0(e,t,n,r,f,u,h){if(t==="innerHTML"||t==="textContent"){r&&h(r,f,u),e[t]=n??"";return}const g=e.tagName;if(t==="value"&&g!=="PROGRESS"&&!g.includes("-")){e._value=n;const p=g==="OPTION"?e.getAttribute("value"):e.value,o=n??"";p!==o&&(e.value=o),n==null&&e.removeAttribute(t);return}let s=!1;if(n===""||n==null){const p=typeof e[t];p==="boolean"?n=ah(n):n==null&&p==="string"?(n="",s=!0):p==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(t)}function Yt(e,t,n,r){e.addEventListener(t,n,r)}function d0(e,t,n,r){e.removeEventListener(t,n,r)}const Pc=Symbol("_vei");function p0(e,t,n,r,f=null){const u=e[Pc]||(e[Pc]={}),h=u[t];if(r&&h)h.value=r;else{const[g,s]=g0(t);if(r){const p=u[t]=y0(r,f);Yt(e,g,p,s)}else h&&(d0(e,g,h,s),u[t]=void 0)}}const Bc=/(?:Once|Passive|Capture)$/;function g0(e){let t;if(Bc.test(e)){t={};let r;for(;r=e.match(Bc);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ct(e.slice(2)),t]}let Cs=0;const m0=Promise.resolve(),v0=()=>Cs||(m0.then(()=>Cs=0),Cs=Date.now());function y0(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;At(b0(r,n.value),t,5,[r])};return n.value=e,n.attached=v0(),n}function b0(e,t){if(me(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>f=>!f._stopped&&r&&r(f))}else return t}const Wc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,w0=(e,t,n,r,f,u,h,g,s)=>{const p=f==="svg";t==="class"?s0(e,r,p):t==="style"?c0(e,n,r):vi(t)?Ha(t)||p0(e,t,n,r,h):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$0(e,t,r,p))?f0(e,t,r,u,h,g,s):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),h0(e,t,r,p))};function $0(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Wc(t)&&Ee(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const f=e.tagName;if(f==="IMG"||f==="VIDEO"||f==="CANVAS"||f==="SOURCE")return!1}return Wc(t)&&Ke(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function Of(e,t){const n=be(e);class r extends qo{constructor(u){super(n,u,t)}}return r.def=n,r}/*! #__NO_SIDE_EFFECTS__ */const _0=e=>Of(e,Vf),S0=typeof HTMLElement<"u"?HTMLElement:class{};class qo extends S0{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),bi(()=>{this._connected||(da(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const f of r)this._setAttr(f.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,f=!1)=>{const{props:u,styles:h}=r;let g;if(u&&!me(u))for(const s in u){const p=u[s];(p===Number||p&&p.type===Number)&&(s in this._props&&(this._props[s]=co(this._props[s])),(g||(g=Object.create(null)))[gt(s)]=!0)}this._numberProps=g,f&&this._resolveProps(r),this._applyStyles(h),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=me(n)?n:Object.keys(n||{});for(const f of Object.keys(this))f[0]!=="_"&&r.includes(f)&&this._setProp(f,this[f],!0,!1);for(const f of r.map(gt))Object.defineProperty(this,f,{get(){return this._getProp(f)},set(u){this._setProp(f,u)}})}_setAttr(t){let n=this.getAttribute(t);const r=gt(t);this._numberProps&&this._numberProps[r]&&(n=co(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,f=!0){n!==this._props[t]&&(this._props[t]=n,f&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Ct(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ct(t),n+""):n||this.removeAttribute(Ct(t))))}_update(){da(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ae(this._def,Ge({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(u,h)=>{this.dispatchEvent(new CustomEvent(u,{detail:h}))};n.emit=(u,...h)=>{r(u,h),Ct(u)!==u&&r(Ct(u),h)};let f=this;for(;f=f&&(f.parentNode||f.host);)if(f instanceof qo){n.parent=f._instance,n.provides=f._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function C0(e="$style"){{const t=Mt();if(!t)return Pe;const n=t.type.__cssModules;if(!n)return Pe;const r=n[e];return r||Pe}}const If=new WeakMap,Ff=new WeakMap,vo=Symbol("_moveCb"),Hc=Symbol("_enterCb"),Nf={name:"TransitionGroup",props:Ge({},r0,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Mt(),r=sl();let f,u;return Go(()=>{if(!f.length)return;const h=e.moveClass||`${e.name||"v"}-move`;if(!T0(f[0].el,n.vnode.el,h))return;f.forEach(E0),f.forEach(R0);const g=f.filter(x0);Tf(),g.forEach(s=>{const p=s.el,o=p.style;Gt(p,h),o.transform=o.webkitTransform=o.transitionDuration="";const i=p[vo]=a=>{a&&a.target!==p||(!a||/transform$/.test(a.propertyName))&&(p.removeEventListener("transitionend",i),p[vo]=null,mn(p,h))};p.addEventListener("transitionend",i)})}),()=>{const h=Me(e),g=Rf(h);let s=h.tag||Re;f=u,u=t.default?Vo(t.default()):[];for(let p=0;p<u.length;p++){const o=u[p];o.key!=null&&Kn(o,gr(o,g,r,n))}if(f)for(let p=0;p<f.length;p++){const o=f[p];Kn(o,gr(o,g,r,n)),If.set(o,o.el.getBoundingClientRect())}return ae(s,null,u)}}},A0=e=>delete e.mode;Nf.props;const k0=Nf;function E0(e){const t=e.el;t[vo]&&t[vo](),t[Hc]&&t[Hc]()}function R0(e){Ff.set(e,e.el.getBoundingClientRect())}function x0(e){const t=If.get(e),n=Ff.get(e),r=t.left-n.left,f=t.top-n.top;if(r||f){const u=e.el.style;return u.transform=u.webkitTransform=`translate(${r}px,${f}px)`,u.transitionDuration="0s",e}}function T0(e,t,n){const r=e.cloneNode(),f=e[mr];f&&f.forEach(g=>{g.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(g=>g&&r.classList.add(g)),r.style.display="none";const u=t.nodeType===1?t:t.parentNode;u.appendChild(r);const{hasTransform:h}=xf(r);return u.removeChild(r),h}const Tn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return me(t)?n=>ur(t,n):t};function L0(e){e.target.composing=!0}function Uc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tt=Symbol("_assign"),Zn={created(e,{modifiers:{lazy:t,trim:n,number:r}},f){e[Tt]=Tn(f);const u=r||f.props&&f.props.type==="number";Yt(e,t?"change":"input",h=>{if(h.target.composing)return;let g=e.value;n&&(g=g.trim()),u&&(g=lo(g)),e[Tt](g)}),n&&Yt(e,"change",()=>{e.value=e.value.trim()}),t||(Yt(e,"compositionstart",L0),Yt(e,"compositionend",Uc),Yt(e,"change",Uc))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:f}},u){if(e[Tt]=Tn(u),e.composing)return;const h=f||e.type==="number"?lo(e.value):e.value,g=t??"";h!==g&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===g)||(e.value=g))}},gl={deep:!0,created(e,t,n){e[Tt]=Tn(n),Yt(e,"change",()=>{const r=e._modelValue,f=vr(e),u=e.checked,h=e[Tt];if(me(r)){const g=To(r,f),s=g!==-1;if(u&&!s)h(r.concat(f));else if(!u&&s){const p=[...r];p.splice(g,1),h(p)}}else if(Jn(r)){const g=new Set(r);u?g.add(f):g.delete(f),h(g)}else h(Pf(e,u))})},mounted:zc,beforeUpdate(e,t,n){e[Tt]=Tn(n),zc(e,t,n)}};function zc(e,{value:t,oldValue:n},r){e._modelValue=t,me(t)?e.checked=To(t,r.props.value)>-1:Jn(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=En(t,Pf(e,!0)))}const ml={created(e,{value:t},n){e.checked=En(t,n.props.value),e[Tt]=Tn(n),Yt(e,"change",()=>{e[Tt](vr(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Tt]=Tn(r),t!==n&&(e.checked=En(t,r.props.value))}},Df={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const f=Jn(t);Yt(e,"change",()=>{const u=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?lo(vr(h)):vr(h));e[Tt](e.multiple?f?new Set(u):u:u[0])}),e[Tt]=Tn(r)},mounted(e,{value:t}){Vc(e,t)},beforeUpdate(e,t,n){e[Tt]=Tn(n)},updated(e,{value:t}){Vc(e,t)}};function Vc(e,t){const n=e.multiple;if(!(n&&!me(t)&&!Jn(t))){for(let r=0,f=e.options.length;r<f;r++){const u=e.options[r],h=vr(u);if(n)me(t)?u.selected=To(t,h)>-1:u.selected=t.has(h);else if(En(vr(u),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function vr(e){return"_value"in e?e._value:e.value}function Pf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Bf={created(e,t,n){Yi(e,t,n,null,"created")},mounted(e,t,n){Yi(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Yi(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Yi(e,t,n,r,"updated")}};function Wf(e,t){switch(e){case"SELECT":return Df;case"TEXTAREA":return Zn;default:switch(t){case"checkbox":return gl;case"radio":return ml;default:return Zn}}}function Yi(e,t,n,r,f){const h=Wf(e.tagName,n.props&&n.props.type)[f];h&&h(e,t,n,r)}function M0(){Zn.getSSRProps=({value:e})=>({value:e}),ml.getSSRProps=({value:e},t)=>{if(t.props&&En(t.props.value,e))return{checked:!0}},gl.getSSRProps=({value:e},t)=>{if(me(e)){if(t.props&&To(e,t.props.value)>-1)return{checked:!0}}else if(Jn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Bf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Wf(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const O0=["ctrl","shift","alt","meta"],I0={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>O0.some(n=>e[`${n}Key`]&&!t.includes(n))},F0=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(f,...u)=>{for(let h=0;h<t.length;h++){const g=I0[t[h]];if(g&&g(f,t))return}return e(f,...u)})},N0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},D0=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=f=>{if(!("key"in f))return;const u=Ct(f.key);if(t.some(h=>h===u||N0[h]===u))return e(f)})},Hf=Ge({patchProp:w0},n0);let Xr,jc=!1;function Uf(){return Xr||(Xr=cf(Hf))}function zf(){return Xr=jc?Xr:uf(Hf),jc=!0,Xr}const da=(...e)=>{Uf().render(...e)},Vf=(...e)=>{zf().hydrate(...e)},jf=(...e)=>{const t=Uf().createApp(...e),{mount:n}=t;return t.mount=r=>{const f=Kf(r);if(!f)return;const u=t._component;!Ee(u)&&!u.render&&!u.template&&(u.template=f.innerHTML),f.innerHTML="";const h=n(f,!1,Gf(f));return f instanceof Element&&(f.removeAttribute("v-cloak"),f.setAttribute("data-v-app","")),h},t},P0=(...e)=>{const t=zf().createApp(...e),{mount:n}=t;return t.mount=r=>{const f=Kf(r);if(f)return n(f,!0,Gf(f))},t};function Gf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Kf(e){return Ke(e)?document.querySelector(e):e}let Gc=!1;const B0=()=>{Gc||(Gc=!0,M0(),a0())},W0=()=>{},H0=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Uh,BaseTransitionPropsValidators:al,Comment:ut,DeprecationTypes:Qy,EffectScope:ja,ErrorCodes:$v,ErrorTypeStrings:Gy,Fragment:Re,KeepAlive:Kv,ReactiveEffect:pr,Static:zn,Suspense:Dv,Teleport:Oy,Text:Yn,TrackOpTypes:yv,Transition:dl,TransitionGroup:k0,TriggerOpTypes:bv,VueElement:qo,assertNumber:wv,callWithAsyncErrorHandling:At,callWithErrorHandling:Qt,camelize:gt,capitalize:Ar,cloneVNode:Ut,compatUtils:Jy,compile:W0,computed:ke,createApp:jf,createBlock:_e,createCommentVNode:de,createElementBlock:ie,createElementVNode:N,createHydrationRenderer:uf,createPropsRestProxy:hy,createRenderer:cf,createSSRApp:P0,createSlots:Xv,createStaticVNode:Xo,createTextVNode:Qe,createVNode:ae,customRef:No,defineAsyncComponent:jv,defineComponent:be,defineCustomElement:Of,defineEmits:ey,defineExpose:ty,defineModel:iy,defineOptions:ny,defineProps:Qv,defineSSRCustomElement:_0,defineSlots:ry,devtools:Ky,effect:Hm,effectScope:ch,getCurrentInstance:Mt,getCurrentScope:Ga,getTransitionRawChildren:Vo,guardReactiveProps:yf,h:xr,handleError:tr,hasInjectionContext:wy,hydrate:Vf,initCustomFormatter:zy,initDirectivesForSSR:B0,inject:xt,isMemoSame:Af,isProxy:qa,isReactive:Hn,isReadonly:Gn,isRef:at,isRuntimeOnly:Wy,isShallow:ri,isVNode:Rn,markRaw:Fo,mergeDefaults:cy,mergeModels:uy,mergeProps:bf,nextTick:bi,normalizeClass:kr,normalizeProps:Nm,normalizeStyle:yi,onActivated:Vh,onBeforeMount:Kh,onBeforeUnmount:Rr,onBeforeUpdate:Yh,onDeactivated:jh,onErrorCaptured:Jh,onMounted:Ye,onRenderTracked:qh,onRenderTriggered:Zh,onScopeDispose:hh,onServerPrefetch:Xh,onUnmounted:Ko,onUpdated:Go,openBlock:Z,popScopeId:Uo,provide:Gr,proxyRefs:el,pushScopeId:Ho,queuePostFlushCb:ho,reactive:Er,readonly:Oo,ref:Fe,registerRuntimeCompiler:By,render:da,renderList:$t,renderSlot:Zv,resolveComponent:oe,resolveDirective:Fv,resolveDynamicComponent:Iv,resolveFilter:qy,resolveTransitionHooks:gr,setBlockTracking:oa,setDevtoolsHook:Yy,setTransitionHooks:Kn,shallowReactive:Za,shallowReadonly:lv,shallowRef:kh,ssrContextKey:Nh,ssrUtils:Zy,stop:Um,toDisplayString:ye,toHandlerKey:Vr,toHandlers:qv,toRaw:Me,toRef:Do,toRefs:gv,toValue:fv,transformVNodeArgs:Iy,triggerRef:hv,unref:Jt,useAttrs:ay,useCssModule:C0,useCssVars:l0,useModel:ly,useSSRContext:Dh,useSlots:sy,useTransitionState:sl,vModelCheckbox:gl,vModelDynamic:Bf,vModelRadio:ml,vModelSelect:Df,vModelText:Zn,vShow:Lf,version:kf,warn:jy,watch:qe,watchEffect:Ph,watchPostEffect:Bh,watchSyncEffect:Wh,withAsyncContext:fy,withCtx:Je,withDefaults:oy,withDirectives:zo,withKeys:D0,withMemo:Vy,withModifiers:F0,withScopeId:Rv},Symbol.toStringTag,{value:"Module"}));function Kc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kc(Object(n),!0).forEach(function(r){vt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yo(e){"@babel/helpers - typeof";return yo=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},yo(e)}function vt(e,t,n){return t=j0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U0(e,t){if(e==null)return{};var n={},r=Object.keys(e),f,u;for(u=0;u<r.length;u++)f=r[u],!(t.indexOf(f)>=0)&&(n[f]=e[f]);return n}function z0(e,t){if(e==null)return{};var n=U0(e,t),r,f;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(f=0;f<u.length;f++)r=u[f],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V0(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j0(e){var t=V0(e,"string");return typeof t=="symbol"?t:String(t)}var G0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yf={exports:{}};(function(e){(function(t){var n=function(v,y,A){if(!p(y)||i(y)||a(y)||c(y)||s(y))return y;var S,C=0,b=0;if(o(y))for(S=[],b=y.length;C<b;C++)S.push(n(v,y[C],A));else{S={};for(var R in y)Object.prototype.hasOwnProperty.call(y,R)&&(S[v(R,A)]=n(v,y[R],A))}return S},r=function(v,y){y=y||{};var A=y.separator||"_",S=y.split||/(?=[A-Z])/;return v.split(S).join(A)},f=function(v){return l(v)?v:(v=v.replace(/[\-_\s]+(.)?/g,function(y,A){return A?A.toUpperCase():""}),v.substr(0,1).toLowerCase()+v.substr(1))},u=function(v){var y=f(v);return y.substr(0,1).toUpperCase()+y.substr(1)},h=function(v,y){return r(v,y).toLowerCase()},g=Object.prototype.toString,s=function(v){return typeof v=="function"},p=function(v){return v===Object(v)},o=function(v){return g.call(v)=="[object Array]"},i=function(v){return g.call(v)=="[object Date]"},a=function(v){return g.call(v)=="[object RegExp]"},c=function(v){return g.call(v)=="[object Boolean]"},l=function(v){return v=v-0,v===v},d=function(v,y){var A=y&&"process"in y?y.process:y;return typeof A!="function"?v:function(S,C){return A(S,v,C)}},m={camelize:f,decamelize:h,pascalize:u,depascalize:h,camelizeKeys:function(v,y){return n(d(f,y),v)},decamelizeKeys:function(v,y){return n(d(h,y),v,y)},pascalizeKeys:function(v,y){return n(d(u,y),v)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=m:t.humps=m})(G0)})(Yf);var K0=Yf.exports,Y0=["class","style"];function X0(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),f=K0.camelize(n.slice(0,r)),u=n.slice(r+1).trim();return t[f]=u,t},{})}function Z0(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function Xf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(s){return Xf(s)}),f=Object.keys(e.attributes||{}).reduce(function(s,p){var o=e.attributes[p];switch(p){case"class":s.class=Z0(o);break;case"style":s.style=X0(o);break;default:s.attrs[p]=o}return s},{attrs:{},class:{},style:{}});n.class;var u=n.style,h=u===void 0?{}:u,g=z0(n,Y0);return xr(e.tag,Xt(Xt(Xt({},t),{},{class:f.class,style:Xt(Xt({},f.style),h)},f.attrs),g),r)}var Zf=!1;try{Zf=!0}catch{}function q0(){if(!Zf&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function As(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?vt({},e,t):{}}function J0(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},vt(t,"fa-".concat(e.size),e.size!==null),vt(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),vt(t,"fa-pull-".concat(e.pull),e.pull!==null),vt(t,"fa-swap-opacity",e.swapOpacity),vt(t,"fa-bounce",e.bounce),vt(t,"fa-shake",e.shake),vt(t,"fa-beat",e.beat),vt(t,"fa-fade",e.fade),vt(t,"fa-beat-fade",e.beatFade),vt(t,"fa-flash",e.flash),vt(t,"fa-spin-pulse",e.spinPulse),vt(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function Yc(e){if(e&&yo(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Ks.icon)return Ks.icon(e);if(e===null)return null;if(yo(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var Q0=be({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},maskId:{type:String,default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},titleId:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,f=ke(function(){return Yc(t.icon)}),u=ke(function(){return As("classes",J0(t))}),h=ke(function(){return As("transform",typeof t.transform=="string"?Ks.transform(t.transform):t.transform)}),g=ke(function(){return As("mask",Yc(t.mask))}),s=ke(function(){return im(f.value,Xt(Xt(Xt(Xt({},u.value),h.value),g.value),{},{symbol:t.symbol,title:t.title,titleId:t.titleId,maskId:t.maskId}))});qe(s,function(o){if(!o)return q0("Could not find one or more icon(s)",f.value,g.value)},{immediate:!0});var p=ke(function(){return s.value?Xf(s.value.abstract[0],{},r):null});return function(){return p.value}}});const eb=be({name:"NavbarItem"}),Se=(e,t)=>{const n=e.__vccOpts||e;for(const[r,f]of t)n[r]=f;return n},Jo=e=>(Ho("data-v-907b90b2"),e=e(),Uo(),e),tb={role:"navigation","aria-label":"main navigation",class:"navbar is-fixed-top"},nb=Jo(()=>N("div",{class:"navbar-brand"},[N("a",{class:"navbar-item"},[N("h1",{class:"title"},"Mihari")])],-1)),rb={class:"navbar-menu"},ib=Jo(()=>N("div",{class:"navbar-start"},null,-1)),ob={class:"navbar-end"},sb=Jo(()=>N("a",{class:"navbar-item"},[N("a",{href:"/redoc-static.html",target:"_blank",class:"navbar-item"},"API")],-1)),ab=Jo(()=>N("a",{class:"navbar-item"},[N("a",{href:"https://github.com/ninoseki/mihari",target:"_blank",class:"navbar-item"},"GitHub")],-1));function lb(e,t,n,r,f,u){const h=oe("router-link");return Z(),ie("nav",tb,[nb,N("div",rb,[ib,N("div",ob,[ae(h,{class:"navbar-item",to:{name:"Alerts"}},{default:Je(()=>[Qe("Alerts")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Artifacts"}},{default:Je(()=>[Qe("Artifacts")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Rules"}},{default:Je(()=>[Qe("Rules")]),_:1}),ae(h,{class:"navbar-item",to:{name:"NewRule"}},{default:Je(()=>[Qe("New Rule")]),_:1}),ae(h,{class:"navbar-item",to:{name:"Config"}},{default:Je(()=>[Qe("Config")]),_:1}),sb,ab])])])}const cb=Se(eb,[["render",lb],["__scopeId","data-v-907b90b2"]]),ub=be({name:"App",components:{Navbar:cb}}),hb={class:"section is-medium"},fb={class:"container"};function db(e,t,n,r,f,u){const h=oe("Navbar"),g=oe("router-view");return Z(),ie(Re,null,[ae(h),N("section",hb,[N("div",fb,[ae(g)])])],64)}const pb=Se(ub,[["render",db]]);/*!
|
763
763
|
* vue-router v4.2.5
|
764
764
|
* (c) 2023 Eduardo San Martin Morote
|
765
765
|
* @license MIT
|
766
|
-
*/const ir=typeof window<"u";function gb(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const De=Object.assign;function ks(e,t){const n={};for(const r in t){const f=t[r];n[r]=Nt(f)?f.map(e):e(f)}return n}const qr=()=>{},Nt=Array.isArray,mb=/\/$/,vb=e=>e.replace(mb,"");function Es(e,t,n="/"){let r,f={},u="",h="";const g=t.indexOf("#");let s=t.indexOf("?");return g<s&&g>=0&&(s=-1),s>-1&&(r=t.slice(0,s),u=t.slice(s+1,g>-1?g:t.length),f=e(u)),g>-1&&(r=r||t.slice(0,g),h=t.slice(g,t.length)),r=$b(r??t,n),{fullPath:r+(u&&"?")+u+h,path:r,query:f,hash:h}}function yb(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Xc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function bb(e,t,n){const r=t.matched.length-1,f=n.matched.length-1;return r>-1&&r===f&&br(t.matched[r],n.matched[f])&&qf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function br(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wb(e[n],t[n]))return!1;return!0}function wb(e,t){return Nt(e)?Zc(e,t):Nt(t)?Zc(t,e):e===t}function Zc(e,t){return Nt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function $b(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),f=r[r.length-1];(f===".."||f===".")&&r.push("");let u=n.length-1,h,g;for(h=0;h<r.length;h++)if(g=r[h],g!==".")if(g==="..")u>1&&u--;else break;return n.slice(0,u).join("/")+"/"+r.slice(h-(h===r.length?1:0)).join("/")}var fi;(function(e){e.pop="pop",e.push="push"})(fi||(fi={}));var Jr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Jr||(Jr={}));function _b(e){if(!e)if(ir){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),vb(e)}const Sb=/^[^#]+#/;function Cb(e,t){return e.replace(Sb,"#")+t}function Ab(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qo=()=>({left:window.pageXOffset,top:window.pageYOffset});function kb(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),f=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!f)return;t=Ab(f,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function qc(e,t){return(history.state?history.state.position-t:-1)+e}const da=new Map;function Eb(e,t){da.set(e,t)}function xb(e){const t=da.get(e);return da.delete(e),t}let Rb=()=>location.protocol+"//"+location.host;function Jf(e,t){const{pathname:n,search:r,hash:f}=t,u=e.indexOf("#");if(u>-1){let g=f.includes(e.slice(u))?e.slice(u).length:1,s=f.slice(g);return s[0]!=="/"&&(s="/"+s),Xc(s,"")}return Xc(n,e)+r+f}function Tb(e,t,n,r){let f=[],u=[],h=null;const g=({state:a})=>{const c=Jf(e,location),l=n.value,d=t.value;let m=0;if(a){if(n.value=c,t.value=a,h&&h===l){h=null;return}m=d?a.position-d.position:0}else r(c);f.forEach(v=>{v(n.value,l,{delta:m,type:fi.pop,direction:m?m>0?Jr.forward:Jr.back:Jr.unknown})})};function s(){h=n.value}function p(a){f.push(a);const c=()=>{const l=f.indexOf(a);l>-1&&f.splice(l,1)};return u.push(c),c}function o(){const{history:a}=window;a.state&&a.replaceState(De({},a.state,{scroll:Qo()}),"")}function i(){for(const a of u)a();u=[],window.removeEventListener("popstate",g),window.removeEventListener("beforeunload",o)}return window.addEventListener("popstate",g),window.addEventListener("beforeunload",o,{passive:!0}),{pauseListeners:s,listen:p,destroy:i}}function Jc(e,t,n,r=!1,f=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:f?Qo():null}}function Lb(e){const{history:t,location:n}=window,r={value:Jf(e,n)},f={value:t.state};f.value||u(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function u(s,p,o){const i=e.indexOf("#"),a=i>-1?(n.host&&document.querySelector("base")?e:e.slice(i))+s:Rb()+e+s;try{t[o?"replaceState":"pushState"](p,"",a),f.value=p}catch(c){console.error(c),n[o?"replace":"assign"](a)}}function h(s,p){const o=De({},t.state,Jc(f.value.back,s,f.value.forward,!0),p,{position:f.value.position});u(s,o,!0),r.value=s}function g(s,p){const o=De({},f.value,t.state,{forward:s,scroll:Qo()});u(o.current,o,!0);const i=De({},Jc(r.value,s,null),{position:o.position+1},p);u(s,i,!1),r.value=s}return{location:r,state:f,push:g,replace:h}}function Mb(e){e=_b(e);const t=Lb(e),n=Tb(e,t.state,t.location,t.replace);function r(u,h=!0){h||n.pauseListeners(),history.go(u)}const f=De({location:"",base:e,go:r,createHref:Cb.bind(null,e)},t,n);return Object.defineProperty(f,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(f,"state",{enumerable:!0,get:()=>t.state.value}),f}function Ob(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Mb(e)}function Ib(e){return typeof e=="string"||e&&typeof e=="object"}function Qf(e){return typeof e=="string"||typeof e=="symbol"}const gn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ed=Symbol("");var Qc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Qc||(Qc={}));function wr(e,t){return De(new Error,{type:e,[ed]:!0},t)}function jt(e,t){return e instanceof Error&&ed in e&&(t==null||!!(e.type&t))}const eu="[^/]+?",Fb={sensitive:!1,strict:!1,start:!0,end:!0},Nb=/[.+*?^${}()[\]/\\]/g;function Db(e,t){const n=De({},Fb,t),r=[];let f=n.start?"^":"";const u=[];for(const p of e){const o=p.length?[]:[90];n.strict&&!p.length&&(f+="/");for(let i=0;i<p.length;i++){const a=p[i];let c=40+(n.sensitive?.25:0);if(a.type===0)i||(f+="/"),f+=a.value.replace(Nb,"\\$&"),c+=40;else if(a.type===1){const{value:l,repeatable:d,optional:m,regexp:v}=a;u.push({name:l,repeatable:d,optional:m});const y=v||eu;if(y!==eu){c+=10;try{new RegExp(`(${y})`)}catch(S){throw new Error(`Invalid custom RegExp for param "${l}" (${y}): `+S.message)}}let A=d?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;i||(A=m&&p.length<2?`(?:/${A})`:"/"+A),m&&(A+="?"),f+=A,c+=20,m&&(c+=-8),d&&(c+=-20),y===".*"&&(c+=-50)}o.push(c)}r.push(o)}if(n.strict&&n.end){const p=r.length-1;r[p][r[p].length-1]+=.7000000000000001}n.strict||(f+="/?"),n.end?f+="$":n.strict&&(f+="(?:/|$)");const h=new RegExp(f,n.sensitive?"":"i");function g(p){const o=p.match(h),i={};if(!o)return null;for(let a=1;a<o.length;a++){const c=o[a]||"",l=u[a-1];i[l.name]=c&&l.repeatable?c.split("/"):c}return i}function s(p){let o="",i=!1;for(const a of e){(!i||!o.endsWith("/"))&&(o+="/"),i=!1;for(const c of a)if(c.type===0)o+=c.value;else if(c.type===1){const{value:l,repeatable:d,optional:m}=c,v=l in p?p[l]:"";if(Nt(v)&&!d)throw new Error(`Provided param "${l}" is an array but it is not repeatable (* or + modifiers)`);const y=Nt(v)?v.join("/"):v;if(!y)if(m)a.length<2&&(o.endsWith("/")?o=o.slice(0,-1):i=!0);else throw new Error(`Missing required param "${l}"`);o+=y}}return o||"/"}return{re:h,score:r,keys:u,parse:g,stringify:s}}function Pb(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Bb(e,t){let n=0;const r=e.score,f=t.score;for(;n<r.length&&n<f.length;){const u=Pb(r[n],f[n]);if(u)return u;n++}if(Math.abs(f.length-r.length)===1){if(tu(r))return 1;if(tu(f))return-1}return f.length-r.length}function tu(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Wb={type:0,value:""},Hb=/[a-zA-Z0-9_]/;function Ub(e){if(!e)return[[]];if(e==="/")return[[Wb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(c){throw new Error(`ERR (${n})/"${p}": ${c}`)}let n=0,r=n;const f=[];let u;function h(){u&&f.push(u),u=[]}let g=0,s,p="",o="";function i(){p&&(n===0?u.push({type:0,value:p}):n===1||n===2||n===3?(u.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:p,regexp:o,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),p="")}function a(){p+=s}for(;g<e.length;){if(s=e[g++],s==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:s==="/"?(p&&i(),h()):s===":"?(i(),n=1):a();break;case 4:a(),n=r;break;case 1:s==="("?n=2:Hb.test(s)?a():(i(),n=0,s!=="*"&&s!=="?"&&s!=="+"&&g--);break;case 2:s===")"?o[o.length-1]=="\\"?o=o.slice(0,-1)+s:n=3:o+=s;break;case 3:i(),n=0,s!=="*"&&s!=="?"&&s!=="+"&&g--,o="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${p}"`),i(),h(),f}function zb(e,t,n){const r=Db(Ub(e.path),n),f=De(r,{record:e,parent:t,children:[],alias:[]});return t&&!f.record.aliasOf==!t.record.aliasOf&&t.children.push(f),f}function Vb(e,t){const n=[],r=new Map;t=iu({strict:!1,end:!0,sensitive:!1},t);function f(o){return r.get(o)}function u(o,i,a){const c=!a,l=jb(o);l.aliasOf=a&&a.record;const d=iu(t,o),m=[l];if("alias"in o){const A=typeof o.alias=="string"?[o.alias]:o.alias;for(const S of A)m.push(De({},l,{components:a?a.record.components:l.components,path:S,aliasOf:a?a.record:l}))}let v,y;for(const A of m){const{path:S}=A;if(i&&S[0]!=="/"){const C=i.record.path,b=C[C.length-1]==="/"?"":"/";A.path=i.record.path+(S&&b+S)}if(v=zb(A,i,d),a?a.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),c&&o.name&&!ru(v)&&h(o.name)),l.children){const C=l.children;for(let b=0;b<C.length;b++)u(C[b],v,a&&a.children[b])}a=a||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&s(v)}return y?()=>{h(y)}:qr}function h(o){if(Qf(o)){const i=r.get(o);i&&(r.delete(o),n.splice(n.indexOf(i),1),i.children.forEach(h),i.alias.forEach(h))}else{const i=n.indexOf(o);i>-1&&(n.splice(i,1),o.record.name&&r.delete(o.record.name),o.children.forEach(h),o.alias.forEach(h))}}function g(){return n}function s(o){let i=0;for(;i<n.length&&Bb(o,n[i])>=0&&(o.record.path!==n[i].record.path||!td(o,n[i]));)i++;n.splice(i,0,o),o.record.name&&!ru(o)&&r.set(o.record.name,o)}function p(o,i){let a,c={},l,d;if("name"in o&&o.name){if(a=r.get(o.name),!a)throw wr(1,{location:o});d=a.record.name,c=De(nu(i.params,a.keys.filter(y=>!y.optional).map(y=>y.name)),o.params&&nu(o.params,a.keys.map(y=>y.name))),l=a.stringify(c)}else if("path"in o)l=o.path,a=n.find(y=>y.re.test(l)),a&&(c=a.parse(l),d=a.record.name);else{if(a=i.name?r.get(i.name):n.find(y=>y.re.test(i.path)),!a)throw wr(1,{location:o,currentLocation:i});d=a.record.name,c=De({},i.params,o.params),l=a.stringify(c)}const m=[];let v=a;for(;v;)m.unshift(v.record),v=v.parent;return{name:d,path:l,params:c,matched:m,meta:Kb(m)}}return e.forEach(o=>u(o)),{addRoute:u,resolve:p,removeRoute:h,getRoutes:g,getRecordMatcher:f}}function nu(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function jb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Gb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Gb(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ru(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Kb(e){return e.reduce((t,n)=>De(t,n.meta),{})}function iu(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function td(e,t){return t.children.some(n=>n===e||td(e,n))}const nd=/#/g,Yb=/&/g,Xb=/\//g,Zb=/=/g,qb=/\?/g,rd=/\+/g,Jb=/%5B/g,Qb=/%5D/g,id=/%5E/g,e1=/%60/g,od=/%7B/g,t1=/%7C/g,sd=/%7D/g,n1=/%20/g;function ml(e){return encodeURI(""+e).replace(t1,"|").replace(Jb,"[").replace(Qb,"]")}function r1(e){return ml(e).replace(od,"{").replace(sd,"}").replace(id,"^")}function pa(e){return ml(e).replace(rd,"%2B").replace(n1,"+").replace(nd,"%23").replace(Yb,"%26").replace(e1,"`").replace(od,"{").replace(sd,"}").replace(id,"^")}function i1(e){return pa(e).replace(Zb,"%3D")}function o1(e){return ml(e).replace(nd,"%23").replace(qb,"%3F")}function s1(e){return e==null?"":o1(e).replace(Xb,"%2F")}function bo(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function a1(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let f=0;f<r.length;++f){const u=r[f].replace(rd," "),h=u.indexOf("="),g=bo(h<0?u:u.slice(0,h)),s=h<0?null:bo(u.slice(h+1));if(g in t){let p=t[g];Nt(p)||(p=t[g]=[p]),p.push(s)}else t[g]=s}return t}function ou(e){let t="";for(let n in e){const r=e[n];if(n=i1(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Nt(r)?r.map(u=>u&&pa(u)):[r&&pa(r)]).forEach(u=>{u!==void 0&&(t+=(t.length?"&":"")+n,u!=null&&(t+="="+u))})}return t}function l1(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Nt(r)?r.map(f=>f==null?null:""+f):r==null?r:""+r)}return t}const c1=Symbol(""),su=Symbol(""),es=Symbol(""),vl=Symbol(""),ga=Symbol("");function Nr(){let e=[];function t(r){return e.push(r),()=>{const f=e.indexOf(r);f>-1&&e.splice(f,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $n(e,t,n,r,f){const u=r&&(r.enterCallbacks[f]=r.enterCallbacks[f]||[]);return()=>new Promise((h,g)=>{const s=i=>{i===!1?g(wr(4,{from:n,to:t})):i instanceof Error?g(i):Ib(i)?g(wr(2,{from:t,to:i})):(u&&r.enterCallbacks[f]===u&&typeof i=="function"&&u.push(i),h())},p=e.call(r&&r.instances[f],t,n,s);let o=Promise.resolve(p);e.length<3&&(o=o.then(s)),o.catch(i=>g(i))})}function xs(e,t,n,r){const f=[];for(const u of e)for(const h in u.components){let g=u.components[h];if(!(t!=="beforeRouteEnter"&&!u.instances[h]))if(u1(g)){const p=(g.__vccOpts||g)[t];p&&f.push($n(p,n,r,u,h))}else{let s=g();f.push(()=>s.then(p=>{if(!p)return Promise.reject(new Error(`Couldn't resolve component "${h}" at "${u.path}"`));const o=gb(p)?p.default:p;u.components[h]=o;const a=(o.__vccOpts||o)[t];return a&&$n(a,n,r,u,h)()}))}}return f}function u1(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function au(e){const t=Rt(es),n=Rt(vl),r=ke(()=>t.resolve(Qt(e.to))),f=ke(()=>{const{matched:s}=r.value,{length:p}=s,o=s[p-1],i=n.matched;if(!o||!i.length)return-1;const a=i.findIndex(br.bind(null,o));if(a>-1)return a;const c=lu(s[p-2]);return p>1&&lu(o)===c&&i[i.length-1].path!==c?i.findIndex(br.bind(null,s[p-2])):a}),u=ke(()=>f.value>-1&&p1(n.params,r.value.params)),h=ke(()=>f.value>-1&&f.value===n.matched.length-1&&qf(n.params,r.value.params));function g(s={}){return d1(s)?t[Qt(e.replace)?"replace":"push"](Qt(e.to)).catch(qr):Promise.resolve()}return{route:r,href:ke(()=>r.value.href),isActive:u,isExactActive:h,navigate:g}}const h1=be({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:au,setup(e,{slots:t}){const n=xr(au(e)),{options:r}=Rt(es),f=ke(()=>({[cu(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[cu(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const u=t.default&&t.default(n);return e.custom?u:Tr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:f.value},u)}}}),f1=h1;function d1(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function p1(e,t){for(const n in t){const r=t[n],f=e[n];if(typeof r=="string"){if(r!==f)return!1}else if(!Nt(f)||f.length!==r.length||r.some((u,h)=>u!==f[h]))return!1}return!0}function lu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const cu=(e,t,n)=>e??t??n,g1=be({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Rt(ga),f=ke(()=>e.route||r.value),u=Rt(su,0),h=ke(()=>{let p=Qt(u);const{matched:o}=f.value;let i;for(;(i=o[p])&&!i.components;)p++;return p}),g=ke(()=>f.value.matched[h.value]);Kr(su,ke(()=>h.value+1)),Kr(c1,g),Kr(ga,f);const s=Fe();return qe(()=>[s.value,g.value,e.name],([p,o,i],[a,c,l])=>{o&&(o.instances[i]=p,c&&c!==o&&p&&p===a&&(o.leaveGuards.size||(o.leaveGuards=c.leaveGuards),o.updateGuards.size||(o.updateGuards=c.updateGuards))),p&&o&&(!c||!br(o,c)||!a)&&(o.enterCallbacks[i]||[]).forEach(d=>d(p))},{flush:"post"}),()=>{const p=f.value,o=e.name,i=g.value,a=i&&i.components[o];if(!a)return uu(n.default,{Component:a,route:p});const c=i.props[o],l=c?c===!0?p.params:typeof c=="function"?c(p):c:null,m=Tr(a,De({},l,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(i.instances[o]=null)},ref:s}));return uu(n.default,{Component:m,route:p})||m}}});function uu(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const m1=g1;function v1(e){const t=Vb(e.routes,e),n=e.parseQuery||a1,r=e.stringifyQuery||ou,f=e.history,u=Nr(),h=Nr(),g=Nr(),s=kh(gn);let p=gn;ir&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const o=ks.bind(null,U=>""+U),i=ks.bind(null,s1),a=ks.bind(null,bo);function c(U,X){let Y,V;return Qf(U)?(Y=t.getRecordMatcher(U),V=X):V=U,t.addRoute(V,Y)}function l(U){const X=t.getRecordMatcher(U);X&&t.removeRoute(X)}function d(){return t.getRoutes().map(U=>U.record)}function m(U){return!!t.getRecordMatcher(U)}function v(U,X){if(X=De({},X||s.value),typeof U=="string"){const G=Es(n,U,X.path),J=t.resolve({path:G.path},X),te=f.createHref(G.fullPath);return De(G,J,{params:a(J.params),hash:bo(G.hash),redirectedFrom:void 0,href:te})}let Y;if("path"in U)Y=De({},U,{path:Es(n,U.path,X.path).path});else{const G=De({},U.params);for(const J in G)G[J]==null&&delete G[J];Y=De({},U,{params:i(G)}),X.params=i(X.params)}const V=t.resolve(Y,X),ee=U.hash||"";V.params=o(a(V.params));const D=yb(r,De({},U,{hash:r1(ee),path:V.path})),B=f.createHref(D);return De({fullPath:D,hash:ee,query:r===ou?l1(U.query):U.query||{}},V,{redirectedFrom:void 0,href:B})}function y(U){return typeof U=="string"?Es(n,U,s.value.path):De({},U)}function A(U,X){if(p!==U)return wr(8,{from:X,to:U})}function S(U){return x(U)}function C(U){return S(De(y(U),{replace:!0}))}function b(U){const X=U.matched[U.matched.length-1];if(X&&X.redirect){const{redirect:Y}=X;let V=typeof Y=="function"?Y(U):Y;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=y(V):{path:V},V.params={}),De({query:U.query,hash:U.hash,params:"path"in V?{}:U.params},V)}}function x(U,X){const Y=p=v(U),V=s.value,ee=U.state,D=U.force,B=U.replace===!0,G=b(Y);if(G)return x(De(y(G),{state:typeof G=="object"?De({},ee,G.state):ee,force:D,replace:B}),X||Y);const J=Y;J.redirectedFrom=X;let te;return!D&&bb(r,V,Y)&&(te=wr(16,{to:J,from:V}),W(V,V,!0,!1)),(te?Promise.resolve(te):M(J,V)).catch(re=>jt(re)?jt(re,2)?re:P(re):I(re,J,V)).then(re=>{if(re){if(jt(re,2))return x(De({replace:B},y(re.to),{state:typeof re.to=="object"?De({},ee,re.to.state):ee,force:D}),X||J)}else re=k(J,V,!0,B,ee);return $(J,V,re),re})}function L(U,X){const Y=A(U,X);return Y?Promise.reject(Y):Promise.resolve()}function E(U){const X=z.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(U):U()}function M(U,X){let Y;const[V,ee,D]=y1(U,X);Y=xs(V.reverse(),"beforeRouteLeave",U,X);for(const G of V)G.leaveGuards.forEach(J=>{Y.push($n(J,U,X))});const B=L.bind(null,U,X);return Y.push(B),q(Y).then(()=>{Y=[];for(const G of u.list())Y.push($n(G,U,X));return Y.push(B),q(Y)}).then(()=>{Y=xs(ee,"beforeRouteUpdate",U,X);for(const G of ee)G.updateGuards.forEach(J=>{Y.push($n(J,U,X))});return Y.push(B),q(Y)}).then(()=>{Y=[];for(const G of D)if(G.beforeEnter)if(Nt(G.beforeEnter))for(const J of G.beforeEnter)Y.push($n(J,U,X));else Y.push($n(G.beforeEnter,U,X));return Y.push(B),q(Y)}).then(()=>(U.matched.forEach(G=>G.enterCallbacks={}),Y=xs(D,"beforeRouteEnter",U,X),Y.push(B),q(Y))).then(()=>{Y=[];for(const G of h.list())Y.push($n(G,U,X));return Y.push(B),q(Y)}).catch(G=>jt(G,8)?G:Promise.reject(G))}function $(U,X,Y){g.list().forEach(V=>E(()=>V(U,X,Y)))}function k(U,X,Y,V,ee){const D=A(U,X);if(D)return D;const B=X===gn,G=ir?history.state:{};Y&&(V||B?f.replace(U.fullPath,De({scroll:B&&G&&G.scroll},ee)):f.push(U.fullPath,ee)),s.value=U,W(U,X,Y,B),P()}let _;function w(){_||(_=f.listen((U,X,Y)=>{if(!K.listening)return;const V=v(U),ee=b(V);if(ee){x(De(ee,{replace:!0}),V).catch(qr);return}p=V;const D=s.value;ir&&Eb(qc(D.fullPath,Y.delta),Qo()),M(V,D).catch(B=>jt(B,12)?B:jt(B,2)?(x(B.to,V).then(G=>{jt(G,20)&&!Y.delta&&Y.type===fi.pop&&f.go(-1,!1)}).catch(qr),Promise.reject()):(Y.delta&&f.go(-Y.delta,!1),I(B,V,D))).then(B=>{B=B||k(V,D,!1),B&&(Y.delta&&!jt(B,8)?f.go(-Y.delta,!1):Y.type===fi.pop&&jt(B,20)&&f.go(-1,!1)),$(V,D,B)}).catch(qr)}))}let R=Nr(),T=Nr(),O;function I(U,X,Y){P(U);const V=T.list();return V.length?V.forEach(ee=>ee(U,X,Y)):console.error(U),Promise.reject(U)}function F(){return O&&s.value!==gn?Promise.resolve():new Promise((U,X)=>{R.add([U,X])})}function P(U){return O||(O=!U,w(),R.list().forEach(([X,Y])=>U?Y(U):X()),R.reset()),U}function W(U,X,Y,V){const{scrollBehavior:ee}=e;if(!ir||!ee)return Promise.resolve();const D=!Y&&xb(qc(U.fullPath,0))||(V||!Y)&&history.state&&history.state.scroll||null;return bi().then(()=>ee(U,X,D)).then(B=>B&&kb(B)).catch(B=>I(B,U,X))}const j=U=>f.go(U);let H;const z=new Set,K={currentRoute:s,listening:!0,addRoute:c,removeRoute:l,hasRoute:m,getRoutes:d,resolve:v,options:e,push:S,replace:C,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:u.add,beforeResolve:h.add,afterEach:g.add,onError:T.add,isReady:F,install(U){const X=this;U.component("RouterLink",f1),U.component("RouterView",m1),U.config.globalProperties.$router=X,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>Qt(s)}),ir&&!H&&s.value===gn&&(H=!0,S(f.location).catch(ee=>{}));const Y={};for(const ee in gn)Object.defineProperty(Y,ee,{get:()=>s.value[ee],enumerable:!0});U.provide(es,X),U.provide(vl,Xa(Y)),U.provide(ga,s);const V=U.unmount;z.add(U),U.unmount=function(){z.delete(U),z.size<1&&(p=gn,_&&_(),_=null,s.value=gn,H=!1,O=!1),V()}}};function q(U){return U.reduce((X,Y)=>X.then(()=>E(Y)),Promise.resolve())}return K}function y1(e,t){const n=[],r=[],f=[],u=Math.max(t.matched.length,e.matched.length);for(let h=0;h<u;h++){const g=t.matched[h];g&&(e.matched.find(p=>br(p,g))?r.push(g):n.push(g));const s=e.matched[h];s&&(t.matched.find(p=>br(p,s))||f.push(s))}return[n,r,f]}function Lr(){return Rt(es)}function b1(){return Rt(vl)}function ad(e){return ja()?(hh(e),!0):!1}function wo(e){return typeof e=="function"?e():Qt(e)}const ld=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const w1=()=>{};function $1(e){return e||Mt()}function _1(...e){if(e.length!==1)return Do(...e);const t=e[0];return typeof t=="function"?Oo(No(()=>({get:t,set:w1}))):Fe(t)}function S1(e,t){$1(t)&&Rr(e,t)}function C1(e){var t;const n=wo(e);return(t=n==null?void 0:n.$el)!=null?t:n}const A1=ld?window:void 0,k1=ld?window.document:void 0;function E1(){const e=Fe(!1);return Mt()&&Ye(()=>{e.value=!0}),e}function x1(e){const t=E1();return ke(()=>(t.value,!!e()))}function R1(e,t,n={}){const{window:r=A1,...f}=n;let u;const h=x1(()=>r&&"MutationObserver"in r),g=()=>{u&&(u.disconnect(),u=void 0)},s=qe(()=>C1(e),i=>{g(),h.value&&r&&i&&(u=new MutationObserver(t),u.observe(i,f))},{immediate:!0}),p=()=>u==null?void 0:u.takeRecords(),o=()=>{g(),s()};return ad(o),{isSupported:h,stop:o,takeRecords:p}}function ln(e=null,t={}){var n,r,f;const{document:u=k1,restoreOnUnmount:h=i=>i}=t,g=(n=u==null?void 0:u.title)!=null?n:"",s=_1((r=e??(u==null?void 0:u.title))!=null?r:null),p=e&&typeof e=="function";function o(i){if(!("titleTemplate"in t))return i;const a=t.titleTemplate||"%s";return typeof a=="function"?a(i):wo(a).replace(/%s/g,i)}return qe(s,(i,a)=>{i!==a&&u&&(u.title=o(typeof i=="string"?i:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&u&&!p&&R1((f=u.head)==null?void 0:f.querySelector("title"),()=>{u&&u.title!==s.value&&(s.value=o(u.title))},{childList:!0}),S1(()=>{if(h){const i=h(g,s.value||"");i!=null&&u&&(u.title=i)}}),s}/*! CAF: shared.mjs
|
766
|
+
*/const rr=typeof window<"u";function gb(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const De=Object.assign;function ks(e,t){const n={};for(const r in t){const f=t[r];n[r]=Nt(f)?f.map(e):e(f)}return n}const Zr=()=>{},Nt=Array.isArray,mb=/\/$/,vb=e=>e.replace(mb,"");function Es(e,t,n="/"){let r,f={},u="",h="";const g=t.indexOf("#");let s=t.indexOf("?");return g<s&&g>=0&&(s=-1),s>-1&&(r=t.slice(0,s),u=t.slice(s+1,g>-1?g:t.length),f=e(u)),g>-1&&(r=r||t.slice(0,g),h=t.slice(g,t.length)),r=$b(r??t,n),{fullPath:r+(u&&"?")+u+h,path:r,query:f,hash:h}}function yb(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Xc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function bb(e,t,n){const r=t.matched.length-1,f=n.matched.length-1;return r>-1&&r===f&&yr(t.matched[r],n.matched[f])&&qf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function yr(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wb(e[n],t[n]))return!1;return!0}function wb(e,t){return Nt(e)?Zc(e,t):Nt(t)?Zc(t,e):e===t}function Zc(e,t){return Nt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function $b(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),f=r[r.length-1];(f===".."||f===".")&&r.push("");let u=n.length-1,h,g;for(h=0;h<r.length;h++)if(g=r[h],g!==".")if(g==="..")u>1&&u--;else break;return n.slice(0,u).join("/")+"/"+r.slice(h-(h===r.length?1:0)).join("/")}var fi;(function(e){e.pop="pop",e.push="push"})(fi||(fi={}));var qr;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qr||(qr={}));function _b(e){if(!e)if(rr){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),vb(e)}const Sb=/^[^#]+#/;function Cb(e,t){return e.replace(Sb,"#")+t}function Ab(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Qo=()=>({left:window.pageXOffset,top:window.pageYOffset});function kb(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),f=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!f)return;t=Ab(f,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function qc(e,t){return(history.state?history.state.position-t:-1)+e}const pa=new Map;function Eb(e,t){pa.set(e,t)}function Rb(e){const t=pa.get(e);return pa.delete(e),t}let xb=()=>location.protocol+"//"+location.host;function Jf(e,t){const{pathname:n,search:r,hash:f}=t,u=e.indexOf("#");if(u>-1){let g=f.includes(e.slice(u))?e.slice(u).length:1,s=f.slice(g);return s[0]!=="/"&&(s="/"+s),Xc(s,"")}return Xc(n,e)+r+f}function Tb(e,t,n,r){let f=[],u=[],h=null;const g=({state:a})=>{const c=Jf(e,location),l=n.value,d=t.value;let m=0;if(a){if(n.value=c,t.value=a,h&&h===l){h=null;return}m=d?a.position-d.position:0}else r(c);f.forEach(v=>{v(n.value,l,{delta:m,type:fi.pop,direction:m?m>0?qr.forward:qr.back:qr.unknown})})};function s(){h=n.value}function p(a){f.push(a);const c=()=>{const l=f.indexOf(a);l>-1&&f.splice(l,1)};return u.push(c),c}function o(){const{history:a}=window;a.state&&a.replaceState(De({},a.state,{scroll:Qo()}),"")}function i(){for(const a of u)a();u=[],window.removeEventListener("popstate",g),window.removeEventListener("beforeunload",o)}return window.addEventListener("popstate",g),window.addEventListener("beforeunload",o,{passive:!0}),{pauseListeners:s,listen:p,destroy:i}}function Jc(e,t,n,r=!1,f=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:f?Qo():null}}function Lb(e){const{history:t,location:n}=window,r={value:Jf(e,n)},f={value:t.state};f.value||u(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function u(s,p,o){const i=e.indexOf("#"),a=i>-1?(n.host&&document.querySelector("base")?e:e.slice(i))+s:xb()+e+s;try{t[o?"replaceState":"pushState"](p,"",a),f.value=p}catch(c){console.error(c),n[o?"replace":"assign"](a)}}function h(s,p){const o=De({},t.state,Jc(f.value.back,s,f.value.forward,!0),p,{position:f.value.position});u(s,o,!0),r.value=s}function g(s,p){const o=De({},f.value,t.state,{forward:s,scroll:Qo()});u(o.current,o,!0);const i=De({},Jc(r.value,s,null),{position:o.position+1},p);u(s,i,!1),r.value=s}return{location:r,state:f,push:g,replace:h}}function Mb(e){e=_b(e);const t=Lb(e),n=Tb(e,t.state,t.location,t.replace);function r(u,h=!0){h||n.pauseListeners(),history.go(u)}const f=De({location:"",base:e,go:r,createHref:Cb.bind(null,e)},t,n);return Object.defineProperty(f,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(f,"state",{enumerable:!0,get:()=>t.state.value}),f}function Ob(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Mb(e)}function Ib(e){return typeof e=="string"||e&&typeof e=="object"}function Qf(e){return typeof e=="string"||typeof e=="symbol"}const pn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ed=Symbol("");var Qc;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Qc||(Qc={}));function br(e,t){return De(new Error,{type:e,[ed]:!0},t)}function jt(e,t){return e instanceof Error&&ed in e&&(t==null||!!(e.type&t))}const eu="[^/]+?",Fb={sensitive:!1,strict:!1,start:!0,end:!0},Nb=/[.+*?^${}()[\]/\\]/g;function Db(e,t){const n=De({},Fb,t),r=[];let f=n.start?"^":"";const u=[];for(const p of e){const o=p.length?[]:[90];n.strict&&!p.length&&(f+="/");for(let i=0;i<p.length;i++){const a=p[i];let c=40+(n.sensitive?.25:0);if(a.type===0)i||(f+="/"),f+=a.value.replace(Nb,"\\$&"),c+=40;else if(a.type===1){const{value:l,repeatable:d,optional:m,regexp:v}=a;u.push({name:l,repeatable:d,optional:m});const y=v||eu;if(y!==eu){c+=10;try{new RegExp(`(${y})`)}catch(S){throw new Error(`Invalid custom RegExp for param "${l}" (${y}): `+S.message)}}let A=d?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;i||(A=m&&p.length<2?`(?:/${A})`:"/"+A),m&&(A+="?"),f+=A,c+=20,m&&(c+=-8),d&&(c+=-20),y===".*"&&(c+=-50)}o.push(c)}r.push(o)}if(n.strict&&n.end){const p=r.length-1;r[p][r[p].length-1]+=.7000000000000001}n.strict||(f+="/?"),n.end?f+="$":n.strict&&(f+="(?:/|$)");const h=new RegExp(f,n.sensitive?"":"i");function g(p){const o=p.match(h),i={};if(!o)return null;for(let a=1;a<o.length;a++){const c=o[a]||"",l=u[a-1];i[l.name]=c&&l.repeatable?c.split("/"):c}return i}function s(p){let o="",i=!1;for(const a of e){(!i||!o.endsWith("/"))&&(o+="/"),i=!1;for(const c of a)if(c.type===0)o+=c.value;else if(c.type===1){const{value:l,repeatable:d,optional:m}=c,v=l in p?p[l]:"";if(Nt(v)&&!d)throw new Error(`Provided param "${l}" is an array but it is not repeatable (* or + modifiers)`);const y=Nt(v)?v.join("/"):v;if(!y)if(m)a.length<2&&(o.endsWith("/")?o=o.slice(0,-1):i=!0);else throw new Error(`Missing required param "${l}"`);o+=y}}return o||"/"}return{re:h,score:r,keys:u,parse:g,stringify:s}}function Pb(e,t){let n=0;for(;n<e.length&&n<t.length;){const r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function Bb(e,t){let n=0;const r=e.score,f=t.score;for(;n<r.length&&n<f.length;){const u=Pb(r[n],f[n]);if(u)return u;n++}if(Math.abs(f.length-r.length)===1){if(tu(r))return 1;if(tu(f))return-1}return f.length-r.length}function tu(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Wb={type:0,value:""},Hb=/[a-zA-Z0-9_]/;function Ub(e){if(!e)return[[]];if(e==="/")return[[Wb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(c){throw new Error(`ERR (${n})/"${p}": ${c}`)}let n=0,r=n;const f=[];let u;function h(){u&&f.push(u),u=[]}let g=0,s,p="",o="";function i(){p&&(n===0?u.push({type:0,value:p}):n===1||n===2||n===3?(u.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),u.push({type:1,value:p,regexp:o,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),p="")}function a(){p+=s}for(;g<e.length;){if(s=e[g++],s==="\\"&&n!==2){r=n,n=4;continue}switch(n){case 0:s==="/"?(p&&i(),h()):s===":"?(i(),n=1):a();break;case 4:a(),n=r;break;case 1:s==="("?n=2:Hb.test(s)?a():(i(),n=0,s!=="*"&&s!=="?"&&s!=="+"&&g--);break;case 2:s===")"?o[o.length-1]=="\\"?o=o.slice(0,-1)+s:n=3:o+=s;break;case 3:i(),n=0,s!=="*"&&s!=="?"&&s!=="+"&&g--,o="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${p}"`),i(),h(),f}function zb(e,t,n){const r=Db(Ub(e.path),n),f=De(r,{record:e,parent:t,children:[],alias:[]});return t&&!f.record.aliasOf==!t.record.aliasOf&&t.children.push(f),f}function Vb(e,t){const n=[],r=new Map;t=iu({strict:!1,end:!0,sensitive:!1},t);function f(o){return r.get(o)}function u(o,i,a){const c=!a,l=jb(o);l.aliasOf=a&&a.record;const d=iu(t,o),m=[l];if("alias"in o){const A=typeof o.alias=="string"?[o.alias]:o.alias;for(const S of A)m.push(De({},l,{components:a?a.record.components:l.components,path:S,aliasOf:a?a.record:l}))}let v,y;for(const A of m){const{path:S}=A;if(i&&S[0]!=="/"){const C=i.record.path,b=C[C.length-1]==="/"?"":"/";A.path=i.record.path+(S&&b+S)}if(v=zb(A,i,d),a?a.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),c&&o.name&&!ru(v)&&h(o.name)),l.children){const C=l.children;for(let b=0;b<C.length;b++)u(C[b],v,a&&a.children[b])}a=a||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&s(v)}return y?()=>{h(y)}:Zr}function h(o){if(Qf(o)){const i=r.get(o);i&&(r.delete(o),n.splice(n.indexOf(i),1),i.children.forEach(h),i.alias.forEach(h))}else{const i=n.indexOf(o);i>-1&&(n.splice(i,1),o.record.name&&r.delete(o.record.name),o.children.forEach(h),o.alias.forEach(h))}}function g(){return n}function s(o){let i=0;for(;i<n.length&&Bb(o,n[i])>=0&&(o.record.path!==n[i].record.path||!td(o,n[i]));)i++;n.splice(i,0,o),o.record.name&&!ru(o)&&r.set(o.record.name,o)}function p(o,i){let a,c={},l,d;if("name"in o&&o.name){if(a=r.get(o.name),!a)throw br(1,{location:o});d=a.record.name,c=De(nu(i.params,a.keys.filter(y=>!y.optional).map(y=>y.name)),o.params&&nu(o.params,a.keys.map(y=>y.name))),l=a.stringify(c)}else if("path"in o)l=o.path,a=n.find(y=>y.re.test(l)),a&&(c=a.parse(l),d=a.record.name);else{if(a=i.name?r.get(i.name):n.find(y=>y.re.test(i.path)),!a)throw br(1,{location:o,currentLocation:i});d=a.record.name,c=De({},i.params,o.params),l=a.stringify(c)}const m=[];let v=a;for(;v;)m.unshift(v.record),v=v.parent;return{name:d,path:l,params:c,matched:m,meta:Kb(m)}}return e.forEach(o=>u(o)),{addRoute:u,resolve:p,removeRoute:h,getRoutes:g,getRecordMatcher:f}}function nu(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function jb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:Gb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function Gb(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function ru(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Kb(e){return e.reduce((t,n)=>De(t,n.meta),{})}function iu(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function td(e,t){return t.children.some(n=>n===e||td(e,n))}const nd=/#/g,Yb=/&/g,Xb=/\//g,Zb=/=/g,qb=/\?/g,rd=/\+/g,Jb=/%5B/g,Qb=/%5D/g,id=/%5E/g,e1=/%60/g,od=/%7B/g,t1=/%7C/g,sd=/%7D/g,n1=/%20/g;function vl(e){return encodeURI(""+e).replace(t1,"|").replace(Jb,"[").replace(Qb,"]")}function r1(e){return vl(e).replace(od,"{").replace(sd,"}").replace(id,"^")}function ga(e){return vl(e).replace(rd,"%2B").replace(n1,"+").replace(nd,"%23").replace(Yb,"%26").replace(e1,"`").replace(od,"{").replace(sd,"}").replace(id,"^")}function i1(e){return ga(e).replace(Zb,"%3D")}function o1(e){return vl(e).replace(nd,"%23").replace(qb,"%3F")}function s1(e){return e==null?"":o1(e).replace(Xb,"%2F")}function bo(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function a1(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let f=0;f<r.length;++f){const u=r[f].replace(rd," "),h=u.indexOf("="),g=bo(h<0?u:u.slice(0,h)),s=h<0?null:bo(u.slice(h+1));if(g in t){let p=t[g];Nt(p)||(p=t[g]=[p]),p.push(s)}else t[g]=s}return t}function ou(e){let t="";for(let n in e){const r=e[n];if(n=i1(n),r==null){r!==void 0&&(t+=(t.length?"&":"")+n);continue}(Nt(r)?r.map(u=>u&&ga(u)):[r&&ga(r)]).forEach(u=>{u!==void 0&&(t+=(t.length?"&":"")+n,u!=null&&(t+="="+u))})}return t}function l1(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Nt(r)?r.map(f=>f==null?null:""+f):r==null?r:""+r)}return t}const c1=Symbol(""),su=Symbol(""),es=Symbol(""),yl=Symbol(""),ma=Symbol("");function Fr(){let e=[];function t(r){return e.push(r),()=>{const f=e.indexOf(r);f>-1&&e.splice(f,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function wn(e,t,n,r,f){const u=r&&(r.enterCallbacks[f]=r.enterCallbacks[f]||[]);return()=>new Promise((h,g)=>{const s=i=>{i===!1?g(br(4,{from:n,to:t})):i instanceof Error?g(i):Ib(i)?g(br(2,{from:t,to:i})):(u&&r.enterCallbacks[f]===u&&typeof i=="function"&&u.push(i),h())},p=e.call(r&&r.instances[f],t,n,s);let o=Promise.resolve(p);e.length<3&&(o=o.then(s)),o.catch(i=>g(i))})}function Rs(e,t,n,r){const f=[];for(const u of e)for(const h in u.components){let g=u.components[h];if(!(t!=="beforeRouteEnter"&&!u.instances[h]))if(u1(g)){const p=(g.__vccOpts||g)[t];p&&f.push(wn(p,n,r,u,h))}else{let s=g();f.push(()=>s.then(p=>{if(!p)return Promise.reject(new Error(`Couldn't resolve component "${h}" at "${u.path}"`));const o=gb(p)?p.default:p;u.components[h]=o;const a=(o.__vccOpts||o)[t];return a&&wn(a,n,r,u,h)()}))}}return f}function u1(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function au(e){const t=xt(es),n=xt(yl),r=ke(()=>t.resolve(Jt(e.to))),f=ke(()=>{const{matched:s}=r.value,{length:p}=s,o=s[p-1],i=n.matched;if(!o||!i.length)return-1;const a=i.findIndex(yr.bind(null,o));if(a>-1)return a;const c=lu(s[p-2]);return p>1&&lu(o)===c&&i[i.length-1].path!==c?i.findIndex(yr.bind(null,s[p-2])):a}),u=ke(()=>f.value>-1&&p1(n.params,r.value.params)),h=ke(()=>f.value>-1&&f.value===n.matched.length-1&&qf(n.params,r.value.params));function g(s={}){return d1(s)?t[Jt(e.replace)?"replace":"push"](Jt(e.to)).catch(Zr):Promise.resolve()}return{route:r,href:ke(()=>r.value.href),isActive:u,isExactActive:h,navigate:g}}const h1=be({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:au,setup(e,{slots:t}){const n=Er(au(e)),{options:r}=xt(es),f=ke(()=>({[cu(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[cu(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const u=t.default&&t.default(n);return e.custom?u:xr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:f.value},u)}}}),f1=h1;function d1(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function p1(e,t){for(const n in t){const r=t[n],f=e[n];if(typeof r=="string"){if(r!==f)return!1}else if(!Nt(f)||f.length!==r.length||r.some((u,h)=>u!==f[h]))return!1}return!0}function lu(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const cu=(e,t,n)=>e??t??n,g1=be({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=xt(ma),f=ke(()=>e.route||r.value),u=xt(su,0),h=ke(()=>{let p=Jt(u);const{matched:o}=f.value;let i;for(;(i=o[p])&&!i.components;)p++;return p}),g=ke(()=>f.value.matched[h.value]);Gr(su,ke(()=>h.value+1)),Gr(c1,g),Gr(ma,f);const s=Fe();return qe(()=>[s.value,g.value,e.name],([p,o,i],[a,c,l])=>{o&&(o.instances[i]=p,c&&c!==o&&p&&p===a&&(o.leaveGuards.size||(o.leaveGuards=c.leaveGuards),o.updateGuards.size||(o.updateGuards=c.updateGuards))),p&&o&&(!c||!yr(o,c)||!a)&&(o.enterCallbacks[i]||[]).forEach(d=>d(p))},{flush:"post"}),()=>{const p=f.value,o=e.name,i=g.value,a=i&&i.components[o];if(!a)return uu(n.default,{Component:a,route:p});const c=i.props[o],l=c?c===!0?p.params:typeof c=="function"?c(p):c:null,m=xr(a,De({},l,t,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(i.instances[o]=null)},ref:s}));return uu(n.default,{Component:m,route:p})||m}}});function uu(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const m1=g1;function v1(e){const t=Vb(e.routes,e),n=e.parseQuery||a1,r=e.stringifyQuery||ou,f=e.history,u=Fr(),h=Fr(),g=Fr(),s=kh(pn);let p=pn;rr&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const o=ks.bind(null,U=>""+U),i=ks.bind(null,s1),a=ks.bind(null,bo);function c(U,X){let Y,V;return Qf(U)?(Y=t.getRecordMatcher(U),V=X):V=U,t.addRoute(V,Y)}function l(U){const X=t.getRecordMatcher(U);X&&t.removeRoute(X)}function d(){return t.getRoutes().map(U=>U.record)}function m(U){return!!t.getRecordMatcher(U)}function v(U,X){if(X=De({},X||s.value),typeof U=="string"){const G=Es(n,U,X.path),J=t.resolve({path:G.path},X),te=f.createHref(G.fullPath);return De(G,J,{params:a(J.params),hash:bo(G.hash),redirectedFrom:void 0,href:te})}let Y;if("path"in U)Y=De({},U,{path:Es(n,U.path,X.path).path});else{const G=De({},U.params);for(const J in G)G[J]==null&&delete G[J];Y=De({},U,{params:i(G)}),X.params=i(X.params)}const V=t.resolve(Y,X),ee=U.hash||"";V.params=o(a(V.params));const D=yb(r,De({},U,{hash:r1(ee),path:V.path})),B=f.createHref(D);return De({fullPath:D,hash:ee,query:r===ou?l1(U.query):U.query||{}},V,{redirectedFrom:void 0,href:B})}function y(U){return typeof U=="string"?Es(n,U,s.value.path):De({},U)}function A(U,X){if(p!==U)return br(8,{from:X,to:U})}function S(U){return R(U)}function C(U){return S(De(y(U),{replace:!0}))}function b(U){const X=U.matched[U.matched.length-1];if(X&&X.redirect){const{redirect:Y}=X;let V=typeof Y=="function"?Y(U):Y;return typeof V=="string"&&(V=V.includes("?")||V.includes("#")?V=y(V):{path:V},V.params={}),De({query:U.query,hash:U.hash,params:"path"in V?{}:U.params},V)}}function R(U,X){const Y=p=v(U),V=s.value,ee=U.state,D=U.force,B=U.replace===!0,G=b(Y);if(G)return R(De(y(G),{state:typeof G=="object"?De({},ee,G.state):ee,force:D,replace:B}),X||Y);const J=Y;J.redirectedFrom=X;let te;return!D&&bb(r,V,Y)&&(te=br(16,{to:J,from:V}),W(V,V,!0,!1)),(te?Promise.resolve(te):M(J,V)).catch(re=>jt(re)?jt(re,2)?re:P(re):I(re,J,V)).then(re=>{if(re){if(jt(re,2))return R(De({replace:B},y(re.to),{state:typeof re.to=="object"?De({},ee,re.to.state):ee,force:D}),X||J)}else re=k(J,V,!0,B,ee);return $(J,V,re),re})}function L(U,X){const Y=A(U,X);return Y?Promise.reject(Y):Promise.resolve()}function E(U){const X=z.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(U):U()}function M(U,X){let Y;const[V,ee,D]=y1(U,X);Y=Rs(V.reverse(),"beforeRouteLeave",U,X);for(const G of V)G.leaveGuards.forEach(J=>{Y.push(wn(J,U,X))});const B=L.bind(null,U,X);return Y.push(B),q(Y).then(()=>{Y=[];for(const G of u.list())Y.push(wn(G,U,X));return Y.push(B),q(Y)}).then(()=>{Y=Rs(ee,"beforeRouteUpdate",U,X);for(const G of ee)G.updateGuards.forEach(J=>{Y.push(wn(J,U,X))});return Y.push(B),q(Y)}).then(()=>{Y=[];for(const G of D)if(G.beforeEnter)if(Nt(G.beforeEnter))for(const J of G.beforeEnter)Y.push(wn(J,U,X));else Y.push(wn(G.beforeEnter,U,X));return Y.push(B),q(Y)}).then(()=>(U.matched.forEach(G=>G.enterCallbacks={}),Y=Rs(D,"beforeRouteEnter",U,X),Y.push(B),q(Y))).then(()=>{Y=[];for(const G of h.list())Y.push(wn(G,U,X));return Y.push(B),q(Y)}).catch(G=>jt(G,8)?G:Promise.reject(G))}function $(U,X,Y){g.list().forEach(V=>E(()=>V(U,X,Y)))}function k(U,X,Y,V,ee){const D=A(U,X);if(D)return D;const B=X===pn,G=rr?history.state:{};Y&&(V||B?f.replace(U.fullPath,De({scroll:B&&G&&G.scroll},ee)):f.push(U.fullPath,ee)),s.value=U,W(U,X,Y,B),P()}let _;function w(){_||(_=f.listen((U,X,Y)=>{if(!K.listening)return;const V=v(U),ee=b(V);if(ee){R(De(ee,{replace:!0}),V).catch(Zr);return}p=V;const D=s.value;rr&&Eb(qc(D.fullPath,Y.delta),Qo()),M(V,D).catch(B=>jt(B,12)?B:jt(B,2)?(R(B.to,V).then(G=>{jt(G,20)&&!Y.delta&&Y.type===fi.pop&&f.go(-1,!1)}).catch(Zr),Promise.reject()):(Y.delta&&f.go(-Y.delta,!1),I(B,V,D))).then(B=>{B=B||k(V,D,!1),B&&(Y.delta&&!jt(B,8)?f.go(-Y.delta,!1):Y.type===fi.pop&&jt(B,20)&&f.go(-1,!1)),$(V,D,B)}).catch(Zr)}))}let x=Fr(),T=Fr(),O;function I(U,X,Y){P(U);const V=T.list();return V.length?V.forEach(ee=>ee(U,X,Y)):console.error(U),Promise.reject(U)}function F(){return O&&s.value!==pn?Promise.resolve():new Promise((U,X)=>{x.add([U,X])})}function P(U){return O||(O=!U,w(),x.list().forEach(([X,Y])=>U?Y(U):X()),x.reset()),U}function W(U,X,Y,V){const{scrollBehavior:ee}=e;if(!rr||!ee)return Promise.resolve();const D=!Y&&Rb(qc(U.fullPath,0))||(V||!Y)&&history.state&&history.state.scroll||null;return bi().then(()=>ee(U,X,D)).then(B=>B&&kb(B)).catch(B=>I(B,U,X))}const j=U=>f.go(U);let H;const z=new Set,K={currentRoute:s,listening:!0,addRoute:c,removeRoute:l,hasRoute:m,getRoutes:d,resolve:v,options:e,push:S,replace:C,go:j,back:()=>j(-1),forward:()=>j(1),beforeEach:u.add,beforeResolve:h.add,afterEach:g.add,onError:T.add,isReady:F,install(U){const X=this;U.component("RouterLink",f1),U.component("RouterView",m1),U.config.globalProperties.$router=X,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>Jt(s)}),rr&&!H&&s.value===pn&&(H=!0,S(f.location).catch(ee=>{}));const Y={};for(const ee in pn)Object.defineProperty(Y,ee,{get:()=>s.value[ee],enumerable:!0});U.provide(es,X),U.provide(yl,Za(Y)),U.provide(ma,s);const V=U.unmount;z.add(U),U.unmount=function(){z.delete(U),z.size<1&&(p=pn,_&&_(),_=null,s.value=pn,H=!1,O=!1),V()}}};function q(U){return U.reduce((X,Y)=>X.then(()=>E(Y)),Promise.resolve())}return K}function y1(e,t){const n=[],r=[],f=[],u=Math.max(t.matched.length,e.matched.length);for(let h=0;h<u;h++){const g=t.matched[h];g&&(e.matched.find(p=>yr(p,g))?r.push(g):n.push(g));const s=e.matched[h];s&&(t.matched.find(p=>yr(p,s))||f.push(s))}return[n,r,f]}function Tr(){return xt(es)}function b1(){return xt(yl)}function ad(e){return Ga()?(hh(e),!0):!1}function wo(e){return typeof e=="function"?e():Jt(e)}const ld=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const w1=()=>{};function $1(e){return e||Mt()}function _1(...e){if(e.length!==1)return Do(...e);const t=e[0];return typeof t=="function"?Oo(No(()=>({get:t,set:w1}))):Fe(t)}function S1(e,t){$1(t)&&Rr(e,t)}function C1(e){var t;const n=wo(e);return(t=n==null?void 0:n.$el)!=null?t:n}const A1=ld?window:void 0,k1=ld?window.document:void 0;function E1(){const e=Fe(!1);return Mt()&&Ye(()=>{e.value=!0}),e}function R1(e){const t=E1();return ke(()=>(t.value,!!e()))}function x1(e,t,n={}){const{window:r=A1,...f}=n;let u;const h=R1(()=>r&&"MutationObserver"in r),g=()=>{u&&(u.disconnect(),u=void 0)},s=qe(()=>C1(e),i=>{g(),h.value&&r&&i&&(u=new MutationObserver(t),u.observe(i,f))},{immediate:!0}),p=()=>u==null?void 0:u.takeRecords(),o=()=>{g(),s()};return ad(o),{isSupported:h,stop:o,takeRecords:p}}function an(e=null,t={}){var n,r,f;const{document:u=k1,restoreOnUnmount:h=i=>i}=t,g=(n=u==null?void 0:u.title)!=null?n:"",s=_1((r=e??(u==null?void 0:u.title))!=null?r:null),p=e&&typeof e=="function";function o(i){if(!("titleTemplate"in t))return i;const a=t.titleTemplate||"%s";return typeof a=="function"?a(i):wo(a).replace(/%s/g,i)}return qe(s,(i,a)=>{i!==a&&u&&(u.title=o(typeof i=="string"?i:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&u&&!p&&x1((f=u.head)==null?void 0:f.querySelector("title"),()=>{u&&u.title!==s.value&&(s.value=o(u.title))},{childList:!0}),S1(()=>{if(h){const i=h(g,s.value||"");i!=null&&u&&(u.title=i)}}),s}/*! CAF: shared.mjs
|
767
767
|
v15.0.1 (c) 2022 Kyle Simpson
|
768
768
|
MIT License: http://getify.mit-license.org
|
769
|
-
*/const
|
769
|
+
*/const Zt=Symbol("Cleanup Function"),bl=Symbol("Timeout Token"),sr=Symbol("Signal Reason"),st=Symbol("Unset"),[eo,T1]=function(){var t=new AbortController,n=!!Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t.signal),"reason");try{t.abort()}catch{}return[n,$l(t.signal.reason)]}();class qn{constructor(t=new AbortController){var n;this.controller=t,this.signal=t.signal,this.signal[sr]=st;var r=(f,u)=>{var h=()=>{if(u&&this.signal){let g=Si(this.signal);this._trackSignalReason(g),u(g!==st?g:void 0)}u=null};this.signal.addEventListener("abort",h,!1),n=()=>{this.signal&&(this.signal.removeEventListener("abort",h,!1),this.signal.pr&&(this.signal.pr[Zt]=null)),h=null}};this.signal.pr=new Promise(r),this.signal.pr[Zt]=n,this.signal.pr.catch(n),r=n=null}abort(...t){var n=t.length>0?t[0]:st;this._trackSignalReason(n),this.controller&&(eo&&n!==st?this.controller.abort(n):this.controller.abort())}discard(){this.signal&&(this.signal.pr&&(this.signal.pr[Zt]&&this.signal.pr[Zt](),this.signal.pr=null),delete this.signal[sr],eo||(this.signal.reason=null),this.signal=null),this.controller=null}_trackSignalReason(t){this.signal&&t!==st&&(eo||"reason"in this.signal||(this.signal.reason=t),this.signal[sr]===st&&(this.signal[sr]=t))}}function Si(e){return e&&e.aborted?eo&&T1?$l(e.reason)?st:e.reason:sr in e?e[sr]:st:st}function cd(e){if(e.pr)return e.pr;var t,n=new Promise(function(f,u){t=()=>{if(u&&e){let h=Si(e);u(h!==st?h:void 0)}u=null},e.addEventListener("abort",t,!1)});return n[Zt]=function(){e&&(e.removeEventListener("abort",t,!1),e=null),n&&(n=n[Zt]=t=null)},n.catch(n[Zt]),n}function wl(e){e instanceof AbortController&&(e=new qn(e));var t=e&&e instanceof qn?e.signal:e;return{tokenOrSignal:e,signal:t,signalPr:cd(t)}}function va(){var e;return{pr:new Promise(t=>e=t),resolve:e}}function In(e){return typeof e=="function"}function L1(e){return e&&typeof e=="object"&&typeof e.then=="function"}function $l(e){return typeof e=="object"&&e instanceof Error&&e.name=="AbortError"}function ts(e,t){$l(t)||t===st?e.abort():e.abort(t)}/*! CAF: caf.mjs
|
770
770
|
v15.0.1 (c) 2022 Kyle Simpson
|
771
771
|
MIT License: http://getify.mit-license.org
|
772
|
-
*/const
|
772
|
+
*/const ya=Object.assign(M1,{cancelToken:qn,delay:ud,timeout:O1,signalRace:I1,signalAll:F1,tokenCycle:N1});function M1(e){return function(n,...r){var f,u;if({tokenOrSignal:n,signal:f,signalPr:u}=wl(n),f.aborted)return u;var h=u.catch(function(i){var a=Si(f);a=a!==st?a:i;try{var c=g.return();throw c.value!==void 0?c.value:a!==st?a:void 0}finally{g=s=h=p=null}}),{it:g,result:s}=D1.call(this,e,f,...r),p=Promise.race([s,h]);if(n!==f&&n[bl]){let o=function(a){ts(n,a),In(n.discard)&&n.discard(),n=o=null};p.then(o,o)}else p.catch(()=>{}),n=null;return r=null,p}}function ud(e,t){var n,r;return typeof e=="number"&&typeof t!="number"&&([t,e]=[e,t]),e&&({tokenOrSignal:e,signal:n,signalPr:r}=wl(e)),n&&n.aborted?r:new Promise(function(u,h){n&&(r.catch(function(){if(h&&n&&g){let p=Si(n);clearTimeout(g),h(p!==st?p:`delay (${t}) interrupted`),u=h=g=n=null}}),r=null);var g=setTimeout(function(){u(`delayed: ${t}`),u=h=g=n=null},t)})}function O1(e,t="Timeout"){e=Number(e)||0;var n=new qn;return ud(n.signal,e).then(()=>r(t),r),Object.defineProperty(n,bl,{value:!0,writable:!1,enumerable:!1,configurable:!1}),n;function r(...f){ts(n,f.length>0?f[0]:st),n.discard(),n=null}}function hd(e){return e.reduce(function(n,r){var f=cd(r);return n[0].push(f),r.pr||n[1].push(f),n},[[],[]])}function fd(e,t,n){e.then(function(f){ts(t,f),t.discard(),t=null}).then(function(){for(let f of n)f[Zt]&&f[Zt]();n=null})}function dd(e){return e.catch(t=>t)}function I1(e){var t=new qn,[n,r]=hd(e);return fd(dd(Promise.race(n)),t,r),t.signal}function F1(e){var t=new qn,[n,r]=hd(e);return fd(Promise.all(n.map(dd)),t,r),t.signal}function N1(){var e;return function(...n){return e&&(ts(e,n.length>0?n[0]:st),e.discard()),e=new qn}}function D1(e,...t){var n=e.apply(this,t);return e=t=null,{it:n,result:function r(f){try{var u=n.next(f);f=null}catch(h){return Promise.reject(h)}return function h(g){var s=Promise.resolve(g.value);return g.done?n=null:(s=s.then(r,function(o){return Promise.resolve(n.throw(o)).then(h)})).catch(function(){n=null}),g=null,s}(u)}()}}/*! CAF: cag.mjs
|
773
773
|
v15.0.1 (c) 2022 Kyle Simpson
|
774
774
|
MIT License: http://getify.mit-license.org
|
775
|
-
*/ba=va(ba);Object.assign(gd,{onEvent:md,onceEvent:ba});var ya=new WeakSet;const Rs=Symbol("unset"),pd=Symbol("returned"),hu=Symbol("canceled");function gd(e){return function(n,...r){var f,u;if({tokenOrSignal:n,signal:f,signalPr:u}=bl(n),f.aborted){let i=Si(f);throw i=i!==st?i:"Aborted",i}var h=ma(),{it:g,ait:s}=B1(e,h.pr,o,f,...r),p=s.return;return s.return=function(a){try{return h.pr.resolved=!0,h.resolve(pd),Promise.resolve(g.return(a))}finally{p.call(s),o()}},s;function o(){n&&n!==f&&n[yl]&&n.abort(),s&&(s.return=p,n=h=g=s=p=null)}}}function md(e,t,n,r=!1){var f,u,h=!1,g=gd(function*({pwait:i}){h||s();try{for(;;){if(f.length==0){let{pr:a,resolve:c}=ma();f.push(a),u.push(c)}yield yield i(f.shift())}}finally{Fn(t.removeEventListener)?t.removeEventListener(n,p,r):Fn(t.removeListener)?t.removeListener(n,p):Fn(t.off)&&t.off(n,p),f.length=u.length=0}})(e,t,n,r);return g.start=s,g;function s(){h||(h=!0,f=[],u=[],Fn(t.addEventListener)?t.addEventListener(n,p,r):Fn(t.addListener)?t.addListener(n,p):Fn(t.on)&&t.on(n,p))}function p(o){if(u.length>0)u.shift()(o);else{let{pr:i,resolve:a}=ma();f.push(i),a(o)}}}function*ba(e,t,n,r=!1){try{var f=md(e,t,n,r);return(yield f.next()).value}finally{f.return()}}function P1(e){var t=Promise.resolve(e);return ya.add(t),t}function B1(e,t,n,r,...f){var u=e.call(this,{signal:r,pwait:P1},...f);e=f=null;var h=r.pr.catch(g=>{throw{[hu]:!0,reason:g}});return h.catch(()=>{}),{it:u,ait:async function*(){var s,p=Rs;try{for(;!t.resolved;)if(p!==Rs?(s=p,p=Rs,s=u.throw(s)):s=u.next(s),L1(s.value))if(ya.has(s.value)){ya.delete(s.value);try{if((s=await Promise.race([t,h,s.value]))===pd)return}catch(o){if(o[hu]){let i=u.return();throw i.value!==void 0?i.value:o.reason}p=o}}else s=yield s.value;else{if(s.done)return s.value;s=yield s.value}}finally{u=t=null,n()}}()}}const W1=e=>e._runningInstances.length>=e._maxConcurrency,H1=e=>{const t=e._activeInstances[0];t&&t.cancel()},U1=e=>{e._enqueuedInstances.forEach(t=>{t.isEnqueued=!1,t.isDropped=!0})};function Dr(e,t){return t?z1(()=>e()._instances,t):ke(()=>[])}function z1(e,t,n){return ke(()=>e().filter(r=>{const f=r[t];return n?f===n:f}))}function V1(e){return ke(()=>e().length)}function fu(e){return ke(()=>{const t=e();return t[t.length-1]})}function j1(e){return ke(()=>e()[0])}const vd=e=>e;function yd(e){return xr(e)}function G1(){const e={},t=new Promise((n,r)=>{e.resolve=n,e.reject=r});return e.promise=t,e}function ht(e){return X1(function*(t,...n){return e(t,...n)})}function K1(e,t,n){const r=vd({id:n.id,isDropped:!1,isEnqueued:!1,hasStarted:!1,isRunning:!1,isFinished:!1,isCanceling:!1,isCanceled:ke(()=>f.isCanceling&&f.isFinished),isActive:ke(()=>f.isRunning&&!f.isCanceling),isSuccessful:!1,isNotDropped:ke(()=>!f.isDropped),isError:ke(()=>!!f.error),status:ke(()=>{const h=f,g=[[h.isRunning,"running"],[h.isEnqueued,"enqueued"],[h.isCanceled,"canceled"],[h.isCanceling,"canceling"],[h.isDropped,"dropped"],[h.isError,"error"],[h.isSuccessful,"success"]].find(([s])=>s);return g&&g[1]}),error:null,value:null,cancel({force:h}={force:!1}){if(h||(f.isCanceling=!0,f.isEnqueued&&(f.isFinished=!0),f.isEnqueued=!1),f.token&&f._canAbort){f.token.abort("cancel");try{f.token.discard()}catch{}f.token=void 0,f._canAbort=!1}},canceledOn(h){return h.pr.catch(()=>{f.cancel()}),f},_run(){Y1(f,e,t,n)},_handled:!0,_deferredObject:G1(),_shouldThrow:!1,_canAbort:!0,then(h,g){return f._shouldThrow=!0,f._deferredObject.promise.then(h,g)},catch(h,g=!0){return f._shouldThrow=g,f._deferredObject.promise.catch(h)},finally(h){return f._shouldThrow=!0,f._deferredObject.promise.finally(h)}}),f=yd(r),{modifiers:u}=n;return u.drop?f.isDropped=!0:u.enqueue?f.isEnqueued=!0:f._run(),f}function Y1(e,t,n,r){const f=new va.cancelToken,u=va(t,f);e.token=f,e.hasStarted=!0,e.isRunning=!0,e.isEnqueued=!1;function h(){e.isRunning=!1,e.isFinished=!0}u.call(e,f,...n).then(g=>{e.value=g,e.isSuccessful=!0,h(),e._deferredObject.resolve(g),e._canAbort=!1,r.onFinish(e)}).catch(g=>{g!=="cancel"&&(e.error=g),h(),e._shouldThrow&&e._deferredObject.reject(g),r.onFinish(e)})}function X1(e,t={cancelOnUnmount:!0}){const n=Mt(),r=ch(),f=vd({_isRestartable:!1,_isDropping:!1,_isEnqueuing:!1,_isKeepingLatest:!1,_maxConcurrency:1,_hasConcurrency:ke(()=>u._isRestartable||u._isDropping||u._isEnqueuing||u._isKeepingLatest),isIdle:ke(()=>!u.isRunning),isRunning:ke(()=>!!u._instances.find(h=>h.isRunning)),isError:ke(()=>!!(u.last&&u.last.isError)),_instances:[],_successfulInstances:Dr(()=>u,"isSuccessful"),_runningInstances:Dr(()=>u,"isRunning"),_enqueuedInstances:Dr(()=>u,"isEnqueued"),_notDroppedInstances:Dr(()=>u,"isNotDropped"),_activeInstances:Dr(()=>u,"isActive"),performCount:V1(()=>u._instances),last:fu(()=>u._notDroppedInstances),lastSuccessful:fu(()=>u._successfulInstances),firstEnqueued:j1(()=>u._enqueuedInstances),cancelAll({force:h}={force:!1}){u._instances.forEach(g=>{try{(h||!g.isDropped&&!g.isFinished)&&g.cancel({force:h})}catch(s){if(s!=="cancel")throw s}})},perform(...h){const g={enqueue:!1,drop:!1};u._hasConcurrency&&W1(u)&&(u._isDropping&&(g.drop=!0),u._isRestartable&&H1(u),u._isKeepingLatest&&U1(u),(u._isEnqueuing||u._isKeepingLatest)&&(g.enqueue=!0));const s=()=>Z1(u),p=()=>K1(e,h,{modifiers:g,onFinish:s,scope:r,id:u._instances.length+1}),o=r.active?r.run(p):p();return r.active||console.warn("Task instance has been created in inactive scope. Perhaps youre creating task out of setup?"),u._instances=[...u._instances,o],o},clear(){this.cancelAll({force:!0}),this._instances=[]},destroy(){r.stop(),this.clear()},restartable(){return u._resetModifierFlags(),u._isRestartable=!0,u},drop(){return u._resetModifierFlags(),u._isDropping=!0,u},enqueue(){return u._resetModifierFlags(),u._isEnqueuing=!0,u},keepLatest(){return u._resetModifierFlags(),u._isKeepingLatest=!0,u},_resetModifierFlags(){u._isKeepingLatest=!1,u._isRestartable=!1,u._isEnqueuing=!1,u._isDropping=!1},maxConcurrency(h){return u._maxConcurrency=h,u}}),u=yd(f);return n&&t.cancelOnUnmount&&Rr(()=>{u._instances&&u.destroy()}),u}function Z1(e){if(e._isEnqueuing||e._isKeepingLatest){const{firstEnqueued:t}=e;t&&t._run()}}function bd(e,t){return function(){return e.apply(t,arguments)}}const{toString:q1}=Object.prototype,{getPrototypeOf:$l}=Object,ns=(e=>t=>{const n=q1.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vt=e=>(e=e.toLowerCase(),t=>ns(t)===e),rs=e=>t=>typeof t===e,{isArray:Mr}=Array,di=rs("undefined");function J1(e){return e!==null&&!di(e)&&e.constructor!==null&&!di(e.constructor)&&Lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wd=Vt("ArrayBuffer");function Q1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wd(e.buffer),t}const ew=rs("string"),Lt=rs("function"),$d=rs("number"),is=e=>e!==null&&typeof e=="object",tw=e=>e===!0||e===!1,to=e=>{if(ns(e)!=="object")return!1;const t=$l(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nw=Vt("Date"),rw=Vt("File"),iw=Vt("Blob"),ow=Vt("FileList"),sw=e=>is(e)&&Lt(e.pipe),aw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lt(e.append)&&((t=ns(e))==="formdata"||t==="object"&&Lt(e.toString)&&e.toString()==="[object FormData]"))},lw=Vt("URLSearchParams"),cw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ci(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,f;if(typeof e!="object"&&(e=[e]),Mr(e))for(r=0,f=e.length;r<f;r++)t.call(null,e[r],r,e);else{const u=n?Object.getOwnPropertyNames(e):Object.keys(e),h=u.length;let g;for(r=0;r<h;r++)g=u[r],t.call(null,e[g],g,e)}}function _d(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,f;for(;r-- >0;)if(f=n[r],t===f.toLowerCase())return f;return null}const Sd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cd=e=>!di(e)&&e!==Sd;function wa(){const{caseless:e}=Cd(this)&&this||{},t={},n=(r,f)=>{const u=e&&_d(t,f)||f;to(t[u])&&to(r)?t[u]=wa(t[u],r):to(r)?t[u]=wa({},r):Mr(r)?t[u]=r.slice():t[u]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ci(arguments[r],n);return t}const uw=(e,t,n,{allOwnKeys:r}={})=>(Ci(t,(f,u)=>{n&&Lt(f)?e[u]=bd(f,n):e[u]=f},{allOwnKeys:r}),e),hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},dw=(e,t,n,r)=>{let f,u,h;const g={};if(t=t||{},e==null)return t;do{for(f=Object.getOwnPropertyNames(e),u=f.length;u-- >0;)h=f[u],(!r||r(h,e,t))&&!g[h]&&(t[h]=e[h],g[h]=!0);e=n!==!1&&$l(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gw=e=>{if(!e)return null;if(Mr(e))return e;let t=e.length;if(!$d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$l(Uint8Array)),vw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let f;for(;(f=r.next())&&!f.done;){const u=f.value;t.call(e,u[0],u[1])}},yw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bw=Vt("HTMLFormElement"),ww=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,f){return r.toUpperCase()+f}),du=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$w=Vt("RegExp"),Ad=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ci(n,(f,u)=>{let h;(h=t(f,u,e))!==!1&&(r[u]=h||f)}),Object.defineProperties(e,r)},_w=e=>{Ad(e,(t,n)=>{if(Lt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Lt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Sw=(e,t)=>{const n={},r=f=>{f.forEach(u=>{n[u]=!0})};return Mr(e)?r(e):r(String(e).split(t)),n},Cw=()=>{},Aw=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ts="abcdefghijklmnopqrstuvwxyz",pu="0123456789",kd={DIGIT:pu,ALPHA:Ts,ALPHA_DIGIT:Ts+Ts.toUpperCase()+pu},kw=(e=16,t=kd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ew(e){return!!(e&&Lt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const xw=e=>{const t=new Array(10),n=(r,f)=>{if(is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[f]=r;const u=Mr(r)?[]:{};return Ci(r,(h,g)=>{const s=n(h,f+1);!di(s)&&(u[g]=s)}),t[f]=void 0,u}}return r};return n(e,0)},Rw=Vt("AsyncFunction"),Tw=e=>e&&(is(e)||Lt(e))&&Lt(e.then)&&Lt(e.catch),ne={isArray:Mr,isArrayBuffer:wd,isBuffer:J1,isFormData:aw,isArrayBufferView:Q1,isString:ew,isNumber:$d,isBoolean:tw,isObject:is,isPlainObject:to,isUndefined:di,isDate:nw,isFile:rw,isBlob:iw,isRegExp:$w,isFunction:Lt,isStream:sw,isURLSearchParams:lw,isTypedArray:mw,isFileList:ow,forEach:Ci,merge:wa,extend:uw,trim:cw,stripBOM:hw,inherits:fw,toFlatObject:dw,kindOf:ns,kindOfTest:Vt,endsWith:pw,toArray:gw,forEachEntry:vw,matchAll:yw,isHTMLForm:bw,hasOwnProperty:du,hasOwnProp:du,reduceDescriptors:Ad,freezeMethods:_w,toObjectSet:Sw,toCamelCase:ww,noop:Cw,toFiniteNumber:Aw,findKey:_d,global:Sd,isContextDefined:Cd,ALPHABET:kd,generateString:kw,isSpecCompliantForm:Ew,toJSONObject:xw,isAsyncFn:Rw,isThenable:Tw};function Oe(e,t,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f)}ne.inherits(Oe,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:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ed=Oe.prototype,xd={};["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(e=>{xd[e]={value:e}});Object.defineProperties(Oe,xd);Object.defineProperty(Ed,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,f,u)=>{const h=Object.create(Ed);return ne.toFlatObject(e,h,function(s){return s!==Error.prototype},g=>g!=="isAxiosError"),Oe.call(h,e.message,t,n,r,f),h.cause=e,h.name=e.name,u&&Object.assign(h,u),h};const Lw=null;function $a(e){return ne.isPlainObject(e)||ne.isArray(e)}function Rd(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function gu(e,t,n){return e?e.concat(t).map(function(f,u){return f=Rd(f),!n&&u?"["+f+"]":f}).join(n?".":""):t}function Mw(e){return ne.isArray(e)&&!e.some($a)}const Ow=ne.toFlatObject(ne,{},null,function(t){return/^is[A-Z]/.test(t)});function os(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!ne.isUndefined(m[d])});const r=n.metaTokens,f=n.visitor||o,u=n.dots,h=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(f))throw new TypeError("visitor must be a function");function p(l){if(l===null)return"";if(ne.isDate(l))return l.toISOString();if(!s&&ne.isBlob(l))throw new Oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(l)||ne.isTypedArray(l)?s&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function o(l,d,m){let v=l;if(l&&!m&&typeof l=="object"){if(ne.endsWith(d,"{}"))d=r?d:d.slice(0,-2),l=JSON.stringify(l);else if(ne.isArray(l)&&Mw(l)||(ne.isFileList(l)||ne.endsWith(d,"[]"))&&(v=ne.toArray(l)))return d=Rd(d),v.forEach(function(A,S){!(ne.isUndefined(A)||A===null)&&t.append(h===!0?gu([d],S,u):h===null?d:d+"[]",p(A))}),!1}return $a(l)?!0:(t.append(gu(m,d,u),p(l)),!1)}const i=[],a=Object.assign(Ow,{defaultVisitor:o,convertValue:p,isVisitable:$a});function c(l,d){if(!ne.isUndefined(l)){if(i.indexOf(l)!==-1)throw Error("Circular reference detected in "+d.join("."));i.push(l),ne.forEach(l,function(v,y){(!(ne.isUndefined(v)||v===null)&&f.call(t,v,ne.isString(y)?y.trim():y,d,a))===!0&&c(v,d?d.concat(y):[y])}),i.pop()}}if(!ne.isObject(e))throw new TypeError("data must be an object");return c(e),t}function mu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _l(e,t){this._pairs=[],e&&os(e,this,t)}const Td=_l.prototype;Td.append=function(t,n){this._pairs.push([t,n])};Td.toString=function(t){const n=t?function(r){return t.call(this,r,mu)}:mu;return this._pairs.map(function(f){return n(f[0])+"="+n(f[1])},"").join("&")};function Iw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ld(e,t,n){if(!t)return e;const r=n&&n.encode||Iw,f=n&&n.serialize;let u;if(f?u=f(t,n):u=ne.isURLSearchParams(t)?t.toString():new _l(t,n).toString(r),u){const h=e.indexOf("#");h!==-1&&(e=e.slice(0,h)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class vu{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,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){ne.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Md={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fw=typeof URLSearchParams<"u"?URLSearchParams:_l,Nw=typeof FormData<"u"?FormData:null,Dw=typeof Blob<"u"?Blob:null,Pw={isBrowser:!0,classes:{URLSearchParams:Fw,FormData:Nw,Blob:Dw},protocols:["http","https","file","blob","url","data"]},Od=typeof window<"u"&&typeof document<"u",Bw=(e=>Od&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Ww=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Od,hasStandardBrowserEnv:Bw,hasStandardBrowserWebWorkerEnv:Ww},Symbol.toStringTag,{value:"Module"})),Wt={...Hw,...Pw};function Uw(e,t){return os(e,new Wt.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,u){return Wt.isNode&&ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function zw(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Vw(e){const t={},n=Object.keys(e);let r;const f=n.length;let u;for(r=0;r<f;r++)u=n[r],t[u]=e[u];return t}function Id(e){function t(n,r,f,u){let h=n[u++];const g=Number.isFinite(+h),s=u>=n.length;return h=!h&&ne.isArray(f)?f.length:h,s?(ne.hasOwnProp(f,h)?f[h]=[f[h],r]:f[h]=r,!g):((!f[h]||!ne.isObject(f[h]))&&(f[h]=[]),t(n,r,f[h],u)&&ne.isArray(f[h])&&(f[h]=Vw(f[h])),!g)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(r,f)=>{t(zw(r),f,n,0)}),n}return null}function jw(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Sl={transitional:Md,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",f=r.indexOf("application/json")>-1,u=ne.isObject(t);if(u&&ne.isHTMLForm(t)&&(t=new FormData(t)),ne.isFormData(t))return f&&f?JSON.stringify(Id(t)):t;if(ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let g;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Uw(t,this.formSerializer).toString();if((g=ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return os(g?{"files[]":t}:t,s&&new s,this.formSerializer)}}return u||f?(n.setContentType("application/json",!1),jw(t)):t}],transformResponse:[function(t){const n=this.transitional||Sl.transitional,r=n&&n.forcedJSONParsing,f=this.responseType==="json";if(t&&ne.isString(t)&&(r&&!this.responseType||f)){const h=!(n&&n.silentJSONParsing)&&f;try{return JSON.parse(t)}catch(g){if(h)throw g.name==="SyntaxError"?Oe.from(g,Oe.ERR_BAD_RESPONSE,this,null,this.response):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],e=>{Sl.headers[e]={}});const Cl=Sl,Gw=ne.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"]),Kw=e=>{const t={};let n,r,f;return e&&e.split(`
|
776
|
-
`).forEach(function(h){f=h.indexOf(":"),n=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim(),!(!n||t[n]&&Gw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yu=Symbol("internals");function
|
777
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(f=>r.set(f)),r}static accessor(t){const r=(this[yu]=this[yu]={accessors:{}}).accessors,f=this.prototype;function u(h){const g=
|
775
|
+
*/wa=ya(wa);Object.assign(gd,{onEvent:md,onceEvent:wa});var ba=new WeakSet;const xs=Symbol("unset"),pd=Symbol("returned"),hu=Symbol("canceled");function gd(e){return function(n,...r){var f,u;if({tokenOrSignal:n,signal:f,signalPr:u}=wl(n),f.aborted){let i=Si(f);throw i=i!==st?i:"Aborted",i}var h=va(),{it:g,ait:s}=B1(e,h.pr,o,f,...r),p=s.return;return s.return=function(a){try{return h.pr.resolved=!0,h.resolve(pd),Promise.resolve(g.return(a))}finally{p.call(s),o()}},s;function o(){n&&n!==f&&n[bl]&&n.abort(),s&&(s.return=p,n=h=g=s=p=null)}}}function md(e,t,n,r=!1){var f,u,h=!1,g=gd(function*({pwait:i}){h||s();try{for(;;){if(f.length==0){let{pr:a,resolve:c}=va();f.push(a),u.push(c)}yield yield i(f.shift())}}finally{In(t.removeEventListener)?t.removeEventListener(n,p,r):In(t.removeListener)?t.removeListener(n,p):In(t.off)&&t.off(n,p),f.length=u.length=0}})(e,t,n,r);return g.start=s,g;function s(){h||(h=!0,f=[],u=[],In(t.addEventListener)?t.addEventListener(n,p,r):In(t.addListener)?t.addListener(n,p):In(t.on)&&t.on(n,p))}function p(o){if(u.length>0)u.shift()(o);else{let{pr:i,resolve:a}=va();f.push(i),a(o)}}}function*wa(e,t,n,r=!1){try{var f=md(e,t,n,r);return(yield f.next()).value}finally{f.return()}}function P1(e){var t=Promise.resolve(e);return ba.add(t),t}function B1(e,t,n,r,...f){var u=e.call(this,{signal:r,pwait:P1},...f);e=f=null;var h=r.pr.catch(g=>{throw{[hu]:!0,reason:g}});return h.catch(()=>{}),{it:u,ait:async function*(){var s,p=xs;try{for(;!t.resolved;)if(p!==xs?(s=p,p=xs,s=u.throw(s)):s=u.next(s),L1(s.value))if(ba.has(s.value)){ba.delete(s.value);try{if((s=await Promise.race([t,h,s.value]))===pd)return}catch(o){if(o[hu]){let i=u.return();throw i.value!==void 0?i.value:o.reason}p=o}}else s=yield s.value;else{if(s.done)return s.value;s=yield s.value}}finally{u=t=null,n()}}()}}const W1=e=>e._runningInstances.length>=e._maxConcurrency,H1=e=>{const t=e._activeInstances[0];t&&t.cancel()},U1=e=>{e._enqueuedInstances.forEach(t=>{t.isEnqueued=!1,t.isDropped=!0})};function Nr(e,t){return t?z1(()=>e()._instances,t):ke(()=>[])}function z1(e,t,n){return ke(()=>e().filter(r=>{const f=r[t];return n?f===n:f}))}function V1(e){return ke(()=>e().length)}function fu(e){return ke(()=>{const t=e();return t[t.length-1]})}function j1(e){return ke(()=>e()[0])}const vd=e=>e;function yd(e){return Er(e)}function G1(){const e={},t=new Promise((n,r)=>{e.resolve=n,e.reject=r});return e.promise=t,e}function ht(e){return X1(function*(t,...n){return e(t,...n)})}function K1(e,t,n){const r=vd({id:n.id,isDropped:!1,isEnqueued:!1,hasStarted:!1,isRunning:!1,isFinished:!1,isCanceling:!1,isCanceled:ke(()=>f.isCanceling&&f.isFinished),isActive:ke(()=>f.isRunning&&!f.isCanceling),isSuccessful:!1,isNotDropped:ke(()=>!f.isDropped),isError:ke(()=>!!f.error),status:ke(()=>{const h=f,g=[[h.isRunning,"running"],[h.isEnqueued,"enqueued"],[h.isCanceled,"canceled"],[h.isCanceling,"canceling"],[h.isDropped,"dropped"],[h.isError,"error"],[h.isSuccessful,"success"]].find(([s])=>s);return g&&g[1]}),error:null,value:null,cancel({force:h}={force:!1}){if(h||(f.isCanceling=!0,f.isEnqueued&&(f.isFinished=!0),f.isEnqueued=!1),f.token&&f._canAbort){f.token.abort("cancel");try{f.token.discard()}catch{}f.token=void 0,f._canAbort=!1}},canceledOn(h){return h.pr.catch(()=>{f.cancel()}),f},_run(){Y1(f,e,t,n)},_handled:!0,_deferredObject:G1(),_shouldThrow:!1,_canAbort:!0,then(h,g){return f._shouldThrow=!0,f._deferredObject.promise.then(h,g)},catch(h,g=!0){return f._shouldThrow=g,f._deferredObject.promise.catch(h)},finally(h){return f._shouldThrow=!0,f._deferredObject.promise.finally(h)}}),f=yd(r),{modifiers:u}=n;return u.drop?f.isDropped=!0:u.enqueue?f.isEnqueued=!0:f._run(),f}function Y1(e,t,n,r){const f=new ya.cancelToken,u=ya(t,f);e.token=f,e.hasStarted=!0,e.isRunning=!0,e.isEnqueued=!1;function h(){e.isRunning=!1,e.isFinished=!0}u.call(e,f,...n).then(g=>{e.value=g,e.isSuccessful=!0,h(),e._deferredObject.resolve(g),e._canAbort=!1,r.onFinish(e)}).catch(g=>{g!=="cancel"&&(e.error=g),h(),e._shouldThrow&&e._deferredObject.reject(g),r.onFinish(e)})}function X1(e,t={cancelOnUnmount:!0}){const n=Mt(),r=ch(),f=vd({_isRestartable:!1,_isDropping:!1,_isEnqueuing:!1,_isKeepingLatest:!1,_maxConcurrency:1,_hasConcurrency:ke(()=>u._isRestartable||u._isDropping||u._isEnqueuing||u._isKeepingLatest),isIdle:ke(()=>!u.isRunning),isRunning:ke(()=>!!u._instances.find(h=>h.isRunning)),isError:ke(()=>!!(u.last&&u.last.isError)),_instances:[],_successfulInstances:Nr(()=>u,"isSuccessful"),_runningInstances:Nr(()=>u,"isRunning"),_enqueuedInstances:Nr(()=>u,"isEnqueued"),_notDroppedInstances:Nr(()=>u,"isNotDropped"),_activeInstances:Nr(()=>u,"isActive"),performCount:V1(()=>u._instances),last:fu(()=>u._notDroppedInstances),lastSuccessful:fu(()=>u._successfulInstances),firstEnqueued:j1(()=>u._enqueuedInstances),cancelAll({force:h}={force:!1}){u._instances.forEach(g=>{try{(h||!g.isDropped&&!g.isFinished)&&g.cancel({force:h})}catch(s){if(s!=="cancel")throw s}})},perform(...h){const g={enqueue:!1,drop:!1};u._hasConcurrency&&W1(u)&&(u._isDropping&&(g.drop=!0),u._isRestartable&&H1(u),u._isKeepingLatest&&U1(u),(u._isEnqueuing||u._isKeepingLatest)&&(g.enqueue=!0));const s=()=>Z1(u),p=()=>K1(e,h,{modifiers:g,onFinish:s,scope:r,id:u._instances.length+1}),o=r.active?r.run(p):p();return r.active||console.warn("Task instance has been created in inactive scope. Perhaps youre creating task out of setup?"),u._instances=[...u._instances,o],o},clear(){this.cancelAll({force:!0}),this._instances=[]},destroy(){r.stop(),this.clear()},restartable(){return u._resetModifierFlags(),u._isRestartable=!0,u},drop(){return u._resetModifierFlags(),u._isDropping=!0,u},enqueue(){return u._resetModifierFlags(),u._isEnqueuing=!0,u},keepLatest(){return u._resetModifierFlags(),u._isKeepingLatest=!0,u},_resetModifierFlags(){u._isKeepingLatest=!1,u._isRestartable=!1,u._isEnqueuing=!1,u._isDropping=!1},maxConcurrency(h){return u._maxConcurrency=h,u}}),u=yd(f);return n&&t.cancelOnUnmount&&Rr(()=>{u._instances&&u.destroy()}),u}function Z1(e){if(e._isEnqueuing||e._isKeepingLatest){const{firstEnqueued:t}=e;t&&t._run()}}function bd(e,t){return function(){return e.apply(t,arguments)}}const{toString:q1}=Object.prototype,{getPrototypeOf:_l}=Object,ns=(e=>t=>{const n=q1.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Vt=e=>(e=e.toLowerCase(),t=>ns(t)===e),rs=e=>t=>typeof t===e,{isArray:Lr}=Array,di=rs("undefined");function J1(e){return e!==null&&!di(e)&&e.constructor!==null&&!di(e.constructor)&&Lt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const wd=Vt("ArrayBuffer");function Q1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&wd(e.buffer),t}const ew=rs("string"),Lt=rs("function"),$d=rs("number"),is=e=>e!==null&&typeof e=="object",tw=e=>e===!0||e===!1,to=e=>{if(ns(e)!=="object")return!1;const t=_l(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},nw=Vt("Date"),rw=Vt("File"),iw=Vt("Blob"),ow=Vt("FileList"),sw=e=>is(e)&&Lt(e.pipe),aw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Lt(e.append)&&((t=ns(e))==="formdata"||t==="object"&&Lt(e.toString)&&e.toString()==="[object FormData]"))},lw=Vt("URLSearchParams"),cw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ci(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,f;if(typeof e!="object"&&(e=[e]),Lr(e))for(r=0,f=e.length;r<f;r++)t.call(null,e[r],r,e);else{const u=n?Object.getOwnPropertyNames(e):Object.keys(e),h=u.length;let g;for(r=0;r<h;r++)g=u[r],t.call(null,e[g],g,e)}}function _d(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,f;for(;r-- >0;)if(f=n[r],t===f.toLowerCase())return f;return null}const Sd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cd=e=>!di(e)&&e!==Sd;function $a(){const{caseless:e}=Cd(this)&&this||{},t={},n=(r,f)=>{const u=e&&_d(t,f)||f;to(t[u])&&to(r)?t[u]=$a(t[u],r):to(r)?t[u]=$a({},r):Lr(r)?t[u]=r.slice():t[u]=r};for(let r=0,f=arguments.length;r<f;r++)arguments[r]&&Ci(arguments[r],n);return t}const uw=(e,t,n,{allOwnKeys:r}={})=>(Ci(t,(f,u)=>{n&&Lt(f)?e[u]=bd(f,n):e[u]=f},{allOwnKeys:r}),e),hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},dw=(e,t,n,r)=>{let f,u,h;const g={};if(t=t||{},e==null)return t;do{for(f=Object.getOwnPropertyNames(e),u=f.length;u-- >0;)h=f[u],(!r||r(h,e,t))&&!g[h]&&(t[h]=e[h],g[h]=!0);e=n!==!1&&_l(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},pw=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gw=e=>{if(!e)return null;if(Lr(e))return e;let t=e.length;if(!$d(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mw=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_l(Uint8Array)),vw=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let f;for(;(f=r.next())&&!f.done;){const u=f.value;t.call(e,u[0],u[1])}},yw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bw=Vt("HTMLFormElement"),ww=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,f){return r.toUpperCase()+f}),du=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$w=Vt("RegExp"),Ad=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ci(n,(f,u)=>{let h;(h=t(f,u,e))!==!1&&(r[u]=h||f)}),Object.defineProperties(e,r)},_w=e=>{Ad(e,(t,n)=>{if(Lt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Lt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Sw=(e,t)=>{const n={},r=f=>{f.forEach(u=>{n[u]=!0})};return Lr(e)?r(e):r(String(e).split(t)),n},Cw=()=>{},Aw=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ts="abcdefghijklmnopqrstuvwxyz",pu="0123456789",kd={DIGIT:pu,ALPHA:Ts,ALPHA_DIGIT:Ts+Ts.toUpperCase()+pu},kw=(e=16,t=kd.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ew(e){return!!(e&&Lt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Rw=e=>{const t=new Array(10),n=(r,f)=>{if(is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[f]=r;const u=Lr(r)?[]:{};return Ci(r,(h,g)=>{const s=n(h,f+1);!di(s)&&(u[g]=s)}),t[f]=void 0,u}}return r};return n(e,0)},xw=Vt("AsyncFunction"),Tw=e=>e&&(is(e)||Lt(e))&&Lt(e.then)&&Lt(e.catch),ne={isArray:Lr,isArrayBuffer:wd,isBuffer:J1,isFormData:aw,isArrayBufferView:Q1,isString:ew,isNumber:$d,isBoolean:tw,isObject:is,isPlainObject:to,isUndefined:di,isDate:nw,isFile:rw,isBlob:iw,isRegExp:$w,isFunction:Lt,isStream:sw,isURLSearchParams:lw,isTypedArray:mw,isFileList:ow,forEach:Ci,merge:$a,extend:uw,trim:cw,stripBOM:hw,inherits:fw,toFlatObject:dw,kindOf:ns,kindOfTest:Vt,endsWith:pw,toArray:gw,forEachEntry:vw,matchAll:yw,isHTMLForm:bw,hasOwnProperty:du,hasOwnProp:du,reduceDescriptors:Ad,freezeMethods:_w,toObjectSet:Sw,toCamelCase:ww,noop:Cw,toFiniteNumber:Aw,findKey:_d,global:Sd,isContextDefined:Cd,ALPHABET:kd,generateString:kw,isSpecCompliantForm:Ew,toJSONObject:Rw,isAsyncFn:xw,isThenable:Tw};function Oe(e,t,n,r,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),f&&(this.response=f)}ne.inherits(Oe,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:ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ed=Oe.prototype,Rd={};["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(e=>{Rd[e]={value:e}});Object.defineProperties(Oe,Rd);Object.defineProperty(Ed,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,f,u)=>{const h=Object.create(Ed);return ne.toFlatObject(e,h,function(s){return s!==Error.prototype},g=>g!=="isAxiosError"),Oe.call(h,e.message,t,n,r,f),h.cause=e,h.name=e.name,u&&Object.assign(h,u),h};const Lw=null;function _a(e){return ne.isPlainObject(e)||ne.isArray(e)}function xd(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function gu(e,t,n){return e?e.concat(t).map(function(f,u){return f=xd(f),!n&&u?"["+f+"]":f}).join(n?".":""):t}function Mw(e){return ne.isArray(e)&&!e.some(_a)}const Ow=ne.toFlatObject(ne,{},null,function(t){return/^is[A-Z]/.test(t)});function os(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,m){return!ne.isUndefined(m[d])});const r=n.metaTokens,f=n.visitor||o,u=n.dots,h=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&ne.isSpecCompliantForm(t);if(!ne.isFunction(f))throw new TypeError("visitor must be a function");function p(l){if(l===null)return"";if(ne.isDate(l))return l.toISOString();if(!s&&ne.isBlob(l))throw new Oe("Blob is not supported. Use a Buffer instead.");return ne.isArrayBuffer(l)||ne.isTypedArray(l)?s&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function o(l,d,m){let v=l;if(l&&!m&&typeof l=="object"){if(ne.endsWith(d,"{}"))d=r?d:d.slice(0,-2),l=JSON.stringify(l);else if(ne.isArray(l)&&Mw(l)||(ne.isFileList(l)||ne.endsWith(d,"[]"))&&(v=ne.toArray(l)))return d=xd(d),v.forEach(function(A,S){!(ne.isUndefined(A)||A===null)&&t.append(h===!0?gu([d],S,u):h===null?d:d+"[]",p(A))}),!1}return _a(l)?!0:(t.append(gu(m,d,u),p(l)),!1)}const i=[],a=Object.assign(Ow,{defaultVisitor:o,convertValue:p,isVisitable:_a});function c(l,d){if(!ne.isUndefined(l)){if(i.indexOf(l)!==-1)throw Error("Circular reference detected in "+d.join("."));i.push(l),ne.forEach(l,function(v,y){(!(ne.isUndefined(v)||v===null)&&f.call(t,v,ne.isString(y)?y.trim():y,d,a))===!0&&c(v,d?d.concat(y):[y])}),i.pop()}}if(!ne.isObject(e))throw new TypeError("data must be an object");return c(e),t}function mu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Sl(e,t){this._pairs=[],e&&os(e,this,t)}const Td=Sl.prototype;Td.append=function(t,n){this._pairs.push([t,n])};Td.toString=function(t){const n=t?function(r){return t.call(this,r,mu)}:mu;return this._pairs.map(function(f){return n(f[0])+"="+n(f[1])},"").join("&")};function Iw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ld(e,t,n){if(!t)return e;const r=n&&n.encode||Iw,f=n&&n.serialize;let u;if(f?u=f(t,n):u=ne.isURLSearchParams(t)?t.toString():new Sl(t,n).toString(r),u){const h=e.indexOf("#");h!==-1&&(e=e.slice(0,h)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class vu{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,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){ne.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Md={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fw=typeof URLSearchParams<"u"?URLSearchParams:Sl,Nw=typeof FormData<"u"?FormData:null,Dw=typeof Blob<"u"?Blob:null,Pw={isBrowser:!0,classes:{URLSearchParams:Fw,FormData:Nw,Blob:Dw},protocols:["http","https","file","blob","url","data"]},Od=typeof window<"u"&&typeof document<"u",Bw=(e=>Od&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Ww=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hw=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Od,hasStandardBrowserEnv:Bw,hasStandardBrowserWebWorkerEnv:Ww},Symbol.toStringTag,{value:"Module"})),Wt={...Hw,...Pw};function Uw(e,t){return os(e,new Wt.classes.URLSearchParams,Object.assign({visitor:function(n,r,f,u){return Wt.isNode&&ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)}},t))}function zw(e){return ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Vw(e){const t={},n=Object.keys(e);let r;const f=n.length;let u;for(r=0;r<f;r++)u=n[r],t[u]=e[u];return t}function Id(e){function t(n,r,f,u){let h=n[u++];if(h==="__proto__")return!0;const g=Number.isFinite(+h),s=u>=n.length;return h=!h&&ne.isArray(f)?f.length:h,s?(ne.hasOwnProp(f,h)?f[h]=[f[h],r]:f[h]=r,!g):((!f[h]||!ne.isObject(f[h]))&&(f[h]=[]),t(n,r,f[h],u)&&ne.isArray(f[h])&&(f[h]=Vw(f[h])),!g)}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(r,f)=>{t(zw(r),f,n,0)}),n}return null}function jw(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cl={transitional:Md,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",f=r.indexOf("application/json")>-1,u=ne.isObject(t);if(u&&ne.isHTMLForm(t)&&(t=new FormData(t)),ne.isFormData(t))return f&&f?JSON.stringify(Id(t)):t;if(ne.isArrayBuffer(t)||ne.isBuffer(t)||ne.isStream(t)||ne.isFile(t)||ne.isBlob(t))return t;if(ne.isArrayBufferView(t))return t.buffer;if(ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let g;if(u){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Uw(t,this.formSerializer).toString();if((g=ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return os(g?{"files[]":t}:t,s&&new s,this.formSerializer)}}return u||f?(n.setContentType("application/json",!1),jw(t)):t}],transformResponse:[function(t){const n=this.transitional||Cl.transitional,r=n&&n.forcedJSONParsing,f=this.responseType==="json";if(t&&ne.isString(t)&&(r&&!this.responseType||f)){const h=!(n&&n.silentJSONParsing)&&f;try{return JSON.parse(t)}catch(g){if(h)throw g.name==="SyntaxError"?Oe.from(g,Oe.ERR_BAD_RESPONSE,this,null,this.response):g}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(["delete","get","head","post","put","patch"],e=>{Cl.headers[e]={}});const Al=Cl,Gw=ne.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"]),Kw=e=>{const t={};let n,r,f;return e&&e.split(`
|
776
|
+
`).forEach(function(h){f=h.indexOf(":"),n=h.substring(0,f).trim().toLowerCase(),r=h.substring(f+1).trim(),!(!n||t[n]&&Gw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},yu=Symbol("internals");function Dr(e){return e&&String(e).trim().toLowerCase()}function no(e){return e===!1||e==null?e:ne.isArray(e)?e.map(no):String(e)}function Yw(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Xw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ls(e,t,n,r,f){if(ne.isFunction(r))return r.call(this,t,n);if(f&&(t=n),!!ne.isString(t)){if(ne.isString(r))return t.indexOf(r)!==-1;if(ne.isRegExp(r))return r.test(t)}}function Zw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function qw(e,t){const n=ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(f,u,h){return this[r].call(this,t,f,u,h)},configurable:!0})})}let ss=class{constructor(t){t&&this.set(t)}set(t,n,r){const f=this;function u(g,s,p){const o=Dr(s);if(!o)throw new Error("header name must be a non-empty string");const i=ne.findKey(f,o);(!i||f[i]===void 0||p===!0||p===void 0&&f[i]!==!1)&&(f[i||s]=no(g))}const h=(g,s)=>ne.forEach(g,(p,o)=>u(p,o,s));return ne.isPlainObject(t)||t instanceof this.constructor?h(t,n):ne.isString(t)&&(t=t.trim())&&!Xw(t)?h(Kw(t),n):t!=null&&u(n,t,r),this}get(t,n){if(t=Dr(t),t){const r=ne.findKey(this,t);if(r){const f=this[r];if(!n)return f;if(n===!0)return Yw(f);if(ne.isFunction(n))return n.call(this,f,r);if(ne.isRegExp(n))return n.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dr(t),t){const r=ne.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ls(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let f=!1;function u(h){if(h=Dr(h),h){const g=ne.findKey(r,h);g&&(!n||Ls(r,r[g],g,n))&&(delete r[g],f=!0)}}return ne.isArray(t)?t.forEach(u):u(t),f}clear(t){const n=Object.keys(this);let r=n.length,f=!1;for(;r--;){const u=n[r];(!t||Ls(this,this[u],u,t,!0))&&(delete this[u],f=!0)}return f}normalize(t){const n=this,r={};return ne.forEach(this,(f,u)=>{const h=ne.findKey(r,u);if(h){n[h]=no(f),delete n[u];return}const g=t?Zw(u):String(u).trim();g!==u&&delete n[u],n[g]=no(f),r[g]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ne.forEach(this,(r,f)=>{r!=null&&r!==!1&&(n[f]=t&&ne.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
777
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(f=>r.set(f)),r}static accessor(t){const r=(this[yu]=this[yu]={accessors:{}}).accessors,f=this.prototype;function u(h){const g=Dr(h);r[g]||(qw(f,h),r[g]=!0)}return ne.isArray(t)?t.forEach(u):u(t),this}};ss.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ne.reduceDescriptors(ss.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ne.freezeMethods(ss);const en=ss;function Ms(e,t){const n=this||Al,r=t||n,f=en.from(r.headers);let u=r.data;return ne.forEach(e,function(g){u=g.call(n,u,f.normalize(),t?t.status:void 0)}),f.normalize(),u}function Fd(e){return!!(e&&e.__CANCEL__)}function Ai(e,t,n){Oe.call(this,e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError"}ne.inherits(Ai,Oe,{__CANCEL__:!0});function Jw(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Qw=Wt.hasStandardBrowserEnv?{write(e,t,n,r,f,u){const h=[e+"="+encodeURIComponent(t)];ne.isNumber(n)&&h.push("expires="+new Date(n).toGMTString()),ne.isString(r)&&h.push("path="+r),ne.isString(f)&&h.push("domain="+f),u===!0&&h.push("secure"),document.cookie=h.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function e$(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function t$(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nd(e,t){return e&&!e$(t)?t$(e,t):t}const n$=Wt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function f(u){let h=u;return t&&(n.setAttribute("href",h),h=n.href),n.setAttribute("href",h),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=f(window.location.href),function(h){const g=ne.isString(h)?f(h):h;return g.protocol===r.protocol&&g.host===r.host}}():function(){return function(){return!0}}();function r$(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function i$(e,t){e=e||10;const n=new Array(e),r=new Array(e);let f=0,u=0,h;return t=t!==void 0?t:1e3,function(s){const p=Date.now(),o=r[u];h||(h=p),n[f]=s,r[f]=p;let i=u,a=0;for(;i!==f;)a+=n[i++],i=i%e;if(f=(f+1)%e,f===u&&(u=(u+1)%e),p-h<t)return;const c=o&&p-o;return c?Math.round(a*1e3/c):void 0}}function bu(e,t){let n=0;const r=i$(50,250);return f=>{const u=f.loaded,h=f.lengthComputable?f.total:void 0,g=u-n,s=r(g),p=u<=h;n=u;const o={loaded:u,total:h,progress:h?u/h:void 0,bytes:g,rate:s||void 0,estimated:s&&h&&p?(h-u)/s:void 0,event:f};o[t?"download":"upload"]=!0,e(o)}}const o$=typeof XMLHttpRequest<"u",s$=o$&&function(e){return new Promise(function(n,r){let f=e.data;const u=en.from(e.headers).normalize();let{responseType:h,withXSRFToken:g}=e,s;function p(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}let o;if(ne.isFormData(f)){if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)u.setContentType(!1);else if((o=u.getContentType())!==!1){const[d,...m]=o?o.split(";").map(v=>v.trim()).filter(Boolean):[];u.setContentType([d||"multipart/form-data",...m].join("; "))}}let i=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";u.set("Authorization","Basic "+btoa(d+":"+m))}const a=Nd(e.baseURL,e.url);i.open(e.method.toUpperCase(),Ld(a,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function c(){if(!i)return;const d=en.from("getAllResponseHeaders"in i&&i.getAllResponseHeaders()),v={data:!h||h==="text"||h==="json"?i.responseText:i.response,status:i.status,statusText:i.statusText,headers:d,config:e,request:i};Jw(function(A){n(A),p()},function(A){r(A),p()},v),i=null}if("onloadend"in i?i.onloadend=c:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(c)},i.onabort=function(){i&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,i)),i=null)},i.onerror=function(){r(new Oe("Network Error",Oe.ERR_NETWORK,e,i)),i=null},i.ontimeout=function(){let m=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const v=e.transitional||Md;e.timeoutErrorMessage&&(m=e.timeoutErrorMessage),r(new Oe(m,v.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,i)),i=null},Wt.hasStandardBrowserEnv&&(g&&ne.isFunction(g)&&(g=g(e)),g||g!==!1&&n$(a))){const d=e.xsrfHeaderName&&e.xsrfCookieName&&Qw.read(e.xsrfCookieName);d&&u.set(e.xsrfHeaderName,d)}f===void 0&&u.setContentType(null),"setRequestHeader"in i&&ne.forEach(u.toJSON(),function(m,v){i.setRequestHeader(v,m)}),ne.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),h&&h!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",bu(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",bu(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=d=>{i&&(r(!d||d.type?new Ai(null,e,i):d),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const l=r$(a);if(l&&Wt.protocols.indexOf(l)===-1){r(new Oe("Unsupported protocol "+l+":",Oe.ERR_BAD_REQUEST,e));return}i.send(f||null)})},Sa={http:Lw,xhr:s$};ne.forEach(Sa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wu=e=>`- ${e}`,a$=e=>ne.isFunction(e)||e===null||e===!1,Dd={getAdapter:e=>{e=ne.isArray(e)?e:[e];const{length:t}=e;let n,r;const f={};for(let u=0;u<t;u++){n=e[u];let h;if(r=n,!a$(n)&&(r=Sa[(h=String(n)).toLowerCase()],r===void 0))throw new Oe(`Unknown adapter '${h}'`);if(r)break;f[h||"#"+u]=r}if(!r){const u=Object.entries(f).map(([g,s])=>`adapter ${g} `+(s===!1?"is not supported by the environment":"is not available in the build"));let h=t?u.length>1?`since :
|
778
778
|
`+u.map(wu).join(`
|
779
|
-
`):" "+wu(u[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:_a};function Os(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ai(null,e)}function $u(e){return Os(e),e.headers=tn.from(e.headers),e.data=Ms.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dd.getAdapter(e.adapter||Cl.adapter)(e).then(function(r){return Os(e),r.data=Ms.call(e,e.transformResponse,r),r.headers=tn.from(r.headers),r},function(r){return Fd(r)||(Os(e),r&&r.response&&(r.response.data=Ms.call(e,e.transformResponse,r.response),r.response.headers=tn.from(r.response.headers))),Promise.reject(r)})}const _u=e=>e instanceof tn?e.toJSON():e;function $r(e,t){t=t||{};const n={};function r(p,o,i){return ne.isPlainObject(p)&&ne.isPlainObject(o)?ne.merge.call({caseless:i},p,o):ne.isPlainObject(o)?ne.merge({},o):ne.isArray(o)?o.slice():o}function f(p,o,i){if(ne.isUndefined(o)){if(!ne.isUndefined(p))return r(void 0,p,i)}else return r(p,o,i)}function u(p,o){if(!ne.isUndefined(o))return r(void 0,o)}function h(p,o){if(ne.isUndefined(o)){if(!ne.isUndefined(p))return r(void 0,p)}else return r(void 0,o)}function g(p,o,i){if(i in t)return r(p,o);if(i in e)return r(void 0,p)}const s={url:u,method:u,data:u,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:g,headers:(p,o)=>f(_u(p),_u(o),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),function(o){const i=s[o]||f,a=i(e[o],t[o],o);ne.isUndefined(a)&&i!==g||(n[o]=a)}),n}const Pd="1.6.3",Al={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Al[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Su={};Al.transitional=function(t,n,r){function f(u,h){return"[Axios v"+Pd+"] Transitional option '"+u+"'"+h+(r?". "+r:"")}return(u,h,g)=>{if(t===!1)throw new Oe(f(h," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!Su[h]&&(Su[h]=!0,console.warn(f(h," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(u,h,g):!0}};function l$(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let f=r.length;for(;f-- >0;){const u=r[f],h=t[u];if(h){const g=e[u],s=g===void 0||h(g,u,e);if(s!==!0)throw new Oe("option "+u+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+u,Oe.ERR_BAD_OPTION)}}const Sa={assertOptions:l$,validators:Al},mn=Sa.validators;let $o=class{constructor(t){this.defaults=t,this.interceptors={request:new vu,response:new vu}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$r(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:u}=n;r!==void 0&&Sa.assertOptions(r,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),f!=null&&(ne.isFunction(f)?n.paramsSerializer={serialize:f}:Sa.assertOptions(f,{encode:mn.function,serialize:mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=u&&ne.merge(u.common,u[n.method]);u&&ne.forEach(["delete","get","head","post","put","patch","common"],l=>{delete u[l]}),n.headers=tn.concat(h,u);const g=[];let s=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(s=s&&d.synchronous,g.unshift(d.fulfilled,d.rejected))});const p=[];this.interceptors.response.forEach(function(d){p.push(d.fulfilled,d.rejected)});let o,i=0,a;if(!s){const l=[$u.bind(this),void 0];for(l.unshift.apply(l,g),l.push.apply(l,p),a=l.length,o=Promise.resolve(n);i<a;)o=o.then(l[i++],l[i++]);return o}a=g.length;let c=n;for(i=0;i<a;){const l=g[i++],d=g[i++];try{c=l(c)}catch(m){d.call(this,m);break}}try{o=$u.call(this,c)}catch(l){return Promise.reject(l)}for(i=0,a=p.length;i<a;)o=o.then(p[i++],p[i++]);return o}getUri(t){t=$r(this.defaults,t);const n=Nd(t.baseURL,t.url);return Ld(n,t.params,t.paramsSerializer)}};ne.forEach(["delete","get","head","options"],function(t){$o.prototype[t]=function(n,r){return this.request($r(r||{},{method:t,url:n,data:(r||{}).data}))}});ne.forEach(["post","put","patch"],function(t){function n(r){return function(u,h,g){return this.request($r(g||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:h}))}}$o.prototype[t]=n(),$o.prototype[t+"Form"]=n(!0)});const ro=$o;let c$=class Bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(f=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](f);r._listeners=null}),this.promise.then=f=>{let u;const h=new Promise(g=>{r.subscribe(g),u=g}).then(f);return h.cancel=function(){r.unsubscribe(u)},h},t(function(u,h,g){r.reason||(r.reason=new Ai(u,h,g),n(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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bd(function(f){t=f}),cancel:t}}};const u$=c$;function h$(e){return function(n){return e.apply(null,n)}}function f$(e){return ne.isObject(e)&&e.isAxiosError===!0}const Ca={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(Ca).forEach(([e,t])=>{Ca[t]=e});const d$=Ca;function Wd(e){const t=new ro(e),n=bd(ro.prototype.request,t);return ne.extend(n,ro.prototype,t,{allOwnKeys:!0}),ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(f){return Wd($r(e,f))},n}const Ue=Wd(Cl);Ue.Axios=ro;Ue.CanceledError=Ai;Ue.CancelToken=u$;Ue.isCancel=Fd;Ue.VERSION=Pd;Ue.toFormData=os;Ue.AxiosError=Oe;Ue.Cancel=Ue.CanceledError;Ue.all=function(t){return Promise.all(t)};Ue.spread=h$;Ue.isAxiosError=f$;Ue.mergeConfig=$r;Ue.AxiosHeaders=tn;Ue.formToJSON=e=>Id(ne.isHTMLForm(e)?new FormData(e):e);Ue.getAdapter=Dd.getAdapter;Ue.HttpStatusCode=d$;Ue.default=Ue;const{Axios:uT,AxiosError:p$,CanceledError:hT,isCancel:fT,CancelToken:dT,VERSION:pT,all:gT,Cancel:mT,isAxiosError:vT,spread:yT,toFormData:bT,AxiosHeaders:wT,HttpStatusCode:$T,formToJSON:_T,getAdapter:ST,mergeConfig:CT}=Ue,rt=Ue.create(),ft={async getConfigs(){return(await rt.get("/api/configs")).data},async getAlerts(e){return e.page=e.page||1,(await rt.get("/api/alerts",{params:e})).data},async getAlert(e){return(await rt.get(`/api/alerts/${e}`)).data},async getTags(){return(await rt.get("/api/tags")).data},async deleteAlert(e){return(await rt.delete(`/api/alerts/${e}`)).data},async getArtifact(e){return(await rt.get(`/api/artifacts/${e}`)).data},async getArtifacts(e){return e.page=e.page||1,(await rt.get("/api/artifacts",{params:e})).data},async enrichArtifact(e){return(await rt.post(`/api/artifacts/${e}/enrich`)).data},async deleteArtifact(e){return(await rt.delete(`/api/artifacts/${e}`)).data},async getRules(e){return e.page=e.page||1,(await rt.get("/api/rules",{params:e})).data},async getRule(e){return(await rt.get(`/api/rules/${e}`)).data},async searchRule(e){return(await rt.post(`/api/rules/${e}/search`)).data},async createRule(e){return(await rt.post("/api/rules/",e)).data},async updateRule(e){return(await rt.put("/api/rules/",e)).data},async deleteRule(e){return(await rt.delete(`/api/rules/${e}`)).data},async deleteTag(e){return(await rt.delete(`/api/tags/${e}`)).data},async getIPInfo(e){return(await rt.get(`/api/ip_addresses/${e}`)).data}};function ki(){return ht(async(e,t)=>await ft.getAlerts(t))}function g$(){return ht(async(e,t)=>await ft.deleteAlert(t))}function m$(){return ht(async(e,t)=>await ft.deleteTag(t))}function v$(){return ht(async(e,t)=>await ft.getArtifact(t))}function Hd(){return ht(async(e,t)=>await ft.deleteArtifact(t))}function y$(){return ht(async(e,t)=>await ft.enrichArtifact(t))}function b$(){return ht(async()=>await ft.getConfigs())}function w$(){return ht(async(e,t)=>await ft.getIPInfo(t))}function Ud(){return ht(async(e,t)=>await ft.getRules(t))}function zd(){return ht(async(e,t)=>await ft.getRule(t))}function $$(){return ht(async(e,t)=>await ft.deleteRule(t))}function _$(){return ht(async(e,t)=>await ft.searchRule(t))}function S$(){return ht(async(e,t)=>await ft.createRule(t))}function C$(){return ht(async(e,t)=>await ft.updateRule(t))}function kl(){return ht(async(e,t)=>await ft.getArtifacts(t))}function A$(){return ht(async(e,t)=>await ft.getAlert(t))}const k$=be({name:"AlertActionButtons",props:{alert:{type:Object,required:!0}},emits:["delete","set-error"],setup(e,t){const n=ke(()=>`/api/alerts/${e.alert.id}`),r=g$();return{href:n,deleteAlert:async()=>{if(window.confirm(`Are you sure you want to delete ${e.alert.id}?`))try{await r.perform(e.alert.id),t.emit("delete")}catch(h){Ue.isAxiosError(h)&&t.emit("set-error",h)}}}}}),E$={class:"buttons is-pulled-right"},x$=["href"],R$=N("span",null,"JSON",-1),T$={class:"icon is-small"},L$=N("span",null,"Delete",-1),M$={class:"icon is-small"};function O$(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("span",E$,[N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[R$,N("span",T$,[ae(h,{icon:"barcode"})])],8,x$),N("button",{class:"button is-light is-small",onClick:t[0]||(t[0]=(...g)=>e.deleteAlert&&e.deleteAlert(...g))},[L$,N("span",M$,[ae(h,{icon:"times"})])])])}const Vd=Se(k$,[["render",O$]]);var Ei=I$;function I$(e,t,n){return t==null||t>=e.length?e:(n==null&&(n="..."),e.slice(0,Math.max(0,t-n.length))+n)}const F$=be({name:"ArtifactTag",props:{artifact:{type:Object,required:!0}},setup(e){const t=Fe(!1),n=Fe(!1),r=Hd();return{deleteArtifact:async()=>{window.confirm(`Are you sure you want to delete ${e.artifact.data}?`)&&(await r.perform(e.artifact.id),t.value=!0)},hideDeleteButton:()=>{n.value=!1},isDeleteButtonEnabled:n,isDeleted:t,showDeleteButton:()=>{n.value=!0},truncate:Ei}}}),N$={key:0,class:"control"};function D$(e,t,n,r,f,u){const h=oe("router-link");return e.isDeleted?de("",!0):(Z(),ie("div",N$,[N("div",{class:"tags has-addons are-medium",onMouseover:t[1]||(t[1]=(...g)=>e.showDeleteButton&&e.showDeleteButton(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.hideDeleteButton&&e.hideDeleteButton(...g))},[ae(h,{class:"tag is-link is-light",to:{name:"Artifact",params:{id:e.artifact.id}}},{default:Je(()=>[et(ye(e.truncate(e.artifact.data,32)),1)]),_:1},8,["to"]),e.isDeleteButtonEnabled?(Z(),ie("span",{key:0,class:"tag is-delete",onClick:t[0]||(t[0]=(...g)=>e.deleteArtifact&&e.deleteArtifact(...g))})):de("",!0)],32)]))}const P$=Se(F$,[["render",D$]]),B$=be({name:"ArtifactTags",components:{ArtifactTag:P$},props:{artifacts:{type:Array,required:!0}}}),W$={class:"field is-grouped is-grouped-multiline"};function H$(e,t,n,r,f,u){const h=oe("ArtifactTag");return Z(),ie("div",W$,[(Z(!0),ie(xe,null,$t(e.artifacts,g=>(Z(),_e(h,{key:g.id,artifact:g},null,8,["artifact"]))),128))])}const jd=Se(B$,[["render",H$]]);var Mn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gd(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var f=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,f.get?f:{enumerable:!0,get:function(){return e[r]}})}),n}var Kd={exports:{}};const U$=Gd(H0);(function(e,t){(function(n,r){e.exports=r(U$)})(Mn,function(n){return function(){var r={789:function(g){g.exports=n}},f={};function u(g){var s=f[g];if(s!==void 0)return s.exports;var p=f[g]={exports:{}};return r[g](p,p.exports,u),p.exports}u.d=function(g,s){for(var p in s)u.o(s,p)&&!u.o(g,p)&&Object.defineProperty(g,p,{enumerable:!0,get:s[p]})},u.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},u.r=function(g){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})};var h={};return function(){function g($,k){(k==null||k>$.length)&&(k=$.length);for(var _=0,w=new Array(k);_<k;_++)w[_]=$[_];return w}function s($,k){if($){if(typeof $=="string")return g($,k);var _=Object.prototype.toString.call($).slice(8,-1);return _==="Object"&&$.constructor&&(_=$.constructor.name),_==="Map"||_==="Set"?Array.from($):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?g($,k):void 0}}function p($){return function(k){if(Array.isArray(k))return g(k)}($)||function(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}($)||s($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
780
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o($,k,_){return k in $?Object.defineProperty($,k,{value:_,enumerable:!0,configurable:!0,writable:!0}):$[k]=_,$}u.r(h),u.d(h,{default:function(){return M}});var i=u(789),a=(0,i.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var $=this.data,k=this.onClick;return(0,i.createVNode)("span",{class:"vjs-tree-brackets",onClick:k},[$])}}),c=(0,i.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function($,k){var _=k.emit;return{uiType:(0,i.computed)(function(){return $.isMultiple?"checkbox":"radio"}),model:(0,i.computed)({get:function(){return $.checked},set:function(w){return _("update:modelValue",w)}})}},render:function(){var $=this.uiType,k=this.model,_=this.$emit;return(0,i.createVNode)("label",{class:["vjs-check-controller",k?"is-checked":""],onClick:function(w){return w.stopPropagation()}},[(0,i.createVNode)("span",{class:"vjs-check-controller-inner is-".concat($)},null),(0,i.createVNode)("input",{checked:k,class:"vjs-check-controller-original is-".concat($),type:$,onChange:function(){return _("change",k)}},null)])}}),l=(0,i.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var $=this.nodeType,k=this.onClick,_=$==="objectStart"||$==="arrayStart";return _||$==="objectCollapsed"||$==="arrayCollapsed"?(0,i.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(_?"open":"close"),onClick:k},[(0,i.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,i.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});function d($){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},d($)}function m($){return Object.prototype.toString.call($).slice(8,-1).toLowerCase()}function v($){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=arguments.length>3?arguments[3]:void 0,R=w||{},T=R.key,O=R.index,I=R.type,F=I===void 0?"content":I,P=R.showComma,W=P!==void 0&&P,j=R.length,H=j===void 0?1:j,z=m($);if(z==="array"){var K=y($.map(function(X,Y,V){return v(X,"".concat(k,"[").concat(Y,"]"),_+1,{index:Y,showComma:Y!==V.length-1,length:H,type:F})}));return[v("[",k,_,{showComma:!1,key:T,length:$.length,type:"arrayStart"})[0]].concat(K,v("]",k,_,{showComma:W,length:$.length,type:"arrayEnd"})[0])}if(z==="object"){var q=Object.keys($),U=y(q.map(function(X,Y,V){return v($[X],/^[a-zA-Z_]\w*$/.test(X)?"".concat(k,".").concat(X):"".concat(k,'["').concat(X,'"]'),_+1,{key:X,showComma:Y!==V.length-1,length:H,type:F})}));return[v("{",k,_,{showComma:!1,key:T,index:O,length:q.length,type:"objectStart"})[0]].concat(U,v("}",k,_,{showComma:W,length:q.length,type:"objectEnd"})[0])}return[{content:$,level:_,key:T,index:O,path:k,showComma:W,length:H,type:F}]}function y($){if(typeof Array.prototype.flat=="function")return $.flat();for(var k=p($),_=[];k.length;){var w=k.shift();Array.isArray(w)?k.unshift.apply(k,p(w)):_.push(w)}return _}function A($){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if($==null)return $;if($ instanceof Date)return new Date($);if($ instanceof RegExp)return new RegExp($);if(d($)!=="object")return $;if(k.get($))return k.get($);if(Array.isArray($)){var _=$.map(function(T){return A(T,k)});return k.set($,_),_}var w={};for(var R in $)w[R]=A($[R],k);return k.set($,w),w}function S($,k){var _=Object.keys($);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols($);k&&(w=w.filter(function(R){return Object.getOwnPropertyDescriptor($,R).enumerable})),_.push.apply(_,w)}return _}function C($){for(var k=1;k<arguments.length;k++){var _=arguments[k]!=null?arguments[k]:{};k%2?S(Object(_),!0).forEach(function(w){o($,w,_[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(_)):S(Object(_)).forEach(function(w){Object.defineProperty($,w,Object.getOwnPropertyDescriptor(_,w))})}return $}var b={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}},x=(0,i.defineComponent)({name:"TreeNode",props:C(C({},b),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function($,k){var _=k.emit,w=(0,i.computed)(function(){return m($.node.content)}),R=(0,i.computed)(function(){return"vjs-value vjs-value-".concat(w.value)}),T=(0,i.computed)(function(){return $.showDoubleQuotes?'"'.concat($.node.key,'"'):$.node.key}),O=(0,i.computed)(function(){return $.selectableType==="multiple"}),I=(0,i.computed)(function(){return $.selectableType==="single"}),F=(0,i.computed)(function(){return $.nodeSelectable($.node)&&(O.value||I.value)}),P=(0,i.reactive)({editing:!1}),W=function(Y){var V,ee,D=(ee=(V=Y.target)===null||V===void 0?void 0:V.value)==="null"?null:ee==="undefined"?void 0:ee==="true"||ee!=="false"&&(ee[0]+ee[ee.length-1]==='""'||ee[0]+ee[ee.length-1]==="''"?ee.slice(1,-1):typeof Number(ee)=="number"&&!isNaN(Number(ee))||ee==="NaN"?Number(ee):ee);_("valueChange",D,$.node.path)},j=(0,i.computed)(function(){var Y,V=(Y=$.node)===null||Y===void 0?void 0:Y.content;return V===null?V="null":V===void 0&&(V="undefined"),w.value==="string"?'"'.concat(V,'"'):V+""}),H=function(){var Y=$.renderNodeValue;return Y?Y({node:$.node,defaultValue:j.value}):j.value},z=function(){_("bracketsClick",!$.collapsed,$.node.path)},K=function(){_("iconClick",!$.collapsed,$.node.path)},q=function(){_("selectedChange",$.node)},U=function(){_("nodeClick",$.node),F.value&&$.selectOnClickNode&&_("selectedChange",$.node)},X=function(Y){if($.editable&&!P.editing){P.editing=!0;var V=function ee(D){var B;D.target!==Y.target&&((B=D.target)===null||B===void 0?void 0:B.parentElement)!==Y.target&&(P.editing=!1,document.removeEventListener("click",ee))};document.removeEventListener("click",V),document.addEventListener("click",V)}};return function(){var Y,V=$.node;return(0,i.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":$.showSelectController,"has-carets":$.showIcon,"is-highlight":$.highlightSelectedNode&&$.checked},onClick:U,style:$.style},[$.showLineNumber&&(0,i.createVNode)("span",{class:"vjs-node-index"},[V.id+1]),$.showSelectController&&F.value&&V.type!=="objectEnd"&&V.type!=="arrayEnd"&&(0,i.createVNode)(c,{isMultiple:O.value,checked:$.checked,onChange:q},null),(0,i.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(V.level)).map(function(ee,D){return(0,i.createVNode)("div",{key:D,class:{"vjs-indent-unit":!0,"has-line":$.showLine}},null)}),$.showIcon&&(0,i.createVNode)(l,{nodeType:V.type,onClick:K},null)]),V.key&&(0,i.createVNode)("span",{class:"vjs-key"},[(Y=$.renderNodeKey,Y?Y({node:$.node,defaultKey:T.value||""}):T.value),(0,i.createVNode)("span",{class:"vjs-colon"},[":".concat($.showKeyValueSpace?" ":"")])]),(0,i.createVNode)("span",null,[V.type!=="content"&&V.content?(0,i.createVNode)(a,{data:V.content.toString(),onClick:z},null):(0,i.createVNode)("span",{class:R.value,onClick:!$.editable||$.editableTrigger&&$.editableTrigger!=="click"?void 0:X,onDblclick:$.editable&&$.editableTrigger==="dblclick"?X:void 0},[$.editable&&P.editing?(0,i.createVNode)("input",{value:j.value,onChange:W,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):H()]),V.showComma&&(0,i.createVNode)("span",null,[","]),$.showLength&&$.collapsed&&(0,i.createVNode)("span",{class:"vjs-comment"},[(0,i.createTextVNode)(" // "),V.length,(0,i.createTextVNode)(" items ")])])])}}});function L($,k){var _=Object.keys($);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols($);k&&(w=w.filter(function(R){return Object.getOwnPropertyDescriptor($,R).enumerable})),_.push.apply(_,w)}return _}function E($){for(var k=1;k<arguments.length;k++){var _=arguments[k]!=null?arguments[k]:{};k%2?L(Object(_),!0).forEach(function(w){o($,w,_[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(_)):L(Object(_)).forEach(function(w){Object.defineProperty($,w,Object.getOwnPropertyDescriptor(_,w))})}return $}var M=(0,i.defineComponent)({name:"Tree",props:E(E({},b),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},rootPath:{type:String,default:"root"},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function($,k){var _=k.emit,w=k.slots,R=(0,i.ref)(),T=(0,i.computed)(function(){return v($.data,$.rootPath)}),O=function(V,ee){return T.value.reduce(function(D,B){var G,J=B.level>=V||B.length>=ee,te=(G=$.pathCollapsible)===null||G===void 0?void 0:G.call($,B);return B.type!=="objectStart"&&B.type!=="arrayStart"||!J&&!te?D:E(E({},D),{},o({},B.path,1))},{})},I=(0,i.reactive)({translateY:0,visibleData:null,hiddenPaths:O($.deep,$.collapsedNodeLength)}),F=(0,i.computed)(function(){for(var V=null,ee=[],D=T.value.length,B=0;B<D;B++){var G=E(E({},T.value[B]),{},{id:B}),J=I.hiddenPaths[G.path];if(V&&V.path===G.path){var te=V.type==="objectStart",re=E(E(E({},G),V),{},{showComma:G.showComma,content:te?"{...}":"[...]",type:te?"objectCollapsed":"arrayCollapsed"});V=null,ee.push(re)}else{if(J&&!V){V=G;continue}if(V)continue;ee.push(G)}}return ee}),P=(0,i.computed)(function(){var V=$.selectedValue;return V&&$.selectableType==="multiple"&&Array.isArray(V)?V:[V]}),W=(0,i.computed)(function(){return!$.selectableType||$.selectOnClickNode||$.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),j=function(){var V=F.value;if($.virtual){var ee,D=$.height/$.itemHeight,B=((ee=R.value)===null||ee===void 0?void 0:ee.scrollTop)||0,G=Math.floor(B/$.itemHeight),J=G<0?0:G+D>V.length?V.length-D:G;J<0&&(J=0);var te=J+D;I.translateY=J*$.itemHeight,I.visibleData=V.filter(function(re,ue){return ue>=J&&ue<te})}else I.visibleData=V},H=function(){j()},z=function(V){var ee,D,B=V.path,G=$.selectableType;if(G==="multiple"){var J=P.value.findIndex(function(le){return le===B}),te=p(P.value);J!==-1?te.splice(J,1):te.push(B),_("update:selectedValue",te),_("selectedChange",te,p(P.value))}else if(G==="single"&&P.value[0]!==B){var re=(ee=P.value,D=1,function(le){if(Array.isArray(le))return le}(ee)||function(le,he){var se=le==null?null:typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(se!=null){var pe,$e,ve=[],Ae=!0,Q=!1;try{for(se=se.call(le);!(Ae=(pe=se.next()).done)&&(ve.push(pe.value),!he||ve.length!==he);Ae=!0);}catch(ce){Q=!0,$e=ce}finally{try{Ae||se.return==null||se.return()}finally{if(Q)throw $e}}return ve}}(ee,D)||s(ee,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
781
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())[0],ue=B;_("update:selectedValue",ue),_("selectedChange",ue,re)}},K=function(V){_("nodeClick",V)},q=function(V,ee){if(V)I.hiddenPaths=E(E({},I.hiddenPaths),{},o({},ee,1));else{var D=E({},I.hiddenPaths);delete D[ee],I.hiddenPaths=D}},U=function(V,ee){$.collapsedOnClickBrackets&&q(V,ee),_("bracketsClick",V)},X=function(V,ee){q(V,ee),_("iconClick",V)},Y=function(V,ee){var D=A($.data),B=$.rootPath;new Function("data","val","data".concat(ee.slice(B.length),"=val"))(D,V),_("update:data",D)};return(0,i.watchEffect)(function(){W.value&&function(V){throw new Error("[VueJSONPretty] ".concat(V))}(W.value)}),(0,i.watchEffect)(function(){F.value&&j()}),(0,i.watch)(function(){return $.deep},function(V){V&&(I.hiddenPaths=O(V,$.collapsedNodeLength))}),(0,i.watch)(function(){return $.collapsedNodeLength},function(V){V&&(I.hiddenPaths=O($.deep,V))}),function(){var V,ee,D=(V=$.renderNodeKey)!==null&&V!==void 0?V:w.renderNodeKey,B=(ee=$.renderNodeValue)!==null&&ee!==void 0?ee:w.renderNodeValue,G=I.visibleData&&I.visibleData.map(function(J){return(0,i.createVNode)(x,{key:J.id,node:J,collapsed:!!I.hiddenPaths[J.path],showDoubleQuotes:$.showDoubleQuotes,showLength:$.showLength,checked:P.value.includes(J.path),selectableType:$.selectableType,showLine:$.showLine,showLineNumber:$.showLineNumber,showSelectController:$.showSelectController,selectOnClickNode:$.selectOnClickNode,nodeSelectable:$.nodeSelectable,highlightSelectedNode:$.highlightSelectedNode,editable:$.editable,editableTrigger:$.editableTrigger,showIcon:$.showIcon,showKeyValueSpace:$.showKeyValueSpace,renderNodeKey:D,renderNodeValue:B,onNodeClick:K,onBracketsClick:U,onIconClick:X,onSelectedChange:z,onValueChange:Y,style:$.itemHeight&&$.itemHeight!==20?{lineHeight:"".concat($.itemHeight,"px")}:{}},null)});return(0,i.createVNode)("div",{ref:R,class:{"vjs-tree":!0,"is-virtual":$.virtual},onScroll:$.virtual?H:void 0,style:$.showLineNumber?E({paddingLeft:"".concat(12*Number(T.value.length.toString().length),"px")},$.style):$.style},[$.virtual?(0,i.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat($.height,"px")}},[(0,i.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(F.value.length*$.itemHeight,"px")}},[(0,i.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(I.translateY,"px)")}},[G])])]):G])}}})}(),h}()})})(Kd);var z$=Kd.exports;const Yd=rr(z$),V$=be({name:"ErrorItem",props:{error:{type:p$,required:!0},disposable:{type:Boolean,default:!1}},components:{VueJsonPretty:Yd},emits:["dispose"],setup(e,t){const n=ke(()=>{var f;if(e.error.response)return(f=e.error.response)==null?void 0:f.data});return{dispose:()=>{t.emit("dispose")},data:n}}}),j$={class:"notification is-danger is-light"},G$={key:1},K$={key:2},Y$={key:0,class:"message"},X$={class:"message-body"};function Z$(e,t,n,r,f,u){var g;const h=oe("VueJsonPretty");return Z(),ie(xe,null,[N("div",j$,[e.disposable?(Z(),ie("button",{key:0,class:"delete",onClick:t[0]||(t[0]=(...s)=>e.dispose&&e.dispose(...s))})):de("",!0),e.data?(Z(),ie("p",G$,ye(e.data.message),1)):(Z(),ie("p",K$,ye(e.error),1))]),(g=e.data)!=null&&g.detail?(Z(),ie("article",Y$,[N("div",X$,[ae(h,{data:e.data.detail},null,8,["data"])])])):de("",!0)],64)}const lt=Se(V$,[["render",Z$]]),q$=be({name:"TagItem",props:{tag:{type:Object,required:!0},deletable:{type:Boolean,default:!1}},setup(e){const t=Fe(!1),n=Fe(!1),r=m$();return{isDeleted:t,deleteTag:async()=>{window.confirm(`Are you sure you want to delete ${e.tag.name} (ID: ${e.tag.id})?`)&&(await r.perform(e.tag.id),t.value=!0)},showDeleteButton:()=>{n.value=!0},hideDeleteButton:()=>{n.value=!1},isDeleteButtonEnabled:n}}}),J$={key:0,class:"control"},Q$={class:"tag is-info is-light"};function e_(e,t,n,r,f,u){return e.isDeleted?de("",!0):(Z(),ie("div",J$,[N("div",{class:"tags has-addons are-medium",onMouseover:t[1]||(t[1]=(...h)=>e.showDeleteButton&&e.showDeleteButton(...h)),onMouseleave:t[2]||(t[2]=(...h)=>e.hideDeleteButton&&e.hideDeleteButton(...h))},[N("span",Q$,ye(e.tag.name),1),e.isDeleteButtonEnabled&&e.deletable?(Z(),ie("a",{key:0,class:"tag is-delete",onClick:t[0]||(t[0]=(...h)=>e.deleteTag&&e.deleteTag(...h))})):de("",!0)],32)]))}const t_=Se(q$,[["render",e_]]),n_=be({name:"TagsItem",components:{TagComponent:t_},props:{tags:{type:Array,required:!0},deletable:{type:Boolean,default:!1}},setup(){}}),r_={class:"field is-grouped is-grouped-multiline"};function i_(e,t,n,r,f,u){const h=oe("TagComponent");return Z(),ie("div",r_,[(Z(!0),ie(xe,null,$t(e.tags,g=>(Z(),_e(h,{tag:g,key:g.name,deletable:e.deletable},null,8,["tag","deletable"]))),128))])}const El=Se(n_,[["render",i_]]);var Xd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Mn,function(){var n=1e3,r=6e4,f=36e5,u="millisecond",h="second",g="minute",s="hour",p="day",o="week",i="month",a="quarter",c="year",l="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var R=["th","st","nd","rd"],T=w%100;return"["+w+(R[(T-20)%10]||R[T]||R[0])+"]"}},A=function(w,R,T){var O=String(w);return!O||O.length>=R?w:""+Array(R+1-O.length).join(T)+w},S={s:A,z:function(w){var R=-w.utcOffset(),T=Math.abs(R),O=Math.floor(T/60),I=T%60;return(R<=0?"+":"-")+A(O,2,"0")+":"+A(I,2,"0")},m:function w(R,T){if(R.date()<T.date())return-w(T,R);var O=12*(T.year()-R.year())+(T.month()-R.month()),I=R.clone().add(O,i),F=T-I<0,P=R.clone().add(O+(F?-1:1),i);return+(-(O+(T-I)/(F?I-P:P-I))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:i,y:c,w:o,d:p,D:l,h:s,m:g,s:h,ms:u,Q:a}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},C="en",b={};b[C]=y;var x="$isDayjsObject",L=function(w){return w instanceof k||!(!w||!w[x])},E=function w(R,T,O){var I;if(!R)return C;if(typeof R=="string"){var F=R.toLowerCase();b[F]&&(I=F),T&&(b[F]=T,I=F);var P=R.split("-");if(!I&&P.length>1)return w(P[0])}else{var W=R.name;b[W]=R,I=W}return!O&&I&&(C=I),I||!O&&C},M=function(w,R){if(L(w))return w.clone();var T=typeof R=="object"?R:{};return T.date=w,T.args=arguments,new k(T)},$=S;$.l=E,$.i=L,$.w=function(w,R){return M(w,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var k=function(){function w(T){this.$L=E(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[x]=!0}var R=w.prototype;return R.parse=function(T){this.$d=function(O){var I=O.date,F=O.utc;if(I===null)return new Date(NaN);if($.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var P=I.match(m);if(P){var W=P[2]-1||0,j=(P[7]||"0").substring(0,3);return F?new Date(Date.UTC(P[1],W,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)):new Date(P[1],W,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)}}return new Date(I)}(T),this.init()},R.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},R.$utils=function(){return $},R.isValid=function(){return this.$d.toString()!==d},R.isSame=function(T,O){var I=M(T);return this.startOf(O)<=I&&I<=this.endOf(O)},R.isAfter=function(T,O){return M(T)<this.startOf(O)},R.isBefore=function(T,O){return this.endOf(O)<M(T)},R.$g=function(T,O,I){return $.u(T)?this[O]:this.set(I,T)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(T,O){var I=this,F=!!$.u(O)||O,P=$.p(T),W=function(Y,V){var ee=$.w(I.$u?Date.UTC(I.$y,V,Y):new Date(I.$y,V,Y),I);return F?ee:ee.endOf(p)},j=function(Y,V){return $.w(I.toDate()[Y].apply(I.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(V)),I)},H=this.$W,z=this.$M,K=this.$D,q="set"+(this.$u?"UTC":"");switch(P){case c:return F?W(1,0):W(31,11);case i:return F?W(1,z):W(0,z+1);case o:var U=this.$locale().weekStart||0,X=(H<U?H+7:H)-U;return W(F?K-X:K+(6-X),z);case p:case l:return j(q+"Hours",0);case s:return j(q+"Minutes",1);case g:return j(q+"Seconds",2);case h:return j(q+"Milliseconds",3);default:return this.clone()}},R.endOf=function(T){return this.startOf(T,!1)},R.$set=function(T,O){var I,F=$.p(T),P="set"+(this.$u?"UTC":""),W=(I={},I[p]=P+"Date",I[l]=P+"Date",I[i]=P+"Month",I[c]=P+"FullYear",I[s]=P+"Hours",I[g]=P+"Minutes",I[h]=P+"Seconds",I[u]=P+"Milliseconds",I)[F],j=F===p?this.$D+(O-this.$W):O;if(F===i||F===c){var H=this.clone().set(l,1);H.$d[W](j),H.init(),this.$d=H.set(l,Math.min(this.$D,H.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},R.set=function(T,O){return this.clone().$set(T,O)},R.get=function(T){return this[$.p(T)]()},R.add=function(T,O){var I,F=this;T=Number(T);var P=$.p(O),W=function(z){var K=M(F);return $.w(K.date(K.date()+Math.round(z*T)),F)};if(P===i)return this.set(i,this.$M+T);if(P===c)return this.set(c,this.$y+T);if(P===p)return W(1);if(P===o)return W(7);var j=(I={},I[g]=r,I[s]=f,I[h]=n,I)[P]||1,H=this.$d.getTime()+T*j;return $.w(H,this)},R.subtract=function(T,O){return this.add(-1*T,O)},R.format=function(T){var O=this,I=this.$locale();if(!this.isValid())return I.invalidDate||d;var F=T||"YYYY-MM-DDTHH:mm:ssZ",P=$.z(this),W=this.$H,j=this.$m,H=this.$M,z=I.weekdays,K=I.months,q=I.meridiem,U=function(V,ee,D,B){return V&&(V[ee]||V(O,F))||D[ee].slice(0,B)},X=function(V){return $.s(W%12||12,V,"0")},Y=q||function(V,ee,D){var B=V<12?"AM":"PM";return D?B.toLowerCase():B};return F.replace(v,function(V,ee){return ee||function(D){switch(D){case"YY":return String(O.$y).slice(-2);case"YYYY":return $.s(O.$y,4,"0");case"M":return H+1;case"MM":return $.s(H+1,2,"0");case"MMM":return U(I.monthsShort,H,K,3);case"MMMM":return U(K,H);case"D":return O.$D;case"DD":return $.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return U(I.weekdaysMin,O.$W,z,2);case"ddd":return U(I.weekdaysShort,O.$W,z,3);case"dddd":return z[O.$W];case"H":return String(W);case"HH":return $.s(W,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Y(W,j,!0);case"A":return Y(W,j,!1);case"m":return String(j);case"mm":return $.s(j,2,"0");case"s":return String(O.$s);case"ss":return $.s(O.$s,2,"0");case"SSS":return $.s(O.$ms,3,"0");case"Z":return P}return null}(V)||P.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(T,O,I){var F,P=this,W=$.p(O),j=M(T),H=(j.utcOffset()-this.utcOffset())*r,z=this-j,K=function(){return $.m(P,j)};switch(W){case c:F=K()/12;break;case i:F=K();break;case a:F=K()/3;break;case o:F=(z-H)/6048e5;break;case p:F=(z-H)/864e5;break;case s:F=z/f;break;case g:F=z/r;break;case h:F=z/n;break;default:F=z}return I?F:$.a(F)},R.daysInMonth=function(){return this.endOf(i).$D},R.$locale=function(){return b[this.$L]},R.locale=function(T,O){if(!T)return this.$L;var I=this.clone(),F=E(T,O,!0);return F&&(I.$L=F),I},R.clone=function(){return $.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},w}(),_=k.prototype;return M.prototype=_,[["$ms",u],["$s",h],["$m",g],["$H",s],["$W",p],["$M",i],["$y",c],["$D",l]].forEach(function(w){_[w[1]]=function(R){return this.$g(R,w[0],w[1])}}),M.extend=function(w,R){return w.$i||(w(R,k,M),w.$i=!0),M},M.locale=E,M.isDayjs=L,M.unix=function(w){return M(1e3*w)},M.en=b[C],M.Ls=b,M.p={},M})})(Xd);var o_=Xd.exports;const Or=rr(o_);var Zd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Mn,function(){return function(n,r,f){n=n||{};var u=r.prototype,h={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function g(p,o,i,a){return u.fromToBase(p,o,i,a)}f.en.relativeTime=h,u.fromToBase=function(p,o,i,a,c){for(var l,d,m,v=i.$locale().relativeTime||h,y=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],A=y.length,S=0;S<A;S+=1){var C=y[S];C.d&&(l=a?f(p).diff(i,C.d,!0):i.diff(p,C.d,!0));var b=(n.rounding||Math.round)(Math.abs(l));if(m=l>0,b<=C.r||!C.r){b<=1&&S>0&&(C=y[S-1]);var x=v[C.l];c&&(b=c(""+b)),d=typeof x=="string"?x.replace("%d",b):x(b,o,C.l,m);break}}if(o)return d;var L=m?v.future:v.past;return typeof L=="function"?L(d):L.replace("%s",d)},u.to=function(p,o){return g(p,o,this,!0)},u.from=function(p,o){return g(p,o,this)};var s=function(p){return p.$u?f.utc():f()};u.toNow=function(p){return this.to(s(this),p)},u.fromNow=function(p){return this.from(s(this),p)}}})})(Zd);var s_=Zd.exports;const a_=rr(s_);var qd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Mn,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(f,u,h){var g,s=function(a,c,l){l===void 0&&(l={});var d=new Date(a),m=function(v,y){y===void 0&&(y={});var A=y.timeZoneName||"short",S=v+"|"+A,C=r[S];return C||(C=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:v,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),r[S]=C),C}(c,l);return m.formatToParts(d)},p=function(a,c){for(var l=s(a,c),d=[],m=0;m<l.length;m+=1){var v=l[m],y=v.type,A=v.value,S=n[y];S>=0&&(d[S]=parseInt(A,10))}var C=d[3],b=C===24?0:C,x=d[0]+"-"+d[1]+"-"+d[2]+" "+b+":"+d[4]+":"+d[5]+":000",L=+a;return(h.utc(x).valueOf()-(L-=L%1e3))/6e4},o=u.prototype;o.tz=function(a,c){a===void 0&&(a=g);var l=this.utcOffset(),d=this.toDate(),m=d.toLocaleString("en-US",{timeZone:a}),v=Math.round((d-new Date(m))/1e3/60),y=h(m,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(d.getTimezoneOffset()/15)-v,!0);if(c){var A=y.utcOffset();y=y.add(l-A,"minute")}return y.$x.$timezone=a,y},o.offsetName=function(a){var c=this.$x.$timezone||h.tz.guess(),l=s(this.valueOf(),c,{timeZoneName:a}).find(function(d){return d.type.toLowerCase()==="timezonename"});return l&&l.value};var i=o.startOf;o.startOf=function(a,c){if(!this.$x||!this.$x.$timezone)return i.call(this,a,c);var l=h(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return i.call(l,a,c).tz(this.$x.$timezone,!0)},h.tz=function(a,c,l){var d=l&&c,m=l||c||g,v=p(+h(),m);if(typeof a!="string")return h(a).tz(m);var y=function(b,x,L){var E=b-60*x*1e3,M=p(E,L);if(x===M)return[E,x];var $=p(E-=60*(M-x)*1e3,L);return M===$?[E,M]:[b-60*Math.min(M,$)*1e3,Math.max(M,$)]}(h.utc(a,d).valueOf(),v,m),A=y[0],S=y[1],C=h(A).utcOffset(S);return C.$x.$timezone=m,C},h.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},h.tz.setDefault=function(a){g=a}}})})(qd);var l_=qd.exports;const c_=rr(l_);var Jd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Mn,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,f=/([+-]|\d\d)/g;return function(u,h,g){var s=h.prototype;g.utc=function(d){var m={date:d,utc:!0,args:arguments};return new h(m)},s.utc=function(d){var m=g(this.toDate(),{locale:this.$L,utc:!0});return d?m.add(this.utcOffset(),n):m},s.local=function(){return g(this.toDate(),{locale:this.$L,utc:!1})};var p=s.parse;s.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),p.call(this,d)};var o=s.init;s.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else o.call(this)};var i=s.utcOffset;s.utcOffset=function(d,m){var v=this.$utils().u;if(v(d))return this.$u?0:v(this.$offset)?i.call(this):this.$offset;if(typeof d=="string"&&(d=function(C){C===void 0&&(C="");var b=C.match(r);if(!b)return null;var x=(""+b[0]).match(f)||["-",0,0],L=x[0],E=60*+x[1]+ +x[2];return E===0?0:L==="+"?E:-E}(d),d===null))return this;var y=Math.abs(d)<=16?60*d:d,A=this;if(m)return A.$offset=y,A.$u=d===0,A;if(d!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(A=this.local().add(y+S,n)).$offset=y,A.$x.$localOffset=S}else A=this.utc();return A};var a=s.format;s.format=function(d){var m=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return a.call(this,m)},s.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var c=s.toDate;s.toDate=function(d){return d==="s"&&this.$offset?g(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var l=s.diff;s.diff=function(d,m,v){if(d&&this.$u===d.$u)return l.call(this,d,m,v);var y=this.local(),A=g(d).local();return l.call(y,A,m,v)}}})})(Jd);var u_=Jd.exports;const h_=rr(u_),f_=[{name:"Afghanistan",lat:33.93911,long:67.709953,code:"AF"},{name:"Albania",lat:41.153332,long:20.168331,code:"AL"},{name:"Algeria",lat:28.033886,long:1.659626,code:"DZ"},{name:"American Samoa",lat:-14.270972,long:-170.132217,code:"AS"},{name:"Andorra",lat:42.546245,long:1.601554,code:"AD"},{name:"Angola",lat:-11.202692,long:17.873887,code:"AO"},{name:"Anguilla",lat:18.220554,long:-63.068615,code:"AI"},{name:"Antarctica",lat:-75.250973,long:-.071389,code:"AQ"},{name:"Antigua and Barbuda",lat:17.060816,long:-61.796428,code:"AG"},{name:"Argentina",lat:-38.416097,long:-63.616672,code:"AR"},{name:"Armenia",lat:40.069099,long:45.038189,code:"AM"},{name:"Aruba",lat:12.52111,long:-69.968338,code:"AW"},{name:"Australia",lat:-25.274398,long:133.775136,code:"AU"},{name:"Austria",lat:47.516231,long:14.550072,code:"AT"},{name:"Azerbaijan",lat:40.143105,long:47.576927,code:"AZ"},{name:"Bahamas",lat:25.03428,long:-77.39628,code:"BS"},{name:"Bahrain",lat:25.930414,long:50.637772,code:"BH"},{name:"Bangladesh",lat:23.684994,long:90.356331,code:"BD"},{name:"Barbados",lat:13.193887,long:-59.543198,code:"BB"},{name:"Belarus",lat:53.709807,long:27.953389,code:"BY"},{name:"Belgium",lat:50.503887,long:4.469936,code:"BE"},{name:"Belize",lat:17.189877,long:-88.49765,code:"BZ"},{name:"Benin",lat:9.30769,long:2.315834,code:"BJ"},{name:"Bermuda",lat:32.321384,long:-64.75737,code:"BM"},{name:"Bhutan",lat:27.514162,long:90.433601,code:"BT"},{name:"Bolivia",lat:-16.290154,long:-63.588653,code:"BO"},{name:"Bosnia",lat:43.915886,long:17.679076,code:"BA"},{name:"Botswana",lat:-22.328474,long:24.684866,code:"BW"},{name:"Bouvet Island",lat:-54.423199,long:3.413194,code:"BV"},{name:"Brazil",lat:-14.235004,long:-51.92528,code:"BR"},{name:"British Indian Ocean Territory",lat:-6.343194,long:71.876519,code:"IO"},{name:"Brunei",lat:4.535277,long:114.727669,code:"BN"},{name:"Bulgaria",lat:42.733883,long:25.48583,code:"BG"},{name:"Burkina Faso",lat:12.238333,long:-1.561593,code:"BF"},{name:"Burundi",lat:-3.373056,long:29.918886,code:"BI"},{name:"Cabo Verde",lat:16.002082,long:-24.013197,code:"CV"},{name:"Cambodia",lat:12.565679,long:104.990963,code:"KH"},{name:"Cameroon",lat:7.369722,long:12.354722,code:"CM"},{name:"Canada",lat:56.130366,long:-106.346771,code:"CA"},{name:"Cayman Islands",lat:19.513469,long:-80.566956,code:"KY"},{name:"Central African Republic",lat:6.611111,long:20.939444,code:"CF"},{name:"Caribbean Netherlands",lat:12.2,long:-68.26,code:"BQ"},{name:"Chad",lat:15.454166,long:18.732207,code:"TD"},{name:"Chile",lat:-35.675147,long:-71.542969,code:"CL"},{name:"China",lat:35.86166,long:104.195397,code:"CN"},{name:"Christmas Island",lat:-10.447525,long:105.690449,code:"CX"},{name:"Cocos (Keeling) Islands",lat:-12.164165,long:96.870956,code:"CC"},{name:"Colombia",lat:4.570868,long:-74.297333,code:"CO"},{name:"Comoros",lat:-11.875001,long:43.872219,code:"KM"},{name:"Congo",lat:-.228021,long:15.827659,code:"CG"},{name:"DRC",lat:-4.038333,long:21.758664,code:"CD"},{name:"Cook Islands",lat:-21.236736,long:-159.777671,code:"CK"},{name:"Costa Rica",lat:9.748917,long:-83.753428,code:"CR"},{name:'Côte d"Ivoire',lat:7.539989,long:-5.54708,code:"CI"},{name:"Croatia",lat:45.1,long:15.2,code:"HR"},{name:"Cuba",lat:21.521757,long:-77.781167,code:"CU"},{name:"Curaçao",lat:12.15,long:-68.97,code:"CW"},{name:"Cyprus",lat:35.126413,long:33.429859,code:"CY"},{name:"Czechia",lat:49.817492,long:15.472962,code:"CZ"},{name:"Denmark",lat:56.26392,long:9.501785,code:"DK"},{name:"Djibouti",lat:11.825138,long:42.590275,code:"DJ"},{name:"Dominica",lat:15.414999,long:-61.370976,code:"DM"},{name:"Dominican Republic",lat:18.735693,long:-70.162651,code:"DO"},{name:"Ecuador",lat:-1.831239,long:-78.183406,code:"EC"},{name:"Egypt",lat:26.820553,long:30.802498,code:"EG"},{name:"El Salvador",lat:13.794185,long:-88.89653,code:"SV"},{name:"Equatorial Guinea",lat:1.650801,long:10.267895,code:"GQ"},{name:"Eritrea",lat:15.179384,long:39.782334,code:"ER"},{name:"Estonia",lat:58.595272,long:25.013607,code:"EE"},{name:"Ethiopia",lat:9.145,long:40.489673,code:"ET"},{name:"Falkland Islands (Malvinas)",lat:-51.796253,long:-59.523613,code:"FK"},{name:"Faroe Islands",lat:61.892635,long:-6.911806,code:"FO"},{name:"Fiji",lat:-16.578193,long:179.414413,code:"FJ"},{name:"Finland",lat:61.92411,long:25.748151,code:"FI"},{name:"France",lat:46.227638,long:2.213749,code:"FR"},{name:"French Guiana",lat:3.933889,long:-53.125782,code:"GF"},{name:"French Polynesia",lat:-17.679742,long:-149.406843,code:"PF"},{name:"French Southern Territories",lat:-49.280366,long:69.348557,code:"TF"},{name:"Gabon",lat:-.803689,long:11.609444,code:"GA"},{name:"Gambia",lat:13.443182,long:-15.310139,code:"GM"},{name:"Georgia",lat:42.315407,long:43.356892,code:"GE"},{name:"Germany",lat:51.165691,long:10.451526,code:"DE"},{name:"Ghana",lat:7.946527,long:-1.023194,code:"GH"},{name:"Gibraltar",lat:36.137741,long:-5.345374,code:"GI"},{name:"Greece",lat:39.074208,long:21.824312,code:"GR"},{name:"Greenland",lat:71.706936,long:-42.604303,code:"GL"},{name:"Grenada",lat:12.262776,long:-61.604171,code:"GD"},{name:"Guadeloupe",lat:16.995971,long:-62.067641,code:"GP"},{name:"Guam",lat:13.444304,long:144.793731,code:"GU"},{name:"Guatemala",lat:15.783471,long:-90.230759,code:"GT"},{name:"Guernsey",lat:49.465691,long:-2.585278,code:"GG"},{name:"Guinea",lat:9.945587,long:-9.696645,code:"GN"},{name:"Guinea-Bissau",lat:11.803749,long:-15.180413,code:"GW"},{name:"Guyana",lat:4.860416,long:-58.93018,code:"GY"},{name:"Haiti",lat:18.971187,long:-72.285215,code:"HT"},{name:"Heard Island and McDonald Islands",lat:-53.08181,long:73.504158,code:"HM"},{name:"Holy See (Vatican City State)",lat:41.902916,long:12.453389,code:"VA"},{name:"Honduras",lat:15.199999,long:-86.241905,code:"HN"},{name:"Hong Kong",lat:22.396428,long:114.109497,code:"HK"},{name:"Hungary",lat:47.162494,long:19.503304,code:"HU"},{name:"Iceland",lat:64.963051,long:-19.020835,code:"IS"},{name:"India",lat:20.593684,long:78.96288,code:"IN"},{name:"Indonesia",lat:-.789275,long:113.921327,code:"ID"},{name:"Iran",lat:32.427908,long:53.688046,code:"IR"},{name:"Iraq",lat:33.223191,long:43.679291,code:"IQ"},{name:"Ireland",lat:53.41291,long:-8.24389,code:"IE"},{name:"Isle of Man",lat:54.236107,long:-4.548056,code:"IM"},{name:"Israel",lat:31.046051,long:34.851612,code:"IL"},{name:"Italy",lat:41.87194,long:12.56738,code:"IT"},{name:"Jamaica",lat:18.109581,long:-77.297508,code:"JM"},{name:"Japan",lat:36.204824,long:138.252924,code:"JP"},{name:"Channel Islands",lat:49.214439,long:-2.13125,code:"JE"},{name:"Jordan",lat:30.585164,long:36.238414,code:"JO"},{name:"Kazakhstan",lat:48.019573,long:66.923684,code:"KZ"},{name:"Kenya",lat:-.023559,long:37.906193,code:"KE"},{name:"Kiribati",lat:-3.370417,long:-168.734039,code:"KI"},{name:"Kosovo",lat:42.602636,long:20.902977,code:"XK"},{name:"N. Korea",lat:40.339852,long:127.510093,code:"KP"},{name:"S. Korea",lat:35.907757,long:127.766922,code:"KR"},{name:"Kuwait",lat:29.31166,long:47.481766,code:"KW"},{name:"Kyrgyzstan",lat:41.20438,long:74.766098,code:"KG"},{name:'Lao People"s Democratic Republic',lat:19.85627,long:102.495496,code:"LA"},{name:"Latvia",lat:56.879635,long:24.603189,code:"LV"},{name:"Lebanon",lat:33.854721,long:35.862285,code:"LB"},{name:"Lesotho",lat:-29.609988,long:28.233608,code:"LS"},{name:"Liberia",lat:6.428055,long:-9.429499,code:"LR"},{name:"Libyan Arab Jamahiriya",lat:26.3351,long:17.228331,code:"LY"},{name:"Liechtenstein",lat:47.166,long:9.555373,code:"LI"},{name:"Lithuania",lat:55.169438,long:23.881275,code:"LT"},{name:"Luxembourg",lat:49.815273,long:6.129583,code:"LU"},{name:"Macao",lat:22.198745,long:113.543873,code:"MO"},{name:"Macedonia",lat:41.608635,long:21.745275,code:"MK"},{name:"Madagascar",lat:-18.766947,long:46.869107,code:"MG"},{name:"Malawi",lat:-13.254308,long:34.301525,code:"MW"},{name:"Malaysia",lat:4.210484,long:101.975766,code:"MY"},{name:"Maldives",lat:3.202778,long:73.22068,code:"MV"},{name:"Mali",lat:17.570692,long:-3.996166,code:"ML"},{name:"Malta",lat:35.937496,long:14.375416,code:"MT"},{name:"Marshall Islands",lat:7.131474,long:171.184478,code:"MH"},{name:"Martinique",lat:14.641528,long:-61.024174,code:"MQ"},{name:"Mauritania",lat:21.00789,long:-10.940835,code:"MR"},{name:"Mauritius",lat:-20.348404,long:57.552152,code:"MU"},{name:"Mayotte",lat:-12.8275,long:45.166244,code:"YT"},{name:"Mexico",lat:23.634501,long:-102.552784,code:"MX"},{name:"Micronesia",lat:7.425554,long:150.550812,code:"FM"},{name:"Moldova",lat:47.411631,long:28.369885,code:"MD"},{name:"Monaco",lat:43.750298,long:7.412841,code:"MC"},{name:"Mongolia",lat:46.862496,long:103.846656,code:"MN"},{name:"Montenegro",lat:42.708678,long:19.37439,code:"ME"},{name:"Montserrat",lat:16.742498,long:-62.187366,code:"MS"},{name:"Morocco",lat:31.791702,long:-7.09262,code:"MA"},{name:"Mozambique",lat:-18.665695,long:35.529562,code:"MZ"},{name:"Myanmar",lat:21.913965,long:95.956223,code:"MM"},{name:"Burma",lat:22,long:98,code:"BU"},{name:"Namibia",lat:-22.95764,long:18.49041,code:"NA"},{name:"Nauru",lat:-.522778,long:166.931503,code:"NR"},{name:"Nepal",lat:28.394857,long:84.124008,code:"NP"},{name:"Netherlands",lat:52.132633,long:5.291266,code:"NL"},{name:"Netherlands Antilles",lat:12.226079,long:-69.060087,code:"AN"},{name:"New Caledonia",lat:-20.904305,long:165.618042,code:"NC"},{name:"New Zealand",lat:-40.900557,long:174.885971,code:"NZ"},{name:"Nicaragua",lat:12.865416,long:-85.207229,code:"NI"},{name:"Niger",lat:17.607789,long:8.081666,code:"NE"},{name:"Nigeria",lat:9.081999,long:8.675277,code:"NG"},{name:"Niue",lat:-19.054445,long:-169.867233,code:"NU"},{name:"Norfolk Island",lat:-29.040835,long:167.954712,code:"NF"},{name:"Northern Mariana Islands",lat:17.33083,long:145.38469,code:"MP"},{name:"Norway",lat:60.472024,long:8.468946,code:"NO"},{name:"Oman",lat:21.512583,long:55.923255,code:"OM"},{name:"Pakistan",lat:30.375321,long:69.345116,code:"PK"},{name:"Palau",lat:7.51498,long:134.58252,code:"PW"},{name:"Palestine",lat:31.952162,long:35.233154,code:"PS"},{name:"Panama",lat:8.537981,long:-80.782127,code:"PA"},{name:"Papua New Guinea",lat:-6.314993,long:143.95555,code:"PG"},{name:"Paraguay",lat:-23.442503,long:-58.443832,code:"PY"},{name:"Peru",lat:-9.189967,long:-75.015152,code:"PE"},{name:"Philippines",lat:12.879721,long:121.774017,code:"PH"},{name:"Pitcairn",lat:-24.703615,long:-127.439308,code:"PN"},{name:"Poland",lat:51.919438,long:19.145136,code:"PL"},{name:"Portugal",lat:39.399872,long:-8.224454,code:"PT"},{name:"Puerto Rico",lat:18.220833,long:-66.590149,code:"PR"},{name:"Qatar",lat:25.354826,long:51.183884,code:"QA"},{name:"Réunion",lat:-21.115141,long:55.536384,code:"RE"},{name:"Romania",lat:45.943161,long:24.96676,code:"RO"},{name:"Russia",lat:61.52401,long:105.318756,code:"RU"},{name:"Rwanda",lat:-1.940278,long:29.873888,code:"RW"},{name:"St. Barth",lat:17.89,long:-62.82,code:"BL"},{name:"Saint Helena",lat:-24.143474,long:-10.030696,code:"SH"},{name:"Saint Kitts and Nevis",lat:17.357822,long:-62.782998,code:"KN"},{name:"Saint Lucia",lat:13.909444,long:-60.978893,code:"LC"},{name:"Saint Pierre Miquelon",lat:46.941936,long:-56.27111,code:"PM"},{name:"Saint Martin",lat:18.11,long:-63.03,code:"MF"},{name:"Sint Maarten",lat:18.02,long:-63.06,code:"SX"},{name:"Saint Vincent and the Grenadines",lat:12.984305,long:-61.287228,code:"VC"},{name:"Samoa",lat:-13.759029,long:-172.104629,code:"WS"},{name:"San Marino",lat:43.94236,long:12.457777,code:"SM"},{name:"Sao Tome and Principe",lat:.18636,long:6.613081,code:"ST"},{name:"Saudi Arabia",lat:23.885942,long:45.079162,code:"SA"},{name:"Senegal",lat:14.497401,long:-14.452362,code:"SN"},{name:"Serbia",lat:44.016521,long:21.005859,code:"RS"},{name:"Seychelles",lat:-4.679574,long:55.491977,code:"SC"},{name:"Sierra Leone",lat:8.460555,long:-11.779889,code:"SL"},{name:"Singapore",lat:1.352083,long:103.819836,code:"SG"},{name:"Slovakia",lat:48.669026,long:19.699024,code:"SK"},{name:"Slovenia",lat:46.151241,long:14.995463,code:"SI"},{name:"Solomon Islands",lat:-9.64571,long:160.156194,code:"SB"},{name:"Somalia",lat:5.152149,long:46.199616,code:"SO"},{name:"South Africa",lat:-30.559482,long:22.937506,code:"ZA"},{name:"South Georgia and the South Sandwich Islands",lat:-54.429579,long:-36.587909,code:"GS"},{name:"South Sudan",lat:6.8769,long:31.3069,code:"SS"},{name:"Spain",lat:40.463667,long:-3.74922,code:"ES"},{name:"Sri Lanka",lat:7.873054,long:80.771797,code:"LK"},{name:"Sudan",lat:12.862807,long:30.217636,code:"SD"},{name:"Suriname",lat:3.919305,long:-56.027783,code:"SR"},{name:"Svalbard and Jan Mayen",lat:77.553604,long:23.670272,code:"SJ"},{name:"Swaziland",lat:-26.522503,long:31.465866,code:"SZ"},{name:"Sweden",lat:60.128161,long:18.643501,code:"SE"},{name:"Switzerland",lat:46.818188,long:8.227512,code:"CH"},{name:"Syrian Arab Republic",lat:34.802075,long:38.996815,code:"SY"},{name:"Taiwan",lat:23.69781,long:120.960515,code:"TW"},{name:"Tajikistan",lat:38.861034,long:71.276093,code:"TJ"},{name:"Tanzania",lat:-6.369028,long:34.888822,code:"TZ"},{name:"Thailand",lat:15.870032,long:100.992541,code:"TH"},{name:"Timor-Leste",lat:-8.874217,long:125.727539,code:"TL"},{name:"Togo",lat:8.619543,long:.824782,code:"TG"},{name:"Tokelau",lat:-8.967363,long:-171.855881,code:"TK"},{name:"Tonga",lat:-21.178986,long:-175.198242,code:"TO"},{name:"Trinidad and Tobago",lat:10.691803,long:-61.222503,code:"TT"},{name:"Tunisia",lat:33.886917,long:9.537499,code:"TN"},{name:"Turkey",lat:38.963745,long:35.243322,code:"TR"},{name:"Turkmenistan",lat:38.969719,long:59.556278,code:"TM"},{name:"Turks and Caicos Islands",lat:21.694025,long:-71.797928,code:"TC"},{name:"Tuvalu",lat:-7.109535,long:177.64933,code:"TV"},{name:"Uganda",lat:1.373333,long:32.290275,code:"UG"},{name:"Ukraine",lat:48.379433,long:31.16558,code:"UA"},{name:"UAE",lat:23.424076,long:53.847818,code:"AE"},{name:"UK",lat:55.378051,long:-3.435973,code:"GB"},{name:"USA",lat:37.09024,long:-95.712891,code:"US"},{name:"United States Minor Outlying Islands",lat:0,long:0,code:"UM"},{name:"Uruguay",lat:-32.522779,long:-55.765835,code:"UY"},{name:"Uzbekistan",lat:41.377491,long:64.585262,code:"UZ"},{name:"Vanuatu",lat:-15.376706,long:166.959158,code:"VU"},{name:"Venezuela",lat:6.42375,long:-66.58973,code:"VE"},{name:"Vietnam",lat:14.058324,long:108.277199,code:"VN"},{name:"British Virgin Islands",lat:18.420695,long:-64.639968,code:"VG"},{name:"U.S. Virgin Islands",lat:18.335765,long:-64.896335,code:"VI"},{name:"Wallis and Futuna",lat:-13.768752,long:-177.156097,code:"WF"},{name:"Western Sahara",lat:24.215527,long:-12.885834,code:"EH"},{name:"Yemen",lat:15.552727,long:48.516388,code:"YE"},{name:"Zambia",lat:-13.133897,long:27.849332,code:"ZM"},{name:"Zimbabwe",lat:-19.015438,long:29.154857,code:"ZW"}];function d_(e){return f_.find(n=>n.code===e)}Or.extend(a_);Or.extend(c_);Or.extend(h_);function Qd(e){return Or(e).local().format("YYYY-MM-DD HH:mm:ss")}function ep(e){return Or(e).local().fromNow()}function tp(e){const t=d_(e);if(t)return{lat:t.lat,long:t.long}}function p_(e){if(e.loc){const t=e.loc.split(",");if(t.length===2){const n=t[0],r=t[1];return{lat:parseFloat(n),long:parseFloat(r)}}}return tp(e.countryCode)}const g_=be({name:"AlertItem",components:{Artifacts:jd,Tags:El,ActionButtons:Vd,ErrorMessage:lt},props:{alert:{type:Object,required:!0}},emits:["delete"],setup(e,t){const n=Fe();return{onDelete:()=>{t.emit("delete")},getLocalDatetime:Qd,getHumanizedRelativeTime:ep,onSetError:h=>{n.value=h},onDisposeError:()=>{n.value=void 0},error:n}}}),m_={class:"box"},v_={class:"table is-fullwidth is-completely-borderless"},y_=N("th",null,"Rule",-1),b_=N("th",null,"Artifacts",-1),w_={key:0},$_=N("th",null,"Tags",-1),__={class:"help"};function S_(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("ActionButtons"),s=oe("router-link"),p=oe("Artifacts"),o=oe("Tags");return Z(),ie("div",m_,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),N("p",null,[ae(g,{alert:e.alert,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["alert","onDelete","onSetError"])]),ae(s,{class:"is-size-4",to:{name:"Alert",params:{id:e.alert.id}}},{default:Je(()=>[et(ye(e.alert.id),1)]),_:1},8,["to"]),N("table",v_,[N("tr",null,[y_,N("td",null,[ae(s,{to:{name:"Rule",params:{id:e.alert.ruleId}}},{default:Je(()=>[et(ye(e.alert.ruleId),1)]),_:1},8,["to"])])]),N("tr",null,[b_,N("td",null,[ae(p,{artifacts:e.alert.artifacts},null,8,["artifacts"])])]),e.alert.tags.length>0?(Z(),ie("tr",w_,[$_,N("td",null,[ae(o,{tags:e.alert.tags},null,8,["tags"])])])):de("",!0)]),N("p",__,"Created at: "+ye(e.alert.createdAt),1)])}const C_=Se(g_,[["render",S_]]),A_=be({name:"PaginationItem",props:{currentPage:{type:Number,required:!0},pageSize:{type:Number,required:!0},total:{type:Number,required:!0}},emits:["update-page"],setup(e,t){const n=o=>o===e.currentPage+1||o===e.currentPage-1,r=ke(()=>Math.ceil(e.total/e.pageSize)),f=ke(()=>r.value===1),u=ke(()=>e.currentPage>1),h=ke(()=>e.currentPage-1===1),g=ke(()=>e.currentPage<r.value),s=ke(()=>e.currentPage+1===r.value);return{updatePage:o=>{t.emit("update-page",o)},isNextPage:n,hasNextPage:g,hasOnlyOnePage:f,hasPreviousPage:u,isNextPageLast:s,isPreviousPageFirst:h,totalPageCount:r}}}),k_={key:0,class:"message is-warning"},E_=N("div",{class:"message-body"},"There is no result to show.",-1),x_=[E_],R_={key:1,class:"pagination",role:"navigation","aria-label":"pagination"},T_={key:0,class:"pagination-list"},L_={key:1,class:"pagination-list"},M_={key:0},O_={key:1},I_=N("span",{class:"pagination-ellipsis"},"…",-1),F_=[I_],N_={key:2},D_={key:3},P_={key:4},B_=N("span",{class:"pagination-ellipsis"},"…",-1),W_=[B_],H_={key:5};function U_(e,t,n,r,f,u){return e.total===0?(Z(),ie("article",k_,x_)):(Z(),ie("nav",R_,[e.hasOnlyOnePage?(Z(),ie("ul",T_,[N("li",null,[N("a",{class:"pagination-link mt-2 is-current",onClick:t[0]||(t[0]=h=>e.updatePage(1))},"1")])])):(Z(),ie("ul",L_,[e.hasPreviousPage&&!e.isPreviousPageFirst?(Z(),ie("li",M_,[N("a",{class:"pagination-link mt-2",onClick:t[1]||(t[1]=h=>e.updatePage(1))}," 1")])):de("",!0),e.hasPreviousPage&&!e.isPreviousPageFirst&&!e.isNextPage(2)?(Z(),ie("li",O_,F_)):de("",!0),e.hasPreviousPage?(Z(),ie("li",N_,[N("a",{class:"pagination-link mt-2",onClick:t[2]||(t[2]=h=>e.updatePage(e.currentPage-1))},ye(e.currentPage-1),1)])):de("",!0),N("li",null,[N("a",{class:"pagination-link mt-2 is-current",onClick:t[3]||(t[3]=h=>e.updatePage(e.currentPage))},ye(e.currentPage),1)]),e.hasNextPage?(Z(),ie("li",D_,[N("a",{class:"pagination-link mt-2",onClick:t[4]||(t[4]=h=>e.updatePage(e.currentPage+1))},ye(e.currentPage+1),1)])):de("",!0),e.hasNextPage&&!e.isNextPageLast&&!e.isNextPage(e.totalPageCount-1)?(Z(),ie("li",P_,W_)):de("",!0),e.hasNextPage&&!e.isNextPageLast?(Z(),ie("li",H_,[N("a",{class:"pagination-link mt-2",onClick:t[5]||(t[5]=h=>e.updatePage(e.totalPageCount))},ye(e.totalPageCount),1)])):de("",!0)]))]))}const xl=Se(A_,[["render",U_]]),z_=be({name:"AlertsItem",components:{Alert:C_,Pagination:xl},props:{page:{type:String,required:!0},alerts:{type:Object,required:!0}},emits:["update-page"],setup(e,t){const n=u=>{t.emit("update-page",u)},r=()=>{t.emit("update-page",1)},f=ke(()=>e.alerts.results.length>0);return{onUpdatePage:n,onDelete:r,hasAlerts:f}}}),V_={key:0},j_={class:"help"},G_={key:1},K_=N("div",{class:"notification is-warning is-light"},"There is no alert to show",-1),Y_=[K_];function X_(e,t,n,r,f,u){const h=oe("Alert"),g=oe("Pagination");return e.hasAlerts?(Z(),ie("div",V_,[(Z(!0),ie(xe,null,$t(e.alerts.results,s=>(Z(),_e(h,{alert:s,key:s.id,onDelete:e.onDelete},null,8,["alert","onDelete"]))),128)),ae(g,{total:e.alerts.total,currentPage:e.alerts.currentPage,pageSize:e.alerts.pageSize,onUpdatePage:e.onUpdatePage},null,8,["total","currentPage","pageSize","onUpdatePage"]),N("p",j_,"("+ye(e.alerts.total)+" results in total, "+ye(e.alerts.results.length)+" shown)",1)])):(Z(),ie("div",G_,Y_))}const np=Se(z_,[["render",X_]]),Z_=be({name:"LoadingItem"}),q_={class:"has-text-centered"},J_={class:"fa-3x"};function Q_(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("div",q_,[N("div",J_,[ae(h,{icon:"spinner",spin:""})])])}const cn=Se(Z_,[["render",Q_]]),eS=be({name:"AlertsWithPagination",props:{ruleId:{type:String,required:!0},excludeAlertId:{type:Number,required:!1}},components:{Alerts:np,Loading:cn,ErrorMessage:lt},setup(e){const t=Fe(1),n=ke(()=>e.excludeAlertId?`rule.id:"${e.ruleId}" AND NOT id:${e.excludeAlertId}`:`rule.id:"${e.ruleId}"`),r=ki(),f=async()=>{const h={q:n.value,page:t.value};return await r.perform(h)},u=h=>{t.value=h};return Ye(async()=>{await f()}),qe([e,t],async()=>{await f()}),{page:t,getAlertsTask:r,onUpdatePage:u}}});function tS(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Alerts");return Z(),ie(xe,null,[e.getAlertsTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getAlertsTask.isError?(Z(),_e(g,{key:1,error:(p=e.getAlertsTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getAlertsTask.last)!=null&&o.value?(Z(),_e(s,{key:2,page:e.page.toString(),alerts:e.getAlertsTask.last.value,onUpdatePage:e.onUpdatePage},null,8,["page","alerts","onUpdatePage"])):de("",!0)],64)}const rp=Se(eS,[["render",tS]]),nS=be({name:"AlertDetail",components:{Artifacts:jd,Tags:El,Alerts:rp,ActionButtons:Vd,ErrorMessage:lt},props:{alert:{type:Object,required:!0}},emits:["delete"],setup(e,t){const n=Fe();return{onDelete:()=>{t.emit("delete")},getLocalDatetime:Qd,getHumanizedRelativeTime:ep,onSetError:h=>{n.value=h},onDisposeError:()=>{n.value=void 0},error:n}}}),rS={class:"block"},iS={class:"is-size-2"},oS={class:"is-clearfix"},sS={class:"table is-fullwidth is-completely-borderless"},aS=N("th",null,"Rule",-1),lS=N("th",null,"Artifacts",-1),cS={key:0},uS=N("th",null,"Tags",-1),hS={class:"help"},fS=N("hr",null,null,-1),dS={class:"block"},pS=N("h2",{class:"is-size-2 block"},"Related Alerts",-1);function gS(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("ActionButtons"),s=oe("router-link"),p=oe("Artifacts"),o=oe("Tags"),i=oe("Alerts");return Z(),ie(xe,null,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),N("div",rS,[N("h2",iS,ye(e.alert.id),1),N("p",oS,[ae(g,{alert:e.alert,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["alert","onDelete","onSetError"])]),N("table",sS,[N("tr",null,[aS,N("td",null,[ae(s,{to:{name:"Rule",params:{id:e.alert.ruleId}}},{default:Je(()=>[et(ye(e.alert.ruleId),1)]),_:1},8,["to"])])]),N("tr",null,[lS,N("td",null,[ae(p,{artifacts:e.alert.artifacts},null,8,["artifacts"])])]),e.alert.tags.length>0?(Z(),ie("tr",cS,[uS,N("td",null,[ae(o,{tags:e.alert.tags},null,8,["tags"])])])):de("",!0)]),N("p",hS,"Created at: "+ye(e.alert.createdAt),1)]),fS,N("div",dS,[pS,ae(i,{"rule-id":e.alert.ruleId,"exclude-alert-id":e.alert.id},null,8,["rule-id","exclude-alert-id"])])],64)}const mS=Se(nS,[["render",gS]]),vS=be({name:"AlertDetailWrapper",components:{AlertComponent:mS,Loading:cn,ErrorMessage:lt},props:{id:{type:Number,required:!0}},setup(e){const t=Lr(),n=A$(),r=()=>{t.push("/")};return Ye(async()=>{await n.perform(e.id)}),{getAlertTask:n,onDelete:r}}});function yS(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("AlertComponent");return Z(),ie(xe,null,[e.getAlertTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getAlertTask.isError?(Z(),_e(g,{key:1,error:(p=e.getAlertTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getAlertTask.last)!=null&&o.value?(Z(),_e(s,{key:2,alert:e.getAlertTask.last.value,onDelete:e.onDelete},null,8,["alert","onDelete"])):de("",!0)],64)}const bS=Se(vS,[["render",yS]]),wS=be({name:"AlertView",components:{Alert:bS},props:{id:{type:String,required:!0}},setup(e){const t=()=>{ln(`Alert:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function $S(e,t,n,r,f,u){const h=oe("Alert",!0);return Z(),_e(h,{id:parseInt(e.id)},null,8,["id"])}const _S=Se(wS,[["render",$S]]),Is=new WeakMap;function _r(e,t,n={}){const{mode:r="replace",route:f=b1(),router:u=Lr(),transform:h=i=>i}=n;Is.has(u)||Is.set(u,new Map);const g=Is.get(u);let s=f.query[e];ad(()=>{s=void 0});let p;const o=No((i,a)=>(p=a,{get(){return i(),h(s!==void 0?s:wo(t))},set(c){s!==c&&(s=c,g.set(e,c),a(),bi(()=>{if(g.size===0)return;const l=Object.fromEntries(g.entries());g.clear();const{params:d,query:m,hash:v}=f;u[wo(r)]({params:d,query:{...m,...l},hash:v})}))}}));return qe(()=>f.query[e],i=>{s=i,p()},{flush:"sync"}),o}const SS=be({name:"AlertsWrapper",components:{AlertsComponent:np,Loading:cn,ErrorMessage:lt},setup(){const e=_r("page","1"),t=_r("q",""),n=Fe(!1),r=ki(),f=async()=>{const s={q:t.value,page:parseInt(e.value)};return await r.perform(s)},u=s=>{e.value=s.toString()},h=async()=>{e.value="1",await f()},g=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getAlertsTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:g,onUpdatePage:u}}}),CS={class:"block"},AS={class:"field has-addons"},kS={class:"control is-expanded"},ES={class:"control"},xS={class:"icon is-small"},RS=N("span",null,"Search",-1),TS={class:"control"},LS={class:"icon is-small"},MS=N("span",null,"Help",-1),OS={key:0,class:"content"},IS=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li> Searchable fields are <code>id</code>, <code>tag</code>, <code>created_at</code>, <code>rule.id</code>, <code>rule.title</code>, <code>rule.description</code>, <code>artifact.data</code>, <code>artifact.data_type</code>, <code>artifact.source</code> and <code>artifact.query</code>. </li></ul><h4 class="is-size-4">Examples</h4>',3),FS={key:0,class:"block"};function NS(e,t,n,r,f,u){var i,a;const h=oe("font-awesome-icon"),g=oe("router-link"),s=oe("Loading"),p=oe("ErrorMessage"),o=oe("AlertsComponent");return Z(),ie(xe,null,[N("div",CS,[N("div",AS,[N("p",kS,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=c=>e.q=c)},null,512),[[qn,e.q]])]),N("p",ES,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...c)=>e.search&&e.search(...c))},[N("span",xS,[ae(h,{icon:"search"})]),RS])]),N("p",TS,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...c)=>e.toggleShowHelp&&e.toggleShowHelp(...c))},[N("span",LS,[ae(h,{icon:"question"})]),MS])])]),e.showHelp?(Z(),ie("div",OS,[IS,N("ul",null,[N("li",null,[ae(g,{to:{name:"Alerts",query:{q:"rule.id:foo AND artifact.data:example.com"}}},{default:Je(()=>[et("rule.id:foo AND artifact.data:example.com")]),_:1},8,["to"])]),N("li",null,[ae(g,{to:{name:"Alerts",query:{q:"tag:foo AND created_at >= 2020-01-01"}}},{default:Je(()=>[et("tag:foo AND created_at >= 2020-01-01")]),_:1})])])])):de("",!0)]),e.getAlertsTask.performCount>0?(Z(),ie("div",FS,[e.getAlertsTask.isRunning?(Z(),_e(s,{key:0})):de("",!0),e.getAlertsTask.isError?(Z(),_e(p,{key:1,error:(i=e.getAlertsTask.last)==null?void 0:i.error},null,8,["error"])):de("",!0),(a=e.getAlertsTask.last)!=null&&a.value?(Z(),_e(o,{key:2,alerts:e.getAlertsTask.last.value,page:e.page,onUpdatePage:e.onUpdatePage},null,8,["alerts","page","onUpdatePage"])):de("",!0)])):de("",!0)],64)}const DS=Se(SS,[["render",NS]]),PS=be({name:"OverviewCards",setup(){const e=ki(),t=Ud(),n=kl();return Ye(()=>{e.perform({q:"",page:1,limit:0}),t.perform({q:"",page:1,limit:0}),n.perform({q:"",page:1,limit:0})}),{getAlertsTask:e,getArtifactsTask:n,getRulesTask:t}}}),BS={class:"columns"},WS={class:"column is-one-third"},HS={class:"card tile is-child"},US={class:"card-content"},zS={class:"level is-mobile"},VS={class:"level-item"},jS={class:"is-widget-label"},GS=N("h3",{class:"subtitle is-spaced"},"Rules",-1),KS={class:"title"},YS={class:"level-item has-widget-icon"},XS={class:"is-widget-icon"},ZS={class:"icon has-text-info is-large"},qS={class:"column is-one-third"},JS={class:"card tile is-child"},QS={class:"card-content"},eC={class:"level is-mobile"},tC={class:"level-item"},nC={class:"is-widget-label"},rC=N("h3",{class:"subtitle is-spaced"},"Alerts",-1),iC={class:"title"},oC={class:"level-item has-widget-icon"},sC={class:"is-widget-icon"},aC={class:"icon has-text-info is-large"},lC={class:"column is-one-third"},cC={class:"card tile is-child"},uC={class:"card-content"},hC={class:"level is-mobile"},fC={class:"level-item"},dC={class:"is-widget-label"},pC=N("h3",{class:"subtitle is-spaced"},"Artifacts",-1),gC={class:"title"},mC={class:"level-item has-widget-icon"},vC={class:"is-widget-icon"},yC={class:"icon has-text-info is-large"};function bC(e,t,n,r,f,u){var g,s,p,o,i,a;const h=oe("font-awesome-icon");return Z(),ie("div",BS,[N("div",WS,[N("div",HS,[N("div",US,[N("div",zS,[N("div",VS,[N("div",jS,[GS,N("h1",KS,ye(((s=(g=e.getRulesTask.last)==null?void 0:g.value)==null?void 0:s.total)??"N/A"),1)])]),N("div",YS,[N("div",XS,[N("span",ZS,[ae(h,{icon:"file",size:"2x"})])])])])])])]),N("div",qS,[N("div",JS,[N("div",QS,[N("div",eC,[N("div",tC,[N("div",nC,[rC,N("h1",iC,ye(((o=(p=e.getAlertsTask.last)==null?void 0:p.value)==null?void 0:o.total)??"N/A"),1)])]),N("div",oC,[N("div",sC,[N("span",aC,[ae(h,{icon:"bell",size:"2x"})])])])])])])]),N("div",lC,[N("div",cC,[N("div",uC,[N("div",hC,[N("div",fC,[N("div",dC,[pC,N("h1",gC,ye(((a=(i=e.getArtifactsTask.last)==null?void 0:i.value)==null?void 0:a.total)??"N/A"),1)])]),N("div",mC,[N("div",vC,[N("span",yC,[ae(h,{icon:"ticket",size:"2x"})])])])])])])])])}const wC=Se(PS,[["render",bC]]),$C=be({name:"AlertsView",components:{Alerts:DS,OverviewCards:wC},setup(){ln("Alerts - Mihari")}}),_C=N("hr",null,null,-1);function SC(e,t,n,r,f,u){const h=oe("OverviewCards"),g=oe("Alerts",!0);return Z(),ie(xe,null,[ae(h),_C,ae(g)],64)}const CC=Se($C,[["render",SC]]),AC=be({name:"ArtifactActionButtons",props:{artifact:{type:Object,required:!0}},components:{VueJsonPretty:Yd},emits:["delete","set-error","set-message"],setup(e,t){const n=ke(()=>`/api/artifacts/${e.artifact.id}`),r=Fe(!1),f=Hd(),u=y$();return{deleteArtifact:async()=>{if(window.confirm(`Are you sure you want to delete ${e.artifact.data}?`))try{await f.perform(e.artifact.id),t.emit("delete")}catch(o){Ue.isAxiosError(o)&&t.emit("set-error",o)}},enrichArtifact:async()=>{try{const p=await u.perform(e.artifact.id);t.emit("set-message",p)}catch(p){Ue.isAxiosError(p)&&t.emit("set-error",p)}},enrichArtifactTask:u,toggleShowMetadata:()=>{r.value=!r.value},href:n,showMetadata:r,truncate:Ei}}}),xi=e=>(Ho("data-v-13186183"),e=e(),Uo(),e),kC={class:"buttons is-pulled-right"},EC=["href"],xC=xi(()=>N("span",null,"JSON",-1)),RC={class:"icon is-small"},TC=xi(()=>N("span",null,"Metadata",-1)),LC={class:"icon is-small"},MC=xi(()=>N("span",null,"Enrich",-1)),OC={class:"icon is-small"},IC=xi(()=>N("span",null,"Delete",-1)),FC={class:"icon is-small"},NC={key:0},DC={class:"modal is-active"},PC={class:"modal-card"},BC={class:"modal-card-head"},WC=xi(()=>N("p",{class:"modal-card-title"},"Metadata",-1)),HC={class:"modal-card-body"};function UC(e,t,n,r,f,u){const h=oe("font-awesome-icon"),g=oe("VueJsonPretty");return Z(),ie(xe,null,[N("span",kC,[N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[xC,N("span",RC,[ae(h,{icon:"barcode"})])],8,EC),e.artifact.metadata?(Z(),ie("button",{key:0,class:"button is-info is-light is-small",onClick:t[0]||(t[0]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))},[TC,N("span",LC,[ae(h,{icon:"info-circle"})])])):de("",!0),N("button",{class:"button is-primary is-light is-small",onClick:t[1]||(t[1]=(...s)=>e.enrichArtifact&&e.enrichArtifact(...s))},[MC,N("span",OC,[e.enrichArtifactTask.isRunning?(Z(),_e(h,{key:0,icon:"spinner",spin:""})):(Z(),_e(h,{key:1,icon:"lightbulb"}))])]),N("button",{class:"button is-light is-small",onClick:t[2]||(t[2]=(...s)=>e.deleteArtifact&&e.deleteArtifact(...s))},[IC,N("span",FC,[ae(h,{icon:"times"})])])]),e.artifact.metadata&&e.showMetadata?(Z(),ie("div",NC,[N("div",DC,[N("div",{class:"modal-background",onClick:t[3]||(t[3]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))}),N("div",PC,[N("header",BC,[WC,N("button",{class:"delete","aria-label":"close",onClick:t[4]||(t[4]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))})]),N("section",HC,[ae(g,{data:e.artifact.metadata},null,8,["data"])])])])])):de("",!0)],64)}const ip=Se(AC,[["render",UC],["__scopeId","data-v-13186183"]]),zC=be({name:"AS",props:{autonomousSystem:{type:Object,required:!0}}}),VC={class:"tags are-medium"},jC={class:"tag"};function GC(e,t,n,r,f,u){return Z(),ie("div",VC,[N("span",jC,ye(e.autonomousSystem.asn),1)])}const KC=Se(zC,[["render",GC]]),YC=be({name:"CPEsItem",props:{cpes:{type:Array,required:!0}}}),XC={class:"tags are-medium"};function ZC(e,t,n,r,f,u){return Z(),ie("div",XC,[(Z(!0),ie(xe,null,$t(e.cpes,h=>(Z(),ie("span",{class:"tag",key:h.cpe},ye(h.cpe),1))),128))])}const qC=Se(YC,[["render",ZC]]),JC=be({name:"DnsRecords",props:{dnsRecords:{type:Array,required:!0}},setup(){return{truncate:Ei}}}),QC={class:"field is-grouped is-grouped-multiline"},eA={class:"tags has-addons are-medium"},tA={class:"tag is-dark"},nA={class:"tag"};function rA(e,t,n,r,f,u){return Z(),ie("div",QC,[(Z(!0),ie(xe,null,$t(e.dnsRecords,(h,g)=>(Z(),ie("div",{class:"control",key:g},[N("div",eA,[N("span",tA,ye(h.resource),1),N("span",nA,ye(e.truncate(h.value,50)),1)])]))),128))])}const iA=Se(JC,[["render",rA]]),oA=be({name:"PortsItem",props:{ports:{type:Array,required:!0}}}),sA={class:"tags are-medium"};function aA(e,t,n,r,f,u){return Z(),ie("div",sA,[(Z(!0),ie(xe,null,$t(e.ports,h=>(Z(),ie("span",{class:"tag",key:h.port},ye(h.port),1))),128))])}const lA=Se(oA,[["render",aA]]),cA=be({name:"ReverseDnsNames",props:{reverseDnsNames:{type:Array,required:!0}}}),uA={class:"tags are-medium"};function hA(e,t,n,r,f,u){return Z(),ie("div",uA,[(Z(!0),ie(xe,null,$t(e.reverseDnsNames,h=>(Z(),ie("span",{class:"tag",key:h.name},ye(h.name),1))),128))])}const fA=Se(cA,[["render",hA]]),dA=be({name:"TagsItem",props:{tags:{type:Array,required:!0}}}),pA={class:"tags are-medium"};function gA(e,t,n,r,f,u){const h=oe("router-link");return Z(),ie("div",pA,[(Z(!0),ie(xe,null,$t(e.tags,g=>(Z(),_e(h,{class:"tag is-info is-light",key:g.id,to:{name:"Alerts",query:{tag:g.name}}},{default:Je(()=>[et(ye(g.name),1)]),_:2},1032,["to"]))),128))])}const mA=Se(dA,[["render",gA]]),vA=be({name:"WhoisRecord",props:{whoisRecord:{type:Object,required:!0}}}),yA={class:"field is-grouped is-grouped-multiline"},bA={class:"control"},wA={class:"tags has-addons are-medium"},$A=N("span",{class:"tag is-dark"},"Registrar",-1),_A={class:"tag is-light"},SA={class:"control"},CA={class:"tags has-addons are-medium"},AA=N("span",{class:"tag is-dark"},"Created on",-1),kA={class:"tag is-light"},EA={class:"control"},xA={class:"tags has-addons are-medium"},RA=N("span",{class:"tag is-dark"},"Updated on",-1),TA={class:"tag is-light"},LA={class:"control"},MA={class:"tags has-addons are-medium"},OA=N("span",{class:"tag is-dark"},"Expires on",-1),IA={class:"tag is-light"};function FA(e,t,n,r,f,u){var h;return Z(),ie("div",yA,[N("div",bA,[N("div",wA,[$A,N("span",_A,ye(((h=e.whoisRecord.registrar)==null?void 0:h.name)||"N/A"),1)])]),N("div",SA,[N("div",CA,[AA,N("span",kA,ye(e.whoisRecord.createdOn||"N/A"),1)])]),N("div",EA,[N("div",xA,[RA,N("span",TA,ye(e.whoisRecord.updatedOn||"N/A"),1)])]),N("div",LA,[N("div",MA,[OA,N("span",IA,ye(e.whoisRecord.expiresOn||"N/A"),1)])])])}const NA=Se(vA,[["render",FA]]),DA=be({name:"LinkItem",props:{data:{type:String,required:!0},link:{type:Object,required:!0}}}),PA=["href"],BA=["src"];function WA(e,t,n,r,f,u){return Z(),ie("a",{href:e.link.href(e.data),class:"tag is-white",target:"_blank"},[N("img",{src:e.link.favicon(),alt:"favicon"},null,8,BA),N("span",null,ye(e.link.name),1)],8,PA)}const HA=Se(DA,[["render",WA],["__scopeId","data-v-66270500"]]);class kt{constructor(){Te(this,"baseURL");this.baseURL="https://example.com"}favicon(){return"https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url="+this.baseURL}}class UA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://app.any.run",this.name="ANY.RUN",this.type="hash"}href(n){return this.baseURL+`/submissions/#filehash:${n}`}}class zA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://search.censys.io",this.name="Censys",this.type="ip"}href(n){return this.baseURL+`/hosts/${n}`}}class VA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://crt.sh",this.name="crt.sh",this.type="domain"}href(n){return this.baseURL+`/?q=${n}`}}class jA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="ip"}href(n){return this.baseURL+`/ip/${n}`}}class GA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="domain"}href(n){return this.baseURL+`/domain/${n}`}}class KA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://emailrep.io",this.name="EmailRep",this.type="mail"}href(n){return this.baseURL+`/${n}`}}class YA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://viz.greynoise.io",this.name="GreyNoise",this.type="ip"}href(n){return this.baseURL+`/ip/${n}`}}class XA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://analyze.intezer.com",this.name="Intezer",this.type="hash"}href(n){return this.baseURL+`/#/files/${n}`}}class op extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://otx.alienvault.com",this.name="OTX",this.type="ip"}href(n){return this.baseURL+`/indicator/ip/${n}`}}class ZA extends op{constructor(){super();Te(this,"type");this.type="domain"}href(n){return this.baseURL+`/indicator/domain/${n}`}}class sp extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://securitytrails.com",this.name="SecurityTrails",this.type="domain"}}class qA extends sp{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}/dns`}}class JA extends sp{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/list/ip/${t}`}}class QA extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://www.shodan.io",this.name="Shodan",this.type="ip"}href(n){return this.baseURL+`/host/${n}`}}class Rl extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://urlscan.io",this.name="urlscan.io",this.type="domain"}}class e2 extends Rl{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}`}}class t2 extends Rl{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/ip/${t}`}}class n2 extends Rl{constructor(){super(),this.type="url"}href(t){const n=encodeURIComponent(`page.url:"${t}" OR task.url:"${t}"`);return this.baseURL+`/search/#${n}`}}var ap={exports:{}};const r2={},i2=Object.freeze(Object.defineProperty({__proto__:null,default:r2},Symbol.toStringTag,{value:"Module"})),Cu=Gd(i2);/**
|
779
|
+
`):" "+wu(u[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return r},adapters:Sa};function Os(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ai(null,e)}function $u(e){return Os(e),e.headers=en.from(e.headers),e.data=Ms.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Dd.getAdapter(e.adapter||Al.adapter)(e).then(function(r){return Os(e),r.data=Ms.call(e,e.transformResponse,r),r.headers=en.from(r.headers),r},function(r){return Fd(r)||(Os(e),r&&r.response&&(r.response.data=Ms.call(e,e.transformResponse,r.response),r.response.headers=en.from(r.response.headers))),Promise.reject(r)})}const _u=e=>e instanceof en?e.toJSON():e;function wr(e,t){t=t||{};const n={};function r(p,o,i){return ne.isPlainObject(p)&&ne.isPlainObject(o)?ne.merge.call({caseless:i},p,o):ne.isPlainObject(o)?ne.merge({},o):ne.isArray(o)?o.slice():o}function f(p,o,i){if(ne.isUndefined(o)){if(!ne.isUndefined(p))return r(void 0,p,i)}else return r(p,o,i)}function u(p,o){if(!ne.isUndefined(o))return r(void 0,o)}function h(p,o){if(ne.isUndefined(o)){if(!ne.isUndefined(p))return r(void 0,p)}else return r(void 0,o)}function g(p,o,i){if(i in t)return r(p,o);if(i in e)return r(void 0,p)}const s={url:u,method:u,data:u,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:g,headers:(p,o)=>f(_u(p),_u(o),!0)};return ne.forEach(Object.keys(Object.assign({},e,t)),function(o){const i=s[o]||f,a=i(e[o],t[o],o);ne.isUndefined(a)&&i!==g||(n[o]=a)}),n}const Pd="1.6.5",kl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Su={};kl.transitional=function(t,n,r){function f(u,h){return"[Axios v"+Pd+"] Transitional option '"+u+"'"+h+(r?". "+r:"")}return(u,h,g)=>{if(t===!1)throw new Oe(f(h," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!Su[h]&&(Su[h]=!0,console.warn(f(h," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(u,h,g):!0}};function l$(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let f=r.length;for(;f-- >0;){const u=r[f],h=t[u];if(h){const g=e[u],s=g===void 0||h(g,u,e);if(s!==!0)throw new Oe("option "+u+" must be "+s,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+u,Oe.ERR_BAD_OPTION)}}const Ca={assertOptions:l$,validators:kl},gn=Ca.validators;let $o=class{constructor(t){this.defaults=t,this.interceptors={request:new vu,response:new vu}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wr(this.defaults,n);const{transitional:r,paramsSerializer:f,headers:u}=n;r!==void 0&&Ca.assertOptions(r,{silentJSONParsing:gn.transitional(gn.boolean),forcedJSONParsing:gn.transitional(gn.boolean),clarifyTimeoutError:gn.transitional(gn.boolean)},!1),f!=null&&(ne.isFunction(f)?n.paramsSerializer={serialize:f}:Ca.assertOptions(f,{encode:gn.function,serialize:gn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let h=u&&ne.merge(u.common,u[n.method]);u&&ne.forEach(["delete","get","head","post","put","patch","common"],l=>{delete u[l]}),n.headers=en.concat(h,u);const g=[];let s=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(s=s&&d.synchronous,g.unshift(d.fulfilled,d.rejected))});const p=[];this.interceptors.response.forEach(function(d){p.push(d.fulfilled,d.rejected)});let o,i=0,a;if(!s){const l=[$u.bind(this),void 0];for(l.unshift.apply(l,g),l.push.apply(l,p),a=l.length,o=Promise.resolve(n);i<a;)o=o.then(l[i++],l[i++]);return o}a=g.length;let c=n;for(i=0;i<a;){const l=g[i++],d=g[i++];try{c=l(c)}catch(m){d.call(this,m);break}}try{o=$u.call(this,c)}catch(l){return Promise.reject(l)}for(i=0,a=p.length;i<a;)o=o.then(p[i++],p[i++]);return o}getUri(t){t=wr(this.defaults,t);const n=Nd(t.baseURL,t.url);return Ld(n,t.params,t.paramsSerializer)}};ne.forEach(["delete","get","head","options"],function(t){$o.prototype[t]=function(n,r){return this.request(wr(r||{},{method:t,url:n,data:(r||{}).data}))}});ne.forEach(["post","put","patch"],function(t){function n(r){return function(u,h,g){return this.request(wr(g||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:u,data:h}))}}$o.prototype[t]=n(),$o.prototype[t+"Form"]=n(!0)});const ro=$o;let c$=class Bd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(u){n=u});const r=this;this.promise.then(f=>{if(!r._listeners)return;let u=r._listeners.length;for(;u-- >0;)r._listeners[u](f);r._listeners=null}),this.promise.then=f=>{let u;const h=new Promise(g=>{r.subscribe(g),u=g}).then(f);return h.cancel=function(){r.unsubscribe(u)},h},t(function(u,h,g){r.reason||(r.reason=new Ai(u,h,g),n(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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Bd(function(f){t=f}),cancel:t}}};const u$=c$;function h$(e){return function(n){return e.apply(null,n)}}function f$(e){return ne.isObject(e)&&e.isAxiosError===!0}const Aa={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(Aa).forEach(([e,t])=>{Aa[t]=e});const d$=Aa;function Wd(e){const t=new ro(e),n=bd(ro.prototype.request,t);return ne.extend(n,ro.prototype,t,{allOwnKeys:!0}),ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(f){return Wd(wr(e,f))},n}const Ue=Wd(Al);Ue.Axios=ro;Ue.CanceledError=Ai;Ue.CancelToken=u$;Ue.isCancel=Fd;Ue.VERSION=Pd;Ue.toFormData=os;Ue.AxiosError=Oe;Ue.Cancel=Ue.CanceledError;Ue.all=function(t){return Promise.all(t)};Ue.spread=h$;Ue.isAxiosError=f$;Ue.mergeConfig=wr;Ue.AxiosHeaders=en;Ue.formToJSON=e=>Id(ne.isHTMLForm(e)?new FormData(e):e);Ue.getAdapter=Dd.getAdapter;Ue.HttpStatusCode=d$;Ue.default=Ue;const{Axios:uT,AxiosError:p$,CanceledError:hT,isCancel:fT,CancelToken:dT,VERSION:pT,all:gT,Cancel:mT,isAxiosError:vT,spread:yT,toFormData:bT,AxiosHeaders:wT,HttpStatusCode:$T,formToJSON:_T,getAdapter:ST,mergeConfig:CT}=Ue,rt=Ue.create(),ft={async getConfigs(){return(await rt.get("/api/configs")).data},async getAlerts(e){return e.page=e.page||1,(await rt.get("/api/alerts",{params:e})).data},async getAlert(e){return(await rt.get(`/api/alerts/${e}`)).data},async getTags(){return(await rt.get("/api/tags")).data},async deleteAlert(e){return(await rt.delete(`/api/alerts/${e}`)).data},async getArtifact(e){return(await rt.get(`/api/artifacts/${e}`)).data},async getArtifacts(e){return e.page=e.page||1,(await rt.get("/api/artifacts",{params:e})).data},async enrichArtifact(e){return(await rt.post(`/api/artifacts/${e}/enrich`)).data},async deleteArtifact(e){return(await rt.delete(`/api/artifacts/${e}`)).data},async getRules(e){return e.page=e.page||1,(await rt.get("/api/rules",{params:e})).data},async getRule(e){return(await rt.get(`/api/rules/${e}`)).data},async searchRule(e){return(await rt.post(`/api/rules/${e}/search`)).data},async createRule(e){return(await rt.post("/api/rules/",e)).data},async updateRule(e){return(await rt.put("/api/rules/",e)).data},async deleteRule(e){return(await rt.delete(`/api/rules/${e}`)).data},async deleteTag(e){return(await rt.delete(`/api/tags/${e}`)).data},async getIPInfo(e){return(await rt.get(`/api/ip_addresses/${e}`)).data}};function ki(){return ht(async(e,t)=>await ft.getAlerts(t))}function g$(){return ht(async(e,t)=>await ft.deleteAlert(t))}function m$(){return ht(async(e,t)=>await ft.deleteTag(t))}function v$(){return ht(async(e,t)=>await ft.getArtifact(t))}function Hd(){return ht(async(e,t)=>await ft.deleteArtifact(t))}function y$(){return ht(async(e,t)=>await ft.enrichArtifact(t))}function b$(){return ht(async()=>await ft.getConfigs())}function w$(){return ht(async(e,t)=>await ft.getIPInfo(t))}function Ud(){return ht(async(e,t)=>await ft.getRules(t))}function zd(){return ht(async(e,t)=>await ft.getRule(t))}function $$(){return ht(async(e,t)=>await ft.deleteRule(t))}function _$(){return ht(async(e,t)=>await ft.searchRule(t))}function S$(){return ht(async(e,t)=>await ft.createRule(t))}function C$(){return ht(async(e,t)=>await ft.updateRule(t))}function El(){return ht(async(e,t)=>await ft.getArtifacts(t))}function A$(){return ht(async(e,t)=>await ft.getAlert(t))}const k$=be({name:"AlertActionButtons",props:{alert:{type:Object,required:!0}},emits:["delete","set-error"],setup(e,t){const n=ke(()=>`/api/alerts/${e.alert.id}`),r=g$();return{href:n,deleteAlert:async()=>{if(window.confirm(`Are you sure you want to delete ${e.alert.id}?`))try{await r.perform(e.alert.id),t.emit("delete")}catch(h){Ue.isAxiosError(h)&&t.emit("set-error",h)}}}}}),E$={class:"buttons is-pulled-right"},R$=["href"],x$=N("span",null,"JSON",-1),T$={class:"icon is-small"},L$=N("span",null,"Delete",-1),M$={class:"icon is-small"};function O$(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("span",E$,[N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[x$,N("span",T$,[ae(h,{icon:"barcode"})])],8,R$),N("button",{class:"button is-light is-small",onClick:t[0]||(t[0]=(...g)=>e.deleteAlert&&e.deleteAlert(...g))},[L$,N("span",M$,[ae(h,{icon:"times"})])])])}const Vd=Se(k$,[["render",O$]]);var Ei=I$;function I$(e,t,n){return t==null||t>=e.length?e:(n==null&&(n="..."),e.slice(0,Math.max(0,t-n.length))+n)}const F$=be({name:"ArtifactTag",props:{artifact:{type:Object,required:!0}},setup(e){const t=Fe(!1),n=Fe(!1),r=Hd();return{deleteArtifact:async()=>{window.confirm(`Are you sure you want to delete ${e.artifact.data}?`)&&(await r.perform(e.artifact.id),t.value=!0)},hideDeleteButton:()=>{n.value=!1},isDeleteButtonEnabled:n,isDeleted:t,showDeleteButton:()=>{n.value=!0},truncate:Ei}}}),N$={key:0,class:"control"};function D$(e,t,n,r,f,u){const h=oe("router-link");return e.isDeleted?de("",!0):(Z(),ie("div",N$,[N("div",{class:"tags has-addons are-medium",onMouseover:t[1]||(t[1]=(...g)=>e.showDeleteButton&&e.showDeleteButton(...g)),onMouseleave:t[2]||(t[2]=(...g)=>e.hideDeleteButton&&e.hideDeleteButton(...g))},[ae(h,{class:"tag is-link is-light",to:{name:"Artifact",params:{id:e.artifact.id}}},{default:Je(()=>[Qe(ye(e.truncate(e.artifact.data,32)),1)]),_:1},8,["to"]),e.isDeleteButtonEnabled?(Z(),ie("span",{key:0,class:"tag is-delete",onClick:t[0]||(t[0]=(...g)=>e.deleteArtifact&&e.deleteArtifact(...g))})):de("",!0)],32)]))}const P$=Se(F$,[["render",D$]]),B$=be({name:"ArtifactTags",components:{ArtifactTag:P$},props:{artifacts:{type:Array,required:!0}}}),W$={class:"field is-grouped is-grouped-multiline"};function H$(e,t,n,r,f,u){const h=oe("ArtifactTag");return Z(),ie("div",W$,[(Z(!0),ie(Re,null,$t(e.artifacts,g=>(Z(),_e(h,{key:g.id,artifact:g},null,8,["artifact"]))),128))])}const jd=Se(B$,[["render",H$]]);var Ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gd(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var f=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,f.get?f:{enumerable:!0,get:function(){return e[r]}})}),n}var Kd={exports:{}};const U$=Gd(H0);(function(e,t){(function(n,r){e.exports=r(U$)})(Ln,function(n){return function(){var r={789:function(g){g.exports=n}},f={};function u(g){var s=f[g];if(s!==void 0)return s.exports;var p=f[g]={exports:{}};return r[g](p,p.exports,u),p.exports}u.d=function(g,s){for(var p in s)u.o(s,p)&&!u.o(g,p)&&Object.defineProperty(g,p,{enumerable:!0,get:s[p]})},u.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},u.r=function(g){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})};var h={};return function(){function g($,k){(k==null||k>$.length)&&(k=$.length);for(var _=0,w=new Array(k);_<k;_++)w[_]=$[_];return w}function s($,k){if($){if(typeof $=="string")return g($,k);var _=Object.prototype.toString.call($).slice(8,-1);return _==="Object"&&$.constructor&&(_=$.constructor.name),_==="Map"||_==="Set"?Array.from($):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?g($,k):void 0}}function p($){return function(k){if(Array.isArray(k))return g(k)}($)||function(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)}($)||s($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
780
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function o($,k,_){return k in $?Object.defineProperty($,k,{value:_,enumerable:!0,configurable:!0,writable:!0}):$[k]=_,$}u.r(h),u.d(h,{default:function(){return M}});var i=u(789),a=(0,i.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var $=this.data,k=this.onClick;return(0,i.createVNode)("span",{class:"vjs-tree-brackets",onClick:k},[$])}}),c=(0,i.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function($,k){var _=k.emit;return{uiType:(0,i.computed)(function(){return $.isMultiple?"checkbox":"radio"}),model:(0,i.computed)({get:function(){return $.checked},set:function(w){return _("update:modelValue",w)}})}},render:function(){var $=this.uiType,k=this.model,_=this.$emit;return(0,i.createVNode)("label",{class:["vjs-check-controller",k?"is-checked":""],onClick:function(w){return w.stopPropagation()}},[(0,i.createVNode)("span",{class:"vjs-check-controller-inner is-".concat($)},null),(0,i.createVNode)("input",{checked:k,class:"vjs-check-controller-original is-".concat($),type:$,onChange:function(){return _("change",k)}},null)])}}),l=(0,i.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var $=this.nodeType,k=this.onClick,_=$==="objectStart"||$==="arrayStart";return _||$==="objectCollapsed"||$==="arrayCollapsed"?(0,i.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(_?"open":"close"),onClick:k},[(0,i.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,i.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});function d($){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},d($)}function m($){return Object.prototype.toString.call($).slice(8,-1).toLowerCase()}function v($){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,w=arguments.length>3?arguments[3]:void 0,x=w||{},T=x.key,O=x.index,I=x.type,F=I===void 0?"content":I,P=x.showComma,W=P!==void 0&&P,j=x.length,H=j===void 0?1:j,z=m($);if(z==="array"){var K=y($.map(function(X,Y,V){return v(X,"".concat(k,"[").concat(Y,"]"),_+1,{index:Y,showComma:Y!==V.length-1,length:H,type:F})}));return[v("[",k,_,{showComma:!1,key:T,length:$.length,type:"arrayStart"})[0]].concat(K,v("]",k,_,{showComma:W,length:$.length,type:"arrayEnd"})[0])}if(z==="object"){var q=Object.keys($),U=y(q.map(function(X,Y,V){return v($[X],/^[a-zA-Z_]\w*$/.test(X)?"".concat(k,".").concat(X):"".concat(k,'["').concat(X,'"]'),_+1,{key:X,showComma:Y!==V.length-1,length:H,type:F})}));return[v("{",k,_,{showComma:!1,key:T,index:O,length:q.length,type:"objectStart"})[0]].concat(U,v("}",k,_,{showComma:W,length:q.length,type:"objectEnd"})[0])}return[{content:$,level:_,key:T,index:O,path:k,showComma:W,length:H,type:F}]}function y($){if(typeof Array.prototype.flat=="function")return $.flat();for(var k=p($),_=[];k.length;){var w=k.shift();Array.isArray(w)?k.unshift.apply(k,p(w)):_.push(w)}return _}function A($){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if($==null)return $;if($ instanceof Date)return new Date($);if($ instanceof RegExp)return new RegExp($);if(d($)!=="object")return $;if(k.get($))return k.get($);if(Array.isArray($)){var _=$.map(function(T){return A(T,k)});return k.set($,_),_}var w={};for(var x in $)w[x]=A($[x],k);return k.set($,w),w}function S($,k){var _=Object.keys($);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols($);k&&(w=w.filter(function(x){return Object.getOwnPropertyDescriptor($,x).enumerable})),_.push.apply(_,w)}return _}function C($){for(var k=1;k<arguments.length;k++){var _=arguments[k]!=null?arguments[k]:{};k%2?S(Object(_),!0).forEach(function(w){o($,w,_[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(_)):S(Object(_)).forEach(function(w){Object.defineProperty($,w,Object.getOwnPropertyDescriptor(_,w))})}return $}var b={showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}},R=(0,i.defineComponent)({name:"TreeNode",props:C(C({},b),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","bracketsClick","iconClick","selectedChange","valueChange"],setup:function($,k){var _=k.emit,w=(0,i.computed)(function(){return m($.node.content)}),x=(0,i.computed)(function(){return"vjs-value vjs-value-".concat(w.value)}),T=(0,i.computed)(function(){return $.showDoubleQuotes?'"'.concat($.node.key,'"'):$.node.key}),O=(0,i.computed)(function(){return $.selectableType==="multiple"}),I=(0,i.computed)(function(){return $.selectableType==="single"}),F=(0,i.computed)(function(){return $.nodeSelectable($.node)&&(O.value||I.value)}),P=(0,i.reactive)({editing:!1}),W=function(Y){var V,ee,D=(ee=(V=Y.target)===null||V===void 0?void 0:V.value)==="null"?null:ee==="undefined"?void 0:ee==="true"||ee!=="false"&&(ee[0]+ee[ee.length-1]==='""'||ee[0]+ee[ee.length-1]==="''"?ee.slice(1,-1):typeof Number(ee)=="number"&&!isNaN(Number(ee))||ee==="NaN"?Number(ee):ee);_("valueChange",D,$.node.path)},j=(0,i.computed)(function(){var Y,V=(Y=$.node)===null||Y===void 0?void 0:Y.content;return V===null?V="null":V===void 0&&(V="undefined"),w.value==="string"?'"'.concat(V,'"'):V+""}),H=function(){var Y=$.renderNodeValue;return Y?Y({node:$.node,defaultValue:j.value}):j.value},z=function(){_("bracketsClick",!$.collapsed,$.node.path)},K=function(){_("iconClick",!$.collapsed,$.node.path)},q=function(){_("selectedChange",$.node)},U=function(){_("nodeClick",$.node),F.value&&$.selectOnClickNode&&_("selectedChange",$.node)},X=function(Y){if($.editable&&!P.editing){P.editing=!0;var V=function ee(D){var B;D.target!==Y.target&&((B=D.target)===null||B===void 0?void 0:B.parentElement)!==Y.target&&(P.editing=!1,document.removeEventListener("click",ee))};document.removeEventListener("click",V),document.addEventListener("click",V)}};return function(){var Y,V=$.node;return(0,i.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":$.showSelectController,"has-carets":$.showIcon,"is-highlight":$.highlightSelectedNode&&$.checked},onClick:U,style:$.style},[$.showLineNumber&&(0,i.createVNode)("span",{class:"vjs-node-index"},[V.id+1]),$.showSelectController&&F.value&&V.type!=="objectEnd"&&V.type!=="arrayEnd"&&(0,i.createVNode)(c,{isMultiple:O.value,checked:$.checked,onChange:q},null),(0,i.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(V.level)).map(function(ee,D){return(0,i.createVNode)("div",{key:D,class:{"vjs-indent-unit":!0,"has-line":$.showLine}},null)}),$.showIcon&&(0,i.createVNode)(l,{nodeType:V.type,onClick:K},null)]),V.key&&(0,i.createVNode)("span",{class:"vjs-key"},[(Y=$.renderNodeKey,Y?Y({node:$.node,defaultKey:T.value||""}):T.value),(0,i.createVNode)("span",{class:"vjs-colon"},[":".concat($.showKeyValueSpace?" ":"")])]),(0,i.createVNode)("span",null,[V.type!=="content"&&V.content?(0,i.createVNode)(a,{data:V.content.toString(),onClick:z},null):(0,i.createVNode)("span",{class:x.value,onClick:!$.editable||$.editableTrigger&&$.editableTrigger!=="click"?void 0:X,onDblclick:$.editable&&$.editableTrigger==="dblclick"?X:void 0},[$.editable&&P.editing?(0,i.createVNode)("input",{value:j.value,onChange:W,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):H()]),V.showComma&&(0,i.createVNode)("span",null,[","]),$.showLength&&$.collapsed&&(0,i.createVNode)("span",{class:"vjs-comment"},[(0,i.createTextVNode)(" // "),V.length,(0,i.createTextVNode)(" items ")])])])}}});function L($,k){var _=Object.keys($);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols($);k&&(w=w.filter(function(x){return Object.getOwnPropertyDescriptor($,x).enumerable})),_.push.apply(_,w)}return _}function E($){for(var k=1;k<arguments.length;k++){var _=arguments[k]!=null?arguments[k]:{};k%2?L(Object(_),!0).forEach(function(w){o($,w,_[w])}):Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(_)):L(Object(_)).forEach(function(w){Object.defineProperty($,w,Object.getOwnPropertyDescriptor(_,w))})}return $}var M=(0,i.defineComponent)({name:"Tree",props:E(E({},b),{},{data:{type:[String,Number,Boolean,Array,Object],default:null},collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},rootPath:{type:String,default:"root"},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function}}),slots:["renderNodeKey","renderNodeValue"],emits:["nodeClick","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function($,k){var _=k.emit,w=k.slots,x=(0,i.ref)(),T=(0,i.computed)(function(){return v($.data,$.rootPath)}),O=function(V,ee){return T.value.reduce(function(D,B){var G,J=B.level>=V||B.length>=ee,te=(G=$.pathCollapsible)===null||G===void 0?void 0:G.call($,B);return B.type!=="objectStart"&&B.type!=="arrayStart"||!J&&!te?D:E(E({},D),{},o({},B.path,1))},{})},I=(0,i.reactive)({translateY:0,visibleData:null,hiddenPaths:O($.deep,$.collapsedNodeLength)}),F=(0,i.computed)(function(){for(var V=null,ee=[],D=T.value.length,B=0;B<D;B++){var G=E(E({},T.value[B]),{},{id:B}),J=I.hiddenPaths[G.path];if(V&&V.path===G.path){var te=V.type==="objectStart",re=E(E(E({},G),V),{},{showComma:G.showComma,content:te?"{...}":"[...]",type:te?"objectCollapsed":"arrayCollapsed"});V=null,ee.push(re)}else{if(J&&!V){V=G;continue}if(V)continue;ee.push(G)}}return ee}),P=(0,i.computed)(function(){var V=$.selectedValue;return V&&$.selectableType==="multiple"&&Array.isArray(V)?V:[V]}),W=(0,i.computed)(function(){return!$.selectableType||$.selectOnClickNode||$.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."}),j=function(){var V=F.value;if($.virtual){var ee,D=$.height/$.itemHeight,B=((ee=x.value)===null||ee===void 0?void 0:ee.scrollTop)||0,G=Math.floor(B/$.itemHeight),J=G<0?0:G+D>V.length?V.length-D:G;J<0&&(J=0);var te=J+D;I.translateY=J*$.itemHeight,I.visibleData=V.filter(function(re,ue){return ue>=J&&ue<te})}else I.visibleData=V},H=function(){j()},z=function(V){var ee,D,B=V.path,G=$.selectableType;if(G==="multiple"){var J=P.value.findIndex(function(le){return le===B}),te=p(P.value);J!==-1?te.splice(J,1):te.push(B),_("update:selectedValue",te),_("selectedChange",te,p(P.value))}else if(G==="single"&&P.value[0]!==B){var re=(ee=P.value,D=1,function(le){if(Array.isArray(le))return le}(ee)||function(le,he){var se=le==null?null:typeof Symbol<"u"&&le[Symbol.iterator]||le["@@iterator"];if(se!=null){var pe,$e,ve=[],Ae=!0,Q=!1;try{for(se=se.call(le);!(Ae=(pe=se.next()).done)&&(ve.push(pe.value),!he||ve.length!==he);Ae=!0);}catch(ce){Q=!0,$e=ce}finally{try{Ae||se.return==null||se.return()}finally{if(Q)throw $e}}return ve}}(ee,D)||s(ee,D)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
781
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())[0],ue=B;_("update:selectedValue",ue),_("selectedChange",ue,re)}},K=function(V){_("nodeClick",V)},q=function(V,ee){if(V)I.hiddenPaths=E(E({},I.hiddenPaths),{},o({},ee,1));else{var D=E({},I.hiddenPaths);delete D[ee],I.hiddenPaths=D}},U=function(V,ee){$.collapsedOnClickBrackets&&q(V,ee),_("bracketsClick",V)},X=function(V,ee){q(V,ee),_("iconClick",V)},Y=function(V,ee){var D=A($.data),B=$.rootPath;new Function("data","val","data".concat(ee.slice(B.length),"=val"))(D,V),_("update:data",D)};return(0,i.watchEffect)(function(){W.value&&function(V){throw new Error("[VueJSONPretty] ".concat(V))}(W.value)}),(0,i.watchEffect)(function(){F.value&&j()}),(0,i.watch)(function(){return $.deep},function(V){V&&(I.hiddenPaths=O(V,$.collapsedNodeLength))}),(0,i.watch)(function(){return $.collapsedNodeLength},function(V){V&&(I.hiddenPaths=O($.deep,V))}),function(){var V,ee,D=(V=$.renderNodeKey)!==null&&V!==void 0?V:w.renderNodeKey,B=(ee=$.renderNodeValue)!==null&&ee!==void 0?ee:w.renderNodeValue,G=I.visibleData&&I.visibleData.map(function(J){return(0,i.createVNode)(R,{key:J.id,node:J,collapsed:!!I.hiddenPaths[J.path],showDoubleQuotes:$.showDoubleQuotes,showLength:$.showLength,checked:P.value.includes(J.path),selectableType:$.selectableType,showLine:$.showLine,showLineNumber:$.showLineNumber,showSelectController:$.showSelectController,selectOnClickNode:$.selectOnClickNode,nodeSelectable:$.nodeSelectable,highlightSelectedNode:$.highlightSelectedNode,editable:$.editable,editableTrigger:$.editableTrigger,showIcon:$.showIcon,showKeyValueSpace:$.showKeyValueSpace,renderNodeKey:D,renderNodeValue:B,onNodeClick:K,onBracketsClick:U,onIconClick:X,onSelectedChange:z,onValueChange:Y,style:$.itemHeight&&$.itemHeight!==20?{lineHeight:"".concat($.itemHeight,"px")}:{}},null)});return(0,i.createVNode)("div",{ref:x,class:{"vjs-tree":!0,"is-virtual":$.virtual},onScroll:$.virtual?H:void 0,style:$.showLineNumber?E({paddingLeft:"".concat(12*Number(T.value.length.toString().length),"px")},$.style):$.style},[$.virtual?(0,i.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat($.height,"px")}},[(0,i.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(F.value.length*$.itemHeight,"px")}},[(0,i.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(I.translateY,"px)")}},[G])])]):G])}}})}(),h}()})})(Kd);var z$=Kd.exports;const Yd=nr(z$),V$=be({name:"ErrorItem",props:{error:{type:p$,required:!0},disposable:{type:Boolean,default:!1}},components:{VueJsonPretty:Yd},emits:["dispose"],setup(e,t){const n=ke(()=>{var f;if(e.error.response)return(f=e.error.response)==null?void 0:f.data});return{dispose:()=>{t.emit("dispose")},data:n}}}),j$={class:"notification is-danger is-light"},G$={key:1},K$={key:2},Y$={key:0,class:"message"},X$={class:"message-body"};function Z$(e,t,n,r,f,u){var g;const h=oe("VueJsonPretty");return Z(),ie(Re,null,[N("div",j$,[e.disposable?(Z(),ie("button",{key:0,class:"delete",onClick:t[0]||(t[0]=(...s)=>e.dispose&&e.dispose(...s))})):de("",!0),e.data?(Z(),ie("p",G$,ye(e.data.message),1)):(Z(),ie("p",K$,ye(e.error),1))]),(g=e.data)!=null&&g.detail?(Z(),ie("article",Y$,[N("div",X$,[ae(h,{data:e.data.detail},null,8,["data"])])])):de("",!0)],64)}const lt=Se(V$,[["render",Z$]]),q$=be({name:"TagItem",props:{tag:{type:Object,required:!0},deletable:{type:Boolean,default:!1}},setup(e){const t=Fe(!1),n=Fe(!1),r=m$();return{isDeleted:t,deleteTag:async()=>{window.confirm(`Are you sure you want to delete ${e.tag.name} (ID: ${e.tag.id})?`)&&(await r.perform(e.tag.id),t.value=!0)},showDeleteButton:()=>{n.value=!0},hideDeleteButton:()=>{n.value=!1},isDeleteButtonEnabled:n}}}),J$={key:0,class:"control"},Q$={class:"tag is-info is-light"};function e_(e,t,n,r,f,u){return e.isDeleted?de("",!0):(Z(),ie("div",J$,[N("div",{class:"tags has-addons are-medium",onMouseover:t[1]||(t[1]=(...h)=>e.showDeleteButton&&e.showDeleteButton(...h)),onMouseleave:t[2]||(t[2]=(...h)=>e.hideDeleteButton&&e.hideDeleteButton(...h))},[N("span",Q$,ye(e.tag.name),1),e.isDeleteButtonEnabled&&e.deletable?(Z(),ie("a",{key:0,class:"tag is-delete",onClick:t[0]||(t[0]=(...h)=>e.deleteTag&&e.deleteTag(...h))})):de("",!0)],32)]))}const t_=Se(q$,[["render",e_]]),n_=be({name:"TagsItem",components:{TagComponent:t_},props:{tags:{type:Array,required:!0},deletable:{type:Boolean,default:!1}},setup(){}}),r_={class:"field is-grouped is-grouped-multiline"};function i_(e,t,n,r,f,u){const h=oe("TagComponent");return Z(),ie("div",r_,[(Z(!0),ie(Re,null,$t(e.tags,g=>(Z(),_e(h,{tag:g,key:g.name,deletable:e.deletable},null,8,["tag","deletable"]))),128))])}const Rl=Se(n_,[["render",i_]]);var Xd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){var n=1e3,r=6e4,f=36e5,u="millisecond",h="second",g="minute",s="hour",p="day",o="week",i="month",a="quarter",c="year",l="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(w){var x=["th","st","nd","rd"],T=w%100;return"["+w+(x[(T-20)%10]||x[T]||x[0])+"]"}},A=function(w,x,T){var O=String(w);return!O||O.length>=x?w:""+Array(x+1-O.length).join(T)+w},S={s:A,z:function(w){var x=-w.utcOffset(),T=Math.abs(x),O=Math.floor(T/60),I=T%60;return(x<=0?"+":"-")+A(O,2,"0")+":"+A(I,2,"0")},m:function w(x,T){if(x.date()<T.date())return-w(T,x);var O=12*(T.year()-x.year())+(T.month()-x.month()),I=x.clone().add(O,i),F=T-I<0,P=x.clone().add(O+(F?-1:1),i);return+(-(O+(T-I)/(F?I-P:P-I))||0)},a:function(w){return w<0?Math.ceil(w)||0:Math.floor(w)},p:function(w){return{M:i,y:c,w:o,d:p,D:l,h:s,m:g,s:h,ms:u,Q:a}[w]||String(w||"").toLowerCase().replace(/s$/,"")},u:function(w){return w===void 0}},C="en",b={};b[C]=y;var R="$isDayjsObject",L=function(w){return w instanceof k||!(!w||!w[R])},E=function w(x,T,O){var I;if(!x)return C;if(typeof x=="string"){var F=x.toLowerCase();b[F]&&(I=F),T&&(b[F]=T,I=F);var P=x.split("-");if(!I&&P.length>1)return w(P[0])}else{var W=x.name;b[W]=x,I=W}return!O&&I&&(C=I),I||!O&&C},M=function(w,x){if(L(w))return w.clone();var T=typeof x=="object"?x:{};return T.date=w,T.args=arguments,new k(T)},$=S;$.l=E,$.i=L,$.w=function(w,x){return M(w,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var k=function(){function w(T){this.$L=E(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[R]=!0}var x=w.prototype;return x.parse=function(T){this.$d=function(O){var I=O.date,F=O.utc;if(I===null)return new Date(NaN);if($.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var P=I.match(m);if(P){var W=P[2]-1||0,j=(P[7]||"0").substring(0,3);return F?new Date(Date.UTC(P[1],W,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)):new Date(P[1],W,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)}}return new Date(I)}(T),this.init()},x.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},x.$utils=function(){return $},x.isValid=function(){return this.$d.toString()!==d},x.isSame=function(T,O){var I=M(T);return this.startOf(O)<=I&&I<=this.endOf(O)},x.isAfter=function(T,O){return M(T)<this.startOf(O)},x.isBefore=function(T,O){return this.endOf(O)<M(T)},x.$g=function(T,O,I){return $.u(T)?this[O]:this.set(I,T)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(T,O){var I=this,F=!!$.u(O)||O,P=$.p(T),W=function(Y,V){var ee=$.w(I.$u?Date.UTC(I.$y,V,Y):new Date(I.$y,V,Y),I);return F?ee:ee.endOf(p)},j=function(Y,V){return $.w(I.toDate()[Y].apply(I.toDate("s"),(F?[0,0,0,0]:[23,59,59,999]).slice(V)),I)},H=this.$W,z=this.$M,K=this.$D,q="set"+(this.$u?"UTC":"");switch(P){case c:return F?W(1,0):W(31,11);case i:return F?W(1,z):W(0,z+1);case o:var U=this.$locale().weekStart||0,X=(H<U?H+7:H)-U;return W(F?K-X:K+(6-X),z);case p:case l:return j(q+"Hours",0);case s:return j(q+"Minutes",1);case g:return j(q+"Seconds",2);case h:return j(q+"Milliseconds",3);default:return this.clone()}},x.endOf=function(T){return this.startOf(T,!1)},x.$set=function(T,O){var I,F=$.p(T),P="set"+(this.$u?"UTC":""),W=(I={},I[p]=P+"Date",I[l]=P+"Date",I[i]=P+"Month",I[c]=P+"FullYear",I[s]=P+"Hours",I[g]=P+"Minutes",I[h]=P+"Seconds",I[u]=P+"Milliseconds",I)[F],j=F===p?this.$D+(O-this.$W):O;if(F===i||F===c){var H=this.clone().set(l,1);H.$d[W](j),H.init(),this.$d=H.set(l,Math.min(this.$D,H.daysInMonth())).$d}else W&&this.$d[W](j);return this.init(),this},x.set=function(T,O){return this.clone().$set(T,O)},x.get=function(T){return this[$.p(T)]()},x.add=function(T,O){var I,F=this;T=Number(T);var P=$.p(O),W=function(z){var K=M(F);return $.w(K.date(K.date()+Math.round(z*T)),F)};if(P===i)return this.set(i,this.$M+T);if(P===c)return this.set(c,this.$y+T);if(P===p)return W(1);if(P===o)return W(7);var j=(I={},I[g]=r,I[s]=f,I[h]=n,I)[P]||1,H=this.$d.getTime()+T*j;return $.w(H,this)},x.subtract=function(T,O){return this.add(-1*T,O)},x.format=function(T){var O=this,I=this.$locale();if(!this.isValid())return I.invalidDate||d;var F=T||"YYYY-MM-DDTHH:mm:ssZ",P=$.z(this),W=this.$H,j=this.$m,H=this.$M,z=I.weekdays,K=I.months,q=I.meridiem,U=function(V,ee,D,B){return V&&(V[ee]||V(O,F))||D[ee].slice(0,B)},X=function(V){return $.s(W%12||12,V,"0")},Y=q||function(V,ee,D){var B=V<12?"AM":"PM";return D?B.toLowerCase():B};return F.replace(v,function(V,ee){return ee||function(D){switch(D){case"YY":return String(O.$y).slice(-2);case"YYYY":return $.s(O.$y,4,"0");case"M":return H+1;case"MM":return $.s(H+1,2,"0");case"MMM":return U(I.monthsShort,H,K,3);case"MMMM":return U(K,H);case"D":return O.$D;case"DD":return $.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return U(I.weekdaysMin,O.$W,z,2);case"ddd":return U(I.weekdaysShort,O.$W,z,3);case"dddd":return z[O.$W];case"H":return String(W);case"HH":return $.s(W,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Y(W,j,!0);case"A":return Y(W,j,!1);case"m":return String(j);case"mm":return $.s(j,2,"0");case"s":return String(O.$s);case"ss":return $.s(O.$s,2,"0");case"SSS":return $.s(O.$ms,3,"0");case"Z":return P}return null}(V)||P.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(T,O,I){var F,P=this,W=$.p(O),j=M(T),H=(j.utcOffset()-this.utcOffset())*r,z=this-j,K=function(){return $.m(P,j)};switch(W){case c:F=K()/12;break;case i:F=K();break;case a:F=K()/3;break;case o:F=(z-H)/6048e5;break;case p:F=(z-H)/864e5;break;case s:F=z/f;break;case g:F=z/r;break;case h:F=z/n;break;default:F=z}return I?F:$.a(F)},x.daysInMonth=function(){return this.endOf(i).$D},x.$locale=function(){return b[this.$L]},x.locale=function(T,O){if(!T)return this.$L;var I=this.clone(),F=E(T,O,!0);return F&&(I.$L=F),I},x.clone=function(){return $.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},w}(),_=k.prototype;return M.prototype=_,[["$ms",u],["$s",h],["$m",g],["$H",s],["$W",p],["$M",i],["$y",c],["$D",l]].forEach(function(w){_[w[1]]=function(x){return this.$g(x,w[0],w[1])}}),M.extend=function(w,x){return w.$i||(w(x,k,M),w.$i=!0),M},M.locale=E,M.isDayjs=L,M.unix=function(w){return M(1e3*w)},M.en=b[C],M.Ls=b,M.p={},M})})(Xd);var o_=Xd.exports;const Mr=nr(o_);var Zd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){return function(n,r,f){n=n||{};var u=r.prototype,h={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function g(p,o,i,a){return u.fromToBase(p,o,i,a)}f.en.relativeTime=h,u.fromToBase=function(p,o,i,a,c){for(var l,d,m,v=i.$locale().relativeTime||h,y=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],A=y.length,S=0;S<A;S+=1){var C=y[S];C.d&&(l=a?f(p).diff(i,C.d,!0):i.diff(p,C.d,!0));var b=(n.rounding||Math.round)(Math.abs(l));if(m=l>0,b<=C.r||!C.r){b<=1&&S>0&&(C=y[S-1]);var R=v[C.l];c&&(b=c(""+b)),d=typeof R=="string"?R.replace("%d",b):R(b,o,C.l,m);break}}if(o)return d;var L=m?v.future:v.past;return typeof L=="function"?L(d):L.replace("%s",d)},u.to=function(p,o){return g(p,o,this,!0)},u.from=function(p,o){return g(p,o,this)};var s=function(p){return p.$u?f.utc():f()};u.toNow=function(p){return this.to(s(this),p)},u.fromNow=function(p){return this.from(s(this),p)}}})})(Zd);var s_=Zd.exports;const a_=nr(s_);var qd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(f,u,h){var g,s=function(a,c,l){l===void 0&&(l={});var d=new Date(a),m=function(v,y){y===void 0&&(y={});var A=y.timeZoneName||"short",S=v+"|"+A,C=r[S];return C||(C=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:v,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),r[S]=C),C}(c,l);return m.formatToParts(d)},p=function(a,c){for(var l=s(a,c),d=[],m=0;m<l.length;m+=1){var v=l[m],y=v.type,A=v.value,S=n[y];S>=0&&(d[S]=parseInt(A,10))}var C=d[3],b=C===24?0:C,R=d[0]+"-"+d[1]+"-"+d[2]+" "+b+":"+d[4]+":"+d[5]+":000",L=+a;return(h.utc(R).valueOf()-(L-=L%1e3))/6e4},o=u.prototype;o.tz=function(a,c){a===void 0&&(a=g);var l=this.utcOffset(),d=this.toDate(),m=d.toLocaleString("en-US",{timeZone:a}),v=Math.round((d-new Date(m))/1e3/60),y=h(m,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(d.getTimezoneOffset()/15)-v,!0);if(c){var A=y.utcOffset();y=y.add(l-A,"minute")}return y.$x.$timezone=a,y},o.offsetName=function(a){var c=this.$x.$timezone||h.tz.guess(),l=s(this.valueOf(),c,{timeZoneName:a}).find(function(d){return d.type.toLowerCase()==="timezonename"});return l&&l.value};var i=o.startOf;o.startOf=function(a,c){if(!this.$x||!this.$x.$timezone)return i.call(this,a,c);var l=h(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return i.call(l,a,c).tz(this.$x.$timezone,!0)},h.tz=function(a,c,l){var d=l&&c,m=l||c||g,v=p(+h(),m);if(typeof a!="string")return h(a).tz(m);var y=function(b,R,L){var E=b-60*R*1e3,M=p(E,L);if(R===M)return[E,R];var $=p(E-=60*(M-R)*1e3,L);return M===$?[E,M]:[b-60*Math.min(M,$)*1e3,Math.max(M,$)]}(h.utc(a,d).valueOf(),v,m),A=y[0],S=y[1],C=h(A).utcOffset(S);return C.$x.$timezone=m,C},h.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},h.tz.setDefault=function(a){g=a}}})})(qd);var l_=qd.exports;const c_=nr(l_);var Jd={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ln,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,f=/([+-]|\d\d)/g;return function(u,h,g){var s=h.prototype;g.utc=function(d){var m={date:d,utc:!0,args:arguments};return new h(m)},s.utc=function(d){var m=g(this.toDate(),{locale:this.$L,utc:!0});return d?m.add(this.utcOffset(),n):m},s.local=function(){return g(this.toDate(),{locale:this.$L,utc:!1})};var p=s.parse;s.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),p.call(this,d)};var o=s.init;s.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else o.call(this)};var i=s.utcOffset;s.utcOffset=function(d,m){var v=this.$utils().u;if(v(d))return this.$u?0:v(this.$offset)?i.call(this):this.$offset;if(typeof d=="string"&&(d=function(C){C===void 0&&(C="");var b=C.match(r);if(!b)return null;var R=(""+b[0]).match(f)||["-",0,0],L=R[0],E=60*+R[1]+ +R[2];return E===0?0:L==="+"?E:-E}(d),d===null))return this;var y=Math.abs(d)<=16?60*d:d,A=this;if(m)return A.$offset=y,A.$u=d===0,A;if(d!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(A=this.local().add(y+S,n)).$offset=y,A.$x.$localOffset=S}else A=this.utc();return A};var a=s.format;s.format=function(d){var m=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return a.call(this,m)},s.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var c=s.toDate;s.toDate=function(d){return d==="s"&&this.$offset?g(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var l=s.diff;s.diff=function(d,m,v){if(d&&this.$u===d.$u)return l.call(this,d,m,v);var y=this.local(),A=g(d).local();return l.call(y,A,m,v)}}})})(Jd);var u_=Jd.exports;const h_=nr(u_),f_=[{name:"Afghanistan",lat:33.93911,long:67.709953,code:"AF"},{name:"Albania",lat:41.153332,long:20.168331,code:"AL"},{name:"Algeria",lat:28.033886,long:1.659626,code:"DZ"},{name:"American Samoa",lat:-14.270972,long:-170.132217,code:"AS"},{name:"Andorra",lat:42.546245,long:1.601554,code:"AD"},{name:"Angola",lat:-11.202692,long:17.873887,code:"AO"},{name:"Anguilla",lat:18.220554,long:-63.068615,code:"AI"},{name:"Antarctica",lat:-75.250973,long:-.071389,code:"AQ"},{name:"Antigua and Barbuda",lat:17.060816,long:-61.796428,code:"AG"},{name:"Argentina",lat:-38.416097,long:-63.616672,code:"AR"},{name:"Armenia",lat:40.069099,long:45.038189,code:"AM"},{name:"Aruba",lat:12.52111,long:-69.968338,code:"AW"},{name:"Australia",lat:-25.274398,long:133.775136,code:"AU"},{name:"Austria",lat:47.516231,long:14.550072,code:"AT"},{name:"Azerbaijan",lat:40.143105,long:47.576927,code:"AZ"},{name:"Bahamas",lat:25.03428,long:-77.39628,code:"BS"},{name:"Bahrain",lat:25.930414,long:50.637772,code:"BH"},{name:"Bangladesh",lat:23.684994,long:90.356331,code:"BD"},{name:"Barbados",lat:13.193887,long:-59.543198,code:"BB"},{name:"Belarus",lat:53.709807,long:27.953389,code:"BY"},{name:"Belgium",lat:50.503887,long:4.469936,code:"BE"},{name:"Belize",lat:17.189877,long:-88.49765,code:"BZ"},{name:"Benin",lat:9.30769,long:2.315834,code:"BJ"},{name:"Bermuda",lat:32.321384,long:-64.75737,code:"BM"},{name:"Bhutan",lat:27.514162,long:90.433601,code:"BT"},{name:"Bolivia",lat:-16.290154,long:-63.588653,code:"BO"},{name:"Bosnia",lat:43.915886,long:17.679076,code:"BA"},{name:"Botswana",lat:-22.328474,long:24.684866,code:"BW"},{name:"Bouvet Island",lat:-54.423199,long:3.413194,code:"BV"},{name:"Brazil",lat:-14.235004,long:-51.92528,code:"BR"},{name:"British Indian Ocean Territory",lat:-6.343194,long:71.876519,code:"IO"},{name:"Brunei",lat:4.535277,long:114.727669,code:"BN"},{name:"Bulgaria",lat:42.733883,long:25.48583,code:"BG"},{name:"Burkina Faso",lat:12.238333,long:-1.561593,code:"BF"},{name:"Burundi",lat:-3.373056,long:29.918886,code:"BI"},{name:"Cabo Verde",lat:16.002082,long:-24.013197,code:"CV"},{name:"Cambodia",lat:12.565679,long:104.990963,code:"KH"},{name:"Cameroon",lat:7.369722,long:12.354722,code:"CM"},{name:"Canada",lat:56.130366,long:-106.346771,code:"CA"},{name:"Cayman Islands",lat:19.513469,long:-80.566956,code:"KY"},{name:"Central African Republic",lat:6.611111,long:20.939444,code:"CF"},{name:"Caribbean Netherlands",lat:12.2,long:-68.26,code:"BQ"},{name:"Chad",lat:15.454166,long:18.732207,code:"TD"},{name:"Chile",lat:-35.675147,long:-71.542969,code:"CL"},{name:"China",lat:35.86166,long:104.195397,code:"CN"},{name:"Christmas Island",lat:-10.447525,long:105.690449,code:"CX"},{name:"Cocos (Keeling) Islands",lat:-12.164165,long:96.870956,code:"CC"},{name:"Colombia",lat:4.570868,long:-74.297333,code:"CO"},{name:"Comoros",lat:-11.875001,long:43.872219,code:"KM"},{name:"Congo",lat:-.228021,long:15.827659,code:"CG"},{name:"DRC",lat:-4.038333,long:21.758664,code:"CD"},{name:"Cook Islands",lat:-21.236736,long:-159.777671,code:"CK"},{name:"Costa Rica",lat:9.748917,long:-83.753428,code:"CR"},{name:'Côte d"Ivoire',lat:7.539989,long:-5.54708,code:"CI"},{name:"Croatia",lat:45.1,long:15.2,code:"HR"},{name:"Cuba",lat:21.521757,long:-77.781167,code:"CU"},{name:"Curaçao",lat:12.15,long:-68.97,code:"CW"},{name:"Cyprus",lat:35.126413,long:33.429859,code:"CY"},{name:"Czechia",lat:49.817492,long:15.472962,code:"CZ"},{name:"Denmark",lat:56.26392,long:9.501785,code:"DK"},{name:"Djibouti",lat:11.825138,long:42.590275,code:"DJ"},{name:"Dominica",lat:15.414999,long:-61.370976,code:"DM"},{name:"Dominican Republic",lat:18.735693,long:-70.162651,code:"DO"},{name:"Ecuador",lat:-1.831239,long:-78.183406,code:"EC"},{name:"Egypt",lat:26.820553,long:30.802498,code:"EG"},{name:"El Salvador",lat:13.794185,long:-88.89653,code:"SV"},{name:"Equatorial Guinea",lat:1.650801,long:10.267895,code:"GQ"},{name:"Eritrea",lat:15.179384,long:39.782334,code:"ER"},{name:"Estonia",lat:58.595272,long:25.013607,code:"EE"},{name:"Ethiopia",lat:9.145,long:40.489673,code:"ET"},{name:"Falkland Islands (Malvinas)",lat:-51.796253,long:-59.523613,code:"FK"},{name:"Faroe Islands",lat:61.892635,long:-6.911806,code:"FO"},{name:"Fiji",lat:-16.578193,long:179.414413,code:"FJ"},{name:"Finland",lat:61.92411,long:25.748151,code:"FI"},{name:"France",lat:46.227638,long:2.213749,code:"FR"},{name:"French Guiana",lat:3.933889,long:-53.125782,code:"GF"},{name:"French Polynesia",lat:-17.679742,long:-149.406843,code:"PF"},{name:"French Southern Territories",lat:-49.280366,long:69.348557,code:"TF"},{name:"Gabon",lat:-.803689,long:11.609444,code:"GA"},{name:"Gambia",lat:13.443182,long:-15.310139,code:"GM"},{name:"Georgia",lat:42.315407,long:43.356892,code:"GE"},{name:"Germany",lat:51.165691,long:10.451526,code:"DE"},{name:"Ghana",lat:7.946527,long:-1.023194,code:"GH"},{name:"Gibraltar",lat:36.137741,long:-5.345374,code:"GI"},{name:"Greece",lat:39.074208,long:21.824312,code:"GR"},{name:"Greenland",lat:71.706936,long:-42.604303,code:"GL"},{name:"Grenada",lat:12.262776,long:-61.604171,code:"GD"},{name:"Guadeloupe",lat:16.995971,long:-62.067641,code:"GP"},{name:"Guam",lat:13.444304,long:144.793731,code:"GU"},{name:"Guatemala",lat:15.783471,long:-90.230759,code:"GT"},{name:"Guernsey",lat:49.465691,long:-2.585278,code:"GG"},{name:"Guinea",lat:9.945587,long:-9.696645,code:"GN"},{name:"Guinea-Bissau",lat:11.803749,long:-15.180413,code:"GW"},{name:"Guyana",lat:4.860416,long:-58.93018,code:"GY"},{name:"Haiti",lat:18.971187,long:-72.285215,code:"HT"},{name:"Heard Island and McDonald Islands",lat:-53.08181,long:73.504158,code:"HM"},{name:"Holy See (Vatican City State)",lat:41.902916,long:12.453389,code:"VA"},{name:"Honduras",lat:15.199999,long:-86.241905,code:"HN"},{name:"Hong Kong",lat:22.396428,long:114.109497,code:"HK"},{name:"Hungary",lat:47.162494,long:19.503304,code:"HU"},{name:"Iceland",lat:64.963051,long:-19.020835,code:"IS"},{name:"India",lat:20.593684,long:78.96288,code:"IN"},{name:"Indonesia",lat:-.789275,long:113.921327,code:"ID"},{name:"Iran",lat:32.427908,long:53.688046,code:"IR"},{name:"Iraq",lat:33.223191,long:43.679291,code:"IQ"},{name:"Ireland",lat:53.41291,long:-8.24389,code:"IE"},{name:"Isle of Man",lat:54.236107,long:-4.548056,code:"IM"},{name:"Israel",lat:31.046051,long:34.851612,code:"IL"},{name:"Italy",lat:41.87194,long:12.56738,code:"IT"},{name:"Jamaica",lat:18.109581,long:-77.297508,code:"JM"},{name:"Japan",lat:36.204824,long:138.252924,code:"JP"},{name:"Channel Islands",lat:49.214439,long:-2.13125,code:"JE"},{name:"Jordan",lat:30.585164,long:36.238414,code:"JO"},{name:"Kazakhstan",lat:48.019573,long:66.923684,code:"KZ"},{name:"Kenya",lat:-.023559,long:37.906193,code:"KE"},{name:"Kiribati",lat:-3.370417,long:-168.734039,code:"KI"},{name:"Kosovo",lat:42.602636,long:20.902977,code:"XK"},{name:"N. Korea",lat:40.339852,long:127.510093,code:"KP"},{name:"S. Korea",lat:35.907757,long:127.766922,code:"KR"},{name:"Kuwait",lat:29.31166,long:47.481766,code:"KW"},{name:"Kyrgyzstan",lat:41.20438,long:74.766098,code:"KG"},{name:'Lao People"s Democratic Republic',lat:19.85627,long:102.495496,code:"LA"},{name:"Latvia",lat:56.879635,long:24.603189,code:"LV"},{name:"Lebanon",lat:33.854721,long:35.862285,code:"LB"},{name:"Lesotho",lat:-29.609988,long:28.233608,code:"LS"},{name:"Liberia",lat:6.428055,long:-9.429499,code:"LR"},{name:"Libyan Arab Jamahiriya",lat:26.3351,long:17.228331,code:"LY"},{name:"Liechtenstein",lat:47.166,long:9.555373,code:"LI"},{name:"Lithuania",lat:55.169438,long:23.881275,code:"LT"},{name:"Luxembourg",lat:49.815273,long:6.129583,code:"LU"},{name:"Macao",lat:22.198745,long:113.543873,code:"MO"},{name:"Macedonia",lat:41.608635,long:21.745275,code:"MK"},{name:"Madagascar",lat:-18.766947,long:46.869107,code:"MG"},{name:"Malawi",lat:-13.254308,long:34.301525,code:"MW"},{name:"Malaysia",lat:4.210484,long:101.975766,code:"MY"},{name:"Maldives",lat:3.202778,long:73.22068,code:"MV"},{name:"Mali",lat:17.570692,long:-3.996166,code:"ML"},{name:"Malta",lat:35.937496,long:14.375416,code:"MT"},{name:"Marshall Islands",lat:7.131474,long:171.184478,code:"MH"},{name:"Martinique",lat:14.641528,long:-61.024174,code:"MQ"},{name:"Mauritania",lat:21.00789,long:-10.940835,code:"MR"},{name:"Mauritius",lat:-20.348404,long:57.552152,code:"MU"},{name:"Mayotte",lat:-12.8275,long:45.166244,code:"YT"},{name:"Mexico",lat:23.634501,long:-102.552784,code:"MX"},{name:"Micronesia",lat:7.425554,long:150.550812,code:"FM"},{name:"Moldova",lat:47.411631,long:28.369885,code:"MD"},{name:"Monaco",lat:43.750298,long:7.412841,code:"MC"},{name:"Mongolia",lat:46.862496,long:103.846656,code:"MN"},{name:"Montenegro",lat:42.708678,long:19.37439,code:"ME"},{name:"Montserrat",lat:16.742498,long:-62.187366,code:"MS"},{name:"Morocco",lat:31.791702,long:-7.09262,code:"MA"},{name:"Mozambique",lat:-18.665695,long:35.529562,code:"MZ"},{name:"Myanmar",lat:21.913965,long:95.956223,code:"MM"},{name:"Burma",lat:22,long:98,code:"BU"},{name:"Namibia",lat:-22.95764,long:18.49041,code:"NA"},{name:"Nauru",lat:-.522778,long:166.931503,code:"NR"},{name:"Nepal",lat:28.394857,long:84.124008,code:"NP"},{name:"Netherlands",lat:52.132633,long:5.291266,code:"NL"},{name:"Netherlands Antilles",lat:12.226079,long:-69.060087,code:"AN"},{name:"New Caledonia",lat:-20.904305,long:165.618042,code:"NC"},{name:"New Zealand",lat:-40.900557,long:174.885971,code:"NZ"},{name:"Nicaragua",lat:12.865416,long:-85.207229,code:"NI"},{name:"Niger",lat:17.607789,long:8.081666,code:"NE"},{name:"Nigeria",lat:9.081999,long:8.675277,code:"NG"},{name:"Niue",lat:-19.054445,long:-169.867233,code:"NU"},{name:"Norfolk Island",lat:-29.040835,long:167.954712,code:"NF"},{name:"Northern Mariana Islands",lat:17.33083,long:145.38469,code:"MP"},{name:"Norway",lat:60.472024,long:8.468946,code:"NO"},{name:"Oman",lat:21.512583,long:55.923255,code:"OM"},{name:"Pakistan",lat:30.375321,long:69.345116,code:"PK"},{name:"Palau",lat:7.51498,long:134.58252,code:"PW"},{name:"Palestine",lat:31.952162,long:35.233154,code:"PS"},{name:"Panama",lat:8.537981,long:-80.782127,code:"PA"},{name:"Papua New Guinea",lat:-6.314993,long:143.95555,code:"PG"},{name:"Paraguay",lat:-23.442503,long:-58.443832,code:"PY"},{name:"Peru",lat:-9.189967,long:-75.015152,code:"PE"},{name:"Philippines",lat:12.879721,long:121.774017,code:"PH"},{name:"Pitcairn",lat:-24.703615,long:-127.439308,code:"PN"},{name:"Poland",lat:51.919438,long:19.145136,code:"PL"},{name:"Portugal",lat:39.399872,long:-8.224454,code:"PT"},{name:"Puerto Rico",lat:18.220833,long:-66.590149,code:"PR"},{name:"Qatar",lat:25.354826,long:51.183884,code:"QA"},{name:"Réunion",lat:-21.115141,long:55.536384,code:"RE"},{name:"Romania",lat:45.943161,long:24.96676,code:"RO"},{name:"Russia",lat:61.52401,long:105.318756,code:"RU"},{name:"Rwanda",lat:-1.940278,long:29.873888,code:"RW"},{name:"St. Barth",lat:17.89,long:-62.82,code:"BL"},{name:"Saint Helena",lat:-24.143474,long:-10.030696,code:"SH"},{name:"Saint Kitts and Nevis",lat:17.357822,long:-62.782998,code:"KN"},{name:"Saint Lucia",lat:13.909444,long:-60.978893,code:"LC"},{name:"Saint Pierre Miquelon",lat:46.941936,long:-56.27111,code:"PM"},{name:"Saint Martin",lat:18.11,long:-63.03,code:"MF"},{name:"Sint Maarten",lat:18.02,long:-63.06,code:"SX"},{name:"Saint Vincent and the Grenadines",lat:12.984305,long:-61.287228,code:"VC"},{name:"Samoa",lat:-13.759029,long:-172.104629,code:"WS"},{name:"San Marino",lat:43.94236,long:12.457777,code:"SM"},{name:"Sao Tome and Principe",lat:.18636,long:6.613081,code:"ST"},{name:"Saudi Arabia",lat:23.885942,long:45.079162,code:"SA"},{name:"Senegal",lat:14.497401,long:-14.452362,code:"SN"},{name:"Serbia",lat:44.016521,long:21.005859,code:"RS"},{name:"Seychelles",lat:-4.679574,long:55.491977,code:"SC"},{name:"Sierra Leone",lat:8.460555,long:-11.779889,code:"SL"},{name:"Singapore",lat:1.352083,long:103.819836,code:"SG"},{name:"Slovakia",lat:48.669026,long:19.699024,code:"SK"},{name:"Slovenia",lat:46.151241,long:14.995463,code:"SI"},{name:"Solomon Islands",lat:-9.64571,long:160.156194,code:"SB"},{name:"Somalia",lat:5.152149,long:46.199616,code:"SO"},{name:"South Africa",lat:-30.559482,long:22.937506,code:"ZA"},{name:"South Georgia and the South Sandwich Islands",lat:-54.429579,long:-36.587909,code:"GS"},{name:"South Sudan",lat:6.8769,long:31.3069,code:"SS"},{name:"Spain",lat:40.463667,long:-3.74922,code:"ES"},{name:"Sri Lanka",lat:7.873054,long:80.771797,code:"LK"},{name:"Sudan",lat:12.862807,long:30.217636,code:"SD"},{name:"Suriname",lat:3.919305,long:-56.027783,code:"SR"},{name:"Svalbard and Jan Mayen",lat:77.553604,long:23.670272,code:"SJ"},{name:"Swaziland",lat:-26.522503,long:31.465866,code:"SZ"},{name:"Sweden",lat:60.128161,long:18.643501,code:"SE"},{name:"Switzerland",lat:46.818188,long:8.227512,code:"CH"},{name:"Syrian Arab Republic",lat:34.802075,long:38.996815,code:"SY"},{name:"Taiwan",lat:23.69781,long:120.960515,code:"TW"},{name:"Tajikistan",lat:38.861034,long:71.276093,code:"TJ"},{name:"Tanzania",lat:-6.369028,long:34.888822,code:"TZ"},{name:"Thailand",lat:15.870032,long:100.992541,code:"TH"},{name:"Timor-Leste",lat:-8.874217,long:125.727539,code:"TL"},{name:"Togo",lat:8.619543,long:.824782,code:"TG"},{name:"Tokelau",lat:-8.967363,long:-171.855881,code:"TK"},{name:"Tonga",lat:-21.178986,long:-175.198242,code:"TO"},{name:"Trinidad and Tobago",lat:10.691803,long:-61.222503,code:"TT"},{name:"Tunisia",lat:33.886917,long:9.537499,code:"TN"},{name:"Turkey",lat:38.963745,long:35.243322,code:"TR"},{name:"Turkmenistan",lat:38.969719,long:59.556278,code:"TM"},{name:"Turks and Caicos Islands",lat:21.694025,long:-71.797928,code:"TC"},{name:"Tuvalu",lat:-7.109535,long:177.64933,code:"TV"},{name:"Uganda",lat:1.373333,long:32.290275,code:"UG"},{name:"Ukraine",lat:48.379433,long:31.16558,code:"UA"},{name:"UAE",lat:23.424076,long:53.847818,code:"AE"},{name:"UK",lat:55.378051,long:-3.435973,code:"GB"},{name:"USA",lat:37.09024,long:-95.712891,code:"US"},{name:"United States Minor Outlying Islands",lat:0,long:0,code:"UM"},{name:"Uruguay",lat:-32.522779,long:-55.765835,code:"UY"},{name:"Uzbekistan",lat:41.377491,long:64.585262,code:"UZ"},{name:"Vanuatu",lat:-15.376706,long:166.959158,code:"VU"},{name:"Venezuela",lat:6.42375,long:-66.58973,code:"VE"},{name:"Vietnam",lat:14.058324,long:108.277199,code:"VN"},{name:"British Virgin Islands",lat:18.420695,long:-64.639968,code:"VG"},{name:"U.S. Virgin Islands",lat:18.335765,long:-64.896335,code:"VI"},{name:"Wallis and Futuna",lat:-13.768752,long:-177.156097,code:"WF"},{name:"Western Sahara",lat:24.215527,long:-12.885834,code:"EH"},{name:"Yemen",lat:15.552727,long:48.516388,code:"YE"},{name:"Zambia",lat:-13.133897,long:27.849332,code:"ZM"},{name:"Zimbabwe",lat:-19.015438,long:29.154857,code:"ZW"}];function d_(e){return f_.find(n=>n.code===e)}Mr.extend(a_);Mr.extend(c_);Mr.extend(h_);function Qd(e){return Mr(e).local().format("YYYY-MM-DD HH:mm:ss")}function ep(e){return Mr(e).local().fromNow()}function tp(e){const t=d_(e);if(t)return{lat:t.lat,long:t.long}}function p_(e){if(e.loc){const t=e.loc.split(",");if(t.length===2){const n=t[0],r=t[1];return{lat:parseFloat(n),long:parseFloat(r)}}}return tp(e.countryCode)}const g_=be({name:"AlertItem",components:{Artifacts:jd,Tags:Rl,ActionButtons:Vd,ErrorMessage:lt},props:{alert:{type:Object,required:!0}},emits:["delete"],setup(e,t){const n=Fe();return{onDelete:()=>{t.emit("delete")},getLocalDatetime:Qd,getHumanizedRelativeTime:ep,onSetError:h=>{n.value=h},onDisposeError:()=>{n.value=void 0},error:n}}}),m_={class:"box"},v_={class:"table is-fullwidth is-completely-borderless"},y_=N("th",null,"Rule",-1),b_=N("th",null,"Artifacts",-1),w_={key:0},$_=N("th",null,"Tags",-1),__={class:"help"};function S_(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("ActionButtons"),s=oe("router-link"),p=oe("Artifacts"),o=oe("Tags");return Z(),ie("div",m_,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),N("p",null,[ae(g,{alert:e.alert,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["alert","onDelete","onSetError"])]),ae(s,{class:"is-size-4",to:{name:"Alert",params:{id:e.alert.id}}},{default:Je(()=>[Qe(ye(e.alert.id),1)]),_:1},8,["to"]),N("table",v_,[N("tr",null,[y_,N("td",null,[ae(s,{to:{name:"Rule",params:{id:e.alert.ruleId}}},{default:Je(()=>[Qe(ye(e.alert.ruleId),1)]),_:1},8,["to"])])]),N("tr",null,[b_,N("td",null,[ae(p,{artifacts:e.alert.artifacts},null,8,["artifacts"])])]),e.alert.tags.length>0?(Z(),ie("tr",w_,[$_,N("td",null,[ae(o,{tags:e.alert.tags},null,8,["tags"])])])):de("",!0)]),N("p",__,"Created at: "+ye(e.alert.createdAt),1)])}const C_=Se(g_,[["render",S_]]),A_=be({name:"PaginationItem",props:{currentPage:{type:Number,required:!0},pageSize:{type:Number,required:!0},total:{type:Number,required:!0}},emits:["update-page"],setup(e,t){const n=o=>o===e.currentPage+1||o===e.currentPage-1,r=ke(()=>Math.ceil(e.total/e.pageSize)),f=ke(()=>r.value===1),u=ke(()=>e.currentPage>1),h=ke(()=>e.currentPage-1===1),g=ke(()=>e.currentPage<r.value),s=ke(()=>e.currentPage+1===r.value);return{updatePage:o=>{t.emit("update-page",o)},isNextPage:n,hasNextPage:g,hasOnlyOnePage:f,hasPreviousPage:u,isNextPageLast:s,isPreviousPageFirst:h,totalPageCount:r}}}),k_={key:0,class:"message is-warning"},E_=N("div",{class:"message-body"},"There is no result to show.",-1),R_=[E_],x_={key:1,class:"pagination",role:"navigation","aria-label":"pagination"},T_={key:0,class:"pagination-list"},L_={key:1,class:"pagination-list"},M_={key:0},O_={key:1},I_=N("span",{class:"pagination-ellipsis"},"…",-1),F_=[I_],N_={key:2},D_={key:3},P_={key:4},B_=N("span",{class:"pagination-ellipsis"},"…",-1),W_=[B_],H_={key:5};function U_(e,t,n,r,f,u){return e.total===0?(Z(),ie("article",k_,R_)):(Z(),ie("nav",x_,[e.hasOnlyOnePage?(Z(),ie("ul",T_,[N("li",null,[N("a",{class:"pagination-link mt-2 is-current",onClick:t[0]||(t[0]=h=>e.updatePage(1))},"1")])])):(Z(),ie("ul",L_,[e.hasPreviousPage&&!e.isPreviousPageFirst?(Z(),ie("li",M_,[N("a",{class:"pagination-link mt-2",onClick:t[1]||(t[1]=h=>e.updatePage(1))}," 1")])):de("",!0),e.hasPreviousPage&&!e.isPreviousPageFirst&&!e.isNextPage(2)?(Z(),ie("li",O_,F_)):de("",!0),e.hasPreviousPage?(Z(),ie("li",N_,[N("a",{class:"pagination-link mt-2",onClick:t[2]||(t[2]=h=>e.updatePage(e.currentPage-1))},ye(e.currentPage-1),1)])):de("",!0),N("li",null,[N("a",{class:"pagination-link mt-2 is-current",onClick:t[3]||(t[3]=h=>e.updatePage(e.currentPage))},ye(e.currentPage),1)]),e.hasNextPage?(Z(),ie("li",D_,[N("a",{class:"pagination-link mt-2",onClick:t[4]||(t[4]=h=>e.updatePage(e.currentPage+1))},ye(e.currentPage+1),1)])):de("",!0),e.hasNextPage&&!e.isNextPageLast&&!e.isNextPage(e.totalPageCount-1)?(Z(),ie("li",P_,W_)):de("",!0),e.hasNextPage&&!e.isNextPageLast?(Z(),ie("li",H_,[N("a",{class:"pagination-link mt-2",onClick:t[5]||(t[5]=h=>e.updatePage(e.totalPageCount))},ye(e.totalPageCount),1)])):de("",!0)]))]))}const xl=Se(A_,[["render",U_]]),z_=be({name:"AlertsItem",components:{Alert:C_,Pagination:xl},props:{page:{type:String,required:!0},alerts:{type:Object,required:!0}},emits:["update-page","refresh"],setup(e,t){const n=u=>{t.emit("update-page",u)},r=()=>{t.emit("refresh")},f=ke(()=>e.alerts.results.length>0);return{onUpdatePage:n,onDelete:r,hasAlerts:f}}}),V_={key:0},j_={class:"help"},G_={key:1},K_=N("div",{class:"notification is-warning is-light"},"There is no alert to show",-1),Y_=[K_];function X_(e,t,n,r,f,u){const h=oe("Alert"),g=oe("Pagination");return e.hasAlerts?(Z(),ie("div",V_,[(Z(!0),ie(Re,null,$t(e.alerts.results,s=>(Z(),_e(h,{alert:s,key:s.id,onDelete:e.onDelete},null,8,["alert","onDelete"]))),128)),ae(g,{total:e.alerts.total,currentPage:e.alerts.currentPage,pageSize:e.alerts.pageSize,onUpdatePage:e.onUpdatePage},null,8,["total","currentPage","pageSize","onUpdatePage"]),N("p",j_,"("+ye(e.alerts.total)+" results in total, "+ye(e.alerts.results.length)+" shown)",1)])):(Z(),ie("div",G_,Y_))}const np=Se(z_,[["render",X_]]),Z_=be({name:"LoadingItem"}),q_={class:"has-text-centered"},J_={class:"fa-3x"};function Q_(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("div",q_,[N("div",J_,[ae(h,{icon:"spinner",spin:""})])])}const ln=Se(Z_,[["render",Q_]]),eS=be({name:"AlertsWithPagination",props:{ruleId:{type:String,required:!0},excludeAlertId:{type:Number,required:!1}},components:{Alerts:np,Loading:ln,ErrorMessage:lt},setup(e){const t=Fe(1),n=ke(()=>e.excludeAlertId?`rule.id:"${e.ruleId}" AND NOT id:${e.excludeAlertId}`:`rule.id:"${e.ruleId}"`),r=ki(),f=async()=>{const h={q:n.value,page:t.value};return await r.perform(h)},u=h=>{t.value=h};return Ye(async()=>{await f()}),qe([e,t],async()=>{await f()}),{page:t,getAlertsTask:r,onUpdatePage:u}}});function tS(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Alerts");return Z(),ie(Re,null,[e.getAlertsTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getAlertsTask.isError?(Z(),_e(g,{key:1,error:(p=e.getAlertsTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getAlertsTask.last)!=null&&o.value?(Z(),_e(s,{key:2,page:e.page.toString(),alerts:e.getAlertsTask.last.value,onUpdatePage:e.onUpdatePage},null,8,["page","alerts","onUpdatePage"])):de("",!0)],64)}const rp=Se(eS,[["render",tS]]),nS=be({name:"AlertDetail",components:{Artifacts:jd,Tags:Rl,Alerts:rp,ActionButtons:Vd,ErrorMessage:lt},props:{alert:{type:Object,required:!0}},emits:["delete"],setup(e,t){const n=Fe();return{onDelete:()=>{t.emit("delete")},getLocalDatetime:Qd,getHumanizedRelativeTime:ep,onSetError:h=>{n.value=h},onDisposeError:()=>{n.value=void 0},error:n}}}),rS={class:"block"},iS={class:"is-size-2"},oS={class:"is-clearfix"},sS={class:"table is-fullwidth is-completely-borderless"},aS=N("th",null,"Rule",-1),lS=N("th",null,"Artifacts",-1),cS={key:0},uS=N("th",null,"Tags",-1),hS={class:"help"},fS=N("hr",null,null,-1),dS={class:"block"},pS=N("h2",{class:"is-size-2 block"},"Related Alerts",-1);function gS(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("ActionButtons"),s=oe("router-link"),p=oe("Artifacts"),o=oe("Tags"),i=oe("Alerts");return Z(),ie(Re,null,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),N("div",rS,[N("h2",iS,ye(e.alert.id),1),N("p",oS,[ae(g,{alert:e.alert,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["alert","onDelete","onSetError"])]),N("table",sS,[N("tr",null,[aS,N("td",null,[ae(s,{to:{name:"Rule",params:{id:e.alert.ruleId}}},{default:Je(()=>[Qe(ye(e.alert.ruleId),1)]),_:1},8,["to"])])]),N("tr",null,[lS,N("td",null,[ae(p,{artifacts:e.alert.artifacts},null,8,["artifacts"])])]),e.alert.tags.length>0?(Z(),ie("tr",cS,[uS,N("td",null,[ae(o,{tags:e.alert.tags},null,8,["tags"])])])):de("",!0)]),N("p",hS,"Created at: "+ye(e.alert.createdAt),1)]),fS,N("div",dS,[pS,ae(i,{"rule-id":e.alert.ruleId,"exclude-alert-id":e.alert.id},null,8,["rule-id","exclude-alert-id"])])],64)}const mS=Se(nS,[["render",gS]]),vS=be({name:"AlertDetailWrapper",components:{AlertComponent:mS,Loading:ln,ErrorMessage:lt},props:{id:{type:Number,required:!0}},setup(e){const t=Tr(),n=A$(),r=()=>{t.push("/")};return Ye(async()=>{await n.perform(e.id)}),{getAlertTask:n,onDelete:r}}});function yS(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("AlertComponent");return Z(),ie(Re,null,[e.getAlertTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getAlertTask.isError?(Z(),_e(g,{key:1,error:(p=e.getAlertTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getAlertTask.last)!=null&&o.value?(Z(),_e(s,{key:2,alert:e.getAlertTask.last.value,onDelete:e.onDelete},null,8,["alert","onDelete"])):de("",!0)],64)}const bS=Se(vS,[["render",yS]]),wS=be({name:"AlertView",components:{Alert:bS},props:{id:{type:String,required:!0}},setup(e){const t=()=>{an(`Alert:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function $S(e,t,n,r,f,u){const h=oe("Alert",!0);return Z(),_e(h,{id:parseInt(e.id)},null,8,["id"])}const _S=Se(wS,[["render",$S]]),Is=new WeakMap;function $r(e,t,n={}){const{mode:r="replace",route:f=b1(),router:u=Tr(),transform:h=i=>i}=n;Is.has(u)||Is.set(u,new Map);const g=Is.get(u);let s=f.query[e];ad(()=>{s=void 0});let p;const o=No((i,a)=>(p=a,{get(){return i(),h(s!==void 0?s:wo(t))},set(c){s!==c&&(s=c,g.set(e,c),a(),bi(()=>{if(g.size===0)return;const l=Object.fromEntries(g.entries());g.clear();const{params:d,query:m,hash:v}=f;u[wo(r)]({params:d,query:{...m,...l},hash:v})}))}}));return qe(()=>f.query[e],i=>{s=i,p()},{flush:"sync"}),o}const SS=be({name:"AlertsWrapper",components:{Alerts:np,Loading:ln,ErrorMessage:lt},setup(){const e=$r("page","1"),t=$r("q",""),n=Fe(!1),r=ki(),f=async()=>{const p={q:t.value,page:parseInt(e.value)};return await r.perform(p)},u=p=>{e.value=p.toString()},h=async()=>{e.value="1",await f()},g=h,s=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getAlertsTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:s,onUpdatePage:u,onRefresh:g}}}),CS={class:"block"},AS={class:"field has-addons"},kS={class:"control is-expanded"},ES={class:"control"},RS={class:"icon is-small"},xS=N("span",null,"Search",-1),TS={class:"control"},LS={class:"icon is-small"},MS=N("span",null,"Help",-1),OS={key:0,class:"content"},IS=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li> Searchable fields are <code>id</code>, <code>tag</code>, <code>created_at</code>, <code>rule.id</code>, <code>rule.title</code>, <code>rule.description</code>, <code>artifact.data</code>, <code>artifact.data_type</code>, <code>artifact.source</code> and <code>artifact.query</code>. </li></ul><h4 class="is-size-4">Examples</h4>',3),FS={key:0,class:"block"};function NS(e,t,n,r,f,u){var i,a;const h=oe("font-awesome-icon"),g=oe("router-link"),s=oe("Loading"),p=oe("ErrorMessage"),o=oe("Alerts");return Z(),ie(Re,null,[N("div",CS,[N("div",AS,[N("p",kS,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=c=>e.q=c)},null,512),[[Zn,e.q]])]),N("p",ES,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...c)=>e.search&&e.search(...c))},[N("span",RS,[ae(h,{icon:"search"})]),xS])]),N("p",TS,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...c)=>e.toggleShowHelp&&e.toggleShowHelp(...c))},[N("span",LS,[ae(h,{icon:"question"})]),MS])])]),e.showHelp?(Z(),ie("div",OS,[IS,N("ul",null,[N("li",null,[ae(g,{to:{name:"Alerts",query:{q:"rule.id:foo AND artifact.data:example.com"}}},{default:Je(()=>[Qe("rule.id:foo AND artifact.data:example.com")]),_:1},8,["to"])]),N("li",null,[ae(g,{to:{name:"Alerts",query:{q:"tag:foo AND created_at >= 2020-01-01"}}},{default:Je(()=>[Qe("tag:foo AND created_at >= 2020-01-01")]),_:1})])])])):de("",!0)]),e.getAlertsTask.performCount>0?(Z(),ie("div",FS,[e.getAlertsTask.isRunning?(Z(),_e(s,{key:0})):de("",!0),e.getAlertsTask.isError?(Z(),_e(p,{key:1,error:(i=e.getAlertsTask.last)==null?void 0:i.error},null,8,["error"])):de("",!0),(a=e.getAlertsTask.last)!=null&&a.value?(Z(),_e(o,{key:2,alerts:e.getAlertsTask.last.value,page:e.page,onUpdatePage:e.onUpdatePage,onRefresh:e.onRefresh},null,8,["alerts","page","onUpdatePage","onRefresh"])):de("",!0)])):de("",!0)],64)}const DS=Se(SS,[["render",NS]]),PS=be({name:"OverviewCards",setup(){const e=ki(),t=Ud(),n=El();return Ye(()=>{e.perform({q:"",page:1,limit:0}),t.perform({q:"",page:1,limit:0}),n.perform({q:"",page:1,limit:0})}),{getAlertsTask:e,getArtifactsTask:n,getRulesTask:t}}}),BS={class:"columns"},WS={class:"column is-one-third"},HS={class:"card tile is-child"},US={class:"card-content"},zS={class:"level is-mobile"},VS={class:"level-item"},jS={class:"is-widget-label"},GS=N("h3",{class:"subtitle is-spaced"},"Rules",-1),KS={class:"title"},YS={class:"level-item has-widget-icon"},XS={class:"is-widget-icon"},ZS={class:"icon has-text-info is-large"},qS={class:"column is-one-third"},JS={class:"card tile is-child"},QS={class:"card-content"},eC={class:"level is-mobile"},tC={class:"level-item"},nC={class:"is-widget-label"},rC=N("h3",{class:"subtitle is-spaced"},"Alerts",-1),iC={class:"title"},oC={class:"level-item has-widget-icon"},sC={class:"is-widget-icon"},aC={class:"icon has-text-info is-large"},lC={class:"column is-one-third"},cC={class:"card tile is-child"},uC={class:"card-content"},hC={class:"level is-mobile"},fC={class:"level-item"},dC={class:"is-widget-label"},pC=N("h3",{class:"subtitle is-spaced"},"Artifacts",-1),gC={class:"title"},mC={class:"level-item has-widget-icon"},vC={class:"is-widget-icon"},yC={class:"icon has-text-info is-large"};function bC(e,t,n,r,f,u){var g,s,p,o,i,a;const h=oe("font-awesome-icon");return Z(),ie("div",BS,[N("div",WS,[N("div",HS,[N("div",US,[N("div",zS,[N("div",VS,[N("div",jS,[GS,N("h1",KS,ye(((s=(g=e.getRulesTask.last)==null?void 0:g.value)==null?void 0:s.total)??"N/A"),1)])]),N("div",YS,[N("div",XS,[N("span",ZS,[ae(h,{icon:"file",size:"2x"})])])])])])])]),N("div",qS,[N("div",JS,[N("div",QS,[N("div",eC,[N("div",tC,[N("div",nC,[rC,N("h1",iC,ye(((o=(p=e.getAlertsTask.last)==null?void 0:p.value)==null?void 0:o.total)??"N/A"),1)])]),N("div",oC,[N("div",sC,[N("span",aC,[ae(h,{icon:"bell",size:"2x"})])])])])])])]),N("div",lC,[N("div",cC,[N("div",uC,[N("div",hC,[N("div",fC,[N("div",dC,[pC,N("h1",gC,ye(((a=(i=e.getArtifactsTask.last)==null?void 0:i.value)==null?void 0:a.total)??"N/A"),1)])]),N("div",mC,[N("div",vC,[N("span",yC,[ae(h,{icon:"ticket",size:"2x"})])])])])])])])])}const wC=Se(PS,[["render",bC]]),$C=be({name:"AlertsView",components:{Alerts:DS,OverviewCards:wC},setup(){an("Alerts - Mihari")}}),_C=N("hr",null,null,-1);function SC(e,t,n,r,f,u){const h=oe("OverviewCards"),g=oe("Alerts",!0);return Z(),ie(Re,null,[ae(h),_C,ae(g)],64)}const CC=Se($C,[["render",SC]]),AC=be({name:"ArtifactActionButtons",props:{artifact:{type:Object,required:!0}},components:{VueJsonPretty:Yd},emits:["delete","set-error","set-message"],setup(e,t){const n=ke(()=>`/api/artifacts/${e.artifact.id}`),r=Fe(!1),f=Hd(),u=y$();return{deleteArtifact:async()=>{if(window.confirm(`Are you sure you want to delete ${e.artifact.data}?`))try{await f.perform(e.artifact.id),t.emit("delete")}catch(o){Ue.isAxiosError(o)&&t.emit("set-error",o)}},enrichArtifact:async()=>{try{const p=await u.perform(e.artifact.id);t.emit("set-message",p)}catch(p){Ue.isAxiosError(p)&&t.emit("set-error",p)}},enrichArtifactTask:u,toggleShowMetadata:()=>{r.value=!r.value},href:n,showMetadata:r,truncate:Ei}}}),Ri=e=>(Ho("data-v-13186183"),e=e(),Uo(),e),kC={class:"buttons is-pulled-right"},EC=["href"],RC=Ri(()=>N("span",null,"JSON",-1)),xC={class:"icon is-small"},TC=Ri(()=>N("span",null,"Metadata",-1)),LC={class:"icon is-small"},MC=Ri(()=>N("span",null,"Enrich",-1)),OC={class:"icon is-small"},IC=Ri(()=>N("span",null,"Delete",-1)),FC={class:"icon is-small"},NC={key:0},DC={class:"modal is-active"},PC={class:"modal-card"},BC={class:"modal-card-head"},WC=Ri(()=>N("p",{class:"modal-card-title"},"Metadata",-1)),HC={class:"modal-card-body"};function UC(e,t,n,r,f,u){const h=oe("font-awesome-icon"),g=oe("VueJsonPretty");return Z(),ie(Re,null,[N("span",kC,[N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[RC,N("span",xC,[ae(h,{icon:"barcode"})])],8,EC),e.artifact.metadata?(Z(),ie("button",{key:0,class:"button is-info is-light is-small",onClick:t[0]||(t[0]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))},[TC,N("span",LC,[ae(h,{icon:"info-circle"})])])):de("",!0),N("button",{class:"button is-primary is-light is-small",onClick:t[1]||(t[1]=(...s)=>e.enrichArtifact&&e.enrichArtifact(...s))},[MC,N("span",OC,[e.enrichArtifactTask.isRunning?(Z(),_e(h,{key:0,icon:"spinner",spin:""})):(Z(),_e(h,{key:1,icon:"lightbulb"}))])]),N("button",{class:"button is-light is-small",onClick:t[2]||(t[2]=(...s)=>e.deleteArtifact&&e.deleteArtifact(...s))},[IC,N("span",FC,[ae(h,{icon:"times"})])])]),e.artifact.metadata&&e.showMetadata?(Z(),ie("div",NC,[N("div",DC,[N("div",{class:"modal-background",onClick:t[3]||(t[3]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))}),N("div",PC,[N("header",BC,[WC,N("button",{class:"delete","aria-label":"close",onClick:t[4]||(t[4]=(...s)=>e.toggleShowMetadata&&e.toggleShowMetadata(...s))})]),N("section",HC,[ae(g,{data:e.artifact.metadata},null,8,["data"])])])])])):de("",!0)],64)}const ip=Se(AC,[["render",UC],["__scopeId","data-v-13186183"]]),zC=be({name:"AS",props:{autonomousSystem:{type:Object,required:!0}}}),VC={class:"tags are-medium"},jC={class:"tag"};function GC(e,t,n,r,f,u){return Z(),ie("div",VC,[N("span",jC,ye(e.autonomousSystem.asn),1)])}const KC=Se(zC,[["render",GC]]),YC=be({name:"CPEsItem",props:{cpes:{type:Array,required:!0}}}),XC={class:"tags are-medium"};function ZC(e,t,n,r,f,u){return Z(),ie("div",XC,[(Z(!0),ie(Re,null,$t(e.cpes,h=>(Z(),ie("span",{class:"tag",key:h.cpe},ye(h.cpe),1))),128))])}const qC=Se(YC,[["render",ZC]]),JC=be({name:"DnsRecords",props:{dnsRecords:{type:Array,required:!0}},setup(){return{truncate:Ei}}}),QC={class:"field is-grouped is-grouped-multiline"},eA={class:"tags has-addons are-medium"},tA={class:"tag is-dark"},nA={class:"tag"};function rA(e,t,n,r,f,u){return Z(),ie("div",QC,[(Z(!0),ie(Re,null,$t(e.dnsRecords,(h,g)=>(Z(),ie("div",{class:"control",key:g},[N("div",eA,[N("span",tA,ye(h.resource),1),N("span",nA,ye(e.truncate(h.value,50)),1)])]))),128))])}const iA=Se(JC,[["render",rA]]),oA=be({name:"PortsItem",props:{ports:{type:Array,required:!0}}}),sA={class:"tags are-medium"};function aA(e,t,n,r,f,u){return Z(),ie("div",sA,[(Z(!0),ie(Re,null,$t(e.ports,h=>(Z(),ie("span",{class:"tag",key:h.port},ye(h.port),1))),128))])}const lA=Se(oA,[["render",aA]]),cA=be({name:"ReverseDnsNames",props:{reverseDnsNames:{type:Array,required:!0}}}),uA={class:"tags are-medium"};function hA(e,t,n,r,f,u){return Z(),ie("div",uA,[(Z(!0),ie(Re,null,$t(e.reverseDnsNames,h=>(Z(),ie("span",{class:"tag",key:h.name},ye(h.name),1))),128))])}const fA=Se(cA,[["render",hA]]),dA=be({name:"TagsItem",props:{tags:{type:Array,required:!0}}}),pA={class:"tags are-medium"};function gA(e,t,n,r,f,u){const h=oe("router-link");return Z(),ie("div",pA,[(Z(!0),ie(Re,null,$t(e.tags,g=>(Z(),_e(h,{class:"tag is-info is-light",key:g.id,to:{name:"Alerts",query:{tag:g.name}}},{default:Je(()=>[Qe(ye(g.name),1)]),_:2},1032,["to"]))),128))])}const mA=Se(dA,[["render",gA]]),vA=be({name:"WhoisRecord",props:{whoisRecord:{type:Object,required:!0}}}),yA={class:"field is-grouped is-grouped-multiline"},bA={class:"control"},wA={class:"tags has-addons are-medium"},$A=N("span",{class:"tag is-dark"},"Registrar",-1),_A={class:"tag is-light"},SA={class:"control"},CA={class:"tags has-addons are-medium"},AA=N("span",{class:"tag is-dark"},"Created on",-1),kA={class:"tag is-light"},EA={class:"control"},RA={class:"tags has-addons are-medium"},xA=N("span",{class:"tag is-dark"},"Updated on",-1),TA={class:"tag is-light"},LA={class:"control"},MA={class:"tags has-addons are-medium"},OA=N("span",{class:"tag is-dark"},"Expires on",-1),IA={class:"tag is-light"};function FA(e,t,n,r,f,u){var h;return Z(),ie("div",yA,[N("div",bA,[N("div",wA,[$A,N("span",_A,ye(((h=e.whoisRecord.registrar)==null?void 0:h.name)||"N/A"),1)])]),N("div",SA,[N("div",CA,[AA,N("span",kA,ye(e.whoisRecord.createdOn||"N/A"),1)])]),N("div",EA,[N("div",RA,[xA,N("span",TA,ye(e.whoisRecord.updatedOn||"N/A"),1)])]),N("div",LA,[N("div",MA,[OA,N("span",IA,ye(e.whoisRecord.expiresOn||"N/A"),1)])])])}const NA=Se(vA,[["render",FA]]),DA=be({name:"LinkItem",props:{data:{type:String,required:!0},link:{type:Object,required:!0}}}),PA=["href"],BA=["src"];function WA(e,t,n,r,f,u){return Z(),ie("a",{href:e.link.href(e.data),class:"tag is-white",target:"_blank"},[N("img",{src:e.link.favicon(),alt:"favicon"},null,8,BA),N("span",null,ye(e.link.name),1)],8,PA)}const HA=Se(DA,[["render",WA],["__scopeId","data-v-66270500"]]);class Et{constructor(){Te(this,"baseURL");this.baseURL="https://example.com"}favicon(){return"https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url="+this.baseURL}}class UA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://app.any.run",this.name="ANY.RUN",this.type="hash"}href(n){return this.baseURL+`/submissions/#filehash:${n}`}}class zA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://search.censys.io",this.name="Censys",this.type="ip"}href(n){return this.baseURL+`/hosts/${n}`}}class VA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://crt.sh",this.name="crt.sh",this.type="domain"}href(n){return this.baseURL+`/?q=${n}`}}class jA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="ip"}href(n){return this.baseURL+`/ip/${n}`}}class GA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://dnslytics.com",this.name="DNSlytics",this.type="domain"}href(n){return this.baseURL+`/domain/${n}`}}class KA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://emailrep.io",this.name="EmailRep",this.type="mail"}href(n){return this.baseURL+`/${n}`}}class YA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://viz.greynoise.io",this.name="GreyNoise",this.type="ip"}href(n){return this.baseURL+`/ip/${n}`}}class XA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://analyze.intezer.com",this.name="Intezer",this.type="hash"}href(n){return this.baseURL+`/#/files/${n}`}}class op extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://otx.alienvault.com",this.name="OTX",this.type="ip"}href(n){return this.baseURL+`/indicator/ip/${n}`}}class ZA extends op{constructor(){super();Te(this,"type");this.type="domain"}href(n){return this.baseURL+`/indicator/domain/${n}`}}class sp extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://securitytrails.com",this.name="SecurityTrails",this.type="domain"}}class qA extends sp{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}/dns`}}class JA extends sp{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/list/ip/${t}`}}class QA extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://www.shodan.io",this.name="Shodan",this.type="ip"}href(n){return this.baseURL+`/host/${n}`}}class Tl extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.baseURL="https://urlscan.io",this.name="urlscan.io",this.type="domain"}}class e2 extends Tl{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/domain/${t}`}}class t2 extends Tl{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/ip/${t}`}}class n2 extends Tl{constructor(){super(),this.type="url"}href(t){const n=encodeURIComponent(`page.url:"${t}" OR task.url:"${t}"`);return this.baseURL+`/search/#${n}`}}var ap={exports:{}};const r2={},i2=Object.freeze(Object.defineProperty({__proto__:null,default:r2},Symbol.toStringTag,{value:"Module"})),Cu=Gd(i2);/**
|
782
782
|
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
783
783
|
*
|
784
784
|
* @version 0.10.1
|
785
785
|
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
786
786
|
* @copyright Chen, Yi-Cyuan 2014-2023
|
787
787
|
* @license MIT
|
788
|
-
*/(function(e){(function(){var t="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var f=!n&&typeof self=="object",u=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;u?r=Mn:f&&(r=self);var h=!r.JS_SHA256_NO_COMMON_JS&&!0&&e.exports,g=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",s="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],o=[24,16,8,0],i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=["hex","array","digest","arrayBuffer"],c=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),g&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});var l=function(b,x){return function(L){return new A(x,!0).update(L)[b]()}},d=function(b){var x=l("hex",b);u&&(x=m(x,b)),x.create=function(){return new A(b)},x.update=function(M){return x.create().update(M)};for(var L=0;L<a.length;++L){var E=a[L];x[E]=l(E,b)}return x},m=function(b,x){var L=Cu,E=Cu.Buffer,M=x?"sha224":"sha256",$;E.from&&!r.JS_SHA256_NO_BUFFER_FROM?$=E.from:$=function(_){return new E(_)};var k=function(_){if(typeof _=="string")return L.createHash(M).update(_,"utf8").digest("hex");if(_==null)throw new Error(t);return _.constructor===ArrayBuffer&&(_=new Uint8Array(_)),Array.isArray(_)||ArrayBuffer.isView(_)||_.constructor===E?L.createHash(M).update($(_)).digest("hex"):b(_)};return k},v=function(b,x){return function(L,E){return new S(L,x,!0).update(E)[b]()}},y=function(b){var x=v("hex",b);x.create=function(M){return new S(M,b)},x.update=function(M,$){return x.create(M).update($)};for(var L=0;L<a.length;++L){var E=a[L];x[E]=v(E,b)}return x};function A(b,x){x?(c[0]=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0,this.blocks=c):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=b}A.prototype.update=function(b){if(!this.finalized){var x,L=typeof b;if(L!=="string"){if(L==="object"){if(b===null)throw new Error(t);if(g&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!g||!ArrayBuffer.isView(b)))throw new Error(t)}else throw new Error(t);x=!0}for(var E,M=0,$,k=b.length,_=this.blocks;M<k;){if(this.hashed&&(this.hashed=!1,_[0]=this.block,_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0),x)for($=this.start;M<k&&$<64;++M)_[$>>2]|=b[M]<<o[$++&3];else for($=this.start;M<k&&$<64;++M)E=b.charCodeAt(M),E<128?_[$>>2]|=E<<o[$++&3]:E<2048?(_[$>>2]|=(192|E>>6)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]):E<55296||E>=57344?(_[$>>2]|=(224|E>>12)<<o[$++&3],_[$>>2]|=(128|E>>6&63)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]):(E=65536+((E&1023)<<10|b.charCodeAt(++M)&1023),_[$>>2]|=(240|E>>18)<<o[$++&3],_[$>>2]|=(128|E>>12&63)<<o[$++&3],_[$>>2]|=(128|E>>6&63)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]);this.lastByteIndex=$,this.bytes+=$-this.start,$>=64?(this.block=_[16],this.start=$-64,this.hash(),this.hashed=!0):this.start=$}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,x=this.lastByteIndex;b[16]=this.block,b[x>>2]|=p[x&3],this.block=b[16],x>=56&&(this.hashed||this.hash(),b[0]=this.block,b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0),b[14]=this.hBytes<<3|this.bytes>>>29,b[15]=this.bytes<<3,this.hash()}},A.prototype.hash=function(){var b=this.h0,x=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=this.blocks,R,T,O,I,F,P,W,j,H,z,K;for(R=16;R<64;++R)F=w[R-15],T=(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3,F=w[R-2],O=(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10,w[R]=w[R-16]+T+w[R-7]+O<<0;for(K=x&L,R=0;R<64;R+=4)this.first?(this.is224?(j=300032,F=w[0]-1413257819,_=F-150054599<<0,E=F+24177077<<0):(j=704751109,F=w[0]-210244248,_=F-1521486534<<0,E=F+143694565<<0),this.first=!1):(T=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10),O=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7),j=b&x,I=j^b&L^K,W=M&$^~M&k,F=_+O+W+i[R]+w[R],P=T+I,_=E+F<<0,E=F+P<<0),T=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),O=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),H=E&b,I=H^E&x^j,W=_&M^~_&$,F=k+O+W+i[R+1]+w[R+1],P=T+I,k=L+F<<0,L=F+P<<0,T=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),O=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),z=L&E,I=z^L&b^H,W=k&_^~k&M,F=$+O+W+i[R+2]+w[R+2],P=T+I,$=x+F<<0,x=F+P<<0,T=(x>>>2|x<<30)^(x>>>13|x<<19)^(x>>>22|x<<10),O=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),K=x&L,I=K^x&E^z,W=$&k^~$&_,F=M+O+W+i[R+3]+w[R+3],P=T+I,M=b+F<<0,b=F+P<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+b<<0,this.h1=this.h1+x<<0,this.h2=this.h2+L<<0,this.h3=this.h3+E<<0,this.h4=this.h4+M<<0,this.h5=this.h5+$<<0,this.h6=this.h6+k<<0,this.h7=this.h7+_<<0},A.prototype.hex=function(){this.finalize();var b=this.h0,x=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=s[b>>28&15]+s[b>>24&15]+s[b>>20&15]+s[b>>16&15]+s[b>>12&15]+s[b>>8&15]+s[b>>4&15]+s[b&15]+s[x>>28&15]+s[x>>24&15]+s[x>>20&15]+s[x>>16&15]+s[x>>12&15]+s[x>>8&15]+s[x>>4&15]+s[x&15]+s[L>>28&15]+s[L>>24&15]+s[L>>20&15]+s[L>>16&15]+s[L>>12&15]+s[L>>8&15]+s[L>>4&15]+s[L&15]+s[E>>28&15]+s[E>>24&15]+s[E>>20&15]+s[E>>16&15]+s[E>>12&15]+s[E>>8&15]+s[E>>4&15]+s[E&15]+s[M>>28&15]+s[M>>24&15]+s[M>>20&15]+s[M>>16&15]+s[M>>12&15]+s[M>>8&15]+s[M>>4&15]+s[M&15]+s[$>>28&15]+s[$>>24&15]+s[$>>20&15]+s[$>>16&15]+s[$>>12&15]+s[$>>8&15]+s[$>>4&15]+s[$&15]+s[k>>28&15]+s[k>>24&15]+s[k>>20&15]+s[k>>16&15]+s[k>>12&15]+s[k>>8&15]+s[k>>4&15]+s[k&15];return this.is224||(w+=s[_>>28&15]+s[_>>24&15]+s[_>>20&15]+s[_>>16&15]+s[_>>12&15]+s[_>>8&15]+s[_>>4&15]+s[_&15]),w},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var b=this.h0,x=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=[b>>24&255,b>>16&255,b>>8&255,b&255,x>>24&255,x>>16&255,x>>8&255,x&255,L>>24&255,L>>16&255,L>>8&255,L&255,E>>24&255,E>>16&255,E>>8&255,E&255,M>>24&255,M>>16&255,M>>8&255,M&255,$>>24&255,$>>16&255,$>>8&255,$&255,k>>24&255,k>>16&255,k>>8&255,k&255];return this.is224||w.push(_>>24&255,_>>16&255,_>>8&255,_&255),w},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var b=new ArrayBuffer(this.is224?28:32),x=new DataView(b);return x.setUint32(0,this.h0),x.setUint32(4,this.h1),x.setUint32(8,this.h2),x.setUint32(12,this.h3),x.setUint32(16,this.h4),x.setUint32(20,this.h5),x.setUint32(24,this.h6),this.is224||x.setUint32(28,this.h7),b};function S(b,x,L){var E,M=typeof b;if(M==="string"){var $=[],k=b.length,_=0,w;for(E=0;E<k;++E)w=b.charCodeAt(E),w<128?$[_++]=w:w<2048?($[_++]=192|w>>6,$[_++]=128|w&63):w<55296||w>=57344?($[_++]=224|w>>12,$[_++]=128|w>>6&63,$[_++]=128|w&63):(w=65536+((w&1023)<<10|b.charCodeAt(++E)&1023),$[_++]=240|w>>18,$[_++]=128|w>>12&63,$[_++]=128|w>>6&63,$[_++]=128|w&63);b=$}else if(M==="object"){if(b===null)throw new Error(t);if(g&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!g||!ArrayBuffer.isView(b)))throw new Error(t)}else throw new Error(t);b.length>64&&(b=new A(x,!0).update(b).array());var R=[],T=[];for(E=0;E<64;++E){var O=b[E]||0;R[E]=92^O,T[E]=54^O}A.call(this,x,L),this.update(T),this.oKeyPad=R,this.inner=!0,this.sharedMemory=L}S.prototype=new A,S.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var b=this.array();A.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(b),A.prototype.finalize.call(this)}};var C=d();C.sha256=C,C.sha224=d(!0),C.sha256.hmac=y(),C.sha224.hmac=y(!0),h?e.exports=C:(r.sha256=C.sha256,r.sha224=C.sha224)})()})(ap);var o2=ap.exports,s2=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Tl={},a2=Object.prototype.hasOwnProperty,l2;function Au(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function ku(e){try{return encodeURIComponent(e)}catch{return null}}function c2(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var f=Au(r[1]),u=Au(r[2]);f===null||u===null||f in n||(n[f]=u)}return n}function u2(e,t){t=t||"";var n=[],r,f;typeof t!="string"&&(t="?");for(f in e)if(a2.call(e,f)){if(r=e[f],!r&&(r===null||r===l2||isNaN(r))&&(r=""),f=ku(f),r=ku(r),f===null||r===null)continue;n.push(f+"="+r)}return n.length?t+n.join("&"):""}Tl.stringify=u2;Tl.parse=c2;var lp=s2,as=Tl,h2=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,cp=/[\n\r\t]/g,f2=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,up=/:\d+$/,d2=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,p2=/^[a-zA-Z]:/;function Ll(e){return(e||"").toString().replace(h2,"")}var Aa=[["#","hash"],["?","query"],function(t,n){return Ht(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Eu={hash:1,query:1};function hp(e){var t;typeof window<"u"?t=window:typeof Mn<"u"?t=Mn:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},f=typeof e,u;if(e.protocol==="blob:")r=new zt(unescape(e.pathname),{});else if(f==="string"){r=new zt(e,{});for(u in Eu)delete r[u]}else if(f==="object"){for(u in e)u in Eu||(r[u]=e[u]);r.slashes===void 0&&(r.slashes=f2.test(e.href))}return r}function Ht(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function fp(e,t){e=Ll(e),e=e.replace(cp,""),t=t||{};var n=d2.exec(e),r=n[1]?n[1].toLowerCase():"",f=!!n[2],u=!!n[3],h=0,g;return f?u?(g=n[2]+n[3]+n[4],h=n[2].length+n[3].length):(g=n[2]+n[4],h=n[2].length):u?(g=n[3]+n[4],h=n[3].length):g=n[4],r==="file:"?h>=2&&(g=g.slice(2)):Ht(r)?g=n[4]:r?f&&(g=g.slice(2)):h>=2&&Ht(t.protocol)&&(g=n[4]),{protocol:r,slashes:f||Ht(r),slashesCount:h,rest:g}}function g2(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,f=n[r-1],u=!1,h=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),h++):h&&(r===0&&(u=!0),n.splice(r,1),h--);return u&&n.unshift(""),(f==="."||f==="..")&&n.push(""),n.join("/")}function zt(e,t,n){if(e=Ll(e),e=e.replace(cp,""),!(this instanceof zt))return new zt(e,t,n);var r,f,u,h,g,s,p=Aa.slice(),o=typeof t,i=this,a=0;for(o!=="object"&&o!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=as.parse),t=hp(t),f=fp(e||"",t),r=!f.protocol&&!f.slashes,i.slashes=f.slashes||r&&t.slashes,i.protocol=f.protocol||t.protocol||"",e=f.rest,(f.protocol==="file:"&&(f.slashesCount!==2||p2.test(e))||!f.slashes&&(f.protocol||f.slashesCount<2||!Ht(i.protocol)))&&(p[3]=[/(.*)/,"pathname"]);a<p.length;a++){if(h=p[a],typeof h=="function"){e=h(e,i);continue}u=h[0],s=h[1],u!==u?i[s]=e:typeof u=="string"?(g=u==="@"?e.lastIndexOf(u):e.indexOf(u),~g&&(typeof h[2]=="number"?(i[s]=e.slice(0,g),e=e.slice(g+h[2])):(i[s]=e.slice(g),e=e.slice(0,g)))):(g=u.exec(e))&&(i[s]=g[1],e=e.slice(0,g.index)),i[s]=i[s]||r&&h[3]&&t[s]||"",h[4]&&(i[s]=i[s].toLowerCase())}n&&(i.query=n(i.query)),r&&t.slashes&&i.pathname.charAt(0)!=="/"&&(i.pathname!==""||t.pathname!=="")&&(i.pathname=g2(i.pathname,t.pathname)),i.pathname.charAt(0)!=="/"&&Ht(i.protocol)&&(i.pathname="/"+i.pathname),lp(i.port,i.protocol)||(i.host=i.hostname,i.port=""),i.username=i.password="",i.auth&&(g=i.auth.indexOf(":"),~g?(i.username=i.auth.slice(0,g),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=i.auth.slice(g+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(i.auth)),i.auth=i.password?i.username+":"+i.password:i.username),i.origin=i.protocol!=="file:"&&Ht(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString()}function m2(e,t,n){var r=this;switch(e){case"query":typeof t=="string"&&t.length&&(t=(n||as.parse)(t)),r[e]=t;break;case"port":r[e]=t,lp(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,up.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var f=e==="pathname"?"/":"#";r[e]=t.charAt(0)!==f?f+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var u=t.indexOf(":");~u?(r.username=t.slice(0,u),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(u+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var h=0;h<Aa.length;h++){var g=Aa[h];g[4]&&(r[g[1]]=r[g[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin=r.protocol!=="file:"&&Ht(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function v2(e){(!e||typeof e!="function")&&(e=as.stringify);var t,n=this,r=n.host,f=n.protocol;f&&f.charAt(f.length-1)!==":"&&(f+=":");var u=f+(n.protocol&&n.slashes||Ht(n.protocol)?"//":"");return n.username?(u+=n.username,n.password&&(u+=":"+n.password),u+="@"):n.password?(u+=":"+n.password,u+="@"):n.protocol!=="file:"&&Ht(n.protocol)&&!r&&n.pathname!=="/"&&(u+="@"),(r[r.length-1]===":"||up.test(n.hostname)&&!n.port)&&(r+=":"),u+=r+n.pathname,t=typeof n.query=="object"?e(n.query):n.query,t&&(u+=t.charAt(0)!=="?"?"?"+t:t),n.hash&&(u+=n.hash),u}zt.prototype={set:m2,toString:v2};zt.extractProtocol=fp;zt.location=hp;zt.trimLeft=Ll;zt.qs=as;var y2=zt;const b2=rr(y2);class ls extends kt{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.name="VirusTotal",this.baseURL="https://www.virustotal.com",this.type="domain"}}class w2 extends ls{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/gui/domain/${t}/detection`}}class $2 extends ls{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/gui/ip-address/${t}/details`}}class _2 extends ls{constructor(){super(),this.type="url"}href(t){const n=o2.sha256(this.normalizeURL(t));return this.baseURL+`/gui/url/${n}/details`}normalizeURL(t){return new b2(t).pathname==="/"&&!t.endsWith("/")?`${t}/`:t}}class S2 extends ls{constructor(){super(),this.type="hash"}href(t){return this.baseURL+`/gui/file/${t}/details`}}const C2=[new UA,new zA,new VA,new GA,new jA,new KA,new YA,new XA,new ZA,new op,new qA,new JA,new QA,new e2,new t2,new n2,new w2,new S2,new $2,new _2],A2=be({name:"LinksItem",components:{LinkComponent:HA},props:{data:{type:String,required:!0},type:{type:String,required:!0}},setup(e){return{selectedLinks:ke(()=>C2.filter(n=>n.type===e.type))}}}),k2={class:"tags are-medium"};function E2(e,t,n,r,f,u){const h=oe("LinkComponent");return Z(),ie("div",k2,[(Z(!0),ie(xe,null,$t(e.selectedLinks,g=>(Z(),_e(h,{data:e.data,link:g,key:g.name},null,8,["data","link"]))),128))])}const x2=Se(A2,[["render",E2]]),R2=be({name:"MessageItem",props:{message:{type:Object,required:!0},disposable:{type:Boolean,default:!1}},emits:["dispose"],setup(e,t){return{dispose:()=>{t.emit("dispose")}}}}),T2={class:"notification is-info is-light"};function L2(e,t,n,r,f,u){return Z(),ie("div",T2,[e.disposable?(Z(),ie("button",{key:0,class:"delete",onClick:t[0]||(t[0]=(...h)=>e.dispose&&e.dispose(...h))})):de("",!0),N("p",null,ye(e.message.message),1)])}const cs=Se(R2,[["render",L2]]),M2=be({name:"ArtifactDetail",props:{artifact:{type:Object,required:!0}},components:{AS:KC,DnsRecords:iA,Links:x2,ReverseDnsNames:fA,Tags:mA,ActionButtons:ip,WhoisRecord:NA,CPEs:qC,Ports:lA,ErrorMessage:lt,Message:cs},emits:["refresh","delete"],setup(e,t){const n=Fe(),r=Fe(),f=Fe(),u=Fe(),h=d=>{f.value=d},g=()=>{f.value=void 0},s=()=>{t.emit("delete")},p=d=>{d.queued?u.value=d:t.emit("refresh")},o=()=>{u.value=void 0},i=ke(()=>{if(e.artifact.dataType==="domain")return`https://urlscan.io/liveshot/?url=${`http://${e.artifact.data}`}`;if(e.artifact.dataType==="url")return`https://urlscan.io/liveshot/?url=${e.artifact.data}`}),a=d=>{if(d)return`https://maps.google.co.jp/maps?output=embed&q=${d.lat},${d.long}&z=3`},c=w$(),l=ki();return Ye(async()=>{if(e.artifact.dataType==="ip"){let d;if(e.artifact.geolocation)d=tp(e.artifact.geolocation.countryCode);else{const m=await c.perform(e.artifact.data);d=p_(m),r.value=m.countryCode}n.value=a(d)}}),{countryCode:r,getAlertsTask:l,googleMapSrc:n,truncate:Ei,urlscanLiveshotSrc:i,onDelete:s,onSetError:h,error:f,onDisposeError:g,message:u,onDisposeMessage:o,onSetMessage:p}}}),mt=e=>(Ho("data-v-2e8dd078"),e=e(),Uo(),e),O2={class:"block"},I2={class:"is-size-2"},F2={class:"is-clearfix"},N2={class:"columns"},D2={key:0,class:"column is-half"},P2={key:0},B2={class:"is-size-4"},W2={class:"has-text-grey"},H2=["src"],U2={key:1},z2=mt(()=>N("h4",{class:"is-size-4"},"Live screenshot",-1)),V2=mt(()=>N("p",{class:"help"},"Hover to expand",-1)),j2=["src"],G2={class:"column"},K2=mt(()=>N("h4",{class:"is-size-4"},"Information",-1)),Y2={class:"table is-fullwidth is-completely-borderless"},X2=mt(()=>N("th",null,"Data",-1)),Z2=mt(()=>N("th",null,"Data type",-1)),q2=mt(()=>N("th",null,"Source",-1)),J2=mt(()=>N("th",null,"Query",-1)),Q2={key:0},ek=mt(()=>N("th",null,"Tags",-1)),tk={class:"help"},nk={class:"block"},rk={key:0,class:"block"},ik=mt(()=>N("h4",{class:"is-size-4 mb-2"},"AS",-1)),ok={key:1,class:"block"},sk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Reverse DNS",-1)),ak={key:2,class:"block"},lk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"DNS records",-1)),ck={key:3,class:"block"},uk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"CPEs",-1)),hk={key:4,class:"block"},fk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Ports",-1)),dk={key:5,class:"block"},pk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Whois record",-1)),gk={class:"block"},mk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Links",-1));function vk(e,t,n,r,f,u){var v;const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("Tags"),o=oe("AS"),i=oe("ReverseDnsNames"),a=oe("DnsRecords"),c=oe("CPEs"),l=oe("Ports"),d=oe("WhoisRecord"),m=oe("Links");return Z(),ie(xe,null,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",O2,[N("h2",I2,ye(e.artifact.id),1),N("p",F2,[ae(s,{artifact:e.artifact,onDelete:e.onDelete,onSetError:e.onSetError,onSetMessage:e.onSetMessage},null,8,["artifact","onDelete","onSetError","onSetMessage"])])]),N("div",N2,[e.googleMapSrc||e.urlscanLiveshotSrc?(Z(),ie("div",D2,[e.googleMapSrc?(Z(),ie("div",P2,[N("h4",B2,[et(" Geolocation "),N("span",W2,ye(e.countryCode||((v=e.artifact.geolocation)==null?void 0:v.countryCode)),1)]),N("iframe",{class:"mb-4",src:e.googleMapSrc,width:"100%",height:"240px"},null,8,H2)])):de("",!0),e.urlscanLiveshotSrc?(Z(),ie("div",U2,[z2,V2,N("img",{src:e.urlscanLiveshotSrc,class:"liveshot",alt:"liveshot"},null,8,j2)])):de("",!0)])):de("",!0),N("div",G2,[K2,N("table",Y2,[N("tr",null,[X2,N("td",null,ye(e.truncate(e.artifact.data,64)),1)]),N("tr",null,[Z2,N("td",null,ye(e.artifact.dataType),1)]),N("tr",null,[q2,N("td",null,ye(e.artifact.source),1)]),N("tr",null,[J2,N("td",null,ye(e.truncate(e.artifact.query||"N/A",64)),1)]),e.artifact.tags.length>0?(Z(),ie("tr",Q2,[ek,N("td",null,[ae(p,{tags:e.artifact.tags},null,8,["tags"])])])):de("",!0)]),N("p",tk,"Created at: "+ye(e.artifact.createdAt),1)])]),N("div",nk,[e.artifact.autonomousSystem?(Z(),ie("div",rk,[ik,ae(o,{autonomousSystem:e.artifact.autonomousSystem},null,8,["autonomousSystem"])])):de("",!0),e.artifact.reverseDnsNames?(Z(),ie("div",ok,[sk,ae(i,{reverseDnsNames:e.artifact.reverseDnsNames},null,8,["reverseDnsNames"])])):de("",!0),e.artifact.dnsRecords?(Z(),ie("div",ak,[lk,ae(a,{dnsRecords:e.artifact.dnsRecords},null,8,["dnsRecords"])])):de("",!0),e.artifact.cpes?(Z(),ie("div",ck,[uk,ae(c,{cpes:e.artifact.cpes},null,8,["cpes"])])):de("",!0),e.artifact.ports?(Z(),ie("div",hk,[fk,ae(l,{ports:e.artifact.ports},null,8,["ports"])])):de("",!0),e.artifact.whoisRecord?(Z(),ie("div",dk,[pk,ae(d,{whoisRecord:e.artifact.whoisRecord},null,8,["whoisRecord"])])):de("",!0),N("div",gk,[mk,ae(m,{data:e.artifact.data,type:e.artifact.dataType},null,8,["data","type"])])])],64)}const yk=Se(M2,[["render",vk],["__scopeId","data-v-2e8dd078"]]),bk=be({name:"ArtifactDetailWrapper",components:{Artifact:yk,Loading:cn,ErrorMessage:lt},props:{id:{type:Number,required:!0}},setup(e){const t=v$(),n=Lr(),r=async()=>{await t.perform(e.id)},f=async()=>{await r()},u=async()=>{n.push("/")};return Ye(async()=>{await r()}),qe(e,async()=>{await r()}),{getArtifactTask:t,onRefresh:f,onDelete:u}}});function wk(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Artifact");return Z(),ie(xe,null,[e.getArtifactTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getArtifactTask.isError?(Z(),_e(g,{key:1,error:(p=e.getArtifactTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getArtifactTask.last)!=null&&o.value?(Z(),_e(s,{key:2,artifact:e.getArtifactTask.last.value,onRefresh:e.onRefresh,onDelete:e.onDelete},null,8,["artifact","onRefresh","onDelete"])):de("",!0)],64)}const $k=Se(bk,[["render",wk]]),_k=be({name:"ArtifactView",components:{Artifact:$k},props:{id:{type:String,required:!0}},setup(e){const t=()=>{ln(`Artifact:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function Sk(e,t,n,r,f,u){const h=oe("Artifact",!0);return Z(),_e(h,{id:parseInt(e.id)},null,8,["id"])}const Ck=Se(_k,[["render",Sk]]),Ak=be({name:"ArtifactsItem",props:{artifact:{type:Object,required:!0}},components:{ErrorMessage:lt,ActionButtons:ip,Message:cs},emits:["delete"],setup(e,t){const n=Fe(),r=Fe();return{onSetError:p=>{n.value=p},onDisposeError:()=>{n.value=void 0},onDelete:()=>{t.emit("delete")},error:n,truncate:Ei,message:r,onSetMessage:p=>{p.queued&&(r.value=p)},onDisposeMessage:()=>{r.value=void 0}}}}),kk={class:"box"},Ek={class:"block"},xk={class:"table is-fullwidth is-completely-borderless"},Rk=N("th",null,"Data",-1),Tk=N("th",null,"Data Type",-1),Lk=N("th",null,"Source",-1),Mk=N("th",null,"Query",-1),Ok=N("p",{class:"block is-clearfix"},null,-1),Ik={class:"help"};function Fk(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("router-link");return Z(),ie("div",kk,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",Ek,[N("p",null,[ae(s,{artifact:e.artifact,onDelete:e.onDelete,onSetError:e.onSetError,onSetMessage:e.onSetMessage},null,8,["artifact","onDelete","onSetError","onSetMessage"])]),ae(p,{class:"is-size-4",to:{name:"Artifact",params:{id:e.artifact.id}}},{default:Je(()=>[et(ye(e.artifact.id),1)]),_:1},8,["to"])]),N("table",xk,[N("tr",null,[Rk,N("td",null,ye(e.artifact.data),1)]),N("tr",null,[Tk,N("td",null,ye(e.artifact.dataType),1)]),N("tr",null,[Lk,N("td",null,ye(e.artifact.source),1)]),N("tr",null,[Mk,N("td",null,ye(e.truncate(e.artifact.query||"N/A",64)),1)])]),Ok,N("p",Ik,"Created at: "+ye(e.artifact.createdAt),1)])}const Nk=Se(Ak,[["render",Fk]]),Dk=be({name:"ArtifactsItem",props:{artifacts:{type:Object,required:!0}},components:{Artifact:Nk,Pagination:xl},emits:["update-page"],setup(e,t){const n=ke(()=>e.artifacts.results.length>0);return{onUpdatePage:u=>{t.emit("update-page",u)},onDelete:()=>{t.emit("update-page",1)},hasArtifacts:n}}}),Pk={key:0},Bk={class:"help"},Wk={key:1},Hk=N("div",{class:"notification is-warning is-light"},"There is no artifact to show",-1),Uk=[Hk];function zk(e,t,n,r,f,u){const h=oe("Artifact"),g=oe("Pagination");return e.hasArtifacts?(Z(),ie("div",Pk,[(Z(!0),ie(xe,null,$t(e.artifacts.results,s=>(Z(),_e(h,{artifact:s,key:s.id,onDelete:e.onDelete},null,8,["artifact","onDelete"]))),128)),ae(g,{total:e.artifacts.total,currentPage:e.artifacts.currentPage,pageSize:e.artifacts.pageSize,onUpdatePage:e.onUpdatePage},null,8,["total","currentPage","pageSize","onUpdatePage"]),N("p",Bk," ("+ye(e.artifacts.total)+" results in total, "+ye(e.artifacts.results.length)+" shown) ",1)])):(Z(),ie("div",Wk,Uk))}const Vk=Se(Dk,[["render",zk]]),jk=be({name:"ArtifactsWrapper",components:{Artifacts:Vk,Loading:cn,ErrorMessage:lt},setup(){const e=_r("page","1"),t=_r("q",""),n=Fe(!1),r=kl(),f=async()=>{const s={q:t.value,page:parseInt(e.value)};return await r.perform(s)},u=s=>{console.log(s),e.value=s.toString()},h=async()=>{e.value="1",await f()},g=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getArtifactsTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:g,onUpdatePage:u}}}),Gk={class:"block"},Kk={class:"field has-addons"},Yk={class:"control is-expanded"},Xk={class:"control"},Zk={class:"icon is-small"},qk=N("span",null,"Search",-1),Jk={class:"control"},Qk={class:"icon is-small"},eE=N("span",null,"Help",-1),tE={key:0,class:"content mt-3"},nE=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li><code>id</code>, <code>data</code>, <code>data_type</code>, <code>source</code>, <code>query</code>, <code>tag</code>, <code>rule.id</code>, <code>rule.title</code>, <code>rule.description</code>, <code>tag</code>,<code>created_at</code>, <code>asn</code>, <code>country_code</code>, <code>dns_record.value</code>, <code>dns_record.resource</code>, <code>reverse_dns_name</code>, <code>cpe</code> and <code>port</code>. </li></ul>',2),rE=[nE],iE={key:0,class:"block"};function oE(e,t,n,r,f,u){var o,i;const h=oe("font-awesome-icon"),g=oe("Loading"),s=oe("ErrorMessage"),p=oe("Artifacts");return Z(),ie(xe,null,[N("div",Gk,[N("div",Kk,[N("p",Yk,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=a=>e.q=a)},null,512),[[qn,e.q]])]),N("p",Xk,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...a)=>e.search&&e.search(...a))},[N("span",Zk,[ae(h,{icon:"search"})]),qk])]),N("p",Jk,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...a)=>e.toggleShowHelp&&e.toggleShowHelp(...a))},[N("span",Qk,[ae(h,{icon:"question"})]),eE])])]),e.showHelp?(Z(),ie("div",tE,rE)):de("",!0)]),e.getArtifactsTask.performCount>0?(Z(),ie("div",iE,[e.getArtifactsTask.isRunning?(Z(),_e(g,{key:0})):de("",!0),e.getArtifactsTask.isError?(Z(),_e(s,{key:1,error:(o=e.getArtifactsTask.last)==null?void 0:o.error},null,8,["error"])):de("",!0),(i=e.getArtifactsTask.last)!=null&&i.value?(Z(),_e(p,{key:2,artifacts:e.getArtifactsTask.last.value,onUpdatePage:e.onUpdatePage},null,8,["artifacts","onUpdatePage"])):de("",!0)])):de("",!0)],64)}const sE=Se(jk,[["render",oE]]),aE=be({name:"ArtifactsView",components:{Artifacts:sE},setup(){const e=()=>{ln("Artifacts - Mihari")};Ye(()=>{e()})}});function lE(e,t,n,r,f,u){const h=oe("Artifacts",!0);return Z(),_e(h)}const cE=Se(aE,[["render",lE]]),uE=be({name:"ConfigsItem",props:{configs:{type:Array,required:!0}}}),hE={class:"box"},fE={class:"table-container"},dE={class:"table is-fullwidth"},pE=N("thead",null,[N("tr",null,[N("th",null,"Name"),N("th",null,"Type"),N("th",null,"Configured?"),N("th",null,"Items")])],-1),gE={key:0,class:"button is-success is-small ml-1"},mE={class:"icon is-small"},vE=N("span",null,"Yes",-1),yE={key:1,class:"button is-warning is-small ml-1"},bE={class:"icon is-small"},wE=N("span",null,"No",-1),$E={class:"field is-grouped is-grouped-multiline"},_E={class:"tags has-addons"},SE={class:"tag is-dark"};function CE(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("div",hE,[N("div",fE,[N("table",dE,[pE,N("tbody",null,[(Z(!0),ie(xe,null,$t(e.configs,g=>(Z(),ie("tr",{key:g.name},[N("td",null,ye(g.name),1),N("td",null,ye(g.type),1),N("td",null,[g.configured?(Z(),ie("button",gE,[N("span",mE,[ae(h,{icon:"check"})]),vE])):(Z(),ie("button",yE,[N("span",bE,[ae(h,{icon:"exclamation"})]),wE]))]),N("td",null,[N("div",$E,[(Z(!0),ie(xe,null,$t(g.items,(s,p)=>(Z(),ie("div",{class:"control",key:p},[N("div",_E,[N("span",SE,ye(s.key),1),N("span",{class:Er(["tag",{"is-success":s.value,"is-warning":!s.value}])},ye(s.value||"N/A"),3)])]))),128))])])]))),128))])])])])}const AE=Se(uE,[["render",CE]]),kE=be({name:"ConfigsWrapper",components:{Configs:AE,Loading:cn,ErrorMessage:lt},setup(){const e=b$();return Ye(async()=>{await e.perform()}),{getConfigsTask:e}}});function EE(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Configs");return Z(),ie(xe,null,[e.getConfigsTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getConfigsTask.isError?(Z(),_e(g,{key:1,error:(p=e.getConfigsTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getConfigsTask.last)!=null&&o.value?(Z(),_e(s,{key:2,configs:e.getConfigsTask.last.value},null,8,["configs"])):de("",!0)],64)}const xE=Se(kE,[["render",EE]]),RE=be({name:"ConfigView",components:{Configs:xE},setup(){ln("Configuration - Mihari")}});function TE(e,t,n,r,f,u){const h=oe("Configs");return Z(),_e(h)}const LE=Se(RE,[["render",TE]]);var dp={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(o,i,a){if(typeof o!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(a=i),f.modules[o]||(f.payloads[o]=a,f.modules[o]=null)};f.modules={},f.payloads={};var u=function(o,i,a){if(typeof i=="string"){var c=s(o,i);if(c!=null)return a&&a(),c}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var l=[],d=0,m=i.length;d<m;++d){var v=s(o,i[d]);if(v==null&&h.original)return;l.push(v)}return a&&a.apply(null,l)||!0}},h=function(o,i){var a=u("",o,i);return a==null&&h.original?h.original.apply(this,arguments):a},g=function(o,i){if(i.indexOf("!")!==-1){var a=i.split("!");return g(o,a[0])+"!"+g(o,a[1])}if(i.charAt(0)=="."){var c=o.split("/").slice(0,-1).join("/");for(i=c+"/"+i;i.indexOf(".")!==-1&&l!=i;){var l=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},s=function(o,i){i=g(o,i);var a=f.modules[i];if(!a){if(a=f.payloads[i],typeof a=="function"){var c={},l={id:i,uri:"",exports:c,packaged:!0},d=function(v,y){return u(i,v,y)},m=a(d,c,l);c=m||l.exports,f.modules[i]=c,delete f.payloads[i]}a=f.modules[i]=c||a}return a};function p(o){var i=r;o&&(r[o]||(r[o]={}),i=r[o]),(!i.define||!i.define.packaged)&&(f.original=i.define,i.define=f,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(h.original=i.require,i.require=h,i.require.packaged=!0)}p(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function u(h,g,s){Object.defineProperty(h,g,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(h,g){return g=g||0,this.lastIndexOf(h,g)===g}),String.prototype.endsWith||u(String.prototype,"endsWith",function(h,g){var s=this;(g===void 0||g>s.length)&&(g=s.length),g-=h.length;var p=s.indexOf(h,g);return p!==-1&&p===g}),String.prototype.repeat||u(String.prototype,"repeat",function(h){for(var g="",s=this;h>0;)h&1&&(g+=s),(h>>=1)&&(s+=s);return g}),String.prototype.includes||u(String.prototype,"includes",function(h,g){return this.indexOf(h,g)!=-1}),Object.assign||(Object.assign=function(h){if(h==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(h),s=1;s<arguments.length;s++){var p=arguments[s];p!=null&&Object.keys(p).forEach(function(o){g[o]=p[o]})}return g}),Object.values||(Object.values=function(h){return Object.keys(h).map(function(g){return h[g]})}),Array.prototype.find||u(Array.prototype,"find",function(h){for(var g=this.length,s=arguments[1],p=0;p<g;p++){var o=this[p];if(h.call(s,o,p,this))return o}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(h){for(var g=this.length,s=arguments[1],p=0;p<g;p++){var o=this[p];if(h.call(s,o,p,this))return p}}),Array.prototype.includes||u(Array.prototype,"includes",function(h,g){return this.indexOf(h,g)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(h){for(var g=this,s=g.length>>>0,p=arguments[1],o=p>>0,i=o<0?Math.max(s+o,0):Math.min(o,s),a=arguments[2],c=a===void 0?s:a>>0,l=c<0?Math.max(s+c,0):Math.min(c,s);i<l;)g[i]=h,i++;return g}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function u(h){if(typeof h!="object"||!h)return h;var g;if(Array.isArray(h)){g=[];for(var s=0;s<h.length;s++)g[s]=u(h[s]);return g}if(Object.prototype.toString.call(h)!=="[object Object]")return h;g={};for(var s in h)g[s]=u(h[s]);return g}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){r.last=function(g){return g[g.length-1]},r.stringReverse=function(g){return g.split("").reverse().join("")},r.stringRepeat=function(g,s){for(var p="";s>0;)s&1&&(p+=g),(s>>=1)&&(g+=g);return p};var u=/^\s\s*/,h=/\s\s*$/;r.stringTrimLeft=function(g){return g.replace(u,"")},r.stringTrimRight=function(g){return g.replace(h,"")},r.copyObject=function(g){var s={};for(var p in g)s[p]=g[p];return s},r.copyArray=function(g){for(var s=[],p=0,o=g.length;p<o;p++)g[p]&&typeof g[p]=="object"?s[p]=this.copyObject(g[p]):s[p]=g[p];return s},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(g){for(var s={},p=0;p<g.length;p++)s[g[p]]=1;return s},r.createMap=function(g){var s=Object.create(null);for(var p in g)s[p]=g[p];return s},r.arrayRemove=function(g,s){for(var p=0;p<=g.length;p++)s===g[p]&&g.splice(p,1)},r.escapeRegExp=function(g){return g.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(g){return(""+g).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(g,s){var p=[];return g.replace(s,function(o){p.push({offset:arguments[arguments.length-2],length:o.length})}),p},r.deferredCall=function(g){var s=null,p=function(){s=null,g()},o=function(i){return o.cancel(),s=setTimeout(p,i||0),o};return o.schedule=o,o.call=function(){return this.cancel(),g(),o},o.cancel=function(){return clearTimeout(s),s=null,o},o.isPending=function(){return s},o},r.delayedCall=function(g,s){var p=null,o=function(){p=null,g()},i=function(a){p==null&&(p=setTimeout(o,a||s))};return i.delay=function(a){p&&clearTimeout(p),p=setTimeout(o,a||s)},i.schedule=i,i.call=function(){this.cancel(),g()},i.cancel=function(){p&&clearTimeout(p),p=null},i.isPending=function(){return p},i},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(g,s,p){return p&&g.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){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 u=typeof navigator=="object"?navigator:{},h=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),g=u.userAgent||"",s=u.appName||"";r.isWin=h=="win",r.isMac=h=="mac",r.isLinux=h=="linux",r.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((g.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((g.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=g.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(g.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(g.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(g.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(g.split(" Edge/")[1])||void 0,r.isAIR=g.indexOf("AdobeAIR")>=0,r.isAndroid=g.indexOf("Android")>=0,r.isChromeOS=g.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(g)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,f){var u=n("./useragent"),h="http://www.w3.org/1999/xhtml";r.buildDom=function a(c,l,d){if(typeof c=="string"&&c){var m=document.createTextNode(c);return l&&l.appendChild(m),m}if(!Array.isArray(c))return c&&c.appendChild&&l&&l.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var v=[],y=0;y<c.length;y++){var A=a(c[y],l,d);A&&v.push(A)}return v}var S=document.createElement(c[0]),C=c[1],b=1;C&&typeof C=="object"&&!Array.isArray(C)&&(b=2);for(var y=b;y<c.length;y++)a(c[y],S,d);return b==2&&Object.keys(C).forEach(function(x){var L=C[x];x==="class"?S.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||x=="value"||x[0]=="$"?S[x]=L:x==="ref"?d&&(d[L]=S):x==="style"?typeof L=="string"&&(S.style.cssText=L):L!=null&&S.setAttribute(x,L)}),l&&l.appendChild(S),S},r.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},r.createElement=function(a,c){return document.createElementNS?document.createElementNS(c||h,a):document.createElement(a)},r.removeChildren=function(a){a.innerHTML=""},r.createTextNode=function(a,c){var l=c?c.ownerDocument:document;return l.createTextNode(a)},r.createFragment=function(a){var c=a?a.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(a,c){var l=(a.className+"").split(/\s+/g);return l.indexOf(c)!==-1},r.addCssClass=function(a,c){r.hasCssClass(a,c)||(a.className+=" "+c)},r.removeCssClass=function(a,c){for(var l=a.className.split(/\s+/g);;){var d=l.indexOf(c);if(d==-1)break;l.splice(d,1)}a.className=l.join(" ")},r.toggleCssClass=function(a,c){for(var l=a.className.split(/\s+/g),d=!0;;){var m=l.indexOf(c);if(m==-1)break;d=!1,l.splice(m,1)}return d&&l.push(c),a.className=l.join(" "),d},r.setCssClass=function(a,c,l){l?r.addCssClass(a,c):r.removeCssClass(a,c)},r.hasCssString=function(a,c){var l=0,d;if(c=c||document,d=c.querySelectorAll("style")){for(;l<d.length;)if(d[l++].id===a)return!0}},r.removeElementById=function(a,c){c=c||document,c.getElementById(a)&&c.getElementById(a).remove()};var g,s=[];r.useStrictCSP=function(a){g=a,a==!1?p():s||(s=[])};function p(){var a=s;s=null,a&&a.forEach(function(c){o(c[0],c[1])})}function o(a,c,l){if(!(typeof document>"u")){if(s){if(l)p();else if(l===!1)return s.push([a,c])}if(!g){var d=l;!l||!l.getRootNode?d=document:(d=l.getRootNode(),(!d||d==l)&&(d=document));var m=d.ownerDocument||d;if(c&&r.hasCssString(c,d))return null;c&&(a+=`
|
788
|
+
*/(function(e){(function(){var t="input is invalid type",n=typeof window=="object",r=n?window:{};r.JS_SHA256_NO_WINDOW&&(n=!1);var f=!n&&typeof self=="object",u=!r.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;u?r=Ln:f&&(r=self);var h=!r.JS_SHA256_NO_COMMON_JS&&!0&&e.exports,g=!r.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",s="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],o=[24,16,8,0],i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=["hex","array","digest","arrayBuffer"],c=[];(r.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),g&&(r.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});var l=function(b,R){return function(L){return new A(R,!0).update(L)[b]()}},d=function(b){var R=l("hex",b);u&&(R=m(R,b)),R.create=function(){return new A(b)},R.update=function(M){return R.create().update(M)};for(var L=0;L<a.length;++L){var E=a[L];R[E]=l(E,b)}return R},m=function(b,R){var L=Cu,E=Cu.Buffer,M=R?"sha224":"sha256",$;E.from&&!r.JS_SHA256_NO_BUFFER_FROM?$=E.from:$=function(_){return new E(_)};var k=function(_){if(typeof _=="string")return L.createHash(M).update(_,"utf8").digest("hex");if(_==null)throw new Error(t);return _.constructor===ArrayBuffer&&(_=new Uint8Array(_)),Array.isArray(_)||ArrayBuffer.isView(_)||_.constructor===E?L.createHash(M).update($(_)).digest("hex"):b(_)};return k},v=function(b,R){return function(L,E){return new S(L,R,!0).update(E)[b]()}},y=function(b){var R=v("hex",b);R.create=function(M){return new S(M,b)},R.update=function(M,$){return R.create(M).update($)};for(var L=0;L<a.length;++L){var E=a[L];R[E]=v(E,b)}return R};function A(b,R){R?(c[0]=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0,this.blocks=c):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=b}A.prototype.update=function(b){if(!this.finalized){var R,L=typeof b;if(L!=="string"){if(L==="object"){if(b===null)throw new Error(t);if(g&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!g||!ArrayBuffer.isView(b)))throw new Error(t)}else throw new Error(t);R=!0}for(var E,M=0,$,k=b.length,_=this.blocks;M<k;){if(this.hashed&&(this.hashed=!1,_[0]=this.block,_[16]=_[1]=_[2]=_[3]=_[4]=_[5]=_[6]=_[7]=_[8]=_[9]=_[10]=_[11]=_[12]=_[13]=_[14]=_[15]=0),R)for($=this.start;M<k&&$<64;++M)_[$>>2]|=b[M]<<o[$++&3];else for($=this.start;M<k&&$<64;++M)E=b.charCodeAt(M),E<128?_[$>>2]|=E<<o[$++&3]:E<2048?(_[$>>2]|=(192|E>>6)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]):E<55296||E>=57344?(_[$>>2]|=(224|E>>12)<<o[$++&3],_[$>>2]|=(128|E>>6&63)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]):(E=65536+((E&1023)<<10|b.charCodeAt(++M)&1023),_[$>>2]|=(240|E>>18)<<o[$++&3],_[$>>2]|=(128|E>>12&63)<<o[$++&3],_[$>>2]|=(128|E>>6&63)<<o[$++&3],_[$>>2]|=(128|E&63)<<o[$++&3]);this.lastByteIndex=$,this.bytes+=$-this.start,$>=64?(this.block=_[16],this.start=$-64,this.hash(),this.hashed=!0):this.start=$}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,R=this.lastByteIndex;b[16]=this.block,b[R>>2]|=p[R&3],this.block=b[16],R>=56&&(this.hashed||this.hash(),b[0]=this.block,b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0),b[14]=this.hBytes<<3|this.bytes>>>29,b[15]=this.bytes<<3,this.hash()}},A.prototype.hash=function(){var b=this.h0,R=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=this.blocks,x,T,O,I,F,P,W,j,H,z,K;for(x=16;x<64;++x)F=w[x-15],T=(F>>>7|F<<25)^(F>>>18|F<<14)^F>>>3,F=w[x-2],O=(F>>>17|F<<15)^(F>>>19|F<<13)^F>>>10,w[x]=w[x-16]+T+w[x-7]+O<<0;for(K=R&L,x=0;x<64;x+=4)this.first?(this.is224?(j=300032,F=w[0]-1413257819,_=F-150054599<<0,E=F+24177077<<0):(j=704751109,F=w[0]-210244248,_=F-1521486534<<0,E=F+143694565<<0),this.first=!1):(T=(b>>>2|b<<30)^(b>>>13|b<<19)^(b>>>22|b<<10),O=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7),j=b&R,I=j^b&L^K,W=M&$^~M&k,F=_+O+W+i[x]+w[x],P=T+I,_=E+F<<0,E=F+P<<0),T=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),O=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),H=E&b,I=H^E&R^j,W=_&M^~_&$,F=k+O+W+i[x+1]+w[x+1],P=T+I,k=L+F<<0,L=F+P<<0,T=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),O=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),z=L&E,I=z^L&b^H,W=k&_^~k&M,F=$+O+W+i[x+2]+w[x+2],P=T+I,$=R+F<<0,R=F+P<<0,T=(R>>>2|R<<30)^(R>>>13|R<<19)^(R>>>22|R<<10),O=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),K=R&L,I=K^R&E^z,W=$&k^~$&_,F=M+O+W+i[x+3]+w[x+3],P=T+I,M=b+F<<0,b=F+P<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+b<<0,this.h1=this.h1+R<<0,this.h2=this.h2+L<<0,this.h3=this.h3+E<<0,this.h4=this.h4+M<<0,this.h5=this.h5+$<<0,this.h6=this.h6+k<<0,this.h7=this.h7+_<<0},A.prototype.hex=function(){this.finalize();var b=this.h0,R=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=s[b>>28&15]+s[b>>24&15]+s[b>>20&15]+s[b>>16&15]+s[b>>12&15]+s[b>>8&15]+s[b>>4&15]+s[b&15]+s[R>>28&15]+s[R>>24&15]+s[R>>20&15]+s[R>>16&15]+s[R>>12&15]+s[R>>8&15]+s[R>>4&15]+s[R&15]+s[L>>28&15]+s[L>>24&15]+s[L>>20&15]+s[L>>16&15]+s[L>>12&15]+s[L>>8&15]+s[L>>4&15]+s[L&15]+s[E>>28&15]+s[E>>24&15]+s[E>>20&15]+s[E>>16&15]+s[E>>12&15]+s[E>>8&15]+s[E>>4&15]+s[E&15]+s[M>>28&15]+s[M>>24&15]+s[M>>20&15]+s[M>>16&15]+s[M>>12&15]+s[M>>8&15]+s[M>>4&15]+s[M&15]+s[$>>28&15]+s[$>>24&15]+s[$>>20&15]+s[$>>16&15]+s[$>>12&15]+s[$>>8&15]+s[$>>4&15]+s[$&15]+s[k>>28&15]+s[k>>24&15]+s[k>>20&15]+s[k>>16&15]+s[k>>12&15]+s[k>>8&15]+s[k>>4&15]+s[k&15];return this.is224||(w+=s[_>>28&15]+s[_>>24&15]+s[_>>20&15]+s[_>>16&15]+s[_>>12&15]+s[_>>8&15]+s[_>>4&15]+s[_&15]),w},A.prototype.toString=A.prototype.hex,A.prototype.digest=function(){this.finalize();var b=this.h0,R=this.h1,L=this.h2,E=this.h3,M=this.h4,$=this.h5,k=this.h6,_=this.h7,w=[b>>24&255,b>>16&255,b>>8&255,b&255,R>>24&255,R>>16&255,R>>8&255,R&255,L>>24&255,L>>16&255,L>>8&255,L&255,E>>24&255,E>>16&255,E>>8&255,E&255,M>>24&255,M>>16&255,M>>8&255,M&255,$>>24&255,$>>16&255,$>>8&255,$&255,k>>24&255,k>>16&255,k>>8&255,k&255];return this.is224||w.push(_>>24&255,_>>16&255,_>>8&255,_&255),w},A.prototype.array=A.prototype.digest,A.prototype.arrayBuffer=function(){this.finalize();var b=new ArrayBuffer(this.is224?28:32),R=new DataView(b);return R.setUint32(0,this.h0),R.setUint32(4,this.h1),R.setUint32(8,this.h2),R.setUint32(12,this.h3),R.setUint32(16,this.h4),R.setUint32(20,this.h5),R.setUint32(24,this.h6),this.is224||R.setUint32(28,this.h7),b};function S(b,R,L){var E,M=typeof b;if(M==="string"){var $=[],k=b.length,_=0,w;for(E=0;E<k;++E)w=b.charCodeAt(E),w<128?$[_++]=w:w<2048?($[_++]=192|w>>6,$[_++]=128|w&63):w<55296||w>=57344?($[_++]=224|w>>12,$[_++]=128|w>>6&63,$[_++]=128|w&63):(w=65536+((w&1023)<<10|b.charCodeAt(++E)&1023),$[_++]=240|w>>18,$[_++]=128|w>>12&63,$[_++]=128|w>>6&63,$[_++]=128|w&63);b=$}else if(M==="object"){if(b===null)throw new Error(t);if(g&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!Array.isArray(b)&&(!g||!ArrayBuffer.isView(b)))throw new Error(t)}else throw new Error(t);b.length>64&&(b=new A(R,!0).update(b).array());var x=[],T=[];for(E=0;E<64;++E){var O=b[E]||0;x[E]=92^O,T[E]=54^O}A.call(this,R,L),this.update(T),this.oKeyPad=x,this.inner=!0,this.sharedMemory=L}S.prototype=new A,S.prototype.finalize=function(){if(A.prototype.finalize.call(this),this.inner){this.inner=!1;var b=this.array();A.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(b),A.prototype.finalize.call(this)}};var C=d();C.sha256=C,C.sha224=d(!0),C.sha256.hmac=y(),C.sha224.hmac=y(!0),h?e.exports=C:(r.sha256=C.sha256,r.sha224=C.sha224)})()})(ap);var o2=ap.exports,s2=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},Ll={},a2=Object.prototype.hasOwnProperty,l2;function Au(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function ku(e){try{return encodeURIComponent(e)}catch{return null}}function c2(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var f=Au(r[1]),u=Au(r[2]);f===null||u===null||f in n||(n[f]=u)}return n}function u2(e,t){t=t||"";var n=[],r,f;typeof t!="string"&&(t="?");for(f in e)if(a2.call(e,f)){if(r=e[f],!r&&(r===null||r===l2||isNaN(r))&&(r=""),f=ku(f),r=ku(r),f===null||r===null)continue;n.push(f+"="+r)}return n.length?t+n.join("&"):""}Ll.stringify=u2;Ll.parse=c2;var lp=s2,as=Ll,h2=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,cp=/[\n\r\t]/g,f2=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,up=/:\d+$/,d2=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,p2=/^[a-zA-Z]:/;function Ml(e){return(e||"").toString().replace(h2,"")}var ka=[["#","hash"],["?","query"],function(t,n){return Ht(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Eu={hash:1,query:1};function hp(e){var t;typeof window<"u"?t=window:typeof Ln<"u"?t=Ln:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},f=typeof e,u;if(e.protocol==="blob:")r=new zt(unescape(e.pathname),{});else if(f==="string"){r=new zt(e,{});for(u in Eu)delete r[u]}else if(f==="object"){for(u in e)u in Eu||(r[u]=e[u]);r.slashes===void 0&&(r.slashes=f2.test(e.href))}return r}function Ht(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function fp(e,t){e=Ml(e),e=e.replace(cp,""),t=t||{};var n=d2.exec(e),r=n[1]?n[1].toLowerCase():"",f=!!n[2],u=!!n[3],h=0,g;return f?u?(g=n[2]+n[3]+n[4],h=n[2].length+n[3].length):(g=n[2]+n[4],h=n[2].length):u?(g=n[3]+n[4],h=n[3].length):g=n[4],r==="file:"?h>=2&&(g=g.slice(2)):Ht(r)?g=n[4]:r?f&&(g=g.slice(2)):h>=2&&Ht(t.protocol)&&(g=n[4]),{protocol:r,slashes:f||Ht(r),slashesCount:h,rest:g}}function g2(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,f=n[r-1],u=!1,h=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),h++):h&&(r===0&&(u=!0),n.splice(r,1),h--);return u&&n.unshift(""),(f==="."||f==="..")&&n.push(""),n.join("/")}function zt(e,t,n){if(e=Ml(e),e=e.replace(cp,""),!(this instanceof zt))return new zt(e,t,n);var r,f,u,h,g,s,p=ka.slice(),o=typeof t,i=this,a=0;for(o!=="object"&&o!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=as.parse),t=hp(t),f=fp(e||"",t),r=!f.protocol&&!f.slashes,i.slashes=f.slashes||r&&t.slashes,i.protocol=f.protocol||t.protocol||"",e=f.rest,(f.protocol==="file:"&&(f.slashesCount!==2||p2.test(e))||!f.slashes&&(f.protocol||f.slashesCount<2||!Ht(i.protocol)))&&(p[3]=[/(.*)/,"pathname"]);a<p.length;a++){if(h=p[a],typeof h=="function"){e=h(e,i);continue}u=h[0],s=h[1],u!==u?i[s]=e:typeof u=="string"?(g=u==="@"?e.lastIndexOf(u):e.indexOf(u),~g&&(typeof h[2]=="number"?(i[s]=e.slice(0,g),e=e.slice(g+h[2])):(i[s]=e.slice(g),e=e.slice(0,g)))):(g=u.exec(e))&&(i[s]=g[1],e=e.slice(0,g.index)),i[s]=i[s]||r&&h[3]&&t[s]||"",h[4]&&(i[s]=i[s].toLowerCase())}n&&(i.query=n(i.query)),r&&t.slashes&&i.pathname.charAt(0)!=="/"&&(i.pathname!==""||t.pathname!=="")&&(i.pathname=g2(i.pathname,t.pathname)),i.pathname.charAt(0)!=="/"&&Ht(i.protocol)&&(i.pathname="/"+i.pathname),lp(i.port,i.protocol)||(i.host=i.hostname,i.port=""),i.username=i.password="",i.auth&&(g=i.auth.indexOf(":"),~g?(i.username=i.auth.slice(0,g),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=i.auth.slice(g+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(i.auth)),i.auth=i.password?i.username+":"+i.password:i.username),i.origin=i.protocol!=="file:"&&Ht(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString()}function m2(e,t,n){var r=this;switch(e){case"query":typeof t=="string"&&t.length&&(t=(n||as.parse)(t)),r[e]=t;break;case"port":r[e]=t,lp(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,up.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var f=e==="pathname"?"/":"#";r[e]=t.charAt(0)!==f?f+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var u=t.indexOf(":");~u?(r.username=t.slice(0,u),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(u+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var h=0;h<ka.length;h++){var g=ka[h];g[4]&&(r[g[1]]=r[g[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin=r.protocol!=="file:"&&Ht(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function v2(e){(!e||typeof e!="function")&&(e=as.stringify);var t,n=this,r=n.host,f=n.protocol;f&&f.charAt(f.length-1)!==":"&&(f+=":");var u=f+(n.protocol&&n.slashes||Ht(n.protocol)?"//":"");return n.username?(u+=n.username,n.password&&(u+=":"+n.password),u+="@"):n.password?(u+=":"+n.password,u+="@"):n.protocol!=="file:"&&Ht(n.protocol)&&!r&&n.pathname!=="/"&&(u+="@"),(r[r.length-1]===":"||up.test(n.hostname)&&!n.port)&&(r+=":"),u+=r+n.pathname,t=typeof n.query=="object"?e(n.query):n.query,t&&(u+=t.charAt(0)!=="?"?"?"+t:t),n.hash&&(u+=n.hash),u}zt.prototype={set:m2,toString:v2};zt.extractProtocol=fp;zt.location=hp;zt.trimLeft=Ml;zt.qs=as;var y2=zt;const b2=nr(y2);class ls extends Et{constructor(){super();Te(this,"baseURL");Te(this,"name");Te(this,"type");this.name="VirusTotal",this.baseURL="https://www.virustotal.com",this.type="domain"}}class w2 extends ls{constructor(){super(),this.type="domain"}href(t){return this.baseURL+`/gui/domain/${t}/detection`}}class $2 extends ls{constructor(){super(),this.type="ip"}href(t){return this.baseURL+`/gui/ip-address/${t}/details`}}class _2 extends ls{constructor(){super(),this.type="url"}href(t){const n=o2.sha256(this.normalizeURL(t));return this.baseURL+`/gui/url/${n}/details`}normalizeURL(t){return new b2(t).pathname==="/"&&!t.endsWith("/")?`${t}/`:t}}class S2 extends ls{constructor(){super(),this.type="hash"}href(t){return this.baseURL+`/gui/file/${t}/details`}}const C2=[new UA,new zA,new VA,new GA,new jA,new KA,new YA,new XA,new ZA,new op,new qA,new JA,new QA,new e2,new t2,new n2,new w2,new S2,new $2,new _2],A2=be({name:"LinksItem",components:{LinkComponent:HA},props:{data:{type:String,required:!0},type:{type:String,required:!0}},setup(e){return{selectedLinks:ke(()=>C2.filter(n=>n.type===e.type))}}}),k2={class:"tags are-medium"};function E2(e,t,n,r,f,u){const h=oe("LinkComponent");return Z(),ie("div",k2,[(Z(!0),ie(Re,null,$t(e.selectedLinks,g=>(Z(),_e(h,{data:e.data,link:g,key:g.name},null,8,["data","link"]))),128))])}const R2=Se(A2,[["render",E2]]),x2=be({name:"MessageItem",props:{message:{type:Object,required:!0},disposable:{type:Boolean,default:!1}},emits:["dispose"],setup(e,t){return{dispose:()=>{t.emit("dispose")}}}}),T2={class:"notification is-info is-light"};function L2(e,t,n,r,f,u){return Z(),ie("div",T2,[e.disposable?(Z(),ie("button",{key:0,class:"delete",onClick:t[0]||(t[0]=(...h)=>e.dispose&&e.dispose(...h))})):de("",!0),N("p",null,ye(e.message.message),1)])}const cs=Se(x2,[["render",L2]]),M2=be({name:"ArtifactDetail",props:{artifact:{type:Object,required:!0}},components:{AS:KC,DnsRecords:iA,Links:R2,ReverseDnsNames:fA,Tags:mA,ActionButtons:ip,WhoisRecord:NA,CPEs:qC,Ports:lA,ErrorMessage:lt,Message:cs},emits:["refresh","delete"],setup(e,t){const n=Fe(),r=Fe(),f=Fe(),u=Fe(),h=d=>{f.value=d},g=()=>{f.value=void 0},s=()=>{t.emit("delete")},p=d=>{d.queued?u.value=d:t.emit("refresh")},o=()=>{u.value=void 0},i=ke(()=>{if(e.artifact.dataType==="domain")return`https://urlscan.io/liveshot/?url=${`http://${e.artifact.data}`}`;if(e.artifact.dataType==="url")return`https://urlscan.io/liveshot/?url=${e.artifact.data}`}),a=d=>{if(d)return`https://maps.google.co.jp/maps?output=embed&q=${d.lat},${d.long}&z=3`},c=w$(),l=ki();return Ye(async()=>{if(e.artifact.dataType==="ip"){let d;if(e.artifact.geolocation)d=tp(e.artifact.geolocation.countryCode);else{const m=await c.perform(e.artifact.data);d=p_(m),r.value=m.countryCode}n.value=a(d)}}),{countryCode:r,getAlertsTask:l,googleMapSrc:n,truncate:Ei,urlscanLiveshotSrc:i,onDelete:s,onSetError:h,error:f,onDisposeError:g,message:u,onDisposeMessage:o,onSetMessage:p}}}),mt=e=>(Ho("data-v-2e8dd078"),e=e(),Uo(),e),O2={class:"block"},I2={class:"is-size-2"},F2={class:"is-clearfix"},N2={class:"columns"},D2={key:0,class:"column is-half"},P2={key:0},B2={class:"is-size-4"},W2={class:"has-text-grey"},H2=["src"],U2={key:1},z2=mt(()=>N("h4",{class:"is-size-4"},"Live screenshot",-1)),V2=mt(()=>N("p",{class:"help"},"Hover to expand",-1)),j2=["src"],G2={class:"column"},K2=mt(()=>N("h4",{class:"is-size-4"},"Information",-1)),Y2={class:"table is-fullwidth is-completely-borderless"},X2=mt(()=>N("th",null,"Data",-1)),Z2=mt(()=>N("th",null,"Data type",-1)),q2=mt(()=>N("th",null,"Source",-1)),J2=mt(()=>N("th",null,"Query",-1)),Q2={key:0},ek=mt(()=>N("th",null,"Tags",-1)),tk={class:"help"},nk={class:"block"},rk={key:0,class:"block"},ik=mt(()=>N("h4",{class:"is-size-4 mb-2"},"AS",-1)),ok={key:1,class:"block"},sk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Reverse DNS",-1)),ak={key:2,class:"block"},lk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"DNS records",-1)),ck={key:3,class:"block"},uk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"CPEs",-1)),hk={key:4,class:"block"},fk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Ports",-1)),dk={key:5,class:"block"},pk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Whois record",-1)),gk={class:"block"},mk=mt(()=>N("h4",{class:"is-size-4 mb-2"},"Links",-1));function vk(e,t,n,r,f,u){var v;const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("Tags"),o=oe("AS"),i=oe("ReverseDnsNames"),a=oe("DnsRecords"),c=oe("CPEs"),l=oe("Ports"),d=oe("WhoisRecord"),m=oe("Links");return Z(),ie(Re,null,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",O2,[N("h2",I2,ye(e.artifact.id),1),N("p",F2,[ae(s,{artifact:e.artifact,onDelete:e.onDelete,onSetError:e.onSetError,onSetMessage:e.onSetMessage},null,8,["artifact","onDelete","onSetError","onSetMessage"])])]),N("div",N2,[e.googleMapSrc||e.urlscanLiveshotSrc?(Z(),ie("div",D2,[e.googleMapSrc?(Z(),ie("div",P2,[N("h4",B2,[Qe(" Geolocation "),N("span",W2,ye(e.countryCode||((v=e.artifact.geolocation)==null?void 0:v.countryCode)),1)]),N("iframe",{class:"mb-4",src:e.googleMapSrc,width:"100%",height:"240px"},null,8,H2)])):de("",!0),e.urlscanLiveshotSrc?(Z(),ie("div",U2,[z2,V2,N("img",{src:e.urlscanLiveshotSrc,class:"liveshot",alt:"liveshot"},null,8,j2)])):de("",!0)])):de("",!0),N("div",G2,[K2,N("table",Y2,[N("tr",null,[X2,N("td",null,ye(e.truncate(e.artifact.data,64)),1)]),N("tr",null,[Z2,N("td",null,ye(e.artifact.dataType),1)]),N("tr",null,[q2,N("td",null,ye(e.artifact.source),1)]),N("tr",null,[J2,N("td",null,ye(e.truncate(e.artifact.query||"N/A",64)),1)]),e.artifact.tags.length>0?(Z(),ie("tr",Q2,[ek,N("td",null,[ae(p,{tags:e.artifact.tags},null,8,["tags"])])])):de("",!0)]),N("p",tk,"Created at: "+ye(e.artifact.createdAt),1)])]),N("div",nk,[e.artifact.autonomousSystem?(Z(),ie("div",rk,[ik,ae(o,{autonomousSystem:e.artifact.autonomousSystem},null,8,["autonomousSystem"])])):de("",!0),e.artifact.reverseDnsNames?(Z(),ie("div",ok,[sk,ae(i,{reverseDnsNames:e.artifact.reverseDnsNames},null,8,["reverseDnsNames"])])):de("",!0),e.artifact.dnsRecords?(Z(),ie("div",ak,[lk,ae(a,{dnsRecords:e.artifact.dnsRecords},null,8,["dnsRecords"])])):de("",!0),e.artifact.cpes?(Z(),ie("div",ck,[uk,ae(c,{cpes:e.artifact.cpes},null,8,["cpes"])])):de("",!0),e.artifact.ports?(Z(),ie("div",hk,[fk,ae(l,{ports:e.artifact.ports},null,8,["ports"])])):de("",!0),e.artifact.whoisRecord?(Z(),ie("div",dk,[pk,ae(d,{whoisRecord:e.artifact.whoisRecord},null,8,["whoisRecord"])])):de("",!0),N("div",gk,[mk,ae(m,{data:e.artifact.data,type:e.artifact.dataType},null,8,["data","type"])])])],64)}const yk=Se(M2,[["render",vk],["__scopeId","data-v-2e8dd078"]]),bk=be({name:"ArtifactDetailWrapper",components:{Artifact:yk,Loading:ln,ErrorMessage:lt},props:{id:{type:Number,required:!0}},setup(e){const t=v$(),n=Tr(),r=async()=>{await t.perform(e.id)},f=async()=>{await r()},u=async()=>{n.push("/")};return Ye(async()=>{await r()}),qe(e,async()=>{await r()}),{getArtifactTask:t,onRefresh:f,onDelete:u}}});function wk(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Artifact");return Z(),ie(Re,null,[e.getArtifactTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getArtifactTask.isError?(Z(),_e(g,{key:1,error:(p=e.getArtifactTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getArtifactTask.last)!=null&&o.value?(Z(),_e(s,{key:2,artifact:e.getArtifactTask.last.value,onRefresh:e.onRefresh,onDelete:e.onDelete},null,8,["artifact","onRefresh","onDelete"])):de("",!0)],64)}const $k=Se(bk,[["render",wk]]),_k=be({name:"ArtifactView",components:{Artifact:$k},props:{id:{type:String,required:!0}},setup(e){const t=()=>{an(`Artifact:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function Sk(e,t,n,r,f,u){const h=oe("Artifact",!0);return Z(),_e(h,{id:parseInt(e.id)},null,8,["id"])}const Ck=Se(_k,[["render",Sk]]),Ak=be({name:"ArtifactsItem",props:{artifact:{type:Object,required:!0}},components:{ErrorMessage:lt,ActionButtons:ip,Message:cs},emits:["delete"],setup(e,t){const n=Fe(),r=Fe();return{onSetError:p=>{n.value=p},onDisposeError:()=>{n.value=void 0},onDelete:()=>{t.emit("delete")},error:n,truncate:Ei,message:r,onSetMessage:p=>{p.queued&&(r.value=p)},onDisposeMessage:()=>{r.value=void 0}}}}),kk={class:"box"},Ek={class:"block"},Rk={class:"table is-fullwidth is-completely-borderless"},xk=N("th",null,"Data",-1),Tk=N("th",null,"Data Type",-1),Lk=N("th",null,"Source",-1),Mk=N("th",null,"Query",-1),Ok=N("p",{class:"block is-clearfix"},null,-1),Ik={class:"help"};function Fk(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("router-link");return Z(),ie("div",kk,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",Ek,[N("p",null,[ae(s,{artifact:e.artifact,onDelete:e.onDelete,onSetError:e.onSetError,onSetMessage:e.onSetMessage},null,8,["artifact","onDelete","onSetError","onSetMessage"])]),ae(p,{class:"is-size-4",to:{name:"Artifact",params:{id:e.artifact.id}}},{default:Je(()=>[Qe(ye(e.artifact.id),1)]),_:1},8,["to"])]),N("table",Rk,[N("tr",null,[xk,N("td",null,ye(e.artifact.data),1)]),N("tr",null,[Tk,N("td",null,ye(e.artifact.dataType),1)]),N("tr",null,[Lk,N("td",null,ye(e.artifact.source),1)]),N("tr",null,[Mk,N("td",null,ye(e.truncate(e.artifact.query||"N/A",64)),1)])]),Ok,N("p",Ik,"Created at: "+ye(e.artifact.createdAt),1)])}const Nk=Se(Ak,[["render",Fk]]),Dk=be({name:"ArtifactsItem",props:{artifacts:{type:Object,required:!0}},components:{Artifact:Nk,Pagination:xl},emits:["update-page","refresh"],setup(e,t){const n=ke(()=>e.artifacts.results.length>0);return{onUpdatePage:u=>{t.emit("update-page",u)},onDelete:()=>{t.emit("refresh")},hasArtifacts:n}}}),Pk={key:0},Bk={class:"help"},Wk={key:1},Hk=N("div",{class:"notification is-warning is-light"},"There is no artifact to show",-1),Uk=[Hk];function zk(e,t,n,r,f,u){const h=oe("Artifact"),g=oe("Pagination");return e.hasArtifacts?(Z(),ie("div",Pk,[(Z(!0),ie(Re,null,$t(e.artifacts.results,s=>(Z(),_e(h,{artifact:s,key:s.id,onDelete:e.onDelete},null,8,["artifact","onDelete"]))),128)),ae(g,{total:e.artifacts.total,currentPage:e.artifacts.currentPage,pageSize:e.artifacts.pageSize,onUpdatePage:e.onUpdatePage},null,8,["total","currentPage","pageSize","onUpdatePage"]),N("p",Bk," ("+ye(e.artifacts.total)+" results in total, "+ye(e.artifacts.results.length)+" shown) ",1)])):(Z(),ie("div",Wk,Uk))}const Vk=Se(Dk,[["render",zk]]),jk=be({name:"ArtifactsWrapper",components:{Artifacts:Vk,Loading:ln,ErrorMessage:lt},setup(){const e=$r("page","1"),t=$r("q",""),n=Fe(!1),r=El(),f=async()=>{const p={q:t.value,page:parseInt(e.value)};return await r.perform(p)},u=p=>{console.log(p),e.value=p.toString()},h=async()=>{e.value="1",await f()},g=h,s=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getArtifactsTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:s,onUpdatePage:u,onRefresh:g}}}),Gk={class:"block"},Kk={class:"field has-addons"},Yk={class:"control is-expanded"},Xk={class:"control"},Zk={class:"icon is-small"},qk=N("span",null,"Search",-1),Jk={class:"control"},Qk={class:"icon is-small"},eE=N("span",null,"Help",-1),tE={key:0,class:"content mt-3"},nE=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li><code>id</code>, <code>data</code>, <code>data_type</code>, <code>source</code>, <code>query</code>, <code>tag</code>, <code>rule.id</code>, <code>rule.title</code>, <code>rule.description</code>, <code>tag</code>,<code>created_at</code>, <code>asn</code>, <code>country_code</code>, <code>dns_record.value</code>, <code>dns_record.resource</code>, <code>reverse_dns_name</code>, <code>cpe</code> and <code>port</code>. </li></ul>',2),rE=[nE],iE={key:0,class:"block"};function oE(e,t,n,r,f,u){var o,i;const h=oe("font-awesome-icon"),g=oe("Loading"),s=oe("ErrorMessage"),p=oe("Artifacts");return Z(),ie(Re,null,[N("div",Gk,[N("div",Kk,[N("p",Yk,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=a=>e.q=a)},null,512),[[Zn,e.q]])]),N("p",Xk,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...a)=>e.search&&e.search(...a))},[N("span",Zk,[ae(h,{icon:"search"})]),qk])]),N("p",Jk,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...a)=>e.toggleShowHelp&&e.toggleShowHelp(...a))},[N("span",Qk,[ae(h,{icon:"question"})]),eE])])]),e.showHelp?(Z(),ie("div",tE,rE)):de("",!0)]),e.getArtifactsTask.performCount>0?(Z(),ie("div",iE,[e.getArtifactsTask.isRunning?(Z(),_e(g,{key:0})):de("",!0),e.getArtifactsTask.isError?(Z(),_e(s,{key:1,error:(o=e.getArtifactsTask.last)==null?void 0:o.error},null,8,["error"])):de("",!0),(i=e.getArtifactsTask.last)!=null&&i.value?(Z(),_e(p,{key:2,artifacts:e.getArtifactsTask.last.value,onUpdatePage:e.onUpdatePage,onRefresh:e.onRefresh},null,8,["artifacts","onUpdatePage","onRefresh"])):de("",!0)])):de("",!0)],64)}const sE=Se(jk,[["render",oE]]),aE=be({name:"ArtifactsView",components:{Artifacts:sE},setup(){const e=()=>{an("Artifacts - Mihari")};Ye(()=>{e()})}});function lE(e,t,n,r,f,u){const h=oe("Artifacts",!0);return Z(),_e(h)}const cE=Se(aE,[["render",lE]]),uE=be({name:"ConfigsItem",props:{configs:{type:Array,required:!0}}}),hE={class:"box"},fE={class:"table-container"},dE={class:"table is-fullwidth"},pE=N("thead",null,[N("tr",null,[N("th",null,"Name"),N("th",null,"Type"),N("th",null,"Configured?"),N("th",null,"Items")])],-1),gE={key:0,class:"button is-success is-small ml-1"},mE={class:"icon is-small"},vE=N("span",null,"Yes",-1),yE={key:1,class:"button is-warning is-small ml-1"},bE={class:"icon is-small"},wE=N("span",null,"No",-1),$E={class:"field is-grouped is-grouped-multiline"},_E={class:"tags has-addons"},SE={class:"tag is-dark"};function CE(e,t,n,r,f,u){const h=oe("font-awesome-icon");return Z(),ie("div",hE,[N("div",fE,[N("table",dE,[pE,N("tbody",null,[(Z(!0),ie(Re,null,$t(e.configs,g=>(Z(),ie("tr",{key:g.name},[N("td",null,ye(g.name),1),N("td",null,ye(g.type),1),N("td",null,[g.configured?(Z(),ie("button",gE,[N("span",mE,[ae(h,{icon:"check"})]),vE])):(Z(),ie("button",yE,[N("span",bE,[ae(h,{icon:"exclamation"})]),wE]))]),N("td",null,[N("div",$E,[(Z(!0),ie(Re,null,$t(g.items,(s,p)=>(Z(),ie("div",{class:"control",key:p},[N("div",_E,[N("span",SE,ye(s.key),1),N("span",{class:kr(["tag",{"is-success":s.value,"is-warning":!s.value}])},ye(s.value||"N/A"),3)])]))),128))])])]))),128))])])])])}const AE=Se(uE,[["render",CE]]),kE=be({name:"ConfigsWrapper",components:{Configs:AE,Loading:ln,ErrorMessage:lt},setup(){const e=b$();return Ye(async()=>{await e.perform()}),{getConfigsTask:e}}});function EE(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Configs");return Z(),ie(Re,null,[e.getConfigsTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getConfigsTask.isError?(Z(),_e(g,{key:1,error:(p=e.getConfigsTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getConfigsTask.last)!=null&&o.value?(Z(),_e(s,{key:2,configs:e.getConfigsTask.last.value},null,8,["configs"])):de("",!0)],64)}const RE=Se(kE,[["render",EE]]),xE=be({name:"ConfigView",components:{Configs:RE},setup(){an("Configuration - Mihari")}});function TE(e,t,n,r,f,u){const h=oe("Configs");return Z(),_e(h)}const LE=Se(xE,[["render",TE]]);var dp={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var f=function(o,i,a){if(typeof o!="string"){f.original?f.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(a=i),f.modules[o]||(f.payloads[o]=a,f.modules[o]=null)};f.modules={},f.payloads={};var u=function(o,i,a){if(typeof i=="string"){var c=s(o,i);if(c!=null)return a&&a(),c}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var l=[],d=0,m=i.length;d<m;++d){var v=s(o,i[d]);if(v==null&&h.original)return;l.push(v)}return a&&a.apply(null,l)||!0}},h=function(o,i){var a=u("",o,i);return a==null&&h.original?h.original.apply(this,arguments):a},g=function(o,i){if(i.indexOf("!")!==-1){var a=i.split("!");return g(o,a[0])+"!"+g(o,a[1])}if(i.charAt(0)=="."){var c=o.split("/").slice(0,-1).join("/");for(i=c+"/"+i;i.indexOf(".")!==-1&&l!=i;){var l=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},s=function(o,i){i=g(o,i);var a=f.modules[i];if(!a){if(a=f.payloads[i],typeof a=="function"){var c={},l={id:i,uri:"",exports:c,packaged:!0},d=function(v,y){return u(i,v,y)},m=a(d,c,l);c=m||l.exports,f.modules[i]=c,delete f.payloads[i]}a=f.modules[i]=c||a}return a};function p(o){var i=r;o&&(r[o]||(r[o]={}),i=r[o]),(!i.define||!i.define.packaged)&&(f.original=i.define,i.define=f,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(h.original=i.require,i.require=h,i.require.packaged=!0)}p(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,f){function u(h,g,s){Object.defineProperty(h,g,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||u(String.prototype,"startsWith",function(h,g){return g=g||0,this.lastIndexOf(h,g)===g}),String.prototype.endsWith||u(String.prototype,"endsWith",function(h,g){var s=this;(g===void 0||g>s.length)&&(g=s.length),g-=h.length;var p=s.indexOf(h,g);return p!==-1&&p===g}),String.prototype.repeat||u(String.prototype,"repeat",function(h){for(var g="",s=this;h>0;)h&1&&(g+=s),(h>>=1)&&(s+=s);return g}),String.prototype.includes||u(String.prototype,"includes",function(h,g){return this.indexOf(h,g)!=-1}),Object.assign||(Object.assign=function(h){if(h==null)throw new TypeError("Cannot convert undefined or null to object");for(var g=Object(h),s=1;s<arguments.length;s++){var p=arguments[s];p!=null&&Object.keys(p).forEach(function(o){g[o]=p[o]})}return g}),Object.values||(Object.values=function(h){return Object.keys(h).map(function(g){return h[g]})}),Array.prototype.find||u(Array.prototype,"find",function(h){for(var g=this.length,s=arguments[1],p=0;p<g;p++){var o=this[p];if(h.call(s,o,p,this))return o}}),Array.prototype.findIndex||u(Array.prototype,"findIndex",function(h){for(var g=this.length,s=arguments[1],p=0;p<g;p++){var o=this[p];if(h.call(s,o,p,this))return p}}),Array.prototype.includes||u(Array.prototype,"includes",function(h,g){return this.indexOf(h,g)!=-1}),Array.prototype.fill||u(Array.prototype,"fill",function(h){for(var g=this,s=g.length>>>0,p=arguments[1],o=p>>0,i=o<0?Math.max(s+o,0):Math.min(o,s),a=arguments[2],c=a===void 0?s:a>>0,l=c<0?Math.max(s+c,0):Math.min(c,s);i<l;)g[i]=h,i++;return g}),Array.of||u(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,f){n("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(n,r,f){r.deepCopy=function u(h){if(typeof h!="object"||!h)return h;var g;if(Array.isArray(h)){g=[];for(var s=0;s<h.length;s++)g[s]=u(h[s]);return g}if(Object.prototype.toString.call(h)!=="[object Object]")return h;g={};for(var s in h)g[s]=u(h[s]);return g}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){r.last=function(g){return g[g.length-1]},r.stringReverse=function(g){return g.split("").reverse().join("")},r.stringRepeat=function(g,s){for(var p="";s>0;)s&1&&(p+=g),(s>>=1)&&(g+=g);return p};var u=/^\s\s*/,h=/\s\s*$/;r.stringTrimLeft=function(g){return g.replace(u,"")},r.stringTrimRight=function(g){return g.replace(h,"")},r.copyObject=function(g){var s={};for(var p in g)s[p]=g[p];return s},r.copyArray=function(g){for(var s=[],p=0,o=g.length;p<o;p++)g[p]&&typeof g[p]=="object"?s[p]=this.copyObject(g[p]):s[p]=g[p];return s},r.deepCopy=n("./deep_copy").deepCopy,r.arrayToMap=function(g){for(var s={},p=0;p<g.length;p++)s[g[p]]=1;return s},r.createMap=function(g){var s=Object.create(null);for(var p in g)s[p]=g[p];return s},r.arrayRemove=function(g,s){for(var p=0;p<=g.length;p++)s===g[p]&&g.splice(p,1)},r.escapeRegExp=function(g){return g.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(g){return(""+g).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},r.getMatchOffsets=function(g,s){var p=[];return g.replace(s,function(o){p.push({offset:arguments[arguments.length-2],length:o.length})}),p},r.deferredCall=function(g){var s=null,p=function(){s=null,g()},o=function(i){return o.cancel(),s=setTimeout(p,i||0),o};return o.schedule=o,o.call=function(){return this.cancel(),g(),o},o.cancel=function(){return clearTimeout(s),s=null,o},o.isPending=function(){return s},o},r.delayedCall=function(g,s){var p=null,o=function(){p=null,g()},i=function(a){p==null&&(p=setTimeout(o,a||s))};return i.delay=function(a){p&&clearTimeout(p),p=setTimeout(o,a||s)},i.schedule=i,i.call=function(){this.cancel(),g()},i.cancel=function(){p&&clearTimeout(p),p=null},i.isPending=function(){return p},i},r.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},r.skipEmptyMatch=function(g,s,p){return p&&g.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,f){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 u=typeof navigator=="object"?navigator:{},h=(/mac|win|linux/i.exec(u.platform)||["other"])[0].toLowerCase(),g=u.userAgent||"",s=u.appName||"";r.isWin=h=="win",r.isMac=h=="mac",r.isLinux=h=="linux",r.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((g.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((g.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=g.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(g.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(g.split(" Chrome/")[1])||void 0,r.isSafari=parseFloat(g.split(" Safari/")[1])&&!r.isChrome||void 0,r.isEdge=parseFloat(g.split(" Edge/")[1])||void 0,r.isAIR=g.indexOf("AdobeAIR")>=0,r.isAndroid=g.indexOf("Android")>=0,r.isChromeOS=g.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(g)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,f){var u=n("./useragent"),h="http://www.w3.org/1999/xhtml";r.buildDom=function a(c,l,d){if(typeof c=="string"&&c){var m=document.createTextNode(c);return l&&l.appendChild(m),m}if(!Array.isArray(c))return c&&c.appendChild&&l&&l.appendChild(c),c;if(typeof c[0]!="string"||!c[0]){for(var v=[],y=0;y<c.length;y++){var A=a(c[y],l,d);A&&v.push(A)}return v}var S=document.createElement(c[0]),C=c[1],b=1;C&&typeof C=="object"&&!Array.isArray(C)&&(b=2);for(var y=b;y<c.length;y++)a(c[y],S,d);return b==2&&Object.keys(C).forEach(function(R){var L=C[R];R==="class"?S.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||R=="value"||R[0]=="$"?S[R]=L:R==="ref"?d&&(d[L]=S):R==="style"?typeof L=="string"&&(S.style.cssText=L):L!=null&&S.setAttribute(R,L)}),l&&l.appendChild(S),S},r.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},r.createElement=function(a,c){return document.createElementNS?document.createElementNS(c||h,a):document.createElement(a)},r.removeChildren=function(a){a.innerHTML=""},r.createTextNode=function(a,c){var l=c?c.ownerDocument:document;return l.createTextNode(a)},r.createFragment=function(a){var c=a?a.ownerDocument:document;return c.createDocumentFragment()},r.hasCssClass=function(a,c){var l=(a.className+"").split(/\s+/g);return l.indexOf(c)!==-1},r.addCssClass=function(a,c){r.hasCssClass(a,c)||(a.className+=" "+c)},r.removeCssClass=function(a,c){for(var l=a.className.split(/\s+/g);;){var d=l.indexOf(c);if(d==-1)break;l.splice(d,1)}a.className=l.join(" ")},r.toggleCssClass=function(a,c){for(var l=a.className.split(/\s+/g),d=!0;;){var m=l.indexOf(c);if(m==-1)break;d=!1,l.splice(m,1)}return d&&l.push(c),a.className=l.join(" "),d},r.setCssClass=function(a,c,l){l?r.addCssClass(a,c):r.removeCssClass(a,c)},r.hasCssString=function(a,c){var l=0,d;if(c=c||document,d=c.querySelectorAll("style")){for(;l<d.length;)if(d[l++].id===a)return!0}},r.removeElementById=function(a,c){c=c||document,c.getElementById(a)&&c.getElementById(a).remove()};var g,s=[];r.useStrictCSP=function(a){g=a,a==!1?p():s||(s=[])};function p(){var a=s;s=null,a&&a.forEach(function(c){o(c[0],c[1])})}function o(a,c,l){if(!(typeof document>"u")){if(s){if(l)p();else if(l===!1)return s.push([a,c])}if(!g){var d=l;!l||!l.getRootNode?d=document:(d=l.getRootNode(),(!d||d==l)&&(d=document));var m=d.ownerDocument||d;if(c&&r.hasCssString(c,d))return null;c&&(a+=`
|
789
789
|
/*# sourceURL=ace/css/`+c+" */");var v=r.createElement("style");v.appendChild(m.createTextNode(a)),c&&(v.id=c),d==m&&(d=r.getDocumentHead(m)),d.insertBefore(v,d.firstChild)}}}if(r.importCssString=o,r.importCssStylsheet=function(a,c){r.buildDom(["link",{rel:"stylesheet",href:a}],r.getDocumentHead(c))},r.scrollbarWidth=function(a){var c=r.createElement("ace_inner");c.style.width="100%",c.style.minWidth="0px",c.style.height="200px",c.style.display="block";var l=r.createElement("ace_outer"),d=l.style;d.position="absolute",d.left="-10000px",d.overflow="hidden",d.width="200px",d.minWidth="0px",d.height="150px",d.display="block",l.appendChild(c);var m=a&&a.documentElement||document&&document.documentElement;if(!m)return 0;m.appendChild(l);var v=c.offsetWidth;d.overflow="scroll";var y=c.offsetWidth;return v===y&&(y=l.clientWidth),m.removeChild(l),v-y},r.computedStyle=function(a,c){return window.getComputedStyle(a,"")||{}},r.setStyle=function(a,c,l){a[c]!==l&&(a[c]=l)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=u.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,u.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");r.HI_DPI&&i.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!u.isEdge&&typeof i.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),i=null}r.HAS_CSS_TRANSFORMS?r.translate=function(a,c,l){a.style.transform="translate("+Math.round(c)+"px, "+Math.round(l)+"px)"}:r.translate=function(a,c,l){a.style.top=Math.round(l)+"px",a.style.left=Math.round(c)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,f){/*
|
790
790
|
* based on code from:
|
791
791
|
*
|
@@ -950,7 +950,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
950
950
|
.ace-tm .ace_indent-guide-active {
|
951
951
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
952
952
|
}
|
953
|
-
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var u=n("../lib/dom");u.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,f){"no use strict";var u=n("./lib/lang"),h=n("./lib/net"),g=n("./lib/dom"),s=n("./lib/app_config").AppConfig;f.exports=r=new s;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!p.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return p[c]},r.set=function(c,l){if(p.hasOwnProperty(c))p[c]=l;else if(this.setDefaultValue("",c,l)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&g.useStrictCSP(l)},r.all=function(){return u.copyObject(p)},r.$modes={},r.moduleUrl=function(c,l){if(p.$moduleUrls[c])return p.$moduleUrls[c];var d=c.split("/");l=l||d[d.length-2]||"";var m=l=="snippets"?"/":"-",v=d[d.length-1];if(l=="worker"&&m=="-"){var y=new RegExp("^"+l+"[\\-_]|[\\-_]"+l+"$","g");v=v.replace(y,"")}(!v||v==l)&&d.length>1&&(v=d[d.length-2]);var A=p[l+"Path"];return A==null?A=p.basePath:m=="/"&&(l=m=""),A&&A.slice(-1)!="/"&&(A+="/"),A+l+m+v+this.get("suffix")},r.setModuleUrl=function(c,l){return p.$moduleUrls[c]=l};var o=function(c,l){if(c==="ace/theme/textmate"||c==="./theme/textmate")return l(null,n("./theme/textmate"));if(i)return i(c,l);console.error("loader is not configured")},i;r.setLoader=function(c){i=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,l){var d;if(Array.isArray(c))var m=c[0],v=c[1];else if(typeof c=="string")var v=c;var y=function(A){if(A&&!r.$loading[v])return l&&l(A);if(r.$loading[v]||(r.$loading[v]=[]),r.$loading[v].push(l),!(r.$loading[v].length>1)){var S=function(){o(v,function(C,b){b&&(r.$loaded[v]=b),r._emit("load.module",{name:v,module:b});var
|
953
|
+
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(n,r,f){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate-css"),r.$id="ace/theme/textmate";var u=n("../lib/dom");u.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,f){"no use strict";var u=n("./lib/lang"),h=n("./lib/net"),g=n("./lib/dom"),s=n("./lib/app_config").AppConfig;f.exports=r=new s;var p={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(c){if(!p.hasOwnProperty(c))throw new Error("Unknown config key: "+c);return p[c]},r.set=function(c,l){if(p.hasOwnProperty(c))p[c]=l;else if(this.setDefaultValue("",c,l)==!1)throw new Error("Unknown config key: "+c);c=="useStrictCSP"&&g.useStrictCSP(l)},r.all=function(){return u.copyObject(p)},r.$modes={},r.moduleUrl=function(c,l){if(p.$moduleUrls[c])return p.$moduleUrls[c];var d=c.split("/");l=l||d[d.length-2]||"";var m=l=="snippets"?"/":"-",v=d[d.length-1];if(l=="worker"&&m=="-"){var y=new RegExp("^"+l+"[\\-_]|[\\-_]"+l+"$","g");v=v.replace(y,"")}(!v||v==l)&&d.length>1&&(v=d[d.length-2]);var A=p[l+"Path"];return A==null?A=p.basePath:m=="/"&&(l=m=""),A&&A.slice(-1)!="/"&&(A+="/"),A+l+m+v+this.get("suffix")},r.setModuleUrl=function(c,l){return p.$moduleUrls[c]=l};var o=function(c,l){if(c==="ace/theme/textmate"||c==="./theme/textmate")return l(null,n("./theme/textmate"));if(i)return i(c,l);console.error("loader is not configured")},i;r.setLoader=function(c){i=c},r.dynamicModules=Object.create(null),r.$loading={},r.$loaded={},r.loadModule=function(c,l){var d;if(Array.isArray(c))var m=c[0],v=c[1];else if(typeof c=="string")var v=c;var y=function(A){if(A&&!r.$loading[v])return l&&l(A);if(r.$loading[v]||(r.$loading[v]=[]),r.$loading[v].push(l),!(r.$loading[v].length>1)){var S=function(){o(v,function(C,b){b&&(r.$loaded[v]=b),r._emit("load.module",{name:v,module:b});var R=r.$loading[v];r.$loading[v]=null,R.forEach(function(L){L&&L(b)})})};if(!r.get("packaged"))return S();h.loadScript(r.moduleUrl(v,m),S),a()}};if(r.dynamicModules[v])r.dynamicModules[v]().then(function(A){A.default?y(A.default):y(A)});else{try{d=this.$require(v)}catch{}y(d||r.$loaded[v])}},r.$require=function(c){if(typeof f.require=="function"){var l="require";return f[l](c)}},r.setModuleLoader=function(c,l){r.dynamicModules[c]=l};var a=function(){!p.basePath&&!p.workerPath&&!p.modePath&&!p.themePath&&!Object.keys(p.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),a=function(){})};r.version="1.32.3"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,f){n("./lib/fixoldbrowsers");var u=n("./config");u.setLoader(function(p,o){n([p],function(i){o(null,i)})});var h=function(){return this||typeof window<"u"&&window}();f.exports=function(p){u.init=g,u.$require=n,p.require=n},g(!0);function g(p){if(!(!h||!h.document)){u.set("packaged",p||n.packaged||f.packaged||h.define&&(void 0).packaged);var o={},i="",a=document.currentScript||document._currentScript,c=a&&a.ownerDocument||document;a&&a.src&&(i=a.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var l=c.getElementsByTagName("script"),d=0;d<l.length;d++){var m=l[d],v=m.src||m.getAttribute("src");if(v){for(var y=m.attributes,A=0,S=y.length;A<S;A++){var C=y[A];C.name.indexOf("data-ace-")===0&&(o[s(C.name.replace(/^data-ace-/,""))]=C.value)}var b=v.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(i=b[1])}}i&&(o.base=o.base||i,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var R in o)typeof o[R]<"u"&&u.set(R,o[R])}}function s(p){return p.replace(/-(.)/g,function(o,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,f){var u=function(){function h(g,s,p,o){this.start={row:g,column:s},this.end={row:p,column:o}}return h.prototype.isEqual=function(g){return this.start.row===g.start.row&&this.end.row===g.end.row&&this.start.column===g.start.column&&this.end.column===g.end.column},h.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},h.prototype.contains=function(g,s){return this.compare(g,s)==0},h.prototype.compareRange=function(g){var s,p=g.end,o=g.start;return s=this.compare(p.row,p.column),s==1?(s=this.compare(o.row,o.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(o.row,o.column),s==-1?-1:s==1?42:0)},h.prototype.comparePoint=function(g){return this.compare(g.row,g.column)},h.prototype.containsRange=function(g){return this.comparePoint(g.start)==0&&this.comparePoint(g.end)==0},h.prototype.intersects=function(g){var s=this.compareRange(g);return s==-1||s==0||s==1},h.prototype.isEnd=function(g,s){return this.end.row==g&&this.end.column==s},h.prototype.isStart=function(g,s){return this.start.row==g&&this.start.column==s},h.prototype.setStart=function(g,s){typeof g=="object"?(this.start.column=g.column,this.start.row=g.row):(this.start.row=g,this.start.column=s)},h.prototype.setEnd=function(g,s){typeof g=="object"?(this.end.column=g.column,this.end.row=g.row):(this.end.row=g,this.end.column=s)},h.prototype.inside=function(g,s){return this.compare(g,s)==0?!(this.isEnd(g,s)||this.isStart(g,s)):!1},h.prototype.insideStart=function(g,s){return this.compare(g,s)==0?!this.isEnd(g,s):!1},h.prototype.insideEnd=function(g,s){return this.compare(g,s)==0?!this.isStart(g,s):!1},h.prototype.compare=function(g,s){return!this.isMultiLine()&&g===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:g<this.start.row?-1:g>this.end.row?1:this.start.row===g?s>=this.start.column?0:-1:this.end.row===g?s<=this.end.column?0:1:0},h.prototype.compareStart=function(g,s){return this.start.row==g&&this.start.column==s?-1:this.compare(g,s)},h.prototype.compareEnd=function(g,s){return this.end.row==g&&this.end.column==s?1:this.compare(g,s)},h.prototype.compareInside=function(g,s){return this.end.row==g&&this.end.column==s?1:this.start.row==g&&this.start.column==s?-1:this.compare(g,s)},h.prototype.clipRows=function(g,s){if(this.end.row>s)var p={row:s+1,column:0};else if(this.end.row<g)var p={row:g,column:0};if(this.start.row>s)var o={row:s+1,column:0};else if(this.start.row<g)var o={row:g,column:0};return h.fromPoints(o||this.start,p||this.end)},h.prototype.extend=function(g,s){var p=this.compare(g,s);if(p==0)return this;if(p==-1)var o={row:g,column:s};else var i={row:g,column:s};return h.fromPoints(o||this.start,i||this.end)},h.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},h.prototype.isMultiLine=function(){return this.start.row!==this.end.row},h.prototype.clone=function(){return h.fromPoints(this.start,this.end)},h.prototype.collapseRows=function(){return this.end.column==0?new h(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new h(this.start.row,0,this.end.row,0)},h.prototype.toScreenRange=function(g){var s=g.documentToScreenPosition(this.start),p=g.documentToScreenPosition(this.end);return new h(s.row,s.column,p.row,p.column)},h.prototype.moveBy=function(g,s){this.start.row+=g,this.start.column+=s,this.end.row+=g,this.end.column+=s},h}();u.fromPoints=function(h,g){return new u(h.row,h.column,g.row,g.column)},u.comparePoints=function(h,g){return h.row-g.row||h.column-g.column},r.Range=u}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,f){/*! @license
|
954
954
|
==========================================================================
|
955
955
|
SproutCore -- JavaScript Application Framework
|
956
956
|
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
|
@@ -979,49 +979,49 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
979
979
|
|
980
980
|
|
981
981
|
==========================================================================
|
982
|
-
@license */var u=n("./oop"),h=function(){var g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};g.PRINTABLE_KEYS[173]="-";var s,p;for(p in g.FUNCTION_KEYS)s=g.FUNCTION_KEYS[p].toLowerCase(),g[s]=parseInt(p,10);for(p in g.PRINTABLE_KEYS)s=g.PRINTABLE_KEYS[p].toLowerCase(),g[s]=parseInt(p,10);return u.mixin(g,g.MODIFIER_KEYS),u.mixin(g,g.PRINTABLE_KEYS),u.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,function(){for(var o=["cmd","ctrl","alt","shift"],i=Math.pow(2,o.length);i--;)g.KEY_MODS[i]=o.filter(function(a){return i&g.KEY_MODS[a]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",g}();u.mixin(r,h),r.default=r,r.keyCodeToString=function(g){var s=h[g];return typeof s!="string"&&(s=String.fromCharCode(g)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var u=n("./keys"),h=n("./useragent"),g=null,s=0,p;function o(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function i(){return p==null&&o(),p}function a(A,S,C){this.elem=A,this.type=S,this.callback=C}a.prototype.destroy=function(){l(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(A,S,C,b){A.addEventListener(S,C,i()),b&&b.$toDestroy.push(new a(A,S,C))},l=r.removeListener=function(A,S,C){A.removeEventListener(S,C,i())};r.stopEvent=function(A){return r.stopPropagation(A),r.preventDefault(A),!1},r.stopPropagation=function(A){A.stopPropagation&&A.stopPropagation()},r.preventDefault=function(A){A.preventDefault&&A.preventDefault()},r.getButton=function(A){return A.type=="dblclick"?0:A.type=="contextmenu"||h.isMac&&A.ctrlKey&&!A.altKey&&!A.shiftKey?2:A.button},r.capture=function(A,S,C){var b=A&&A.ownerDocument||document;function
|
982
|
+
@license */var u=n("./oop"),h=function(){var g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};g.PRINTABLE_KEYS[173]="-";var s,p;for(p in g.FUNCTION_KEYS)s=g.FUNCTION_KEYS[p].toLowerCase(),g[s]=parseInt(p,10);for(p in g.PRINTABLE_KEYS)s=g.PRINTABLE_KEYS[p].toLowerCase(),g[s]=parseInt(p,10);return u.mixin(g,g.MODIFIER_KEYS),u.mixin(g,g.PRINTABLE_KEYS),u.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,function(){for(var o=["cmd","ctrl","alt","shift"],i=Math.pow(2,o.length);i--;)g.KEY_MODS[i]=o.filter(function(a){return i&g.KEY_MODS[a]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",g}();u.mixin(r,h),r.default=r,r.keyCodeToString=function(g){var s=h[g];return typeof s!="string"&&(s=String.fromCharCode(g)),s.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var u=n("./keys"),h=n("./useragent"),g=null,s=0,p;function o(){p=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return p={passive:!1},!0}})}catch{}}function i(){return p==null&&o(),p}function a(A,S,C){this.elem=A,this.type=S,this.callback=C}a.prototype.destroy=function(){l(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var c=r.addListener=function(A,S,C,b){A.addEventListener(S,C,i()),b&&b.$toDestroy.push(new a(A,S,C))},l=r.removeListener=function(A,S,C){A.removeEventListener(S,C,i())};r.stopEvent=function(A){return r.stopPropagation(A),r.preventDefault(A),!1},r.stopPropagation=function(A){A.stopPropagation&&A.stopPropagation()},r.preventDefault=function(A){A.preventDefault&&A.preventDefault()},r.getButton=function(A){return A.type=="dblclick"?0:A.type=="contextmenu"||h.isMac&&A.ctrlKey&&!A.altKey&&!A.shiftKey?2:A.button},r.capture=function(A,S,C){var b=A&&A.ownerDocument||document;function R(L){S&&S(L),C&&C(L),l(b,"mousemove",S),l(b,"mouseup",R),l(b,"dragstart",R)}return c(b,"mousemove",S),c(b,"mouseup",R),c(b,"dragstart",R),R},r.addMouseWheelListener=function(A,S,C){c(A,"wheel",function(b){var R=.15,L=b.deltaX||0,E=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=L*R,b.wheelY=E*R;break;case b.DOM_DELTA_LINE:var M=15;b.wheelX=L*M,b.wheelY=E*M;break;case b.DOM_DELTA_PAGE:var $=150;b.wheelX=L*$,b.wheelY=E*$;break}S(b)},C)},r.addMultiMouseDownListener=function(A,S,C,b,R){var L=0,E,M,$,k={2:"dblclick",3:"tripleclick",4:"quadclick"};function _(w){if(r.getButton(w)!==0?L=0:w.detail>1?(L++,L>4&&(L=1)):L=1,h.isIE){var x=Math.abs(w.clientX-E)>5||Math.abs(w.clientY-M)>5;(!$||x)&&(L=1),$&&clearTimeout($),$=setTimeout(function(){$=null},S[L-1]||600),L==1&&(E=w.clientX,M=w.clientY)}if(w._clicks=L,C[b]("mousedown",w),L>4)L=0;else if(L>1)return C[b](k[L],w)}Array.isArray(A)||(A=[A]),A.forEach(function(w){c(w,"mousedown",_,R)})};var d=function(A){return 0|(A.ctrlKey?1:0)|(A.altKey?2:0)|(A.shiftKey?4:0)|(A.metaKey?8:0)};r.getModifierString=function(A){return u.KEY_MODS[d(A)]};function m(A,S,C){var b=d(S);if(!h.isMac&&g){if(S.getModifierState&&(S.getModifierState("OS")||S.getModifierState("Win"))&&(b|=8),g.altGr)if((3&b)!=3)g.altGr=0;else return;if(C===18||C===17){var R="location"in S?S.location:S.keyLocation;if(C===17&&R===1)g[C]==1&&(s=S.timeStamp);else if(C===18&&b===3&&R===2){var L=S.timeStamp-s;L<50&&(g.altGr=!0)}}}if(C in u.MODIFIER_KEYS&&(C=-1),!b&&C===13){var R="location"in S?S.location:S.keyLocation;if(R===3&&(A(S,b,-C),S.defaultPrevented))return}if(h.isChromeOS&&b&8){if(A(S,b,C),S.defaultPrevented)return;b&=-9}return!b&&!(C in u.FUNCTION_KEYS)&&!(C in u.PRINTABLE_KEYS)?!1:A(S,b,C)}r.addCommandKeyListener=function(A,S,C){var b=null;c(A,"keydown",function(R){g[R.keyCode]=(g[R.keyCode]||0)+1;var L=m(S,R,R.keyCode);return b=R.defaultPrevented,L},C),c(A,"keypress",function(R){b&&(R.ctrlKey||R.altKey||R.shiftKey||R.metaKey)&&(r.stopEvent(R),b=null)},C),c(A,"keyup",function(R){g[R.keyCode]=null},C),g||(v(),c(window,"focus",v))};function v(){g=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!h.isOldIE){var y=1;r.nextTick=function(A,S){S=S||window;var C="zero-timeout-message-"+y++,b=function(R){R.data==C&&(r.stopPropagation(R),l(S,"message",b),A())};c(S,"message",b),S.postMessage(C,"*")}}r.$idleBlocked=!1,r.onIdle=function(A,S){return setTimeout(function C(){r.$idleBlocked?setTimeout(C,100):A()},S)},r.$idleBlockId=null,r.blockIdle=function(A){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},A||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(A){setTimeout(A,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,f){var u;f.exports={lineMode:!1,pasteCancelled:function(){return u&&u>Date.now()-50?!0:u=!1},cancel:function(){u=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,f){var u=n("../lib/event"),h=n("../config").nls,g=n("../lib/useragent"),s=n("../lib/dom"),p=n("../lib/lang"),o=n("../clipboard"),i=g.isChrome<18,a=g.isIE,c=g.isChrome>63,l=400,d=n("../lib/keys"),m=d.KEY_MODS,v=g.isIOS,y=v?/\s/:/\n/,A=g.isMobile,S;S=function(C,b){var R=s.createElement("textarea");R.className="ace_text-input",R.setAttribute("wrap","off"),R.setAttribute("autocorrect","off"),R.setAttribute("autocapitalize","off"),R.setAttribute("spellcheck","false"),R.style.opacity="0",C.insertBefore(R,C.firstChild);var L=!1,E=!1,M=!1,$=!1,k="";A||(R.style.fontSize="1px");var _=!1,w=!1,x="",T=0,O=0,I=0,F=Number.MAX_SAFE_INTEGER,P=Number.MIN_SAFE_INTEGER,W=0;try{var j=document.activeElement===R}catch{}this.setNumberOfExtraLines=function(Q){if(F=Number.MAX_SAFE_INTEGER,P=Number.MIN_SAFE_INTEGER,Q<0){W=0;return}W=Q},this.setAriaOptions=function(Q){if(Q.activeDescendant?(R.setAttribute("aria-haspopup","true"),R.setAttribute("aria-autocomplete",Q.inline?"both":"list"),R.setAttribute("aria-activedescendant",Q.activeDescendant)):(R.setAttribute("aria-haspopup","false"),R.setAttribute("aria-autocomplete","both"),R.removeAttribute("aria-activedescendant")),Q.role&&R.setAttribute("role",Q.role),Q.setLabel&&(R.setAttribute("aria-roledescription",h("editor")),b.session)){var ce=b.session.selection.cursor.row;R.setAttribute("aria-label",h("Cursor at row $0",[ce+1]))}},this.setAriaOptions({role:"textbox"}),u.addListener(R,"blur",function(Q){w||(b.onBlur(Q),j=!1)},b),u.addListener(R,"focus",function(Q){if(!w){if(j=!0,g.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(Q),g.isEdge?setTimeout(z):z()}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:b.renderer.enableKeyboardAccessibility}),k||c||this.$focusScroll=="browser")return R.focus({preventScroll:!0});var Q=R.style.top;R.style.position="fixed",R.style.top="0px";try{var ce=R.getBoundingClientRect().top!=0}catch{return}var fe=[];if(ce)for(var Ce=R.parentElement;Ce&&Ce.nodeType==1;)fe.push(Ce),Ce.setAttribute("ace_nocontext","true"),!Ce.parentElement&&Ce.getRootNode?Ce=Ce.getRootNode().host:Ce=Ce.parentElement;R.focus({preventScroll:!0}),ce&&fe.forEach(function(Le){Le.removeAttribute("ace_nocontext")}),setTimeout(function(){R.style.position="",R.style.top=="0px"&&(R.style.top=Q)},0)},this.blur=function(){R.blur()},this.isFocused=function(){return j},b.on("beforeEndOperation",function(){var Q=b.curOp,ce=Q&&Q.command&&Q.command.name;if(ce!="insertstring"){var fe=ce&&(Q.docChanged||Q.selectionChanged);M&&fe&&(x=R.value="",ue()),z()}});var H=function(Q,ce){for(var fe=ce,Ce=1;Ce<=Q-F&&Ce<2*W+1;Ce++)fe+=b.session.getLine(Q-Ce).length+1;return fe},z=v?function(Q){if(!(!j||L&&!Q||$)){Q||(Q="");var ce=`
|
983
983
|
ab`+Q+`cde fg
|
984
|
-
`;ce!=
|
984
|
+
`;ce!=R.value&&(R.value=x=ce);var fe=4,Ce=4+(Q.length||(b.selection.isEmpty()?0:1));(T!=fe||O!=Ce)&&R.setSelectionRange(fe,Ce),T=fe,O=Ce}}:function(){if(!(M||$)&&!(!j&&!X)){M=!0;var Q=0,ce=0,fe="";if(b.session){var Ce=b.selection,Le=Ce.getRange(),Ne=Ce.cursor.row;Ne===P+1?(F=P+1,P=F+2*W):Ne===F-1?(P=F-1,F=P-2*W):(Ne<F-1||Ne>P+1)&&(F=Ne>W?Ne-W:0,P=Ne>W?Ne+W:2*W);for(var Xe=[],Be=F;Be<=P;Be++)Xe.push(b.session.getLine(Be));if(fe=Xe.join(`
|
985
985
|
`),Q=H(Le.start.row,Le.start.column),ce=H(Le.end.row,Le.end.column),Le.start.row<F){var He=b.session.getLine(F-1);Q=Le.start.row<F-1?0:Q,ce+=He.length+1,fe=He+`
|
986
|
-
`+fe}else if(Le.end.row>P){var
|
987
|
-
`+
|
986
|
+
`+fe}else if(Le.end.row>P){var xe=b.session.getLine(P+1);ce=Le.end.row>P+1?xe.length:Le.end.column,ce+=fe.length+1,fe=fe+`
|
987
|
+
`+xe}else A&&Ne>0&&(fe=`
|
988
988
|
`+fe,ce+=1,Q+=1);fe.length>l&&(Q<l&&ce<l?fe=fe.slice(0,l):(fe=`
|
989
989
|
`,Q==ce?Q=ce=0:(Q=0,ce=1)));var ze=fe+`
|
990
990
|
|
991
|
-
`;ze!=
|
992
|
-
`:Xe},V=function(Q){if(M)return re();if(Q&&Q.inputType){if(Q.inputType=="historyUndo")return b.execCommand("undo");if(Q.inputType=="historyRedo")return b.execCommand("redo")}var ce=
|
993
|
-
`?
|
994
|
-
`).length>2?Re=d.down:He>O&&R[He-1]==" "?(Re=d.right,ze=m.option):(He>O||He==O&&O!=T&&Be==He)&&(Re=d.right),Be!==He&&(ze|=m.shift),Re){var un=ce.onCommandKey({},ze,Re);if(!un&&ce.commands){Re=d.keyCodeToString(Re);var Ol=ce.commands.findKeyCommand(ze,Re);Ol&&ce.execCommand(Ol)}T=Be,O=He,z("")}}};document.addEventListener("selectionchange",Ne),ce.on("destroy",function(){document.removeEventListener("selectionchange",Ne)})}this.destroy=function(){x.parentElement&&x.parentElement.removeChild(x)}},r.TextInput=S,r.$setUserAgentForTests=function(C,b){A=C,v=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var u=n("../lib/useragent"),h=0,g=550,s=function(){function i(a){a.$clickSelection=null;var c=a.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var l=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];l.forEach(function(d){a[d]=this[d]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}return i.prototype.onMouseDown=function(a){var c=a.inSelection(),l=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,m=a.getButton();if(m!==0){var v=d.getSelectionRange(),y=v.isEmpty();(y||m==1)&&d.selection.moveToPosition(l),m==2&&(d.textInput.onContextMenu(a.domEvent),u.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!d.isFocused()&&(d.focus(),this.$focusTimeout&&!this.$clickSelection&&!d.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(l,a.domEvent._clicks>1),a.preventDefault()},i.prototype.startSelect=function(a,c){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var l=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?l.selection.selectToPosition(a):c||l.selection.moveToPosition(a),c||this.select(),l.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var a,c=this.editor,l=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(l);if(d==-1)a=this.$clickSelection.end;else if(d==1)a=this.$clickSelection.start;else{var m=o(this.$clickSelection,l);l=m.cursor,a=m.anchor}c.selection.setSelectionAnchor(a.row,a.column)}c.selection.selectToPosition(l),c.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(a){var c,l=this.editor,d=l.renderer.screenToTextCoordinates(this.x,this.y),m=l.selection[a](d.row,d.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)c=this.$clickSelection.end,(m.end.row!=d.row||m.end.column!=d.column)&&(d=m.start);else if(y==1&&v>=0)c=this.$clickSelection.start,(m.start.row!=d.row||m.start.column!=d.column)&&(d=m.end);else if(v==-1&&y==1)d=m.end,c=m.start;else{var A=o(this.$clickSelection,d);d=A.cursor,c=A.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(d),l.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var a=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(a>h||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(a){var c=a.getDocumentPosition(),l=this.editor,d=l.session,m=d.getBracketRange(c);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=l.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},i.prototype.onTripleClick=function(a){var c=a.getDocumentPosition(),l=this.editor;this.setState("selectByLines");var d=l.getSelectionRange();d.isMultiLine()&&d.contains(c.row,c.column)?(this.$clickSelection=l.selection.getLineRange(d.start.row),this.$clickSelection.end=l.selection.getLineRange(d.end.row).end):this.$clickSelection=l.selection.getLineRange(c.row),this.select()},i.prototype.onQuadClick=function(a){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var l=this.$lastScroll,d=a.domEvent.timeStamp,m=d-l.t,v=m?a.wheelX/m:l.vx,y=m?a.wheelY/m:l.vy;m<g&&(v=(v+l.vx)/2,y=(y+l.vy)/2);var A=Math.abs(v/y),S=!1;if(A>=1&&c.renderer.isScrollableBy(a.wheelX*a.speed,0)&&(S=!0),A<=1&&c.renderer.isScrollableBy(0,a.wheelY*a.speed)&&(S=!0),S)l.allowed=d;else if(d-l.allowed<g){var C=Math.abs(v)<=1.5*Math.abs(l.vx)&&Math.abs(y)<=1.5*Math.abs(l.vy);C?(S=!0,l.allowed=d):l.allowed=0}if(l.t=d,l.vx=v,l.vy=y,S)return c.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},i}();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,r.DefaultHandlers=s;function p(i,a,c,l){return Math.sqrt(Math.pow(c-i,2)+Math.pow(l-a,2))}function o(i,a){if(i.start.row==i.end.row)var c=2*a.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var c=a.column-4;else var c=2*a.row-i.start.row-i.end.row;return c<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(h){h.stopPropagation();var g=h.currentTarget,s=g.scrollHeight>g.clientHeight;s||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var u=this&&this.__extends||function(){var d=function(m,v){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,A){y.__proto__=A}||function(y,A){for(var S in A)Object.prototype.hasOwnProperty.call(A,S)&&(y[S]=A[S])},d(m,v)};return function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");d(m,v);function y(){this.constructor=m}m.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),h=this&&this.__values||function(d){var m=typeof Symbol=="function"&&Symbol.iterator,v=m&&d[m],y=0;if(v)return v.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&y>=d.length&&(d=void 0),{value:d&&d[y++],done:!d}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},g=n("./lib/dom");n("./lib/event");var s=n("./range").Range,p=n("./lib/scroll").preventParentScroll,o="ace_tooltip",i=function(){function d(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return d.prototype.$init=function(){return this.$element=g.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},d.prototype.getElement=function(){return this.$element||this.$init()},d.prototype.setText=function(m){this.getElement().textContent=m},d.prototype.setHtml=function(m){this.getElement().innerHTML=m},d.prototype.setPosition=function(m,v){this.getElement().style.left=m+"px",this.getElement().style.top=v+"px"},d.prototype.setClassName=function(m){g.addCssClass(this.getElement(),m)},d.prototype.setTheme=function(m){this.$element.className=o+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},d.prototype.show=function(m,v,y){m!=null&&this.setText(m),v!=null&&y!=null&&this.setPosition(v,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},d.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},d.prototype.getHeight=function(){return this.getElement().offsetHeight},d.prototype.getWidth=function(){return this.getElement().offsetWidth},d.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},d}(),a=function(){function d(){this.popups=[]}return d.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},d.prototype.removePopup=function(m){var v=this.popups.indexOf(m);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},d.prototype.updatePopups=function(){var m,v,y,A;this.popups.sort(function(k,_){return _.priority-k.priority});var S=[];try{for(var C=h(this.popups),b=C.next();!b.done;b=C.next()){var x=b.value,L=!0;try{for(var E=(y=void 0,h(S)),M=E.next();!M.done;M=E.next()){var $=M.value;if(this.doPopupsOverlap($,x)){L=!1;break}}}catch(k){y={error:k}}finally{try{M&&!M.done&&(A=E.return)&&A.call(E)}finally{if(y)throw y.error}}L?S.push(x):x.hide()}}catch(k){m={error:k}}finally{try{b&&!b.done&&(v=C.return)&&v.call(C)}finally{if(m)throw m.error}}},d.prototype.doPopupsOverlap=function(m,v){var y=m.getElement().getBoundingClientRect(),A=v.getElement().getBoundingClientRect();return y.left<A.right&&y.right>A.left&&y.top<A.bottom&&y.bottom>A.top},d}(),c=new a;r.popupManager=c,r.Tooltip=i;var l=function(d){u(m,d);function m(v){v===void 0&&(v=document.body);var y=d.call(this,v)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var A=y.getElement();return A.style.whiteSpace="pre-wrap",A.style.pointerEvents="auto",A.addEventListener("mouseout",y.onMouseOut),A.tabIndex=-1,A.addEventListener("blur",(function(){A.contains(document.activeElement)||this.hide()}).bind(y)),A.addEventListener("wheel",p),y}return m.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(v,y){this.lastEvent=v,this.lastT=Date.now();var A=y.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||A||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||A||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(v){var y=v.editor,A=v.getDocumentPosition(),S=y.session.getLine(A.row);if(A.column==S.length){var C=y.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),b=y.session.documentToScreenPosition(A.row,A.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},m.prototype.setDataProvider=function(v){this.$gatherData=v},m.prototype.showForRange=function(v,y,A,S){var C=10;if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=v.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(y,v.session),this.range=s.fromPoints(y.start,y.end);var x=b.textToScreenCoordinates(y.start.row,y.start.column),L=b.scroller.getBoundingClientRect();x.pageX<L.left&&(x.pageX=L.left);var E=this.getElement();E.innerHTML="",E.appendChild(A),E.style.maxHeight="",E.style.display="block";var M=E.clientHeight,$=E.clientWidth,k=window.innerHeight-x.pageY-b.lineHeight,_=!0;x.pageY-M<0&&x.pageY<k&&(_=!1),E.style.maxHeight=(_?x.pageY:k)-C+"px",E.style.top=_?"":x.pageY+b.lineHeight+"px",E.style.bottom=_?window.innerHeight-x.pageY+"px":"",E.style.left=Math.min(x.pageX,window.innerWidth-$-C)+"px"}},m.prototype.addMarker=function(v,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(v,"ace_highlight-marker","text")},m.prototype.hide=function(v){!v&&document.activeElement==this.getElement()||v&&v.target&&(v.type!="keydown"||v.ctrlKey||v.metaKey)&&this.$element.contains(v.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(v){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!v.relatedTarget||this.getElement().contains(v.relatedTarget)||v&&v.currentTarget.contains(v.relatedTarget)||v.relatedTarget.classList.contains("ace_content")||this.hide())},m}(i);r.HoverTooltip=l}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var u=this&&this.__extends||function(){var c=function(l,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},c(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(l,d);function m(){this.constructor=l}l.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}(),h=this&&this.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,d=l&&c[l],m=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&m>=c.length&&(c=void 0),{value:c&&c[m++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},g=n("../lib/dom"),s=n("../lib/event"),p=n("../tooltip").Tooltip,o=n("../config").nls;function i(c){var l=c.editor,d=l.renderer.$gutterLayer,m=new a(l);c.editor.setDefaultHandler("guttermousedown",function(b){if(!(!l.isFocused()||b.getButton()!=0)){var x=d.getRegion(b);if(x!="foldWidgets"){var L=b.getDocumentPosition().row,E=l.session.selection;if(b.getShiftKey())E.selectTo(L,0);else{if(b.domEvent.detail==2)return l.selectAll(),b.preventDefault();c.$clickSelection=l.selection.getLineRange(L)}return c.setState("selectByLines"),c.captureMouse(b),b.preventDefault()}}});var v,y;function A(){var b=y.getDocumentPosition().row,x=l.session.getLength();if(b==x){var L=l.renderer.pixelToScreenCoordinates(0,y.y).row,E=y.$pos;if(L>l.session.documentToScreenRow(E.row,E.column))return S()}if(m.showTooltip(b),!!m.isOpen)if(l.on("mousewheel",S),c.$tooltipFollowsMouse)C(y);else{var M=y.getGutterRow(),$=d.$lines.get(M);if($){var k=$.element.querySelector(".ace_gutter_annotation"),_=k.getBoundingClientRect(),w=m.getElement().style;w.left=_.right+"px",w.top=_.bottom+"px"}else C(y)}}function S(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),l.off("mousewheel",S))}function C(b){m.setPosition(b.x,b.y)}c.editor.setDefaultHandler("guttermousemove",function(b){var x=b.domEvent.target||b.domEvent.srcElement;if(g.hasCssClass(x,"ace_fold-widget"))return S();m.isOpen&&c.$tooltipFollowsMouse&&C(b),y=b,!v&&(v=setTimeout(function(){v=null,y&&!c.isMousePressed?A():S()},50))}),s.addListener(l.renderer.$gutter,"mouseout",function(b){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,S()},50))},l),l.on("changeSession",S),l.on("input",S)}r.GutterHandler=i;var a=function(c){u(l,c);function l(d){var m=c.call(this,d.container)||this;return m.editor=d,m}return l.prototype.setPosition=function(d,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,A=this.getWidth(),S=this.getHeight();d+=15,m+=15,d+A>v&&(d-=d+A-v),m+S>y&&(m-=20+S),p.prototype.setPosition.call(this,d,m)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:o("error"),plural:o("errors")},warning:{singular:o("warning"),plural:o("warnings")},info:{singular:o("information message"),plural:o("information messages")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(d){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[d],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var A=m.session.getFoldLine(d);if(A&&m.$showFoldedAnnotations){for(var S={error:[],warning:[],info:[]},C,b=d+1;b<=A.end.row;b++)if(m.$annotations[b])for(var x=0;x<m.$annotations[b].text.length;x++){var L=m.$annotations[b].type[x];if(S[L].push(m.$annotations[b].text[x]),L==="error"){C="error_fold";continue}if(L==="warning"){C="warning_fold";continue}}if(C==="error_fold"||C==="warning_fold"){var E="".concat(l.annotationsToSummaryString(S)," in folded code.");y.text.push(E),y.type.push(C)}}if(y.text.length===0)return this.hide();for(var M={error:[],warning:[],info:[]},$=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",b=0;b<y.text.length;b++){var k="<span class='ace_".concat(y.type[b]," ").concat($,"' aria-label='").concat(l.annotationLabels[y.type[b].replace("_fold","")].singular,"' role=img> </span> ").concat(y.text[b]);M[y.type[b].replace("_fold","")].push(k)}var _=[].concat(M.error,M.warning,M.info).join("<br>");this.setHtml(_),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},l.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},l.annotationsToSummaryString=function(d){var m,v,y=[],A=["error","warning","info"];try{for(var S=h(A),C=S.next();!C.done;C=S.next()){var b=C.value;if(d[b].length){var x=d[b].length===1?l.annotationLabels[b].singular:l.annotationLabels[b].plural;y.push("".concat(d[b].length," ").concat(x))}}}catch(L){m={error:L}}finally{try{C&&!C.done&&(v=S.return)&&v.call(S)}finally{if(m)throw m.error}}return y.join(", ")},l}(p);r.GutterTooltip=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent"),g=function(){function s(p,o){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=o,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 s.prototype.stopPropagation=function(){u.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){u.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(p,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-i},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,o=p.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=o.contains(i.row,i.column)}return this.$inSelection},s.prototype.getButton=function(){return u.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return h.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s}();r.MouseEvent=g}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/event"),g=n("../lib/useragent"),s=200,p=200,o=5;function i(c){var l=c.editor,d=u.createElement("div");d.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",d.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(H){c[H]=this[H]},this),l.on("mousedown",this.onMouseDown.bind(c));var v=l.container,y,A,S,C,b,x,L=0,E,M,$,k,_;this.onDragStart=function(H){if(this.cancelDrag||!v.draggable){var z=this;return setTimeout(function(){z.startSelect(),z.captureMouse(H)},0),H.preventDefault()}b=l.getSelectionRange();var K=H.dataTransfer;K.effectAllowed=l.getReadOnly()?"copy":"copyMove",l.container.appendChild(d),K.setDragImage&&K.setDragImage(d,0,0),setTimeout(function(){l.container.removeChild(d)}),K.clearData(),K.setData("Text",l.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(H){if(v.draggable=!1,M=!1,this.setState(null),!l.getReadOnly()){var z=H.dataTransfer.dropEffect;!E&&z=="move"&&l.session.remove(l.getSelectionRange()),l.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(H){if(!(l.getReadOnly()||!W(H.dataTransfer)))return A=H.clientX,S=H.clientY,y||O(),L++,H.dataTransfer.dropEffect=E=j(H),h.preventDefault(H)},this.onDragOver=function(H){if(!(l.getReadOnly()||!W(H.dataTransfer)))return A=H.clientX,S=H.clientY,y||(O(),L++),F!==null&&(F=null),H.dataTransfer.dropEffect=E=j(H),h.preventDefault(H)},this.onDragLeave=function(H){if(L--,L<=0&&y)return I(),E=null,h.preventDefault(H)},this.onDrop=function(H){if(x){var z=H.dataTransfer;if(M)switch(E){case"move":b.contains(x.row,x.column)?b={start:x,end:x}:b=l.moveText(b,x);break;case"copy":b=l.moveText(b,x,!0);break}else{var K=z.getData("Text");b={start:x,end:l.session.insert(x,K)},l.focus(),E=null}return I(),h.preventDefault(H)}},h.addListener(v,"dragstart",this.onDragStart.bind(c),l),h.addListener(v,"dragend",this.onDragEnd.bind(c),l),h.addListener(v,"dragenter",this.onDragEnter.bind(c),l),h.addListener(v,"dragover",this.onDragOver.bind(c),l),h.addListener(v,"dragleave",this.onDragLeave.bind(c),l),h.addListener(v,"drop",this.onDrop.bind(c),l);function w(H,z){var K=Date.now(),q=!z||H.row!=z.row,U=!z||H.column!=z.column;if(!k||q||U)l.moveCursorToPosition(H),k=K,_={x:A,y:S};else{var X=a(_.x,_.y,A,S);X>o?k=null:K-k>=p&&(l.renderer.scrollCursorIntoView(),k=null)}}function R(H,z){var K=Date.now(),q=l.renderer.layerConfig.lineHeight,U=l.renderer.layerConfig.characterWidth,X=l.renderer.scroller.getBoundingClientRect(),Y={x:{left:A-X.left,right:X.right-A},y:{top:S-X.top,bottom:X.bottom-S}},V=Math.min(Y.x.left,Y.x.right),ee=Math.min(Y.y.top,Y.y.bottom),D={row:H.row,column:H.column};V/U<=2&&(D.column+=Y.x.left<Y.x.right?-3:2),ee/q<=1&&(D.row+=Y.y.top<Y.y.bottom?-1:1);var B=H.row!=D.row,G=H.column!=D.column,J=!z||H.row!=z.row;B||G&&!J?$?K-$>=s&&l.renderer.scrollCursorIntoView(D):$=K:$=null}function T(){var H=x;x=l.renderer.screenToTextCoordinates(A,S),w(x,H),R(x,H)}function O(){b=l.selection.toOrientedRange(),y=l.session.addMarker(b,"ace_selection",l.getSelectionStyle()),l.clearSelection(),l.isFocused()&&l.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),T(),C=setInterval(T,20),L=0,h.addListener(document,"mousemove",P)}function I(){clearInterval(C),l.session.removeMarker(y),y=null,l.selection.fromOrientedRange(b),l.isFocused()&&!M&&l.$resetCursorStyle(),b=null,x=null,L=0,$=null,k=null,h.removeListener(document,"mousemove",P)}var F=null;function P(){F==null&&(F=setTimeout(function(){F!=null&&y&&I()},20))}function W(H){var z=H.types;return!z||Array.prototype.some.call(z,function(K){return K=="text/plain"||K=="Text"})}function j(H){var z=["copy","copymove","all","uninitialized"],K=["move","copymove","linkmove","all","uninitialized"],q=g.isMac?H.altKey:H.ctrlKey,U="uninitialized";try{U=H.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return q&&z.indexOf(U)>=0?X="copy":K.indexOf(U)>=0?X="move":z.indexOf(U)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,l=c.container;l.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var d=g.isWin?"default":"move";c.renderer.setCursorStyle(d),this.setState("dragReady")},this.onMouseDrag=function(c){var l=this.editor.container;if(g.isIE&&this.state=="dragReady"){var d=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>3&&l.dragDrop()}if(this.state==="dragWait"){var d=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>0&&(l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var l=this.editor,d=c.inSelection(),m=c.getButton(),v=c.domEvent.detail||1;if(v===1&&m===0&&d){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),l.getDragDelay()){if(g.isWebKit){this.cancelDrag=!0;var A=l.container;A.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(i.prototype);function a(c,l,d,m){return Math.sqrt(Math.pow(d-c,2)+Math.pow(m-l,2))}r.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var u=n("./mouse_event").MouseEvent,h=n("../lib/event"),g=n("../lib/dom");r.addTouchListeners=function(s,p){var o="scroll",i,a,c,l,d,m,v=0,y,A=0,S=0,C=0,b,x;function L(){var w=window.navigator&&window.navigator.clipboard,R=!1,T=function(){var I=p.getCopyText(),F=p.session.getUndoManager().hasUndo();x.replaceChild(g.buildDom(R?["span",!I&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],F&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),x.firstChild)},O=function(I){var F=I.target.getAttribute("action");if(F=="more"||!R)return R=!R,T();F=="paste"?w.readText().then(function(P){p.execCommand(F,P)}):F&&((F=="cut"||F=="copy")&&(w?w.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(F)),x.firstChild.style.display="none",R=!1,F!="openCommandPalette"&&p.focus()};x=g.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){o="menu",I.stopPropagation(),I.preventDefault(),p.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),O(I)},onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function E(){x||L();var w=p.selection.cursor,R=p.renderer.textToScreenCoordinates(w.row,w.column),T=p.renderer.textToScreenCoordinates(0,0).pageX,O=p.renderer.scrollLeft,I=p.container.getBoundingClientRect();x.style.top=R.pageY-I.top-3+"px",R.pageX-I.left<I.width-70?(x.style.left="",x.style.right="10px"):(x.style.right="",x.style.left=T+O-I.left+"px"),x.style.display="",x.firstChild.style.display="none",p.on("input",M)}function M(w){x&&(x.style.display="none"),p.off("input",M)}function $(){d=null,clearTimeout(d);var w=p.selection.getRange(),R=w.contains(y.row,y.column);(w.isEmpty()||!R)&&(p.selection.moveToPosition(y),p.selection.selectWord()),o="wait",E()}function k(){d=null,clearTimeout(d),p.selection.moveToPosition(y);var w=A>=2?p.selection.getLineRange(y.row):p.session.getBracketRange(y);w&&!w.isEmpty()?p.selection.setRange(w):p.selection.selectWord(),o="wait"}h.addListener(s,"contextmenu",function(w){if(b){var R=p.textInput.getElement();R.focus()}},p),h.addListener(s,"touchstart",function(w){var R=w.touches;if(d||R.length>1){clearTimeout(d),d=null,c=-1,o="zoom";return}b=p.$mouseHandler.isMousePressed=!0;var T=p.renderer.layerConfig.lineHeight,O=p.renderer.layerConfig.lineHeight,I=w.timeStamp;l=I;var F=R[0],P=F.clientX,W=F.clientY;Math.abs(i-P)+Math.abs(a-W)>T&&(c=-1),i=w.clientX=P,a=w.clientY=W,S=C=0;var j=new u(w,p);if(y=j.getDocumentPosition(),I-c<500&&R.length==1&&!v)A++,w.preventDefault(),w.button=0,k();else{A=0;var H=p.selection.cursor,z=p.selection.isEmpty()?H:p.selection.anchor,K=p.renderer.$cursorLayer.getPixelPosition(H,!0),q=p.renderer.$cursorLayer.getPixelPosition(z,!0),U=p.renderer.scroller.getBoundingClientRect(),X=p.renderer.layerConfig.offset,Y=p.renderer.scrollLeft,V=function(B,G){return B=B/O,G=G/T-.75,B*B+G*G};if(w.clientX<U.left){o="zoom";return}var ee=V(w.clientX-U.left-K.left+Y,w.clientY-U.top-K.top+X),D=V(w.clientX-U.left-q.left+Y,w.clientY-U.top-q.top+X);ee<3.5&&D<3.5&&(o=ee>D?"cursor":"anchor"),D<3.5?o="anchor":ee<3.5?o="cursor":o="scroll",d=setTimeout($,450)}c=I},p),h.addListener(s,"touchend",function(w){b=p.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),o=="zoom"?(o="",v=0):d?(p.selection.moveToPosition(y),v=0,E()):o=="scroll"?(_(),M()):E(),clearTimeout(d),d=null},p),h.addListener(s,"touchmove",function(w){d&&(clearTimeout(d),d=null);var R=w.touches;if(!(R.length>1||o=="zoom")){var T=R[0],O=i-T.clientX,I=a-T.clientY;if(o=="wait")if(O*O+I*I>4)o="cursor";else return w.preventDefault();i=T.clientX,a=T.clientY,w.clientX=T.clientX,w.clientY=T.clientY;var F=w.timeStamp,P=F-l;if(l=F,o=="scroll"){var W=new u(w,p);W.speed=1,W.wheelX=O,W.wheelY=I,10*Math.abs(O)<Math.abs(I)&&(O=0),10*Math.abs(I)<Math.abs(O)&&(I=0),P!=0&&(S=O/P,C=I/P),p._emit("mousewheel",W),W.propagationStopped||(S=C=0)}else{var j=new u(w,p),H=j.getDocumentPosition();o=="cursor"?p.selection.moveCursorToPosition(H):o=="anchor"&&p.selection.setSelectionAnchor(H.row,H.column),p.renderer.scrollCursorIntoView(H),w.preventDefault()}}},p);function _(){v+=60,m=setInterval(function(){v--<=0&&(clearInterval(m),m=null),Math.abs(S)<.01&&(S=0),Math.abs(C)<.01&&(C=0),v<20&&(S=.9*S),v<20&&(C=.9*C);var w=p.session.getScrollTop();p.renderer.scrollBy(10*S,10*C),w==p.session.getScrollTop()&&(v=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent"),g=n("./default_handlers").DefaultHandlers,s=n("./default_gutter_handler").GutterHandler,p=n("./mouse_event").MouseEvent,o=n("./dragdrop_handler").DragdropHandler,i=n("./touch_handler").addTouchListeners,a=n("../config"),c=function(){function l(d){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=d,new g(this),new s(this),new o(this);var v=function(S){var C=!document.hasFocus||!document.hasFocus()||!d.isFocused()&&document.activeElement==(d.textInput&&d.textInput.getElement());C&&window.focus(),d.focus(),setTimeout(function(){d.isFocused()||d.focus()})},y=d.renderer.getMouseEventTarget();u.addListener(y,"click",this.onMouseEvent.bind(this,"click"),d),u.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),d),u.addMultiMouseDownListener([y,d.renderer.scrollBarV&&d.renderer.scrollBarV.inner,d.renderer.scrollBarH&&d.renderer.scrollBarH.inner,d.textInput&&d.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",d),u.addMouseWheelListener(d.container,this.onMouseWheel.bind(this,"mousewheel"),d),i(d.container,d);var A=d.renderer.$gutter;u.addListener(A,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),d),u.addListener(A,"click",this.onMouseEvent.bind(this,"gutterclick"),d),u.addListener(A,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),d),u.addListener(A,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),d),u.addListener(y,"mousedown",v,d),u.addListener(A,"mousedown",v,d),h.isIE&&d.renderer.scrollBarV&&(u.addListener(d.renderer.scrollBarV.element,"mousedown",v,d),u.addListener(d.renderer.scrollBarH.element,"mousedown",v,d)),d.on("mousemove",function(S){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var C=d.renderer.screenToTextCoordinates(S.x,S.y),b=d.session.selection.getRange(),x=d.renderer;!b.isEmpty()&&b.insideStart(C.row,C.column)?x.setCursorStyle("default"):x.setCursorStyle("")}},d)}return l.prototype.onMouseEvent=function(d,m){this.editor.session&&this.editor._emit(d,new p(m,this.editor))},l.prototype.onMouseMove=function(d,m){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(d,new p(m,this.editor))},l.prototype.onMouseWheel=function(d,m){var v=new p(m,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(d,v)},l.prototype.setState=function(d){this.state=d},l.prototype.captureMouse=function(d,m){this.x=d.x,this.y=d.y,this.isMousePressed=!0;var v=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var A=this,S=function(E){if(E){if(h.isWebKit&&!E.which&&A.releaseMouse)return A.releaseMouse();A.x=E.clientX,A.y=E.clientY,m&&m(E),A.mouseEvent=new p(E,A.editor),A.$mouseMoved=!0}},C=function(E){v.off("beforeEndOperation",x),clearInterval(L),v.session&&b(),A[A.state+"End"]&&A[A.state+"End"](E),A.state="",A.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),A.$onCaptureMouseMove=A.releaseMouse=null,E&&A.onMouseEvent("mouseup",E),v.endOperation()},b=function(){A[A.state]&&A[A.state](),A.$mouseMoved=!1};if(h.isOldIE&&d.domEvent.type=="dblclick")return setTimeout(function(){C(d)});var x=function(E){A.releaseMouse&&v.curOp.command.name&&v.curOp.selectionChanged&&(A[A.state+"End"]&&A[A.state+"End"](),A.state="",A.releaseMouse())};v.on("beforeEndOperation",x),v.startOperation({command:{name:"mouse"}}),A.$onCaptureMouseMove=S,A.releaseMouse=u.capture(this.editor.container,S,C);var L=setInterval(b,20)},l.prototype.cancelContextMenu=function(){var d=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",d),m&&m.domEvent&&u.stopEvent(m.domEvent))}).bind(this);setTimeout(d,10),this.editor.on("nativecontextmenu",d)},l.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},l}();c.prototype.releaseMouse=null,a.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:h.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s){s.on("click",function(p){var o=p.getDocumentPosition(),i=s.session,a=i.getFoldAt(o.row,o.column,1);a&&(p.getAccelKey()?i.removeFold(a):i.expandFold(a),p.stop());var c=p.domEvent&&p.domEvent.target;c&&u.hasCssClass(c,"ace_inline_button")&&u.hasCssClass(c,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(p){var o=s.renderer.$gutterLayer.getRegion(p);if(o=="foldWidgets"){var i=p.getDocumentPosition().row,a=s.session;a.foldWidgets&&a.foldWidgets[i]&&s.session.onFoldWidgetClick(i,p),s.isFocused()||s.focus(),p.stop()}}),s.on("gutterdblclick",function(p){var o=s.renderer.$gutterLayer.getRegion(p);if(o=="foldWidgets"){var i=p.getDocumentPosition().row,a=s.session,c=a.getParentFoldRangeData(i,!0),l=c.range||c.firstRange;if(l){i=l.start.row;var d=a.getFoldAt(i,a.getLine(i).length,1);d?a.removeFold(d):(a.addFold("...",l),s.renderer.scrollCursorIntoView({row:l.start.row,column:0}))}p.stop()}})}return g}();r.FoldHandler=h}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var u=n("../lib/keys"),h=n("../lib/event"),g=function(){function s(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return s.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},s.prototype.setKeyboardHandler=function(p){var o=this.$handlers;if(o[o.length-1]!=p){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(p,1)}},s.prototype.addKeyboardHandler=function(p,o){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var i=this.$handlers.indexOf(p);i!=-1&&this.$handlers.splice(i,1),o==null?this.$handlers.push(p):this.$handlers.splice(o,0,p),i==-1&&p.attach&&p.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(p){var o=this.$handlers.indexOf(p);return o==-1?!1:(this.$handlers.splice(o,1),p.detach&&p.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var p=this.$data,o=p.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(o,p)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(p,o,i,a){for(var c,l=!1,d=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,p,o,i,a),!(!(!c||!c.command)&&(c.command=="null"?l=!0:l=d.exec(c.command,this.$editor,c.args,a),l&&a&&p!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&h.stopEvent(a),l))););return!l&&p==-1&&(c={command:"insertstring"},l=d.exec("insertstring",this.$editor,o)),l&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),l},s.prototype.onCommandKey=function(p,o,i){var a=u.keyCodeToString(i);return this.$callKeyboardHandlers(o,a,i,p)},s.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},s}();r.KeyBinding=g}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var u=0,h=0,g=!1,s=!1,p=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],i=[[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]],a=0,c=1,l=0,d=1,m=2,v=3,y=4,A=5,S=6,C=7,b=8,x=9,L=10,E=11,M=12,$=13,k=14,_=15,w=16,R=17,T=18,O=[T,T,T,T,T,T,T,T,T,S,A,S,b,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,A,A,A,S,b,y,y,E,E,E,y,y,y,y,y,L,x,L,x,x,m,m,m,m,m,m,m,m,m,m,x,y,y,y,y,y,y,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,y,y,y,y,y,y,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,y,y,y,y,T,T,T,T,T,T,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,x,y,E,E,E,E,y,y,y,y,l,y,y,T,y,y,E,E,m,m,y,l,y,y,y,m,l,y,y,y,y,y],I=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,l,d,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b,A,$,k,_,w,R,x,E,E,E,E,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,x,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b];function F(H,z,K,q){var U=u?i:o,X=null,Y=null,V=null,ee=0,D=null,B=null,G=-1,J=null,te=null,re=[];if(!q)for(J=0,q=[];J<K;J++)q[J]=j(H[J]);for(h=u,g=!1,s=!1,p=!1,te=0;te<K;te++){if(X=ee,re[te]=Y=W(H,q,re,te),ee=U[X][Y],D=ee&240,ee&=15,z[te]=V=U[ee][5],D>0)if(D==16){for(J=G;J<te;J++)z[J]=1;G=-1}else G=-1;if(B=U[ee][6],B)G==-1&&(G=te);else if(G>-1){for(J=G;J<te;J++)z[J]=V;G=-1}q[te]==A&&(z[te]=0),h|=V}if(p){for(J=0;J<K;J++)if(q[J]==S){z[J]=u;for(var ue=J-1;ue>=0&&q[ue]==b;ue--)z[ue]=u}}}function P(H,z,K){if(!(h<H)){if(H==1&&u==c&&!s){K.reverse();return}for(var q=K.length,U=0,X,Y,V,ee;U<q;){if(z[U]>=H){for(X=U+1;X<q&&z[X]>=H;)X++;for(Y=U,V=X-1;Y<V;Y++,V--)ee=K[Y],K[Y]=K[V],K[V]=ee;U=X}U++}}}function W(H,z,K,q){var U=z[q],X,Y,V,ee;switch(U){case l:case d:g=!1;case y:case v:return U;case m:return g?v:m;case C:return g=!0,d;case b:return y;case x:return q<1||q+1>=z.length||(X=K[q-1])!=m&&X!=v||(Y=z[q+1])!=m&&Y!=v?y:(g&&(Y=v),Y==X?Y:y);case L:return X=q>0?K[q-1]:A,X==m&&q+1<z.length&&z[q+1]==m?m:y;case E:if(q>0&&K[q-1]==m)return m;if(g)return y;for(ee=q+1,V=z.length;ee<V&&z[ee]==E;)ee++;return ee<V&&z[ee]==m?m:y;case M:for(V=z.length,ee=q+1;ee<V&&z[ee]==M;)ee++;if(ee<V){var D=H[q],B=D>=1425&&D<=2303||D==64286;if(X=z[ee],B&&(X==d||X==C))return d}return q<1||(X=z[q-1])==A?y:K[q-1];case A:return g=!1,s=!0,u;case S:return p=!0,y;case $:case k:case w:case R:case _:g=!1;case T:return y}}function j(H){var z=H.charCodeAt(0),K=z>>8;return K==0?z>191?l:O[z]:K==5?/[\u0591-\u05f4]/.test(H)?d:l:K==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(H)?M:/[\u0660-\u0669\u066b-\u066c]/.test(H)?v:z==1642?E:/[\u06f0-\u06f9]/.test(H)?m:C:K==32&&z<=8287?I[z&255]:K==254&&z>=65136?C:y}r.L=l,r.R=d,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(H,z,K){if(H.length<2)return{};var q=H.split(""),U=new Array(q.length),X=new Array(q.length),Y=[];u=K?c:a,F(q,Y,q.length,z);for(var V=0;V<U.length;U[V]=V,V++);P(2,Y,U),P(1,Y,U);for(var V=0;V<U.length-1;V++)z[V]===v?Y[V]=r.AN:Y[V]===d&&(z[V]>C&&z[V]<$||z[V]===y||z[V]===T)?Y[V]=r.ON_R:V>0&&q[V-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(q[V])&&(Y[V-1]=Y[V]=r.R_H,V++);q[q.length-1]===r.DOT&&(Y[q.length-1]=r.B),q[0]===""&&(Y[0]=r.RLE);for(var V=0;V<U.length;V++)X[V]=Y[U[V]];return{logicalFromVisual:U,bidiLevels:X}},r.hasBidiCharacters=function(H,z){for(var K=!1,q=0;q<H.length;q++)z[q]=j(H.charAt(q)),!K&&(z[q]==d||z[q]==C||z[q]==v)&&(K=!0);return K},r.getVisualFromLogicalIdx=function(H,z){for(var K=0;K<z.logicalFromVisual.length;K++)if(z.logicalFromVisual[K]==H)return K;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var u=n("./lib/bidiutil"),h=n("./lib/lang"),g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function p(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=u,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=g.test(o.getValue())}return p.prototype.isBidiRow=function(o,i,a){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(i,a),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&g.test(o.lines.join(`
|
995
|
-
`))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var o=0,i=this.session.$screenRowCache;if(i.length){var a=this.session.$getRowCacheIndex(i,this.currentRow);a>=0&&(o=this.session.$docRowCache[a])}return o},p.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var a,c=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(a=this.session.$getRowCacheIndex(i,this.currentRow-o-1),a===c);)c=a,o++;else o=this.currentRow;return o},p.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var a=o===this.session.getLength()-1,c=a?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var l=this.session.$wrapData[o];l&&(i===void 0&&(i=this.getSplitIndex()),i>0&&l.length?(this.wrapIndent=l.indent,this.wrapOffset=this.wrapIndent*this.charWidths[u.L],this.line=i<l.length?this.line.substring(l[i-1],l[i]):this.line.substring(l[l.length-1])):this.line=this.line.substring(0,l[i]),i==l.length&&(this.line+=this.showInvisibles?c:u.DOT))}else this.line+=this.showInvisibles?c:u.DOT;var d=this.session,m=0,v;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,A){return y===" "||d.isFullWidth(y.charCodeAt(0))?(v=y===" "?d.getScreenTabSize(A+m):2,m+=v-1,h.stringRepeat(u.DOT,v)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==u.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 o=[];u.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=u.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var i=this.characterWidth=o.$characterSize.width,a=o.$measureCharWidth("ה");this.charWidths[u.L]=this.charWidths[u.EN]=this.charWidths[u.ON_R]=i,this.charWidths[u.R]=this.charWidths[u.AN]=a,this.charWidths[u.R_H]=a*.45,this.charWidths[u.B]=this.charWidths[u.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},p.prototype.setEolChar=function(o){this.EOL=o},p.prototype.setContentWidth=function(o){this.contentWidth=o},p.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(o,i){for(var a=o.getCursorPosition(),c=o.selection.getSelectionAnchor().row;c<=a.row;c++)!i&&o.session.getLine(c).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(c,0,1):i&&o.session.getLine(c).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:c},o.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(o){o-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,a=o>i?this.session.getOverwrite()?o:o-1:i,c=u.getVisualFromLogicalIdx(a,this.bidiMap),l=this.bidiMap.bidiLevels,d=0;!this.session.getOverwrite()&&o<=i&&l[c]%2!==0&&c++;for(var m=0;m<c;m++)d+=this.charWidths[l[m]];return!this.session.getOverwrite()&&o>i&&l[c]%2===0&&(d+=this.charWidths[l[c]]),this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(d+=this.rtlLineOffset),d},p.prototype.getSelections=function(o,i){var a=this.bidiMap,c=a.bidiLevels,l,d=[],m=0,v=Math.min(o,i)-this.wrapIndent,y=Math.max(o,i)-this.wrapIndent,A=!1,S=!1,C=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,x=0;x<c.length;x++)b=a.logicalFromVisual[x],l=c[x],A=b>=v&&b<y,A&&!S?C=m:!A&&S&&d.push({left:C,width:m-C}),m+=this.charWidths[l],S=A;if(A&&x===c.length&&d.push({left:C,width:m-C}),this.isRtlDir)for(var L=0;L<d.length;L++)d[L].left+=this.rtlLineOffset;return d},p.prototype.offsetToCol=function(a){this.isRtlDir&&(a-=this.rtlLineOffset);var i=0,a=Math.max(a,0),c=0,l=0,d=this.bidiMap.bidiLevels,m=this.charWidths[d[l]];for(this.wrapIndent&&(a-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);a>c+m/2;){if(c+=m,l===d.length-1){m=0;break}m=this.charWidths[d[++l]]}return l>0&&d[l-1]%2!==0&&d[l]%2===0?(a<c&&l--,i=this.bidiMap.logicalFromVisual[l]):l>0&&d[l-1]%2===0&&d[l]%2!==0?i=1+(a>c?this.bidiMap.logicalFromVisual[l]:this.bidiMap.logicalFromVisual[l-1]):this.isRtlDir&&l===d.length-1&&m===0&&d[l-1]%2===0||!this.isRtlDir&&l===0&&d[l]%2!==0?i=1+this.bidiMap.logicalFromVisual[l]:(l>0&&d[l-1]%2!==0&&m!==0&&l--,i=this.bidiMap.logicalFromVisual[l]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},p}();r.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/lang"),g=n("./lib/event_emitter").EventEmitter,s=n("./range").Range,p=function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function(c){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,a){this.$isEmpty=!1,this.anchor.setPosition(i,a)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,a=this.lead;return i.row>a.row||i.row==a.row&&i.column>a.column},o.prototype.getRange=function(){var i=this.anchor,a=this.lead;return this.$isEmpty?s.fromPoints(a,a):this.isBackwards()?s.fromPoints(a,i):s.fromPoints(i,a)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,a){var c=a?i.end:i.start,l=a?i.start:i.end;this.$setSelection(c.row,c.column,l.row,l.column)},o.prototype.$setSelection=function(i,a,c,l){if(!this.$silent){var d=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,a),this.cursor.setPosition(c,l),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||d!=this.$isEmpty||m)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),i.call(this)},o.prototype.selectTo=function(i,a){this.$moveSelection(function(){this.moveCursorTo(i,a)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,a){this.clearSelection(),this.moveCursorTo(i,a)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,a){if(typeof a>"u"){var c=i||this.lead;i=c.row,a=c.column}return this.session.getWordRange(i,a)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),a=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(a)},o.prototype.getLineRange=function(i,a){var c=typeof i=="number"?i:this.lead.row,l,d=this.session.getFoldLine(c);return d?(c=d.start.row,l=d.end.row):l=c,a===!0?new s(c,0,l,this.session.getLine(l).length):new s(c,0,l+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,a,c){var l=i.column,d=i.column+a;return c<0&&(l=i.column-a,d=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(l,d).split(" ").length-1==a},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),a;if(a=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),a;if(a=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var i=this.lead.row,a=this.lead.column,c=this.session.documentToScreenRow(i,a),l=this.session.screenToDocumentPosition(c,0),d=this.session.getDisplayLine(i,null,l.row,l.column),m=d.match(/^\s*/);m[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(l.column+=m[0].length),this.moveCursorToPosition(l)},o.prototype.moveCursorLineEnd=function(){var i=this.lead,a=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==a.column){var c=this.session.getLine(a.row);if(a.column==c.length){var l=c.search(/\s+$/);l>0&&(a.column=l)}}this.moveCursorTo(a.row,a.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,a=this.doc.getLine(i).length;this.moveCursorTo(i,a)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,a=this.lead.column,c=this.doc.getLine(i),l=c.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var d=this.session.getFoldAt(i,a,1);if(d){this.moveCursorTo(d.end.row,d.end.column);return}if(this.session.nonTokenRe.exec(l)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,l=c.substring(a)),a>=c.length){this.moveCursorTo(i,c.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(l)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,a)},o.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(i,a,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var l=this.session.getFoldStringAt(i,a,-1);l==null&&(l=this.doc.getLine(i).substring(0,a));var d=h.stringReverse(l);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(d)&&(a-=this.session.nonTokenRe.lastIndex,d=d.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(d)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,a)},o.prototype.$shortWordEndIndex=function(i){var a=0,c,l=/\s/,d=this.session.tokenRe;if(d.lastIndex=0,this.session.tokenRe.exec(i))a=this.session.tokenRe.lastIndex;else{for(;(c=i[a])&&l.test(c);)a++;if(a<1){for(d.lastIndex=0;(c=i[a])&&!d.test(c);)if(d.lastIndex=0,a++,l.test(c))if(a>2){a--;break}else{for(;(c=i[a])&&l.test(c);)a++;if(a>2)break}}}return d.lastIndex=0,a},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,a=this.lead.column,c=this.doc.getLine(i),l=c.substring(a),d=this.session.getFoldAt(i,a,1);if(d)return this.moveCursorTo(d.end.row,d.end.column);if(a==c.length){var m=this.doc.getLength();do i++,l=this.doc.getLine(i);while(i<m&&/^\s*$/.test(l));/^\s+/.test(l)||(l=""),a=0}var v=this.$shortWordEndIndex(l);this.moveCursorTo(i,a+v)},o.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(i,a,-1))return this.moveCursorTo(c.start.row,c.start.column);var l=this.session.getLine(i).substring(0,a);if(a===0){do i--,l=this.doc.getLine(i);while(i>0&&/^\s*$/.test(l));a=l.length,/\s+$/.test(l)||(l="")}var d=h.stringReverse(l),m=this.$shortWordEndIndex(d);return this.moveCursorTo(i,a-m)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,a){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),l;if(a===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(l=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(l/this.session.$bidiHandler.charWidths[0])):l=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var d=this.session.lineWidgets[this.lead.row];i<0?i-=d.rowsAbove||0:i>0&&(i+=d.rowCount-(d.rowsAbove||0))}var m=this.session.screenToDocumentPosition(c.row+i,c.column,l);i!==0&&a===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+a,a===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,a,c){var l=this.session.getFoldAt(i,a,1);l&&(i=l.start.row,a=l.start.column),this.$keepDesiredColumnOnChange=!0;var d=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(d.charAt(a))&&d.charAt(a-1)&&(this.lead.row==i&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(i,a),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,a,c){var l=this.session.screenToDocumentPosition(i,a);this.moveCursorTo(l.row,l.column,c)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var a=this.getRange();return i?(i.start.column=a.start.column,i.start.row=a.start.row,i.end.column=a.end.column,i.end.row=a.end.row):i=a,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var a=this.getCursor();try{i(this);var c=this.getCursor();return s.fromPoints(a,c)}catch{return s.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(a){var c=a.clone();return c.isBackwards=a.cursor==a.start,c});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var a=i.length;a--;){var c=s.fromPoints(i[a].start,i[a].end);i[a].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(i[a]))return!1;return!0},o}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,u.implement(p.prototype,g),r.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,f){var u=n("./lib/report_error").reportError,h=2e3,g=function(){function s(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],a=[],c=0,l=this.matchMappings[o]={defaultToken:"text"},d="g",m=[],v=0;v<i.length;v++){var y=i[v];if(y.defaultToken&&(l.defaultToken=y.defaultToken),y.caseInsensitive&&d.indexOf("i")===-1&&(d+="i"),y.unicode&&d.indexOf("u")===-1&&(d+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var A=y.regex,S=new RegExp("(?:("+A+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||S==1?y.token=y.token[0]:S-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:S-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(S>1?y.onMatch=this.$applyToken:y.onMatch=y.token),S>1&&(/\\\d/.test(y.regex)?A=y.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+c+1)}):(S=1,A=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),l[c]=v,c+=S,a.push(A),y.onMatch||(y.onMatch=null)}}a.length||(l[0]=0,a.push("$")),m.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,d)},this),this.regExps[o]=new RegExp("("+a.join(")|(")+")|($)",d)}}return s.prototype.$setMaxTokenCount=function(p){h=p|0},s.prototype.$applyToken=function(p){var o=this.splitRegex.exec(p).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:p}];for(var a=[],c=0,l=i.length;c<l;c++)o[c]&&(a[a.length]={type:i[c],value:o[c]});return a},s.prototype.$arrayTokens=function(p){if(!p)return[];var o=this.splitRegex.exec(p);if(!o)return"text";for(var i=[],a=this.tokenArray,c=0,l=a.length;c<l;c++)o[c+1]&&(i[i.length]={type:a[c],value:o[c+1]});return i},s.prototype.removeCapturingGroups=function(p){var o=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,a){return a?"(?:":i});return o},s.prototype.createSplitterRegexp=function(p,o){if(p.indexOf("(?=")!=-1){var i=0,a=!1,c={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(l,d,m,v,y,A){return a?a=y!="]":y?a=!0:v?(i==c.stack&&(c.end=A+1,c.stack=-1),i--):m&&(i++,m.length!=1&&(c.stack=i,c.start=A)),l}),c.end!=null&&/^\)*$/.test(p.substr(c.end))&&(p=p.substring(0,c.start)+p.substr(c.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(o||"").replace("g",""))},s.prototype.getLineTokens=function(p,o){if(o&&typeof o!="string"){var i=o.slice(0);o=i[0],o==="#tmp"&&(i.shift(),o=i.shift())}else var i=[];var a=o||"start",c=this.states[a];c||(a="start",c=this.states[a]);var l=this.matchMappings[a],d=this.regExps[a];d.lastIndex=0;for(var m,v=[],y=0,A=0,S={type:null,value:""};m=d.exec(p);){var C=l.defaultToken,b=null,x=m[0],L=d.lastIndex;if(L-x.length>y){var E=p.substring(y,L-x.length);S.type==C?S.value+=E:(S.type&&v.push(S),S={type:C,value:E})}for(var M=0;M<m.length-2;M++)if(m[M+1]!==void 0){b=c[l[M]],b.onMatch?C=b.onMatch(x,a,i,p):C=b.token,b.next&&(typeof b.next=="string"?a=b.next:a=b.next(a,i),c=this.states[a],c||(this.reportError("state doesn't exist",a),a="start",c=this.states[a]),l=this.matchMappings[a],y=L,d=this.regExps[a],d.lastIndex=L),b.consumeLineEnd&&(y=L);break}if(x){if(typeof C=="string")(!b||b.merge!==!1)&&S.type===C?S.value+=x:(S.type&&v.push(S),S={type:C,value:x});else if(C){S.type&&v.push(S),S={type:null,value:""};for(var M=0;M<C.length;M++)v.push(C[M])}}if(y==p.length)break;if(y=L,A++>h){for(A>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:p});y<p.length;)S.type&&v.push(S),S={value:p.substring(y,y+=500),type:"overflow"};a="start",i=[];break}}return S.type&&v.push(S),i.length>1&&i[0]!==a&&i.unshift("#tmp",a),{tokens:v,state:i.length?i:a}},s}();g.prototype.reportError=u,r.Tokenizer=g}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){var u=n("../lib/deep_copy").deepCopy,h;h=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,o){if(!o){for(var i in p)this.$rules[i]=p[i];return}for(var i in p){for(var a=p[i],c=0;c<a.length;c++){var l=a[c];(l.next||l.onMatch)&&(typeof l.next=="string"&&l.next.indexOf(o)!==0&&(l.next=o+l.next),l.nextState&&l.nextState.indexOf(o)!==0&&(l.nextState=o+l.nextState))}this.$rules[o+i]=a}},this.getRules=function(){return this.$rules},this.embedRules=function(p,o,i,a,c){var l=typeof p=="function"?new p().getRules():p;if(a)for(var d=0;d<a.length;d++)a[d]=o+a[d];else{a=[];for(var m in l)a.push(o+m)}if(this.addRules(l,o),i)for(var v=Array.prototype[c?"push":"unshift"],d=0;d<a.length;d++)v.apply(this.$rules[a[d]],u(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var g=function(p,o){return(p!="start"||o.length)&&o.unshift(this.nextState,p),this.nextState},s=function(p,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var p=0,o=this.$rules;function i(a){var c=o[a];c.processed=!0;for(var l=0;l<c.length;l++){var d=c[l],m=null;Array.isArray(d)&&(m=d,d={}),!d.regex&&d.start&&(d.regex=d.start,d.next||(d.next=[]),d.next.push({defaultToken:d.token},{token:d.token+".end",regex:d.end||d.start,next:"pop"}),d.token=d.token+".start",d.push=!0);var v=d.next||d.push;if(v&&Array.isArray(v)){var y=d.stateName;y||(y=d.token,typeof y!="string"&&(y=y[0]||""),o[y]&&(y+=p++)),o[y]=v,d.next=y,i(y)}else v=="pop"&&(d.next=s);if(d.push&&(d.nextState=d.next||d.push,d.next=g,delete d.push),d.rules)for(var A in d.rules)o[A]?o[A].push&&o[A].push.apply(o[A],d.rules[A]):o[A]=d.rules[A];var S=typeof d=="string"?d:d.include;if(S&&(S==="$self"&&(S="start"),Array.isArray(S)?m=S.map(function(b){return o[b]}):m=o[S]),m){var C=[l,1].concat(m);d.noEscape&&(C=C.filter(function(b){return!b.next})),c.splice.apply(c,C),l--}d.keywordMap&&(d.token=this.createKeywordMapper(d.keywordMap,d.defaultToken||"text",d.caseInsensitive),delete d.defaultToken)}}Object.keys(o).forEach(i,this)},this.createKeywordMapper=function(p,o,i,a){var c=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(l){for(var d=p[l],m=d.split(a||"|"),v=m.length;v--;){var y=m[v];this.$keywordList.push(y),i&&(y=y.toLowerCase()),c[y]=l}},this),p=null,i?function(l){return c[l.toLowerCase()]||o}:function(l){return c[l]||o}},this.getKeywords=function(){return this.$keywords}}).call(h.prototype),r.TextHighlightRules=h}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,f){var u;u=function(){this.$behaviours={}},(function(){this.add=function(h,g,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[h]:this.$behaviours[h]={}}this.$behaviours[h][g]=s},this.addBehaviours=function(h){for(var g in h)for(var s in h[g])this.add(g,s,h[g][s])},this.remove=function(h){this.$behaviours&&this.$behaviours[h]&&delete this.$behaviours[h]},this.inherit=function(h,g){if(typeof h=="function")var s=new h().getBehaviours(g);else var s=h.getBehaviours(g);this.addBehaviours(s)},this.getBehaviours=function(h){if(h){for(var g={},s=0;s<h.length;s++)this.$behaviours[h[s]]&&(g[h[s]]=this.$behaviours[h[s]]);return g}else return this.$behaviours}}).call(u.prototype),r.Behaviour=u}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,f){var u=n("./range").Range,h=function(){function g(s,p,o){this.$session=s,this.$row=p,this.$rowTokens=s.getTokens(p);var i=s.getTokenAt(p,o);this.$tokenIndex=i?i.index:-1}return g.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]},g.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentTokenRow=function(){return this.$row},g.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,p=this.$tokenIndex,o=s[p].start;if(o!==void 0)return o;for(o=0;p>0;)p-=1,o+=s[p].value.length;return o},g.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},g.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new u(this.$row,p,this.$row,p+s.value.length)},g}();r.TokenIterator=h}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,f){var u=n("../../lib/oop"),h=n("../behaviour").Behaviour,g=n("../../token_iterator").TokenIterator,s=n("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,a={},c={'"':'"',"'":"'"},l=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,a.rangeCount!=v.multiSelect.rangeCount&&(a={rangeCount:v.multiSelect.rangeCount})),a[y])return i=a[y];i=a[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(v,y,A,S){var C=v.end.row-v.start.row;return{text:A+y+S,selection:[0,v.start.column+1,C,v.end.column+(C?0:1)]}},m;m=function(v){v=v||{},this.add("braces","insertion",function(y,A,S,C,b){var x=S.getCursorPosition(),L=C.doc.getLine(x.row);if(b=="{"){l(S);var E=S.getSelectionRange(),M=C.doc.getTextRange(E);if(M!==""&&M!=="{"&&S.getWrapBehavioursEnabled())return d(E,M,"{","}");if(m.isSaneInsertion(S,C))return/[\]\}\)]/.test(L[x.column])||S.inMultiSelectMode||v.braces?(m.recordAutoInsert(S,C,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(S,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){l(S);var $=L.substring(x.column,x.column+1);if($=="}"){var k=C.$findOpeningBracket("}",{column:x.column+1,row:x.row});if(k!==null&&m.isAutoInsertedClosing(x,L,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
|
991
|
+
`;ze!=x&&(R.value=x=ze,T=O=ze.length)}if(X&&(T=R.selectionStart,O=R.selectionEnd),O!=ce||T!=Q||R.selectionEnd!=O)try{R.setSelectionRange(Q,ce),T=Q,O=ce}catch{}M=!1}};this.resetSelection=z,j&&b.onFocus();var K=function(Q){return Q.selectionStart===0&&Q.selectionEnd>=x.length&&Q.value===x&&x&&Q.selectionEnd!==O},q=function(Q){M||(L?L=!1:K(R)?(b.selectAll(),z()):A&&R.selectionStart!=T&&z())},U=null;this.setInputHandler=function(Q){U=Q},this.getInputHandler=function(){return U};var X=!1,Y=function(Q,ce){if(X&&(X=!1),E)return z(),Q&&b.onPaste(Q),E=!1,"";for(var fe=R.selectionStart,Ce=R.selectionEnd,Le=T,Ne=x.length-O,Xe=Q,Be=Q.length-fe,He=Q.length-Ce,xe=0;Le>0&&x[xe]==Q[xe];)xe++,Le--;for(Xe=Xe.slice(xe),xe=1;Ne>0&&x.length-xe>T-1&&x[x.length-xe]==Q[Q.length-xe];)xe++,Ne--;Be-=xe-1,He-=xe-1;var ze=Xe.length-xe+1;if(ze<0&&(Le=-ze,ze=0),Xe=Xe.slice(0,ze),!ce&&!Xe&&!Be&&!Le&&!Ne&&!He)return"";$=!0;var cn=!1;return g.isAndroid&&Xe==". "&&(Xe=" ",cn=!0),Xe&&!Le&&!Ne&&!Be&&!He||_?b.onTextInput(Xe):b.onTextInput(Xe,{extendLeft:Le,extendRight:Ne,restoreStart:Be,restoreEnd:He}),$=!1,x=Q,T=fe,O=Ce,I=He,cn?`
|
992
|
+
`:Xe},V=function(Q){if(M)return re();if(Q&&Q.inputType){if(Q.inputType=="historyUndo")return b.execCommand("undo");if(Q.inputType=="historyRedo")return b.execCommand("redo")}var ce=R.value,fe=Y(ce,!0);(ce.length>l+100||y.test(fe)||A&&T<1&&T==O)&&z()},ee=function(Q,ce,fe){var Ce=Q.clipboardData||window.clipboardData;if(!(!Ce||i)){var Le=a||fe?"Text":"text/plain";try{return ce?Ce.setData(Le,ce)!==!1:Ce.getData(Le)}catch(Ne){if(!fe)return ee(Ne,ce,!0)}}},D=function(Q,ce){var fe=b.getCopyText();if(!fe)return u.preventDefault(Q);ee(Q,fe)?(v&&(z(fe),L=fe,setTimeout(function(){L=!1},10)),ce?b.onCut():b.onCopy(),u.preventDefault(Q)):(L=!0,R.value=fe,R.select(),setTimeout(function(){L=!1,z(),ce?b.onCut():b.onCopy()}))},B=function(Q){D(Q,!0)},G=function(Q){D(Q,!1)},J=function(Q){var ce=ee(Q);o.pasteCancelled()||(typeof ce=="string"?(ce&&b.onPaste(ce,Q),g.isIE&&setTimeout(z),u.preventDefault(Q)):(R.value="",E=!0))};u.addCommandKeyListener(R,b.onCommandKey.bind(b),b),u.addListener(R,"select",q,b),u.addListener(R,"input",V,b),u.addListener(R,"cut",B,b),u.addListener(R,"copy",G,b),u.addListener(R,"paste",J,b),(!("oncut"in R)||!("oncopy"in R)||!("onpaste"in R))&&u.addListener(C,"keydown",function(Q){if(!(g.isMac&&!Q.metaKey||!Q.ctrlKey))switch(Q.keyCode){case 67:G(Q);break;case 86:J(Q);break;case 88:B(Q);break}},b);var te=function(Q){if(!(M||!b.onCompositionStart||b.$readOnly)&&(M={},!_)){Q.data&&(M.useTextareaForIME=!1),setTimeout(re,0),b._signal("compositionStart"),b.on("mousedown",le);var ce=b.getSelectionRange();ce.end.row=ce.start.row,ce.end.column=ce.start.column,M.markerRange=ce,M.selectionStart=T,b.onCompositionStart(M),M.useTextareaForIME?(x=R.value="",T=0,O=0):(R.msGetInputContext&&(M.context=R.msGetInputContext()),R.getInputContext&&(M.context=R.getInputContext()))}},re=function(){if(!(!M||!b.onCompositionUpdate||b.$readOnly)){if(_)return le();if(M.useTextareaForIME)b.onCompositionUpdate(R.value);else{var Q=R.value;Y(Q),M.markerRange&&(M.context&&(M.markerRange.start.column=M.selectionStart=M.context.compositionStartOffset),M.markerRange.end.column=M.markerRange.start.column+O-M.selectionStart+I)}}},ue=function(Q){!b.onCompositionEnd||b.$readOnly||(M=!1,b.onCompositionEnd(),b.off("mousedown",le),Q&&V())};function le(){w=!0,R.blur(),R.focus(),w=!1}var he=p.delayedCall(re,50).schedule.bind(null,null);function se(Q){Q.keyCode==27&&R.value.length<R.selectionStart&&(M||(x=R.value),T=O=-1,z()),he()}u.addListener(R,"compositionstart",te,b),u.addListener(R,"compositionupdate",re,b),u.addListener(R,"keyup",se,b),u.addListener(R,"keydown",he,b),u.addListener(R,"compositionend",ue,b),this.getElement=function(){return R},this.setCommandMode=function(Q){_=Q,R.readOnly=!1},this.setReadOnly=function(Q){_||(R.readOnly=Q)},this.setCopyWithEmptySelection=function(Q){},this.onContextMenu=function(Q){X=!0,z(),b._emit("nativecontextmenu",{target:b,domEvent:Q}),this.moveToMouse(Q,!0)},this.moveToMouse=function(Q,ce){k||(k=R.style.cssText),R.style.cssText=(ce?"z-index:100000;":"")+(g.isIE?"opacity:0.1;":"")+"text-indent: -"+(T+O)*b.renderer.characterWidth*.5+"px;";var fe=b.container.getBoundingClientRect(),Ce=s.computedStyle(b.container),Le=fe.top+(parseInt(Ce.borderTopWidth)||0),Ne=fe.left+(parseInt(fe.borderLeftWidth)||0),Xe=fe.bottom-Le-R.clientHeight-2,Be=function(He){s.translate(R,He.clientX-Ne-2,Math.min(He.clientY-Le-2,Xe))};Be(Q),Q.type=="mousedown"&&(b.renderer.$isMousePressed=!0,clearTimeout(pe),g.isWin&&u.capture(b.container,Be,$e))},this.onContextMenuClose=$e;var pe;function $e(){clearTimeout(pe),pe=setTimeout(function(){k&&(R.style.cssText=k,k=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()},0)}var ve=function(Q){b.textInput.onContextMenu(Q),$e()};u.addListener(R,"mouseup",ve,b),u.addListener(R,"mousedown",function(Q){Q.preventDefault(),$e()},b),u.addListener(b.renderer.scroller,"contextmenu",ve,b),u.addListener(R,"contextmenu",ve,b),v&&Ae(C,b,R);function Ae(Q,ce,fe){var Ce=null,Le=!1;fe.addEventListener("keydown",function(Xe){Ce&&clearTimeout(Ce),Le=!0},!0),fe.addEventListener("keyup",function(Xe){Ce=setTimeout(function(){Le=!1},100)},!0);var Ne=function(Xe){if(document.activeElement===fe&&!(Le||M||ce.$mouseHandler.isMousePressed)&&!L){var Be=fe.selectionStart,He=fe.selectionEnd,xe=null,ze=0;if(Be==0?xe=d.up:Be==1?xe=d.home:He>O&&x[He]==`
|
993
|
+
`?xe=d.end:Be<T&&x[Be-1]==" "?(xe=d.left,ze=m.option):Be<T||Be==T&&O!=T&&Be==He?xe=d.left:He>O&&x.slice(0,He).split(`
|
994
|
+
`).length>2?xe=d.down:He>O&&x[He-1]==" "?(xe=d.right,ze=m.option):(He>O||He==O&&O!=T&&Be==He)&&(xe=d.right),Be!==He&&(ze|=m.shift),xe){var cn=ce.onCommandKey({},ze,xe);if(!cn&&ce.commands){xe=d.keyCodeToString(xe);var Il=ce.commands.findKeyCommand(ze,xe);Il&&ce.execCommand(Il)}T=Be,O=He,z("")}}};document.addEventListener("selectionchange",Ne),ce.on("destroy",function(){document.removeEventListener("selectionchange",Ne)})}this.destroy=function(){R.parentElement&&R.parentElement.removeChild(R)}},r.TextInput=S,r.$setUserAgentForTests=function(C,b){A=C,v=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,f){var u=n("../lib/useragent"),h=0,g=550,s=function(){function i(a){a.$clickSelection=null;var c=a.editor;c.setDefaultHandler("mousedown",this.onMouseDown.bind(a)),c.setDefaultHandler("dblclick",this.onDoubleClick.bind(a)),c.setDefaultHandler("tripleclick",this.onTripleClick.bind(a)),c.setDefaultHandler("quadclick",this.onQuadClick.bind(a)),c.setDefaultHandler("mousewheel",this.onMouseWheel.bind(a));var l=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];l.forEach(function(d){a[d]=this[d]},this),a.selectByLines=this.extendSelectionBy.bind(a,"getLineRange"),a.selectByWords=this.extendSelectionBy.bind(a,"getWordRange")}return i.prototype.onMouseDown=function(a){var c=a.inSelection(),l=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,m=a.getButton();if(m!==0){var v=d.getSelectionRange(),y=v.isEmpty();(y||m==1)&&d.selection.moveToPosition(l),m==2&&(d.textInput.onContextMenu(a.domEvent),u.isMozilla||a.preventDefault());return}if(this.mousedownEvent.time=Date.now(),c&&!d.isFocused()&&(d.focus(),this.$focusTimeout&&!this.$clickSelection&&!d.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(a);return}return this.captureMouse(a),this.startSelect(l,a.domEvent._clicks>1),a.preventDefault()},i.prototype.startSelect=function(a,c){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var l=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?l.selection.selectToPosition(a):c||l.selection.moveToPosition(a),c||this.select(),l.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var a,c=this.editor,l=c.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(l);if(d==-1)a=this.$clickSelection.end;else if(d==1)a=this.$clickSelection.start;else{var m=o(this.$clickSelection,l);l=m.cursor,a=m.anchor}c.selection.setSelectionAnchor(a.row,a.column)}c.selection.selectToPosition(l),c.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(a){var c,l=this.editor,d=l.renderer.screenToTextCoordinates(this.x,this.y),m=l.selection[a](d.row,d.column);if(this.$clickSelection){var v=this.$clickSelection.comparePoint(m.start),y=this.$clickSelection.comparePoint(m.end);if(v==-1&&y<=0)c=this.$clickSelection.end,(m.end.row!=d.row||m.end.column!=d.column)&&(d=m.start);else if(y==1&&v>=0)c=this.$clickSelection.start,(m.start.row!=d.row||m.start.column!=d.column)&&(d=m.end);else if(v==-1&&y==1)d=m.end,c=m.start;else{var A=o(this.$clickSelection,d);d=A.cursor,c=A.anchor}l.selection.setSelectionAnchor(c.row,c.column)}l.selection.selectToPosition(d),l.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var a=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),c=Date.now();(a>h||c-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(a){var c=a.getDocumentPosition(),l=this.editor,d=l.session,m=d.getBracketRange(c);m?(m.isEmpty()&&(m.start.column--,m.end.column++),this.setState("select")):(m=l.selection.getWordRange(c.row,c.column),this.setState("selectByWords")),this.$clickSelection=m,this.select()},i.prototype.onTripleClick=function(a){var c=a.getDocumentPosition(),l=this.editor;this.setState("selectByLines");var d=l.getSelectionRange();d.isMultiLine()&&d.contains(c.row,c.column)?(this.$clickSelection=l.selection.getLineRange(d.start.row),this.$clickSelection.end=l.selection.getLineRange(d.end.row).end):this.$clickSelection=l.selection.getLineRange(c.row),this.select()},i.prototype.onQuadClick=function(a){var c=this.editor;c.selectAll(),this.$clickSelection=c.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var c=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var l=this.$lastScroll,d=a.domEvent.timeStamp,m=d-l.t,v=m?a.wheelX/m:l.vx,y=m?a.wheelY/m:l.vy;m<g&&(v=(v+l.vx)/2,y=(y+l.vy)/2);var A=Math.abs(v/y),S=!1;if(A>=1&&c.renderer.isScrollableBy(a.wheelX*a.speed,0)&&(S=!0),A<=1&&c.renderer.isScrollableBy(0,a.wheelY*a.speed)&&(S=!0),S)l.allowed=d;else if(d-l.allowed<g){var C=Math.abs(v)<=1.5*Math.abs(l.vx)&&Math.abs(y)<=1.5*Math.abs(l.vy);C?(S=!0,l.allowed=d):l.allowed=0}if(l.t=d,l.vx=v,l.vy=y,S)return c.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()}},i}();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,r.DefaultHandlers=s;function p(i,a,c,l){return Math.sqrt(Math.pow(c-i,2)+Math.pow(l-a,2))}function o(i,a){if(i.start.row==i.end.row)var c=2*a.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var c=a.column-4;else var c=2*a.row-i.start.row-i.end.row;return c<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(n,r,f){r.preventParentScroll=function(h){h.stopPropagation();var g=h.currentTarget,s=g.scrollHeight>g.clientHeight;s||h.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(n,r,f){var u=this&&this.__extends||function(){var d=function(m,v){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,A){y.__proto__=A}||function(y,A){for(var S in A)Object.prototype.hasOwnProperty.call(A,S)&&(y[S]=A[S])},d(m,v)};return function(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");d(m,v);function y(){this.constructor=m}m.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}(),h=this&&this.__values||function(d){var m=typeof Symbol=="function"&&Symbol.iterator,v=m&&d[m],y=0;if(v)return v.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&y>=d.length&&(d=void 0),{value:d&&d[y++],done:!d}}};throw new TypeError(m?"Object is not iterable.":"Symbol.iterator is not defined.")},g=n("./lib/dom");n("./lib/event");var s=n("./range").Range,p=n("./lib/scroll").preventParentScroll,o="ace_tooltip",i=function(){function d(m){this.isOpen=!1,this.$element=null,this.$parentNode=m}return d.prototype.$init=function(){return this.$element=g.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},d.prototype.getElement=function(){return this.$element||this.$init()},d.prototype.setText=function(m){this.getElement().textContent=m},d.prototype.setHtml=function(m){this.getElement().innerHTML=m},d.prototype.setPosition=function(m,v){this.getElement().style.left=m+"px",this.getElement().style.top=v+"px"},d.prototype.setClassName=function(m){g.addCssClass(this.getElement(),m)},d.prototype.setTheme=function(m){this.$element.className=o+" "+(m.isDark?"ace_dark ":"")+(m.cssClass||"")},d.prototype.show=function(m,v,y){m!=null&&this.setText(m),v!=null&&y!=null&&this.setPosition(v,y),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},d.prototype.hide=function(m){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},d.prototype.getHeight=function(){return this.getElement().offsetHeight},d.prototype.getWidth=function(){return this.getElement().offsetWidth},d.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},d}(),a=function(){function d(){this.popups=[]}return d.prototype.addPopup=function(m){this.popups.push(m),this.updatePopups()},d.prototype.removePopup=function(m){var v=this.popups.indexOf(m);v!==-1&&(this.popups.splice(v,1),this.updatePopups())},d.prototype.updatePopups=function(){var m,v,y,A;this.popups.sort(function(k,_){return _.priority-k.priority});var S=[];try{for(var C=h(this.popups),b=C.next();!b.done;b=C.next()){var R=b.value,L=!0;try{for(var E=(y=void 0,h(S)),M=E.next();!M.done;M=E.next()){var $=M.value;if(this.doPopupsOverlap($,R)){L=!1;break}}}catch(k){y={error:k}}finally{try{M&&!M.done&&(A=E.return)&&A.call(E)}finally{if(y)throw y.error}}L?S.push(R):R.hide()}}catch(k){m={error:k}}finally{try{b&&!b.done&&(v=C.return)&&v.call(C)}finally{if(m)throw m.error}}},d.prototype.doPopupsOverlap=function(m,v){var y=m.getElement().getBoundingClientRect(),A=v.getElement().getBoundingClientRect();return y.left<A.right&&y.right>A.left&&y.top<A.bottom&&y.bottom>A.top},d}(),c=new a;r.popupManager=c,r.Tooltip=i;var l=function(d){u(m,d);function m(v){v===void 0&&(v=document.body);var y=d.call(this,v)||this;y.timeout=void 0,y.lastT=0,y.idleTime=350,y.lastEvent=void 0,y.onMouseOut=y.onMouseOut.bind(y),y.onMouseMove=y.onMouseMove.bind(y),y.waitForHover=y.waitForHover.bind(y),y.hide=y.hide.bind(y);var A=y.getElement();return A.style.whiteSpace="pre-wrap",A.style.pointerEvents="auto",A.addEventListener("mouseout",y.onMouseOut),A.tabIndex=-1,A.addEventListener("blur",(function(){A.contains(document.activeElement)||this.hide()}).bind(y)),A.addEventListener("wheel",p),y}return m.prototype.addToEditor=function(v){v.on("mousemove",this.onMouseMove),v.on("mousedown",this.hide),v.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},m.prototype.removeFromEditor=function(v){v.off("mousemove",this.onMouseMove),v.off("mousedown",this.hide),v.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},m.prototype.onMouseMove=function(v,y){this.lastEvent=v,this.lastT=Date.now();var A=y.$mouseHandler.isMousePressed;if(this.isOpen){var S=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(S.row,S.column)||A||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||A||(this.lastEvent=v,this.timeout=setTimeout(this.waitForHover,this.idleTime))},m.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var v=Date.now()-this.lastT;if(this.idleTime-v>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-v);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},m.prototype.isOutsideOfText=function(v){var y=v.editor,A=v.getDocumentPosition(),S=y.session.getLine(A.row);if(A.column==S.length){var C=y.renderer.pixelToScreenCoordinates(v.clientX,v.clientY),b=y.session.documentToScreenPosition(A.row,A.column);if(b.column!=C.column||b.row!=C.row)return!0}return!1},m.prototype.setDataProvider=function(v){this.$gatherData=v},m.prototype.showForRange=function(v,y,A,S){var C=10;if(!(S&&S!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var b=v.renderer;this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(b.theme)),this.isOpen=!0,this.addMarker(y,v.session),this.range=s.fromPoints(y.start,y.end);var R=b.textToScreenCoordinates(y.start.row,y.start.column),L=b.scroller.getBoundingClientRect();R.pageX<L.left&&(R.pageX=L.left);var E=this.getElement();E.innerHTML="",E.appendChild(A),E.style.maxHeight="",E.style.display="block";var M=E.clientHeight,$=E.clientWidth,k=window.innerHeight-R.pageY-b.lineHeight,_=!0;R.pageY-M<0&&R.pageY<k&&(_=!1),E.style.maxHeight=(_?R.pageY:k)-C+"px",E.style.top=_?"":R.pageY+b.lineHeight+"px",E.style.bottom=_?window.innerHeight-R.pageY+"px":"",E.style.left=Math.min(R.pageX,window.innerWidth-$-C)+"px"}},m.prototype.addMarker=function(v,y){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=y,this.marker=y&&y.addMarker(v,"ace_highlight-marker","text")},m.prototype.hide=function(v){!v&&document.activeElement==this.getElement()||v&&v.target&&(v.type!="keydown"||v.ctrlKey||v.metaKey)&&this.$element.contains(v.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,c.removePopup(this)))},m.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},m.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},m.prototype.onMouseOut=function(v){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!v.relatedTarget||this.getElement().contains(v.relatedTarget)||v&&v.currentTarget.contains(v.relatedTarget)||v.relatedTarget.classList.contains("ace_content")||this.hide())},m}(i);r.HoverTooltip=l}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,f){var u=this&&this.__extends||function(){var c=function(l,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},c(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(l,d);function m(){this.constructor=l}l.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}(),h=this&&this.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,d=l&&c[l],m=0;if(d)return d.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&m>=c.length&&(c=void 0),{value:c&&c[m++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},g=n("../lib/dom"),s=n("../lib/event"),p=n("../tooltip").Tooltip,o=n("../config").nls;function i(c){var l=c.editor,d=l.renderer.$gutterLayer,m=new a(l);c.editor.setDefaultHandler("guttermousedown",function(b){if(!(!l.isFocused()||b.getButton()!=0)){var R=d.getRegion(b);if(R!="foldWidgets"){var L=b.getDocumentPosition().row,E=l.session.selection;if(b.getShiftKey())E.selectTo(L,0);else{if(b.domEvent.detail==2)return l.selectAll(),b.preventDefault();c.$clickSelection=l.selection.getLineRange(L)}return c.setState("selectByLines"),c.captureMouse(b),b.preventDefault()}}});var v,y;function A(){var b=y.getDocumentPosition().row,R=l.session.getLength();if(b==R){var L=l.renderer.pixelToScreenCoordinates(0,y.y).row,E=y.$pos;if(L>l.session.documentToScreenRow(E.row,E.column))return S()}if(m.showTooltip(b),!!m.isOpen)if(l.on("mousewheel",S),c.$tooltipFollowsMouse)C(y);else{var M=y.getGutterRow(),$=d.$lines.get(M);if($){var k=$.element.querySelector(".ace_gutter_annotation"),_=k.getBoundingClientRect(),w=m.getElement().style;w.left=_.right+"px",w.top=_.bottom+"px"}else C(y)}}function S(){v&&(v=clearTimeout(v)),m.isOpen&&(m.hideTooltip(),l.off("mousewheel",S))}function C(b){m.setPosition(b.x,b.y)}c.editor.setDefaultHandler("guttermousemove",function(b){var R=b.domEvent.target||b.domEvent.srcElement;if(g.hasCssClass(R,"ace_fold-widget"))return S();m.isOpen&&c.$tooltipFollowsMouse&&C(b),y=b,!v&&(v=setTimeout(function(){v=null,y&&!c.isMousePressed?A():S()},50))}),s.addListener(l.renderer.$gutter,"mouseout",function(b){y=null,!(!m.isOpen||v)&&(v=setTimeout(function(){v=null,S()},50))},l),l.on("changeSession",S),l.on("input",S)}r.GutterHandler=i;var a=function(c){u(l,c);function l(d){var m=c.call(this,d.container)||this;return m.editor=d,m}return l.prototype.setPosition=function(d,m){var v=window.innerWidth||document.documentElement.clientWidth,y=window.innerHeight||document.documentElement.clientHeight,A=this.getWidth(),S=this.getHeight();d+=15,m+=15,d+A>v&&(d-=d+A-v),m+S>y&&(m-=20+S),p.prototype.setPosition.call(this,d,m)},Object.defineProperty(l,"annotationLabels",{get:function(){return{error:{singular:o("error"),plural:o("errors")},warning:{singular:o("warning"),plural:o("warnings")},info:{singular:o("information message"),plural:o("information messages")}}},enumerable:!1,configurable:!0}),l.prototype.showTooltip=function(d){var m=this.editor.renderer.$gutterLayer,v=m.$annotations[d],y;v?y={text:Array.from(v.text),type:Array.from(v.type)}:y={text:[],type:[]};var A=m.session.getFoldLine(d);if(A&&m.$showFoldedAnnotations){for(var S={error:[],warning:[],info:[]},C,b=d+1;b<=A.end.row;b++)if(m.$annotations[b])for(var R=0;R<m.$annotations[b].text.length;R++){var L=m.$annotations[b].type[R];if(S[L].push(m.$annotations[b].text[R]),L==="error"){C="error_fold";continue}if(L==="warning"){C="warning_fold";continue}}if(C==="error_fold"||C==="warning_fold"){var E="".concat(l.annotationsToSummaryString(S)," in folded code.");y.text.push(E),y.type.push(C)}}if(y.text.length===0)return this.hide();for(var M={error:[],warning:[],info:[]},$=m.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",b=0;b<y.text.length;b++){var k="<span class='ace_".concat(y.type[b]," ").concat($,"' aria-label='").concat(l.annotationLabels[y.type[b].replace("_fold","")].singular,"' role=img> </span> ").concat(y.text[b]);M[y.type[b].replace("_fold","")].push(k)}var _=[].concat(M.error,M.warning,M.info).join("<br>");this.setHtml(_),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},l.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},l.annotationsToSummaryString=function(d){var m,v,y=[],A=["error","warning","info"];try{for(var S=h(A),C=S.next();!C.done;C=S.next()){var b=C.value;if(d[b].length){var R=d[b].length===1?l.annotationLabels[b].singular:l.annotationLabels[b].plural;y.push("".concat(d[b].length," ").concat(R))}}}catch(L){m={error:L}}finally{try{C&&!C.done&&(v=S.return)&&v.call(S)}finally{if(m)throw m.error}}return y.join(", ")},l}(p);r.GutterTooltip=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent"),g=function(){function s(p,o){this.speed,this.wheelX,this.wheelY,this.domEvent=p,this.editor=o,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 s.prototype.stopPropagation=function(){u.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){u.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var p=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(p,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-i},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var p=this.editor,o=p.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=o.contains(i.row,i.column)}return this.$inSelection},s.prototype.getButton=function(){return u.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return h.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s}();r.MouseEvent=g}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/event"),g=n("../lib/useragent"),s=200,p=200,o=5;function i(c){var l=c.editor,d=u.createElement("div");d.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",d.textContent=" ";var m=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];m.forEach(function(H){c[H]=this[H]},this),l.on("mousedown",this.onMouseDown.bind(c));var v=l.container,y,A,S,C,b,R,L=0,E,M,$,k,_;this.onDragStart=function(H){if(this.cancelDrag||!v.draggable){var z=this;return setTimeout(function(){z.startSelect(),z.captureMouse(H)},0),H.preventDefault()}b=l.getSelectionRange();var K=H.dataTransfer;K.effectAllowed=l.getReadOnly()?"copy":"copyMove",l.container.appendChild(d),K.setDragImage&&K.setDragImage(d,0,0),setTimeout(function(){l.container.removeChild(d)}),K.clearData(),K.setData("Text",l.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(H){if(v.draggable=!1,M=!1,this.setState(null),!l.getReadOnly()){var z=H.dataTransfer.dropEffect;!E&&z=="move"&&l.session.remove(l.getSelectionRange()),l.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(H){if(!(l.getReadOnly()||!W(H.dataTransfer)))return A=H.clientX,S=H.clientY,y||O(),L++,H.dataTransfer.dropEffect=E=j(H),h.preventDefault(H)},this.onDragOver=function(H){if(!(l.getReadOnly()||!W(H.dataTransfer)))return A=H.clientX,S=H.clientY,y||(O(),L++),F!==null&&(F=null),H.dataTransfer.dropEffect=E=j(H),h.preventDefault(H)},this.onDragLeave=function(H){if(L--,L<=0&&y)return I(),E=null,h.preventDefault(H)},this.onDrop=function(H){if(R){var z=H.dataTransfer;if(M)switch(E){case"move":b.contains(R.row,R.column)?b={start:R,end:R}:b=l.moveText(b,R);break;case"copy":b=l.moveText(b,R,!0);break}else{var K=z.getData("Text");b={start:R,end:l.session.insert(R,K)},l.focus(),E=null}return I(),h.preventDefault(H)}},h.addListener(v,"dragstart",this.onDragStart.bind(c),l),h.addListener(v,"dragend",this.onDragEnd.bind(c),l),h.addListener(v,"dragenter",this.onDragEnter.bind(c),l),h.addListener(v,"dragover",this.onDragOver.bind(c),l),h.addListener(v,"dragleave",this.onDragLeave.bind(c),l),h.addListener(v,"drop",this.onDrop.bind(c),l);function w(H,z){var K=Date.now(),q=!z||H.row!=z.row,U=!z||H.column!=z.column;if(!k||q||U)l.moveCursorToPosition(H),k=K,_={x:A,y:S};else{var X=a(_.x,_.y,A,S);X>o?k=null:K-k>=p&&(l.renderer.scrollCursorIntoView(),k=null)}}function x(H,z){var K=Date.now(),q=l.renderer.layerConfig.lineHeight,U=l.renderer.layerConfig.characterWidth,X=l.renderer.scroller.getBoundingClientRect(),Y={x:{left:A-X.left,right:X.right-A},y:{top:S-X.top,bottom:X.bottom-S}},V=Math.min(Y.x.left,Y.x.right),ee=Math.min(Y.y.top,Y.y.bottom),D={row:H.row,column:H.column};V/U<=2&&(D.column+=Y.x.left<Y.x.right?-3:2),ee/q<=1&&(D.row+=Y.y.top<Y.y.bottom?-1:1);var B=H.row!=D.row,G=H.column!=D.column,J=!z||H.row!=z.row;B||G&&!J?$?K-$>=s&&l.renderer.scrollCursorIntoView(D):$=K:$=null}function T(){var H=R;R=l.renderer.screenToTextCoordinates(A,S),w(R,H),x(R,H)}function O(){b=l.selection.toOrientedRange(),y=l.session.addMarker(b,"ace_selection",l.getSelectionStyle()),l.clearSelection(),l.isFocused()&&l.renderer.$cursorLayer.setBlinking(!1),clearInterval(C),T(),C=setInterval(T,20),L=0,h.addListener(document,"mousemove",P)}function I(){clearInterval(C),l.session.removeMarker(y),y=null,l.selection.fromOrientedRange(b),l.isFocused()&&!M&&l.$resetCursorStyle(),b=null,R=null,L=0,$=null,k=null,h.removeListener(document,"mousemove",P)}var F=null;function P(){F==null&&(F=setTimeout(function(){F!=null&&y&&I()},20))}function W(H){var z=H.types;return!z||Array.prototype.some.call(z,function(K){return K=="text/plain"||K=="Text"})}function j(H){var z=["copy","copymove","all","uninitialized"],K=["move","copymove","linkmove","all","uninitialized"],q=g.isMac?H.altKey:H.ctrlKey,U="uninitialized";try{U=H.dataTransfer.effectAllowed.toLowerCase()}catch{}var X="none";return q&&z.indexOf(U)>=0?X="copy":K.indexOf(U)>=0?X="move":z.indexOf(U)>=0&&(X="copy"),X}}(function(){this.dragWait=function(){var c=Date.now()-this.mousedownEvent.time;c>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var c=this.editor.container;c.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(c){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var c=this.editor,l=c.container;l.draggable=!0,c.renderer.$cursorLayer.setBlinking(!1),c.setStyle("ace_dragging");var d=g.isWin?"default":"move";c.renderer.setCursorStyle(d),this.setState("dragReady")},this.onMouseDrag=function(c){var l=this.editor.container;if(g.isIE&&this.state=="dragReady"){var d=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>3&&l.dragDrop()}if(this.state==="dragWait"){var d=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);d>0&&(l.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(c){if(this.$dragEnabled){this.mousedownEvent=c;var l=this.editor,d=c.inSelection(),m=c.getButton(),v=c.domEvent.detail||1;if(v===1&&m===0&&d){if(c.editor.inMultiSelectMode&&(c.getAccelKey()||c.getShiftKey()))return;this.mousedownEvent.time=Date.now();var y=c.domEvent.target||c.domEvent.srcElement;if("unselectable"in y&&(y.unselectable="on"),l.getDragDelay()){if(g.isWebKit){this.cancelDrag=!0;var A=l.container;A.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(c,this.onMouseDrag.bind(this)),c.defaultPrevented=!0}}}}).call(i.prototype);function a(c,l,d,m){return Math.sqrt(Math.pow(d-c,2)+Math.pow(m-l,2))}r.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,f){var u=n("./mouse_event").MouseEvent,h=n("../lib/event"),g=n("../lib/dom");r.addTouchListeners=function(s,p){var o="scroll",i,a,c,l,d,m,v=0,y,A=0,S=0,C=0,b,R;function L(){var w=window.navigator&&window.navigator.clipboard,x=!1,T=function(){var I=p.getCopyText(),F=p.session.getUndoManager().hasUndo();R.replaceChild(g.buildDom(x?["span",!I&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],I&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],I&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],w&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],F&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),R.firstChild)},O=function(I){var F=I.target.getAttribute("action");if(F=="more"||!x)return x=!x,T();F=="paste"?w.readText().then(function(P){p.execCommand(F,P)}):F&&((F=="cut"||F=="copy")&&(w?w.writeText(p.getCopyText()):document.execCommand("copy")),p.execCommand(F)),R.firstChild.style.display="none",x=!1,F!="openCommandPalette"&&p.focus()};R=g.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(I){o="menu",I.stopPropagation(),I.preventDefault(),p.textInput.focus()},ontouchend:function(I){I.stopPropagation(),I.preventDefault(),O(I)},onclick:O},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],p.container)}function E(){R||L();var w=p.selection.cursor,x=p.renderer.textToScreenCoordinates(w.row,w.column),T=p.renderer.textToScreenCoordinates(0,0).pageX,O=p.renderer.scrollLeft,I=p.container.getBoundingClientRect();R.style.top=x.pageY-I.top-3+"px",x.pageX-I.left<I.width-70?(R.style.left="",R.style.right="10px"):(R.style.right="",R.style.left=T+O-I.left+"px"),R.style.display="",R.firstChild.style.display="none",p.on("input",M)}function M(w){R&&(R.style.display="none"),p.off("input",M)}function $(){d=null,clearTimeout(d);var w=p.selection.getRange(),x=w.contains(y.row,y.column);(w.isEmpty()||!x)&&(p.selection.moveToPosition(y),p.selection.selectWord()),o="wait",E()}function k(){d=null,clearTimeout(d),p.selection.moveToPosition(y);var w=A>=2?p.selection.getLineRange(y.row):p.session.getBracketRange(y);w&&!w.isEmpty()?p.selection.setRange(w):p.selection.selectWord(),o="wait"}h.addListener(s,"contextmenu",function(w){if(b){var x=p.textInput.getElement();x.focus()}},p),h.addListener(s,"touchstart",function(w){var x=w.touches;if(d||x.length>1){clearTimeout(d),d=null,c=-1,o="zoom";return}b=p.$mouseHandler.isMousePressed=!0;var T=p.renderer.layerConfig.lineHeight,O=p.renderer.layerConfig.lineHeight,I=w.timeStamp;l=I;var F=x[0],P=F.clientX,W=F.clientY;Math.abs(i-P)+Math.abs(a-W)>T&&(c=-1),i=w.clientX=P,a=w.clientY=W,S=C=0;var j=new u(w,p);if(y=j.getDocumentPosition(),I-c<500&&x.length==1&&!v)A++,w.preventDefault(),w.button=0,k();else{A=0;var H=p.selection.cursor,z=p.selection.isEmpty()?H:p.selection.anchor,K=p.renderer.$cursorLayer.getPixelPosition(H,!0),q=p.renderer.$cursorLayer.getPixelPosition(z,!0),U=p.renderer.scroller.getBoundingClientRect(),X=p.renderer.layerConfig.offset,Y=p.renderer.scrollLeft,V=function(B,G){return B=B/O,G=G/T-.75,B*B+G*G};if(w.clientX<U.left){o="zoom";return}var ee=V(w.clientX-U.left-K.left+Y,w.clientY-U.top-K.top+X),D=V(w.clientX-U.left-q.left+Y,w.clientY-U.top-q.top+X);ee<3.5&&D<3.5&&(o=ee>D?"cursor":"anchor"),D<3.5?o="anchor":ee<3.5?o="cursor":o="scroll",d=setTimeout($,450)}c=I},p),h.addListener(s,"touchend",function(w){b=p.$mouseHandler.isMousePressed=!1,m&&clearInterval(m),o=="zoom"?(o="",v=0):d?(p.selection.moveToPosition(y),v=0,E()):o=="scroll"?(_(),M()):E(),clearTimeout(d),d=null},p),h.addListener(s,"touchmove",function(w){d&&(clearTimeout(d),d=null);var x=w.touches;if(!(x.length>1||o=="zoom")){var T=x[0],O=i-T.clientX,I=a-T.clientY;if(o=="wait")if(O*O+I*I>4)o="cursor";else return w.preventDefault();i=T.clientX,a=T.clientY,w.clientX=T.clientX,w.clientY=T.clientY;var F=w.timeStamp,P=F-l;if(l=F,o=="scroll"){var W=new u(w,p);W.speed=1,W.wheelX=O,W.wheelY=I,10*Math.abs(O)<Math.abs(I)&&(O=0),10*Math.abs(I)<Math.abs(O)&&(I=0),P!=0&&(S=O/P,C=I/P),p._emit("mousewheel",W),W.propagationStopped||(S=C=0)}else{var j=new u(w,p),H=j.getDocumentPosition();o=="cursor"?p.selection.moveCursorToPosition(H):o=="anchor"&&p.selection.setSelectionAnchor(H.row,H.column),p.renderer.scrollCursorIntoView(H),w.preventDefault()}}},p);function _(){v+=60,m=setInterval(function(){v--<=0&&(clearInterval(m),m=null),Math.abs(S)<.01&&(S=0),Math.abs(C)<.01&&(C=0),v<20&&(S=.9*S),v<20&&(C=.9*C);var w=p.session.getScrollTop();p.renderer.scrollBy(10*S,10*C),w==p.session.getScrollTop()&&(v=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent"),g=n("./default_handlers").DefaultHandlers,s=n("./default_gutter_handler").GutterHandler,p=n("./mouse_event").MouseEvent,o=n("./dragdrop_handler").DragdropHandler,i=n("./touch_handler").addTouchListeners,a=n("../config"),c=function(){function l(d){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var m=this;this.editor=d,new g(this),new s(this),new o(this);var v=function(S){var C=!document.hasFocus||!document.hasFocus()||!d.isFocused()&&document.activeElement==(d.textInput&&d.textInput.getElement());C&&window.focus(),d.focus(),setTimeout(function(){d.isFocused()||d.focus()})},y=d.renderer.getMouseEventTarget();u.addListener(y,"click",this.onMouseEvent.bind(this,"click"),d),u.addListener(y,"mousemove",this.onMouseMove.bind(this,"mousemove"),d),u.addMultiMouseDownListener([y,d.renderer.scrollBarV&&d.renderer.scrollBarV.inner,d.renderer.scrollBarH&&d.renderer.scrollBarH.inner,d.textInput&&d.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",d),u.addMouseWheelListener(d.container,this.onMouseWheel.bind(this,"mousewheel"),d),i(d.container,d);var A=d.renderer.$gutter;u.addListener(A,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),d),u.addListener(A,"click",this.onMouseEvent.bind(this,"gutterclick"),d),u.addListener(A,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),d),u.addListener(A,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),d),u.addListener(y,"mousedown",v,d),u.addListener(A,"mousedown",v,d),h.isIE&&d.renderer.scrollBarV&&(u.addListener(d.renderer.scrollBarV.element,"mousedown",v,d),u.addListener(d.renderer.scrollBarH.element,"mousedown",v,d)),d.on("mousemove",function(S){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var C=d.renderer.screenToTextCoordinates(S.x,S.y),b=d.session.selection.getRange(),R=d.renderer;!b.isEmpty()&&b.insideStart(C.row,C.column)?R.setCursorStyle("default"):R.setCursorStyle("")}},d)}return l.prototype.onMouseEvent=function(d,m){this.editor.session&&this.editor._emit(d,new p(m,this.editor))},l.prototype.onMouseMove=function(d,m){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(d,new p(m,this.editor))},l.prototype.onMouseWheel=function(d,m){var v=new p(m,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(d,v)},l.prototype.setState=function(d){this.state=d},l.prototype.captureMouse=function(d,m){this.x=d.x,this.y=d.y,this.isMousePressed=!0;var v=this.editor,y=this.editor.renderer;y.$isMousePressed=!0;var A=this,S=function(E){if(E){if(h.isWebKit&&!E.which&&A.releaseMouse)return A.releaseMouse();A.x=E.clientX,A.y=E.clientY,m&&m(E),A.mouseEvent=new p(E,A.editor),A.$mouseMoved=!0}},C=function(E){v.off("beforeEndOperation",R),clearInterval(L),v.session&&b(),A[A.state+"End"]&&A[A.state+"End"](E),A.state="",A.isMousePressed=y.$isMousePressed=!1,y.$keepTextAreaAtCursor&&y.$moveTextAreaToCursor(),A.$onCaptureMouseMove=A.releaseMouse=null,E&&A.onMouseEvent("mouseup",E),v.endOperation()},b=function(){A[A.state]&&A[A.state](),A.$mouseMoved=!1};if(h.isOldIE&&d.domEvent.type=="dblclick")return setTimeout(function(){C(d)});var R=function(E){A.releaseMouse&&v.curOp.command.name&&v.curOp.selectionChanged&&(A[A.state+"End"]&&A[A.state+"End"](),A.state="",A.releaseMouse())};v.on("beforeEndOperation",R),v.startOperation({command:{name:"mouse"}}),A.$onCaptureMouseMove=S,A.releaseMouse=u.capture(this.editor.container,S,C);var L=setInterval(b,20)},l.prototype.cancelContextMenu=function(){var d=(function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",d),m&&m.domEvent&&u.stopEvent(m.domEvent))}).bind(this);setTimeout(d,10),this.editor.on("nativecontextmenu",d)},l.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},l}();c.prototype.releaseMouse=null,a.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:h.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=c}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s){s.on("click",function(p){var o=p.getDocumentPosition(),i=s.session,a=i.getFoldAt(o.row,o.column,1);a&&(p.getAccelKey()?i.removeFold(a):i.expandFold(a),p.stop());var c=p.domEvent&&p.domEvent.target;c&&u.hasCssClass(c,"ace_inline_button")&&u.hasCssClass(c,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(p){var o=s.renderer.$gutterLayer.getRegion(p);if(o=="foldWidgets"){var i=p.getDocumentPosition().row,a=s.session;a.foldWidgets&&a.foldWidgets[i]&&s.session.onFoldWidgetClick(i,p),s.isFocused()||s.focus(),p.stop()}}),s.on("gutterdblclick",function(p){var o=s.renderer.$gutterLayer.getRegion(p);if(o=="foldWidgets"){var i=p.getDocumentPosition().row,a=s.session,c=a.getParentFoldRangeData(i,!0),l=c.range||c.firstRange;if(l){i=l.start.row;var d=a.getFoldAt(i,a.getLine(i).length,1);d?a.removeFold(d):(a.addFold("...",l),s.renderer.scrollCursorIntoView({row:l.start.row,column:0}))}p.stop()}})}return g}();r.FoldHandler=h}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,f){var u=n("../lib/keys"),h=n("../lib/event"),g=function(){function s(p){this.$editor=p,this.$data={editor:p},this.$handlers=[],this.setDefaultHandler(p.commands)}return s.prototype.setDefaultHandler=function(p){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=p,this.addKeyboardHandler(p,0)},s.prototype.setKeyboardHandler=function(p){var o=this.$handlers;if(o[o.length-1]!=p){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(p,1)}},s.prototype.addKeyboardHandler=function(p,o){if(p){typeof p=="function"&&!p.handleKeyboard&&(p.handleKeyboard=p);var i=this.$handlers.indexOf(p);i!=-1&&this.$handlers.splice(i,1),o==null?this.$handlers.push(p):this.$handlers.splice(o,0,p),i==-1&&p.attach&&p.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(p){var o=this.$handlers.indexOf(p);return o==-1?!1:(this.$handlers.splice(o,1),p.detach&&p.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var p=this.$data,o=p.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(o,p)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(p,o,i,a){for(var c,l=!1,d=this.$editor.commands,m=this.$handlers.length;m--&&(c=this.$handlers[m].handleKeyboard(this.$data,p,o,i,a),!(!(!c||!c.command)&&(c.command=="null"?l=!0:l=d.exec(c.command,this.$editor,c.args,a),l&&a&&p!=-1&&c.passEvent!=!0&&c.command.passEvent!=!0&&h.stopEvent(a),l))););return!l&&p==-1&&(c={command:"insertstring"},l=d.exec("insertstring",this.$editor,o)),l&&this.$editor._signal&&this.$editor._signal("keyboardActivity",c),l},s.prototype.onCommandKey=function(p,o,i){var a=u.keyCodeToString(i);return this.$callKeyboardHandlers(o,a,i,p)},s.prototype.onTextInput=function(p){return this.$callKeyboardHandlers(-1,p)},s}();r.KeyBinding=g}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,f){var u=0,h=0,g=!1,s=!1,p=!1,o=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],i=[[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]],a=0,c=1,l=0,d=1,m=2,v=3,y=4,A=5,S=6,C=7,b=8,R=9,L=10,E=11,M=12,$=13,k=14,_=15,w=16,x=17,T=18,O=[T,T,T,T,T,T,T,T,T,S,A,S,b,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,A,A,A,S,b,y,y,E,E,E,y,y,y,y,y,L,R,L,R,R,m,m,m,m,m,m,m,m,m,m,R,y,y,y,y,y,y,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,y,y,y,y,y,y,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,l,y,y,y,y,T,T,T,T,T,T,A,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,R,y,E,E,E,E,y,y,y,y,l,y,y,T,y,y,E,E,m,m,y,l,y,y,y,m,l,y,y,y,y,y],I=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,l,d,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b,A,$,k,_,w,x,R,E,E,E,E,E,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,R,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b];function F(H,z,K,q){var U=u?i:o,X=null,Y=null,V=null,ee=0,D=null,B=null,G=-1,J=null,te=null,re=[];if(!q)for(J=0,q=[];J<K;J++)q[J]=j(H[J]);for(h=u,g=!1,s=!1,p=!1,te=0;te<K;te++){if(X=ee,re[te]=Y=W(H,q,re,te),ee=U[X][Y],D=ee&240,ee&=15,z[te]=V=U[ee][5],D>0)if(D==16){for(J=G;J<te;J++)z[J]=1;G=-1}else G=-1;if(B=U[ee][6],B)G==-1&&(G=te);else if(G>-1){for(J=G;J<te;J++)z[J]=V;G=-1}q[te]==A&&(z[te]=0),h|=V}if(p){for(J=0;J<K;J++)if(q[J]==S){z[J]=u;for(var ue=J-1;ue>=0&&q[ue]==b;ue--)z[ue]=u}}}function P(H,z,K){if(!(h<H)){if(H==1&&u==c&&!s){K.reverse();return}for(var q=K.length,U=0,X,Y,V,ee;U<q;){if(z[U]>=H){for(X=U+1;X<q&&z[X]>=H;)X++;for(Y=U,V=X-1;Y<V;Y++,V--)ee=K[Y],K[Y]=K[V],K[V]=ee;U=X}U++}}}function W(H,z,K,q){var U=z[q],X,Y,V,ee;switch(U){case l:case d:g=!1;case y:case v:return U;case m:return g?v:m;case C:return g=!0,d;case b:return y;case R:return q<1||q+1>=z.length||(X=K[q-1])!=m&&X!=v||(Y=z[q+1])!=m&&Y!=v?y:(g&&(Y=v),Y==X?Y:y);case L:return X=q>0?K[q-1]:A,X==m&&q+1<z.length&&z[q+1]==m?m:y;case E:if(q>0&&K[q-1]==m)return m;if(g)return y;for(ee=q+1,V=z.length;ee<V&&z[ee]==E;)ee++;return ee<V&&z[ee]==m?m:y;case M:for(V=z.length,ee=q+1;ee<V&&z[ee]==M;)ee++;if(ee<V){var D=H[q],B=D>=1425&&D<=2303||D==64286;if(X=z[ee],B&&(X==d||X==C))return d}return q<1||(X=z[q-1])==A?y:K[q-1];case A:return g=!1,s=!0,u;case S:return p=!0,y;case $:case k:case w:case x:case _:g=!1;case T:return y}}function j(H){var z=H.charCodeAt(0),K=z>>8;return K==0?z>191?l:O[z]:K==5?/[\u0591-\u05f4]/.test(H)?d:l:K==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(H)?M:/[\u0660-\u0669\u066b-\u066c]/.test(H)?v:z==1642?E:/[\u06f0-\u06f9]/.test(H)?m:C:K==32&&z<=8287?I[z&255]:K==254&&z>=65136?C:y}r.L=l,r.R=d,r.EN=m,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(H,z,K){if(H.length<2)return{};var q=H.split(""),U=new Array(q.length),X=new Array(q.length),Y=[];u=K?c:a,F(q,Y,q.length,z);for(var V=0;V<U.length;U[V]=V,V++);P(2,Y,U),P(1,Y,U);for(var V=0;V<U.length-1;V++)z[V]===v?Y[V]=r.AN:Y[V]===d&&(z[V]>C&&z[V]<$||z[V]===y||z[V]===T)?Y[V]=r.ON_R:V>0&&q[V-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(q[V])&&(Y[V-1]=Y[V]=r.R_H,V++);q[q.length-1]===r.DOT&&(Y[q.length-1]=r.B),q[0]===""&&(Y[0]=r.RLE);for(var V=0;V<U.length;V++)X[V]=Y[U[V]];return{logicalFromVisual:U,bidiLevels:X}},r.hasBidiCharacters=function(H,z){for(var K=!1,q=0;q<H.length;q++)z[q]=j(H.charAt(q)),!K&&(z[q]==d||z[q]==C||z[q]==v)&&(K=!0);return K},r.getVisualFromLogicalIdx=function(H,z){for(var K=0;K<z.logicalFromVisual.length;K++)if(z.logicalFromVisual[K]==H)return K;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,f){var u=n("./lib/bidiutil"),h=n("./lib/lang"),g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function p(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=u,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=g.test(o.getValue())}return p.prototype.isBidiRow=function(o,i,a){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(i,a),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},p.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&g.test(o.lines.join(`
|
995
|
+
`))&&(this.seenBidi=!0,this.currentRow=null)},p.prototype.getDocumentRow=function(){var o=0,i=this.session.$screenRowCache;if(i.length){var a=this.session.$getRowCacheIndex(i,this.currentRow);a>=0&&(o=this.session.$docRowCache[a])}return o},p.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var a,c=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(a=this.session.$getRowCacheIndex(i,this.currentRow-o-1),a===c);)c=a,o++;else o=this.currentRow;return o},p.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var a=o===this.session.getLength()-1,c=a?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var l=this.session.$wrapData[o];l&&(i===void 0&&(i=this.getSplitIndex()),i>0&&l.length?(this.wrapIndent=l.indent,this.wrapOffset=this.wrapIndent*this.charWidths[u.L],this.line=i<l.length?this.line.substring(l[i-1],l[i]):this.line.substring(l[l.length-1])):this.line=this.line.substring(0,l[i]),i==l.length&&(this.line+=this.showInvisibles?c:u.DOT))}else this.line+=this.showInvisibles?c:u.DOT;var d=this.session,m=0,v;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(y,A){return y===" "||d.isFullWidth(y.charCodeAt(0))?(v=y===" "?d.getScreenTabSize(A+m):2,m+=v-1,h.stringRepeat(u.DOT,v)):y}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==u.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 o=[];u.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=u.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},p.prototype.markAsDirty=function(){this.currentRow=null},p.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var i=this.characterWidth=o.$characterSize.width,a=o.$measureCharWidth("ה");this.charWidths[u.L]=this.charWidths[u.EN]=this.charWidths[u.ON_R]=i,this.charWidths[u.R]=this.charWidths[u.AN]=a,this.charWidths[u.R_H]=a*.45,this.charWidths[u.B]=this.charWidths[u.RLE]=0,this.currentRow=null}},p.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},p.prototype.setEolChar=function(o){this.EOL=o},p.prototype.setContentWidth=function(o){this.contentWidth=o},p.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},p.prototype.setRtlDirection=function(o,i){for(var a=o.getCursorPosition(),c=o.selection.getSelectionAnchor().row;c<=a.row;c++)!i&&o.session.getLine(c).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(c,0,1):i&&o.session.getLine(c).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:c},o.session.$bidiHandler.RLE)},p.prototype.getPosLeft=function(o){o-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,a=o>i?this.session.getOverwrite()?o:o-1:i,c=u.getVisualFromLogicalIdx(a,this.bidiMap),l=this.bidiMap.bidiLevels,d=0;!this.session.getOverwrite()&&o<=i&&l[c]%2!==0&&c++;for(var m=0;m<c;m++)d+=this.charWidths[l[m]];return!this.session.getOverwrite()&&o>i&&l[c]%2===0&&(d+=this.charWidths[l[c]]),this.wrapIndent&&(d+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(d+=this.rtlLineOffset),d},p.prototype.getSelections=function(o,i){var a=this.bidiMap,c=a.bidiLevels,l,d=[],m=0,v=Math.min(o,i)-this.wrapIndent,y=Math.max(o,i)-this.wrapIndent,A=!1,S=!1,C=0;this.wrapIndent&&(m+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,R=0;R<c.length;R++)b=a.logicalFromVisual[R],l=c[R],A=b>=v&&b<y,A&&!S?C=m:!A&&S&&d.push({left:C,width:m-C}),m+=this.charWidths[l],S=A;if(A&&R===c.length&&d.push({left:C,width:m-C}),this.isRtlDir)for(var L=0;L<d.length;L++)d[L].left+=this.rtlLineOffset;return d},p.prototype.offsetToCol=function(a){this.isRtlDir&&(a-=this.rtlLineOffset);var i=0,a=Math.max(a,0),c=0,l=0,d=this.bidiMap.bidiLevels,m=this.charWidths[d[l]];for(this.wrapIndent&&(a-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);a>c+m/2;){if(c+=m,l===d.length-1){m=0;break}m=this.charWidths[d[++l]]}return l>0&&d[l-1]%2!==0&&d[l]%2===0?(a<c&&l--,i=this.bidiMap.logicalFromVisual[l]):l>0&&d[l-1]%2===0&&d[l]%2!==0?i=1+(a>c?this.bidiMap.logicalFromVisual[l]:this.bidiMap.logicalFromVisual[l-1]):this.isRtlDir&&l===d.length-1&&m===0&&d[l-1]%2===0||!this.isRtlDir&&l===0&&d[l]%2!==0?i=1+this.bidiMap.logicalFromVisual[l]:(l>0&&d[l-1]%2!==0&&m!==0&&l--,i=this.bidiMap.logicalFromVisual[l]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},p}();r.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/lang"),g=n("./lib/event_emitter").EventEmitter,s=n("./range").Range,p=function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var a=this;this.cursor.on("change",function(c){a.$cursorChanged=!0,a.$silent||a._emit("changeCursor"),!a.$isEmpty&&!a.$silent&&a._emit("changeSelection"),!a.$keepDesiredColumnOnChange&&c.old.column!=c.value.column&&(a.$desiredColumn=null)}),this.anchor.on("change",function(){a.$anchorChanged=!0,!a.$isEmpty&&!a.$silent&&a._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,a){this.$isEmpty=!1,this.anchor.setPosition(i,a)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,a=this.lead;return i.row>a.row||i.row==a.row&&i.column>a.column},o.prototype.getRange=function(){var i=this.anchor,a=this.lead;return this.$isEmpty?s.fromPoints(a,a):this.isBackwards()?s.fromPoints(a,i):s.fromPoints(i,a)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,a){var c=a?i.end:i.start,l=a?i.start:i.end;this.$setSelection(c.row,c.column,l.row,l.column)},o.prototype.$setSelection=function(i,a,c,l){if(!this.$silent){var d=this.$isEmpty,m=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,a),this.cursor.setPosition(c,l),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||d!=this.$isEmpty||m)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var a=this.lead;this.$isEmpty&&this.setSelectionAnchor(a.row,a.column),i.call(this)},o.prototype.selectTo=function(i,a){this.$moveSelection(function(){this.moveCursorTo(i,a)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,a){this.clearSelection(),this.moveCursorTo(i,a)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,a){if(typeof a>"u"){var c=i||this.lead;i=c.row,a=c.column}return this.session.getWordRange(i,a)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),a=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(a)},o.prototype.getLineRange=function(i,a){var c=typeof i=="number"?i:this.lead.row,l,d=this.session.getFoldLine(c);return d?(c=d.start.row,l=d.end.row):l=c,a===!0?new s(c,0,l,this.session.getLine(l).length):new s(c,0,l+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,a,c){var l=i.column,d=i.column+a;return c<0&&(l=i.column-a,d=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(l,d).split(" ").length-1==a},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),a;if(a=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var c=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,c,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),a;if(a=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,c,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var i=this.lead.row,a=this.lead.column,c=this.session.documentToScreenRow(i,a),l=this.session.screenToDocumentPosition(c,0),d=this.session.getDisplayLine(i,null,l.row,l.column),m=d.match(/^\s*/);m[0].length!=a&&!this.session.$useEmacsStyleLineStart&&(l.column+=m[0].length),this.moveCursorToPosition(l)},o.prototype.moveCursorLineEnd=function(){var i=this.lead,a=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==a.column){var c=this.session.getLine(a.row);if(a.column==c.length){var l=c.search(/\s+$/);l>0&&(a.column=l)}}this.moveCursorTo(a.row,a.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,a=this.doc.getLine(i).length;this.moveCursorTo(i,a)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,a=this.lead.column,c=this.doc.getLine(i),l=c.substring(a);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var d=this.session.getFoldAt(i,a,1);if(d){this.moveCursorTo(d.end.row,d.end.column);return}if(this.session.nonTokenRe.exec(l)&&(a+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,l=c.substring(a)),a>=c.length){this.moveCursorTo(i,c.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(l)&&(a+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,a)},o.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(i,a,-1)){this.moveCursorTo(c.start.row,c.start.column);return}var l=this.session.getFoldStringAt(i,a,-1);l==null&&(l=this.doc.getLine(i).substring(0,a));var d=h.stringReverse(l);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(d)&&(a-=this.session.nonTokenRe.lastIndex,d=d.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),a<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(d)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,a)},o.prototype.$shortWordEndIndex=function(i){var a=0,c,l=/\s/,d=this.session.tokenRe;if(d.lastIndex=0,this.session.tokenRe.exec(i))a=this.session.tokenRe.lastIndex;else{for(;(c=i[a])&&l.test(c);)a++;if(a<1){for(d.lastIndex=0;(c=i[a])&&!d.test(c);)if(d.lastIndex=0,a++,l.test(c))if(a>2){a--;break}else{for(;(c=i[a])&&l.test(c);)a++;if(a>2)break}}}return d.lastIndex=0,a},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,a=this.lead.column,c=this.doc.getLine(i),l=c.substring(a),d=this.session.getFoldAt(i,a,1);if(d)return this.moveCursorTo(d.end.row,d.end.column);if(a==c.length){var m=this.doc.getLength();do i++,l=this.doc.getLine(i);while(i<m&&/^\s*$/.test(l));/^\s+/.test(l)||(l=""),a=0}var v=this.$shortWordEndIndex(l);this.moveCursorTo(i,a+v)},o.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,a=this.lead.column,c;if(c=this.session.getFoldAt(i,a,-1))return this.moveCursorTo(c.start.row,c.start.column);var l=this.session.getLine(i).substring(0,a);if(a===0){do i--,l=this.doc.getLine(i);while(i>0&&/^\s*$/.test(l));a=l.length,/\s+$/.test(l)||(l="")}var d=h.stringReverse(l),m=this.$shortWordEndIndex(d);return this.moveCursorTo(i,a-m)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,a){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column),l;if(a===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(c.row,this.lead.row)?(l=this.session.$bidiHandler.getPosLeft(c.column),c.column=Math.round(l/this.session.$bidiHandler.charWidths[0])):l=c.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var d=this.session.lineWidgets[this.lead.row];i<0?i-=d.rowsAbove||0:i>0&&(i+=d.rowCount-(d.rowsAbove||0))}var m=this.session.screenToDocumentPosition(c.row+i,c.column,l);i!==0&&a===0&&m.row===this.lead.row&&(m.column,this.lead.column),this.moveCursorTo(m.row,m.column+a,a===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,a,c){var l=this.session.getFoldAt(i,a,1);l&&(i=l.start.row,a=l.start.column),this.$keepDesiredColumnOnChange=!0;var d=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(d.charAt(a))&&d.charAt(a-1)&&(this.lead.row==i&&this.lead.column==a+1?a=a-1:a=a+1),this.lead.setPosition(i,a),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,a,c){var l=this.session.screenToDocumentPosition(i,a);this.moveCursorTo(l.row,l.column,c)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var a=this.getRange();return i?(i.start.column=a.start.column,i.start.row=a.start.row,i.end.column=a.end.column,i.end.row=a.end.row):i=a,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var a=this.getCursor();try{i(this);var c=this.getCursor();return s.fromPoints(a,c)}catch{return s.fromPoints(a,a)}finally{this.moveCursorToPosition(a)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(a){var c=a.clone();return c.isBackwards=a.cursor==a.start,c});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var a=i.length;a--;){var c=s.fromPoints(i[a].start,i[a].end);i[a].isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var a=this.ranges.length;a--;)if(!this.ranges[a].isEqual(i[a]))return!1;return!0},o}();p.prototype.setSelectionAnchor=p.prototype.setAnchor,p.prototype.getSelectionAnchor=p.prototype.getAnchor,p.prototype.setSelectionRange=p.prototype.setRange,u.implement(p.prototype,g),r.Selection=p}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(n,r,f){var u=n("./lib/report_error").reportError,h=2e3,g=function(){function s(p){this.splitRegex,this.states=p,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],a=[],c=0,l=this.matchMappings[o]={defaultToken:"text"},d="g",m=[],v=0;v<i.length;v++){var y=i[v];if(y.defaultToken&&(l.defaultToken=y.defaultToken),y.caseInsensitive&&d.indexOf("i")===-1&&(d+="i"),y.unicode&&d.indexOf("u")===-1&&(d+="u"),y.regex!=null){y.regex instanceof RegExp&&(y.regex=y.regex.toString().slice(1,-1));var A=y.regex,S=new RegExp("(?:("+A+")|(.))").exec("a").length-2;Array.isArray(y.token)?y.token.length==1||S==1?y.token=y.token[0]:S-1!=y.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:y,groupCount:S-1}),y.token=y.token[0]):(y.tokenArray=y.token,y.token=null,y.onMatch=this.$arrayTokens):typeof y.token=="function"&&!y.onMatch&&(S>1?y.onMatch=this.$applyToken:y.onMatch=y.token),S>1&&(/\\\d/.test(y.regex)?A=y.regex.replace(/\\([0-9]+)/g,function(C,b){return"\\"+(parseInt(b,10)+c+1)}):(S=1,A=this.removeCapturingGroups(y.regex)),!y.splitRegex&&typeof y.token!="string"&&m.push(y)),l[c]=v,c+=S,a.push(A),y.onMatch||(y.onMatch=null)}}a.length||(l[0]=0,a.push("$")),m.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,d)},this),this.regExps[o]=new RegExp("("+a.join(")|(")+")|($)",d)}}return s.prototype.$setMaxTokenCount=function(p){h=p|0},s.prototype.$applyToken=function(p){var o=this.splitRegex.exec(p).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:p}];for(var a=[],c=0,l=i.length;c<l;c++)o[c]&&(a[a.length]={type:i[c],value:o[c]});return a},s.prototype.$arrayTokens=function(p){if(!p)return[];var o=this.splitRegex.exec(p);if(!o)return"text";for(var i=[],a=this.tokenArray,c=0,l=a.length;c<l;c++)o[c+1]&&(i[i.length]={type:a[c],value:o[c+1]});return i},s.prototype.removeCapturingGroups=function(p){var o=p.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,a){return a?"(?:":i});return o},s.prototype.createSplitterRegexp=function(p,o){if(p.indexOf("(?=")!=-1){var i=0,a=!1,c={};p.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(l,d,m,v,y,A){return a?a=y!="]":y?a=!0:v?(i==c.stack&&(c.end=A+1,c.stack=-1),i--):m&&(i++,m.length!=1&&(c.stack=i,c.start=A)),l}),c.end!=null&&/^\)*$/.test(p.substr(c.end))&&(p=p.substring(0,c.start)+p.substr(c.end))}return p.charAt(0)!="^"&&(p="^"+p),p.charAt(p.length-1)!="$"&&(p+="$"),new RegExp(p,(o||"").replace("g",""))},s.prototype.getLineTokens=function(p,o){if(o&&typeof o!="string"){var i=o.slice(0);o=i[0],o==="#tmp"&&(i.shift(),o=i.shift())}else var i=[];var a=o||"start",c=this.states[a];c||(a="start",c=this.states[a]);var l=this.matchMappings[a],d=this.regExps[a];d.lastIndex=0;for(var m,v=[],y=0,A=0,S={type:null,value:""};m=d.exec(p);){var C=l.defaultToken,b=null,R=m[0],L=d.lastIndex;if(L-R.length>y){var E=p.substring(y,L-R.length);S.type==C?S.value+=E:(S.type&&v.push(S),S={type:C,value:E})}for(var M=0;M<m.length-2;M++)if(m[M+1]!==void 0){b=c[l[M]],b.onMatch?C=b.onMatch(R,a,i,p):C=b.token,b.next&&(typeof b.next=="string"?a=b.next:a=b.next(a,i),c=this.states[a],c||(this.reportError("state doesn't exist",a),a="start",c=this.states[a]),l=this.matchMappings[a],y=L,d=this.regExps[a],d.lastIndex=L),b.consumeLineEnd&&(y=L);break}if(R){if(typeof C=="string")(!b||b.merge!==!1)&&S.type===C?S.value+=R:(S.type&&v.push(S),S={type:C,value:R});else if(C){S.type&&v.push(S),S={type:null,value:""};for(var M=0;M<C.length;M++)v.push(C[M])}}if(y==p.length)break;if(y=L,A++>h){for(A>2*p.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:p});y<p.length;)S.type&&v.push(S),S={value:p.substring(y,y+=500),type:"overflow"};a="start",i=[];break}}return S.type&&v.push(S),i.length>1&&i[0]!==a&&i.unshift("#tmp",a),{tokens:v,state:i.length?i:a}},s}();g.prototype.reportError=u,r.Tokenizer=g}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(n,r,f){var u=n("../lib/deep_copy").deepCopy,h;h=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(p,o){if(!o){for(var i in p)this.$rules[i]=p[i];return}for(var i in p){for(var a=p[i],c=0;c<a.length;c++){var l=a[c];(l.next||l.onMatch)&&(typeof l.next=="string"&&l.next.indexOf(o)!==0&&(l.next=o+l.next),l.nextState&&l.nextState.indexOf(o)!==0&&(l.nextState=o+l.nextState))}this.$rules[o+i]=a}},this.getRules=function(){return this.$rules},this.embedRules=function(p,o,i,a,c){var l=typeof p=="function"?new p().getRules():p;if(a)for(var d=0;d<a.length;d++)a[d]=o+a[d];else{a=[];for(var m in l)a.push(o+m)}if(this.addRules(l,o),i)for(var v=Array.prototype[c?"push":"unshift"],d=0;d<a.length;d++)v.apply(this.$rules[a[d]],u(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var g=function(p,o){return(p!="start"||o.length)&&o.unshift(this.nextState,p),this.nextState},s=function(p,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var p=0,o=this.$rules;function i(a){var c=o[a];c.processed=!0;for(var l=0;l<c.length;l++){var d=c[l],m=null;Array.isArray(d)&&(m=d,d={}),!d.regex&&d.start&&(d.regex=d.start,d.next||(d.next=[]),d.next.push({defaultToken:d.token},{token:d.token+".end",regex:d.end||d.start,next:"pop"}),d.token=d.token+".start",d.push=!0);var v=d.next||d.push;if(v&&Array.isArray(v)){var y=d.stateName;y||(y=d.token,typeof y!="string"&&(y=y[0]||""),o[y]&&(y+=p++)),o[y]=v,d.next=y,i(y)}else v=="pop"&&(d.next=s);if(d.push&&(d.nextState=d.next||d.push,d.next=g,delete d.push),d.rules)for(var A in d.rules)o[A]?o[A].push&&o[A].push.apply(o[A],d.rules[A]):o[A]=d.rules[A];var S=typeof d=="string"?d:d.include;if(S&&(S==="$self"&&(S="start"),Array.isArray(S)?m=S.map(function(b){return o[b]}):m=o[S]),m){var C=[l,1].concat(m);d.noEscape&&(C=C.filter(function(b){return!b.next})),c.splice.apply(c,C),l--}d.keywordMap&&(d.token=this.createKeywordMapper(d.keywordMap,d.defaultToken||"text",d.caseInsensitive),delete d.defaultToken)}}Object.keys(o).forEach(i,this)},this.createKeywordMapper=function(p,o,i,a){var c=Object.create(null);return this.$keywordList=[],Object.keys(p).forEach(function(l){for(var d=p[l],m=d.split(a||"|"),v=m.length;v--;){var y=m[v];this.$keywordList.push(y),i&&(y=y.toLowerCase()),c[y]=l}},this),p=null,i?function(l){return c[l.toLowerCase()]||o}:function(l){return c[l]||o}},this.getKeywords=function(){return this.$keywords}}).call(h.prototype),r.TextHighlightRules=h}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,f){var u;u=function(){this.$behaviours={}},(function(){this.add=function(h,g,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[h]:this.$behaviours[h]={}}this.$behaviours[h][g]=s},this.addBehaviours=function(h){for(var g in h)for(var s in h[g])this.add(g,s,h[g][s])},this.remove=function(h){this.$behaviours&&this.$behaviours[h]&&delete this.$behaviours[h]},this.inherit=function(h,g){if(typeof h=="function")var s=new h().getBehaviours(g);else var s=h.getBehaviours(g);this.addBehaviours(s)},this.getBehaviours=function(h){if(h){for(var g={},s=0;s<h.length;s++)this.$behaviours[h[s]]&&(g[h[s]]=this.$behaviours[h[s]]);return g}else return this.$behaviours}}).call(u.prototype),r.Behaviour=u}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,f){var u=n("./range").Range,h=function(){function g(s,p,o){this.$session=s,this.$row=p,this.$rowTokens=s.getTokens(p);var i=s.getTokenAt(p,o);this.$tokenIndex=i?i.index:-1}return g.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]},g.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},g.prototype.getCurrentTokenRow=function(){return this.$row},g.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,p=this.$tokenIndex,o=s[p].start;if(o!==void 0)return o;for(o=0;p>0;)p-=1,o+=s[p].value.length;return o},g.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},g.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],p=this.getCurrentTokenColumn();return new u(this.$row,p,this.$row,p+s.value.length)},g}();r.TokenIterator=h}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,f){var u=n("../../lib/oop"),h=n("../behaviour").Behaviour,g=n("../../token_iterator").TokenIterator,s=n("../../lib/lang"),p=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,a={},c={'"':'"',"'":"'"},l=function(v){var y=-1;if(v.multiSelect&&(y=v.selection.index,a.rangeCount!=v.multiSelect.rangeCount&&(a={rangeCount:v.multiSelect.rangeCount})),a[y])return i=a[y];i=a[y]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(v,y,A,S){var C=v.end.row-v.start.row;return{text:A+y+S,selection:[0,v.start.column+1,C,v.end.column+(C?0:1)]}},m;m=function(v){v=v||{},this.add("braces","insertion",function(y,A,S,C,b){var R=S.getCursorPosition(),L=C.doc.getLine(R.row);if(b=="{"){l(S);var E=S.getSelectionRange(),M=C.doc.getTextRange(E);if(M!==""&&M!=="{"&&S.getWrapBehavioursEnabled())return d(E,M,"{","}");if(m.isSaneInsertion(S,C))return/[\]\}\)]/.test(L[R.column])||S.inMultiSelectMode||v.braces?(m.recordAutoInsert(S,C,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(S,C,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){l(S);var $=L.substring(R.column,R.column+1);if($=="}"){var k=C.$findOpeningBracket("}",{column:R.column+1,row:R.row});if(k!==null&&m.isAutoInsertedClosing(R,L,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
|
996
996
|
`||b==`\r
|
997
|
-
`){l(S);var _="";m.isMaybeInsertedClosing(
|
997
|
+
`){l(S);var _="";m.isMaybeInsertedClosing(R,L)&&(_=s.stringRepeat("}",i.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var $=L.substring(R.column,R.column+1);if($==="}"){var w=C.findMatchingBracket({row:R.row,column:R.column+1},"}");if(!w)return null;var x=this.$getIndent(C.getLine(w.row))}else if(_)var x=this.$getIndent(L);else{m.clearMaybeInsertedClosing();return}var T=x+C.getTabString();return{text:`
|
998
998
|
`+T+`
|
999
|
-
`+
|
999
|
+
`+x+_,selection:[1,T.length,1,T.length]}}else m.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(y,A,S,C,b){var R=C.doc.getTextRange(b);if(!b.isMultiLine()&&R=="{"){l(S);var L=C.doc.getLine(b.start.row),E=L.substring(b.end.column,b.end.column+1);if(E=="}")return b.end.column++,b;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(y,A,S,C,b){if(b=="("){l(S);var R=S.getSelectionRange(),L=C.doc.getTextRange(R);if(L!==""&&S.getWrapBehavioursEnabled())return d(R,L,"(",")");if(m.isSaneInsertion(S,C))return m.recordAutoInsert(S,C,")"),{text:"()",selection:[1,1]}}else if(b==")"){l(S);var E=S.getCursorPosition(),M=C.doc.getLine(E.row),$=M.substring(E.column,E.column+1);if($==")"){var k=C.$findOpeningBracket(")",{column:E.column+1,row:E.row});if(k!==null&&m.isAutoInsertedClosing(E,M,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(y,A,S,C,b){var R=C.doc.getTextRange(b);if(!b.isMultiLine()&&R=="("){l(S);var L=C.doc.getLine(b.start.row),E=L.substring(b.start.column+1,b.start.column+2);if(E==")")return b.end.column++,b}}),this.add("brackets","insertion",function(y,A,S,C,b){if(b=="["){l(S);var R=S.getSelectionRange(),L=C.doc.getTextRange(R);if(L!==""&&S.getWrapBehavioursEnabled())return d(R,L,"[","]");if(m.isSaneInsertion(S,C))return m.recordAutoInsert(S,C,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){l(S);var E=S.getCursorPosition(),M=C.doc.getLine(E.row),$=M.substring(E.column,E.column+1);if($=="]"){var k=C.$findOpeningBracket("]",{column:E.column+1,row:E.row});if(k!==null&&m.isAutoInsertedClosing(E,M,b))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(y,A,S,C,b){var R=C.doc.getTextRange(b);if(!b.isMultiLine()&&R=="["){l(S);var L=C.doc.getLine(b.start.row),E=L.substring(b.start.column+1,b.start.column+2);if(E=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(y,A,S,C,b){var R=C.$mode.$quotes||c;if(b.length==1&&R[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;l(S);var L=b,E=S.getSelectionRange(),M=C.doc.getTextRange(E);if(M!==""&&(M.length!=1||!R[M])&&S.getWrapBehavioursEnabled())return d(E,M,L,L);if(!M){var $=S.getCursorPosition(),k=C.doc.getLine($.row),_=k.substring($.column-1,$.column),w=k.substring($.column,$.column+1),x=C.getTokenAt($.row,$.column),T=C.getTokenAt($.row,$.column+1);if(_=="\\"&&x&&/escape/.test(x.type))return null;var O=x&&/string|escape/.test(x.type),I=!T||/string|escape/.test(T.type),F;if(w==L)F=O!==I,F&&/string\.end/.test(T.type)&&(F=!1);else{if(O&&!I||O&&I)return null;var P=C.$mode.tokenRe;P.lastIndex=0;var W=P.test(_);P.lastIndex=0;var j=P.test(w),H=C.$mode.$pairQuotesAfter,z=H&&H[L]&&H[L].test(_);if(!z&&W||j||w&&!/[\s;,.})\]\\]/.test(w))return null;var K=k[$.column-2];if(_==L&&(K==L||P.test(K)))return null;F=!0}return{text:F?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(y,A,S,C,b){var R=C.$mode.$quotes||c,L=C.doc.getTextRange(b);if(!b.isMultiLine()&&R.hasOwnProperty(L)){l(S);var E=C.doc.getLine(b.start.row),M=E.substring(b.start.column+1,b.start.column+2);if(M==L)return b.end.column++,b}}),v.closeDocComment!==!1&&this.add("doc comment end","insertion",function(y,A,S,C,b){if(y==="doc-start"&&(b===`
|
1000
1000
|
`||b===`\r
|
1001
|
-
`)&&S.selection.isEmpty()){var x=S.getCursorPosition(),L=C.doc.getLine(x.row),E=C.doc.getLine(x.row+1),M=this.$getIndent(L);if(/\s*\*/.test(E))return/^\s*\*/.test(L)?{text:b+M+"* ",selection:[1,3+M.length,1,3+M.length]}:{text:b+M+" * ",selection:[1,3+M.length,1,3+M.length]};if(/\/\*\*/.test(L.substring(0,x.column)))return{text:b+M+" * "+b+" "+M+"*/",selection:[1,4+M.length,1,4+M.length]}}})},m.isSaneInsertion=function(v,y){var A=v.getCursorPosition(),S=new g(y,A.row,A.column);if(!this.$matchTokenType(S.getCurrentToken()||"text",p)){if(/[)}\]]/.test(v.session.getLine(A.row)[A.column]))return!0;var C=new g(y,A.row,A.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",p))return!1}return S.stepForward(),S.getCurrentTokenRow()!==A.row||this.$matchTokenType(S.getCurrentToken()||"text",o)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,A){var S=v.getCursorPosition(),C=y.doc.getLine(S.row);this.isAutoInsertedClosing(S,C,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=S.row,i.autoInsertedLineEnd=A+C.substr(S.column),i.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,A){var S=v.getCursorPosition(),C=y.doc.getLine(S.row);this.isMaybeInsertedClosing(S,C)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=S.row,i.maybeInsertedLineStart=C.substr(0,S.column)+A,i.maybeInsertedLineEnd=C.substr(S.column),i.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,A){return i.autoInsertedBrackets>0&&v.row===i.autoInsertedRow&&A===i.autoInsertedLineEnd[0]&&y.substr(v.column)===i.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return i.maybeInsertedBrackets>0&&v.row===i.maybeInsertedRow&&y.substr(v.column)===i.maybeInsertedLineEnd&&y.substr(0,v.column)==i.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},u.inherits(m,h),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,f){for(var u=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],h=0,g=[],s=0;s<u.length;s+=2)g.push(h+=u[s]),u[s+1]&&g.push(45,h+=u[s+1]);r.wordChars=String.fromCharCode.apply(null,g)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,f){var u=n("../config"),h=n("../tokenizer").Tokenizer,g=n("./text_highlight_rules").TextHighlightRules,s=n("./behaviour/cstyle").CstyleBehaviour,p=n("../unicode"),o=n("../lib/lang"),i=n("../token_iterator").TokenIterator,a=n("../range").Range,c;c=function(){this.HighlightRules=g},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new h(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(l,d,m,v){var y=d.doc,A=!0,S=!0,C=1/0,b=d.getTabSize(),x=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var M=this.lineCommentStart.map(o.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var M=o.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;M=new RegExp("^(\\s*)(?:"+M+") ?"),x=d.getUseSoftTabs();var _=function(j,H){var z=j.match(M);if(z){var K=z[1].length,q=z[0].length;!T(j,K,q)&&z[0][q-1]==" "&&q--,y.removeInLine(H,K,q)}},R=L+" ",k=function(j,H){(!A||/\S/.test(j))&&(T(j,C,C)?y.insertInLine({row:H,column:C},R):y.insertInLine({row:H,column:C},L))},w=function(j,H){return M.test(j)},T=function(j,H,z){for(var K=0;H--&&j.charAt(H)==" ";)K++;if(K%b!=0)return!1;for(var K=0;j.charAt(z++)==" ";)K++;return b>2?K%b!=b-1:K%b==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,E=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+o.escapeRegExp(L)+")"),$=new RegExp("(?:"+o.escapeRegExp(E)+")\\s*$"),k=function(F,P){w(F,P)||(!A||/\S/.test(F))&&(y.insertInLine({row:P,column:F.length},E),y.insertInLine({row:P,column:C},L))},_=function(F,P){var W;(W=F.match($))&&y.removeInLine(P,F.length-W[0].length,F.length),(W=F.match(M))&&y.removeInLine(P,W[1].length,W[0].length)},w=function(F,P){if(M.test(F))return!0;for(var W=d.getTokens(P),j=0;j<W.length;j++)if(W[j].type==="comment")return!0}}function O(F){for(var P=m;P<=v;P++)F(y.getLine(P),P)}var I=1/0;O(function(F,P){var W=F.search(/\S/);W!==-1?(W<C&&(C=W),S&&!w(F,P)&&(S=!1)):I>F.length&&(I=F.length)}),C==1/0&&(C=I,A=!1,S=!1),x&&C%b!=0&&(C=Math.floor(C/b)*b),O(S?_:k)},this.toggleBlockComment=function(l,d,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var A=new i(d,v.row,v.column),S=A.getCurrentToken();d.selection;var C=d.selection.toOrientedRange(),b,x;if(S&&/comment/.test(S.type)){for(var L,E;S&&/comment/.test(S.type);){var M=S.value.indexOf(y.start);if(M!=-1){var $=A.getCurrentTokenRow(),k=A.getCurrentTokenColumn()+M;L=new a($,k,$,k+y.start.length);break}S=A.stepBackward()}for(var A=new i(d,v.row,v.column),S=A.getCurrentToken();S&&/comment/.test(S.type);){var M=S.value.indexOf(y.end);if(M!=-1){var $=A.getCurrentTokenRow(),k=A.getCurrentTokenColumn()+M;E=new a($,k,$,k+y.end.length);break}S=A.stepForward()}E&&d.remove(E),L&&(d.remove(L),b=L.start.row,x=-y.start.length)}else x=y.start.length,b=m.start.row,d.insert(m.end,y.end),d.insert(m.start,y.start);C.start.row==b&&(C.start.column+=x),C.end.row==b&&(C.end.column+=x),d.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(l,d,m){return this.$getIndent(d)},this.checkOutdent=function(l,d,m){return!1},this.autoOutdent=function(l,d,m){},this.$getIndent=function(l){return l.match(/^\s*/)[0]},this.createWorker=function(l){return null},this.createModeDelegates=function(l){this.$embeds=[],this.$modes={};for(var d in l)if(l[d]){var m=l[d],v=m.prototype.$id,y=u.$modes[v];y||(u.$modes[v]=y=new m),u.$modes[d]||(u.$modes[d]=y),this.$embeds.push(d),this.$modes[d]=y}for(var A=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],S=function(b){(function(x){var L=A[b],E=x[L];x[A[b]]=function(){return this.$delegator(L,arguments,E)}})(C)},C=this,d=0;d<A.length;d++)S(d)},this.$delegator=function(l,d,m){var v=d[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var y=v[2][v[2].length-1],A=this.$modes[y];if(A)return A[l].apply(A,[v[1]].concat([].slice.call(d,1)))}v=v[0]||"start"}for(var S=0;S<this.$embeds.length;S++)if(this.$modes[this.$embeds[S]]){var C=v.split(this.$embeds[S]);if(!C[0]&&C[1]){d[0]=C[1];var A=this.$modes[this.$embeds[S]];return A[l].apply(A,d)}}var b=m.apply(this,d);return m?b:void 0},this.transformAction=function(l,d,m,v,y){if(this.$behaviour){var A=this.$behaviour.getBehaviours();for(var S in A)if(A[S][d]){var C=A[S][d].apply(this,arguments);if(C)return C}}},this.getKeywords=function(l){if(!this.completionKeywords){var d=this.$tokenizer.rules,m=[];for(var v in d)for(var y=d[v],A=0,S=y.length;A<S;A++)if(typeof y[A].token=="string")/keyword|support|storage/.test(y[A].token)&&m.push(y[A].regex);else if(typeof y[A].token=="object"){for(var C=0,b=y[A].token.length;C<b;C++)if(/keyword|support|storage/.test(y[A].token[C])){var v=y[A].regex.match(/\(.+?\)/g)[C];m.push(v.substr(1,v.length-2))}}this.completionKeywords=m}return l?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(l,d,m,v){var y=this.$keywordList||this.$createKeywordList();return y.map(function(A){return{name:A,value:A,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,f){r.applyDelta=function(u,h,g){var s=h.start.row,p=h.start.column,o=u[s]||"";switch(h.action){case"insert":var i=h.lines;if(i.length===1)u[s]=o.substring(0,p)+h.lines[0]+o.substring(p);else{var a=[s,1].concat(h.lines);u.splice.apply(u,a),u[s]=o.substring(0,p)+u[s],u[s+h.lines.length-1]+=o.substring(p)}break;case"remove":var c=h.end.column,l=h.end.row;s===l?u[s]=o.substring(0,p)+o.substring(c):u.splice(s,l-s+1,o.substring(0,p)+u[l].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,g=function(){function o(i,a,c){this.$onChange=this.onChange.bind(this),this.attach(i),typeof a!="number"?this.setPosition(a.row,a.column):this.setPosition(a,c)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var a=p(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}},o.prototype.setPosition=function(i,a,c){var l;if(c?l={row:i,column:a}:l=this.$clipPositionToDocument(i,a),!(this.row==l.row&&this.column==l.column)){var d={row:this.row,column:this.column};this.row=l.row,this.column=l.column,this._signal("change",{old:d,value:l})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,a){var c={};return i>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):i<0?(c.row=0,c.column=0):(c.row=i,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,a))),a<0&&(c.column=0),c},o}();g.prototype.$insertRight=!1,u.implement(g.prototype,h);function s(o,i,a){var c=a?o.column<=i.column:o.column<i.column;return o.row<i.row||o.row==i.row&&c}function p(o,i,a){var c=o.action=="insert",l=(c?1:-1)*(o.end.row-o.start.row),d=(c?1:-1)*(o.end.column-o.start.column),m=o.start,v=c?m:o.end;return s(i,m,a)?{row:i.row,column:i.column}:s(v,i,!a)?{row:i.row+l,column:i.column+(i.row==v.row?d:0)}:{row:m.row,column:m.column}}r.Anchor=g}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,f){var u=n("./lib/oop"),h=n("./apply_delta").applyDelta,g=n("./lib/event_emitter").EventEmitter,s=n("./range").Range,p=n("./anchor").Anchor,o=function(){function i(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)}return i.prototype.setValue=function(a){var c=this.getLength()-1;this.remove(new s(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},a||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(a,c){return new p(this,a,c)},i.prototype.$detectNewLine=function(a){var c=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
1001
|
+
`)&&S.selection.isEmpty()){var R=S.getCursorPosition(),L=C.doc.getLine(R.row),E=C.doc.getLine(R.row+1),M=this.$getIndent(L);if(/\s*\*/.test(E))return/^\s*\*/.test(L)?{text:b+M+"* ",selection:[1,3+M.length,1,3+M.length]}:{text:b+M+" * ",selection:[1,3+M.length,1,3+M.length]};if(/\/\*\*/.test(L.substring(0,R.column)))return{text:b+M+" * "+b+" "+M+"*/",selection:[1,4+M.length,1,4+M.length]}}})},m.isSaneInsertion=function(v,y){var A=v.getCursorPosition(),S=new g(y,A.row,A.column);if(!this.$matchTokenType(S.getCurrentToken()||"text",p)){if(/[)}\]]/.test(v.session.getLine(A.row)[A.column]))return!0;var C=new g(y,A.row,A.column+1);if(!this.$matchTokenType(C.getCurrentToken()||"text",p))return!1}return S.stepForward(),S.getCurrentTokenRow()!==A.row||this.$matchTokenType(S.getCurrentToken()||"text",o)},m.$matchTokenType=function(v,y){return y.indexOf(v.type||v)>-1},m.recordAutoInsert=function(v,y,A){var S=v.getCursorPosition(),C=y.doc.getLine(S.row);this.isAutoInsertedClosing(S,C,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=S.row,i.autoInsertedLineEnd=A+C.substr(S.column),i.autoInsertedBrackets++},m.recordMaybeInsert=function(v,y,A){var S=v.getCursorPosition(),C=y.doc.getLine(S.row);this.isMaybeInsertedClosing(S,C)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=S.row,i.maybeInsertedLineStart=C.substr(0,S.column)+A,i.maybeInsertedLineEnd=C.substr(S.column),i.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(v,y,A){return i.autoInsertedBrackets>0&&v.row===i.autoInsertedRow&&A===i.autoInsertedLineEnd[0]&&y.substr(v.column)===i.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(v,y){return i.maybeInsertedBrackets>0&&v.row===i.maybeInsertedRow&&y.substr(v.column)===i.maybeInsertedLineEnd&&y.substr(0,v.column)==i.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},u.inherits(m,h),r.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(n,r,f){for(var u=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],h=0,g=[],s=0;s<u.length;s+=2)g.push(h+=u[s]),u[s+1]&&g.push(45,h+=u[s+1]);r.wordChars=String.fromCharCode.apply(null,g)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,f){var u=n("../config"),h=n("../tokenizer").Tokenizer,g=n("./text_highlight_rules").TextHighlightRules,s=n("./behaviour/cstyle").CstyleBehaviour,p=n("../unicode"),o=n("../lib/lang"),i=n("../token_iterator").TokenIterator,a=n("../range").Range,c;c=function(){this.HighlightRules=g},(function(){this.$defaultBehaviour=new s,this.tokenRe=new RegExp("^["+p.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+p.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new h(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(l,d,m,v){var y=d.doc,A=!0,S=!0,C=1/0,b=d.getTabSize(),R=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var M=this.lineCommentStart.map(o.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var M=o.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;M=new RegExp("^(\\s*)(?:"+M+") ?"),R=d.getUseSoftTabs();var _=function(j,H){var z=j.match(M);if(z){var K=z[1].length,q=z[0].length;!T(j,K,q)&&z[0][q-1]==" "&&q--,y.removeInLine(H,K,q)}},x=L+" ",k=function(j,H){(!A||/\S/.test(j))&&(T(j,C,C)?y.insertInLine({row:H,column:C},x):y.insertInLine({row:H,column:C},L))},w=function(j,H){return M.test(j)},T=function(j,H,z){for(var K=0;H--&&j.charAt(H)==" ";)K++;if(K%b!=0)return!1;for(var K=0;j.charAt(z++)==" ";)K++;return b>2?K%b!=b-1:K%b==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,E=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+o.escapeRegExp(L)+")"),$=new RegExp("(?:"+o.escapeRegExp(E)+")\\s*$"),k=function(F,P){w(F,P)||(!A||/\S/.test(F))&&(y.insertInLine({row:P,column:F.length},E),y.insertInLine({row:P,column:C},L))},_=function(F,P){var W;(W=F.match($))&&y.removeInLine(P,F.length-W[0].length,F.length),(W=F.match(M))&&y.removeInLine(P,W[1].length,W[0].length)},w=function(F,P){if(M.test(F))return!0;for(var W=d.getTokens(P),j=0;j<W.length;j++)if(W[j].type==="comment")return!0}}function O(F){for(var P=m;P<=v;P++)F(y.getLine(P),P)}var I=1/0;O(function(F,P){var W=F.search(/\S/);W!==-1?(W<C&&(C=W),S&&!w(F,P)&&(S=!1)):I>F.length&&(I=F.length)}),C==1/0&&(C=I,A=!1,S=!1),R&&C%b!=0&&(C=Math.floor(C/b)*b),O(S?_:k)},this.toggleBlockComment=function(l,d,m,v){var y=this.blockComment;if(y){!y.start&&y[0]&&(y=y[0]);var A=new i(d,v.row,v.column),S=A.getCurrentToken();d.selection;var C=d.selection.toOrientedRange(),b,R;if(S&&/comment/.test(S.type)){for(var L,E;S&&/comment/.test(S.type);){var M=S.value.indexOf(y.start);if(M!=-1){var $=A.getCurrentTokenRow(),k=A.getCurrentTokenColumn()+M;L=new a($,k,$,k+y.start.length);break}S=A.stepBackward()}for(var A=new i(d,v.row,v.column),S=A.getCurrentToken();S&&/comment/.test(S.type);){var M=S.value.indexOf(y.end);if(M!=-1){var $=A.getCurrentTokenRow(),k=A.getCurrentTokenColumn()+M;E=new a($,k,$,k+y.end.length);break}S=A.stepForward()}E&&d.remove(E),L&&(d.remove(L),b=L.start.row,R=-y.start.length)}else R=y.start.length,b=m.start.row,d.insert(m.end,y.end),d.insert(m.start,y.start);C.start.row==b&&(C.start.column+=R),C.end.row==b&&(C.end.column+=R),d.selection.fromOrientedRange(C)}},this.getNextLineIndent=function(l,d,m){return this.$getIndent(d)},this.checkOutdent=function(l,d,m){return!1},this.autoOutdent=function(l,d,m){},this.$getIndent=function(l){return l.match(/^\s*/)[0]},this.createWorker=function(l){return null},this.createModeDelegates=function(l){this.$embeds=[],this.$modes={};for(var d in l)if(l[d]){var m=l[d],v=m.prototype.$id,y=u.$modes[v];y||(u.$modes[v]=y=new m),u.$modes[d]||(u.$modes[d]=y),this.$embeds.push(d),this.$modes[d]=y}for(var A=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],S=function(b){(function(R){var L=A[b],E=R[L];R[A[b]]=function(){return this.$delegator(L,arguments,E)}})(C)},C=this,d=0;d<A.length;d++)S(d)},this.$delegator=function(l,d,m){var v=d[0]||"start";if(typeof v!="string"){if(Array.isArray(v[2])){var y=v[2][v[2].length-1],A=this.$modes[y];if(A)return A[l].apply(A,[v[1]].concat([].slice.call(d,1)))}v=v[0]||"start"}for(var S=0;S<this.$embeds.length;S++)if(this.$modes[this.$embeds[S]]){var C=v.split(this.$embeds[S]);if(!C[0]&&C[1]){d[0]=C[1];var A=this.$modes[this.$embeds[S]];return A[l].apply(A,d)}}var b=m.apply(this,d);return m?b:void 0},this.transformAction=function(l,d,m,v,y){if(this.$behaviour){var A=this.$behaviour.getBehaviours();for(var S in A)if(A[S][d]){var C=A[S][d].apply(this,arguments);if(C)return C}}},this.getKeywords=function(l){if(!this.completionKeywords){var d=this.$tokenizer.rules,m=[];for(var v in d)for(var y=d[v],A=0,S=y.length;A<S;A++)if(typeof y[A].token=="string")/keyword|support|storage/.test(y[A].token)&&m.push(y[A].regex);else if(typeof y[A].token=="object"){for(var C=0,b=y[A].token.length;C<b;C++)if(/keyword|support|storage/.test(y[A].token[C])){var v=y[A].regex.match(/\(.+?\)/g)[C];m.push(v.substr(1,v.length-2))}}this.completionKeywords=m}return l?m.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(l,d,m,v){var y=this.$keywordList||this.$createKeywordList();return y.map(function(A){return{name:A,value:A,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(c.prototype),r.Mode=c}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,f){r.applyDelta=function(u,h,g){var s=h.start.row,p=h.start.column,o=u[s]||"";switch(h.action){case"insert":var i=h.lines;if(i.length===1)u[s]=o.substring(0,p)+h.lines[0]+o.substring(p);else{var a=[s,1].concat(h.lines);u.splice.apply(u,a),u[s]=o.substring(0,p)+u[s],u[s+h.lines.length-1]+=o.substring(p)}break;case"remove":var c=h.end.column,l=h.end.row;s===l?u[s]=o.substring(0,p)+o.substring(c):u.splice(s,l-s+1,o.substring(0,p)+u[l].substring(c));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,g=function(){function o(i,a,c){this.$onChange=this.onChange.bind(this),this.attach(i),typeof a!="number"?this.setPosition(a.row,a.column):this.setPosition(a,c)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var a=p(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(a.row,a.column,!0)}},o.prototype.setPosition=function(i,a,c){var l;if(c?l={row:i,column:a}:l=this.$clipPositionToDocument(i,a),!(this.row==l.row&&this.column==l.column)){var d={row:this.row,column:this.column};this.row=l.row,this.column=l.column,this._signal("change",{old:d,value:l})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,a){var c={};return i>=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):i<0?(c.row=0,c.column=0):(c.row=i,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,a))),a<0&&(c.column=0),c},o}();g.prototype.$insertRight=!1,u.implement(g.prototype,h);function s(o,i,a){var c=a?o.column<=i.column:o.column<i.column;return o.row<i.row||o.row==i.row&&c}function p(o,i,a){var c=o.action=="insert",l=(c?1:-1)*(o.end.row-o.start.row),d=(c?1:-1)*(o.end.column-o.start.column),m=o.start,v=c?m:o.end;return s(i,m,a)?{row:i.row,column:i.column}:s(v,i,!a)?{row:i.row+l,column:i.column+(i.row==v.row?d:0)}:{row:m.row,column:m.column}}r.Anchor=g}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,f){var u=n("./lib/oop"),h=n("./apply_delta").applyDelta,g=n("./lib/event_emitter").EventEmitter,s=n("./range").Range,p=n("./anchor").Anchor,o=function(){function i(a){this.$lines=[""],a.length===0?this.$lines=[""]:Array.isArray(a)?this.insertMergedLines({row:0,column:0},a):this.insert({row:0,column:0},a)}return i.prototype.setValue=function(a){var c=this.getLength()-1;this.remove(new s(0,0,c,this.getLine(c).length)),this.insert({row:0,column:0},a||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(a,c){return new p(this,a,c)},i.prototype.$detectNewLine=function(a){var c=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=c?c[1]:`
|
1002
1002
|
`,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
|
1003
1003
|
`;case"unix":return`
|
1004
1004
|
`;default:return this.$autoNewLine||`
|
1005
1005
|
`}},i.prototype.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(a){return a==`\r
|
1006
1006
|
`||a=="\r"||a==`
|
1007
|
-
`},i.prototype.getLine=function(a){return this.$lines[a]||""},i.prototype.getLines=function(a,c){return this.$lines.slice(a,c+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(a){var c;if(a.start.row===a.end.row)c=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{c=this.getLines(a.start.row,a.end.row),c[0]=(c[0]||"").substring(a.start.column);var l=c.length-1;a.end.row-a.start.row==l&&(c[l]=c[l].substring(0,a.end.column))}return c},i.prototype.insertLines=function(a,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,c)},i.prototype.removeLines=function(a,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,c)},i.prototype.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},i.prototype.insert=function(a,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(a,this.$split(c))},i.prototype.insertInLine=function(a,c){var l=this.clippedPos(a.row,a.column),d=this.pos(a.row,a.column+c.length);return this.applyDelta({start:l,end:d,action:"insert",lines:[c]},!0),this.clonePos(d)},i.prototype.clippedPos=function(a,c){var l=this.getLength();a===void 0?a=l:a<0?a=0:a>=l&&(a=l-1,c=void 0);var d=this.getLine(a);return c==null&&(c=d.length),c=Math.min(Math.max(c,0),d.length),{row:a,column:c}},i.prototype.clonePos=function(a){return{row:a.row,column:a.column}},i.prototype.pos=function(a,c){return{row:a,column:c}},i.prototype.$clipPosition=function(a){var c=this.getLength();return a.row>=c?(a.row=Math.max(0,c-1),a.column=this.getLine(c-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},i.prototype.insertFullLines=function(a,c){a=Math.min(Math.max(a,0),this.getLength());var l=0;a<this.getLength()?(c=c.concat([""]),l=0):(c=[""].concat(c),a--,l=this.$lines[a].length),this.insertMergedLines({row:a,column:l},c)},i.prototype.insertMergedLines=function(a,c){var l=this.clippedPos(a.row,a.column),d={row:l.row+c.length-1,column:(c.length==1?l.column:0)+c[c.length-1].length};return this.applyDelta({start:l,end:d,action:"insert",lines:c}),this.clonePos(d)},i.prototype.remove=function(a){var c=this.clippedPos(a.start.row,a.start.column),l=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:c,end:l,action:"remove",lines:this.getLinesForRange({start:c,end:l})}),this.clonePos(c)},i.prototype.removeInLine=function(a,c,l){var d=this.clippedPos(a,c),m=this.clippedPos(a,l);return this.applyDelta({start:d,end:m,action:"remove",lines:this.getLinesForRange({start:d,end:m})},!0),this.clonePos(d)},i.prototype.removeFullLines=function(a,c){a=Math.min(Math.max(0,a),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var l=c==this.getLength()-1&&a>0,d=c<this.getLength()-1,m=l?a-1:a,v=l?this.getLine(m).length:0,y=d?c+1:c,A=d?0:this.getLine(y).length,S=new s(m,v,y,A),C=this.$lines.slice(a,c+1);return this.applyDelta({start:S.start,end:S.end,action:"remove",lines:this.getLinesForRange(S)}),C},i.prototype.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(a,c){if(a instanceof s||(a=s.fromPoints(a.start,a.end)),c.length===0&&a.isEmpty())return a.start;if(c==this.getTextRange(a))return a.end;this.remove(a);var l;return c?l=this.insert(a.start,c):l=a.start,l},i.prototype.applyDeltas=function(a){for(var c=0;c<a.length;c++)this.applyDelta(a[c])},i.prototype.revertDeltas=function(a){for(var c=a.length-1;c>=0;c--)this.revertDelta(a[c])},i.prototype.applyDelta=function(a,c){var l=a.action=="insert";(l?a.lines.length<=1&&!a.lines[0]:!s.comparePoints(a.start,a.end))||(l&&a.lines.length>2e4?this.$splitAndapplyLargeDelta(a,2e4):(h(this.$lines,a,c),this._signal("change",a)))},i.prototype.$safeApplyDelta=function(a){var c=this.$lines.length;(a.action=="remove"&&a.start.row<c&&a.end.row<c||a.action=="insert"&&a.start.row<=c)&&this.applyDelta(a)},i.prototype.$splitAndapplyLargeDelta=function(a,c){for(var l=a.lines,d=l.length-c+1,m=a.start.row,v=a.start.column,y=0,A=0;y<d;y=A){A+=c-1;var S=l.slice(y,A);S.push(""),this.applyDelta({start:this.pos(m+y,v),end:this.pos(m+A,v=0),action:a.action,lines:S},!0)}a.lines=l.slice(y),a.start.row=m+y,a.start.column=v,this.applyDelta(a,!0)},i.prototype.revertDelta=function(a){this.$safeApplyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},i.prototype.indexToPosition=function(a,c){for(var l=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=c||0,v=l.length;m<v;m++)if(a-=l[m].length+d,a<0)return{row:m,column:a+l[m].length+d};return{row:v-1,column:a+l[v-1].length+d}},i.prototype.positionToIndex=function(a,c){for(var l=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=0,v=Math.min(a.row,l.length),y=c||0;y<v;++y)m+=l[y].length+d;return m+a.column},i.prototype.$split=function(a){return a.split(/\r\n|\r|\n/)},i}();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",u.implement(o.prototype,g),r.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,g=function(){function s(p,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var i=this;this.$worker=function(){if(i.running){for(var a=new Date,c=i.currentLine,l=-1,d=i.doc,m=c;i.lines[c];)c++;var v=d.getLength(),y=0;for(i.running=!1;c<v;){i.$tokenizeRow(c),l=c;do c++;while(i.lines[c]);if(y++,y%5===0&&new Date-a>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=c,l==-1&&(l=c),m<=l&&i.fireUpdateEvent(m,l)}}}return s.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(p,o){var i={first:p,last:o};this._signal("update",{data:i})},s.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(p){var o=p.start.row,i=p.end.row-o;if(i===0)this.lines[o]=null;else if(p.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var a=Array(i+1);a.unshift(o,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},s.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},s.prototype.$tokenizeRow=function(p){var o=this.doc.getLine(p),i=this.states[p-1],a=this.tokenizer.getLineTokens(o,i,p);return this.states[p]+""!=a.state+""?(this.states[p]=a.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=a.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s}();u.implement(g.prototype,h),r.BackgroundTokenizer=g}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,f){var u=n("./lib/lang"),h=n("./range").Range,g=function(){function s(p,o,i){i===void 0&&(i="text"),this.setRegexp(p),this.clazz=o,this.type=i}return s.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},s.prototype.update=function(p,o,i,a){if(this.regExp)for(var c=a.firstRow,l=a.lastRow,d={},m=c;m<=l;m++){var v=this.cache[m];v==null&&(v=u.getMatchOffsets(i.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(C){return new h(m,C.offset,m,C.offset+C.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var A=v[y].toScreenRange(i),S=A.toString();d[S]||(d[S]=!0,o.drawSingleLineMarker(p,A,this.clazz,a))}}},s}();g.prototype.MAX_RANGES=500,r.SearchHighlight=g}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,f){var u=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(b){this.$session=b},C.prototype.add=function(b,x,L){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),x===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},C.prototype.addSelection=function(b,x){this.selections.push({value:b,rev:x||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,x){x==null&&(x=this.$rev+1);for(var L=this.$undoStack,E=L.length;E--;){var M=L[E][0];if(M.id<=b)break;M.id<x&&(M.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,x){for(var L=this.selections,E=L.length;E--;){var M=L[E];if(M.rev<b)return x&&(M=L[E+1]),M}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,x){x==null&&(x=this.$rev+1);for(var L=this.$undoStack,E=null,M=0,$=L.length;$--;){var k=L[$][0];if(k.id<x&&!E&&(E=$+1),k.id<=b){M=$+1;break}}return L.slice(M,E)},C.prototype.getChangedRanges=function(b,x){x==null&&(x=this.$rev+1)},C.prototype.getChangedLines=function(b,x){x==null&&(x=this.$rev+1)},C.prototype.undo=function(b,x){this.lastDeltas=null;var L=this.$undoStack;if(h(L,L.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=L.pop(),M=null;return E&&(M=b.undoChanges(E,x),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,M}},C.prototype.redo=function(b,x){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);S(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function($){$[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),M=null;return E&&(M=b.redoChanges(E,x),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,M},C.prototype.$syncRev=function(){var b=this.$undoStack,x=b[b.length-1],L=x&&x[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},C.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},C.prototype.$prettyPrint=function(b){return b?i(b):i(this.$undoStack)+`
|
1007
|
+
`},i.prototype.getLine=function(a){return this.$lines[a]||""},i.prototype.getLines=function(a,c){return this.$lines.slice(a,c+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(a){return this.getLinesForRange(a).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(a){var c;if(a.start.row===a.end.row)c=[this.getLine(a.start.row).substring(a.start.column,a.end.column)];else{c=this.getLines(a.start.row,a.end.row),c[0]=(c[0]||"").substring(a.start.column);var l=c.length-1;a.end.row-a.start.row==l&&(c[l]=c[l].substring(0,a.end.column))}return c},i.prototype.insertLines=function(a,c){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(a,c)},i.prototype.removeLines=function(a,c){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(a,c)},i.prototype.insertNewLine=function(a){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(a,["",""])},i.prototype.insert=function(a,c){return this.getLength()<=1&&this.$detectNewLine(c),this.insertMergedLines(a,this.$split(c))},i.prototype.insertInLine=function(a,c){var l=this.clippedPos(a.row,a.column),d=this.pos(a.row,a.column+c.length);return this.applyDelta({start:l,end:d,action:"insert",lines:[c]},!0),this.clonePos(d)},i.prototype.clippedPos=function(a,c){var l=this.getLength();a===void 0?a=l:a<0?a=0:a>=l&&(a=l-1,c=void 0);var d=this.getLine(a);return c==null&&(c=d.length),c=Math.min(Math.max(c,0),d.length),{row:a,column:c}},i.prototype.clonePos=function(a){return{row:a.row,column:a.column}},i.prototype.pos=function(a,c){return{row:a,column:c}},i.prototype.$clipPosition=function(a){var c=this.getLength();return a.row>=c?(a.row=Math.max(0,c-1),a.column=this.getLine(c-1).length):(a.row=Math.max(0,a.row),a.column=Math.min(Math.max(a.column,0),this.getLine(a.row).length)),a},i.prototype.insertFullLines=function(a,c){a=Math.min(Math.max(a,0),this.getLength());var l=0;a<this.getLength()?(c=c.concat([""]),l=0):(c=[""].concat(c),a--,l=this.$lines[a].length),this.insertMergedLines({row:a,column:l},c)},i.prototype.insertMergedLines=function(a,c){var l=this.clippedPos(a.row,a.column),d={row:l.row+c.length-1,column:(c.length==1?l.column:0)+c[c.length-1].length};return this.applyDelta({start:l,end:d,action:"insert",lines:c}),this.clonePos(d)},i.prototype.remove=function(a){var c=this.clippedPos(a.start.row,a.start.column),l=this.clippedPos(a.end.row,a.end.column);return this.applyDelta({start:c,end:l,action:"remove",lines:this.getLinesForRange({start:c,end:l})}),this.clonePos(c)},i.prototype.removeInLine=function(a,c,l){var d=this.clippedPos(a,c),m=this.clippedPos(a,l);return this.applyDelta({start:d,end:m,action:"remove",lines:this.getLinesForRange({start:d,end:m})},!0),this.clonePos(d)},i.prototype.removeFullLines=function(a,c){a=Math.min(Math.max(0,a),this.getLength()-1),c=Math.min(Math.max(0,c),this.getLength()-1);var l=c==this.getLength()-1&&a>0,d=c<this.getLength()-1,m=l?a-1:a,v=l?this.getLine(m).length:0,y=d?c+1:c,A=d?0:this.getLine(y).length,S=new s(m,v,y,A),C=this.$lines.slice(a,c+1);return this.applyDelta({start:S.start,end:S.end,action:"remove",lines:this.getLinesForRange(S)}),C},i.prototype.removeNewLine=function(a){a<this.getLength()-1&&a>=0&&this.applyDelta({start:this.pos(a,this.getLine(a).length),end:this.pos(a+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(a,c){if(a instanceof s||(a=s.fromPoints(a.start,a.end)),c.length===0&&a.isEmpty())return a.start;if(c==this.getTextRange(a))return a.end;this.remove(a);var l;return c?l=this.insert(a.start,c):l=a.start,l},i.prototype.applyDeltas=function(a){for(var c=0;c<a.length;c++)this.applyDelta(a[c])},i.prototype.revertDeltas=function(a){for(var c=a.length-1;c>=0;c--)this.revertDelta(a[c])},i.prototype.applyDelta=function(a,c){var l=a.action=="insert";(l?a.lines.length<=1&&!a.lines[0]:!s.comparePoints(a.start,a.end))||(l&&a.lines.length>2e4?this.$splitAndapplyLargeDelta(a,2e4):(h(this.$lines,a,c),this._signal("change",a)))},i.prototype.$safeApplyDelta=function(a){var c=this.$lines.length;(a.action=="remove"&&a.start.row<c&&a.end.row<c||a.action=="insert"&&a.start.row<=c)&&this.applyDelta(a)},i.prototype.$splitAndapplyLargeDelta=function(a,c){for(var l=a.lines,d=l.length-c+1,m=a.start.row,v=a.start.column,y=0,A=0;y<d;y=A){A+=c-1;var S=l.slice(y,A);S.push(""),this.applyDelta({start:this.pos(m+y,v),end:this.pos(m+A,v=0),action:a.action,lines:S},!0)}a.lines=l.slice(y),a.start.row=m+y,a.start.column=v,this.applyDelta(a,!0)},i.prototype.revertDelta=function(a){this.$safeApplyDelta({start:this.clonePos(a.start),end:this.clonePos(a.end),action:a.action=="insert"?"remove":"insert",lines:a.lines.slice()})},i.prototype.indexToPosition=function(a,c){for(var l=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=c||0,v=l.length;m<v;m++)if(a-=l[m].length+d,a<0)return{row:m,column:a+l[m].length+d};return{row:v-1,column:a+l[v-1].length+d}},i.prototype.positionToIndex=function(a,c){for(var l=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,m=0,v=Math.min(a.row,l.length),y=c||0;y<v;++y)m+=l[y].length+d;return m+a.column},i.prototype.$split=function(a){return a.split(/\r\n|\r|\n/)},i}();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",u.implement(o.prototype,g),r.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/event_emitter").EventEmitter,g=function(){function s(p,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=p;var i=this;this.$worker=function(){if(i.running){for(var a=new Date,c=i.currentLine,l=-1,d=i.doc,m=c;i.lines[c];)c++;var v=d.getLength(),y=0;for(i.running=!1;c<v;){i.$tokenizeRow(c),l=c;do c++;while(i.lines[c]);if(y++,y%5===0&&new Date-a>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=c,l==-1&&(l=c),m<=l&&i.fireUpdateEvent(m,l)}}}return s.prototype.setTokenizer=function(p){this.tokenizer=p,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(p){this.doc=p,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(p,o){var i={first:p,last:o};this._signal("update",{data:i})},s.prototype.start=function(p){this.currentLine=Math.min(p||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(p){var o=p.start.row,i=p.end.row-o;if(i===0)this.lines[o]=null;else if(p.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var a=Array(i+1);a.unshift(o,1),this.lines.splice.apply(this.lines,a),this.states.splice.apply(this.states,a)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(p){return this.lines[p]||this.$tokenizeRow(p)},s.prototype.getState=function(p){return this.currentLine==p&&this.$tokenizeRow(p),this.states[p]||"start"},s.prototype.$tokenizeRow=function(p){var o=this.doc.getLine(p),i=this.states[p-1],a=this.tokenizer.getLineTokens(o,i,p);return this.states[p]+""!=a.state+""?(this.states[p]=a.state,this.lines[p+1]=null,this.currentLine>p+1&&(this.currentLine=p+1)):this.currentLine==p&&(this.currentLine=p+1),this.lines[p]=a.tokens},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s}();u.implement(g.prototype,h),r.BackgroundTokenizer=g}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,f){var u=n("./lib/lang"),h=n("./range").Range,g=function(){function s(p,o,i){i===void 0&&(i="text"),this.setRegexp(p),this.clazz=o,this.type=i}return s.prototype.setRegexp=function(p){this.regExp+""!=p+""&&(this.regExp=p,this.cache=[])},s.prototype.update=function(p,o,i,a){if(this.regExp)for(var c=a.firstRow,l=a.lastRow,d={},m=c;m<=l;m++){var v=this.cache[m];v==null&&(v=u.getMatchOffsets(i.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(C){return new h(m,C.offset,m,C.offset+C.length)}),this.cache[m]=v.length?v:"");for(var y=v.length;y--;){var A=v[y].toScreenRange(i),S=A.toString();d[S]||(d[S]=!0,o.drawSingleLineMarker(p,A,this.clazz,a))}}},s}();g.prototype.MAX_RANGES=500,r.SearchHighlight=g}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,f){var u=function(){function C(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return C.prototype.addSession=function(b){this.$session=b},C.prototype.add=function(b,R,L){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),R===!1||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},C.prototype.addSelection=function(b,R){this.selections.push({value:b,rev:R||this.$rev})},C.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},C.prototype.markIgnored=function(b,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,E=L.length;E--;){var M=L[E][0];if(M.id<=b)break;M.id<R&&(M.ignore=!0)}this.lastDeltas=null},C.prototype.getSelection=function(b,R){for(var L=this.selections,E=L.length;E--;){var M=L[E];if(M.rev<b)return R&&(M=L[E+1]),M}},C.prototype.getRevision=function(){return this.$rev},C.prototype.getDeltas=function(b,R){R==null&&(R=this.$rev+1);for(var L=this.$undoStack,E=null,M=0,$=L.length;$--;){var k=L[$][0];if(k.id<R&&!E&&(E=$+1),k.id<=b){M=$+1;break}}return L.slice(M,E)},C.prototype.getChangedRanges=function(b,R){R==null&&(R=this.$rev+1)},C.prototype.getChangedLines=function(b,R){R==null&&(R=this.$rev+1)},C.prototype.undo=function(b,R){this.lastDeltas=null;var L=this.$undoStack;if(h(L,L.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var E=L.pop(),M=null;return E&&(M=b.undoChanges(E,R),this.$redoStack.push(E),this.$syncRev()),this.$fromUndo=!1,M}},C.prototype.redo=function(b,R){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);S(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function($){$[0].id=++this.$maxRev},this)}var E=this.$redoStack.pop(),M=null;return E&&(M=b.redoChanges(E,R),this.$undoStack.push(E),this.$syncRev()),this.$fromUndo=!1,M},C.prototype.$syncRev=function(){var b=this.$undoStack,R=b[b.length-1],L=R&&R[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},C.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},C.prototype.canUndo=function(){return this.$undoStack.length>0},C.prototype.canRedo=function(){return this.$redoStack.length>0},C.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},C.prototype.isAtBookmark=function(){return this.$rev===this.mark},C.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},C.prototype.fromJSON=function(b){this.reset(),this.$undoStack=b.$undoStack,this.$redoStack=b.$redoStack},C.prototype.$prettyPrint=function(b){return b?i(b):i(this.$undoStack)+`
|
1008
1008
|
---
|
1009
|
-
`+i(this.$redoStack)},C}();u.prototype.hasUndo=u.prototype.canUndo,u.prototype.hasRedo=u.prototype.canRedo,u.prototype.isClean=u.prototype.isAtBookmark,u.prototype.markClean=u.prototype.bookmark;function h(C,b){for(var
|
1009
|
+
`+i(this.$redoStack)},C}();u.prototype.hasUndo=u.prototype.canUndo,u.prototype.hasRedo=u.prototype.canRedo,u.prototype.isClean=u.prototype.isAtBookmark,u.prototype.markClean=u.prototype.bookmark;function h(C,b){for(var R=b;R--;){var L=C[R];if(L&&!L[0].ignore){for(;R<b-1;){var E=l(C[R],C[R+1]);C[R]=E[0],C[R+1]=E[1],R++}return!0}}}var g=n("./range").Range,s=g.comparePoints;g.comparePoints;function p(C){return{row:C.row,column:C.column}}function o(C){return{start:p(C.start),end:p(C.end),action:C.action,lines:C.lines.slice()}}function i(C){if(C=C||this,Array.isArray(C))return C.map(i).join(`
|
1010
1010
|
`);var b="";return C.action?(b=C.action=="insert"?"+":"-",b+="["+C.lines+"]"):C.value&&(Array.isArray(C.value)?b=C.value.map(a).join(`
|
1011
|
-
`):b=a(C.value)),C.start&&(b+=a(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function a(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function c(C,b){var
|
1012
|
-
`)},g.prototype.idxToPosition=function(s){for(var p=0,o=0;o<this.folds.length;o++){var i=this.folds[o];if(s-=i.start.column-p,s<0)return{row:i.start.row,column:i.start.column+s};if(s-=i.placeholder.length,s<0)return i.start;p=i.end.column}return{row:this.end.row,column:this.end.column+s}},g}();r.FoldLine=h}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,f){var u=n("./range").Range,h=u.comparePoints,g=function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(p,o,i){for(var a=this.ranges,c=i||0;c<a.length;c++){var l=a[c],d=h(p,l.end);if(!(d>0)){var m=h(p,l.start);return d===0?o&&m!==0?-c-2:c:m>0||m===0&&!o?c:-c-1}}return-c-1},s.prototype.add=function(p){var o=!p.isEmpty(),i=this.pointIndex(p.start,o);i<0&&(i=-i-1);var a=this.pointIndex(p.end,o,i);return a<0?a=-a-1:a++,this.ranges.splice(i,a-i,p)},s.prototype.addList=function(p){for(var o=[],i=p.length;i--;)o.push.apply(o,this.add(p[i]));return o},s.prototype.substractPoint=function(p){var o=this.pointIndex(p);if(o>=0)return this.ranges.splice(o,1)},s.prototype.merge=function(){var p=[],o=this.ranges;o=o.sort(function(d,m){return h(d.start,m.start)});for(var i=o[0],a,c=1;c<o.length;c++){a=i,i=o[c];var l=h(a.end,i.start);l<0||l==0&&!a.isEmpty()&&!i.isEmpty()||(h(a.end,i.end)<0&&(a.end.row=i.end.row,a.end.column=i.end.column),o.splice(c,1),p.push(i),i=a,c--)}return this.ranges=o,p},s.prototype.contains=function(p,o){return this.pointIndex({row:p,column:o})>=0},s.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},s.prototype.rangeAtPoint=function(p){var o=this.pointIndex(p);if(o>=0)return this.ranges[o]},s.prototype.clipRows=function(p,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row<p)return[];var a=this.pointIndex({row:p,column:0});a<0&&(a=-a-1);var c=this.pointIndex({row:o,column:0},a);c<0&&(c=-c-1);for(var l=[],d=a;d<c;d++)l.push(i[d]);return l},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(p){for(var o=p.start,i=p.end,a=o.row,c=i.row,l=this.ranges,d=0,m=l.length;d<m;d++){var v=l[d];if(v.end.row>=a)break}if(p.action=="insert")for(var y=c-a,A=-o.column+i.column;d<m;d++){var v=l[d];if(v.start.row>a)break;if(v.start.row==a&&v.start.column>=o.column&&(v.start.column==o.column&&this.$bias<=0||(v.start.column+=A,v.start.row+=y)),v.end.row==a&&v.end.column>=o.column){if(v.end.column==o.column&&this.$bias<0)continue;v.end.column==o.column&&A>0&&d<m-1&&v.end.column>v.start.column&&v.end.column==l[d+1].start.column&&(v.end.column-=A),v.end.column+=A,v.end.row+=y}}else for(var y=a-c,A=o.column-i.column;d<m;d++){var v=l[d];if(v.start.row>c)break;v.end.row<c&&(a<v.end.row||a==v.end.row&&o.column<v.end.column)?(v.end.row=a,v.end.column=o.column):v.end.row==c?v.end.column<=i.column?(y||v.end.column>o.column)&&(v.end.column=o.column,v.end.row=o.row):(v.end.column+=A,v.end.row+=y):v.end.row>c&&(v.end.row+=y),v.start.row<c&&(a<v.start.row||a==v.start.row&&o.column<v.start.column)?(v.start.row=a,v.start.column=o.column):v.start.row==c?v.start.column<=i.column?(y||v.start.column>o.column)&&(v.start.column=o.column,v.start.row=o.row):(v.start.column+=A,v.start.row+=y):v.start.row>c&&(v.start.row+=y)}if(y!=0&&d<m)for(;d<m;d++){var v=l[d];v.start.row+=y,v.end.row+=y}},s}();g.prototype.comparePoints=h,r.RangeList=g}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,f){var u=this&&this.__extends||function(){var a=function(c,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(d[v]=m[v])},a(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(c,l);function d(){this.constructor=c}c.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),h=n("../range_list").RangeList,g=function(a){u(c,a);function c(l,d){var m=a.call(this)||this;return m.foldLine=null,m.placeholder=d,m.range=l,m.start=l.start,m.end=l.end,m.sameRow=l.start.row==l.end.row,m.subFolds=m.ranges=[],m}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(l){this.foldLine=l,this.subFolds.forEach(function(d){d.setFoldLine(l)})},c.prototype.clone=function(){var l=this.range.clone(),d=new c(l,this.placeholder);return this.subFolds.forEach(function(m){d.subFolds.push(m.clone())}),d.collapseChildren=this.collapseChildren,d},c.prototype.addSubFold=function(l){if(!this.range.isEqual(l)){p(l,this.start);for(var A=l.start.row,S=l.start.column,d=0,m=-1;d<this.subFolds.length&&(m=this.subFolds[d].range.compare(A,S),m==1);d++);var v=this.subFolds[d],y=0;if(m==0){if(v.range.containsRange(l))return v.addSubFold(l);y=1}for(var A=l.range.end.row,S=l.range.end.column,C=d,m=-1;C<this.subFolds.length&&(m=this.subFolds[C].range.compare(A,S),m==1);C++);m==0&&C++;for(var b=this.subFolds.splice(d,C-d,l),x=m==0?b.length-1:b.length,L=y;L<x;L++)l.addSubFold(b[L]);return l.setFoldLine(this.foldLine),l}},c.prototype.restoreRange=function(l){return i(l,this.start)},c}(h);function s(a,c){a.row-=c.row,a.row==0&&(a.column-=c.column)}function p(a,c){s(a.start,c),s(a.end,c)}function o(a,c){a.row==0&&(a.column+=c.column),a.row+=c.row}function i(a,c){o(a.start,c),o(a.end,c)}r.Fold=g}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,f){var u=n("../range").Range,h=n("./fold_line").FoldLine,g=n("./fold").Fold,s=n("../token_iterator").TokenIterator,p=n("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(i,a,c){var l=this.getFoldLine(i);if(!l)return null;for(var d=l.folds,m=0;m<d.length;m++){var v=d[m].range;if(v.contains(i,a)){if(c==1&&v.isEnd(i,a)&&!v.isEmpty())continue;if(c==-1&&v.isStart(i,a)&&!v.isEmpty())continue;return d[m]}}},this.getFoldsInRange=function(i){var a=i.start,c=i.end,l=this.$foldData,d=[];a.column+=1,c.column-=1;for(var m=0;m<l.length;m++){var v=l[m].range.compareRange(i);if(v!=2){if(v==-2)break;for(var y=l[m].folds,A=0;A<y.length;A++){var S=y[A];if(v=S.range.compareRange(i),v==-2)break;if(v==2)continue;if(v==42)break;d.push(S)}}}return a.column-=1,c.column+=1,d},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var a=[];i.forEach(function(c){a=a.concat(this.getFoldsInRange(c))},this)}else var a=this.getFoldsInRange(i);return a},this.getAllFolds=function(){for(var i=[],a=this.$foldData,c=0;c<a.length;c++)for(var l=0;l<a[c].folds.length;l++)i.push(a[c].folds[l]);return i},this.getFoldStringAt=function(i,a,c,l){if(l=l||this.getFoldLine(i),!l)return null;for(var d={end:{column:0}},m,v,y=0;y<l.folds.length;y++){v=l.folds[y];var A=v.range.compareEnd(i,a);if(A==-1){m=this.getLine(v.start.row).substring(d.end.column,v.start.column);break}else if(A===0)return null;d=v}return m||(m=this.getLine(v.start.row).substring(d.end.column)),c==-1?m.substring(0,a-d.end.column):c==1?m.substring(a-d.end.column):m},this.getFoldLine=function(i,a){var c=this.$foldData,l=0;for(a&&(l=c.indexOf(a)),l==-1&&(l=0),l;l<c.length;l++){var d=c[l];if(d.start.row<=i&&d.end.row>=i)return d;if(d.end.row>i)return null}return null},this.getNextFoldLine=function(i,a){var c=this.$foldData,l=0;for(a&&(l=c.indexOf(a)),l==-1&&(l=0),l;l<c.length;l++){var d=c[l];if(d.end.row>=i)return d}return null},this.getFoldedRowCount=function(i,a){for(var c=this.$foldData,l=a-i+1,d=0;d<c.length;d++){var m=c[d],v=m.end.row,y=m.start.row;if(v>=a){y<a&&(y>=i?l-=a-y:l=0);break}else v>=i&&(y>=i?l-=v-y:l-=v-i+1)}return l},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(a,c){return a.start.row-c.start.row}),i},this.addFold=function(i,a){var c=this.$foldData,l=!1,d;i instanceof g?d=i:(d=new g(a,i),d.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(d.range);var m=d.start.row,v=d.start.column,y=d.end.row,A=d.end.column,S=this.getFoldAt(m,v,1),C=this.getFoldAt(y,A,-1);if(S&&C==S)return S.addSubFold(d);S&&!S.range.isStart(m,v)&&this.removeFold(S),C&&!C.range.isEnd(y,A)&&this.removeFold(C);var b=this.getFoldsInRange(d.range);b.length>0&&(this.removeFolds(b),d.collapseChildren||b.forEach(function(M){d.addSubFold(M)}));for(var x=0;x<c.length;x++){var L=c[x];if(y==L.start.row){L.addFold(d),l=!0;break}else if(m==L.end.row){if(L.addFold(d),l=!0,!d.sameRow){var E=c[x+1];if(E&&E.start.row==y){L.merge(E);break}}break}else if(y<=L.start.row)break}return l||(L=this.$addFoldLine(new h(this.$foldData,d))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:d,action:"add"}),d},this.addFolds=function(i){i.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(i){var a=i.foldLine,c=a.start.row,l=a.end.row,d=this.$foldData,m=a.folds;if(m.length==1)d.splice(d.indexOf(a),1);else if(a.range.isEnd(i.end.row,i.end.column))m.pop(),a.end.row=m[m.length-1].end.row,a.end.column=m[m.length-1].end.column;else if(a.range.isStart(i.start.row,i.start.column))m.shift(),a.start.row=m[0].start.row,a.start.column=m[0].start.column;else if(i.sameRow)m.splice(m.indexOf(i),1);else{var v=a.split(i.start.row,i.start.column);m=v.folds,m.shift(),v.start.row=m[0].start.row,v.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,l):this.$updateRowLengthCache(c,l)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var a=[],c=0;c<i.length;c++)a.push(i[c]);a.forEach(function(l){this.removeFold(l)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(a){i.restoreRange(a),this.addFold(a)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(i,a){var c,l;if(i==null)c=new u(0,0,this.getLength(),0),a==null&&(a=!0);else if(typeof i=="number")c=new u(i,0,i,this.getLine(i).length);else if("row"in i)c=u.fromPoints(i,i);else{if(Array.isArray(i))return l=[],i.forEach(function(m){l=l.concat(this.unfold(m))},this),l;c=i}l=this.getFoldsInRangeList(c);for(var d=l;l.length==1&&u.comparePoints(l[0].start,c.start)<0&&u.comparePoints(l[0].end,c.end)>0;)this.expandFolds(l),l=this.getFoldsInRangeList(c);if(a!=!1?this.removeFolds(l):this.expandFolds(l),d.length)return d},this.isRowFolded=function(i,a){return!!this.getFoldLine(i,a)},this.getRowFoldEnd=function(i,a){var c=this.getFoldLine(i,a);return c?c.end.row:i},this.getRowFoldStart=function(i,a){var c=this.getFoldLine(i,a);return c?c.start.row:i},this.getFoldDisplayLine=function(i,a,c,l,d){l==null&&(l=i.start.row),d==null&&(d=0),a==null&&(a=i.end.row),c==null&&(c=this.getLine(a).length);var m=this.doc,v="";return i.walk(function(y,A,S,C){if(!(A<l)){if(A==l){if(S<d)return;C=Math.max(d,C)}y!=null?v+=y:v+=m.getLine(A).substring(C,S)}},a,c),v},this.getDisplayLine=function(i,a,c,l){var d=this.getFoldLine(i);if(d)return this.getFoldDisplayLine(d,i,a,c,l);var m;return m=this.doc.getLine(i),m.substring(l||0,a||m.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(a){var c=a.folds.map(function(l){return l.clone()});return new h(i,c)}),i},this.toggleFold=function(i){var a=this.selection,c=a.getRange(),l,d;if(c.isEmpty()){var m=c.start;if(l=this.getFoldAt(m.row,m.column),l){this.expandFold(l);return}else(d=this.findMatchingBracket(m))?c.comparePoint(d)==1?c.end=d:(c.start=d,c.start.column++,c.end.column--):(d=this.findMatchingBracket({row:m.row,column:m.column+1}))?(c.comparePoint(d)==1?c.end=d:c.start=d,c.start.column++):c=this.getCommentFoldRange(m.row,m.column)||c}else{var v=this.getFoldsInRange(c);if(i&&v.length){this.expandFolds(v);return}else v.length==1&&(l=v[0])}if(l||(l=this.getFoldAt(c.start.row,c.start.column)),l&&l.range.toString()==c.toString()){this.expandFold(l);return}var y="...";if(!c.isMultiLine()){if(y=this.getTextRange(c),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,c)},this.getCommentFoldRange=function(i,a,c){var l=new s(this,i,a),d=l.getCurrentToken(),m=d&&d.type;if(d&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var v=new RegExp(m),y=new u;if(c!=1){do d=l.stepBackward();while(d&&v.test(d.type)&&!/^comment.end/.test(d.type));d=l.stepForward()}if(y.start.row=l.getCurrentTokenRow(),y.start.column=l.getCurrentTokenColumn()+(/^comment.start/.test(d.type)?d.value.length:2),l=new s(this,i,a),c!=-1){var A=-1;do if(d=l.stepForward(),A==-1){var S=this.getState(l.$row);v.test(S)||(A=l.$row)}else if(l.$row>A)break;while(d&&v.test(d.type)&&!/^comment.start/.test(d.type));d=l.stepBackward()}else d=l.getCurrentToken();return y.end.row=l.getCurrentTokenRow(),y.end.column=l.getCurrentTokenColumn(),/^comment.end/.test(d.type)||(y.end.column+=d.value.length-2),y}},this.foldAll=function(i,a,c,l){c==null&&(c=1e5);var d=this.foldWidgets;if(d){a=a||this.getLength(),i=i||0;for(var m=i;m<a;m++)if(d[m]==null&&(d[m]=this.getFoldWidget(m)),d[m]=="start"&&!(l&&!l(m))){var v=this.getFoldWidgetRange(m);v&&v.isMultiLine()&&v.end.row<=a&&v.start.row>=i&&(m=v.end.row,v.collapseChildren=c,this.addFold("...",v))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(a){for(var c=i.getTokens(a),l=0;l<c.length;l++){var d=c[l];if(!(d.type=="text"&&/^\s+$/.test(d.value)))return!!/comment/.test(d.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(i,a){var c=this.foldWidgets;if(!c||a&&c[i])return{};for(var l=i-1,d;l>=0;){var m=c[l];if(m==null&&(m=c[l]=this.getFoldWidget(l)),m=="start"){var v=this.getFoldWidgetRange(l);if(d||(d=v),v&&v.end.row>=i)break}l--}return{range:l!==-1&&v,firstRange:d}},this.onFoldWidgetClick=function(i,a){a instanceof p&&(a=a.domEvent);var c={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},l=this.$toggleFoldWidget(i,c);if(!l){var d=a.target||a.srcElement;d&&/ace_fold-widget/.test(d.className)&&(d.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,a){if(this.getFoldWidget){var c=this.getFoldWidget(i),l=this.getLine(i),d=c==="end"?-1:1,m=this.getFoldAt(i,d===-1?0:l.length,d);if(m)return a.children||a.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(i,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(a.siblings){var y=this.getParentFoldRangeData(i);if(y.range)var A=y.range.start.row+1,S=y.range.end.row;this.foldAll(A,S,a.all?1e4:0)}else a.children?(S=v?v.end.row:this.getLength(),this.foldAll(i+1,S,a.all?1e4:0)):v&&(a.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(i){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var c=this.$toggleFoldWidget(a,{});if(!c){var l=this.getParentFoldRangeData(a,!0);if(c=l.range||l.firstRange,c){a=c.start.row;var d=this.getFoldAt(a,this.getLine(a).length,1);d?this.removeFold(d):this.addFold("...",c)}}},this.updateFoldWidgets=function(i){var a=i.start.row,c=i.end.row-a;if(c===0)this.foldWidgets[a]=null;else if(i.action=="remove")this.foldWidgets.splice(a,c+1,null);else{var l=Array(c+1);l.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,l)}},this.tokenizerUpdateFoldWidgets=function(i){var a=i.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}r.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,f){var u=n("../token_iterator").TokenIterator,h=n("../range").Range;function g(){this.findMatchingBracket=function(s,p){if(s.column==0)return null;var o=p||this.getLine(s.row).charAt(s.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],s):this.$findOpeningBracket(i[2],s):null},this.getBracketRange=function(s){var p=this.getLine(s.row),o=!0,i,a=p.charAt(s.column-1),c=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(c||(a=p.charAt(s.column),s={row:s.row,column:s.column+1},c=a&&a.match(/([\(\[\{])|([\)\]\}])/),o=!1),!c)return null;if(c[1]){var l=this.$findClosingBracket(c[1],s);if(!l)return null;i=h.fromPoints(s,l),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var l=this.$findOpeningBracket(c[2],s);if(!l)return null;i=h.fromPoints(l,s),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(s,p){var o=this.getLine(s.row),i=/([\(\[\{])|([\)\]\}])/,a=!p&&o.charAt(s.column-1),c=a&&a.match(i);if(c||(a=(p===void 0||p)&&o.charAt(s.column),s={row:s.row,column:s.column+1},c=a&&a.match(i)),!c)return null;var l=new h(s.row,s.column-1,s.row,s.column),d=c[1]?this.$findClosingBracket(c[1],s):this.$findOpeningBracket(c[2],s);if(!d)return[l];var m=new h(d.row,d.column,d.row,d.column+1);return[l,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,p,o){var i=this.$brackets[s],a=1,c=new u(this,p.row,p.column),l=c.getCurrentToken();if(l||(l=c.stepForward()),!!l){o||(o=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var d=p.column-c.getCurrentTokenColumn()-2,m=l.value;;){for(;d>=0;){var v=m.charAt(d);if(v==i){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:d+c.getCurrentTokenColumn()}}else v==s&&(a+=1);d-=1}do l=c.stepBackward();while(l&&!o.test(l.type));if(l==null)break;m=l.value,d=m.length-1}return null}},this.$findClosingBracket=function(s,p,o){var i=this.$brackets[s],a=1,c=new u(this,p.row,p.column),l=c.getCurrentToken();if(l||(l=c.stepForward()),!!l){o||(o=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var d=p.column-c.getCurrentTokenColumn();;){for(var m=l.value,v=m.length;d<v;){var y=m.charAt(d);if(y==i){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:d+c.getCurrentTokenColumn()}}else y==s&&(a+=1);d+=1}do l=c.stepForward();while(l&&!o.test(l.type));if(l==null)break;d=0}return null}},this.getMatchingTags=function(s){var p=new u(this,s.row,s.column),o=this.$findTagName(p);if(o){var i=p.stepBackward();return i.value==="<"?this.$findClosingTag(p,o):this.$findOpeningTag(p,o)}},this.$findTagName=function(s){var p=s.getCurrentToken(),o=!1,i=!1;if(p&&p.type.indexOf("tag-name")===-1)do i?p=s.stepBackward():p=s.stepForward(),p&&(p.value==="/>"?i=!0:p.type.indexOf("tag-name")!==-1&&(o=!0));while(p&&!o);return p},this.$findClosingTag=function(s,p){var o,i=p.value,a=p.value,c=0,l=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);p=s.stepForward();var d=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length),m=!1;do if(o=p,p=s.stepForward(),p){if(p.value===">"&&!m){var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(p.type.indexOf("tag-name")!==-1){if(i=p.value,a===i){if(o.value==="<")c++;else if(o.value==="</"&&(c--,c<0)){s.stepBackward();var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);p=s.stepForward();var A=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length);if(p=s.stepForward(),p&&p.value===">")var S=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(a===i&&p.value==="/>"&&(c--,c<0))var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),A=y,S=A,v=new h(d.end.row,d.end.column,d.end.row,d.end.column+1)}while(p&&c>=0);if(l&&v&&y&&S&&d&&A)return{openTag:new h(l.start.row,l.start.column,v.end.row,v.end.column),closeTag:new h(y.start.row,y.start.column,S.end.row,S.end.column),openTagName:d,closeTagName:A}},this.$findOpeningTag=function(s,p){var o=s.getCurrentToken(),i=p.value,a=0,c=s.getCurrentTokenRow(),l=s.getCurrentTokenColumn(),d=l+2,m=new h(c,l,c,d);s.stepForward();var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length);if(p=s.stepForward(),!(!p||p.value!==">")){var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(p=o,c=s.getCurrentTokenRow(),l=s.getCurrentTokenColumn(),d=l+p.value.length,o=s.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(i===p.value)if(o.value==="<"){if(a++,a>0){var A=new h(c,l,c,d),S=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do p=s.stepForward();while(p&&p.value!==">");var C=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else o.value==="</"&&a--}else if(p.value==="/>"){for(var b=0,x=o;x;){if(x.type.indexOf("tag-name")!==-1&&x.value===i){a--;break}else if(x.value==="<")break;x=s.stepBackward(),b++}for(var L=0;L<b;L++)s.stepForward()}}while(o&&a<=0);if(S&&C&&m&&y&&A&&v)return{openTag:new h(S.start.row,S.start.column,C.end.row,C.end.column),closeTag:new h(m.start.row,m.start.column,y.end.row,y.end.column),openTagName:A,closeTagName:v}}}}r.BracketMatch=g}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/lang"),g=n("./bidihandler").BidiHandler,s=n("./config"),p=n("./lib/event_emitter").EventEmitter,o=n("./selection").Selection,i=n("./mode/text").Mode,a=n("./range").Range,c=n("./document").Document,l=n("./background_tokenizer").BackgroundTokenizer,d=n("./search_highlight").SearchHighlight,m=n("./undomanager").UndoManager,v=function(){function $(k,_){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++$.$uid,this.$foldData.toString=function(){return this.join(`
|
1013
|
-
`)},this.bgTokenizer=new l(new i().getTokenizer(),this);var w=this;this.bgTokenizer.on("update",function(
|
1014
|
-
`},$.prototype.getWordRange=function(k,_){var w=this.getLine(k),R=!1;if(_>0&&(R=!!w.charAt(_-1).match(this.tokenRe)),R||(R=!!w.charAt(_).match(this.tokenRe)),R)var T=this.tokenRe;else if(/^\s+$/.test(w.slice(_-1,_+1)))var T=/\s/;else var T=this.nonTokenRe;var O=_;if(O>0){do O--;while(O>=0&&w.charAt(O).match(T));O++}for(var I=_;I<w.length&&w.charAt(I).match(T);)I++;return new a(k,O,k,I)},$.prototype.getAWordRange=function(k,_){for(var w=this.getWordRange(k,_),R=this.getLine(w.end.row);R.charAt(w.end.column).match(/[ \t]/);)w.end.column+=1;return w},$.prototype.setNewLineMode=function(k){this.doc.setNewLineMode(k)},$.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},$.prototype.setUseWorker=function(k){this.setOption("useWorker",k)},$.prototype.getUseWorker=function(){return this.$useWorker},$.prototype.onReloadTokenizer=function(k){var _=k.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",k)},$.prototype.setMode=function(k,_){if(k&&typeof k=="object"){if(k.getTokenizer)return this.$onChangeMode(k);var w=k,R=w.path}else R=k||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[R]&&!w){this.$onChangeMode(this.$modes[R]),_&&_();return}this.$modeId=R,s.loadModule(["mode",R],(function(T){if(this.$modeId!==R)return _&&_();this.$modes[R]&&!w?this.$onChangeMode(this.$modes[R]):T&&T.Mode&&(T=new T.Mode(w),w||(this.$modes[R]=T,T.$id=R),this.$onChangeMode(T)),_&&_()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},$.prototype.$onChangeMode=function(k,_){if(_||(this.$modeId=k.$id),this.$mode!==k){var w=this.$mode;this.$mode=k,this.$stopWorker(),this.$useWorker&&this.$startWorker();var R=k.getTokenizer();if(R.on!==void 0){var T=this.onReloadTokenizer.bind(this);R.on("update",T)}this.bgTokenizer.setTokenizer(R),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=k.tokenRe,this.nonTokenRe=k.nonTokenRe,_||(k.attachToSession&&k.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(k.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:w,mode:k}))}},$.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},$.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(k){s.warn("Could not load worker",k),this.$worker=null}},$.prototype.getMode=function(){return this.$mode},$.prototype.setScrollTop=function(k){this.$scrollTop===k||isNaN(k)||(this.$scrollTop=k,this._signal("changeScrollTop",k))},$.prototype.getScrollTop=function(){return this.$scrollTop},$.prototype.setScrollLeft=function(k){this.$scrollLeft===k||isNaN(k)||(this.$scrollLeft=k,this._signal("changeScrollLeft",k))},$.prototype.getScrollLeft=function(){return this.$scrollLeft},$.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},$.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var k=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>k&&(k=_.screenWidth)}),this.lineWidgetWidth=k},$.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),w=this.$rowLengthCache,R=0,T=0,O=this.$foldData[T],I=O?O.start.row:1/0,F=_.length,P=0;P<F;P++){if(P>I){if(P=O.end.row+1,P>=F)break;O=this.$foldData[T++],I=O?O.start.row:1/0}w[P]==null&&(w[P]=this.$getStringScreenWidth(_[P])[0]),w[P]>R&&(R=w[P])}this.screenWidth=R}},$.prototype.getLine=function(k){return this.doc.getLine(k)},$.prototype.getLines=function(k,_){return this.doc.getLines(k,_)},$.prototype.getLength=function(){return this.doc.getLength()},$.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},$.prototype.insert=function(k,_){return this.doc.insert(k,_)},$.prototype.remove=function(k){return this.doc.remove(k)},$.prototype.removeFullLines=function(k,_){return this.doc.removeFullLines(k,_)},$.prototype.undoChanges=function(k,_){if(k.length){this.$fromUndo=!0;for(var w=k.length-1;w!=-1;w--){var R=k[w];R.action=="insert"||R.action=="remove"?this.doc.revertDelta(R):R.folds&&this.addFolds(R.folds)}!_&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},$.prototype.redoChanges=function(k,_){if(k.length){this.$fromUndo=!0;for(var w=0;w<k.length;w++){var R=k[w];(R.action=="insert"||R.action=="remove")&&this.doc.$safeApplyDelta(R)}!_&&this.$undoSelect&&(k.selectionAfter?this.selection.fromJSON(k.selectionAfter):this.selection.setRange(this.$getUndoSelection(k,!1))),this.$fromUndo=!1}},$.prototype.setUndoSelect=function(k){this.$undoSelect=k},$.prototype.$getUndoSelection=function(k,_){function w(F){return _?F.action!=="insert":F.action==="insert"}for(var R,T,O=0;O<k.length;O++){var I=k[O];if(I.start){if(!R){w(I)?R=a.fromPoints(I.start,I.end):R=a.fromPoints(I.start,I.start);continue}w(I)?(T=I.start,R.compare(T.row,T.column)==-1&&R.setStart(T),T=I.end,R.compare(T.row,T.column)==1&&R.setEnd(T)):(T=I.start,R.compare(T.row,T.column)==-1&&(R=a.fromPoints(I.start,I.start)))}}return R},$.prototype.replace=function(k,_){return this.doc.replace(k,_)},$.prototype.moveText=function(k,_,w){var R=this.getTextRange(k),T=this.getFoldsInRange(k),O=a.fromPoints(_,_);if(!w){this.remove(k);var I=k.start.row-k.end.row,F=I?-k.end.column:k.start.column-k.end.column;F&&(O.start.row==k.end.row&&O.start.column>k.end.column&&(O.start.column+=F),O.end.row==k.end.row&&O.end.column>k.end.column&&(O.end.column+=F)),I&&O.start.row>=k.end.row&&(O.start.row+=I,O.end.row+=I)}if(O.end=this.insert(O.start,R),T.length){var P=k.start,W=O.start,I=W.row-P.row,F=W.column-P.column;this.addFolds(T.map(function(z){return z=z.clone(),z.start.row==P.row&&(z.start.column+=F),z.end.row==P.row&&(z.end.column+=F),z.start.row+=I,z.end.row+=I,z}))}return O},$.prototype.indentRows=function(k,_,w){w=w.replace(/\t/g,this.getTabString());for(var R=k;R<=_;R++)this.doc.insertInLine({row:R,column:0},w)},$.prototype.outdentRows=function(k){for(var _=k.collapseRows(),w=new a(0,0,0,0),R=this.getTabSize(),T=_.start.row;T<=_.end.row;++T){var O=this.getLine(T);w.start.row=T,w.end.row=T;for(var I=0;I<R&&O.charAt(I)==" ";++I);I<R&&O.charAt(I)==" "?(w.start.column=I,w.end.column=I+1):(w.start.column=0,w.end.column=I),this.remove(w)}},$.prototype.$moveLines=function(k,_,w){if(k=this.getRowFoldStart(k),_=this.getRowFoldEnd(_),w<0){var R=this.getRowFoldStart(k+w);if(R<0)return 0;var T=R-k}else if(w>0){var R=this.getRowFoldEnd(_+w);if(R>this.doc.getLength()-1)return 0;var T=R-_}else{k=this.$clipRowToDocument(k),_=this.$clipRowToDocument(_);var T=_-k+1}var O=new a(k,0,_,Number.MAX_VALUE),I=this.getFoldsInRange(O).map(function(P){return P=P.clone(),P.start.row+=T,P.end.row+=T,P}),F=w==0?this.doc.getLines(k,_):this.doc.removeFullLines(k,_);return this.doc.insertFullLines(k+T,F),I.length&&this.addFolds(I),T},$.prototype.moveLinesUp=function(k,_){return this.$moveLines(k,_,-1)},$.prototype.moveLinesDown=function(k,_){return this.$moveLines(k,_,1)},$.prototype.duplicateLines=function(k,_){return this.$moveLines(k,_,0)},$.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},$.prototype.$clipColumnToRow=function(k,_){return _<0?0:Math.min(this.doc.getLine(k).length,_)},$.prototype.$clipPositionToDocument=function(k,_){if(_=Math.max(0,_),k<0)k=0,_=0;else{var w=this.doc.getLength();k>=w?(k=w-1,_=this.doc.getLine(w-1).length):_=Math.min(this.doc.getLine(k).length,_)}return{row:k,column:_}},$.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var _=this.doc.getLength()-1;return k.end.row>_?(k.end.row=_,k.end.column=this.doc.getLine(_).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},$.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},$.prototype.getUseWrapMode=function(){return this.$useWrapMode},$.prototype.setWrapLimitRange=function(k,_){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:k,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},$.prototype.adjustWrapLimit=function(k,_){var w=this.$wrapLimitRange;w.max<0&&(w={min:_,max:_});var R=this.$constrainWrapLimit(k,w.min,w.max);return R!=this.$wrapLimit&&R>1?(this.$wrapLimit=R,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},$.prototype.$constrainWrapLimit=function(k,_,w){return _&&(k=Math.max(_,k)),w&&(k=Math.min(w,k)),k},$.prototype.getWrapLimit=function(){return this.$wrapLimit},$.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},$.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},$.prototype.$updateInternalDataOnChange=function(k){var _=this.$useWrapMode,w=k.action,R=k.start,T=k.end,O=R.row,I=T.row,F=I-O,P=null;if(this.$updating=!0,F!=0)if(w==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(O,F);var W=this.$foldData;P=this.getFoldsInRange(k),this.removeFolds(P);var j=this.getFoldLine(T.row),H=0;if(j){j.addRemoveChars(T.row,T.column,R.column-T.column),j.shiftRow(-F);var z=this.getFoldLine(O);z&&z!==j&&(z.merge(j),j=z),H=W.indexOf(j)+1}for(H;H<W.length;H++){var j=W[H];j.start.row>=T.row&&j.shiftRow(-F)}I=O}else{var K=Array(F);K.unshift(O,0);var q=_?this.$wrapData:this.$rowLengthCache;q.splice.apply(q,K);var W=this.$foldData,j=this.getFoldLine(O),H=0;if(j){var U=j.range.compareInside(R.row,R.column);U==0?(j=j.split(R.row,R.column),j&&(j.shiftRow(F),j.addRemoveChars(I,0,T.column-R.column))):U==-1&&(j.addRemoveChars(O,0,T.column-R.column),j.shiftRow(F)),H=W.indexOf(j)+1}for(H;H<W.length;H++){var j=W[H];j.start.row>=O&&j.shiftRow(F)}}else{F=Math.abs(k.start.column-k.end.column),w==="remove"&&(P=this.getFoldsInRange(k),this.removeFolds(P),F=-F);var j=this.getFoldLine(O);j&&j.addRemoveChars(O,R.column,F)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(O,I):this.$updateRowLengthCache(O,I),P},$.prototype.$updateRowLengthCache=function(k,_){this.$rowLengthCache[k]=null,this.$rowLengthCache[_]=null},$.prototype.$updateWrapData=function(k,_){var w=this.doc.getAllLines(),R=this.getTabSize(),T=this.$wrapData,O=this.$wrapLimit,I,F,P=k;for(_=Math.min(_,w.length-1);P<=_;)F=this.getFoldLine(P,F),F?(I=[],F.walk((function(W,j,H,z){var K;if(W!=null){K=this.$getDisplayTokens(W,I.length),K[0]=S;for(var q=1;q<K.length;q++)K[q]=C}else K=this.$getDisplayTokens(w[j].substring(z,H),I.length);I=I.concat(K)}).bind(this),F.end.row,w[F.end.row].length+1),T[F.start.row]=this.$computeWrapSplits(I,O,R),P=F.end.row+1):(I=this.$getDisplayTokens(w[P]),T[P]=this.$computeWrapSplits(I,O,R),P++)},$.prototype.$computeWrapSplits=function(k,_,w){if(k.length==0)return[];var R=[],T=k.length,O=0,I=0,F=this.$wrapAsCode,P=this.$indentedSoftWrap,W=_<=Math.max(2*w,8)||P===!1?0:Math.floor(_/2);function j(){var U=0;if(W===0)return U;if(P)for(var X=0;X<k.length;X++){var Y=k[X];if(Y==x)U+=1;else if(Y==L)U+=w;else{if(Y==E)continue;break}}return F&&P!==!1&&(U+=w),Math.min(U,W)}function H(U){for(var X=U-O,Y=O;Y<U;Y++){var V=k[Y];(V===12||V===2)&&(X-=1)}R.length||(z=j(),R.indent=z),I+=X,R.push(I),O=U}for(var z=0;T-O>_-z;){var K=O+_-z;if(k[K-1]>=x&&k[K]>=x){H(K);continue}if(k[K]==S||k[K]==C){for(K;K!=O-1&&k[K]!=S;K--);if(K>O){H(K);continue}for(K=O+_,K;K<k.length&&k[K]==C;K++);if(K==k.length)break;H(K);continue}for(var q=Math.max(K-(_-(_>>2)),O-1);K>q&&k[K]<S;)K--;if(F){for(;K>q&&k[K]<S;)K--;for(;K>q&&k[K]==b;)K--}else for(;K>q&&k[K]<x;)K--;if(K>q){H(++K);continue}K=O+_,k[K]==A&&K--,H(K-z)}return R},$.prototype.$getDisplayTokens=function(k,_){var w=[],R;_=_||0;for(var T=0;T<k.length;T++){var O=k.charCodeAt(T);if(O==9){R=this.getScreenTabSize(w.length+_),w.push(L);for(var I=1;I<R;I++)w.push(E)}else O==32?w.push(x):O>39&&O<48||O>57&&O<64?w.push(b):O>=4352&&M(O)?w.push(y,A):w.push(y)}return w},$.prototype.$getStringScreenWidth=function(k,_,w){if(_==0)return[0,0];_==null&&(_=1/0),w=w||0;var R,T;for(T=0;T<k.length&&(R=k.charCodeAt(T),R==9?w+=this.getScreenTabSize(w):R>=4352&&M(R)?w+=2:w+=1,!(w>_));T++);return[w,T]},$.prototype.getRowLength=function(k){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?_:this.$wrapData[k].length+_},$.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},$.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var _=this.screenToDocumentPosition(k,Number.MAX_VALUE),w=this.$wrapData[_.row];return w.length&&w[0]<_.column?w.indent:0}else return 0},$.prototype.getScreenLastRowColumn=function(k){var _=this.screenToDocumentPosition(k,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},$.prototype.getDocumentLastRowColumn=function(k,_){var w=this.documentToScreenRow(k,_);return this.getScreenLastRowColumn(w)},$.prototype.getDocumentLastRowColumnPosition=function(k,_){var w=this.documentToScreenRow(k,_);return this.screenToDocumentPosition(w,Number.MAX_VALUE/10)},$.prototype.getRowSplitData=function(k){if(this.$useWrapMode)return this.$wrapData[k]},$.prototype.getScreenTabSize=function(k){return this.$tabSize-(k%this.$tabSize|0)},$.prototype.screenToDocumentRow=function(k,_){return this.screenToDocumentPosition(k,_).row},$.prototype.screenToDocumentColumn=function(k,_){return this.screenToDocumentPosition(k,_).column},$.prototype.screenToDocumentPosition=function(k,_,w){if(k<0)return{row:0,column:0};var R,T=0,O=0,I,F=0,P=0,W=this.$screenRowCache,j=this.$getRowCacheIndex(W,k),H=W.length;if(H&&j>=0)var F=W[j],T=this.$docRowCache[j],z=k>W[H-1];else var z=!H;for(var K=this.getLength()-1,q=this.getNextFoldLine(T),U=q?q.start.row:1/0;F<=k&&(P=this.getRowLength(T),!(F+P>k||T>=K));)F+=P,T++,T>U&&(T=q.end.row+1,q=this.getNextFoldLine(T,q),U=q?q.start.row:1/0),z&&(this.$docRowCache.push(T),this.$screenRowCache.push(F));if(q&&q.start.row<=T)R=this.getFoldDisplayLine(q),T=q.start.row;else{if(F+P<=k||T>K)return{row:K,column:this.getLine(K).length};R=this.getLine(T),q=null}var X=0,Y=Math.floor(k-F);if(this.$useWrapMode){var V=this.$wrapData[T];V&&(I=V[Y],Y>0&&V.length&&(X=V.indent,O=V[Y-1]||V[V.length-1],R=R.substring(O)))}return w!==void 0&&this.$bidiHandler.isBidiRow(F+Y,T,Y)&&(_=this.$bidiHandler.offsetToCol(w)),O+=this.$getStringScreenWidth(R,_-X)[1],this.$useWrapMode&&O>=I&&(O=I-1),q?q.idxToPosition(O):{row:T,column:O}},$.prototype.documentToScreenPosition=function(k,_){if(typeof _>"u")var w=this.$clipPositionToDocument(k.row,k.column);else w=this.$clipPositionToDocument(k,_);k=w.row,_=w.column;var R=0,T=null,O=null;O=this.getFoldAt(k,_,1),O&&(k=O.start.row,_=O.start.column);var I,F=0,P=this.$docRowCache,W=this.$getRowCacheIndex(P,k),j=P.length;if(j&&W>=0)var F=P[W],R=this.$screenRowCache[W],H=k>P[j-1];else var H=!j;for(var z=this.getNextFoldLine(F),K=z?z.start.row:1/0;F<k;){if(F>=K){if(I=z.end.row+1,I>k)break;z=this.getNextFoldLine(I,z),K=z?z.start.row:1/0}else I=F+1;R+=this.getRowLength(F),F=I,H&&(this.$docRowCache.push(F),this.$screenRowCache.push(R))}var q="";z&&F>=K?(q=this.getFoldDisplayLine(z,k,_),T=z.start.row):(q=this.getLine(k).substring(0,_),T=k);var U=0;if(this.$useWrapMode){var X=this.$wrapData[T];if(X){for(var Y=0;q.length>=X[Y];)R++,Y++;q=q.substring(X[Y-1]||0,q.length),U=Y>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(R+=this.lineWidgets[F].rowsAbove),{row:R,column:U+this.$getStringScreenWidth(q)[0]}},$.prototype.documentToScreenColumn=function(k,_){return this.documentToScreenPosition(k,_).column},$.prototype.documentToScreenRow=function(k,_){return this.documentToScreenPosition(k,_).row},$.prototype.getScreenLength=function(){var k=0,_=null;if(this.$useWrapMode)for(var T=this.$wrapData.length,O=0,R=0,_=this.$foldData[R++],I=_?_.start.row:1/0;O<T;){var F=this.$wrapData[O];k+=F?F.length+1:1,O++,O>I&&(O=_.end.row+1,_=this.$foldData[R++],I=_?_.start.row:1/0)}else{k=this.getLength();for(var w=this.$foldData,R=0;R<w.length;R++)_=w[R],k-=_.end.row-_.start.row}return this.lineWidgets&&(k+=this.$getWidgetScreenLength()),k},$.prototype.$setFontMetrics=function(k){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,w,R){if(w===0)return[0,0];w||(w=1/0),R=R||0;var T,O;for(O=0;O<_.length&&(T=_.charAt(O),T===" "?R+=this.getScreenTabSize(R):R+=k.getCharacterWidth(T),!(R>w));O++);return[R,O]})},$.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},$}();v.$uid=0,v.prototype.$modes=s.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=M,u.implement(v.prototype,p);var y=1,A=2,S=3,C=4,b=9,x=10,L=11,E=12;function M($){return $<4352?!1:$>=4352&&$<=4447||$>=4515&&$<=4519||$>=4602&&$<=4607||$>=9001&&$<=9002||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12283||$>=12288&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12589||$>=12593&&$<=12686||$>=12688&&$<=12730||$>=12736&&$<=12771||$>=12784&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=13054||$>=13056&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=55216&&$<=55238||$>=55243&&$<=55291||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=65281&&$<=65376||$>=65504&&$<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),s.defineOptions(v.prototype,"session",{wrap:{set:function($){if(!$||$=="off"?$=!1:$=="free"?$=!0:$=="printMargin"?$=-1:typeof $=="string"&&($=parseInt($,10)||!1),this.$wrap!=$)if(this.$wrap=$,!$)this.setUseWrapMode(!1);else{var k=typeof $=="number"?$:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function($){$=$=="auto"?this.$mode.type!="text":$!="text",$!=this.$wrapAsCode&&(this.$wrapAsCode=$,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function($){this.$useWorker=$,this.$stopWorker(),$&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function($){$=parseInt($),$>0&&this.$tabSize!==$&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=$,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function($){this.setFoldStyle($)},handlesSet:!0},overwrite:{set:function($){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function($){this.doc.setNewLineMode($)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function($){this.setMode($)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,f){var u=n("./lib/lang"),h=n("./lib/oop"),g=n("./range").Range,s=function(){function o(){this.$options={}}return o.prototype.set=function(i){return h.mixin(this.$options,i),this},o.prototype.getOptions=function(){return u.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var a=this.$options,c=this.$matchIterator(i,a);if(!c)return!1;var l=null;return c.forEach(function(d,m,v,y){return l=new g(d,m,v,y),m==y&&a.start&&a.start.start&&a.skipCurrent!=!1&&l.isEqual(a.start)?(l=null,!1):!0}),l},o.prototype.findAll=function(i){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var c=a.range,l=c?i.getLines(c.start.row,c.end.row):i.doc.getAllLines(),d=[],m=a.re;if(a.$isMultiLine){var v=m.length,y=l.length-v,A;e:for(var S=m.offset||0;S<=y;S++){for(var C=0;C<v;C++)if(l[S+C].search(m[C])==-1)continue e;var b=l[S],x=l[S+v-1],L=b.length-b.match(m[0])[0].length,E=x.match(m[v-1])[0].length;A&&A.end.row===S&&A.end.column>L||(d.push(A=new g(S,L,S+v-1,E)),v>2&&(S=S+v-2))}}else for(var M=0;M<l.length;M++)for(var $=u.getMatchOffsets(l[M],m),C=0;C<$.length;C++){var k=$[C];d.push(new g(M,k.offset,M,k.offset+k.length))}if(c){for(var _=c.start.column,w=c.end.column,M=0,C=d.length-1;M<C&&d[M].start.column<_&&d[M].start.row==0;)M++;for(var R=c.end.row-c.start.row;M<C&&d[C].end.column>w&&d[C].end.row==R;)C--;for(d=d.slice(M,C+1),M=0,C=d.length;M<C;M++)d[M].start.row+=c.start.row,d[M].end.row+=c.start.row}return d},o.prototype.replace=function(i,a){var c=this.$options,l=this.$assembleRegExp(c);if(c.$isMultiLine)return a;if(l){var d=l.exec(i);if(!d||d[0].length!=i.length)return null;if(a=i.replace(l,a),c.preserveCase){a=a.split("");for(var m=Math.min(i.length,i.length);m--;){var v=i[m];v&&v.toLowerCase()!=v?a[m]=a[m].toUpperCase():a[m]=a[m].toLowerCase()}a=a.join("")}return a}},o.prototype.$assembleRegExp=function(i,a){if(i.needle instanceof RegExp)return i.re=i.needle;var c=i.needle;if(!i.needle)return i.re=!1;i.regExp||(c=u.escapeRegExp(c));var l=i.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),i.$supportsUnicodeFlag=!0,l+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(c=p(c,i)),i.$isMultiLine=!a&&/[\n\r]/.test(c),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(c,l);try{var d=new RegExp(c,l)}catch{d=!1}return i.re=d},o.prototype.$assembleMultilineRegExp=function(i,a){for(var c=i.replace(/\r\n|\r|\n/g,`$
|
1011
|
+
`):b=a(C.value)),C.start&&(b+=a(C)),(C.id||C.rev)&&(b+=" ("+(C.id||C.rev)+")"),b}function a(C){return C.start.row+":"+C.start.column+"=>"+C.end.row+":"+C.end.column}function c(C,b){var R=C.action=="insert",L=b.action=="insert";if(R&&L)if(s(b.start,C.end)>=0)m(b,C,-1);else if(s(b.start,C.start)<=0)m(C,b,1);else return null;else if(R&&!L)if(s(b.start,C.end)>=0)m(b,C,-1);else if(s(b.end,C.start)<=0)m(C,b,-1);else return null;else if(!R&&L)if(s(b.start,C.start)>=0)m(b,C,1);else if(s(b.start,C.start)<=0)m(C,b,1);else return null;else if(!R&&!L)if(s(b.start,C.start)>=0)m(b,C,1);else if(s(b.end,C.start)<=0)m(C,b,-1);else return null;return[b,C]}function l(C,b){for(var R=C.length;R--;)for(var L=0;L<b.length;L++)if(!c(C[R],b[L])){for(;R<C.length;){for(;L--;)c(b[L],C[R]);L=b.length,R++}return[C,b]}return C.selectionBefore=b.selectionBefore=C.selectionAfter=b.selectionAfter=null,[b,C]}function d(C,b){var R=C.action=="insert",L=b.action=="insert";if(R&&L)s(C.start,b.start)<0?m(b,C,1):m(C,b,1);else if(R&&!L)s(C.start,b.end)>=0?m(C,b,-1):(s(C.start,b.start)<=0||m(C,g.fromPoints(b.start,C.start),-1),m(b,C,1));else if(!R&&L)s(b.start,C.end)>=0?m(b,C,-1):(s(b.start,C.start)<=0||m(b,g.fromPoints(C.start,b.start),-1),m(C,b,1));else if(!R&&!L)if(s(b.start,C.end)>=0)m(b,C,-1);else if(s(b.end,C.start)<=0)m(C,b,-1);else{var E,M;return s(C.start,b.start)<0&&(E=C,C=y(C,b.start)),s(C.end,b.end)>0&&(M=y(C,b.end)),v(b.end,C.start,C.end,-1),M&&!E&&(C.lines=M.lines,C.start=M.start,C.end=M.end,M=C),[b,E,M].filter(Boolean)}return[b,C]}function m(C,b,R){v(C.start,b.start,b.end,R),v(C.end,b.start,b.end,R)}function v(C,b,R,L){C.row==(L==1?b:R).row&&(C.column+=L*(R.column-b.column)),C.row+=L*(R.row-b.row)}function y(C,b){var R=C.lines,L=C.end;C.end=p(b);var E=C.end.row-C.start.row,M=R.splice(E,R.length),$=E?b.column:b.column-C.start.column;R.push(M[0].substring(0,$)),M[0]=M[0].substr($);var k={start:p(b),end:L,lines:M,action:C.action};return k}function A(C,b){b=o(b);for(var R=C.length;R--;){for(var L=C[R],E=0;E<L.length;E++){var M=L[E],$=d(M,b);b=$[0],$.length!=2&&($[2]?(L.splice(E+1,1,$[1],$[2]),E++):$[1]||(L.splice(E,1),E--))}L.length||C.splice(R,1)}return C}function S(C,b){for(var R=0;R<b.length;R++)for(var L=b[R],E=0;E<L.length;E++)A(C,L[E])}r.UndoManager=u}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,f){var u=n("../range").Range,h=function(){function g(s,p){this.foldData=s,Array.isArray(p)?this.folds=p:p=this.folds=[p];var o=p[p.length-1];this.range=new u(p[0].start.row,p[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return g.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(p){p.start.row+=s,p.end.row+=s})},g.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(p,o){return-p.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},g.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},g.prototype.walk=function(s,p,o){var i=0,a=this.folds,c,l,d,m=!0;p==null&&(p=this.end.row,o=this.end.column);for(var v=0;v<a.length;v++){if(c=a[v],l=c.range.compareStart(p,o),l==-1){s(null,p,o,i,m);return}if(d=s(null,c.start.row,c.start.column,i,m),d=!d&&s(c.placeholder,c.start.row,c.start.column,i),d||l===0)return;m=!c.sameRow,i=c.end.column}s(null,p,o,i,m)},g.prototype.getNextFoldTo=function(s,p){for(var o,i,a=0;a<this.folds.length;a++){if(o=this.folds[a],i=o.range.compareEnd(s,p),i==-1)return{fold:o,kind:"after"};if(i===0)return{fold:o,kind:"inside"}}return null},g.prototype.addRemoveChars=function(s,p,o){var i=this.getNextFoldTo(s,p),a,c;if(i){if(a=i.fold,i.kind=="inside"&&a.start.column!=p&&a.start.row!=s)window.console&&window.console.log(s,p,a);else if(a.start.row==s){c=this.folds;var l=c.indexOf(a);for(l===0&&(this.start.column+=o),l;l<c.length;l++){if(a=c[l],a.start.column+=o,!a.sameRow)return;a.end.column+=o}this.end.column+=o}}},g.prototype.split=function(s,p){var o=this.getNextFoldTo(s,p);if(!o||o.kind=="inside")return null;var i=o.fold,a=this.folds,c=this.foldData,l=a.indexOf(i),d=a[l-1];this.end.row=d.end.row,this.end.column=d.end.column,a=a.splice(l,a.length-l);var m=new g(c,a);return c.splice(c.indexOf(this)+1,0,m),m},g.prototype.merge=function(s){for(var p=s.folds,o=0;o<p.length;o++)this.addFold(p[o]);var i=this.foldData;i.splice(i.indexOf(s),1)},g.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(p){s.push(" "+p.toString())}),s.push("]"),s.join(`
|
1012
|
+
`)},g.prototype.idxToPosition=function(s){for(var p=0,o=0;o<this.folds.length;o++){var i=this.folds[o];if(s-=i.start.column-p,s<0)return{row:i.start.row,column:i.start.column+s};if(s-=i.placeholder.length,s<0)return i.start;p=i.end.column}return{row:this.end.row,column:this.end.column+s}},g}();r.FoldLine=h}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,f){var u=n("./range").Range,h=u.comparePoints,g=function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(p,o,i){for(var a=this.ranges,c=i||0;c<a.length;c++){var l=a[c],d=h(p,l.end);if(!(d>0)){var m=h(p,l.start);return d===0?o&&m!==0?-c-2:c:m>0||m===0&&!o?c:-c-1}}return-c-1},s.prototype.add=function(p){var o=!p.isEmpty(),i=this.pointIndex(p.start,o);i<0&&(i=-i-1);var a=this.pointIndex(p.end,o,i);return a<0?a=-a-1:a++,this.ranges.splice(i,a-i,p)},s.prototype.addList=function(p){for(var o=[],i=p.length;i--;)o.push.apply(o,this.add(p[i]));return o},s.prototype.substractPoint=function(p){var o=this.pointIndex(p);if(o>=0)return this.ranges.splice(o,1)},s.prototype.merge=function(){var p=[],o=this.ranges;o=o.sort(function(d,m){return h(d.start,m.start)});for(var i=o[0],a,c=1;c<o.length;c++){a=i,i=o[c];var l=h(a.end,i.start);l<0||l==0&&!a.isEmpty()&&!i.isEmpty()||(h(a.end,i.end)<0&&(a.end.row=i.end.row,a.end.column=i.end.column),o.splice(c,1),p.push(i),i=a,c--)}return this.ranges=o,p},s.prototype.contains=function(p,o){return this.pointIndex({row:p,column:o})>=0},s.prototype.containsPoint=function(p){return this.pointIndex(p)>=0},s.prototype.rangeAtPoint=function(p){var o=this.pointIndex(p);if(o>=0)return this.ranges[o]},s.prototype.clipRows=function(p,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row<p)return[];var a=this.pointIndex({row:p,column:0});a<0&&(a=-a-1);var c=this.pointIndex({row:o,column:0},a);c<0&&(c=-c-1);for(var l=[],d=a;d<c;d++)l.push(i[d]);return l},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(p){this.session&&this.detach(),this.session=p,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(p){for(var o=p.start,i=p.end,a=o.row,c=i.row,l=this.ranges,d=0,m=l.length;d<m;d++){var v=l[d];if(v.end.row>=a)break}if(p.action=="insert")for(var y=c-a,A=-o.column+i.column;d<m;d++){var v=l[d];if(v.start.row>a)break;if(v.start.row==a&&v.start.column>=o.column&&(v.start.column==o.column&&this.$bias<=0||(v.start.column+=A,v.start.row+=y)),v.end.row==a&&v.end.column>=o.column){if(v.end.column==o.column&&this.$bias<0)continue;v.end.column==o.column&&A>0&&d<m-1&&v.end.column>v.start.column&&v.end.column==l[d+1].start.column&&(v.end.column-=A),v.end.column+=A,v.end.row+=y}}else for(var y=a-c,A=o.column-i.column;d<m;d++){var v=l[d];if(v.start.row>c)break;v.end.row<c&&(a<v.end.row||a==v.end.row&&o.column<v.end.column)?(v.end.row=a,v.end.column=o.column):v.end.row==c?v.end.column<=i.column?(y||v.end.column>o.column)&&(v.end.column=o.column,v.end.row=o.row):(v.end.column+=A,v.end.row+=y):v.end.row>c&&(v.end.row+=y),v.start.row<c&&(a<v.start.row||a==v.start.row&&o.column<v.start.column)?(v.start.row=a,v.start.column=o.column):v.start.row==c?v.start.column<=i.column?(y||v.start.column>o.column)&&(v.start.column=o.column,v.start.row=o.row):(v.start.column+=A,v.start.row+=y):v.start.row>c&&(v.start.row+=y)}if(y!=0&&d<m)for(;d<m;d++){var v=l[d];v.start.row+=y,v.end.row+=y}},s}();g.prototype.comparePoints=h,r.RangeList=g}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,f){var u=this&&this.__extends||function(){var a=function(c,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(d[v]=m[v])},a(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(c,l);function d(){this.constructor=c}c.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),h=n("../range_list").RangeList,g=function(a){u(c,a);function c(l,d){var m=a.call(this)||this;return m.foldLine=null,m.placeholder=d,m.range=l,m.start=l.start,m.end=l.end,m.sameRow=l.start.row==l.end.row,m.subFolds=m.ranges=[],m}return c.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},c.prototype.setFoldLine=function(l){this.foldLine=l,this.subFolds.forEach(function(d){d.setFoldLine(l)})},c.prototype.clone=function(){var l=this.range.clone(),d=new c(l,this.placeholder);return this.subFolds.forEach(function(m){d.subFolds.push(m.clone())}),d.collapseChildren=this.collapseChildren,d},c.prototype.addSubFold=function(l){if(!this.range.isEqual(l)){p(l,this.start);for(var A=l.start.row,S=l.start.column,d=0,m=-1;d<this.subFolds.length&&(m=this.subFolds[d].range.compare(A,S),m==1);d++);var v=this.subFolds[d],y=0;if(m==0){if(v.range.containsRange(l))return v.addSubFold(l);y=1}for(var A=l.range.end.row,S=l.range.end.column,C=d,m=-1;C<this.subFolds.length&&(m=this.subFolds[C].range.compare(A,S),m==1);C++);m==0&&C++;for(var b=this.subFolds.splice(d,C-d,l),R=m==0?b.length-1:b.length,L=y;L<R;L++)l.addSubFold(b[L]);return l.setFoldLine(this.foldLine),l}},c.prototype.restoreRange=function(l){return i(l,this.start)},c}(h);function s(a,c){a.row-=c.row,a.row==0&&(a.column-=c.column)}function p(a,c){s(a.start,c),s(a.end,c)}function o(a,c){a.row==0&&(a.column+=c.column),a.row+=c.row}function i(a,c){o(a.start,c),o(a.end,c)}r.Fold=g}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,f){var u=n("../range").Range,h=n("./fold_line").FoldLine,g=n("./fold").Fold,s=n("../token_iterator").TokenIterator,p=n("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(i,a,c){var l=this.getFoldLine(i);if(!l)return null;for(var d=l.folds,m=0;m<d.length;m++){var v=d[m].range;if(v.contains(i,a)){if(c==1&&v.isEnd(i,a)&&!v.isEmpty())continue;if(c==-1&&v.isStart(i,a)&&!v.isEmpty())continue;return d[m]}}},this.getFoldsInRange=function(i){var a=i.start,c=i.end,l=this.$foldData,d=[];a.column+=1,c.column-=1;for(var m=0;m<l.length;m++){var v=l[m].range.compareRange(i);if(v!=2){if(v==-2)break;for(var y=l[m].folds,A=0;A<y.length;A++){var S=y[A];if(v=S.range.compareRange(i),v==-2)break;if(v==2)continue;if(v==42)break;d.push(S)}}}return a.column-=1,c.column+=1,d},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var a=[];i.forEach(function(c){a=a.concat(this.getFoldsInRange(c))},this)}else var a=this.getFoldsInRange(i);return a},this.getAllFolds=function(){for(var i=[],a=this.$foldData,c=0;c<a.length;c++)for(var l=0;l<a[c].folds.length;l++)i.push(a[c].folds[l]);return i},this.getFoldStringAt=function(i,a,c,l){if(l=l||this.getFoldLine(i),!l)return null;for(var d={end:{column:0}},m,v,y=0;y<l.folds.length;y++){v=l.folds[y];var A=v.range.compareEnd(i,a);if(A==-1){m=this.getLine(v.start.row).substring(d.end.column,v.start.column);break}else if(A===0)return null;d=v}return m||(m=this.getLine(v.start.row).substring(d.end.column)),c==-1?m.substring(0,a-d.end.column):c==1?m.substring(a-d.end.column):m},this.getFoldLine=function(i,a){var c=this.$foldData,l=0;for(a&&(l=c.indexOf(a)),l==-1&&(l=0),l;l<c.length;l++){var d=c[l];if(d.start.row<=i&&d.end.row>=i)return d;if(d.end.row>i)return null}return null},this.getNextFoldLine=function(i,a){var c=this.$foldData,l=0;for(a&&(l=c.indexOf(a)),l==-1&&(l=0),l;l<c.length;l++){var d=c[l];if(d.end.row>=i)return d}return null},this.getFoldedRowCount=function(i,a){for(var c=this.$foldData,l=a-i+1,d=0;d<c.length;d++){var m=c[d],v=m.end.row,y=m.start.row;if(v>=a){y<a&&(y>=i?l-=a-y:l=0);break}else v>=i&&(y>=i?l-=v-y:l-=v-i+1)}return l},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(a,c){return a.start.row-c.start.row}),i},this.addFold=function(i,a){var c=this.$foldData,l=!1,d;i instanceof g?d=i:(d=new g(a,i),d.collapseChildren=a.collapseChildren),this.$clipRangeToDocument(d.range);var m=d.start.row,v=d.start.column,y=d.end.row,A=d.end.column,S=this.getFoldAt(m,v,1),C=this.getFoldAt(y,A,-1);if(S&&C==S)return S.addSubFold(d);S&&!S.range.isStart(m,v)&&this.removeFold(S),C&&!C.range.isEnd(y,A)&&this.removeFold(C);var b=this.getFoldsInRange(d.range);b.length>0&&(this.removeFolds(b),d.collapseChildren||b.forEach(function(M){d.addSubFold(M)}));for(var R=0;R<c.length;R++){var L=c[R];if(y==L.start.row){L.addFold(d),l=!0;break}else if(m==L.end.row){if(L.addFold(d),l=!0,!d.sameRow){var E=c[R+1];if(E&&E.start.row==y){L.merge(E);break}}break}else if(y<=L.start.row)break}return l||(L=this.$addFoldLine(new h(this.$foldData,d))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:d,action:"add"}),d},this.addFolds=function(i){i.forEach(function(a){this.addFold(a)},this)},this.removeFold=function(i){var a=i.foldLine,c=a.start.row,l=a.end.row,d=this.$foldData,m=a.folds;if(m.length==1)d.splice(d.indexOf(a),1);else if(a.range.isEnd(i.end.row,i.end.column))m.pop(),a.end.row=m[m.length-1].end.row,a.end.column=m[m.length-1].end.column;else if(a.range.isStart(i.start.row,i.start.column))m.shift(),a.start.row=m[0].start.row,a.start.column=m[0].start.column;else if(i.sameRow)m.splice(m.indexOf(i),1);else{var v=a.split(i.start.row,i.start.column);m=v.folds,m.shift(),v.start.row=m[0].start.row,v.start.column=m[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(c,l):this.$updateRowLengthCache(c,l)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var a=[],c=0;c<i.length;c++)a.push(i[c]);a.forEach(function(l){this.removeFold(l)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(a){i.restoreRange(a),this.addFold(a)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(i,a){var c,l;if(i==null)c=new u(0,0,this.getLength(),0),a==null&&(a=!0);else if(typeof i=="number")c=new u(i,0,i,this.getLine(i).length);else if("row"in i)c=u.fromPoints(i,i);else{if(Array.isArray(i))return l=[],i.forEach(function(m){l=l.concat(this.unfold(m))},this),l;c=i}l=this.getFoldsInRangeList(c);for(var d=l;l.length==1&&u.comparePoints(l[0].start,c.start)<0&&u.comparePoints(l[0].end,c.end)>0;)this.expandFolds(l),l=this.getFoldsInRangeList(c);if(a!=!1?this.removeFolds(l):this.expandFolds(l),d.length)return d},this.isRowFolded=function(i,a){return!!this.getFoldLine(i,a)},this.getRowFoldEnd=function(i,a){var c=this.getFoldLine(i,a);return c?c.end.row:i},this.getRowFoldStart=function(i,a){var c=this.getFoldLine(i,a);return c?c.start.row:i},this.getFoldDisplayLine=function(i,a,c,l,d){l==null&&(l=i.start.row),d==null&&(d=0),a==null&&(a=i.end.row),c==null&&(c=this.getLine(a).length);var m=this.doc,v="";return i.walk(function(y,A,S,C){if(!(A<l)){if(A==l){if(S<d)return;C=Math.max(d,C)}y!=null?v+=y:v+=m.getLine(A).substring(C,S)}},a,c),v},this.getDisplayLine=function(i,a,c,l){var d=this.getFoldLine(i);if(d)return this.getFoldDisplayLine(d,i,a,c,l);var m;return m=this.doc.getLine(i),m.substring(l||0,a||m.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(a){var c=a.folds.map(function(l){return l.clone()});return new h(i,c)}),i},this.toggleFold=function(i){var a=this.selection,c=a.getRange(),l,d;if(c.isEmpty()){var m=c.start;if(l=this.getFoldAt(m.row,m.column),l){this.expandFold(l);return}else(d=this.findMatchingBracket(m))?c.comparePoint(d)==1?c.end=d:(c.start=d,c.start.column++,c.end.column--):(d=this.findMatchingBracket({row:m.row,column:m.column+1}))?(c.comparePoint(d)==1?c.end=d:c.start=d,c.start.column++):c=this.getCommentFoldRange(m.row,m.column)||c}else{var v=this.getFoldsInRange(c);if(i&&v.length){this.expandFolds(v);return}else v.length==1&&(l=v[0])}if(l||(l=this.getFoldAt(c.start.row,c.start.column)),l&&l.range.toString()==c.toString()){this.expandFold(l);return}var y="...";if(!c.isMultiLine()){if(y=this.getTextRange(c),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,c)},this.getCommentFoldRange=function(i,a,c){var l=new s(this,i,a),d=l.getCurrentToken(),m=d&&d.type;if(d&&/^comment|string/.test(m)){m=m.match(/comment|string/)[0],m=="comment"&&(m+="|doc-start|\\.doc");var v=new RegExp(m),y=new u;if(c!=1){do d=l.stepBackward();while(d&&v.test(d.type)&&!/^comment.end/.test(d.type));d=l.stepForward()}if(y.start.row=l.getCurrentTokenRow(),y.start.column=l.getCurrentTokenColumn()+(/^comment.start/.test(d.type)?d.value.length:2),l=new s(this,i,a),c!=-1){var A=-1;do if(d=l.stepForward(),A==-1){var S=this.getState(l.$row);v.test(S)||(A=l.$row)}else if(l.$row>A)break;while(d&&v.test(d.type)&&!/^comment.start/.test(d.type));d=l.stepBackward()}else d=l.getCurrentToken();return y.end.row=l.getCurrentTokenRow(),y.end.column=l.getCurrentTokenColumn(),/^comment.end/.test(d.type)||(y.end.column+=d.value.length-2),y}},this.foldAll=function(i,a,c,l){c==null&&(c=1e5);var d=this.foldWidgets;if(d){a=a||this.getLength(),i=i||0;for(var m=i;m<a;m++)if(d[m]==null&&(d[m]=this.getFoldWidget(m)),d[m]=="start"&&!(l&&!l(m))){var v=this.getFoldWidgetRange(m);v&&v.isMultiLine()&&v.end.row<=a&&v.start.row>=i&&(m=v.end.row,v.collapseChildren=c,this.addFold("...",v))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(a){for(var c=i.getTokens(a),l=0;l<c.length;l++){var d=c[l];if(!(d.type=="text"&&/^\s+$/.test(d.value)))return!!/comment/.test(d.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var a=this.$foldMode;this.$setFolding(null),this.$setFolding(a)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(i,a){var c=this.foldWidgets;if(!c||a&&c[i])return{};for(var l=i-1,d;l>=0;){var m=c[l];if(m==null&&(m=c[l]=this.getFoldWidget(l)),m=="start"){var v=this.getFoldWidgetRange(l);if(d||(d=v),v&&v.end.row>=i)break}l--}return{range:l!==-1&&v,firstRange:d}},this.onFoldWidgetClick=function(i,a){a instanceof p&&(a=a.domEvent);var c={children:a.shiftKey,all:a.ctrlKey||a.metaKey,siblings:a.altKey},l=this.$toggleFoldWidget(i,c);if(!l){var d=a.target||a.srcElement;d&&/ace_fold-widget/.test(d.className)&&(d.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,a){if(this.getFoldWidget){var c=this.getFoldWidget(i),l=this.getLine(i),d=c==="end"?-1:1,m=this.getFoldAt(i,d===-1?0:l.length,d);if(m)return a.children||a.all?this.removeFold(m):this.expandFold(m),m;var v=this.getFoldWidgetRange(i,!0);if(v&&!v.isMultiLine()&&(m=this.getFoldAt(v.start.row,v.start.column,1),m&&v.isEqual(m.range)))return this.removeFold(m),m;if(a.siblings){var y=this.getParentFoldRangeData(i);if(y.range)var A=y.range.start.row+1,S=y.range.end.row;this.foldAll(A,S,a.all?1e4:0)}else a.children?(S=v?v.end.row:this.getLength(),this.foldAll(i+1,S,a.all?1e4:0)):v&&(a.all&&(v.collapseChildren=1e4),this.addFold("...",v));return v}},this.toggleFoldWidget=function(i){var a=this.selection.getCursor().row;a=this.getRowFoldStart(a);var c=this.$toggleFoldWidget(a,{});if(!c){var l=this.getParentFoldRangeData(a,!0);if(c=l.range||l.firstRange,c){a=c.start.row;var d=this.getFoldAt(a,this.getLine(a).length,1);d?this.removeFold(d):this.addFold("...",c)}}},this.updateFoldWidgets=function(i){var a=i.start.row,c=i.end.row-a;if(c===0)this.foldWidgets[a]=null;else if(i.action=="remove")this.foldWidgets.splice(a,c+1,null);else{var l=Array(c+1);l.unshift(a,1),this.foldWidgets.splice.apply(this.foldWidgets,l)}},this.tokenizerUpdateFoldWidgets=function(i){var a=i.data;a.first!=a.last&&this.foldWidgets.length>a.first&&this.foldWidgets.splice(a.first,this.foldWidgets.length)}}r.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,f){var u=n("../token_iterator").TokenIterator,h=n("../range").Range;function g(){this.findMatchingBracket=function(s,p){if(s.column==0)return null;var o=p||this.getLine(s.row).charAt(s.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],s):this.$findOpeningBracket(i[2],s):null},this.getBracketRange=function(s){var p=this.getLine(s.row),o=!0,i,a=p.charAt(s.column-1),c=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(c||(a=p.charAt(s.column),s={row:s.row,column:s.column+1},c=a&&a.match(/([\(\[\{])|([\)\]\}])/),o=!1),!c)return null;if(c[1]){var l=this.$findClosingBracket(c[1],s);if(!l)return null;i=h.fromPoints(s,l),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var l=this.$findOpeningBracket(c[2],s);if(!l)return null;i=h.fromPoints(l,s),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(s,p){var o=this.getLine(s.row),i=/([\(\[\{])|([\)\]\}])/,a=!p&&o.charAt(s.column-1),c=a&&a.match(i);if(c||(a=(p===void 0||p)&&o.charAt(s.column),s={row:s.row,column:s.column+1},c=a&&a.match(i)),!c)return null;var l=new h(s.row,s.column-1,s.row,s.column),d=c[1]?this.$findClosingBracket(c[1],s):this.$findOpeningBracket(c[2],s);if(!d)return[l];var m=new h(d.row,d.column,d.row,d.column+1);return[l,m]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,p,o){var i=this.$brackets[s],a=1,c=new u(this,p.row,p.column),l=c.getCurrentToken();if(l||(l=c.stepForward()),!!l){o||(o=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var d=p.column-c.getCurrentTokenColumn()-2,m=l.value;;){for(;d>=0;){var v=m.charAt(d);if(v==i){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:d+c.getCurrentTokenColumn()}}else v==s&&(a+=1);d-=1}do l=c.stepBackward();while(l&&!o.test(l.type));if(l==null)break;m=l.value,d=m.length-1}return null}},this.$findClosingBracket=function(s,p,o){var i=this.$brackets[s],a=1,c=new u(this,p.row,p.column),l=c.getCurrentToken();if(l||(l=c.stepForward()),!!l){o||(o=new RegExp("(\\.?"+l.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var d=p.column-c.getCurrentTokenColumn();;){for(var m=l.value,v=m.length;d<v;){var y=m.charAt(d);if(y==i){if(a-=1,a==0)return{row:c.getCurrentTokenRow(),column:d+c.getCurrentTokenColumn()}}else y==s&&(a+=1);d+=1}do l=c.stepForward();while(l&&!o.test(l.type));if(l==null)break;d=0}return null}},this.getMatchingTags=function(s){var p=new u(this,s.row,s.column),o=this.$findTagName(p);if(o){var i=p.stepBackward();return i.value==="<"?this.$findClosingTag(p,o):this.$findOpeningTag(p,o)}},this.$findTagName=function(s){var p=s.getCurrentToken(),o=!1,i=!1;if(p&&p.type.indexOf("tag-name")===-1)do i?p=s.stepBackward():p=s.stepForward(),p&&(p.value==="/>"?i=!0:p.type.indexOf("tag-name")!==-1&&(o=!0));while(p&&!o);return p},this.$findClosingTag=function(s,p){var o,i=p.value,a=p.value,c=0,l=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);p=s.stepForward();var d=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length),m=!1;do if(o=p,p=s.stepForward(),p){if(p.value===">"&&!m){var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);m=!0}if(p.type.indexOf("tag-name")!==-1){if(i=p.value,a===i){if(o.value==="<")c++;else if(o.value==="</"&&(c--,c<0)){s.stepBackward();var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);p=s.stepForward();var A=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length);if(p=s.stepForward(),p&&p.value===">")var S=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(a===i&&p.value==="/>"&&(c--,c<0))var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),A=y,S=A,v=new h(d.end.row,d.end.column,d.end.row,d.end.column+1)}while(p&&c>=0);if(l&&v&&y&&S&&d&&A)return{openTag:new h(l.start.row,l.start.column,v.end.row,v.end.column),closeTag:new h(y.start.row,y.start.column,S.end.row,S.end.column),openTagName:d,closeTagName:A}},this.$findOpeningTag=function(s,p){var o=s.getCurrentToken(),i=p.value,a=0,c=s.getCurrentTokenRow(),l=s.getCurrentTokenColumn(),d=l+2,m=new h(c,l,c,d);s.stepForward();var v=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+p.value.length);if(p=s.stepForward(),!(!p||p.value!==">")){var y=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(p=o,c=s.getCurrentTokenRow(),l=s.getCurrentTokenColumn(),d=l+p.value.length,o=s.stepBackward(),p){if(p.type.indexOf("tag-name")!==-1){if(i===p.value)if(o.value==="<"){if(a++,a>0){var A=new h(c,l,c,d),S=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do p=s.stepForward();while(p&&p.value!==">");var C=new h(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else o.value==="</"&&a--}else if(p.value==="/>"){for(var b=0,R=o;R;){if(R.type.indexOf("tag-name")!==-1&&R.value===i){a--;break}else if(R.value==="<")break;R=s.stepBackward(),b++}for(var L=0;L<b;L++)s.stepForward()}}while(o&&a<=0);if(S&&C&&m&&y&&A&&v)return{openTag:new h(S.start.row,S.start.column,C.end.row,C.end.column),closeTag:new h(m.start.row,m.start.column,y.end.row,y.end.column),openTagName:A,closeTagName:v}}}}r.BracketMatch=g}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/lang"),g=n("./bidihandler").BidiHandler,s=n("./config"),p=n("./lib/event_emitter").EventEmitter,o=n("./selection").Selection,i=n("./mode/text").Mode,a=n("./range").Range,c=n("./document").Document,l=n("./background_tokenizer").BackgroundTokenizer,d=n("./search_highlight").SearchHighlight,m=n("./undomanager").UndoManager,v=function(){function $(k,_){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++$.$uid,this.$foldData.toString=function(){return this.join(`
|
1013
|
+
`)},this.bgTokenizer=new l(new i().getTokenizer(),this);var w=this;this.bgTokenizer.on("update",function(x){w._signal("tokenizerUpdate",x)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof k!="object"||!k.getLine)&&(k=new c(k)),this.setDocument(k),this.selection=new o(this),this.$bidiHandler=new g(this),s.resetOptions(this),this.setMode(_),s._signal("session",this),this.destroyed=!1}return $.prototype.setDocument=function(k){this.doc&&this.doc.off("change",this.$onChange),this.doc=k,k.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},$.prototype.getDocument=function(){return this.doc},$.prototype.$resetRowCache=function(k){if(!k){this.$docRowCache=[],this.$screenRowCache=[];return}var _=this.$docRowCache.length,w=this.$getRowCacheIndex(this.$docRowCache,k)+1;_>w&&(this.$docRowCache.splice(w,_),this.$screenRowCache.splice(w,_))},$.prototype.$getRowCacheIndex=function(k,_){for(var w=0,x=k.length-1;w<=x;){var T=w+x>>1,O=k[T];if(_>O)w=T+1;else if(_<O)x=T-1;else return T}return w-1},$.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},$.prototype.onChangeFold=function(k){var _=k.data;this.$resetRowCache(_.start.row)},$.prototype.onChange=function(k){this.$modified=!0,this.$bidiHandler.onChange(k),this.$resetRowCache(k.start.row);var _=this.$updateInternalDataOnChange(k);!this.$fromUndo&&this.$undoManager&&(_&&_.length&&(this.$undoManager.add({action:"removeFolds",folds:_},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(k,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(k),this._signal("change",k)},$.prototype.setValue=function(k){this.doc.setValue(k),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},$.fromJSON=function(k){typeof k=="string"&&(k=JSON.parse(k));var _=new m;_.$undoStack=k.history.undo,_.$redoStack=k.history.redo,_.mark=k.history.mark,_.$rev=k.history.rev;var w=new $(k.value);return k.folds.forEach(function(x){w.addFold("...",a.fromPoints(x.start,x.end))}),w.setAnnotations(k.annotations),w.setBreakpoints(k.breakpoints),w.setMode(k.mode),w.setScrollLeft(k.scrollLeft),w.setScrollTop(k.scrollTop),w.setUndoManager(_),w.selection.fromJSON(k.selection),w},$.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(k){return k.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},$.prototype.toString=function(){return this.doc.getValue()},$.prototype.getSelection=function(){return this.selection},$.prototype.getState=function(k){return this.bgTokenizer.getState(k)},$.prototype.getTokens=function(k){return this.bgTokenizer.getTokens(k)},$.prototype.getTokenAt=function(k,_){var w=this.bgTokenizer.getTokens(k),x,T=0;if(_==null){var O=w.length-1;T=this.getLine(k).length}else for(var O=0;O<w.length&&(T+=w[O].value.length,!(T>=_));O++);return x=w[O],x?(x.index=O,x.start=T-x.value.length,x):null},$.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var _=this;k.addSession(this),this.$syncInformUndoManager=function(){_.$informUndoManager.cancel(),_.mergeUndoDeltas=!1},this.$informUndoManager=h.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},$.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},$.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},$.prototype.getTabString=function(){return this.getUseSoftTabs()?h.stringRepeat(" ",this.getTabSize()):" "},$.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},$.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},$.prototype.setTabSize=function(k){this.setOption("tabSize",k)},$.prototype.getTabSize=function(){return this.$tabSize},$.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},$.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},$.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},$.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},$.prototype.getOverwrite=function(){return this.$overwrite},$.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},$.prototype.addGutterDecoration=function(k,_){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+_,this._signal("changeBreakpoint",{})},$.prototype.removeGutterDecoration=function(k,_){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+_,""),this._signal("changeBreakpoint",{})},$.prototype.getBreakpoints=function(){return this.$breakpoints},$.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var _=0;_<k.length;_++)this.$breakpoints[k[_]]="ace_breakpoint";this._signal("changeBreakpoint",{})},$.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},$.prototype.setBreakpoint=function(k,_){_===void 0&&(_="ace_breakpoint"),_?this.$breakpoints[k]=_:delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},$.prototype.clearBreakpoint=function(k){delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},$.prototype.addMarker=function(k,_,w,x){var T=this.$markerId++,O={range:k,type:w||"line",renderer:typeof w=="function"?w:null,clazz:_,inFront:!!x,id:T};return x?(this.$frontMarkers[T]=O,this._signal("changeFrontMarker")):(this.$backMarkers[T]=O,this._signal("changeBackMarker")),T},$.prototype.addDynamicMarker=function(k,_){if(k.update){var w=this.$markerId++;return k.id=w,k.inFront=!!_,_?(this.$frontMarkers[w]=k,this._signal("changeFrontMarker")):(this.$backMarkers[w]=k,this._signal("changeBackMarker")),k}},$.prototype.removeMarker=function(k){var _=this.$frontMarkers[k]||this.$backMarkers[k];if(_){var w=_.inFront?this.$frontMarkers:this.$backMarkers;delete w[k],this._signal(_.inFront?"changeFrontMarker":"changeBackMarker")}},$.prototype.getMarkers=function(k){return k?this.$frontMarkers:this.$backMarkers},$.prototype.highlight=function(k){if(!this.$searchHighlight){var _=new d(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(_)}this.$searchHighlight.setRegexp(k)},$.prototype.highlightLines=function(k,_,w,x){typeof _!="number"&&(w=_,_=k),w||(w="ace_step");var T=new a(k,0,_,1/0);return T.id=this.addMarker(T,w,"fullLine",x),T},$.prototype.setAnnotations=function(k){this.$annotations=k,this._signal("changeAnnotation",{})},$.prototype.getAnnotations=function(){return this.$annotations||[]},$.prototype.clearAnnotations=function(){this.setAnnotations([])},$.prototype.$detectNewLine=function(k){var _=k.match(/^.*?(\r?\n)/m);_?this.$autoNewLine=_[1]:this.$autoNewLine=`
|
1014
|
+
`},$.prototype.getWordRange=function(k,_){var w=this.getLine(k),x=!1;if(_>0&&(x=!!w.charAt(_-1).match(this.tokenRe)),x||(x=!!w.charAt(_).match(this.tokenRe)),x)var T=this.tokenRe;else if(/^\s+$/.test(w.slice(_-1,_+1)))var T=/\s/;else var T=this.nonTokenRe;var O=_;if(O>0){do O--;while(O>=0&&w.charAt(O).match(T));O++}for(var I=_;I<w.length&&w.charAt(I).match(T);)I++;return new a(k,O,k,I)},$.prototype.getAWordRange=function(k,_){for(var w=this.getWordRange(k,_),x=this.getLine(w.end.row);x.charAt(w.end.column).match(/[ \t]/);)w.end.column+=1;return w},$.prototype.setNewLineMode=function(k){this.doc.setNewLineMode(k)},$.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},$.prototype.setUseWorker=function(k){this.setOption("useWorker",k)},$.prototype.getUseWorker=function(){return this.$useWorker},$.prototype.onReloadTokenizer=function(k){var _=k.data;this.bgTokenizer.start(_.first),this._signal("tokenizerUpdate",k)},$.prototype.setMode=function(k,_){if(k&&typeof k=="object"){if(k.getTokenizer)return this.$onChangeMode(k);var w=k,x=w.path}else x=k||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[x]&&!w){this.$onChangeMode(this.$modes[x]),_&&_();return}this.$modeId=x,s.loadModule(["mode",x],(function(T){if(this.$modeId!==x)return _&&_();this.$modes[x]&&!w?this.$onChangeMode(this.$modes[x]):T&&T.Mode&&(T=new T.Mode(w),w||(this.$modes[x]=T,T.$id=x),this.$onChangeMode(T)),_&&_()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},$.prototype.$onChangeMode=function(k,_){if(_||(this.$modeId=k.$id),this.$mode!==k){var w=this.$mode;this.$mode=k,this.$stopWorker(),this.$useWorker&&this.$startWorker();var x=k.getTokenizer();if(x.on!==void 0){var T=this.onReloadTokenizer.bind(this);x.on("update",T)}this.bgTokenizer.setTokenizer(x),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=k.tokenRe,this.nonTokenRe=k.nonTokenRe,_||(k.attachToSession&&k.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(k.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:w,mode:k}))}},$.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},$.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(k){s.warn("Could not load worker",k),this.$worker=null}},$.prototype.getMode=function(){return this.$mode},$.prototype.setScrollTop=function(k){this.$scrollTop===k||isNaN(k)||(this.$scrollTop=k,this._signal("changeScrollTop",k))},$.prototype.getScrollTop=function(){return this.$scrollTop},$.prototype.setScrollLeft=function(k){this.$scrollLeft===k||isNaN(k)||(this.$scrollLeft=k,this._signal("changeScrollLeft",k))},$.prototype.getScrollLeft=function(){return this.$scrollLeft},$.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},$.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var k=0;return this.lineWidgets.forEach(function(_){_&&_.screenWidth>k&&(k=_.screenWidth)}),this.lineWidgetWidth=k},$.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var _=this.doc.getAllLines(),w=this.$rowLengthCache,x=0,T=0,O=this.$foldData[T],I=O?O.start.row:1/0,F=_.length,P=0;P<F;P++){if(P>I){if(P=O.end.row+1,P>=F)break;O=this.$foldData[T++],I=O?O.start.row:1/0}w[P]==null&&(w[P]=this.$getStringScreenWidth(_[P])[0]),w[P]>x&&(x=w[P])}this.screenWidth=x}},$.prototype.getLine=function(k){return this.doc.getLine(k)},$.prototype.getLines=function(k,_){return this.doc.getLines(k,_)},$.prototype.getLength=function(){return this.doc.getLength()},$.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},$.prototype.insert=function(k,_){return this.doc.insert(k,_)},$.prototype.remove=function(k){return this.doc.remove(k)},$.prototype.removeFullLines=function(k,_){return this.doc.removeFullLines(k,_)},$.prototype.undoChanges=function(k,_){if(k.length){this.$fromUndo=!0;for(var w=k.length-1;w!=-1;w--){var x=k[w];x.action=="insert"||x.action=="remove"?this.doc.revertDelta(x):x.folds&&this.addFolds(x.folds)}!_&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},$.prototype.redoChanges=function(k,_){if(k.length){this.$fromUndo=!0;for(var w=0;w<k.length;w++){var x=k[w];(x.action=="insert"||x.action=="remove")&&this.doc.$safeApplyDelta(x)}!_&&this.$undoSelect&&(k.selectionAfter?this.selection.fromJSON(k.selectionAfter):this.selection.setRange(this.$getUndoSelection(k,!1))),this.$fromUndo=!1}},$.prototype.setUndoSelect=function(k){this.$undoSelect=k},$.prototype.$getUndoSelection=function(k,_){function w(F){return _?F.action!=="insert":F.action==="insert"}for(var x,T,O=0;O<k.length;O++){var I=k[O];if(I.start){if(!x){w(I)?x=a.fromPoints(I.start,I.end):x=a.fromPoints(I.start,I.start);continue}w(I)?(T=I.start,x.compare(T.row,T.column)==-1&&x.setStart(T),T=I.end,x.compare(T.row,T.column)==1&&x.setEnd(T)):(T=I.start,x.compare(T.row,T.column)==-1&&(x=a.fromPoints(I.start,I.start)))}}return x},$.prototype.replace=function(k,_){return this.doc.replace(k,_)},$.prototype.moveText=function(k,_,w){var x=this.getTextRange(k),T=this.getFoldsInRange(k),O=a.fromPoints(_,_);if(!w){this.remove(k);var I=k.start.row-k.end.row,F=I?-k.end.column:k.start.column-k.end.column;F&&(O.start.row==k.end.row&&O.start.column>k.end.column&&(O.start.column+=F),O.end.row==k.end.row&&O.end.column>k.end.column&&(O.end.column+=F)),I&&O.start.row>=k.end.row&&(O.start.row+=I,O.end.row+=I)}if(O.end=this.insert(O.start,x),T.length){var P=k.start,W=O.start,I=W.row-P.row,F=W.column-P.column;this.addFolds(T.map(function(z){return z=z.clone(),z.start.row==P.row&&(z.start.column+=F),z.end.row==P.row&&(z.end.column+=F),z.start.row+=I,z.end.row+=I,z}))}return O},$.prototype.indentRows=function(k,_,w){w=w.replace(/\t/g,this.getTabString());for(var x=k;x<=_;x++)this.doc.insertInLine({row:x,column:0},w)},$.prototype.outdentRows=function(k){for(var _=k.collapseRows(),w=new a(0,0,0,0),x=this.getTabSize(),T=_.start.row;T<=_.end.row;++T){var O=this.getLine(T);w.start.row=T,w.end.row=T;for(var I=0;I<x&&O.charAt(I)==" ";++I);I<x&&O.charAt(I)==" "?(w.start.column=I,w.end.column=I+1):(w.start.column=0,w.end.column=I),this.remove(w)}},$.prototype.$moveLines=function(k,_,w){if(k=this.getRowFoldStart(k),_=this.getRowFoldEnd(_),w<0){var x=this.getRowFoldStart(k+w);if(x<0)return 0;var T=x-k}else if(w>0){var x=this.getRowFoldEnd(_+w);if(x>this.doc.getLength()-1)return 0;var T=x-_}else{k=this.$clipRowToDocument(k),_=this.$clipRowToDocument(_);var T=_-k+1}var O=new a(k,0,_,Number.MAX_VALUE),I=this.getFoldsInRange(O).map(function(P){return P=P.clone(),P.start.row+=T,P.end.row+=T,P}),F=w==0?this.doc.getLines(k,_):this.doc.removeFullLines(k,_);return this.doc.insertFullLines(k+T,F),I.length&&this.addFolds(I),T},$.prototype.moveLinesUp=function(k,_){return this.$moveLines(k,_,-1)},$.prototype.moveLinesDown=function(k,_){return this.$moveLines(k,_,1)},$.prototype.duplicateLines=function(k,_){return this.$moveLines(k,_,0)},$.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},$.prototype.$clipColumnToRow=function(k,_){return _<0?0:Math.min(this.doc.getLine(k).length,_)},$.prototype.$clipPositionToDocument=function(k,_){if(_=Math.max(0,_),k<0)k=0,_=0;else{var w=this.doc.getLength();k>=w?(k=w-1,_=this.doc.getLine(w-1).length):_=Math.min(this.doc.getLine(k).length,_)}return{row:k,column:_}},$.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var _=this.doc.getLength()-1;return k.end.row>_?(k.end.row=_,k.end.column=this.doc.getLine(_).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},$.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var _=this.getLength();this.$wrapData=Array(_),this.$updateWrapData(0,_-1)}this._signal("changeWrapMode")}},$.prototype.getUseWrapMode=function(){return this.$useWrapMode},$.prototype.setWrapLimitRange=function(k,_){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==_)&&(this.$wrapLimitRange={min:k,max:_},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},$.prototype.adjustWrapLimit=function(k,_){var w=this.$wrapLimitRange;w.max<0&&(w={min:_,max:_});var x=this.$constrainWrapLimit(k,w.min,w.max);return x!=this.$wrapLimit&&x>1?(this.$wrapLimit=x,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},$.prototype.$constrainWrapLimit=function(k,_,w){return _&&(k=Math.max(_,k)),w&&(k=Math.min(w,k)),k},$.prototype.getWrapLimit=function(){return this.$wrapLimit},$.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},$.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},$.prototype.$updateInternalDataOnChange=function(k){var _=this.$useWrapMode,w=k.action,x=k.start,T=k.end,O=x.row,I=T.row,F=I-O,P=null;if(this.$updating=!0,F!=0)if(w==="remove"){this[_?"$wrapData":"$rowLengthCache"].splice(O,F);var W=this.$foldData;P=this.getFoldsInRange(k),this.removeFolds(P);var j=this.getFoldLine(T.row),H=0;if(j){j.addRemoveChars(T.row,T.column,x.column-T.column),j.shiftRow(-F);var z=this.getFoldLine(O);z&&z!==j&&(z.merge(j),j=z),H=W.indexOf(j)+1}for(H;H<W.length;H++){var j=W[H];j.start.row>=T.row&&j.shiftRow(-F)}I=O}else{var K=Array(F);K.unshift(O,0);var q=_?this.$wrapData:this.$rowLengthCache;q.splice.apply(q,K);var W=this.$foldData,j=this.getFoldLine(O),H=0;if(j){var U=j.range.compareInside(x.row,x.column);U==0?(j=j.split(x.row,x.column),j&&(j.shiftRow(F),j.addRemoveChars(I,0,T.column-x.column))):U==-1&&(j.addRemoveChars(O,0,T.column-x.column),j.shiftRow(F)),H=W.indexOf(j)+1}for(H;H<W.length;H++){var j=W[H];j.start.row>=O&&j.shiftRow(F)}}else{F=Math.abs(k.start.column-k.end.column),w==="remove"&&(P=this.getFoldsInRange(k),this.removeFolds(P),F=-F);var j=this.getFoldLine(O);j&&j.addRemoveChars(O,x.column,F)}return _&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,_?this.$updateWrapData(O,I):this.$updateRowLengthCache(O,I),P},$.prototype.$updateRowLengthCache=function(k,_){this.$rowLengthCache[k]=null,this.$rowLengthCache[_]=null},$.prototype.$updateWrapData=function(k,_){var w=this.doc.getAllLines(),x=this.getTabSize(),T=this.$wrapData,O=this.$wrapLimit,I,F,P=k;for(_=Math.min(_,w.length-1);P<=_;)F=this.getFoldLine(P,F),F?(I=[],F.walk((function(W,j,H,z){var K;if(W!=null){K=this.$getDisplayTokens(W,I.length),K[0]=S;for(var q=1;q<K.length;q++)K[q]=C}else K=this.$getDisplayTokens(w[j].substring(z,H),I.length);I=I.concat(K)}).bind(this),F.end.row,w[F.end.row].length+1),T[F.start.row]=this.$computeWrapSplits(I,O,x),P=F.end.row+1):(I=this.$getDisplayTokens(w[P]),T[P]=this.$computeWrapSplits(I,O,x),P++)},$.prototype.$computeWrapSplits=function(k,_,w){if(k.length==0)return[];var x=[],T=k.length,O=0,I=0,F=this.$wrapAsCode,P=this.$indentedSoftWrap,W=_<=Math.max(2*w,8)||P===!1?0:Math.floor(_/2);function j(){var U=0;if(W===0)return U;if(P)for(var X=0;X<k.length;X++){var Y=k[X];if(Y==R)U+=1;else if(Y==L)U+=w;else{if(Y==E)continue;break}}return F&&P!==!1&&(U+=w),Math.min(U,W)}function H(U){for(var X=U-O,Y=O;Y<U;Y++){var V=k[Y];(V===12||V===2)&&(X-=1)}x.length||(z=j(),x.indent=z),I+=X,x.push(I),O=U}for(var z=0;T-O>_-z;){var K=O+_-z;if(k[K-1]>=R&&k[K]>=R){H(K);continue}if(k[K]==S||k[K]==C){for(K;K!=O-1&&k[K]!=S;K--);if(K>O){H(K);continue}for(K=O+_,K;K<k.length&&k[K]==C;K++);if(K==k.length)break;H(K);continue}for(var q=Math.max(K-(_-(_>>2)),O-1);K>q&&k[K]<S;)K--;if(F){for(;K>q&&k[K]<S;)K--;for(;K>q&&k[K]==b;)K--}else for(;K>q&&k[K]<R;)K--;if(K>q){H(++K);continue}K=O+_,k[K]==A&&K--,H(K-z)}return x},$.prototype.$getDisplayTokens=function(k,_){var w=[],x;_=_||0;for(var T=0;T<k.length;T++){var O=k.charCodeAt(T);if(O==9){x=this.getScreenTabSize(w.length+_),w.push(L);for(var I=1;I<x;I++)w.push(E)}else O==32?w.push(R):O>39&&O<48||O>57&&O<64?w.push(b):O>=4352&&M(O)?w.push(y,A):w.push(y)}return w},$.prototype.$getStringScreenWidth=function(k,_,w){if(_==0)return[0,0];_==null&&(_=1/0),w=w||0;var x,T;for(T=0;T<k.length&&(x=k.charCodeAt(T),x==9?w+=this.getScreenTabSize(w):x>=4352&&M(x)?w+=2:w+=1,!(w>_));T++);return[w,T]},$.prototype.getRowLength=function(k){var _=1;return this.lineWidgets&&(_+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?_:this.$wrapData[k].length+_},$.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},$.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var _=this.screenToDocumentPosition(k,Number.MAX_VALUE),w=this.$wrapData[_.row];return w.length&&w[0]<_.column?w.indent:0}else return 0},$.prototype.getScreenLastRowColumn=function(k){var _=this.screenToDocumentPosition(k,Number.MAX_VALUE);return this.documentToScreenColumn(_.row,_.column)},$.prototype.getDocumentLastRowColumn=function(k,_){var w=this.documentToScreenRow(k,_);return this.getScreenLastRowColumn(w)},$.prototype.getDocumentLastRowColumnPosition=function(k,_){var w=this.documentToScreenRow(k,_);return this.screenToDocumentPosition(w,Number.MAX_VALUE/10)},$.prototype.getRowSplitData=function(k){if(this.$useWrapMode)return this.$wrapData[k]},$.prototype.getScreenTabSize=function(k){return this.$tabSize-(k%this.$tabSize|0)},$.prototype.screenToDocumentRow=function(k,_){return this.screenToDocumentPosition(k,_).row},$.prototype.screenToDocumentColumn=function(k,_){return this.screenToDocumentPosition(k,_).column},$.prototype.screenToDocumentPosition=function(k,_,w){if(k<0)return{row:0,column:0};var x,T=0,O=0,I,F=0,P=0,W=this.$screenRowCache,j=this.$getRowCacheIndex(W,k),H=W.length;if(H&&j>=0)var F=W[j],T=this.$docRowCache[j],z=k>W[H-1];else var z=!H;for(var K=this.getLength()-1,q=this.getNextFoldLine(T),U=q?q.start.row:1/0;F<=k&&(P=this.getRowLength(T),!(F+P>k||T>=K));)F+=P,T++,T>U&&(T=q.end.row+1,q=this.getNextFoldLine(T,q),U=q?q.start.row:1/0),z&&(this.$docRowCache.push(T),this.$screenRowCache.push(F));if(q&&q.start.row<=T)x=this.getFoldDisplayLine(q),T=q.start.row;else{if(F+P<=k||T>K)return{row:K,column:this.getLine(K).length};x=this.getLine(T),q=null}var X=0,Y=Math.floor(k-F);if(this.$useWrapMode){var V=this.$wrapData[T];V&&(I=V[Y],Y>0&&V.length&&(X=V.indent,O=V[Y-1]||V[V.length-1],x=x.substring(O)))}return w!==void 0&&this.$bidiHandler.isBidiRow(F+Y,T,Y)&&(_=this.$bidiHandler.offsetToCol(w)),O+=this.$getStringScreenWidth(x,_-X)[1],this.$useWrapMode&&O>=I&&(O=I-1),q?q.idxToPosition(O):{row:T,column:O}},$.prototype.documentToScreenPosition=function(k,_){if(typeof _>"u")var w=this.$clipPositionToDocument(k.row,k.column);else w=this.$clipPositionToDocument(k,_);k=w.row,_=w.column;var x=0,T=null,O=null;O=this.getFoldAt(k,_,1),O&&(k=O.start.row,_=O.start.column);var I,F=0,P=this.$docRowCache,W=this.$getRowCacheIndex(P,k),j=P.length;if(j&&W>=0)var F=P[W],x=this.$screenRowCache[W],H=k>P[j-1];else var H=!j;for(var z=this.getNextFoldLine(F),K=z?z.start.row:1/0;F<k;){if(F>=K){if(I=z.end.row+1,I>k)break;z=this.getNextFoldLine(I,z),K=z?z.start.row:1/0}else I=F+1;x+=this.getRowLength(F),F=I,H&&(this.$docRowCache.push(F),this.$screenRowCache.push(x))}var q="";z&&F>=K?(q=this.getFoldDisplayLine(z,k,_),T=z.start.row):(q=this.getLine(k).substring(0,_),T=k);var U=0;if(this.$useWrapMode){var X=this.$wrapData[T];if(X){for(var Y=0;q.length>=X[Y];)x++,Y++;q=q.substring(X[Y-1]||0,q.length),U=Y>0?X.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(x+=this.lineWidgets[F].rowsAbove),{row:x,column:U+this.$getStringScreenWidth(q)[0]}},$.prototype.documentToScreenColumn=function(k,_){return this.documentToScreenPosition(k,_).column},$.prototype.documentToScreenRow=function(k,_){return this.documentToScreenPosition(k,_).row},$.prototype.getScreenLength=function(){var k=0,_=null;if(this.$useWrapMode)for(var T=this.$wrapData.length,O=0,x=0,_=this.$foldData[x++],I=_?_.start.row:1/0;O<T;){var F=this.$wrapData[O];k+=F?F.length+1:1,O++,O>I&&(O=_.end.row+1,_=this.$foldData[x++],I=_?_.start.row:1/0)}else{k=this.getLength();for(var w=this.$foldData,x=0;x<w.length;x++)_=w[x],k-=_.end.row-_.start.row}return this.lineWidgets&&(k+=this.$getWidgetScreenLength()),k},$.prototype.$setFontMetrics=function(k){this.$enableVarChar&&(this.$getStringScreenWidth=function(_,w,x){if(w===0)return[0,0];w||(w=1/0),x=x||0;var T,O;for(O=0;O<_.length&&(T=_.charAt(O),T===" "?x+=this.getScreenTabSize(x):x+=k.getCharacterWidth(T),!(x>w));O++);return[x,O]})},$.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},$}();v.$uid=0,v.prototype.$modes=s.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=M,u.implement(v.prototype,p);var y=1,A=2,S=3,C=4,b=9,R=10,L=11,E=12;function M($){return $<4352?!1:$>=4352&&$<=4447||$>=4515&&$<=4519||$>=4602&&$<=4607||$>=9001&&$<=9002||$>=11904&&$<=11929||$>=11931&&$<=12019||$>=12032&&$<=12245||$>=12272&&$<=12283||$>=12288&&$<=12350||$>=12353&&$<=12438||$>=12441&&$<=12543||$>=12549&&$<=12589||$>=12593&&$<=12686||$>=12688&&$<=12730||$>=12736&&$<=12771||$>=12784&&$<=12830||$>=12832&&$<=12871||$>=12880&&$<=13054||$>=13056&&$<=19903||$>=19968&&$<=42124||$>=42128&&$<=42182||$>=43360&&$<=43388||$>=44032&&$<=55203||$>=55216&&$<=55238||$>=55243&&$<=55291||$>=63744&&$<=64255||$>=65040&&$<=65049||$>=65072&&$<=65106||$>=65108&&$<=65126||$>=65128&&$<=65131||$>=65281&&$<=65376||$>=65504&&$<=65510}n("./edit_session/folding").Folding.call(v.prototype),n("./edit_session/bracket_match").BracketMatch.call(v.prototype),s.defineOptions(v.prototype,"session",{wrap:{set:function($){if(!$||$=="off"?$=!1:$=="free"?$=!0:$=="printMargin"?$=-1:typeof $=="string"&&($=parseInt($,10)||!1),this.$wrap!=$)if(this.$wrap=$,!$)this.setUseWrapMode(!1);else{var k=typeof $=="number"?$:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function($){$=$=="auto"?this.$mode.type!="text":$!="text",$!=this.$wrapAsCode&&(this.$wrapAsCode=$,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function($){this.$useWorker=$,this.$stopWorker(),$&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function($){$=parseInt($),$>0&&this.$tabSize!==$&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=$,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function($){this.setFoldStyle($)},handlesSet:!0},overwrite:{set:function($){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function($){this.doc.setNewLineMode($)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function($){this.setMode($)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,f){var u=n("./lib/lang"),h=n("./lib/oop"),g=n("./range").Range,s=function(){function o(){this.$options={}}return o.prototype.set=function(i){return h.mixin(this.$options,i),this},o.prototype.getOptions=function(){return u.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var a=this.$options,c=this.$matchIterator(i,a);if(!c)return!1;var l=null;return c.forEach(function(d,m,v,y){return l=new g(d,m,v,y),m==y&&a.start&&a.start.start&&a.skipCurrent!=!1&&l.isEqual(a.start)?(l=null,!1):!0}),l},o.prototype.findAll=function(i){var a=this.$options;if(!a.needle)return[];this.$assembleRegExp(a);var c=a.range,l=c?i.getLines(c.start.row,c.end.row):i.doc.getAllLines(),d=[],m=a.re;if(a.$isMultiLine){var v=m.length,y=l.length-v,A;e:for(var S=m.offset||0;S<=y;S++){for(var C=0;C<v;C++)if(l[S+C].search(m[C])==-1)continue e;var b=l[S],R=l[S+v-1],L=b.length-b.match(m[0])[0].length,E=R.match(m[v-1])[0].length;A&&A.end.row===S&&A.end.column>L||(d.push(A=new g(S,L,S+v-1,E)),v>2&&(S=S+v-2))}}else for(var M=0;M<l.length;M++)for(var $=u.getMatchOffsets(l[M],m),C=0;C<$.length;C++){var k=$[C];d.push(new g(M,k.offset,M,k.offset+k.length))}if(c){for(var _=c.start.column,w=c.end.column,M=0,C=d.length-1;M<C&&d[M].start.column<_&&d[M].start.row==0;)M++;for(var x=c.end.row-c.start.row;M<C&&d[C].end.column>w&&d[C].end.row==x;)C--;for(d=d.slice(M,C+1),M=0,C=d.length;M<C;M++)d[M].start.row+=c.start.row,d[M].end.row+=c.start.row}return d},o.prototype.replace=function(i,a){var c=this.$options,l=this.$assembleRegExp(c);if(c.$isMultiLine)return a;if(l){var d=l.exec(i);if(!d||d[0].length!=i.length)return null;if(a=i.replace(l,a),c.preserveCase){a=a.split("");for(var m=Math.min(i.length,i.length);m--;){var v=i[m];v&&v.toLowerCase()!=v?a[m]=a[m].toUpperCase():a[m]=a[m].toLowerCase()}a=a.join("")}return a}},o.prototype.$assembleRegExp=function(i,a){if(i.needle instanceof RegExp)return i.re=i.needle;var c=i.needle;if(!i.needle)return i.re=!1;i.regExp||(c=u.escapeRegExp(c));var l=i.caseSensitive?"gm":"gmi";try{new RegExp(c,"u"),i.$supportsUnicodeFlag=!0,l+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(c=p(c,i)),i.$isMultiLine=!a&&/[\n\r]/.test(c),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(c,l);try{var d=new RegExp(c,l)}catch{d=!1}return i.re=d},o.prototype.$assembleMultilineRegExp=function(i,a){for(var c=i.replace(/\r\n|\r|\n/g,`$
|
1015
1015
|
^`).split(`
|
1016
|
-
`),l=[],d=0;d<c.length;d++)try{l.push(new RegExp(c[d],a))}catch{return!1}return l},o.prototype.$matchIterator=function(i,a){var c=this.$assembleRegExp(a);if(!c)return!1;var l=a.backwards==!0,d=a.skipCurrent!=!1,m=c.unicode,v=a.range,y=a.start;y||(y=v?v[l?"end":"start"]:i.selection.getRange()),y.start&&(y=y[d!=l?"end":"start"]);var A=v?v.start.row:0,S=v?v.end.row:i.getLength()-1;if(l)var C=function(L){var E=y.row;if(!x(E,y.column,L)){for(E--;E>=A;E--)if(x(E,Number.MAX_VALUE,L))return;if(a.wrap!=!1){for(E=S,A=y.row;E>=A;E--)if(x(E,Number.MAX_VALUE,L))return}}};else var C=function(E){var M=y.row;if(!x(M,y.column,E)){for(M=M+1;M<=S;M++)if(x(M,0,E))return;if(a.wrap!=!1){for(M=A,S=y.row;M<=S;M++)if(x(M,0,E))return}}};if(a.$isMultiLine)var b=c.length,x=function(L,E,M){var $=l?L-b+1:L;if(!($<0||$+b>i.getLength())){var k=i.getLine($),_=k.search(c[0]);if(!(!l&&_<E||_===-1)){for(var w=1;w<b;w++)if(k=i.getLine($+w),k.search(c[w])==-1)return;var R=k.match(c[b-1])[0].length;if(!(l&&R>E)&&M($,_,$+b-1,R))return!0}}};else if(l)var x=function(E,M,$){var k=i.getLine(E),_=[],w,R=0;for(c.lastIndex=0;w=c.exec(k);){var T=w[0].length;if(R=w.index,!T){if(R>=k.length)break;c.lastIndex=R+=u.skipEmptyMatch(k,R,m)}if(w.index+T>M)break;_.push(w.index,T)}for(var O=_.length-1;O>=0;O-=2){var I=_[O-1],T=_[O];if($(E,I,E,I+T))return!0}};else var x=function(E,M,$){var k=i.getLine(E),_,w;for(c.lastIndex=M;w=c.exec(k);){var R=w[0].length;if(_=w.index,$(E,_,E,_+R))return!0;if(!R&&(c.lastIndex=_+=u.skipEmptyMatch(k,_,m),_>=k.length))return!1}};return{forEach:C}},o}();function p(o,i){var a=u.supportsLookbehind();function c(v,y){y===void 0&&(y=!0);var A=a&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return A.test(v)||i.regExp?a&&i.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var l=Array.from(o),d=l[0],m=l[l.length-1];return c(d)+o+c(m,!1)}r.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var u=this&&this.__extends||function(){var a=function(c,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(d[v]=m[v])},a(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(c,l);function d(){this.constructor=c}c.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),h=n("../lib/keys"),g=n("../lib/useragent"),s=h.KEY_MODS,p=function(){function a(c,l){this.$init(c,l,!1)}return a.prototype.$init=function(c,l,d){this.platform=l||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=d},a.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},a.prototype.removeCommand=function(c,l){var d=c&&(typeof c=="string"?c:c.name);c=this.commands[d],l||delete this.commands[d];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==c)delete m[v];else if(Array.isArray(y)){var A=y.indexOf(c);A!=-1&&(y.splice(A,1),y.length==1&&(m[v]=y[0]))}}},a.prototype.bindKey=function(c,l,d){if(typeof c=="object"&&c&&(d==null&&(d=c.position),c=c[this.platform]),!!c){if(typeof l=="function")return this.addCommand({exec:l,bindKey:c,name:l.name||c});c.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(C){var b=this.parseKeys(C),x=s[b.hashId]+b.key;v+=(v?" ":"")+x,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var A=this.parseKeys(m),S=s[A.hashId]+A.key;this._addCommandToBinding(v+S,l,d)},this)}},a.prototype._addCommandToBinding=function(c,l,d){var m=this.commandKeyBinding,v;if(!l)delete m[c];else if(!m[c]||this.$singleCommand)m[c]=l;else{Array.isArray(m[c])?(v=m[c].indexOf(l))!=-1&&m[c].splice(v,1):m[c]=[m[c]],typeof d!="number"&&(d=o(l));var y=m[c];for(v=0;v<y.length;v++){var A=y[v],S=o(A);if(S>d)break}y.splice(v,0,l)}},a.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(l){var d=c[l];if(d){if(typeof d=="string")return this.bindKey(d,l);typeof d=="function"&&(d={exec:d}),typeof d=="object"&&(d.name||(d.name=l),this.addCommand(d))}},this)},a.prototype.removeCommands=function(c){Object.keys(c).forEach(function(l){this.removeCommand(c[l])},this)},a.prototype.bindKeys=function(c){Object.keys(c).forEach(function(l){this.bindKey(l,c[l])},this)},a.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},a.prototype.parseKeys=function(c){var l=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),d=l.pop(),m=h[d];if(h.FUNCTION_KEYS[m])d=h.FUNCTION_KEYS[m].toLowerCase();else if(l.length){if(l.length==1&&l[0]=="shift")return{key:d.toUpperCase(),hashId:-1}}else return{key:d,hashId:-1};for(var v=0,y=l.length;y--;){var A=h.KEY_MODS[l[y]];if(A==null)return typeof console<"u"&&console.error("invalid modifier "+l[y]+" in "+c),!1;v|=A}return{key:d,hashId:v}},a.prototype.findKeyCommand=function(c,l){var d=s[c]+l;return this.commandKeyBinding[d]},a.prototype.handleKeyboard=function(c,l,d,m){if(!(m<0)){var v=s[l]+d,y=this.commandKeyBinding[v];return c.$keyChain&&(c.$keyChain+=" "+v,y=this.commandKeyBinding[c.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||v,{command:"null"}):(c.$keyChain&&((!l||l==4)&&d.length==1?c.$keyChain=c.$keyChain.slice(0,-v.length-1):(l==-1||m>0)&&(c.$keyChain="")),{command:y})}},a.prototype.getStatusText=function(c,l){return l.$keyChain||""},a}();function o(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}var i=function(a){u(c,a);function c(l,d){var m=a.call(this,l,d)||this;return m.$singleCommand=!0,m}return c}(p);i.call=function(a,c,l){p.prototype.$init.call(a,c,l,!0)},p.call=function(a,c,l){p.prototype.$init.call(a,c,l,!1)},r.HashHandler=i,r.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var o=function(i,a){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])},o(i,a)};return function(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");o(i,a);function c(){this.constructor=i}i.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),h=n("../lib/oop"),g=n("../keyboard/hash_handler").MultiHashHandler,s=n("../lib/event_emitter").EventEmitter,p=function(o){u(i,o);function i(a,c){var l=o.call(this,c,a)||this;return l.byName=l.commands,l.setDefaultHandler("exec",function(d){return d.args?d.command.exec(d.editor,d.args,d.event,!1):d.command.exec(d.editor,{},d.event,!0)}),l}return i.prototype.exec=function(a,c,l){if(Array.isArray(a)){for(var d=a.length;d--;)if(this.exec(a[d],c,l))return!0;return!1}if(typeof a=="string"&&(a=this.commands[a]),!a||c&&c.$readOnly&&!a.readOnly||this.$checkCommandState!=!1&&a.isAvailable&&!a.isAvailable(c))return!1;var m={editor:c,command:a,args:l};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},i.prototype.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,a):this.exec(c[0],a,c[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(a){return a.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},i}(g);h.implement(p.prototype,s),r.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,f){var u=n("../lib/lang"),h=n("../config"),g=n("../range").Range;function s(o,i){return{win:o,mac:i}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(o){h.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(o){h.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(o){h.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(o){h.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),a=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",a),a.isEmpty()||o.session.remove(a),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(o){h.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(u.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(o){o.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(o){for(var i=o.selection.isBackwards(),a=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),c=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),l=o.session.doc.getLine(a.row).length,d=o.session.doc.getTextRange(o.selection.getRange()),m=d.replace(/\n\s*/," ").length,v=o.session.doc.getLine(a.row),y=a.row+1;y<=c.row+1;y++){var A=u.stringTrimLeft(u.stringTrimRight(o.session.doc.getLine(y)));A.length!==0&&(A=" "+A),v+=A}c.row+1<o.session.doc.getLength()-1&&(v+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new g(a.row,0,c.row+2,0),v),m>0?(o.selection.moveCursorTo(a.row,a.column),o.selection.selectTo(a.row,a.column+m)):(l=o.session.doc.getLine(a.row).length>l?l+1:l,o.selection.moveCursorTo(a.row,l))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(o){var i=o.session.doc.getLength()-1,a=o.session.doc.getLine(i).length,c=o.selection.rangeList.ranges,l=[];c.length<1&&(c=[o.selection.getRange()]);for(var d=0;d<c.length;d++)d==c.length-1&&(c[d].end.row===i&&c[d].end.column===a||l.push(new g(c[d].end.row,c[d].end.column,i,a))),d===0?c[d].start.row===0&&c[d].start.column===0||l.push(new g(0,0,c[d].start.row,c[d].start.column)):l.push(new g(c[d-1].end.row,c[d-1].end.column,c[d].start.row,c[d].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var d=0;d<l.length;d++)o.selection.addRange(l[d],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
|
1016
|
+
`),l=[],d=0;d<c.length;d++)try{l.push(new RegExp(c[d],a))}catch{return!1}return l},o.prototype.$matchIterator=function(i,a){var c=this.$assembleRegExp(a);if(!c)return!1;var l=a.backwards==!0,d=a.skipCurrent!=!1,m=c.unicode,v=a.range,y=a.start;y||(y=v?v[l?"end":"start"]:i.selection.getRange()),y.start&&(y=y[d!=l?"end":"start"]);var A=v?v.start.row:0,S=v?v.end.row:i.getLength()-1;if(l)var C=function(L){var E=y.row;if(!R(E,y.column,L)){for(E--;E>=A;E--)if(R(E,Number.MAX_VALUE,L))return;if(a.wrap!=!1){for(E=S,A=y.row;E>=A;E--)if(R(E,Number.MAX_VALUE,L))return}}};else var C=function(E){var M=y.row;if(!R(M,y.column,E)){for(M=M+1;M<=S;M++)if(R(M,0,E))return;if(a.wrap!=!1){for(M=A,S=y.row;M<=S;M++)if(R(M,0,E))return}}};if(a.$isMultiLine)var b=c.length,R=function(L,E,M){var $=l?L-b+1:L;if(!($<0||$+b>i.getLength())){var k=i.getLine($),_=k.search(c[0]);if(!(!l&&_<E||_===-1)){for(var w=1;w<b;w++)if(k=i.getLine($+w),k.search(c[w])==-1)return;var x=k.match(c[b-1])[0].length;if(!(l&&x>E)&&M($,_,$+b-1,x))return!0}}};else if(l)var R=function(E,M,$){var k=i.getLine(E),_=[],w,x=0;for(c.lastIndex=0;w=c.exec(k);){var T=w[0].length;if(x=w.index,!T){if(x>=k.length)break;c.lastIndex=x+=u.skipEmptyMatch(k,x,m)}if(w.index+T>M)break;_.push(w.index,T)}for(var O=_.length-1;O>=0;O-=2){var I=_[O-1],T=_[O];if($(E,I,E,I+T))return!0}};else var R=function(E,M,$){var k=i.getLine(E),_,w;for(c.lastIndex=M;w=c.exec(k);){var x=w[0].length;if(_=w.index,$(E,_,E,_+x))return!0;if(!x&&(c.lastIndex=_+=u.skipEmptyMatch(k,_,m),_>=k.length))return!1}};return{forEach:C}},o}();function p(o,i){var a=u.supportsLookbehind();function c(v,y){y===void 0&&(y=!0);var A=a&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return A.test(v)||i.regExp?a&&i.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var l=Array.from(o),d=l[0],m=l[l.length-1];return c(d)+o+c(m,!1)}r.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,f){var u=this&&this.__extends||function(){var a=function(c,l){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,m){d.__proto__=m}||function(d,m){for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(d[v]=m[v])},a(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");a(c,l);function d(){this.constructor=c}c.prototype=l===null?Object.create(l):(d.prototype=l.prototype,new d)}}(),h=n("../lib/keys"),g=n("../lib/useragent"),s=h.KEY_MODS,p=function(){function a(c,l){this.$init(c,l,!1)}return a.prototype.$init=function(c,l,d){this.platform=l||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(c),this.$singleCommand=d},a.prototype.addCommand=function(c){this.commands[c.name]&&this.removeCommand(c),this.commands[c.name]=c,c.bindKey&&this._buildKeyHash(c)},a.prototype.removeCommand=function(c,l){var d=c&&(typeof c=="string"?c:c.name);c=this.commands[d],l||delete this.commands[d];var m=this.commandKeyBinding;for(var v in m){var y=m[v];if(y==c)delete m[v];else if(Array.isArray(y)){var A=y.indexOf(c);A!=-1&&(y.splice(A,1),y.length==1&&(m[v]=y[0]))}}},a.prototype.bindKey=function(c,l,d){if(typeof c=="object"&&c&&(d==null&&(d=c.position),c=c[this.platform]),!!c){if(typeof l=="function")return this.addCommand({exec:l,bindKey:c,name:l.name||c});c.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var y=m.split(/\s+/);m=y.pop(),y.forEach(function(C){var b=this.parseKeys(C),R=s[b.hashId]+b.key;v+=(v?" ":"")+R,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var A=this.parseKeys(m),S=s[A.hashId]+A.key;this._addCommandToBinding(v+S,l,d)},this)}},a.prototype._addCommandToBinding=function(c,l,d){var m=this.commandKeyBinding,v;if(!l)delete m[c];else if(!m[c]||this.$singleCommand)m[c]=l;else{Array.isArray(m[c])?(v=m[c].indexOf(l))!=-1&&m[c].splice(v,1):m[c]=[m[c]],typeof d!="number"&&(d=o(l));var y=m[c];for(v=0;v<y.length;v++){var A=y[v],S=o(A);if(S>d)break}y.splice(v,0,l)}},a.prototype.addCommands=function(c){c&&Object.keys(c).forEach(function(l){var d=c[l];if(d){if(typeof d=="string")return this.bindKey(d,l);typeof d=="function"&&(d={exec:d}),typeof d=="object"&&(d.name||(d.name=l),this.addCommand(d))}},this)},a.prototype.removeCommands=function(c){Object.keys(c).forEach(function(l){this.removeCommand(c[l])},this)},a.prototype.bindKeys=function(c){Object.keys(c).forEach(function(l){this.bindKey(l,c[l])},this)},a.prototype._buildKeyHash=function(c){this.bindKey(c.bindKey,c)},a.prototype.parseKeys=function(c){var l=c.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),d=l.pop(),m=h[d];if(h.FUNCTION_KEYS[m])d=h.FUNCTION_KEYS[m].toLowerCase();else if(l.length){if(l.length==1&&l[0]=="shift")return{key:d.toUpperCase(),hashId:-1}}else return{key:d,hashId:-1};for(var v=0,y=l.length;y--;){var A=h.KEY_MODS[l[y]];if(A==null)return typeof console<"u"&&console.error("invalid modifier "+l[y]+" in "+c),!1;v|=A}return{key:d,hashId:v}},a.prototype.findKeyCommand=function(c,l){var d=s[c]+l;return this.commandKeyBinding[d]},a.prototype.handleKeyboard=function(c,l,d,m){if(!(m<0)){var v=s[l]+d,y=this.commandKeyBinding[v];return c.$keyChain&&(c.$keyChain+=" "+v,y=this.commandKeyBinding[c.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(c.$keyChain=c.$keyChain||v,{command:"null"}):(c.$keyChain&&((!l||l==4)&&d.length==1?c.$keyChain=c.$keyChain.slice(0,-v.length-1):(l==-1||m>0)&&(c.$keyChain="")),{command:y})}},a.prototype.getStatusText=function(c,l){return l.$keyChain||""},a}();function o(a){return typeof a=="object"&&a.bindKey&&a.bindKey.position||(a.isDefault?-100:0)}var i=function(a){u(c,a);function c(l,d){var m=a.call(this,l,d)||this;return m.$singleCommand=!0,m}return c}(p);i.call=function(a,c,l){p.prototype.$init.call(a,c,l,!0)},p.call=function(a,c,l){p.prototype.$init.call(a,c,l,!1)},r.HashHandler=i,r.MultiHashHandler=p}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var o=function(i,a){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var d in l)Object.prototype.hasOwnProperty.call(l,d)&&(c[d]=l[d])},o(i,a)};return function(i,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");o(i,a);function c(){this.constructor=i}i.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),h=n("../lib/oop"),g=n("../keyboard/hash_handler").MultiHashHandler,s=n("../lib/event_emitter").EventEmitter,p=function(o){u(i,o);function i(a,c){var l=o.call(this,c,a)||this;return l.byName=l.commands,l.setDefaultHandler("exec",function(d){return d.args?d.command.exec(d.editor,d.args,d.event,!1):d.command.exec(d.editor,{},d.event,!0)}),l}return i.prototype.exec=function(a,c,l){if(Array.isArray(a)){for(var d=a.length;d--;)if(this.exec(a[d],c,l))return!0;return!1}if(typeof a=="string"&&(a=this.commands[a]),!a||c&&c.$readOnly&&!a.readOnly||this.$checkCommandState!=!1&&a.isAvailable&&!a.isAvailable(c))return!1;var m={editor:c,command:a,args:l};return m.returnValue=this._emit("exec",m),this._signal("afterExec",m),m.returnValue!==!1},i.prototype.toggleRecording=function(a){if(!this.$inReplay)return a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(c){this.macro.push([c.command,c.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(c){typeof c=="string"?this.exec(c,a):this.exec(c[0],a,c[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(a){return a.map(function(c){return typeof c[0]!="string"&&(c[0]=c[0].name),c[1]||(c=c[0]),c})},i}(g);h.implement(p.prototype,s),r.CommandManager=p}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,f){var u=n("../lib/lang"),h=n("../config"),g=n("../range").Range;function s(o,i){return{win:o,mac:i}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(o){h.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(o){h.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(o){h.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(o){h.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),a=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",a),a.isEmpty()||o.session.remove(a),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(o){h.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(u.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(o){o.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(o){for(var i=o.selection.isBackwards(),a=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),c=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),l=o.session.doc.getLine(a.row).length,d=o.session.doc.getTextRange(o.selection.getRange()),m=d.replace(/\n\s*/," ").length,v=o.session.doc.getLine(a.row),y=a.row+1;y<=c.row+1;y++){var A=u.stringTrimLeft(u.stringTrimRight(o.session.doc.getLine(y)));A.length!==0&&(A=" "+A),v+=A}c.row+1<o.session.doc.getLength()-1&&(v+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new g(a.row,0,c.row+2,0),v),m>0?(o.selection.moveCursorTo(a.row,a.column),o.selection.selectTo(a.row,a.column+m)):(l=o.session.doc.getLine(a.row).length>l?l+1:l,o.selection.moveCursorTo(a.row,l))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(o){var i=o.session.doc.getLength()-1,a=o.session.doc.getLine(i).length,c=o.selection.rangeList.ranges,l=[];c.length<1&&(c=[o.selection.getRange()]);for(var d=0;d<c.length;d++)d==c.length-1&&(c[d].end.row===i&&c[d].end.column===a||l.push(new g(c[d].end.row,c[d].end.column,i,a))),d===0?c[d].start.row===0&&c[d].start.column===0||l.push(new g(0,0,c[d].start.row,c[d].start.column)):l.push(new g(c[d-1].end.row,c[d-1].end.column,c[d].start.row,c[d].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var d=0;d<l.length;d++)o.selection.addRange(l[d],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert(`
|
1017
1017
|
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var i=o.getCursorPosition();o.selection.moveTo(i.row-1,Number.MAX_VALUE),o.insert(`
|
1018
|
-
`),i.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)r.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("./lib/dom"),h=function(){function g(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return g.prototype.getRowLength=function(s){var p;return this.lineWidgets?p=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[s]?1+p:this.$wrapData[s].length+1+p},g.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(s+=p.rowCount)}),s},g.prototype.$onChangeEditor=function(s){this.attach(s.editor)},g.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},g.prototype.detach=function(s){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},g.prototype.updateOnFold=function(s,p){var o=p.lineWidgets;if(!(!o||!s.action)){for(var i=s.data,a=i.start.row,c=i.end.row,l=s.action=="add",d=a+1;d<c;d++)o[d]&&(o[d].hidden=l);o[c]&&(l?o[a]?o[c].hidden=l:o[a]=o[c]:(o[a]==o[c]&&(o[a]=void 0),o[c].hidden=l))}},g.prototype.updateOnChange=function(s){var p=this.session.lineWidgets;if(p){var o=s.start.row,i=s.end.row-o;if(i!==0)if(s.action=="remove"){var a=p.splice(o+1,i);!p[o]&&a[a.length-1]&&(p[o]=a.pop()),a.forEach(function(l){l&&this.removeLineWidget(l)},this),this.$updateRows()}else{var c=new Array(i);p[o]&&p[o].column!=null&&s.start.column>p[o].column&&o++,c.unshift(o,0),p.splice.apply(p,c),this.$updateRows()}}},g.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var p=!0;s.forEach(function(o,i){if(o)for(p=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),p&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[s.row];return p&&(s.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},g.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var p=this.editor.renderer;s.html&&!s.el&&(s.el=u.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=u.createElement("div"),s.el.textContent=s.text),s.el&&(u.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&u.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",p.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/p.layerConfig.lineHeight);var o=this.session.getFoldAt(s.row,0);if(s.$fold=o,o){var i=this.session.lineWidgets;s.row==o.end.row&&!i[o.start.row]?i[o.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(s),s},g.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[s.row];if(p==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;p;){if(p.$oldWidget==s){p.$oldWidget=s.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(s){for(var p=this.session.lineWidgets,o=p&&p[s],i=[];o;)i.push(o),o=o.$oldWidget;return i},g.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(s,p){var o=this.session._changedWidgets,i=p.layerConfig;if(!(!o||!o.length)){for(var a=1/0,c=0;c<o.length;c++){var l=o[c];if(!(!l||!l.el)&&l.session==this.session){if(!l._inDocument){if(this.session.lineWidgets[l.row]!=l)continue;l._inDocument=!0,p.container.appendChild(l.el)}l.h=l.el.offsetHeight,l.fixedWidth||(l.w=l.el.offsetWidth,l.screenWidth=Math.ceil(l.w/i.characterWidth));var d=l.h/i.lineHeight;l.coverLine&&(d-=this.session.getRowLineCount(l.row),d<0&&(d=0)),l.rowCount!=d&&(l.rowCount=d,l.row<a&&(a=l.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},g.prototype.renderWidgets=function(s,p){var o=p.layerConfig,i=this.session.lineWidgets;if(i){for(var a=Math.min(this.firstRow,o.firstRow),c=Math.max(this.lastRow,o.lastRow,i.length);a>0&&!i[a];)a--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,p.$cursorLayer.config=o;for(var l=a;l<=c;l++){var d=i[l];if(!(!d||!d.el)){if(d.hidden){d.el.style.top=-100-(d.pixelHeight||0)+"px";continue}d._inDocument||(d._inDocument=!0,p.container.appendChild(d.el));var m=p.$cursorLayer.getPixelPosition({row:l,column:0},!0).top;d.coverLine||(m+=o.lineHeight*this.session.getRowLineCount(d.row)),d.el.style.top=m-o.offset+"px";var v=d.coverGutter?0:p.gutterWidth;d.fixedWidth||(v-=p.scrollLeft),d.el.style.left=v+"px",d.fullWidth&&d.screenWidth&&(d.el.style.minWidth=o.width+2*o.padding+"px"),d.fixedWidth?d.el.style.right=p.scrollBar.getWidth()+"px":d.el.style.right=""}}}},g}();r.LineWidgets=h}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,f){var u=n("../lib/keys"),h=n("../mouse/default_gutter_handler").GutterTooltip,g=function(){function p(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new h(this.editor)}return p.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},p.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},p.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===u.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=u.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldWidget(a),l=this.$findNearestAnnotation(a);if(!(c===null&&l===null)){if(c===null&&l!==null){this.activeRowIndex=l,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(c!==null&&l===null){this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(l-a)<Math.abs(c-a)){this.activeRowIndex=l,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new s(o,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===u.tab){o.preventDefault();return}if(o.keyCode===u.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===u.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===u.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===u.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===u.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===u.enter||o.keyCode===u.space){switch(o.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var a=this.lines.cells[this.activeRowIndex].element.childNodes[2],c=a.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=c.right+"px",l.top=c.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},p.prototype.$isFoldWidgetVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),a=this.$getFoldWidget(o).style.display!=="none";return i&&a},p.prototype.$isAnnotationVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),a=this.$getAnnotation(o).style.display!=="none";return i&&a},p.prototype.$getFoldWidget=function(o){var i=this.lines.get(o),a=i.element;return a.childNodes[1]},p.prototype.$getAnnotation=function(o){var i=this.lines.get(o),a=i.element;return a.childNodes[2]},p.prototype.$findNearestFoldWidget=function(o){if(this.$isFoldWidgetVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},p.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},p.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},p.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},p.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},p.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldWidget(this.activeRowIndex);if(a==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(o){var i=this.lines.get(o);return i?i.row:null},p.prototype.$rowToRowIndex=function(o){for(var i=0;i<this.lines.getLength();i++){var a=this.lines.get(i);if(a.row==o)return i}return null},p}();r.GutterKeyboardHandler=g;var s=function(){function p(o,i){this.gutterKeyboardHandler=i,this.domEvent=o}return p.prototype.getKey=function(){return u.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();r.GutterKeyboardEvent=s}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,r,f){var u=this&&this.__values||function(_){var w=typeof Symbol=="function"&&Symbol.iterator,R=w&&_[w],T=0;if(R)return R.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&T>=_.length&&(_=void 0),{value:_&&_[T++],done:!_}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")},h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/lang"),p=n("./lib/useragent"),o=n("./keyboard/textinput").TextInput,i=n("./mouse/mouse_handler").MouseHandler,a=n("./mouse/fold_handler").FoldHandler,c=n("./keyboard/keybinding").KeyBinding,l=n("./edit_session").EditSession,d=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,A=n("./commands/default_commands").commands,S=n("./config"),C=n("./token_iterator").TokenIterator,b=n("./line_widgets").LineWidgets,x=n("./keyboard/gutter_handler").GutterKeyboardHandler,L=n("./config").nls,E=n("./clipboard"),M=n("./lib/keys"),$=function(){function _(w,R,T){this.session,this.$toDestroy=[];var O=w.getContainerElement();this.container=O,this.renderer=w,this.id="editor"+ ++_.$uid,this.commands=new y(p.isMac?"mac":"win",A),typeof document=="object"&&(this.textInput=new o(w.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new a(this)),this.keyBinding=new c(this),this.$search=new d().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(I,F){F._$emitInputEvent.schedule(31)}),this.setSession(R||T&&T.session||new l("")),S.resetOptions(this),T&&this.setOptions(T),S._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},_.prototype.startOperation=function(w){if(this.curOp){if(!w||this.curOp.command)return;this.prevOp=this.curOp}w||(this.previousCommand=null,w={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:w.command||{},args:w.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},_.prototype.endOperation=function(w){if(this.curOp&&this.session){if(w&&w.returnValue===!1||!this.session)return this.curOp=null;if(w==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var R=this.curOp.command,T=R&&R.scrollIntoView;if(T){switch(T){case"center-animate":T="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),I=this.renderer.layerConfig;(O.start.row>=I.lastRow||O.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}T=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var F=this.selection.toJSON();this.curOp.selectionAfter=F,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(F),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(w){if(this.$mergeUndoDeltas){var R=this.prevOp,T=this.$mergeableCommands,O=R.command&&w.command.name==R.command.name;if(w.command.name=="insertstring"){var I=w.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(R.args)),this.mergeNextCommand=!0}else O=O&&T.indexOf(w.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:T.indexOf(w.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(w,R){if(w&&typeof w=="string"&&w!="ace"){this.$keybindingId=w;var T=this;S.loadModule(["keybinding",w],function(O){T.$keybindingId==w&&T.keyBinding.setKeyboardHandler(O&&O.handler),R&&R()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(w),R&&R()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(w){if(this.session!=w){this.curOp&&this.endOperation(),this.curOp={};var R=this.session;if(R){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var T=this.session.getSelection();T.off("changeCursor",this.$onCursorChange),T.off("changeSelection",this.$onSelectionChange)}this.session=w,w?(this.$onDocumentChange=this.onDocumentChange.bind(this),w.on("change",this.$onDocumentChange),this.renderer.setSession(w),this.$onChangeMode=this.onChangeMode.bind(this),w.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),w.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),w.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),w.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),w.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),w.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=w.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(w)),this._signal("changeSession",{session:w,oldSession:R}),this.curOp=null,R&&R._signal("changeEditor",{oldEditor:this}),w&&w._signal("changeEditor",{editor:this}),w&&!w.destroyed&&w.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(w,R){return this.session.doc.setValue(w),R?R==1?this.navigateFileEnd():R==-1&&this.navigateFileStart():this.selectAll(),w},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(w){this.renderer.onResize(w)},_.prototype.setTheme=function(w,R){this.renderer.setTheme(w,R)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(w){this.renderer.setStyle(w)},_.prototype.unsetStyle=function(w){this.renderer.unsetStyle(w)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||g.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(w){this.setOption("fontSize",w)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var w=this;this.$highlightPending=!0,setTimeout(function(){w.$highlightPending=!1;var R=w.session;if(!(!R||R.destroyed)){R.$bracketHighlight&&(R.$bracketHighlight.markerIds.forEach(function(z){R.removeMarker(z)}),R.$bracketHighlight=null);var T=w.getCursorPosition(),O=w.getKeyboardHandler(),I=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(w),F=R.getMatchingBracketRanges(T,I);if(!F){var P=new C(R,T.row,T.column),W=P.getCurrentToken();if(W&&/\b(?:tag-open|tag-name)/.test(W.type)){var j=R.getMatchingTags(T);j&&(F=[j.openTagName,j.closeTagName])}}if(!F&&R.$mode.getMatching&&(F=R.$mode.getMatching(w.session)),!F){w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(F)?F.length==1&&(H="ace_error_bracket"):F=[F],F.length==2&&(m.comparePoints(F[0].end,F[1].start)==0?F=[m.fromPoints(F[0].start,F[1].end)]:m.comparePoints(F[0].start,F[1].end)==0&&(F=[m.fromPoints(F[1].start,F[0].end)])),R.$bracketHighlight={ranges:F,markerIds:F.map(function(z){return R.addMarker(z,H,"text")})},w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(w){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",w))},_.prototype.onBlur=function(w){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",w))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(w){var R=this.session.$useWrapMode,T=w.start.row==w.end.row?w.end.row:1/0;this.renderer.updateLines(w.start.row,T,R),this._signal("change",w),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(w){var R=w.data;this.renderer.updateLines(R.first,R.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var w=this.getSession(),R;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(R=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(R=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(R=!1)),w.$highlightLineMarker&&!R)w.removeMarker(w.$highlightLineMarker.id),w.$highlightLineMarker=null;else if(!w.$highlightLineMarker&&R){var T=new m(R.row,R.column,R.row,1/0);T.id=w.addMarker(T,"ace_active-line","screenLine"),w.$highlightLineMarker=T}else R&&(w.$highlightLineMarker.start.row=R.row,w.$highlightLineMarker.end.row=R.row,w.$highlightLineMarker.start.column=R.column,w._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(w){var R=this.session;if(R.$selectionMarker&&R.removeMarker(R.$selectionMarker),R.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var T=this.selection.getRange(),O=this.getSelectionStyle();R.$selectionMarker=R.addMarker(T,"ace_selection",O)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var w=this.session,R=this.getSelectionRange();if(!(R.isEmpty()||R.isMultiLine())){var T=R.start.column,O=R.end.column,I=w.getLine(R.start.row),F=I.substring(T,O);if(!(F.length>5e3||!/[\w\d]/.test(F))){var P=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:F}),W=I.substring(T-1,O+1);if(P.test(W))return P}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(w){this.renderer.updateText(),this._emit("changeMode",w)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.prototype.getCopyText=function(){var w=this.getSelectedText(),R=this.session.doc.getNewLineCharacter(),T=!1;if(!w&&this.$copyWithEmptySelection){T=!0;for(var O=this.selection.getAllRanges(),I=0;I<O.length;I++){var F=O[I];I&&O[I-1].start.row==F.start.row||(w+=this.session.getLine(F.start.row)+R)}}var P={text:w};return this._signal("copy",P),E.lineMode=T?P.text:!1,P.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(w,R){var T={text:w,event:R};this.commands.exec("paste",this,T)},_.prototype.$handlePaste=function(w){typeof w=="string"&&(w={text:w}),this._signal("paste",w);var R=w.text,T=R===E.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)T?O.insert({row:this.selection.lead.row,column:0},R):this.insert(R);else if(T)this.selection.rangeList.ranges.forEach(function(H){O.insert({row:H.start.row,column:0},R)});else{var I=R.split(/\r\n|\r|\n/),F=this.selection.rangeList.ranges,P=I.length==2&&(!I[0]||!I[1]);if(I.length!=F.length||P)return this.commands.exec("insertstring",this,R);for(var W=F.length;W--;){var j=F[W];j.isEmpty()||O.remove(j),O.insert(j.start,I[W])}}},_.prototype.execCommand=function(w,R){return this.commands.exec(w,this,R)},_.prototype.insert=function(w,R){var T=this.session,O=T.getMode(),I=this.getCursorPosition();if(this.getBehavioursEnabled()&&!R){var F=O.transformAction(T.getState(I.row),"insertion",this,T,w);F&&(w!==F.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),w=F.text)}if(w==" "&&(w=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&w.indexOf(`
|
1018
|
+
`),i.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var p=1;p<9;p++)r.commands.push({name:"foldToLevel"+p,description:"Fold To Level "+p,level:p,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("./lib/dom"),h=function(){function g(s){this.session=s,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return g.prototype.getRowLength=function(s){var p;return this.lineWidgets?p=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:p=0,!this.$useWrapMode||!this.$wrapData[s]?1+p:this.$wrapData[s].length+1+p},g.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(p){p&&p.rowCount&&!p.hidden&&(s+=p.rowCount)}),s},g.prototype.$onChangeEditor=function(s){this.attach(s.editor)},g.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},g.prototype.detach=function(s){var p=this.editor;if(p){this.editor=null,p.widgetManager=null,p.renderer.off("beforeRender",this.measureWidgets),p.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},g.prototype.updateOnFold=function(s,p){var o=p.lineWidgets;if(!(!o||!s.action)){for(var i=s.data,a=i.start.row,c=i.end.row,l=s.action=="add",d=a+1;d<c;d++)o[d]&&(o[d].hidden=l);o[c]&&(l?o[a]?o[c].hidden=l:o[a]=o[c]:(o[a]==o[c]&&(o[a]=void 0),o[c].hidden=l))}},g.prototype.updateOnChange=function(s){var p=this.session.lineWidgets;if(p){var o=s.start.row,i=s.end.row-o;if(i!==0)if(s.action=="remove"){var a=p.splice(o+1,i);!p[o]&&a[a.length-1]&&(p[o]=a.pop()),a.forEach(function(l){l&&this.removeLineWidget(l)},this),this.$updateRows()}else{var c=new Array(i);p[o]&&p[o].column!=null&&s.start.column>p[o].column&&o++,c.unshift(o,0),p.splice.apply(p,c),this.$updateRows()}}},g.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var p=!0;s.forEach(function(o,i){if(o)for(p=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),p&&(this.session.lineWidgets=null)}},g.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var p=this.session.lineWidgets[s.row];return p&&(s.$oldWidget=p,p.el&&p.el.parentNode&&(p.el.parentNode.removeChild(p.el),p._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},g.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var p=this.editor.renderer;s.html&&!s.el&&(s.el=u.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=u.createElement("div"),s.el.textContent=s.text),s.el&&(u.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&u.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",p.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/p.layerConfig.lineHeight);var o=this.session.getFoldAt(s.row,0);if(s.$fold=o,o){var i=this.session.lineWidgets;s.row==o.end.row&&!i[o.start.row]?i[o.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,p),this.onWidgetChanged(s),s},g.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var p=this.session.lineWidgets[s.row];if(p==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;p;){if(p.$oldWidget==s){p.$oldWidget=s.$oldWidget;break}p=p.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},g.prototype.getWidgetsAtRow=function(s){for(var p=this.session.lineWidgets,o=p&&p[s],i=[];o;)i.push(o),o=o.$oldWidget;return i},g.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},g.prototype.measureWidgets=function(s,p){var o=this.session._changedWidgets,i=p.layerConfig;if(!(!o||!o.length)){for(var a=1/0,c=0;c<o.length;c++){var l=o[c];if(!(!l||!l.el)&&l.session==this.session){if(!l._inDocument){if(this.session.lineWidgets[l.row]!=l)continue;l._inDocument=!0,p.container.appendChild(l.el)}l.h=l.el.offsetHeight,l.fixedWidth||(l.w=l.el.offsetWidth,l.screenWidth=Math.ceil(l.w/i.characterWidth));var d=l.h/i.lineHeight;l.coverLine&&(d-=this.session.getRowLineCount(l.row),d<0&&(d=0)),l.rowCount!=d&&(l.rowCount=d,l.row<a&&(a=l.row))}}a!=1/0&&(this.session._emit("changeFold",{data:{start:{row:a}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},g.prototype.renderWidgets=function(s,p){var o=p.layerConfig,i=this.session.lineWidgets;if(i){for(var a=Math.min(this.firstRow,o.firstRow),c=Math.max(this.lastRow,o.lastRow,i.length);a>0&&!i[a];)a--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,p.$cursorLayer.config=o;for(var l=a;l<=c;l++){var d=i[l];if(!(!d||!d.el)){if(d.hidden){d.el.style.top=-100-(d.pixelHeight||0)+"px";continue}d._inDocument||(d._inDocument=!0,p.container.appendChild(d.el));var m=p.$cursorLayer.getPixelPosition({row:l,column:0},!0).top;d.coverLine||(m+=o.lineHeight*this.session.getRowLineCount(d.row)),d.el.style.top=m-o.offset+"px";var v=d.coverGutter?0:p.gutterWidth;d.fixedWidth||(v-=p.scrollLeft),d.el.style.left=v+"px",d.fullWidth&&d.screenWidth&&(d.el.style.minWidth=o.width+2*o.padding+"px"),d.fixedWidth?d.el.style.right=p.scrollBar.getWidth()+"px":d.el.style.right=""}}}},g}();r.LineWidgets=h}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,f){var u=n("../lib/keys"),h=n("../mouse/default_gutter_handler").GutterTooltip,g=function(){function p(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new h(this.editor)}return p.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},p.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},p.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===u.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=u.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var a=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),c=this.$findNearestFoldWidget(a),l=this.$findNearestAnnotation(a);if(!(c===null&&l===null)){if(c===null&&l!==null){this.activeRowIndex=l,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(c!==null&&l===null){this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(l-a)<Math.abs(c-a)){this.activeRowIndex=l,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=c,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new s(o,this))}).bind(this),10)},p.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===u.tab){o.preventDefault();return}if(o.keyCode===u.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===u.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===u.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===u.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===u.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===u.enter||o.keyCode===u.space){switch(o.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var a=this.lines.cells[this.activeRowIndex].element.childNodes[2],c=a.getBoundingClientRect(),l=this.annotationTooltip.getElement().style;l.left=c.right+"px",l.top=c.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},p.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},p.prototype.$isFoldWidgetVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),a=this.$getFoldWidget(o).style.display!=="none";return i&&a},p.prototype.$isAnnotationVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),a=this.$getAnnotation(o).style.display!=="none";return i&&a},p.prototype.$getFoldWidget=function(o){var i=this.lines.get(o),a=i.element;return a.childNodes[1]},p.prototype.$getAnnotation=function(o){var i=this.lines.get(o),a=i.element;return a.childNodes[2]},p.prototype.$findNearestFoldWidget=function(o){if(this.$isFoldWidgetVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},p.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},p.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},p.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},p.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},p.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},p.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},p.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},p.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var a=this.$findNearestFoldWidget(this.activeRowIndex);if(a==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=a,this.$focusFoldWidget(this.activeRowIndex);break}},p.prototype.$rowIndexToRow=function(o){var i=this.lines.get(o);return i?i.row:null},p.prototype.$rowToRowIndex=function(o){for(var i=0;i<this.lines.getLength();i++){var a=this.lines.get(i);if(a.row==o)return i}return null},p}();r.GutterKeyboardHandler=g;var s=function(){function p(o,i){this.gutterKeyboardHandler=i,this.domEvent=o}return p.prototype.getKey=function(){return u.keyCodeToString(this.domEvent.keyCode)},p.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},p.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},p.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},p}();r.GutterKeyboardEvent=s}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,r,f){var u=this&&this.__values||function(_){var w=typeof Symbol=="function"&&Symbol.iterator,x=w&&_[w],T=0;if(x)return x.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&T>=_.length&&(_=void 0),{value:_&&_[T++],done:!_}}};throw new TypeError(w?"Object is not iterable.":"Symbol.iterator is not defined.")},h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/lang"),p=n("./lib/useragent"),o=n("./keyboard/textinput").TextInput,i=n("./mouse/mouse_handler").MouseHandler,a=n("./mouse/fold_handler").FoldHandler,c=n("./keyboard/keybinding").KeyBinding,l=n("./edit_session").EditSession,d=n("./search").Search,m=n("./range").Range,v=n("./lib/event_emitter").EventEmitter,y=n("./commands/command_manager").CommandManager,A=n("./commands/default_commands").commands,S=n("./config"),C=n("./token_iterator").TokenIterator,b=n("./line_widgets").LineWidgets,R=n("./keyboard/gutter_handler").GutterKeyboardHandler,L=n("./config").nls,E=n("./clipboard"),M=n("./lib/keys"),$=function(){function _(w,x,T){this.session,this.$toDestroy=[];var O=w.getContainerElement();this.container=O,this.renderer=w,this.id="editor"+ ++_.$uid,this.commands=new y(p.isMac?"mac":"win",A),typeof document=="object"&&(this.textInput=new o(w.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new a(this)),this.keyBinding=new c(this),this.$search=new d().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(I,F){F._$emitInputEvent.schedule(31)}),this.setSession(x||T&&T.session||new l("")),S.resetOptions(this),T&&this.setOptions(T),S._signal("editor",this)}return _.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},_.prototype.startOperation=function(w){if(this.curOp){if(!w||this.curOp.command)return;this.prevOp=this.curOp}w||(this.previousCommand=null,w={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:w.command||{},args:w.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},_.prototype.endOperation=function(w){if(this.curOp&&this.session){if(w&&w.returnValue===!1||!this.session)return this.curOp=null;if(w==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var x=this.curOp.command,T=x&&x.scrollIntoView;if(T){switch(T){case"center-animate":T="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var O=this.selection.getRange(),I=this.renderer.layerConfig;(O.start.row>=I.lastRow||O.end.row<=I.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}T=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var F=this.selection.toJSON();this.curOp.selectionAfter=F,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(F),this.prevOp=this.curOp,this.curOp=null}},_.prototype.$historyTracker=function(w){if(this.$mergeUndoDeltas){var x=this.prevOp,T=this.$mergeableCommands,O=x.command&&w.command.name==x.command.name;if(w.command.name=="insertstring"){var I=w.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),O=O&&this.mergeNextCommand&&(!/\s/.test(I)||/\s/.test(x.args)),this.mergeNextCommand=!0}else O=O&&T.indexOf(w.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(O=!1),O?this.session.mergeUndoDeltas=!0:T.indexOf(w.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},_.prototype.setKeyboardHandler=function(w,x){if(w&&typeof w=="string"&&w!="ace"){this.$keybindingId=w;var T=this;S.loadModule(["keybinding",w],function(O){T.$keybindingId==w&&T.keyBinding.setKeyboardHandler(O&&O.handler),x&&x()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(w),x&&x()},_.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},_.prototype.setSession=function(w){if(this.session!=w){this.curOp&&this.endOperation(),this.curOp={};var x=this.session;if(x){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var T=this.session.getSelection();T.off("changeCursor",this.$onCursorChange),T.off("changeSelection",this.$onSelectionChange)}this.session=w,w?(this.$onDocumentChange=this.onDocumentChange.bind(this),w.on("change",this.$onDocumentChange),this.renderer.setSession(w),this.$onChangeMode=this.onChangeMode.bind(this),w.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),w.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),w.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),w.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),w.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),w.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=w.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(w)),this._signal("changeSession",{session:w,oldSession:x}),this.curOp=null,x&&x._signal("changeEditor",{oldEditor:this}),w&&w._signal("changeEditor",{editor:this}),w&&!w.destroyed&&w.bgTokenizer.scheduleStart()}},_.prototype.getSession=function(){return this.session},_.prototype.setValue=function(w,x){return this.session.doc.setValue(w),x?x==1?this.navigateFileEnd():x==-1&&this.navigateFileStart():this.selectAll(),w},_.prototype.getValue=function(){return this.session.getValue()},_.prototype.getSelection=function(){return this.selection},_.prototype.resize=function(w){this.renderer.onResize(w)},_.prototype.setTheme=function(w,x){this.renderer.setTheme(w,x)},_.prototype.getTheme=function(){return this.renderer.getTheme()},_.prototype.setStyle=function(w){this.renderer.setStyle(w)},_.prototype.unsetStyle=function(w){this.renderer.unsetStyle(w)},_.prototype.getFontSize=function(){return this.getOption("fontSize")||g.computedStyle(this.container).fontSize},_.prototype.setFontSize=function(w){this.setOption("fontSize",w)},_.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var w=this;this.$highlightPending=!0,setTimeout(function(){w.$highlightPending=!1;var x=w.session;if(!(!x||x.destroyed)){x.$bracketHighlight&&(x.$bracketHighlight.markerIds.forEach(function(z){x.removeMarker(z)}),x.$bracketHighlight=null);var T=w.getCursorPosition(),O=w.getKeyboardHandler(),I=O&&O.$getDirectionForHighlight&&O.$getDirectionForHighlight(w),F=x.getMatchingBracketRanges(T,I);if(!F){var P=new C(x,T.row,T.column),W=P.getCurrentToken();if(W&&/\b(?:tag-open|tag-name)/.test(W.type)){var j=x.getMatchingTags(T);j&&(F=[j.openTagName,j.closeTagName])}}if(!F&&x.$mode.getMatching&&(F=x.$mode.getMatching(w.session)),!F){w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide();return}var H="ace_bracket";Array.isArray(F)?F.length==1&&(H="ace_error_bracket"):F=[F],F.length==2&&(m.comparePoints(F[0].end,F[1].start)==0?F=[m.fromPoints(F[0].start,F[1].end)]:m.comparePoints(F[0].start,F[1].end)==0&&(F=[m.fromPoints(F[1].start,F[0].end)])),x.$bracketHighlight={ranges:F,markerIds:F.map(function(z){return x.addMarker(z,H,"text")})},w.getHighlightIndentGuides()&&w.renderer.$textLayer.$highlightIndentGuide()}},50)}},_.prototype.focus=function(){this.textInput.focus()},_.prototype.isFocused=function(){return this.textInput.isFocused()},_.prototype.blur=function(){this.textInput.blur()},_.prototype.onFocus=function(w){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",w))},_.prototype.onBlur=function(w){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",w))},_.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},_.prototype.onDocumentChange=function(w){var x=this.session.$useWrapMode,T=w.start.row==w.end.row?w.end.row:1/0;this.renderer.updateLines(w.start.row,T,x),this._signal("change",w),this.$cursorChange()},_.prototype.onTokenizerUpdate=function(w){var x=w.data;this.renderer.updateLines(x.first,x.last)},_.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},_.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},_.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},_.prototype.$updateHighlightActiveLine=function(){var w=this.getSession(),x;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(x=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(x=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(x=!1)),w.$highlightLineMarker&&!x)w.removeMarker(w.$highlightLineMarker.id),w.$highlightLineMarker=null;else if(!w.$highlightLineMarker&&x){var T=new m(x.row,x.column,x.row,1/0);T.id=w.addMarker(T,"ace_active-line","screenLine"),w.$highlightLineMarker=T}else x&&(w.$highlightLineMarker.start.row=x.row,w.$highlightLineMarker.end.row=x.row,w.$highlightLineMarker.start.column=x.column,w._signal("changeBackMarker"))},_.prototype.onSelectionChange=function(w){var x=this.session;if(x.$selectionMarker&&x.removeMarker(x.$selectionMarker),x.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var T=this.selection.getRange(),O=this.getSelectionStyle();x.$selectionMarker=x.addMarker(T,"ace_selection",O)}var I=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(I),this._signal("changeSelection")},_.prototype.$getSelectionHighLightRegexp=function(){var w=this.session,x=this.getSelectionRange();if(!(x.isEmpty()||x.isMultiLine())){var T=x.start.column,O=x.end.column,I=w.getLine(x.start.row),F=I.substring(T,O);if(!(F.length>5e3||!/[\w\d]/.test(F))){var P=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:F}),W=I.substring(T-1,O+1);if(P.test(W))return P}}},_.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},_.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},_.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},_.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},_.prototype.onChangeMode=function(w){this.renderer.updateText(),this._emit("changeMode",w)},_.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},_.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},_.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},_.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},_.prototype.getCopyText=function(){var w=this.getSelectedText(),x=this.session.doc.getNewLineCharacter(),T=!1;if(!w&&this.$copyWithEmptySelection){T=!0;for(var O=this.selection.getAllRanges(),I=0;I<O.length;I++){var F=O[I];I&&O[I-1].start.row==F.start.row||(w+=this.session.getLine(F.start.row)+x)}}var P={text:w};return this._signal("copy",P),E.lineMode=T?P.text:!1,P.text},_.prototype.onCopy=function(){this.commands.exec("copy",this)},_.prototype.onCut=function(){this.commands.exec("cut",this)},_.prototype.onPaste=function(w,x){var T={text:w,event:x};this.commands.exec("paste",this,T)},_.prototype.$handlePaste=function(w){typeof w=="string"&&(w={text:w}),this._signal("paste",w);var x=w.text,T=x===E.lineMode,O=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)T?O.insert({row:this.selection.lead.row,column:0},x):this.insert(x);else if(T)this.selection.rangeList.ranges.forEach(function(H){O.insert({row:H.start.row,column:0},x)});else{var I=x.split(/\r\n|\r|\n/),F=this.selection.rangeList.ranges,P=I.length==2&&(!I[0]||!I[1]);if(I.length!=F.length||P)return this.commands.exec("insertstring",this,x);for(var W=F.length;W--;){var j=F[W];j.isEmpty()||O.remove(j),O.insert(j.start,I[W])}}},_.prototype.execCommand=function(w,x){return this.commands.exec(w,this,x)},_.prototype.insert=function(w,x){var T=this.session,O=T.getMode(),I=this.getCursorPosition();if(this.getBehavioursEnabled()&&!x){var F=O.transformAction(T.getState(I.row),"insertion",this,T,w);F&&(w!==F.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),w=F.text)}if(w==" "&&(w=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&w.indexOf(`
|
1019
1019
|
`)==-1){var P=m.fromPoints(I,I);P.end.column+=w.length,this.session.remove(P)}}else{var P=this.getSelectionRange();I=this.session.remove(P),this.clearSelection()}if(w==`
|
1020
1020
|
`||w==`\r
|
1021
|
-
`){var z=T.getLine(I.row);if(I.column>z.search(/\S|$/)){var W=z.substr(I.column).search(/\S|$/);T.doc.removeInLine(I.row,I.column,I.column+W)}}this.clearSelection();var j=I.column,H=T.getState(I.row),z=T.getLine(I.row),K=O.checkOutdent(H,z,w);if(T.insert(I,w),F&&F.selection&&(F.selection.length==2?this.selection.setSelectionRange(new m(I.row,j+F.selection[0],I.row,j+F.selection[1])):this.selection.setSelectionRange(new m(I.row+F.selection[0],F.selection[1],I.row+F.selection[2],F.selection[3]))),this.$enableAutoIndent){if(T.getDocument().isNewLine(w)){var q=O.getNextLineIndent(H,z.slice(0,I.column),T.getTabString());T.insert({row:I.row+1,column:0},q)}K&&O.autoOutdent(H,T,I.row)}},_.prototype.autoIndent=function(){var w=this.session,
|
1022
|
-
`){var P=T.getLine(
|
1023
|
-
`),this.moveCursorToPosition(w)},_.prototype.setGhostText=function(w,R){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(w,R)},_.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var w=this.getCursorPosition(),R=w.column;if(R!==0){var T=this.session.getLine(w.row),O,I;R<T.length?(O=T.charAt(R)+T.charAt(R-1),I=new m(w.row,R-1,w.row,R+1)):(O=T.charAt(R-1)+T.charAt(R-2),I=new m(w.row,R-2,w.row,R)),this.session.replace(I,O),this.session.selection.moveToPosition(I.end)}}},_.prototype.toLowerCase=function(){var w=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var R=this.getSelectionRange(),T=this.session.getTextRange(R);this.session.replace(R,T.toLowerCase()),this.selection.setSelectionRange(w)},_.prototype.toUpperCase=function(){var w=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var R=this.getSelectionRange(),T=this.session.getTextRange(R);this.session.replace(R,T.toUpperCase()),this.selection.setSelectionRange(w)},_.prototype.indent=function(){var w=this.session,R=this.getSelectionRange();if(R.start.row<R.end.row){var T=this.$getSelectedRows();w.indentRows(T.first,T.last," ");return}else if(R.start.column<R.end.column){var O=w.getTextRange(R);if(!/^\s+$/.test(O)){var T=this.$getSelectedRows();w.indentRows(T.first,T.last," ");return}}var I=w.getLine(R.start.row),F=R.start,P=w.getTabSize(),W=w.documentToScreenColumn(F.row,F.column);if(this.session.getUseSoftTabs())var j=P-W%P,H=s.stringRepeat(" ",j);else{for(var j=W%P;I[R.start.column-1]==" "&&j;)R.start.column--,j--;this.selection.setSelectionRange(R),H=" "}return this.insert(H)},_.prototype.blockIndent=function(){var w=this.$getSelectedRows();this.session.indentRows(w.first,w.last," ")},_.prototype.blockOutdent=function(){var w=this.session.getSelection();this.session.outdentRows(w.getRange())},_.prototype.sortLines=function(){for(var w=this.$getSelectedRows(),R=this.session,T=[],O=w.first;O<=w.last;O++)T.push(R.getLine(O));T.sort(function(P,W){return P.toLowerCase()<W.toLowerCase()?-1:P.toLowerCase()>W.toLowerCase()?1:0});for(var I=new m(0,0,0,0),O=w.first;O<=w.last;O++){var F=R.getLine(O);I.start.row=O,I.end.row=O,I.end.column=F.length,R.replace(I,T[O-w.first])}},_.prototype.toggleCommentLines=function(){var w=this.session.getState(this.getCursorPosition().row),R=this.$getSelectedRows();this.session.getMode().toggleCommentLines(w,this.session,R.first,R.last)},_.prototype.toggleBlockComment=function(){var w=this.getCursorPosition(),R=this.session.getState(w.row),T=this.getSelectionRange();this.session.getMode().toggleBlockComment(R,this.session,T,w)},_.prototype.getNumberAt=function(w,R){var T=/[\-]?[0-9]+(?:\.[0-9]+)?/g;T.lastIndex=0;for(var O=this.session.getLine(w);T.lastIndex<R;){var I=T.exec(O);if(I.index<=R&&I.index+I[0].length>=R){var F={value:I[0],start:I.index,end:I.index+I[0].length};return F}}return null},_.prototype.modifyNumber=function(w){var R=this.selection.getCursor().row,T=this.selection.getCursor().column,O=new m(R,T-1,R,T),I=this.session.getTextRange(O);if(!isNaN(parseFloat(I))&&isFinite(I)){var F=this.getNumberAt(R,T);if(F){var P=F.value.indexOf(".")>=0?F.start+F.value.indexOf(".")+1:F.end,W=F.start+F.value.length-P,j=parseFloat(F.value);j*=Math.pow(10,W),P!==F.end&&T<P?w*=Math.pow(10,F.end-T-1):w*=Math.pow(10,F.end-T),j+=w,j/=Math.pow(10,W);var H=j.toFixed(W),z=new m(R,F.start,R,F.end);this.session.replace(z,H),this.moveCursorTo(R,Math.max(F.start+1,T+H.length-F.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var w=this.selection.getCursor().row,R=this.selection.getCursor().column;this.selection.selectWord();var T=this.getSelectedText(),O=this.selection.getWordRange().start.column,I=T.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),F=R-O-1;F<0&&(F=0);var P=0,W=0,j=this;T.match(/[A-Za-z0-9_]+/)&&I.forEach(function(ee,D){W=P+ee.length,F>=P&&F<=W&&(T=ee,j.selection.clearSelection(),j.moveCursorTo(w,P+O),j.selection.selectTo(w,W+O)),P=W});for(var H=this.$toggleWordPairs,z,K=0;K<H.length;K++)for(var q=H[K],U=0;U<=1;U++){var X=+!U,Y=T.match(new RegExp("^\\s?_?("+s.escapeRegExp(q[U])+")\\s?$","i"));if(Y){var V=T.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Y[1])+")($|\\s)","g"));V&&(z=T.replace(new RegExp(s.escapeRegExp(q[U]),"i"),function(ee){var D=q[X];return ee.toUpperCase()==ee?D=D.toUpperCase():ee.charAt(0).toUpperCase()==ee.charAt(0)&&(D=D.substr(0,0)+q[X].charAt(0).toUpperCase()+D.substr(1)),D}),this.insert(z),z="")}}},_.prototype.findLinkAt=function(w,R){var T,O,I=this.session.getLine(w),F=I.split(/((?:https?|ftp):\/\/[\S]+)/),P=R;P<0&&(P=0);var W=0,j=0,H;try{for(var z=u(F),K=z.next();!K.done;K=z.next()){var q=K.value;if(j=W+q.length,P>=W&&P<=j&&q.match(/((?:https?|ftp):\/\/[\S]+)/)){H=q.replace(/[\s:.,'";}\]]+$/,"");break}W=j}}catch(U){T={error:U}}finally{try{K&&!K.done&&(O=z.return)&&O.call(z)}finally{if(T)throw T.error}}return H},_.prototype.openLink=function(){var w=this.selection.getCursor(),R=this.findLinkAt(w.row,w.column);return R&&window.open(R,"_blank"),R!=null},_.prototype.removeLines=function(){var w=this.$getSelectedRows();this.session.removeFullLines(w.first,w.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var w=this.selection,R=this.session,T=w.getRange(),O=w.isBackwards();if(T.isEmpty()){var I=T.start.row;R.duplicateLines(I,I)}else{var F=O?T.start:T.end,P=R.insert(F,R.getTextRange(T));T.start=F,T.end=P,w.setSelectionRange(T,O)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(w,R,T){return this.session.moveText(w,R,T)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(w,R){var T,O,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var F=I.toOrientedRange();T=this.$getSelectedRows(F),O=this.session.$moveLines(T.first,T.last,R?0:w),R&&w==-1&&(O=0),F.moveBy(O,0),I.fromOrientedRange(F)}else{var P=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var W=0,j=0,H=P.length,z=0;z<H;z++){var K=z;P[z].moveBy(W,0),T=this.$getSelectedRows(P[z]);for(var q=T.first,U=T.last;++z<H;){j&&P[z].moveBy(j,0);var X=this.$getSelectedRows(P[z]);if(R&&X.first!=U)break;if(!R&&X.first>U+1)break;U=X.last}for(z--,W=this.session.$moveLines(q,U,R?0:w),R&&w==-1&&(K=z+1);K<=z;)P[K].moveBy(W,0),K++;R||(W=0),j+=W}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(w){return w=(w||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(w.start.row),last:this.session.getRowFoldEnd(w.end.row)}},_.prototype.onCompositionStart=function(w){this.renderer.showComposition(w)},_.prototype.onCompositionUpdate=function(w){this.renderer.setCompositionText(w)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(w){return w>=this.getFirstVisibleRow()&&w<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(w){return w>=this.renderer.getFirstFullyVisibleRow()&&w<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(w,R){var T=this.renderer,O=this.renderer.layerConfig,I=w*Math.floor(O.height/O.lineHeight);R===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):R===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var F=T.scrollTop;T.scrollBy(0,I*O.lineHeight),R!=null&&T.scrollCursorIntoView(null,.5),T.animateScrolling(F)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(w){this.renderer.scrollToRow(w)},_.prototype.scrollToLine=function(w,R,T,O){this.renderer.scrollToLine(w,R,T,O)},_.prototype.centerSelection=function(){var w=this.getSelectionRange(),R={row:Math.floor(w.start.row+(w.end.row-w.start.row)/2),column:Math.floor(w.start.column+(w.end.column-w.start.column)/2)};this.renderer.alignCursor(R,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(w,R){this.selection.moveCursorTo(w,R)},_.prototype.moveCursorToPosition=function(w){this.selection.moveCursorToPosition(w)},_.prototype.jumpToMatching=function(w,R){var T=this.getCursorPosition(),O=new C(this.session,T.row,T.column),I=O.getCurrentToken(),F=0;I&&I.type.indexOf("tag-name")!==-1&&(I=O.stepBackward());var P=I||O.stepForward();if(P){var W,j=!1,H={},z=T.column-P.start,K,q={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(P.value.match(/[{}()\[\]]/g)){for(;z<P.value.length&&!j;z++)if(q[P.value[z]])switch(K=q[P.value[z]]+"."+P.type.replace("rparen","lparen"),isNaN(H[K])&&(H[K]=0),P.value[z]){case"(":case"[":case"{":H[K]++;break;case")":case"]":case"}":H[K]--,H[K]===-1&&(W="bracket",j=!0);break}}else P.type.indexOf("tag-name")!==-1&&(isNaN(H[P.value])&&(H[P.value]=0),I.value==="<"&&F>1?H[P.value]++:I.value==="</"&&H[P.value]--,H[P.value]===-1&&(W="tag",j=!0));j||(I=P,F++,P=O.stepForward(),z=0)}while(P&&!j);if(W){var U,X;if(W==="bracket")U=this.session.getBracketRange(T),U||(U=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+z-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+z-1),X=U.start,(R||X.row===T.row&&Math.abs(X.column-T.column)<2)&&(U=this.session.getBracketRange(X)));else if(W==="tag"){if(!P||P.type.indexOf("tag-name")===-1)return;if(U=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),U.compare(T.row,T.column)===0){var Y=this.session.getMatchingTags(T);Y&&(Y.openTag.contains(T.row,T.column)?(U=Y.closeTag,X=U.start):(U=Y.openTag,Y.closeTag.start.row===T.row&&Y.closeTag.start.column===T.column?X=U.end:X=U.start))}X=X||U.start}X=U&&U.cursor||X,X&&(w?U&&R?this.selection.setRange(U):U&&U.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(X.row,X.column):this.selection.moveTo(X.row,X.column))}}},_.prototype.gotoLine=function(w,R,T){this.selection.clearSelection(),this.session.unfold({row:w-1,column:R||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(w-1,R||0),this.isRowFullyVisible(w-1)||this.scrollToLine(w-1,!0,T)},_.prototype.navigateTo=function(w,R){this.selection.moveTo(w,R)},_.prototype.navigateUp=function(w){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var R=this.selection.anchor.getPosition();return this.moveCursorToPosition(R)}this.selection.clearSelection(),this.selection.moveCursorBy(-w||-1,0)},_.prototype.navigateDown=function(w){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var R=this.selection.anchor.getPosition();return this.moveCursorToPosition(R)}this.selection.clearSelection(),this.selection.moveCursorBy(w||1,0)},_.prototype.navigateLeft=function(w){if(this.selection.isEmpty())for(w=w||1;w--;)this.selection.moveCursorLeft();else{var R=this.getSelectionRange().start;this.moveCursorToPosition(R)}this.clearSelection()},_.prototype.navigateRight=function(w){if(this.selection.isEmpty())for(w=w||1;w--;)this.selection.moveCursorRight();else{var R=this.getSelectionRange().end;this.moveCursorToPosition(R)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(w,R){R&&this.$search.set(R);var T=this.$search.find(this.session),O=0;return T&&(this.$tryReplace(T,w)&&(O=1),this.selection.setSelectionRange(T),this.renderer.scrollSelectionIntoView(T.start,T.end)),O},_.prototype.replaceAll=function(w,R){R&&this.$search.set(R);var T=this.$search.findAll(this.session),O=0;if(!T.length)return O;var I=this.getSelectionRange();this.selection.moveTo(0,0);for(var F=T.length-1;F>=0;--F)this.$tryReplace(T[F],w)&&O++;return this.selection.setSelectionRange(I),O},_.prototype.$tryReplace=function(w,R){var T=this.session.getTextRange(w);return R=this.$search.replace(T,R),R!==null?(w.end=this.session.replace(w,R),w):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(w,R,T){R||(R={}),typeof w=="string"||w instanceof RegExp?R.needle=w:typeof w=="object"&&h.mixin(R,w);var O=this.selection.getRange();R.needle==null&&(w=this.session.getTextRange(O)||this.$search.$options.needle,w||(O=this.session.getWordRange(O.start.row,O.start.column),w=this.session.getTextRange(O)),this.$search.set({needle:w})),this.$search.set(R),R.start||this.$search.set({start:O});var I=this.$search.find(this.session);if(R.preventScroll)return I;if(I)return this.revealRange(I,T),I;R.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},_.prototype.findNext=function(w,R){this.find({skipCurrent:!0,backwards:!1},w,R)},_.prototype.findPrevious=function(w,R){this.find(w,{skipCurrent:!0,backwards:!0},R)},_.prototype.revealRange=function(w,R){this.session.unfold(w),this.selection.setSelectionRange(w);var T=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(w.start,w.end,.5),R!==!1&&this.renderer.animateScrolling(T)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(w){w.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.prototype.setAutoScrollEditorIntoView=function(w){if(w){var R,T=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var F=this.on("changeSelection",function(){O=!0}),P=this.renderer.on("beforeRender",function(){O&&(R=T.renderer.container.getBoundingClientRect())}),W=this.renderer.on("afterRender",function(){if(O&&R&&(T.isFocused()||T.searchBox&&T.searchBox.isFocused())){var j=T.renderer,H=j.$cursorLayer.$pixelPos,z=j.layerConfig,K=H.top-z.offset;H.top>=0&&K+R.top<0?O=!0:H.top<z.height&&H.top+R.top+z.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(I.style.top=K+"px",I.style.left=H.left+"px",I.style.height=z.lineHeight+"px",I.scrollIntoView(O)),O=R=null}});this.setAutoScrollEditorIntoView=function(j){j||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",F),this.renderer.off("afterRender",W),this.renderer.off("beforeRender",P))}}},_.prototype.$resetCursorStyle=function(){var w=this.$cursorStyle||"ace",R=this.renderer.$cursorLayer;R&&(R.setSmoothBlinking(/smooth/.test(w)),R.isBlinking=!this.$readOnly&&w!="wide",g.setCssClass(R.element,"ace_slim-cursors",/slim/.test(w)))},_.prototype.prompt=function(w,R,T){var O=this;S.loadModule("ace/ext/prompt",function(I){I.prompt(O,w,R,T)})},_}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],h.implement($.prototype,v),S.defineOptions($.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){this.textInput.setReadOnly(_),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?k.attach(this):k.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var w=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(w&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),g.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!w&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),g.addCssClass(this.container,"ace_hasPlaceholder");var R=g.createElement("div");R.className="ace_placeholder",R.textContent=this.$placeholder||"",this.renderer.placeholderNode=R,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!w&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var w={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},R=function(O){if(O.target==this.renderer.scroller&&O.keyCode===M.enter){O.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},T;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",R.bind(this)),this.commands.addCommand(w),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",L("editor")),this.renderer.$gutter.setAttribute("aria-label",L("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),T||(T=new x(this)),T.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",R.bind(this)),this.commands.removeCommand(w),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),T&&T.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(_,w){return(Math.abs(_.selection.lead.row-w)||w+1+(w<9?"·":""))+""},getWidth:function(_,w,R){return Math.max(w.toString().length,(R.lastRow+1).toString().length,2)*R.characterWidth},update:function(_,w){w.renderer.$loop.schedule(w.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=$}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s,p){this.element=s,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(s){u.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(s,p){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(s,p,o){var i=p.firstRowScreen*p.lineHeight,a=Math.floor(i/this.canvasHeight),c=o.documentToScreenRow(s,0)*p.lineHeight;return c-a*this.canvasHeight},g.prototype.computeLineHeight=function(s,p,o){return p.lineHeight*o.getRowLineCount(s)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(s){return this.cells[s]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var p=u.createFragment(this.element),o=0;o<s.length;o++)p.appendChild(s[o].element);this.element.appendChild(p)}else this.cells.push(s),this.element.appendChild(s.element)},g.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var p=u.createFragment(this.element),o=0;o<s.length;o++)p.appendChild(s[o].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},g.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},g.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},g.prototype.createCell=function(s,p,o,i){var a=this.cellCache.pop();if(!a){var c=u.createElement("div");i&&i(c),this.element.appendChild(c),a={element:c,text:"",row:s}}return a.row=s,a},g}();r.Lines=h}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/oop"),g=n("../lib/lang"),s=n("../lib/event_emitter").EventEmitter,p=n("./lines").Lines,o=n("../config").nls,i=function(){function c(l){this.element=u.createElement("div"),this.element.className="ace_layer ace_gutter-layer",l.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new p(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(l){this.session&&this.session.off("change",this.$updateAnnotations),this.session=l,l&&l.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(l,d){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(l,d)},c.prototype.removeGutterDecoration=function(l,d){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(l,d)},c.prototype.setAnnotations=function(l){this.$annotations=[];for(var d=0;d<l.length;d++){var m=l[d],v=m.row,y=this.$annotations[v];y||(y=this.$annotations[v]={text:[],type:[]});var A=m.text,S=m.type;A=A?g.escapeHTML(A):m.html||"",y.text.indexOf(A)===-1&&(y.text.push(A),y.type.push(S));var C=m.className;C?y.className=C:S=="error"?y.className=" ace_error":S=="warning"&&y.className!=" ace_error"?y.className=" ace_warning":S=="info"&&!y.className&&(y.className=" ace_info")}},c.prototype.$updateAnnotations=function(l){if(this.$annotations.length){var d=l.start.row,m=l.end.row-d;if(m!==0)if(l.action=="remove")this.$annotations.splice(d,m+1,null);else{var v=new Array(m+1);v.unshift(d,1),this.$annotations.splice.apply(this.$annotations,v)}}},c.prototype.update=function(l){this.config=l;var d=this.session,m=l.firstRow,v=Math.min(l.lastRow+l.gutterOffset,d.getLength()-1);this.oldLastRow=v,this.config=l,this.$lines.moveContainer(l),this.$updateCursorRow();for(var y=d.getNextFoldLine(m),A=y?y.start.row:1/0,S=null,C=-1,b=m;;){if(b>A&&(b=y.end.row+1,y=d.getNextFoldLine(b,y),A=y?y.start.row:1/0),b>v){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}S=this.$lines.get(++C),S?S.row=b:(S=this.$lines.createCell(b,l,this.session,a),this.$lines.push(S)),this.$renderCell(S,l,y,b),b++}this._signal("afterRender"),this.$updateGutterWidth(l)},c.prototype.$updateGutterWidth=function(l){var d=this.session,m=d.gutterRenderer||this.$renderer,v=d.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||d.$useWrapMode)&&(y=d.getLength()+v-1);var A=m?m.getWidth(d,y,l):y.toString().length*l.characterWidth,S=this.$padding||this.$computePadding();A+=S.left+S.right,A!==this.gutterWidth&&!isNaN(A)&&(this.gutterWidth=A,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",A))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var l=this.session.selection.getCursor();this.$cursorRow!==l.row&&(this.$cursorRow=l.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var l=this.session.selection.cursor.row;if(this.$cursorRow=l,!(this.$cursorCell&&this.$cursorCell.row==l)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var d=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<d.length;m++){var v=d[m];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==d[m-1].row)v=d[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},c.prototype.scrollLines=function(l){var d=this.config;if(this.config=l,this.$updateCursorRow(),this.$lines.pageChanged(d,l))return this.update(l);this.$lines.moveContainer(l);var m=Math.min(l.lastRow+l.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!d||v<l.firstRow)return this.update(l);if(m<d.firstRow)return this.update(l);if(d.firstRow<l.firstRow)for(var y=this.session.getFoldedRowCount(d.firstRow,l.firstRow-1);y>0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();l.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLines(l,l.firstRow,d.firstRow-1)),m>v&&this.$lines.push(this.$renderLines(l,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(l)},c.prototype.$renderLines=function(l,d,m){for(var v=[],y=d,A=this.session.getNextFoldLine(y),S=A?A.start.row:1/0;y>S&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),S=A?A.start.row:1/0),!(y>m);){var C=this.$lines.createCell(y,l,this.session,a);this.$renderCell(C,l,A,y),v.push(C),y++}return v},c.prototype.$renderCell=function(l,d,m,v){var y=l.element,A=this.session,S=y.childNodes[0],C=y.childNodes[1],b=y.childNodes[2],x=b.firstChild,L=A.$firstLineNumber,E=A.$breakpoints,M=A.$decorations,$=A.gutterRenderer||this.$renderer,k=this.$showFoldWidgets&&A.foldWidgets,_=m?m.start.row:Number.MAX_VALUE,w=d.lineHeight+"px",R=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",T=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=($?$.getText(A,v):v+L).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v<this.$cursorRow&&v>=_&&this.$cursorRow<=m.end.row)&&(R+="ace_gutter-active-line ",this.$cursorCell!=l&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=l)),E[v]&&(R+=E[v]),M[v]&&(R+=M[v]),this.$annotations[v]&&v!==_&&(R+=this.$annotations[v].className),k){var I=k[v];I==null&&(I=k[v]=A.getFoldWidget(v))}if(I){var F="ace_fold-widget ace_"+I,P=I=="start"&&v==_&&v<m.end.row;if(P){F+=" ace_closed";for(var W="",j=!1,H=v+1;H<=m.end.row;H++)if(this.$annotations[H]){if(this.$annotations[H].className===" ace_error"){j=!0,W=" ace_error_fold";break}if(this.$annotations[H].className===" ace_warning"){j=!0,W=" ace_warning_fold";continue}}R+=W}else F+=" ace_open";C.className!=F&&(C.className=F),u.setStyle(C.style,"height",w),u.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var z=A.getFoldWidgetRange(v);z?C.setAttribute("aria-label",o("Toggle code folding, rows $0 through $1",[z.start.row+1,z.end.row+1])):m?C.setAttribute("aria-label",o("Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):C.setAttribute("aria-label",o("Toggle code folding, row $0",[v+1])),P?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",o("Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",o("Fold code")))}else C&&(u.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));return j&&this.$showFoldedAnnotations?(b.className="ace_gutter_annotation",x.className=T,x.className+=W,u.setStyle(x.style,"height",w),u.setStyle(b.style,"display","block"),u.setStyle(b.style,"height",w),b.setAttribute("aria-label",o("Read annotations row $0",[O])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):this.$annotations[v]?(b.className="ace_gutter_annotation",x.className=T,this.$useSvgGutterIcons?x.className+=this.$annotations[v].className:y.classList.add(this.$annotations[v].className.replace(" ","")),u.setStyle(x.style,"height",w),u.setStyle(b.style,"display","block"),u.setStyle(b.style,"height",w),b.setAttribute("aria-label",o("Read annotations row $0",[O])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):(u.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0")),O!==S.data&&(S.data=O),y.className!=R&&(y.className=R),u.setStyle(l.element.style,"height",this.$lines.computeLineHeight(v,d,A)+"px"),u.setStyle(l.element.style,"top",this.$lines.computeLineTop(v,d,A)+"px"),l.text=O,b.style.display==="none"&&C.style.display==="none"?l.element.setAttribute("aria-hidden",!0):l.element.setAttribute("aria-hidden",!1),l},c.prototype.setHighlightGutterLine=function(l){this.$highlightGutterLine=l},c.prototype.setShowLineNumbers=function(l){this.$renderer=!l&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(l){l?u.addCssClass(this.element,"ace_folding-enabled"):u.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=l,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var l=u.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(l.borderLeftWidth)||0)+(parseInt(l.paddingLeft)||0)+1,this.$padding.right=(parseInt(l.borderRightWidth)||0)+(parseInt(l.paddingRight)||0),this.$padding},c.prototype.getRegion=function(l){var d=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(l.x<d.left+m.left)return"markers";if(this.$showFoldWidgets&&l.x>m.right-d.right)return"foldWidgets"},c}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,h.implement(i.prototype,s);function a(c){var l=document.createTextNode("");c.appendChild(l);var d=u.createElement("span");c.appendChild(d);var m=u.createElement("span");c.appendChild(m);var v=u.createElement("span");return m.appendChild(v),c}r.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,f){var u=n("../range").Range,h=n("../lib/dom"),g=function(){function p(o){this.element=h.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return p.prototype.setPadding=function(o){this.$padding=o},p.prototype.setSession=function(o){this.session=o},p.prototype.setMarkers=function(o){this.markers=o},p.prototype.elt=function(o,i){var a=this.i!=-1&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=i,a.className=o},p.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var a in this.markers){var c=this.markers[a];if(!c.range){c.update(i,this,this.session,o);continue}var l=c.range.clipRows(o.firstRow,o.lastRow);if(!l.isEmpty())if(l=l.toScreenRange(this.session),c.renderer){var d=this.$getTop(l.start.row,o),m=this.$padding+l.start.column*o.characterWidth;c.renderer(i,l,m,d,o)}else c.type=="fullLine"?this.drawFullLineMarker(i,l,c.clazz,o):c.type=="screenLine"?this.drawScreenLineMarker(i,l,c.clazz,o):l.isMultiLine()?c.type=="text"?this.drawTextMarker(i,l,c.clazz,o):this.drawMultiLineMarker(i,l,c.clazz,o):this.drawSingleLineMarker(i,l,c.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(o,i){return(o-i.firstRowScreen)*i.lineHeight},p.prototype.drawTextMarker=function(o,i,a,c,l){for(var d=this.session,m=i.start.row,v=i.end.row,y=m,A=0,S=0,C=d.getScreenLastRowColumn(y),b=new u(y,i.start.column,y,S);y<=v;y++)b.start.row=b.end.row=y,b.start.column=y==m?i.start.column:d.getRowWrapIndent(y),b.end.column=C,A=S,S=C,C=y+1<v?d.getScreenLastRowColumn(y+1):y==v?0:i.end.column,this.drawSingleLineMarker(o,b,a+(y==m?" ace_start":"")+" ace_br"+s(y==m||y==m+1&&i.start.column,A<S,S>C,y==v),c,y==v?0:1,l)},p.prototype.drawMultiLineMarker=function(o,i,a,c,l){var d=this.$padding,m=c.lineHeight,v=this.$getTop(i.start.row,c),y=d+i.start.column*c.characterWidth;if(l=l||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var A=i.clone();A.end.row=A.start.row,A.end.column=this.session.getLine(A.start.row).length,this.drawBidiSingleLineMarker(o,A,a+" ace_br1 ace_start",c,null,l)}else this.elt(a+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(l||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var A=i.clone();A.start.row=A.end.row,A.start.column=0,this.drawBidiSingleLineMarker(o,A,a+" ace_br12",c,null,l)}else{v=this.$getTop(i.end.row,c);var S=i.end.column*c.characterWidth;this.elt(a+" ace_br12","height:"+m+"px;width:"+S+"px;top:"+v+"px;left:"+d+"px;"+(l||""))}if(m=(i.end.row-i.start.row-1)*c.lineHeight,!(m<=0)){v=this.$getTop(i.start.row+1,c);var C=(i.start.column?1:0)|(i.end.column?0:8);this.elt(a+(C?" ace_br"+C:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+d+"px;"+(l||""))}},p.prototype.drawSingleLineMarker=function(o,i,a,c,l,d){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,a,c,l,d);var m=c.lineHeight,v=(i.end.column+(l||0)-i.start.column)*c.characterWidth,y=this.$getTop(i.start.row,c),A=this.$padding+i.start.column*c.characterWidth;this.elt(a,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+A+"px;"+(d||""))},p.prototype.drawBidiSingleLineMarker=function(o,i,a,c,l,d){var m=c.lineHeight,v=this.$getTop(i.start.row,c),y=this.$padding,A=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);A.forEach(function(S){this.elt(a,"height:"+m+"px;width:"+(S.width+(l||0))+"px;top:"+v+"px;left:"+(y+S.left)+"px;"+(d||""))},this)},p.prototype.drawFullLineMarker=function(o,i,a,c,l){var d=this.$getTop(i.start.row,c),m=c.lineHeight;i.start.row!=i.end.row&&(m+=this.$getTop(i.end.row,c)-d),this.elt(a,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(l||""))},p.prototype.drawScreenLineMarker=function(o,i,a,c,l){var d=this.$getTop(i.start.row,c),m=c.lineHeight;this.elt(a,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(l||""))},p}();g.prototype.$padding=0;function s(p,o,i,a){return(p?1:0)|(o?2:0)|(i?4:0)|(a?8:0)}r.Marker=g}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,f){var u=new Set(["text","rparen","lparen"]);r.isTextToken=function(h){return u.has(h)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,f){var u=n("../lib/oop"),h=n("../lib/dom"),g=n("../lib/lang"),s=n("./lines").Lines,p=n("../lib/event_emitter").EventEmitter,o=n("../config").nls,i=n("./text_util").isTextToken,a=function(){function c(l){this.dom=h,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",l.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return c.prototype.$updateEolChar=function(){var l=this.session.doc,d=l.getNewLineCharacter()==`
|
1024
|
-
`&&l.getNewLineMode()!="windows",m=d?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},c.prototype.setPadding=function(l){this.$padding=l,this.element.style.margin="0 "+l+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(l){this.$fontMetrics=l,this.$fontMetrics.on("changeCharacterSize",(function(d){this._signal("changeCharacterSize",d)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(l){this.session=l,l&&this.$computeTabString()},c.prototype.setShowInvisibles=function(l){return this.showInvisibles==l?!1:(this.showInvisibles=l,typeof l=="string"?(this.showSpaces=/tab/i.test(l),this.showTabs=/space/i.test(l),this.showEOL=/eol/i.test(l)):this.showSpaces=this.showTabs=this.showEOL=l,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(l){return this.displayIndentGuides==l?!1:(this.displayIndentGuides=l,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(l){return this.$highlightIndentGuides===l?!1:(this.$highlightIndentGuides=l,l)},c.prototype.$computeTabString=function(){var l=this.session.getTabSize();this.tabSize=l;for(var d=this.$tabStrings=[0],m=1;m<l+1;m++)if(this.showTabs){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_tab",v.textContent=g.stringRepeat(this.TAB_CHAR,m),d.push(v)}else d.push(this.dom.createTextNode(g.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",A=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?g.stringRepeat(this.SPACE_CHAR,this.tabSize):g.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?g.stringRepeat(this.TAB_CHAR,this.tabSize):S,v=this.dom.createElement("span");v.className=y+A,v.textContent=S,this.$tabStrings[" "]=v;var v=this.dom.createElement("span");v.className=y+C,v.textContent=b,this.$tabStrings[" "]=v}},c.prototype.updateLines=function(l,d,m){if(this.config.lastRow!=l.lastRow||this.config.firstRow!=l.firstRow)return this.update(l);this.config=l;for(var v=Math.max(d,l.firstRow),y=Math.min(m,l.lastRow),A=this.element.childNodes,S=0,b=l.firstRow;b<v;b++){var x=this.session.getFoldLine(b);if(x)if(x.containsRow(v)){v=x.start.row;break}else b=x.end.row;S++}for(var C=!1,b=v,x=this.session.getNextFoldLine(b),L=x?x.start.row:1/0;b>L&&(b=x.end.row+1,x=this.session.getNextFoldLine(b,x),L=x?x.start.row:1/0),!(b>y);){var E=A[S++];if(E){this.dom.removeChildren(E),this.$renderLine(E,b,b==L?x:!1),C&&(E.style.top=this.$lines.computeLineTop(b,l,this.session)+"px");var M=l.lineHeight*this.session.getRowLength(b)+"px";E.style.height!=M&&(C=!0,E.style.height=M)}b++}if(C)for(;S<this.$lines.cells.length;){var $=this.$lines.cells[S++];$.element.style.top=this.$lines.computeLineTop($.row,l,this.session)+"px"}},c.prototype.scrollLines=function(l){var d=this.config;if(this.config=l,this.$lines.pageChanged(d,l))return this.update(l);this.$lines.moveContainer(l);var m=l.lastRow,v=d?d.lastRow:-1;if(!d||v<l.firstRow)return this.update(l);if(m<d.firstRow)return this.update(l);if(!d||d.lastRow<l.firstRow)return this.update(l);if(l.lastRow<d.firstRow)return this.update(l);if(d.firstRow<l.firstRow)for(var y=this.session.getFoldedRowCount(d.firstRow,l.firstRow-1);y>0;y--)this.$lines.shift();if(d.lastRow>l.lastRow)for(var y=this.session.getFoldedRowCount(l.lastRow+1,d.lastRow);y>0;y--)this.$lines.pop();l.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLinesFragment(l,l.firstRow,d.firstRow-1)),l.lastRow>d.lastRow&&this.$lines.push(this.$renderLinesFragment(l,d.lastRow+1,l.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(l,d,m){for(var v=[],y=d,A=this.session.getNextFoldLine(y),S=A?A.start.row:1/0;y>S&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),S=A?A.start.row:1/0),!(y>m);){var C=this.$lines.createCell(y,l,this.session),b=C.element;this.dom.removeChildren(b),h.setStyle(b.style,"height",this.$lines.computeLineHeight(y,l,this.session)+"px"),h.setStyle(b.style,"top",this.$lines.computeLineTop(y,l,this.session)+"px"),this.$renderLine(b,y,y==S?A:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",v.push(C),y++}return v},c.prototype.update=function(l){this.$lines.moveContainer(l),this.config=l;for(var d=l.firstRow,m=l.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(l,d,m))},c.prototype.$renderToken=function(l,d,m,v){for(var y=this,A=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,S=this.dom.createFragment(this.element),C,b=0;C=A.exec(v);){var x=C[1],L=C[2],E=C[3],M=C[4],$=C[5];if(!(!y.showSpaces&&L)){var k=b!=C.index?v.slice(b,C.index):"";if(b=C.index+C[0].length,k&&S.appendChild(this.dom.createTextNode(k,this.element)),x){var _=y.session.getScreenTabSize(d+C.index);S.appendChild(y.$tabStrings[_].cloneNode(!0)),d+=_-1}else if(L)if(y.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=g.stringRepeat(y.SPACE_CHAR,L.length),S.appendChild(w)}else S.appendChild(this.dom.createTextNode(L,this.element));else if(E){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=g.stringRepeat(y.SPACE_CHAR,E.length),S.appendChild(w)}else if(M){d+=1;var w=this.dom.createElement("span");w.style.width=y.config.characterWidth*2+"px",w.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=y.showSpaces?y.SPACE_CHAR:M,S.appendChild(w)}else if($){d+=1;var w=this.dom.createElement("span");w.style.width=y.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=$,S.appendChild(w)}}}if(S.appendChild(this.dom.createTextNode(b?v.slice(b):v,this.element)),i(m.type))l.appendChild(S);else{var R="ace_"+m.type.replace(/\./g," ace_"),w=this.dom.createElement("span");m.type=="fold"&&(w.style.width=m.value.length*this.config.characterWidth+"px",w.setAttribute("title",o("Unfold code"))),w.className=R,w.appendChild(S),l.appendChild(w)}return d+v.length},c.prototype.renderIndentGuide=function(l,d,m){var v=d.search(this.$indentGuideRe);if(v<=0||v>=m)return d;if(d[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,A=0;A<y;A++)l.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(v)}else if(d[0]==" "){for(var A=0;A<v;A++)l.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(v)}return this.$highlightIndentGuide(),d},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var l=this.session.doc.$lines;if(l){var d=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(d.row))[0].length,v=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:v,start:d.row};var y=this.session.$bracketHighlight;if(y){for(var A=this.session.$bracketHighlight.ranges,S=0;S<A.length;S++)if(d.row!==A[S].start.row){this.$highlightIndentGuideMarker.end=A[S].start.row,d.row>A[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&l[d.row]!==""&&d.column===l[d.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=d.row+1;S<l.length;S++){var C=l[S],b=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=S,b<=m))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var l=this.$lines.cells,d=0;d<l.length;d++){var m=l[d],v=m.element.childNodes;if(v.length>0){for(var y=0;y<v.length;y++)if(v[y].classList&&v[y].classList.contains("ace_indent-guide-active")){v[y].classList.remove("ace_indent-guide-active");break}}}},c.prototype.$setIndentGuideActive=function(l,d){var m=this.session.doc.getLine(l.row);if(m!==""){var v=l.element.childNodes;if(v){var y=v[d-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var l=this.$lines.cells;this.$clearActiveIndentGuide();var d=this.$highlightIndentGuideMarker.indentLevel;if(d!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<l.length;m++){var v=l[m];if(this.$highlightIndentGuideMarker.end&&v.row>=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,d)}}else for(var m=l.length-1;m>=0;m--){var v=l[m];if(this.$highlightIndentGuideMarker.end&&v.row<this.$highlightIndentGuideMarker.start){if(v.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,d)}}}},c.prototype.$createLineElement=function(l){var d=this.dom.createElement("div");return d.className="ace_line",d.style.height=this.config.lineHeight+"px",d},c.prototype.$renderWrappedLine=function(l,d,m){var v=0,y=0,A=m[0],S=0,C=this.$createLineElement();l.appendChild(C);for(var b=0;b<d.length;b++){var x=d[b],L=x.value;if(b==0&&this.displayIndentGuides){if(v=L.length,L=this.renderIndentGuide(C,L,A),!L)continue;v-=L.length}if(v+L.length<A)S=this.$renderToken(C,S,x,L),v+=L.length;else{for(;v+L.length>=A;)S=this.$renderToken(C,S,x,L.substring(0,A-v)),L=L.substring(A-v),v=A,C=this.$createLineElement(),l.appendChild(C),C.appendChild(this.dom.createTextNode(g.stringRepeat(" ",m.indent),this.element)),y++,S=0,A=m[y]||Number.MAX_VALUE;L.length!=0&&(v+=L.length,S=this.$renderToken(C,S,x,L))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,S,null,"",!0)},c.prototype.$renderSimpleLine=function(l,d){for(var m=0,v=0;v<d.length;v++){var y=d[v],A=y.value;if(!(v==0&&this.displayIndentGuides&&(A=this.renderIndentGuide(l,A),!A))){if(m+A.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(l,m,y,A);m=this.$renderToken(l,m,y,A)}}},c.prototype.$renderOverflowMessage=function(l,d,m,v,y){m&&this.$renderToken(l,d,m,v.slice(0,this.MAX_LINE_LENGTH-d));var A=this.dom.createElement("span");A.className="ace_inline_button ace_keyword ace_toggle_wrap",A.textContent=y?"<hide>":"<click to see more...>",l.appendChild(A)},c.prototype.$renderLine=function(l,d,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(d)),m)var v=this.$getFoldLineTokens(d,m);else var v=this.session.getTokens(d);var y=l;if(v.length){var A=this.session.getRowSplitData(d);if(A&&A.length){this.$renderWrappedLine(l,v,A);var y=l.lastChild}else{var y=l;this.$useLineGroups()&&(y=this.$createLineElement(),l.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),l.appendChild(y));if(this.showEOL&&y){m&&(d=m.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=d==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(S)}},c.prototype.$getFoldLineTokens=function(l,d){var m=this.session,v=[];function y(S,C,b){for(var x=0,L=0;L+S[x].value.length<C;)if(L+=S[x].value.length,x++,x==S.length)return;if(L!=C){var E=S[x].value.substring(C-L);E.length>b-C&&(E=E.substring(0,b-C)),v.push({type:S[x].type,value:E}),L=C+E.length,x+=1}for(;L<b&&x<S.length;){var E=S[x].value;E.length+L>b?v.push({type:S[x].type,value:E.substring(0,b-L)}):v.push(S[x]),L+=E.length,x+=1}}var A=m.getTokens(l);return d.walk(function(S,C,b,x,L){S!=null?v.push({type:"fold",value:S}):(L&&(A=m.getTokens(C)),A.length&&y(A,x,b))},d.end.row,this.session.getLine(d.end.row).length),v},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,u.implement(a.prototype,p),r.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s){this.element=u.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),u.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return g.prototype.$updateOpacity=function(s){for(var p=this.cursors,o=p.length;o--;)u.setStyle(p[o].style,"opacity",s?"":"0")},g.prototype.$startCssAnimation=function(){for(var s=this.cursors,p=s.length;p--;)s[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&u.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},g.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,u.removeCssClass(this.element,"ace_animate-blinking")},g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},g.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},g.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,u.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},g.prototype.addCursor=function(){var s=u.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},g.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},g.prototype.hideCursor=function(){this.isVisible=!1,u.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.showCursor=function(){this.isVisible=!0,u.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,u.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&u.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),u.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),p()},this.blinkInterval),p()}},g.prototype.getPixelPosition=function(s,p){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(s),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,s.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),a=(o.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:a}},g.prototype.isCursorInView=function(s,p){return s.top>=0&&s.top<p.maxHeight},g.prototype.update=function(s){this.config=s;var p=this.session.$selectionMarkers,o=0,i=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var o=0,a=p.length;o<a;o++){var c=this.getPixelPosition(p[o].cursor,!0);if(!((c.top>s.height+s.offset||c.top<0)&&o>1)){var l=this.cursors[i++]||this.addCursor(),d=l.style;this.drawCursor?this.drawCursor(l,c,s,p[o],this.session):this.isCursorInView(c,s)?(u.setStyle(d,"display","block"),u.translate(l,c.left,c.top),u.setStyle(d,"width",Math.round(s.characterWidth)+"px"),u.setStyle(d,"height",s.lineHeight+"px")):u.setStyle(d,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=c,this.restartTimer()},g.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?u.addCssClass(this.element,"ace_overwrite-cursors"):u.removeCssClass(this.element,"ace_overwrite-cursors"))},g.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},g}();h.prototype.$padding=0,h.prototype.drawCursor=null,r.Cursor=h}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var l=function(d,m){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&(v[A]=y[A])},l(d,m)};return function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");l(d,m);function v(){this.constructor=d}d.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter,o=32768,i=function(){function l(d,m){this.element=g.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=g.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),d.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return l.prototype.setVisible=function(d){this.element.style.display=d?"":"none",this.isVisible=d,this.coeff=1},l}();h.implement(i.prototype,p);var a=function(l){u(d,l);function d(m,v){var y=l.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=g.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return d.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(m){this.element.style.height=m+"px"},d.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>o?(this.coeff=o/m,m=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},d.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},d}(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(l){u(d,l);function d(m,v){var y=l.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return d.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},d.prototype.getHeight=function(){return this.isVisible?this.height:0},d.prototype.setWidth=function(m){this.element.style.width=m+"px"},d.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},d}(i);r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=c,r.VScrollBar=a,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var c=function(l,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},c(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(l,d);function m(){this.constructor=l}l.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}(),h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter;g.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
1021
|
+
`){var z=T.getLine(I.row);if(I.column>z.search(/\S|$/)){var W=z.substr(I.column).search(/\S|$/);T.doc.removeInLine(I.row,I.column,I.column+W)}}this.clearSelection();var j=I.column,H=T.getState(I.row),z=T.getLine(I.row),K=O.checkOutdent(H,z,w);if(T.insert(I,w),F&&F.selection&&(F.selection.length==2?this.selection.setSelectionRange(new m(I.row,j+F.selection[0],I.row,j+F.selection[1])):this.selection.setSelectionRange(new m(I.row+F.selection[0],F.selection[1],I.row+F.selection[2],F.selection[3]))),this.$enableAutoIndent){if(T.getDocument().isNewLine(w)){var q=O.getNextLineIndent(H,z.slice(0,I.column),T.getTabString());T.insert({row:I.row+1,column:0},q)}K&&O.autoOutdent(H,T,I.row)}},_.prototype.autoIndent=function(){var w=this.session,x=w.getMode(),T,O;if(this.selection.isEmpty())T=0,O=w.doc.getLength()-1;else{var I=this.getSelectionRange();T=I.start.row,O=I.end.row}for(var F="",P="",W="",j,H,z,K=w.getTabString(),q=T;q<=O;q++)q>0&&(F=w.getState(q-1),P=w.getLine(q-1),W=x.getNextLineIndent(F,P,K)),j=w.getLine(q),H=x.$getIndent(j),W!==H&&(H.length>0&&(z=new m(q,0,q,H.length),w.remove(z)),W.length>0&&w.insert({row:q,column:0},W)),x.autoOutdent(F,w,q)},_.prototype.onTextInput=function(w,x){if(!x)return this.keyBinding.onTextInput(w);this.startOperation({command:{name:"insertstring"}});var T=this.applyComposition.bind(this,w,x);this.selection.rangeCount?this.forEachSelection(T):T(),this.endOperation()},_.prototype.applyComposition=function(w,x){if(x.extendLeft||x.extendRight){var T=this.selection.getRange();T.start.column-=x.extendLeft,T.end.column+=x.extendRight,T.start.column<0&&(T.start.row--,T.start.column+=this.session.getLine(T.start.row).length+1),this.selection.setRange(T),!w&&!T.isEmpty()&&this.remove()}if((w||!this.selection.isEmpty())&&this.insert(w,!0),x.restoreStart||x.restoreEnd){var T=this.selection.getRange();T.start.column-=x.restoreStart,T.end.column-=x.restoreEnd,this.selection.setRange(T)}},_.prototype.onCommandKey=function(w,x,T){return this.keyBinding.onCommandKey(w,x,T)},_.prototype.setOverwrite=function(w){this.session.setOverwrite(w)},_.prototype.getOverwrite=function(){return this.session.getOverwrite()},_.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},_.prototype.setScrollSpeed=function(w){this.setOption("scrollSpeed",w)},_.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},_.prototype.setDragDelay=function(w){this.setOption("dragDelay",w)},_.prototype.getDragDelay=function(){return this.getOption("dragDelay")},_.prototype.setSelectionStyle=function(w){this.setOption("selectionStyle",w)},_.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},_.prototype.setHighlightActiveLine=function(w){this.setOption("highlightActiveLine",w)},_.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},_.prototype.setHighlightGutterLine=function(w){this.setOption("highlightGutterLine",w)},_.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},_.prototype.setHighlightSelectedWord=function(w){this.setOption("highlightSelectedWord",w)},_.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},_.prototype.setAnimatedScroll=function(w){this.renderer.setAnimatedScroll(w)},_.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},_.prototype.setShowInvisibles=function(w){this.renderer.setShowInvisibles(w)},_.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},_.prototype.setDisplayIndentGuides=function(w){this.renderer.setDisplayIndentGuides(w)},_.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},_.prototype.setHighlightIndentGuides=function(w){this.renderer.setHighlightIndentGuides(w)},_.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},_.prototype.setShowPrintMargin=function(w){this.renderer.setShowPrintMargin(w)},_.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},_.prototype.setPrintMarginColumn=function(w){this.renderer.setPrintMarginColumn(w)},_.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},_.prototype.setReadOnly=function(w){this.setOption("readOnly",w)},_.prototype.getReadOnly=function(){return this.getOption("readOnly")},_.prototype.setBehavioursEnabled=function(w){this.setOption("behavioursEnabled",w)},_.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},_.prototype.setWrapBehavioursEnabled=function(w){this.setOption("wrapBehavioursEnabled",w)},_.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},_.prototype.setShowFoldWidgets=function(w){this.setOption("showFoldWidgets",w)},_.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},_.prototype.setFadeFoldWidgets=function(w){this.setOption("fadeFoldWidgets",w)},_.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},_.prototype.remove=function(w){this.selection.isEmpty()&&(w=="left"?this.selection.selectLeft():this.selection.selectRight());var x=this.getSelectionRange();if(this.getBehavioursEnabled()){var T=this.session,O=T.getState(x.start.row),I=T.getMode().transformAction(O,"deletion",this,T,x);if(x.end.column===0){var F=T.getTextRange(x);if(F[F.length-1]==`
|
1022
|
+
`){var P=T.getLine(x.end.row);/^\s+$/.test(P)&&(x.end.column=P.length)}}I&&(x=I)}this.session.remove(x),this.clearSelection()},_.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},_.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var w=this.getSelectionRange();w.start.column==w.end.column&&w.start.row==w.end.row&&(w.end.column=0,w.end.row++),this.session.remove(w),this.clearSelection()},_.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var w=this.getCursorPosition();this.insert(`
|
1023
|
+
`),this.moveCursorToPosition(w)},_.prototype.setGhostText=function(w,x){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(w,x)},_.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},_.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var w=this.getCursorPosition(),x=w.column;if(x!==0){var T=this.session.getLine(w.row),O,I;x<T.length?(O=T.charAt(x)+T.charAt(x-1),I=new m(w.row,x-1,w.row,x+1)):(O=T.charAt(x-1)+T.charAt(x-2),I=new m(w.row,x-2,w.row,x)),this.session.replace(I,O),this.session.selection.moveToPosition(I.end)}}},_.prototype.toLowerCase=function(){var w=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var x=this.getSelectionRange(),T=this.session.getTextRange(x);this.session.replace(x,T.toLowerCase()),this.selection.setSelectionRange(w)},_.prototype.toUpperCase=function(){var w=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var x=this.getSelectionRange(),T=this.session.getTextRange(x);this.session.replace(x,T.toUpperCase()),this.selection.setSelectionRange(w)},_.prototype.indent=function(){var w=this.session,x=this.getSelectionRange();if(x.start.row<x.end.row){var T=this.$getSelectedRows();w.indentRows(T.first,T.last," ");return}else if(x.start.column<x.end.column){var O=w.getTextRange(x);if(!/^\s+$/.test(O)){var T=this.$getSelectedRows();w.indentRows(T.first,T.last," ");return}}var I=w.getLine(x.start.row),F=x.start,P=w.getTabSize(),W=w.documentToScreenColumn(F.row,F.column);if(this.session.getUseSoftTabs())var j=P-W%P,H=s.stringRepeat(" ",j);else{for(var j=W%P;I[x.start.column-1]==" "&&j;)x.start.column--,j--;this.selection.setSelectionRange(x),H=" "}return this.insert(H)},_.prototype.blockIndent=function(){var w=this.$getSelectedRows();this.session.indentRows(w.first,w.last," ")},_.prototype.blockOutdent=function(){var w=this.session.getSelection();this.session.outdentRows(w.getRange())},_.prototype.sortLines=function(){for(var w=this.$getSelectedRows(),x=this.session,T=[],O=w.first;O<=w.last;O++)T.push(x.getLine(O));T.sort(function(P,W){return P.toLowerCase()<W.toLowerCase()?-1:P.toLowerCase()>W.toLowerCase()?1:0});for(var I=new m(0,0,0,0),O=w.first;O<=w.last;O++){var F=x.getLine(O);I.start.row=O,I.end.row=O,I.end.column=F.length,x.replace(I,T[O-w.first])}},_.prototype.toggleCommentLines=function(){var w=this.session.getState(this.getCursorPosition().row),x=this.$getSelectedRows();this.session.getMode().toggleCommentLines(w,this.session,x.first,x.last)},_.prototype.toggleBlockComment=function(){var w=this.getCursorPosition(),x=this.session.getState(w.row),T=this.getSelectionRange();this.session.getMode().toggleBlockComment(x,this.session,T,w)},_.prototype.getNumberAt=function(w,x){var T=/[\-]?[0-9]+(?:\.[0-9]+)?/g;T.lastIndex=0;for(var O=this.session.getLine(w);T.lastIndex<x;){var I=T.exec(O);if(I.index<=x&&I.index+I[0].length>=x){var F={value:I[0],start:I.index,end:I.index+I[0].length};return F}}return null},_.prototype.modifyNumber=function(w){var x=this.selection.getCursor().row,T=this.selection.getCursor().column,O=new m(x,T-1,x,T),I=this.session.getTextRange(O);if(!isNaN(parseFloat(I))&&isFinite(I)){var F=this.getNumberAt(x,T);if(F){var P=F.value.indexOf(".")>=0?F.start+F.value.indexOf(".")+1:F.end,W=F.start+F.value.length-P,j=parseFloat(F.value);j*=Math.pow(10,W),P!==F.end&&T<P?w*=Math.pow(10,F.end-T-1):w*=Math.pow(10,F.end-T),j+=w,j/=Math.pow(10,W);var H=j.toFixed(W),z=new m(x,F.start,x,F.end);this.session.replace(z,H),this.moveCursorTo(x,Math.max(F.start+1,T+H.length-F.value.length))}}else this.toggleWord()},_.prototype.toggleWord=function(){var w=this.selection.getCursor().row,x=this.selection.getCursor().column;this.selection.selectWord();var T=this.getSelectedText(),O=this.selection.getWordRange().start.column,I=T.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),F=x-O-1;F<0&&(F=0);var P=0,W=0,j=this;T.match(/[A-Za-z0-9_]+/)&&I.forEach(function(ee,D){W=P+ee.length,F>=P&&F<=W&&(T=ee,j.selection.clearSelection(),j.moveCursorTo(w,P+O),j.selection.selectTo(w,W+O)),P=W});for(var H=this.$toggleWordPairs,z,K=0;K<H.length;K++)for(var q=H[K],U=0;U<=1;U++){var X=+!U,Y=T.match(new RegExp("^\\s?_?("+s.escapeRegExp(q[U])+")\\s?$","i"));if(Y){var V=T.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(Y[1])+")($|\\s)","g"));V&&(z=T.replace(new RegExp(s.escapeRegExp(q[U]),"i"),function(ee){var D=q[X];return ee.toUpperCase()==ee?D=D.toUpperCase():ee.charAt(0).toUpperCase()==ee.charAt(0)&&(D=D.substr(0,0)+q[X].charAt(0).toUpperCase()+D.substr(1)),D}),this.insert(z),z="")}}},_.prototype.findLinkAt=function(w,x){var T,O,I=this.session.getLine(w),F=I.split(/((?:https?|ftp):\/\/[\S]+)/),P=x;P<0&&(P=0);var W=0,j=0,H;try{for(var z=u(F),K=z.next();!K.done;K=z.next()){var q=K.value;if(j=W+q.length,P>=W&&P<=j&&q.match(/((?:https?|ftp):\/\/[\S]+)/)){H=q.replace(/[\s:.,'";}\]]+$/,"");break}W=j}}catch(U){T={error:U}}finally{try{K&&!K.done&&(O=z.return)&&O.call(z)}finally{if(T)throw T.error}}return H},_.prototype.openLink=function(){var w=this.selection.getCursor(),x=this.findLinkAt(w.row,w.column);return x&&window.open(x,"_blank"),x!=null},_.prototype.removeLines=function(){var w=this.$getSelectedRows();this.session.removeFullLines(w.first,w.last),this.clearSelection()},_.prototype.duplicateSelection=function(){var w=this.selection,x=this.session,T=w.getRange(),O=w.isBackwards();if(T.isEmpty()){var I=T.start.row;x.duplicateLines(I,I)}else{var F=O?T.start:T.end,P=x.insert(F,x.getTextRange(T));T.start=F,T.end=P,w.setSelectionRange(T,O)}},_.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},_.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},_.prototype.moveText=function(w,x,T){return this.session.moveText(w,x,T)},_.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},_.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},_.prototype.$moveLines=function(w,x){var T,O,I=this.selection;if(!I.inMultiSelectMode||this.inVirtualSelectionMode){var F=I.toOrientedRange();T=this.$getSelectedRows(F),O=this.session.$moveLines(T.first,T.last,x?0:w),x&&w==-1&&(O=0),F.moveBy(O,0),I.fromOrientedRange(F)}else{var P=I.rangeList.ranges;I.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var W=0,j=0,H=P.length,z=0;z<H;z++){var K=z;P[z].moveBy(W,0),T=this.$getSelectedRows(P[z]);for(var q=T.first,U=T.last;++z<H;){j&&P[z].moveBy(j,0);var X=this.$getSelectedRows(P[z]);if(x&&X.first!=U)break;if(!x&&X.first>U+1)break;U=X.last}for(z--,W=this.session.$moveLines(q,U,x?0:w),x&&w==-1&&(K=z+1);K<=z;)P[K].moveBy(W,0),K++;x||(W=0),j+=W}I.fromOrientedRange(I.ranges[0]),I.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},_.prototype.$getSelectedRows=function(w){return w=(w||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(w.start.row),last:this.session.getRowFoldEnd(w.end.row)}},_.prototype.onCompositionStart=function(w){this.renderer.showComposition(w)},_.prototype.onCompositionUpdate=function(w){this.renderer.setCompositionText(w)},_.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},_.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},_.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},_.prototype.isRowVisible=function(w){return w>=this.getFirstVisibleRow()&&w<=this.getLastVisibleRow()},_.prototype.isRowFullyVisible=function(w){return w>=this.renderer.getFirstFullyVisibleRow()&&w<=this.renderer.getLastFullyVisibleRow()},_.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},_.prototype.$moveByPage=function(w,x){var T=this.renderer,O=this.renderer.layerConfig,I=w*Math.floor(O.height/O.lineHeight);x===!0?this.selection.$moveSelection(function(){this.moveCursorBy(I,0)}):x===!1&&(this.selection.moveCursorBy(I,0),this.selection.clearSelection());var F=T.scrollTop;T.scrollBy(0,I*O.lineHeight),x!=null&&T.scrollCursorIntoView(null,.5),T.animateScrolling(F)},_.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},_.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},_.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},_.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},_.prototype.scrollPageDown=function(){this.$moveByPage(1)},_.prototype.scrollPageUp=function(){this.$moveByPage(-1)},_.prototype.scrollToRow=function(w){this.renderer.scrollToRow(w)},_.prototype.scrollToLine=function(w,x,T,O){this.renderer.scrollToLine(w,x,T,O)},_.prototype.centerSelection=function(){var w=this.getSelectionRange(),x={row:Math.floor(w.start.row+(w.end.row-w.start.row)/2),column:Math.floor(w.start.column+(w.end.column-w.start.column)/2)};this.renderer.alignCursor(x,.5)},_.prototype.getCursorPosition=function(){return this.selection.getCursor()},_.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},_.prototype.getSelectionRange=function(){return this.selection.getRange()},_.prototype.selectAll=function(){this.selection.selectAll()},_.prototype.clearSelection=function(){this.selection.clearSelection()},_.prototype.moveCursorTo=function(w,x){this.selection.moveCursorTo(w,x)},_.prototype.moveCursorToPosition=function(w){this.selection.moveCursorToPosition(w)},_.prototype.jumpToMatching=function(w,x){var T=this.getCursorPosition(),O=new C(this.session,T.row,T.column),I=O.getCurrentToken(),F=0;I&&I.type.indexOf("tag-name")!==-1&&(I=O.stepBackward());var P=I||O.stepForward();if(P){var W,j=!1,H={},z=T.column-P.start,K,q={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(P.value.match(/[{}()\[\]]/g)){for(;z<P.value.length&&!j;z++)if(q[P.value[z]])switch(K=q[P.value[z]]+"."+P.type.replace("rparen","lparen"),isNaN(H[K])&&(H[K]=0),P.value[z]){case"(":case"[":case"{":H[K]++;break;case")":case"]":case"}":H[K]--,H[K]===-1&&(W="bracket",j=!0);break}}else P.type.indexOf("tag-name")!==-1&&(isNaN(H[P.value])&&(H[P.value]=0),I.value==="<"&&F>1?H[P.value]++:I.value==="</"&&H[P.value]--,H[P.value]===-1&&(W="tag",j=!0));j||(I=P,F++,P=O.stepForward(),z=0)}while(P&&!j);if(W){var U,X;if(W==="bracket")U=this.session.getBracketRange(T),U||(U=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()+z-1,O.getCurrentTokenRow(),O.getCurrentTokenColumn()+z-1),X=U.start,(x||X.row===T.row&&Math.abs(X.column-T.column)<2)&&(U=this.session.getBracketRange(X)));else if(W==="tag"){if(!P||P.type.indexOf("tag-name")===-1)return;if(U=new m(O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2,O.getCurrentTokenRow(),O.getCurrentTokenColumn()-2),U.compare(T.row,T.column)===0){var Y=this.session.getMatchingTags(T);Y&&(Y.openTag.contains(T.row,T.column)?(U=Y.closeTag,X=U.start):(U=Y.openTag,Y.closeTag.start.row===T.row&&Y.closeTag.start.column===T.column?X=U.end:X=U.start))}X=X||U.start}X=U&&U.cursor||X,X&&(w?U&&x?this.selection.setRange(U):U&&U.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(X.row,X.column):this.selection.moveTo(X.row,X.column))}}},_.prototype.gotoLine=function(w,x,T){this.selection.clearSelection(),this.session.unfold({row:w-1,column:x||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(w-1,x||0),this.isRowFullyVisible(w-1)||this.scrollToLine(w-1,!0,T)},_.prototype.navigateTo=function(w,x){this.selection.moveTo(w,x)},_.prototype.navigateUp=function(w){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var x=this.selection.anchor.getPosition();return this.moveCursorToPosition(x)}this.selection.clearSelection(),this.selection.moveCursorBy(-w||-1,0)},_.prototype.navigateDown=function(w){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var x=this.selection.anchor.getPosition();return this.moveCursorToPosition(x)}this.selection.clearSelection(),this.selection.moveCursorBy(w||1,0)},_.prototype.navigateLeft=function(w){if(this.selection.isEmpty())for(w=w||1;w--;)this.selection.moveCursorLeft();else{var x=this.getSelectionRange().start;this.moveCursorToPosition(x)}this.clearSelection()},_.prototype.navigateRight=function(w){if(this.selection.isEmpty())for(w=w||1;w--;)this.selection.moveCursorRight();else{var x=this.getSelectionRange().end;this.moveCursorToPosition(x)}this.clearSelection()},_.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},_.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},_.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},_.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},_.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},_.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},_.prototype.replace=function(w,x){x&&this.$search.set(x);var T=this.$search.find(this.session),O=0;return T&&(this.$tryReplace(T,w)&&(O=1),this.selection.setSelectionRange(T),this.renderer.scrollSelectionIntoView(T.start,T.end)),O},_.prototype.replaceAll=function(w,x){x&&this.$search.set(x);var T=this.$search.findAll(this.session),O=0;if(!T.length)return O;var I=this.getSelectionRange();this.selection.moveTo(0,0);for(var F=T.length-1;F>=0;--F)this.$tryReplace(T[F],w)&&O++;return this.selection.setSelectionRange(I),O},_.prototype.$tryReplace=function(w,x){var T=this.session.getTextRange(w);return x=this.$search.replace(T,x),x!==null?(w.end=this.session.replace(w,x),w):null},_.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},_.prototype.find=function(w,x,T){x||(x={}),typeof w=="string"||w instanceof RegExp?x.needle=w:typeof w=="object"&&h.mixin(x,w);var O=this.selection.getRange();x.needle==null&&(w=this.session.getTextRange(O)||this.$search.$options.needle,w||(O=this.session.getWordRange(O.start.row,O.start.column),w=this.session.getTextRange(O)),this.$search.set({needle:w})),this.$search.set(x),x.start||this.$search.set({start:O});var I=this.$search.find(this.session);if(x.preventScroll)return I;if(I)return this.revealRange(I,T),I;x.backwards?O.start=O.end:O.end=O.start,this.selection.setRange(O)},_.prototype.findNext=function(w,x){this.find({skipCurrent:!0,backwards:!1},w,x)},_.prototype.findPrevious=function(w,x){this.find(w,{skipCurrent:!0,backwards:!0},x)},_.prototype.revealRange=function(w,x){this.session.unfold(w),this.selection.setSelectionRange(w);var T=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(w.start,w.end,.5),x!==!1&&this.renderer.animateScrolling(T)},_.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},_.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(w){w.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},_.prototype.setAutoScrollEditorIntoView=function(w){if(w){var x,T=this,O=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var I=this.$scrollAnchor;I.style.cssText="position:absolute",this.container.insertBefore(I,this.container.firstChild);var F=this.on("changeSelection",function(){O=!0}),P=this.renderer.on("beforeRender",function(){O&&(x=T.renderer.container.getBoundingClientRect())}),W=this.renderer.on("afterRender",function(){if(O&&x&&(T.isFocused()||T.searchBox&&T.searchBox.isFocused())){var j=T.renderer,H=j.$cursorLayer.$pixelPos,z=j.layerConfig,K=H.top-z.offset;H.top>=0&&K+x.top<0?O=!0:H.top<z.height&&H.top+x.top+z.lineHeight>window.innerHeight?O=!1:O=null,O!=null&&(I.style.top=K+"px",I.style.left=H.left+"px",I.style.height=z.lineHeight+"px",I.scrollIntoView(O)),O=x=null}});this.setAutoScrollEditorIntoView=function(j){j||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",F),this.renderer.off("afterRender",W),this.renderer.off("beforeRender",P))}}},_.prototype.$resetCursorStyle=function(){var w=this.$cursorStyle||"ace",x=this.renderer.$cursorLayer;x&&(x.setSmoothBlinking(/smooth/.test(w)),x.isBlinking=!this.$readOnly&&w!="wide",g.setCssClass(x.element,"ace_slim-cursors",/slim/.test(w)))},_.prototype.prompt=function(w,x,T){var O=this;S.loadModule("ace/ext/prompt",function(I){I.prompt(O,w,x,T)})},_}();$.$uid=0,$.prototype.curOp=null,$.prototype.prevOp={},$.prototype.$mergeableCommands=["backspace","del","insertstring"],$.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],h.implement($.prototype,v),S.defineOptions($.prototype,"editor",{selectionStyle:{set:function(_){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:_})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(_){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(_){this.textInput.setReadOnly(_),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(_){this.textInput.setCopyWithEmptySelection(_)},initialValue:!1},cursorStyle:{set:function(_){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(_){this.setAutoScrollEditorIntoView(_)}},keyboardHandler:{set:function(_){this.setKeyboardHandler(_)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(_){this.session.setValue(_)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(_){this.setSession(_)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(_){this.renderer.$gutterLayer.setShowLineNumbers(_),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),_&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(_){this.$showLineNumbers&&_?k.attach(this):k.detach(this)}},placeholder:{set:function(_){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var w=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(w&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),g.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!w&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),g.addCssClass(this.container,"ace_hasPlaceholder");var x=g.createElement("div");x.className="ace_placeholder",x.textContent=this.$placeholder||"",this.renderer.placeholderNode=x,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!w&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(_){var w={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(O){O.blur(),O.renderer.scroller.focus()},readOnly:!0},x=function(O){if(O.target==this.renderer.scroller&&O.keyCode===M.enter){O.preventDefault();var I=this.getCursorPosition().row;this.isRowVisible(I)||this.scrollToLine(I,!0,!0),this.focus()}},T;_?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(p.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",L("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",L("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",x.bind(this)),this.commands.addCommand(w),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",L("editor")),this.renderer.$gutter.setAttribute("aria-label",L("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),T||(T=new R(this)),T.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",x.bind(this)),this.commands.removeCommand(w),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),T&&T.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(_,w){return(Math.abs(_.selection.lead.row-w)||w+1+(w<9?"·":""))+""},getWidth:function(_,w,x){return Math.max(w.toString().length,(x.lastRow+1).toString().length,2)*x.characterWidth},update:function(_,w){w.renderer.$loop.schedule(w.renderer.CHANGE_GUTTER)},attach:function(_){_.renderer.$gutterLayer.$renderer=this,_.on("changeSelection",this.update),this.update(null,_)},detach:function(_){_.renderer.$gutterLayer.$renderer==this&&(_.renderer.$gutterLayer.$renderer=null),_.off("changeSelection",this.update),this.update(null,_)}};r.Editor=$}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s,p){this.element=s,this.canvasHeight=p||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return g.prototype.moveContainer=function(s){u.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},g.prototype.pageChanged=function(s,p){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(p.firstRowScreen*p.lineHeight/this.canvasHeight)},g.prototype.computeLineTop=function(s,p,o){var i=p.firstRowScreen*p.lineHeight,a=Math.floor(i/this.canvasHeight),c=o.documentToScreenRow(s,0)*p.lineHeight;return c-a*this.canvasHeight},g.prototype.computeLineHeight=function(s,p,o){return p.lineHeight*o.getRowLineCount(s)},g.prototype.getLength=function(){return this.cells.length},g.prototype.get=function(s){return this.cells[s]},g.prototype.shift=function(){this.$cacheCell(this.cells.shift())},g.prototype.pop=function(){this.$cacheCell(this.cells.pop())},g.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var p=u.createFragment(this.element),o=0;o<s.length;o++)p.appendChild(s[o].element);this.element.appendChild(p)}else this.cells.push(s),this.element.appendChild(s.element)},g.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var p=u.createFragment(this.element),o=0;o<s.length;o++)p.appendChild(s[o].element);this.element.firstChild?this.element.insertBefore(p,this.element.firstChild):this.element.appendChild(p)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},g.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},g.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},g.prototype.createCell=function(s,p,o,i){var a=this.cellCache.pop();if(!a){var c=u.createElement("div");i&&i(c),this.element.appendChild(c),a={element:c,text:"",row:s}}return a.row=s,a},g}();r.Lines=h}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/oop"),g=n("../lib/lang"),s=n("../lib/event_emitter").EventEmitter,p=n("./lines").Lines,o=n("../config").nls,i=function(){function c(l){this.element=u.createElement("div"),this.element.className="ace_layer ace_gutter-layer",l.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new p(this.element),this.$lines.$offsetCoefficient=1}return c.prototype.setSession=function(l){this.session&&this.session.off("change",this.$updateAnnotations),this.session=l,l&&l.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(l,d){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(l,d)},c.prototype.removeGutterDecoration=function(l,d){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(l,d)},c.prototype.setAnnotations=function(l){this.$annotations=[];for(var d=0;d<l.length;d++){var m=l[d],v=m.row,y=this.$annotations[v];y||(y=this.$annotations[v]={text:[],type:[]});var A=m.text,S=m.type;A=A?g.escapeHTML(A):m.html||"",y.text.indexOf(A)===-1&&(y.text.push(A),y.type.push(S));var C=m.className;C?y.className=C:S=="error"?y.className=" ace_error":S=="warning"&&y.className!=" ace_error"?y.className=" ace_warning":S=="info"&&!y.className&&(y.className=" ace_info")}},c.prototype.$updateAnnotations=function(l){if(this.$annotations.length){var d=l.start.row,m=l.end.row-d;if(m!==0)if(l.action=="remove")this.$annotations.splice(d,m+1,null);else{var v=new Array(m+1);v.unshift(d,1),this.$annotations.splice.apply(this.$annotations,v)}}},c.prototype.update=function(l){this.config=l;var d=this.session,m=l.firstRow,v=Math.min(l.lastRow+l.gutterOffset,d.getLength()-1);this.oldLastRow=v,this.config=l,this.$lines.moveContainer(l),this.$updateCursorRow();for(var y=d.getNextFoldLine(m),A=y?y.start.row:1/0,S=null,C=-1,b=m;;){if(b>A&&(b=y.end.row+1,y=d.getNextFoldLine(b,y),A=y?y.start.row:1/0),b>v){for(;this.$lines.getLength()>C+1;)this.$lines.pop();break}S=this.$lines.get(++C),S?S.row=b:(S=this.$lines.createCell(b,l,this.session,a),this.$lines.push(S)),this.$renderCell(S,l,y,b),b++}this._signal("afterRender"),this.$updateGutterWidth(l)},c.prototype.$updateGutterWidth=function(l){var d=this.session,m=d.gutterRenderer||this.$renderer,v=d.$firstLineNumber,y=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||d.$useWrapMode)&&(y=d.getLength()+v-1);var A=m?m.getWidth(d,y,l):y.toString().length*l.characterWidth,S=this.$padding||this.$computePadding();A+=S.left+S.right,A!==this.gutterWidth&&!isNaN(A)&&(this.gutterWidth=A,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",A))},c.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var l=this.session.selection.getCursor();this.$cursorRow!==l.row&&(this.$cursorRow=l.row)}},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var l=this.session.selection.cursor.row;if(this.$cursorRow=l,!(this.$cursorCell&&this.$cursorCell.row==l)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var d=this.$lines.cells;this.$cursorCell=null;for(var m=0;m<d.length;m++){var v=d[m];if(v.row>=this.$cursorRow){if(v.row>this.$cursorRow){var y=this.session.getFoldLine(this.$cursorRow);if(m>0&&y&&y.start.row==d[m-1].row)v=d[m-1];else break}v.element.className="ace_gutter-active-line "+v.element.className,this.$cursorCell=v;break}}}}},c.prototype.scrollLines=function(l){var d=this.config;if(this.config=l,this.$updateCursorRow(),this.$lines.pageChanged(d,l))return this.update(l);this.$lines.moveContainer(l);var m=Math.min(l.lastRow+l.gutterOffset,this.session.getLength()-1),v=this.oldLastRow;if(this.oldLastRow=m,!d||v<l.firstRow)return this.update(l);if(m<d.firstRow)return this.update(l);if(d.firstRow<l.firstRow)for(var y=this.session.getFoldedRowCount(d.firstRow,l.firstRow-1);y>0;y--)this.$lines.shift();if(v>m)for(var y=this.session.getFoldedRowCount(m+1,v);y>0;y--)this.$lines.pop();l.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLines(l,l.firstRow,d.firstRow-1)),m>v&&this.$lines.push(this.$renderLines(l,v+1,m)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(l)},c.prototype.$renderLines=function(l,d,m){for(var v=[],y=d,A=this.session.getNextFoldLine(y),S=A?A.start.row:1/0;y>S&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),S=A?A.start.row:1/0),!(y>m);){var C=this.$lines.createCell(y,l,this.session,a);this.$renderCell(C,l,A,y),v.push(C),y++}return v},c.prototype.$renderCell=function(l,d,m,v){var y=l.element,A=this.session,S=y.childNodes[0],C=y.childNodes[1],b=y.childNodes[2],R=b.firstChild,L=A.$firstLineNumber,E=A.$breakpoints,M=A.$decorations,$=A.gutterRenderer||this.$renderer,k=this.$showFoldWidgets&&A.foldWidgets,_=m?m.start.row:Number.MAX_VALUE,w=d.lineHeight+"px",x=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",T=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",O=($?$.getText(A,v):v+L).toString();if(this.$highlightGutterLine&&(v==this.$cursorRow||m&&v<this.$cursorRow&&v>=_&&this.$cursorRow<=m.end.row)&&(x+="ace_gutter-active-line ",this.$cursorCell!=l&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=l)),E[v]&&(x+=E[v]),M[v]&&(x+=M[v]),this.$annotations[v]&&v!==_&&(x+=this.$annotations[v].className),k){var I=k[v];I==null&&(I=k[v]=A.getFoldWidget(v))}if(I){var F="ace_fold-widget ace_"+I,P=I=="start"&&v==_&&v<m.end.row;if(P){F+=" ace_closed";for(var W="",j=!1,H=v+1;H<=m.end.row;H++)if(this.$annotations[H]){if(this.$annotations[H].className===" ace_error"){j=!0,W=" ace_error_fold";break}if(this.$annotations[H].className===" ace_warning"){j=!0,W=" ace_warning_fold";continue}}x+=W}else F+=" ace_open";C.className!=F&&(C.className=F),u.setStyle(C.style,"height",w),u.setStyle(C.style,"display","inline-block"),C.setAttribute("role","button"),C.setAttribute("tabindex","-1");var z=A.getFoldWidgetRange(v);z?C.setAttribute("aria-label",o("Toggle code folding, rows $0 through $1",[z.start.row+1,z.end.row+1])):m?C.setAttribute("aria-label",o("Toggle code folding, rows $0 through $1",[m.start.row+1,m.end.row+1])):C.setAttribute("aria-label",o("Toggle code folding, row $0",[v+1])),P?(C.setAttribute("aria-expanded","false"),C.setAttribute("title",o("Unfold code"))):(C.setAttribute("aria-expanded","true"),C.setAttribute("title",o("Fold code")))}else C&&(u.setStyle(C.style,"display","none"),C.setAttribute("tabindex","0"),C.removeAttribute("role"),C.removeAttribute("aria-label"));return j&&this.$showFoldedAnnotations?(b.className="ace_gutter_annotation",R.className=T,R.className+=W,u.setStyle(R.style,"height",w),u.setStyle(b.style,"display","block"),u.setStyle(b.style,"height",w),b.setAttribute("aria-label",o("Read annotations row $0",[O])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):this.$annotations[v]?(b.className="ace_gutter_annotation",R.className=T,this.$useSvgGutterIcons?R.className+=this.$annotations[v].className:y.classList.add(this.$annotations[v].className.replace(" ","")),u.setStyle(R.style,"height",w),u.setStyle(b.style,"display","block"),u.setStyle(b.style,"height",w),b.setAttribute("aria-label",o("Read annotations row $0",[O])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):(u.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0")),O!==S.data&&(S.data=O),y.className!=x&&(y.className=x),u.setStyle(l.element.style,"height",this.$lines.computeLineHeight(v,d,A)+"px"),u.setStyle(l.element.style,"top",this.$lines.computeLineTop(v,d,A)+"px"),l.text=O,b.style.display==="none"&&C.style.display==="none"?l.element.setAttribute("aria-hidden",!0):l.element.setAttribute("aria-hidden",!1),l},c.prototype.setHighlightGutterLine=function(l){this.$highlightGutterLine=l},c.prototype.setShowLineNumbers=function(l){this.$renderer=!l&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(l){l?u.addCssClass(this.element,"ace_folding-enabled"):u.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=l,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var l=u.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(l.borderLeftWidth)||0)+(parseInt(l.paddingLeft)||0)+1,this.$padding.right=(parseInt(l.borderRightWidth)||0)+(parseInt(l.paddingRight)||0),this.$padding},c.prototype.getRegion=function(l){var d=this.$padding||this.$computePadding(),m=this.element.getBoundingClientRect();if(l.x<d.left+m.left)return"markers";if(this.$showFoldWidgets&&l.x>m.right-d.right)return"foldWidgets"},c}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,h.implement(i.prototype,s);function a(c){var l=document.createTextNode("");c.appendChild(l);var d=u.createElement("span");c.appendChild(d);var m=u.createElement("span");c.appendChild(m);var v=u.createElement("span");return m.appendChild(v),c}r.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,f){var u=n("../range").Range,h=n("../lib/dom"),g=function(){function p(o){this.element=h.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return p.prototype.setPadding=function(o){this.$padding=o},p.prototype.setSession=function(o){this.session=o},p.prototype.setMarkers=function(o){this.markers=o},p.prototype.elt=function(o,i){var a=this.i!=-1&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=i,a.className=o},p.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var a in this.markers){var c=this.markers[a];if(!c.range){c.update(i,this,this.session,o);continue}var l=c.range.clipRows(o.firstRow,o.lastRow);if(!l.isEmpty())if(l=l.toScreenRange(this.session),c.renderer){var d=this.$getTop(l.start.row,o),m=this.$padding+l.start.column*o.characterWidth;c.renderer(i,l,m,d,o)}else c.type=="fullLine"?this.drawFullLineMarker(i,l,c.clazz,o):c.type=="screenLine"?this.drawScreenLineMarker(i,l,c.clazz,o):l.isMultiLine()?c.type=="text"?this.drawTextMarker(i,l,c.clazz,o):this.drawMultiLineMarker(i,l,c.clazz,o):this.drawSingleLineMarker(i,l,c.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},p.prototype.$getTop=function(o,i){return(o-i.firstRowScreen)*i.lineHeight},p.prototype.drawTextMarker=function(o,i,a,c,l){for(var d=this.session,m=i.start.row,v=i.end.row,y=m,A=0,S=0,C=d.getScreenLastRowColumn(y),b=new u(y,i.start.column,y,S);y<=v;y++)b.start.row=b.end.row=y,b.start.column=y==m?i.start.column:d.getRowWrapIndent(y),b.end.column=C,A=S,S=C,C=y+1<v?d.getScreenLastRowColumn(y+1):y==v?0:i.end.column,this.drawSingleLineMarker(o,b,a+(y==m?" ace_start":"")+" ace_br"+s(y==m||y==m+1&&i.start.column,A<S,S>C,y==v),c,y==v?0:1,l)},p.prototype.drawMultiLineMarker=function(o,i,a,c,l){var d=this.$padding,m=c.lineHeight,v=this.$getTop(i.start.row,c),y=d+i.start.column*c.characterWidth;if(l=l||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var A=i.clone();A.end.row=A.start.row,A.end.column=this.session.getLine(A.start.row).length,this.drawBidiSingleLineMarker(o,A,a+" ace_br1 ace_start",c,null,l)}else this.elt(a+" ace_br1 ace_start","height:"+m+"px;right:0;top:"+v+"px;left:"+y+"px;"+(l||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var A=i.clone();A.start.row=A.end.row,A.start.column=0,this.drawBidiSingleLineMarker(o,A,a+" ace_br12",c,null,l)}else{v=this.$getTop(i.end.row,c);var S=i.end.column*c.characterWidth;this.elt(a+" ace_br12","height:"+m+"px;width:"+S+"px;top:"+v+"px;left:"+d+"px;"+(l||""))}if(m=(i.end.row-i.start.row-1)*c.lineHeight,!(m<=0)){v=this.$getTop(i.start.row+1,c);var C=(i.start.column?1:0)|(i.end.column?0:8);this.elt(a+(C?" ace_br"+C:""),"height:"+m+"px;right:0;top:"+v+"px;left:"+d+"px;"+(l||""))}},p.prototype.drawSingleLineMarker=function(o,i,a,c,l,d){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,a,c,l,d);var m=c.lineHeight,v=(i.end.column+(l||0)-i.start.column)*c.characterWidth,y=this.$getTop(i.start.row,c),A=this.$padding+i.start.column*c.characterWidth;this.elt(a,"height:"+m+"px;width:"+v+"px;top:"+y+"px;left:"+A+"px;"+(d||""))},p.prototype.drawBidiSingleLineMarker=function(o,i,a,c,l,d){var m=c.lineHeight,v=this.$getTop(i.start.row,c),y=this.$padding,A=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);A.forEach(function(S){this.elt(a,"height:"+m+"px;width:"+(S.width+(l||0))+"px;top:"+v+"px;left:"+(y+S.left)+"px;"+(d||""))},this)},p.prototype.drawFullLineMarker=function(o,i,a,c,l){var d=this.$getTop(i.start.row,c),m=c.lineHeight;i.start.row!=i.end.row&&(m+=this.$getTop(i.end.row,c)-d),this.elt(a,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(l||""))},p.prototype.drawScreenLineMarker=function(o,i,a,c,l){var d=this.$getTop(i.start.row,c),m=c.lineHeight;this.elt(a,"height:"+m+"px;top:"+d+"px;left:0;right:0;"+(l||""))},p}();g.prototype.$padding=0;function s(p,o,i,a){return(p?1:0)|(o?2:0)|(i?4:0)|(a?8:0)}r.Marker=g}),ace.define("ace/layer/text_util",["require","exports","module"],function(n,r,f){var u=new Set(["text","rparen","lparen"]);r.isTextToken=function(h){return u.has(h)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(n,r,f){var u=n("../lib/oop"),h=n("../lib/dom"),g=n("../lib/lang"),s=n("./lines").Lines,p=n("../lib/event_emitter").EventEmitter,o=n("../config").nls,i=n("./text_util").isTextToken,a=function(){function c(l){this.dom=h,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",l.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return c.prototype.$updateEolChar=function(){var l=this.session.doc,d=l.getNewLineCharacter()==`
|
1024
|
+
`&&l.getNewLineMode()!="windows",m=d?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=m)return this.EOL_CHAR=m,!0},c.prototype.setPadding=function(l){this.$padding=l,this.element.style.margin="0 "+l+"px"},c.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},c.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},c.prototype.$setFontMetrics=function(l){this.$fontMetrics=l,this.$fontMetrics.on("changeCharacterSize",(function(d){this._signal("changeCharacterSize",d)}).bind(this)),this.$pollSizeChanges()},c.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},c.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},c.prototype.setSession=function(l){this.session=l,l&&this.$computeTabString()},c.prototype.setShowInvisibles=function(l){return this.showInvisibles==l?!1:(this.showInvisibles=l,typeof l=="string"?(this.showSpaces=/tab/i.test(l),this.showTabs=/space/i.test(l),this.showEOL=/eol/i.test(l)):this.showSpaces=this.showTabs=this.showEOL=l,this.$computeTabString(),!0)},c.prototype.setDisplayIndentGuides=function(l){return this.displayIndentGuides==l?!1:(this.displayIndentGuides=l,this.$computeTabString(),!0)},c.prototype.setHighlightIndentGuides=function(l){return this.$highlightIndentGuides===l?!1:(this.$highlightIndentGuides=l,l)},c.prototype.$computeTabString=function(){var l=this.session.getTabSize();this.tabSize=l;for(var d=this.$tabStrings=[0],m=1;m<l+1;m++)if(this.showTabs){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_tab",v.textContent=g.stringRepeat(this.TAB_CHAR,m),d.push(v)}else d.push(this.dom.createTextNode(g.stringRepeat(" ",m),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var y="ace_indent-guide",A=this.showSpaces?" ace_invisible ace_invisible_space":"",S=this.showSpaces?g.stringRepeat(this.SPACE_CHAR,this.tabSize):g.stringRepeat(" ",this.tabSize),C=this.showTabs?" ace_invisible ace_invisible_tab":"",b=this.showTabs?g.stringRepeat(this.TAB_CHAR,this.tabSize):S,v=this.dom.createElement("span");v.className=y+A,v.textContent=S,this.$tabStrings[" "]=v;var v=this.dom.createElement("span");v.className=y+C,v.textContent=b,this.$tabStrings[" "]=v}},c.prototype.updateLines=function(l,d,m){if(this.config.lastRow!=l.lastRow||this.config.firstRow!=l.firstRow)return this.update(l);this.config=l;for(var v=Math.max(d,l.firstRow),y=Math.min(m,l.lastRow),A=this.element.childNodes,S=0,b=l.firstRow;b<v;b++){var R=this.session.getFoldLine(b);if(R)if(R.containsRow(v)){v=R.start.row;break}else b=R.end.row;S++}for(var C=!1,b=v,R=this.session.getNextFoldLine(b),L=R?R.start.row:1/0;b>L&&(b=R.end.row+1,R=this.session.getNextFoldLine(b,R),L=R?R.start.row:1/0),!(b>y);){var E=A[S++];if(E){this.dom.removeChildren(E),this.$renderLine(E,b,b==L?R:!1),C&&(E.style.top=this.$lines.computeLineTop(b,l,this.session)+"px");var M=l.lineHeight*this.session.getRowLength(b)+"px";E.style.height!=M&&(C=!0,E.style.height=M)}b++}if(C)for(;S<this.$lines.cells.length;){var $=this.$lines.cells[S++];$.element.style.top=this.$lines.computeLineTop($.row,l,this.session)+"px"}},c.prototype.scrollLines=function(l){var d=this.config;if(this.config=l,this.$lines.pageChanged(d,l))return this.update(l);this.$lines.moveContainer(l);var m=l.lastRow,v=d?d.lastRow:-1;if(!d||v<l.firstRow)return this.update(l);if(m<d.firstRow)return this.update(l);if(!d||d.lastRow<l.firstRow)return this.update(l);if(l.lastRow<d.firstRow)return this.update(l);if(d.firstRow<l.firstRow)for(var y=this.session.getFoldedRowCount(d.firstRow,l.firstRow-1);y>0;y--)this.$lines.shift();if(d.lastRow>l.lastRow)for(var y=this.session.getFoldedRowCount(l.lastRow+1,d.lastRow);y>0;y--)this.$lines.pop();l.firstRow<d.firstRow&&this.$lines.unshift(this.$renderLinesFragment(l,l.firstRow,d.firstRow-1)),l.lastRow>d.lastRow&&this.$lines.push(this.$renderLinesFragment(l,d.lastRow+1,l.lastRow)),this.$highlightIndentGuide()},c.prototype.$renderLinesFragment=function(l,d,m){for(var v=[],y=d,A=this.session.getNextFoldLine(y),S=A?A.start.row:1/0;y>S&&(y=A.end.row+1,A=this.session.getNextFoldLine(y,A),S=A?A.start.row:1/0),!(y>m);){var C=this.$lines.createCell(y,l,this.session),b=C.element;this.dom.removeChildren(b),h.setStyle(b.style,"height",this.$lines.computeLineHeight(y,l,this.session)+"px"),h.setStyle(b.style,"top",this.$lines.computeLineTop(y,l,this.session)+"px"),this.$renderLine(b,y,y==S?A:!1),this.$useLineGroups()?b.className="ace_line_group":b.className="ace_line",v.push(C),y++}return v},c.prototype.update=function(l){this.$lines.moveContainer(l),this.config=l;for(var d=l.firstRow,m=l.lastRow,v=this.$lines;v.getLength();)v.pop();v.push(this.$renderLinesFragment(l,d,m))},c.prototype.$renderToken=function(l,d,m,v){for(var y=this,A=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,S=this.dom.createFragment(this.element),C,b=0;C=A.exec(v);){var R=C[1],L=C[2],E=C[3],M=C[4],$=C[5];if(!(!y.showSpaces&&L)){var k=b!=C.index?v.slice(b,C.index):"";if(b=C.index+C[0].length,k&&S.appendChild(this.dom.createTextNode(k,this.element)),R){var _=y.session.getScreenTabSize(d+C.index);S.appendChild(y.$tabStrings[_].cloneNode(!0)),d+=_-1}else if(L)if(y.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=g.stringRepeat(y.SPACE_CHAR,L.length),S.appendChild(w)}else S.appendChild(this.dom.createTextNode(L,this.element));else if(E){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=g.stringRepeat(y.SPACE_CHAR,E.length),S.appendChild(w)}else if(M){d+=1;var w=this.dom.createElement("span");w.style.width=y.config.characterWidth*2+"px",w.className=y.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=y.showSpaces?y.SPACE_CHAR:M,S.appendChild(w)}else if($){d+=1;var w=this.dom.createElement("span");w.style.width=y.config.characterWidth*2+"px",w.className="ace_cjk",w.textContent=$,S.appendChild(w)}}}if(S.appendChild(this.dom.createTextNode(b?v.slice(b):v,this.element)),i(m.type))l.appendChild(S);else{var x="ace_"+m.type.replace(/\./g," ace_"),w=this.dom.createElement("span");m.type=="fold"&&(w.style.width=m.value.length*this.config.characterWidth+"px",w.setAttribute("title",o("Unfold code"))),w.className=x,w.appendChild(S),l.appendChild(w)}return d+v.length},c.prototype.renderIndentGuide=function(l,d,m){var v=d.search(this.$indentGuideRe);if(v<=0||v>=m)return d;if(d[0]==" "){v-=v%this.tabSize;for(var y=v/this.tabSize,A=0;A<y;A++)l.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(v)}else if(d[0]==" "){for(var A=0;A<v;A++)l.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),d.substr(v)}return this.$highlightIndentGuide(),d},c.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var l=this.session.doc.$lines;if(l){var d=this.session.selection.getCursor(),m=/^\s*/.exec(this.session.doc.getLine(d.row))[0].length,v=Math.floor(m/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:v,start:d.row};var y=this.session.$bracketHighlight;if(y){for(var A=this.session.$bracketHighlight.ranges,S=0;S<A.length;S++)if(d.row!==A[S].start.row){this.$highlightIndentGuideMarker.end=A[S].start.row,d.row>A[S].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&l[d.row]!==""&&d.column===l[d.row].length){this.$highlightIndentGuideMarker.dir=1;for(var S=d.row+1;S<l.length;S++){var C=l[S],b=/^\s*/.exec(C)[0].length;if(C!==""&&(this.$highlightIndentGuideMarker.end=S,b<=m))break}}this.$renderHighlightIndentGuide()}}},c.prototype.$clearActiveIndentGuide=function(){for(var l=this.$lines.cells,d=0;d<l.length;d++){var m=l[d],v=m.element.childNodes;if(v.length>0){for(var y=0;y<v.length;y++)if(v[y].classList&&v[y].classList.contains("ace_indent-guide-active")){v[y].classList.remove("ace_indent-guide-active");break}}}},c.prototype.$setIndentGuideActive=function(l,d){var m=this.session.doc.getLine(l.row);if(m!==""){var v=l.element.childNodes;if(v){var y=v[d-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},c.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var l=this.$lines.cells;this.$clearActiveIndentGuide();var d=this.$highlightIndentGuideMarker.indentLevel;if(d!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var m=0;m<l.length;m++){var v=l[m];if(this.$highlightIndentGuideMarker.end&&v.row>=this.$highlightIndentGuideMarker.start+1){if(v.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,d)}}else for(var m=l.length-1;m>=0;m--){var v=l[m];if(this.$highlightIndentGuideMarker.end&&v.row<this.$highlightIndentGuideMarker.start){if(v.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(v,d)}}}},c.prototype.$createLineElement=function(l){var d=this.dom.createElement("div");return d.className="ace_line",d.style.height=this.config.lineHeight+"px",d},c.prototype.$renderWrappedLine=function(l,d,m){var v=0,y=0,A=m[0],S=0,C=this.$createLineElement();l.appendChild(C);for(var b=0;b<d.length;b++){var R=d[b],L=R.value;if(b==0&&this.displayIndentGuides){if(v=L.length,L=this.renderIndentGuide(C,L,A),!L)continue;v-=L.length}if(v+L.length<A)S=this.$renderToken(C,S,R,L),v+=L.length;else{for(;v+L.length>=A;)S=this.$renderToken(C,S,R,L.substring(0,A-v)),L=L.substring(A-v),v=A,C=this.$createLineElement(),l.appendChild(C),C.appendChild(this.dom.createTextNode(g.stringRepeat(" ",m.indent),this.element)),y++,S=0,A=m[y]||Number.MAX_VALUE;L.length!=0&&(v+=L.length,S=this.$renderToken(C,S,R,L))}}m[m.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(C,S,null,"",!0)},c.prototype.$renderSimpleLine=function(l,d){for(var m=0,v=0;v<d.length;v++){var y=d[v],A=y.value;if(!(v==0&&this.displayIndentGuides&&(A=this.renderIndentGuide(l,A),!A))){if(m+A.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(l,m,y,A);m=this.$renderToken(l,m,y,A)}}},c.prototype.$renderOverflowMessage=function(l,d,m,v,y){m&&this.$renderToken(l,d,m,v.slice(0,this.MAX_LINE_LENGTH-d));var A=this.dom.createElement("span");A.className="ace_inline_button ace_keyword ace_toggle_wrap",A.textContent=y?"<hide>":"<click to see more...>",l.appendChild(A)},c.prototype.$renderLine=function(l,d,m){if(!m&&m!=!1&&(m=this.session.getFoldLine(d)),m)var v=this.$getFoldLineTokens(d,m);else var v=this.session.getTokens(d);var y=l;if(v.length){var A=this.session.getRowSplitData(d);if(A&&A.length){this.$renderWrappedLine(l,v,A);var y=l.lastChild}else{var y=l;this.$useLineGroups()&&(y=this.$createLineElement(),l.appendChild(y)),this.$renderSimpleLine(y,v)}}else this.$useLineGroups()&&(y=this.$createLineElement(),l.appendChild(y));if(this.showEOL&&y){m&&(d=m.end.row);var S=this.dom.createElement("span");S.className="ace_invisible ace_invisible_eol",S.textContent=d==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,y.appendChild(S)}},c.prototype.$getFoldLineTokens=function(l,d){var m=this.session,v=[];function y(S,C,b){for(var R=0,L=0;L+S[R].value.length<C;)if(L+=S[R].value.length,R++,R==S.length)return;if(L!=C){var E=S[R].value.substring(C-L);E.length>b-C&&(E=E.substring(0,b-C)),v.push({type:S[R].type,value:E}),L=C+E.length,R+=1}for(;L<b&&R<S.length;){var E=S[R].value;E.length+L>b?v.push({type:S[R].type,value:E.substring(0,b-L)}):v.push(S[R]),L+=E.length,R+=1}}var A=m.getTokens(l);return d.walk(function(S,C,b,R,L){S!=null?v.push({type:"fold",value:S}):(L&&(A=m.getTokens(C)),A.length&&y(A,R,b))},d.end.row,this.session.getLine(d.end.row).length),v},c.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},c}();a.prototype.EOF_CHAR="¶",a.prototype.EOL_CHAR_LF="¬",a.prototype.EOL_CHAR_CRLF="¤",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="—",a.prototype.SPACE_CHAR="·",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,u.implement(a.prototype,p),r.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,f){var u=n("../lib/dom"),h=function(){function g(s){this.element=u.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),u.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return g.prototype.$updateOpacity=function(s){for(var p=this.cursors,o=p.length;o--;)u.setStyle(p[o].style,"opacity",s?"":"0")},g.prototype.$startCssAnimation=function(){for(var s=this.cursors,p=s.length;p--;)s[p].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&u.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},g.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,u.removeCssClass(this.element,"ace_animate-blinking")},g.prototype.setPadding=function(s){this.$padding=s},g.prototype.setSession=function(s){this.session=s},g.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},g.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},g.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,u.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},g.prototype.addCursor=function(){var s=u.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},g.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},g.prototype.hideCursor=function(){this.isVisible=!1,u.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.showCursor=function(){this.isVisible=!0,u.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},g.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,u.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&u.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),u.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var p=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),p()},this.blinkInterval),p()}},g.prototype.getPixelPosition=function(s,p){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(s),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,s.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),a=(o.row-(p?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:a}},g.prototype.isCursorInView=function(s,p){return s.top>=0&&s.top<p.maxHeight},g.prototype.update=function(s){this.config=s;var p=this.session.$selectionMarkers,o=0,i=0;(p===void 0||p.length===0)&&(p=[{cursor:null}]);for(var o=0,a=p.length;o<a;o++){var c=this.getPixelPosition(p[o].cursor,!0);if(!((c.top>s.height+s.offset||c.top<0)&&o>1)){var l=this.cursors[i++]||this.addCursor(),d=l.style;this.drawCursor?this.drawCursor(l,c,s,p[o],this.session):this.isCursorInView(c,s)?(u.setStyle(d,"display","block"),u.translate(l,c.left,c.top),u.setStyle(d,"width",Math.round(s.characterWidth)+"px"),u.setStyle(d,"height",s.lineHeight+"px")):u.setStyle(d,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var m=this.session.getOverwrite();this.$setOverwrite(m),this.$pixelPos=c,this.restartTimer()},g.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?u.addCssClass(this.element,"ace_overwrite-cursors"):u.removeCssClass(this.element,"ace_overwrite-cursors"))},g.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},g}();h.prototype.$padding=0,h.prototype.drawCursor=null,r.Cursor=h}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var l=function(d,m){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var A in y)Object.prototype.hasOwnProperty.call(y,A)&&(v[A]=y[A])},l(d,m)};return function(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");l(d,m);function v(){this.constructor=d}d.prototype=m===null?Object.create(m):(v.prototype=m.prototype,new v)}}(),h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter,o=32768,i=function(){function l(d,m){this.element=g.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+m,this.inner=g.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),d.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return l.prototype.setVisible=function(d){this.element.style.display=d?"":"none",this.isVisible=d,this.coeff=1},l}();h.implement(i.prototype,p);var a=function(l){u(d,l);function d(m,v){var y=l.call(this,m,"-v")||this;return y.scrollTop=0,y.scrollHeight=0,v.$scrollbarWidth=y.width=g.scrollbarWidth(m.ownerDocument),y.inner.style.width=y.element.style.width=(y.width||15)+5+"px",y.$minWidth=0,y}return d.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var m=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-m)/(this.coeff-m)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(m){this.element.style.height=m+"px"},d.prototype.setScrollHeight=function(m){this.scrollHeight=m,m>o?(this.coeff=o/m,m=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=m+"px"},d.prototype.setScrollTop=function(m){this.scrollTop!=m&&(this.skipEvent=!0,this.scrollTop=m,this.element.scrollTop=m*this.coeff)},d}(i);a.prototype.setInnerHeight=a.prototype.setScrollHeight;var c=function(l){u(d,l);function d(m,v){var y=l.call(this,m,"-h")||this;return y.scrollLeft=0,y.height=v.$scrollbarWidth,y.inner.style.height=y.element.style.height=(y.height||15)+5+"px",y}return d.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},d.prototype.getHeight=function(){return this.isVisible?this.height:0},d.prototype.setWidth=function(m){this.element.style.width=m+"px"},d.prototype.setInnerWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollWidth=function(m){this.inner.style.width=m+"px"},d.prototype.setScrollLeft=function(m){this.scrollLeft!=m&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=m)},d}(i);r.ScrollBar=a,r.ScrollBarV=a,r.ScrollBarH=c,r.VScrollBar=a,r.HScrollBar=c}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,f){var u=this&&this.__extends||function(){var c=function(l,d){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(m[y]=v[y])},c(l,d)};return function(l,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");c(l,d);function m(){this.constructor=l}l.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}(),h=n("./lib/oop"),g=n("./lib/dom"),s=n("./lib/event"),p=n("./lib/event_emitter").EventEmitter;g.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
1025
1025
|
position: absolute;
|
1026
1026
|
background: rgba(128, 128, 128, 0.6);
|
1027
1027
|
-moz-box-sizing: border-box;
|
@@ -1059,7 +1059,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
1059
1059
|
.ace_editor>.ace_sb_grabbed {
|
1060
1060
|
z-index: 8;
|
1061
1061
|
background: #000;
|
1062
|
-
}`,"ace_scrollbar.css",!1);var o=function(){function c(l,d){this.element=g.createElement("div"),this.element.className="ace_sb"+d,this.inner=g.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},c}();h.implement(o.prototype,p);var i=function(c){u(l,c);function l(d,m){var v=c.call(this,d,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=d,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return l.prototype.onMouseDown=function(d,m){if(d==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,A=function(M){y=M.clientY},S=function(){clearInterval(L)},C=m.clientY,b=this.thumbTop,
|
1062
|
+
}`,"ace_scrollbar.css",!1);var o=function(){function c(l,d){this.element=g.createElement("div"),this.element.className="ace_sb"+d,this.inner=g.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,l.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return c.prototype.setVisible=function(l){this.element.style.display=l?"":"none",this.isVisible=l,this.coeff=1},c}();h.implement(o.prototype,p);var i=function(c){u(l,c);function l(d,m){var v=c.call(this,d,"-v")||this;return v.scrollTop=0,v.scrollHeight=0,v.parent=d,v.width=v.VScrollWidth,v.renderer=m,v.inner.style.width=v.element.style.width=(v.width||15)+"px",v.$minWidth=0,v}return l.prototype.onMouseDown=function(d,m){if(d==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientY,A=function(M){y=M.clientY},S=function(){clearInterval(L)},C=m.clientY,b=this.thumbTop,R=function(){if(y!==void 0){var M=v.scrollTopFromThumbTop(b+y-C);M!==v.scrollTop&&v._emit("scroll",{data:M})}};s.capture(this.inner,A,S);var L=setInterval(R,20);return s.preventDefault(m)}var E=m.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(E)}),s.preventDefault(m)}},l.prototype.getHeight=function(){return this.height},l.prototype.scrollTopFromThumbTop=function(d){var m=d*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return m=m>>0,m<0?m=0:m>this.pageHeight-this.viewHeight&&(m=this.pageHeight-this.viewHeight),m},l.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},l.prototype.setHeight=function(d){this.height=Math.max(0,d),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},l.prototype.setScrollHeight=function(d,m){this.pageHeight===d&&!m||(this.pageHeight=d,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},l.prototype.setScrollTop=function(d){this.scrollTop=d,d<0&&(d=0),this.thumbTop=d*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},l}(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var a=function(c){u(l,c);function l(d,m){var v=c.call(this,d,"-h")||this;return v.scrollLeft=0,v.scrollWidth=0,v.height=v.HScrollHeight,v.inner.style.height=v.element.style.height=(v.height||12)+"px",v.renderer=m,v}return l.prototype.onMouseDown=function(d,m){if(d==="mousedown"&&!(s.getButton(m)!==0||m.detail===2)){if(m.target===this.inner){var v=this,y=m.clientX,A=function(M){y=M.clientX},S=function(){clearInterval(L)},C=m.clientX,b=this.thumbLeft,R=function(){if(y!==void 0){var M=v.scrollLeftFromThumbLeft(b+y-C);M!==v.scrollLeft&&v._emit("scroll",{data:M})}};s.capture(this.inner,A,S);var L=setInterval(R,20);return s.preventDefault(m)}var E=m.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(E)}),s.preventDefault(m)}},l.prototype.getHeight=function(){return this.isVisible?this.height:0},l.prototype.scrollLeftFromThumbLeft=function(d){var m=d*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return m=m>>0,m<0?m=0:m>this.pageWidth-this.viewWidth&&(m=this.pageWidth-this.viewWidth),m},l.prototype.setWidth=function(d){this.width=Math.max(0,d),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},l.prototype.setScrollWidth=function(d,m){this.pageWidth===d&&!m||(this.pageWidth=d,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},l.prototype.setScrollLeft=function(d){this.scrollLeft=d,d<0&&(d=0),this.thumbLeft=d*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},l}(o);a.prototype.setInnerWidth=a.prototype.setScrollWidth,r.ScrollBar=i,r.ScrollBarV=i,r.ScrollBarH=a,r.VScrollBar=i,r.HScrollBar=a}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,f){var u=n("./lib/event"),h=function(){function g(s,p){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=p||window;var o=this;this._flush=function(i){o.pending=!1;var a=o.changes;if(a&&(u.blockIdle(100),o.changes=0,o.onRender(a)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return g.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(u.nextFrame(this._flush),this.pending=!0)},g.prototype.clear=function(s){var p=this.changes;return this.changes=0,p},g}();r.RenderLoop=h}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,f){var u=n("../lib/oop"),h=n("../lib/dom"),g=n("../lib/lang"),s=n("../lib/event"),p=n("../lib/useragent"),o=n("../lib/event_emitter").EventEmitter,i=512,a=typeof ResizeObserver=="function",c=200,l=function(){function d(m){this.el=h.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=h.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=h.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),m.appendChild(this.el),this.$measureNode.textContent=g.stringRepeat("X",i),this.$characterSize={width:0,height:0},a?this.$addObserver():this.checkForSizeChanges()}return d.prototype.$setMeasureNodeStyles=function(m,v){m.width=m.height="auto",m.left=m.top="0px",m.visibility="hidden",m.position="absolute",m.whiteSpace="pre",p.isIE<8?m["font-family"]="inherit":m.font="inherit",m.overflow=v?"hidden":"visible"},d.prototype.checkForSizeChanges=function(m){if(m===void 0&&(m=this.$measureSizes()),m&&(this.$characterSize.width!==m.width||this.$characterSize.height!==m.height)){this.$measureNode.style.fontWeight="bold";var v=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=m,this.charSizes=Object.create(null),this.allowBoldFonts=v&&v.width===m.width&&v.height===m.height,this._emit("changeCharacterSize",{data:m})}},d.prototype.$addObserver=function(){var m=this;this.$observer=new window.ResizeObserver(function(v){m.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},d.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var m=this;return this.$pollSizeChangesTimer=s.onIdle(function v(){m.checkForSizeChanges(),s.onIdle(v,500)},500)},d.prototype.setPolling=function(m){m?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},d.prototype.$measureSizes=function(m){var v={height:(m||this.$measureNode).clientHeight,width:(m||this.$measureNode).clientWidth/i};return v.width===0||v.height===0?null:v},d.prototype.$measureCharWidth=function(m){this.$main.textContent=g.stringRepeat(m,i);var v=this.$main.getBoundingClientRect();return v.width/i},d.prototype.getCharacterWidth=function(m){var v=this.charSizes[m];return v===void 0&&(v=this.charSizes[m]=this.$measureCharWidth(m)/this.$characterSize.width),v},d.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},d.prototype.$getZoom=function(m){return!m||!m.parentElement?1:(window.getComputedStyle(m).zoom||1)*this.$getZoom(m.parentElement)},d.prototype.$initTransformMeasureNodes=function(){var m=function(v,y){return["div",{style:"position: absolute;top:"+v+"px;left:"+y+"px;"}]};this.els=h.buildDom([m(0,0),m(c,0),m(0,c),m(c,c)],this.el)},d.prototype.transformCoordinates=function(m,v){if(m){var y=this.$getZoom(this.el);m=b(1/y,m)}function A(P,W,j){var H=P[1]*W[0]-P[0]*W[1];return[(-W[1]*j[0]+W[0]*j[1])/H,(+P[1]*j[0]-P[0]*j[1])/H]}function S(P,W){return[P[0]-W[0],P[1]-W[1]]}function C(P,W){return[P[0]+W[0],P[1]+W[1]]}function b(P,W){return[P*W[0],P*W[1]]}this.els||this.$initTransformMeasureNodes();function R(P){var W=P.getBoundingClientRect();return[W.left,W.top]}var L=R(this.els[0]),E=R(this.els[1]),M=R(this.els[2]),$=R(this.els[3]),k=A(S($,E),S($,M),S(C(E,M),C($,L))),_=b(1+k[0],S(E,L)),w=b(1+k[1],S(M,L));if(v){var x=v,T=k[0]*x[0]/c+k[1]*x[1]/c+1,O=C(b(x[0],_),b(x[1],w));return C(b(1/T/c,O),L)}var I=S(m,L),F=A(S(_,b(k[0],I)),S(w,b(k[1],I)),I);return b(c,F)},d}();l.prototype.$characterSize={width:0,height:0},u.implement(l.prototype,o),r.FontMetrics=l}),ace.define("ace/css/editor-css",["require","exports","module"],function(n,r,f){f.exports=`
|
1063
1063
|
.ace_br1 {border-top-left-radius : 3px;}
|
1064
1064
|
.ace_br2 {border-top-right-radius : 3px;}
|
1065
1065
|
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
@@ -1716,11 +1716,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
1716
1716
|
width:1px;
|
1717
1717
|
height:1px;
|
1718
1718
|
overflow:hidden;
|
1719
|
-
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/oop"),g=n("../lib/event_emitter").EventEmitter,s=function(){function p(o,i){this.canvas=u.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var a=(o.lastRow+1)*this.lineHeight;a<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var c=this.canvas.getContext("2d");function l($,k){return $.priority<k.priority?-1:$.priority>k.priority?1:0}var d=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),d){var m={info:1,warning:2,error:3};d.forEach(function($){$.priority=m[$.type]||null}),d=d.sort(l);for(var v=this.renderer.session.$foldData,y=0;y<d.length;y++){var A=d[y].row,S=this.compensateFoldRows(A,v),C=Math.round((A-S)*this.lineHeight*this.heightRatio),b=Math.round((A-S)*this.lineHeight*this.heightRatio),x=Math.round(((A-S)*this.lineHeight+this.lineHeight)*this.heightRatio),L=x-b;if(L<this.minDecorationHeight){var E=(b+x)/2|0;E<this.halfMinDecorationHeight?E=this.halfMinDecorationHeight:E+this.halfMinDecorationHeight>this.canvasHeight&&(E=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(E-this.halfMinDecorationHeight),x=Math.round(E+this.halfMinDecorationHeight)}c.fillStyle=i[d[y].type]||null,c.fillRect(0,C,this.canvasWidth,x-b)}}var M=this.renderer.session.selection.getCursor();if(M){var S=this.compensateFoldRows(M.row,v),C=Math.round((M.row-S)*this.lineHeight*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,C,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(o,i){var a=0;if(i&&i.length>0)for(var c=0;c<i.length;c++)o>i[c].start.row&&o<i[c].end.row?a+=o-i[c].start.row:o>=i[c].end.row&&(a+=i[c].end.row-i[c].start.row);return a},p}();h.implement(s.prototype,g),r.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/dom"),g=n("./lib/lang"),s=n("./config"),p=n("./layer/gutter").Gutter,o=n("./layer/marker").Marker,i=n("./layer/text").Text,a=n("./layer/cursor").Cursor,c=n("./scrollbar").HScrollBar,l=n("./scrollbar").VScrollBar,d=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,A=n("./lib/event_emitter").EventEmitter,S=n("./css/editor-css"),C=n("./layer/decorators").Decorator,b=n("./lib/useragent");h.importCssString(S,"ace_editor.css",!1);var x=function(){function L(E,M){var $=this;this.container=E||h.createElement("div"),h.addCssClass(this.container,"ace_editor"),h.HI_DPI&&h.addCssClass(this.container,"ace_hidpi"),this.setTheme(M),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var k=this.$textLayer=new i(this.content);this.canvas=k.element,this.$markerFront=new o(this.content),this.$cursorLayer=new a(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new l(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(_){$.$scrollAnimation||$.session.setScrollTop(_.data-$.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){$.$scrollAnimation||$.session.setScrollLeft(_.data-$.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){$.updateCharacterSize(),$.onResize(!0,$.gutterWidth,$.$size.width,$.$size.height),$._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return L.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),h.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},L.prototype.updateLines=function(E,M,$){if(M===void 0&&(M=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<M&&(this.$changedLines.lastRow=M)):this.$changedLines={firstRow:E,lastRow:M},this.$changedLines.lastRow<this.layerConfig.firstRow)if($)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(E,M,$,k){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var _=this.container;k||(k=_.clientHeight||_.scrollHeight),$||($=_.clientWidth||_.scrollWidth);var w=this.$updateCachedSize(E,M,$,k);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!$&&!k)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(w|this.$changes,!0):this.$loop.schedule(w|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(E,M,$,k){k-=this.$extraHeight||0;var _=0,w=this.$size,R={width:w.width,height:w.height,scrollerHeight:w.scrollerHeight,scrollerWidth:w.scrollerWidth};if(k&&(E||w.height!=k)&&(w.height=k,_|=this.CHANGE_SIZE,w.scrollerHeight=w.height,this.$horizScroll&&(w.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(w.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),$&&(E||w.width!=$)){_|=this.CHANGE_SIZE,w.width=$,M==null&&(M=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=M,h.setStyle(this.scrollBarH.element.style,"left",M+"px"),h.setStyle(this.scroller.style,"left",M+this.margin.left+"px"),w.scrollerWidth=Math.max(0,$-M-this.scrollBarV.getWidth()-this.margin.h),h.setStyle(this.$gutter.style,"left",this.margin.left+"px");var T=this.scrollBarV.getWidth()+"px";h.setStyle(this.scrollBarH.element.style,"right",T),h.setStyle(this.scroller.style,"right",T),h.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(w.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(_|=this.CHANGE_FULL)}return w.$dirty=!$||!k,_&&this._signal("resize",R),_},L.prototype.onGutterResize=function(E){var M=this.$showGutter?E:0;M!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,M,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},L.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(M,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},L.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},L.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=h.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=h.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var M=this.$printMarginEl.style;M.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",M.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,M=this.$composition;if(!this.$keepTextAreaAtCursor&&!M){h.translate(this.textarea,-100,0);return}var $=this.$cursorLayer.$pixelPos;if($){M&&M.markerRange&&($=this.$cursorLayer.getPixelPosition(M.markerRange.start,!0));var k=this.layerConfig,_=$.top,w=$.left;_-=k.offset;var R=M&&M.useTextareaForIME||b.isMobile?this.lineHeight:1;if(_<0||_>k.height-R){h.translate(this.textarea,0,0);return}var T=1,O=this.$size.height-R;if(!M)_+=this.lineHeight;else if(M.useTextareaForIME){var I=this.textarea.value;T=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else _+=this.lineHeight+2;w-=this.scrollLeft,w>this.$size.scrollerWidth-T&&(w=this.$size.scrollerWidth-T),w+=this.gutterWidth+this.margin.left,h.setStyle(E,"height",R+"px"),h.setStyle(E,"width",T+"px"),h.translate(this.textarea,Math.min(w,this.$size.scrollerWidth-T),Math.min(_,O))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,M=E.lastRow,$=this.session.documentToScreenRow(M,0)*E.lineHeight;return $-this.session.getScrollTop()>E.height-E.lineHeight?M-1:M},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(E,M,$,k){var _=this.scrollMargin;_.top=E|0,_.bottom=M|0,_.right=k|0,_.left=$|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},L.prototype.setMargin=function(E,M,$,k){var _=this.margin;_.top=E|0,_.bottom=M|0,_.right=k|0,_.left=$|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},L.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,M=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(M-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-M&&(E=this.scrollTop+M,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(E,M){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!M){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var $=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),$.firstRow!=this.layerConfig.firstRow&&$.firstRowScreen==this.layerConfig.firstRowScreen){var k=this.scrollTop+($.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;k>0&&(this.scrollTop=k,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}$=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),h.translate(this.content,-this.scrollLeft,-$.offset);var _=$.width+2*this.$padding+"px",w=$.minHeight+"px";h.setStyle(this.content.style,"width",_),h.setStyle(this.content.style,"height",w)}if(E&this.CHANGE_H_SCROLL&&(h.translate(this.content,-this.scrollLeft,-$.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update($):this.$textLayer.scrollLines($),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update($):this.$gutterLayer.scrollLines($)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update($),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update($),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update($),this._signal("afterRender",E)},L.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,M=this.$maxLines*this.lineHeight,$=Math.min(M,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&($+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&$>this.$maxPixelHeight&&($=this.$maxPixelHeight);var k=$<=2*this.lineHeight,_=!k&&E>M;if($!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var w=this.container.clientWidth;this.container.style.height=$+"px",this.$updateCachedSize(!0,this.$gutterWidth,w,$),this.desiredHeight=$,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var E=this.session,M=this.$size,$=M.height<=2*this.lineHeight,k=this.session.getScreenLength(),_=k*this.lineHeight,w=this.$getLongestLine(),R=!$&&(this.$hScrollBarAlwaysVisible||M.scrollerWidth-w-2*this.$padding<0),T=this.$horizScroll!==R;T&&(this.$horizScroll=R,this.scrollBarH.setVisible(R));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=M.scrollerHeight+this.lineHeight,F=!this.$maxLines&&this.$scrollPastEnd?(M.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=F;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,_-M.scrollerHeight+P.bottom))),this.session.setScrollLeft(Math.max(-P.left,Math.min(this.scrollLeft,w+2*this.$padding-M.scrollerWidth+P.right)));var W=!$&&(this.$vScrollBarAlwaysVisible||M.scrollerHeight-_+F<0||this.scrollTop>P.top),j=O!==W;j&&(this.$vScroll=W,this.scrollBarV.setVisible(W));var H=this.scrollTop%this.lineHeight,z=Math.ceil(I/this.lineHeight)-1,K=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),q=K+z,U,X,Y=this.lineHeight;K=E.screenToDocumentRow(K,0);var V=E.getFoldLine(K);V&&(K=V.start.row),U=E.documentToScreenRow(K,0),X=E.getRowLength(K)*Y,q=Math.min(E.screenToDocumentRow(q,0),E.getLength()-1),I=M.scrollerHeight+E.getRowLength(q)*Y+X,H=this.scrollTop-U*Y;var ee=0;return(this.layerConfig.width!=w||T)&&(ee=this.CHANGE_H_SCROLL),(T||j)&&(ee|=this.$updateCachedSize(!0,this.gutterWidth,M.width,M.height),this._signal("scrollbarVisibilityChanged"),j&&(w=this.$getLongestLine())),this.layerConfig={width:w,padding:this.$padding,firstRow:K,firstRowScreen:U,lastRow:q,lineHeight:Y,characterWidth:this.characterWidth,minHeight:I,maxHeight:_,offset:H,gutterOffset:Y?Math.max(0,Math.ceil((H+M.height-M.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(w-this.$padding),ee},L.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,M=this.$changedLines.lastRow;this.$changedLines=null;var $=this.layerConfig;if(!(E>$.lastRow+1)&&!(M<$.firstRow)){if(M===1/0){this.$showGutter&&this.$gutterLayer.update($),this.$textLayer.update($);return}return this.$textLayer.updateLines($,E,M),!0}}},L.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(E,M){this.$gutterLayer.addGutterDecoration(E,M)},L.prototype.removeGutterDecoration=function(E,M){this.$gutterLayer.removeGutterDecoration(E,M)},L.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(E,M,$){this.scrollCursorIntoView(E,$),this.scrollCursorIntoView(M,$)},L.prototype.scrollCursorIntoView=function(E,M,$){if(this.$size.scrollerHeight!==0){var k=this.$cursorLayer.getPixelPosition(E),_=k.left,w=k.top,R=$&&$.top||0,T=$&&$.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+R>w?(M&&O+R>w+this.lineHeight&&(w-=M*this.$size.scrollerHeight),w===0&&(w=-this.scrollMargin.top),this.session.setScrollTop(w)):O+this.$size.scrollerHeight-T<w+this.lineHeight&&(M&&O+this.$size.scrollerHeight-T<w-this.lineHeight&&(w+=M*this.$size.scrollerHeight),this.session.setScrollTop(w+this.lineHeight+T-this.$size.scrollerHeight));var I=this.scrollLeft,F=2*this.layerConfig.characterWidth;_-F<I?(_-=F,_<this.$padding+F&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=F,I+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&_-I<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},L.prototype.alignCursor=function(E,M){typeof E=="number"&&(E={row:E,column:0});var $=this.$cursorLayer.getPixelPosition(E),k=this.$size.scrollerHeight-this.lineHeight,_=$.top-k*(M||0);return this.session.setScrollTop(_),_},L.prototype.$calcSteps=function(E,M){var $=0,k=this.STEPS,_=[],w=function(R,T,O){return O*(Math.pow(R-1,3)+1)+T};for($=0;$<k;++$)_.push(w($/this.STEPS,E,M-E));return _},L.prototype.scrollToLine=function(E,M,$,k){var _=this.$cursorLayer.getPixelPosition({row:E,column:0}),w=_.top;M&&(w-=this.$size.scrollerHeight/2);var R=this.scrollTop;this.session.setScrollTop(w),$!==!1&&this.animateScrolling(R,k)},L.prototype.animateScrolling=function(E,M){var $=this.scrollTop;if(!this.$animatedScroll)return;var k=this;if(E==$)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(E=_[0],E==$))return}var w=k.$calcSteps(E,$);this.$scrollAnimation={from:E,to:$,steps:w},clearInterval(this.$timer),k.session.setScrollTop(w.shift()),k.session.$scrollTop=$;function R(){k.$timer=clearInterval(k.$timer),k.$scrollAnimation=null,k.$stopAnimation=!1,M&&M()}this.$timer=setInterval(function(){if(k.$stopAnimation){R();return}if(!k.session)return clearInterval(k.$timer);w.length?(k.session.setScrollTop(w.shift()),k.session.$scrollTop=$):$!=null?(k.session.$scrollTop=-1,k.session.setScrollTop($),$=null):R()},10)},L.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},L.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(E,M){this.session.setScrollTop(M),this.session.setScrollLeft(E)},L.prototype.scrollBy=function(E,M){M&&this.session.setScrollTop(this.session.getScrollTop()+M),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},L.prototype.isScrollableBy=function(E,M){if(M<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||M>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(E,M){var $;if(this.$hasCssTransforms){$={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([E,M]);E=k[1]-this.gutterWidth-this.margin.left,M=k[0]}else $=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-$.left-this.$padding,w=_/this.characterWidth,R=Math.floor((M+this.scrollTop-$.top)/this.lineHeight),T=this.$blockCursor?Math.floor(w):Math.round(w);return{row:R,column:T,side:w-T>0?1:-1,offsetX:_}},L.prototype.screenToTextCoordinates=function(E,M){var $;if(this.$hasCssTransforms){$={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([E,M]);E=k[1]-this.gutterWidth-this.margin.left,M=k[0]}else $=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-$.left-this.$padding,w=_/this.characterWidth,R=this.$blockCursor?Math.floor(w):Math.round(w),T=Math.floor((M+this.scrollTop-$.top)/this.lineHeight);return this.session.screenToDocumentPosition(T,Math.max(R,0),_)},L.prototype.textToScreenCoordinates=function(E,M){var $=this.scroller.getBoundingClientRect(),k=this.session.documentToScreenPosition(E,M),_=this.$padding+(this.session.$bidiHandler.isBidiRow(k.row,E)?this.session.$bidiHandler.getPosLeft(k.column):Math.round(k.column*this.characterWidth)),w=k.row*this.lineHeight;return{pageX:$.left+_-this.scrollLeft,pageY:$.top+w-this.scrollTop}},L.prototype.visualizeFocus=function(){h.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){h.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(h.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(E){var M=this.session.selection.cursor;this.addToken(E,"composition_placeholder",M.row,M.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),h.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(E,M){var $=this.session.selection.cursor,k=M||{row:$.row,column:$.column};this.removeGhostText();var _=E.split(`
|
1719
|
+
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,f){var u=n("../lib/dom"),h=n("../lib/oop"),g=n("../lib/event_emitter").EventEmitter,s=function(){function p(o,i){this.canvas=u.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return p.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var a=(o.lastRow+1)*this.lineHeight;a<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var c=this.canvas.getContext("2d");function l($,k){return $.priority<k.priority?-1:$.priority>k.priority?1:0}var d=this.renderer.session.$annotations;if(c.clearRect(0,0,this.canvas.width,this.canvas.height),d){var m={info:1,warning:2,error:3};d.forEach(function($){$.priority=m[$.type]||null}),d=d.sort(l);for(var v=this.renderer.session.$foldData,y=0;y<d.length;y++){var A=d[y].row,S=this.compensateFoldRows(A,v),C=Math.round((A-S)*this.lineHeight*this.heightRatio),b=Math.round((A-S)*this.lineHeight*this.heightRatio),R=Math.round(((A-S)*this.lineHeight+this.lineHeight)*this.heightRatio),L=R-b;if(L<this.minDecorationHeight){var E=(b+R)/2|0;E<this.halfMinDecorationHeight?E=this.halfMinDecorationHeight:E+this.halfMinDecorationHeight>this.canvasHeight&&(E=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(E-this.halfMinDecorationHeight),R=Math.round(E+this.halfMinDecorationHeight)}c.fillStyle=i[d[y].type]||null,c.fillRect(0,C,this.canvasWidth,R-b)}}var M=this.renderer.session.selection.getCursor();if(M){var S=this.compensateFoldRows(M.row,v),C=Math.round((M.row-S)*this.lineHeight*this.heightRatio);c.fillStyle="rgba(0, 0, 0, 0.5)",c.fillRect(0,C,this.canvasWidth,2)}},p.prototype.compensateFoldRows=function(o,i){var a=0;if(i&&i.length>0)for(var c=0;c<i.length;c++)o>i[c].start.row&&o<i[c].end.row?a+=o-i[c].start.row:o>=i[c].end.row&&(a+=i[c].end.row-i[c].start.row);return a},p}();h.implement(s.prototype,g),r.Decorator=s}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(n,r,f){var u=n("./lib/oop"),h=n("./lib/dom"),g=n("./lib/lang"),s=n("./config"),p=n("./layer/gutter").Gutter,o=n("./layer/marker").Marker,i=n("./layer/text").Text,a=n("./layer/cursor").Cursor,c=n("./scrollbar").HScrollBar,l=n("./scrollbar").VScrollBar,d=n("./scrollbar_custom").HScrollBar,m=n("./scrollbar_custom").VScrollBar,v=n("./renderloop").RenderLoop,y=n("./layer/font_metrics").FontMetrics,A=n("./lib/event_emitter").EventEmitter,S=n("./css/editor-css"),C=n("./layer/decorators").Decorator,b=n("./lib/useragent");h.importCssString(S,"ace_editor.css",!1);var R=function(){function L(E,M){var $=this;this.container=E||h.createElement("div"),h.addCssClass(this.container,"ace_editor"),h.HI_DPI&&h.addCssClass(this.container,"ace_hidpi"),this.setTheme(M),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new p(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var k=this.$textLayer=new i(this.content);this.canvas=k.element,this.$markerFront=new o(this.content),this.$cursorLayer=new a(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new l(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.on("scroll",function(_){$.$scrollAnimation||$.session.setScrollTop(_.data-$.scrollMargin.top)}),this.scrollBarH.on("scroll",function(_){$.$scrollAnimation||$.session.setScrollLeft(_.data-$.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new y(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(_){$.updateCharacterSize(),$.onResize(!0,$.gutterWidth,$.$size.width,$.$size.height),$._signal("changeCharacterSize",_)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return L.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),h.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},L.prototype.setSession=function(E){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=E,E&&this.scrollMargin.top&&E.getScrollTop()<=0&&E.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(E),this.$markerBack.setSession(E),this.$markerFront.setSession(E),this.$gutterLayer.setSession(E),this.$textLayer.setSession(E),E&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},L.prototype.updateLines=function(E,M,$){if(M===void 0&&(M=1/0),this.$changedLines?(this.$changedLines.firstRow>E&&(this.$changedLines.firstRow=E),this.$changedLines.lastRow<M&&(this.$changedLines.lastRow=M)):this.$changedLines={firstRow:E,lastRow:M},this.$changedLines.lastRow<this.layerConfig.firstRow)if($)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},L.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},L.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},L.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},L.prototype.updateFull=function(E){E?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},L.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},L.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},L.prototype.onResize=function(E,M,$,k){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=E?1:0;var _=this.container;k||(k=_.clientHeight||_.scrollHeight),$||($=_.clientWidth||_.scrollWidth);var w=this.$updateCachedSize(E,M,$,k);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!$&&!k)return this.resizing=0;E&&(this.$gutterLayer.$padding=null),E?this.$renderChanges(w|this.$changes,!0):this.$loop.schedule(w|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},L.prototype.$updateCachedSize=function(E,M,$,k){k-=this.$extraHeight||0;var _=0,w=this.$size,x={width:w.width,height:w.height,scrollerHeight:w.scrollerHeight,scrollerWidth:w.scrollerWidth};if(k&&(E||w.height!=k)&&(w.height=k,_|=this.CHANGE_SIZE,w.scrollerHeight=w.height,this.$horizScroll&&(w.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(w.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",_=_|this.CHANGE_SCROLL),$&&(E||w.width!=$)){_|=this.CHANGE_SIZE,w.width=$,M==null&&(M=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=M,h.setStyle(this.scrollBarH.element.style,"left",M+"px"),h.setStyle(this.scroller.style,"left",M+this.margin.left+"px"),w.scrollerWidth=Math.max(0,$-M-this.scrollBarV.getWidth()-this.margin.h),h.setStyle(this.$gutter.style,"left",this.margin.left+"px");var T=this.scrollBarV.getWidth()+"px";h.setStyle(this.scrollBarH.element.style,"right",T),h.setStyle(this.scroller.style,"right",T),h.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(w.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||E)&&(_|=this.CHANGE_FULL)}return w.$dirty=!$||!k,_&&this._signal("resize",x),_},L.prototype.onGutterResize=function(E){var M=this.$showGutter?E:0;M!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,M,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},L.prototype.adjustWrapLimit=function(){var E=this.$size.scrollerWidth-this.$padding*2,M=Math.floor(E/this.characterWidth);return this.session.adjustWrapLimit(M,this.$showPrintMargin&&this.$printMarginColumn)},L.prototype.setAnimatedScroll=function(E){this.setOption("animatedScroll",E)},L.prototype.getAnimatedScroll=function(){return this.$animatedScroll},L.prototype.setShowInvisibles=function(E){this.setOption("showInvisibles",E),this.session.$bidiHandler.setShowInvisibles(E)},L.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},L.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},L.prototype.setDisplayIndentGuides=function(E){this.setOption("displayIndentGuides",E)},L.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},L.prototype.setHighlightIndentGuides=function(E){this.setOption("highlightIndentGuides",E)},L.prototype.setShowPrintMargin=function(E){this.setOption("showPrintMargin",E)},L.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},L.prototype.setPrintMarginColumn=function(E){this.setOption("printMarginColumn",E)},L.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},L.prototype.getShowGutter=function(){return this.getOption("showGutter")},L.prototype.setShowGutter=function(E){return this.setOption("showGutter",E)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.setFadeFoldWidgets=function(E){this.setOption("fadeFoldWidgets",E)},L.prototype.setHighlightGutterLine=function(E){this.setOption("highlightGutterLine",E)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var E=h.createElement("div");E.className="ace_layer ace_print-margin-layer",this.$printMarginEl=h.createElement("div"),this.$printMarginEl.className="ace_print-margin",E.appendChild(this.$printMarginEl),this.content.insertBefore(E,this.content.firstChild)}var M=this.$printMarginEl.style;M.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",M.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},L.prototype.getContainerElement=function(){return this.container},L.prototype.getMouseEventTarget=function(){return this.scroller},L.prototype.getTextAreaContainer=function(){return this.container},L.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var E=this.textarea.style,M=this.$composition;if(!this.$keepTextAreaAtCursor&&!M){h.translate(this.textarea,-100,0);return}var $=this.$cursorLayer.$pixelPos;if($){M&&M.markerRange&&($=this.$cursorLayer.getPixelPosition(M.markerRange.start,!0));var k=this.layerConfig,_=$.top,w=$.left;_-=k.offset;var x=M&&M.useTextareaForIME||b.isMobile?this.lineHeight:1;if(_<0||_>k.height-x){h.translate(this.textarea,0,0);return}var T=1,O=this.$size.height-x;if(!M)_+=this.lineHeight;else if(M.useTextareaForIME){var I=this.textarea.value;T=this.characterWidth*this.session.$getStringScreenWidth(I)[0]}else _+=this.lineHeight+2;w-=this.scrollLeft,w>this.$size.scrollerWidth-T&&(w=this.$size.scrollerWidth-T),w+=this.gutterWidth+this.margin.left,h.setStyle(E,"height",x+"px"),h.setStyle(E,"width",T+"px"),h.translate(this.textarea,Math.min(w,this.$size.scrollerWidth-T),Math.min(_,O))}}},L.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},L.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},L.prototype.getLastFullyVisibleRow=function(){var E=this.layerConfig,M=E.lastRow,$=this.session.documentToScreenRow(M,0)*E.lineHeight;return $-this.session.getScrollTop()>E.height-E.lineHeight?M-1:M},L.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},L.prototype.setPadding=function(E){this.$padding=E,this.$textLayer.setPadding(E),this.$cursorLayer.setPadding(E),this.$markerFront.setPadding(E),this.$markerBack.setPadding(E),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},L.prototype.setScrollMargin=function(E,M,$,k){var _=this.scrollMargin;_.top=E|0,_.bottom=M|0,_.right=k|0,_.left=$|0,_.v=_.top+_.bottom,_.h=_.left+_.right,_.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-_.top),this.updateFull()},L.prototype.setMargin=function(E,M,$,k){var _=this.margin;_.top=E|0,_.bottom=M|0,_.right=k|0,_.left=$|0,_.v=_.top+_.bottom,_.h=_.left+_.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},L.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},L.prototype.setHScrollBarAlwaysVisible=function(E){this.setOption("hScrollBarAlwaysVisible",E)},L.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},L.prototype.setVScrollBarAlwaysVisible=function(E){this.setOption("vScrollBarAlwaysVisible",E)},L.prototype.$updateScrollBarV=function(){var E=this.layerConfig.maxHeight,M=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(E-=(M-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>E-M&&(E=this.scrollTop+M,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(E+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},L.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},L.prototype.freeze=function(){this.$frozen=!0},L.prototype.unfreeze=function(){this.$frozen=!1},L.prototype.$renderChanges=function(E,M){if(this.$changes&&(E|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!E&&!M){this.$changes|=E;return}if(this.$size.$dirty)return this.$changes|=E,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",E),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var $=this.layerConfig;if(E&this.CHANGE_FULL||E&this.CHANGE_SIZE||E&this.CHANGE_TEXT||E&this.CHANGE_LINES||E&this.CHANGE_SCROLL||E&this.CHANGE_H_SCROLL){if(E|=this.$computeLayerConfig()|this.$loop.clear(),$.firstRow!=this.layerConfig.firstRow&&$.firstRowScreen==this.layerConfig.firstRowScreen){var k=this.scrollTop+($.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;k>0&&(this.scrollTop=k,E=E|this.CHANGE_SCROLL,E|=this.$computeLayerConfig()|this.$loop.clear())}$=this.layerConfig,this.$updateScrollBarV(),E&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),h.translate(this.content,-this.scrollLeft,-$.offset);var _=$.width+2*this.$padding+"px",w=$.minHeight+"px";h.setStyle(this.content.style,"width",_),h.setStyle(this.content.style,"height",w)}if(E&this.CHANGE_H_SCROLL&&(h.translate(this.content,-this.scrollLeft,-$.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),E&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}if(E&this.CHANGE_SCROLL){this.$changedLines=null,E&this.CHANGE_TEXT||E&this.CHANGE_LINES?this.$textLayer.update($):this.$textLayer.scrollLines($),this.$showGutter&&(E&this.CHANGE_GUTTER||E&this.CHANGE_LINES?this.$gutterLayer.update($):this.$gutterLayer.scrollLines($)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($),this.$markerBack.update($),this.$markerFront.update($),this.$cursorLayer.update($),this.$moveTextAreaToCursor(),this._signal("afterRender",E);return}E&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update($),this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_LINES?((this.$updateLines()||E&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_TEXT||E&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)):E&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight($),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators($)),E&this.CHANGE_CURSOR&&(this.$cursorLayer.update($),this.$moveTextAreaToCursor()),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update($),E&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update($),this._signal("afterRender",E)},L.prototype.$autosize=function(){var E=this.session.getScreenLength()*this.lineHeight,M=this.$maxLines*this.lineHeight,$=Math.min(M,Math.max((this.$minLines||1)*this.lineHeight,E))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&($+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&$>this.$maxPixelHeight&&($=this.$maxPixelHeight);var k=$<=2*this.lineHeight,_=!k&&E>M;if($!=this.desiredHeight||this.$size.height!=this.desiredHeight||_!=this.$vScroll){_!=this.$vScroll&&(this.$vScroll=_,this.scrollBarV.setVisible(_));var w=this.container.clientWidth;this.container.style.height=$+"px",this.$updateCachedSize(!0,this.$gutterWidth,w,$),this.desiredHeight=$,this._signal("autosize")}},L.prototype.$computeLayerConfig=function(){var E=this.session,M=this.$size,$=M.height<=2*this.lineHeight,k=this.session.getScreenLength(),_=k*this.lineHeight,w=this.$getLongestLine(),x=!$&&(this.$hScrollBarAlwaysVisible||M.scrollerWidth-w-2*this.$padding<0),T=this.$horizScroll!==x;T&&(this.$horizScroll=x,this.scrollBarH.setVisible(x));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var I=M.scrollerHeight+this.lineHeight,F=!this.$maxLines&&this.$scrollPastEnd?(M.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;_+=F;var P=this.scrollMargin;this.session.setScrollTop(Math.max(-P.top,Math.min(this.scrollTop,_-M.scrollerHeight+P.bottom))),this.session.setScrollLeft(Math.max(-P.left,Math.min(this.scrollLeft,w+2*this.$padding-M.scrollerWidth+P.right)));var W=!$&&(this.$vScrollBarAlwaysVisible||M.scrollerHeight-_+F<0||this.scrollTop>P.top),j=O!==W;j&&(this.$vScroll=W,this.scrollBarV.setVisible(W));var H=this.scrollTop%this.lineHeight,z=Math.ceil(I/this.lineHeight)-1,K=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),q=K+z,U,X,Y=this.lineHeight;K=E.screenToDocumentRow(K,0);var V=E.getFoldLine(K);V&&(K=V.start.row),U=E.documentToScreenRow(K,0),X=E.getRowLength(K)*Y,q=Math.min(E.screenToDocumentRow(q,0),E.getLength()-1),I=M.scrollerHeight+E.getRowLength(q)*Y+X,H=this.scrollTop-U*Y;var ee=0;return(this.layerConfig.width!=w||T)&&(ee=this.CHANGE_H_SCROLL),(T||j)&&(ee|=this.$updateCachedSize(!0,this.gutterWidth,M.width,M.height),this._signal("scrollbarVisibilityChanged"),j&&(w=this.$getLongestLine())),this.layerConfig={width:w,padding:this.$padding,firstRow:K,firstRowScreen:U,lastRow:q,lineHeight:Y,characterWidth:this.characterWidth,minHeight:I,maxHeight:_,offset:H,gutterOffset:Y?Math.max(0,Math.ceil((H+M.height-M.scrollerHeight)/Y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(w-this.$padding),ee},L.prototype.$updateLines=function(){if(this.$changedLines){var E=this.$changedLines.firstRow,M=this.$changedLines.lastRow;this.$changedLines=null;var $=this.layerConfig;if(!(E>$.lastRow+1)&&!(M<$.firstRow)){if(M===1/0){this.$showGutter&&this.$gutterLayer.update($),this.$textLayer.update($);return}return this.$textLayer.updateLines($,E,M),!0}}},L.prototype.$getLongestLine=function(){var E=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(E+=1),this.$textLayer&&E>this.$textLayer.MAX_LINE_LENGTH&&(E=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(E*this.characterWidth))},L.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},L.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},L.prototype.addGutterDecoration=function(E,M){this.$gutterLayer.addGutterDecoration(E,M)},L.prototype.removeGutterDecoration=function(E,M){this.$gutterLayer.removeGutterDecoration(E,M)},L.prototype.updateBreakpoints=function(E){this._rows=E,this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.setAnnotations=function(E){this.$gutterLayer.setAnnotations(E),this.$loop.schedule(this.CHANGE_GUTTER)},L.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},L.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},L.prototype.showCursor=function(){this.$cursorLayer.showCursor()},L.prototype.scrollSelectionIntoView=function(E,M,$){this.scrollCursorIntoView(E,$),this.scrollCursorIntoView(M,$)},L.prototype.scrollCursorIntoView=function(E,M,$){if(this.$size.scrollerHeight!==0){var k=this.$cursorLayer.getPixelPosition(E),_=k.left,w=k.top,x=$&&$.top||0,T=$&&$.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+x>w?(M&&O+x>w+this.lineHeight&&(w-=M*this.$size.scrollerHeight),w===0&&(w=-this.scrollMargin.top),this.session.setScrollTop(w)):O+this.$size.scrollerHeight-T<w+this.lineHeight&&(M&&O+this.$size.scrollerHeight-T<w-this.lineHeight&&(w+=M*this.$size.scrollerHeight),this.session.setScrollTop(w+this.lineHeight+T-this.$size.scrollerHeight));var I=this.scrollLeft,F=2*this.layerConfig.characterWidth;_-F<I?(_-=F,_<this.$padding+F&&(_=-this.scrollMargin.left),this.session.setScrollLeft(_)):(_+=F,I+this.$size.scrollerWidth<_+this.characterWidth?this.session.setScrollLeft(Math.round(_+this.characterWidth-this.$size.scrollerWidth)):I<=this.$padding&&_-I<this.characterWidth&&this.session.setScrollLeft(0))}},L.prototype.getScrollTop=function(){return this.session.getScrollTop()},L.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},L.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},L.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},L.prototype.scrollToRow=function(E){this.session.setScrollTop(E*this.lineHeight)},L.prototype.alignCursor=function(E,M){typeof E=="number"&&(E={row:E,column:0});var $=this.$cursorLayer.getPixelPosition(E),k=this.$size.scrollerHeight-this.lineHeight,_=$.top-k*(M||0);return this.session.setScrollTop(_),_},L.prototype.$calcSteps=function(E,M){var $=0,k=this.STEPS,_=[],w=function(x,T,O){return O*(Math.pow(x-1,3)+1)+T};for($=0;$<k;++$)_.push(w($/this.STEPS,E,M-E));return _},L.prototype.scrollToLine=function(E,M,$,k){var _=this.$cursorLayer.getPixelPosition({row:E,column:0}),w=_.top;M&&(w-=this.$size.scrollerHeight/2);var x=this.scrollTop;this.session.setScrollTop(w),$!==!1&&this.animateScrolling(x,k)},L.prototype.animateScrolling=function(E,M){var $=this.scrollTop;if(!this.$animatedScroll)return;var k=this;if(E==$)return;if(this.$scrollAnimation){var _=this.$scrollAnimation.steps;if(_.length&&(E=_[0],E==$))return}var w=k.$calcSteps(E,$);this.$scrollAnimation={from:E,to:$,steps:w},clearInterval(this.$timer),k.session.setScrollTop(w.shift()),k.session.$scrollTop=$;function x(){k.$timer=clearInterval(k.$timer),k.$scrollAnimation=null,k.$stopAnimation=!1,M&&M()}this.$timer=setInterval(function(){if(k.$stopAnimation){x();return}if(!k.session)return clearInterval(k.$timer);w.length?(k.session.setScrollTop(w.shift()),k.session.$scrollTop=$):$!=null?(k.session.$scrollTop=-1,k.session.setScrollTop($),$=null):x()},10)},L.prototype.scrollToY=function(E){this.scrollTop!==E&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=E)},L.prototype.scrollToX=function(E){this.scrollLeft!==E&&(this.scrollLeft=E),this.$loop.schedule(this.CHANGE_H_SCROLL)},L.prototype.scrollTo=function(E,M){this.session.setScrollTop(M),this.session.setScrollLeft(E)},L.prototype.scrollBy=function(E,M){M&&this.session.setScrollTop(this.session.getScrollTop()+M),E&&this.session.setScrollLeft(this.session.getScrollLeft()+E)},L.prototype.isScrollableBy=function(E,M){if(M<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||M>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||E<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||E>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},L.prototype.pixelToScreenCoordinates=function(E,M){var $;if(this.$hasCssTransforms){$={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([E,M]);E=k[1]-this.gutterWidth-this.margin.left,M=k[0]}else $=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-$.left-this.$padding,w=_/this.characterWidth,x=Math.floor((M+this.scrollTop-$.top)/this.lineHeight),T=this.$blockCursor?Math.floor(w):Math.round(w);return{row:x,column:T,side:w-T>0?1:-1,offsetX:_}},L.prototype.screenToTextCoordinates=function(E,M){var $;if(this.$hasCssTransforms){$={top:0,left:0};var k=this.$fontMetrics.transformCoordinates([E,M]);E=k[1]-this.gutterWidth-this.margin.left,M=k[0]}else $=this.scroller.getBoundingClientRect();var _=E+this.scrollLeft-$.left-this.$padding,w=_/this.characterWidth,x=this.$blockCursor?Math.floor(w):Math.round(w),T=Math.floor((M+this.scrollTop-$.top)/this.lineHeight);return this.session.screenToDocumentPosition(T,Math.max(x,0),_)},L.prototype.textToScreenCoordinates=function(E,M){var $=this.scroller.getBoundingClientRect(),k=this.session.documentToScreenPosition(E,M),_=this.$padding+(this.session.$bidiHandler.isBidiRow(k.row,E)?this.session.$bidiHandler.getPosLeft(k.column):Math.round(k.column*this.characterWidth)),w=k.row*this.lineHeight;return{pageX:$.left+_-this.scrollLeft,pageY:$.top+w-this.scrollTop}},L.prototype.visualizeFocus=function(){h.addCssClass(this.container,"ace_focus")},L.prototype.visualizeBlur=function(){h.removeCssClass(this.container,"ace_focus")},L.prototype.showComposition=function(E){this.$composition=E,E.cssText||(E.cssText=this.textarea.style.cssText),E.useTextareaForIME==null&&(E.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(h.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):E.markerId=this.session.addMarker(E.markerRange,"ace_composition_marker","text")},L.prototype.setCompositionText=function(E){var M=this.session.selection.cursor;this.addToken(E,"composition_placeholder",M.row,M.column),this.$moveTextAreaToCursor()},L.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),h.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var E=this.session.selection.cursor;this.removeExtraToken(E.row,E.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},L.prototype.setGhostText=function(E,M){var $=this.session.selection.cursor,k=M||{row:$.row,column:$.column};this.removeGhostText();var _=E.split(`
|
1720
1720
|
`);if(this.addToken(_[0],"ghost_text",k.row,k.column),this.$ghostText={text:E,position:{row:k.row,column:k.column}},_.length>1){this.$ghostTextWidget={text:_.slice(1).join(`
|
1721
|
-
`),row:k.row,column:k.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var w=this.$cursorLayer.getPixelPosition(k,!0),R=this.container,T=R.getBoundingClientRect().height,O=_.length*this.lineHeight,I=O<T-w.top;if(I)return;O<T?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollBy(0,w.top)}},L.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(E,M,$,k){var _=this.session;_.bgTokenizer.lines[$]=null;var w={type:M,value:E},R=_.getTokens($);if(k==null||!R.length)R.push(w);else for(var T=0,O=0;O<R.length;O++){var I=R[O];if(T+=I.value.length,k<=T){var F=I.value.length-(T-k),P=I.value.slice(0,F),W=I.value.slice(F);R.splice(O,1,{type:I.type,value:P},w,{type:I.type,value:W});break}}this.updateLines($,$)},L.prototype.removeExtraToken=function(E,M){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},L.prototype.setTheme=function(E,M){var $=this;if(this.$themeId=E,$._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var k=E||this.$options.theme.initialValue;s.loadModule(["theme",k],_)}else _(E);function _(w){if($.$themeId!=E)return M&&M();if(!w||!w.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");w.$id&&($.$themeId=w.$id),h.importCssString(w.cssText,w.cssClass,$.container),$.theme&&h.removeCssClass($.container,$.theme.cssClass);var R="padding"in w?w.padding:"padding"in($.theme||{})?4:$.$padding;$.$padding&&R!=$.$padding&&$.setPadding(R),$.$theme=w.cssClass,$.theme=w,h.addCssClass($.container,w.cssClass),h.setCssClass($.container,"ace_dark",w.isDark),$.$size&&($.$size.width=0,$.$updateSizeAsync()),$._dispatchEvent("themeLoaded",{theme:w}),M&&M()}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(E,M){h.setCssClass(this.container,E,M!==!1)},L.prototype.unsetStyle=function(E){h.removeCssClass(this.container,E)},L.prototype.setCursorStyle=function(E){h.setStyle(this.scroller.style,"cursor",E)},L.prototype.setMouseCursor=function(E){h.setStyle(this.scroller.style,"cursor",E)},L.prototype.attachToShadowRoot=function(){h.importCssString(S,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(E){var M=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,E===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollTop($.data-M.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollLeft($.data-M.scrollMargin.left)}),this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new l(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollTop($.data-M.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollLeft($.data-M.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=g.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(M){var $=M[0].contentRect.width,k=M[0].contentRect.height;Math.abs(E.$size.width-$)>1||Math.abs(E.$size.height-k)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L}();x.prototype.CHANGE_CURSOR=1,x.prototype.CHANGE_MARKER=2,x.prototype.CHANGE_GUTTER=4,x.prototype.CHANGE_SCROLL=8,x.prototype.CHANGE_LINES=16,x.prototype.CHANGE_TEXT=32,x.prototype.CHANGE_SIZE=64,x.prototype.CHANGE_MARKER_BACK=128,x.prototype.CHANGE_MARKER_FRONT=256,x.prototype.CHANGE_FULL=512,x.prototype.CHANGE_H_SCROLL=1024,x.prototype.$changes=0,x.prototype.$padding=null,x.prototype.$frozen=!1,x.prototype.STEPS=8,u.implement(x.prototype,A),s.defineOptions(x.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){h.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),r.VirtualRenderer=x}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,f){var u=n("../lib/oop"),h=n("../lib/net"),g=n("../lib/event_emitter").EventEmitter,s=n("../config");function p(c){var l="importScripts('"+h.qualifyURL(c)+"');";try{return new Blob([l],{type:"application/javascript"})}catch{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new d;return m.append(l),m.getBlob("application/javascript")}}function o(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var l=p(c),d=window.URL||window.webkitURL,m=d.createObjectURL(l);return new Worker(m)}return new Worker(c)}var i=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){u.implement(this,g),this.$createWorkerFromOldConfig=function(c,l,d,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),s.get("packaged")||!n.toUrl)m=m||s.moduleUrl(l,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var A={};c.forEach(function(S){A[S]=y(n.toUrl(S,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:A,module:l,classname:d}),this.$worker},this.onMessage=function(c){var l=c.data;switch(l.type){case"event":this._signal(l.name,{data:l.data});break;case"call":var d=this.callbacks[l.id];d&&(d(l.data),delete this.callbacks[l.id]);break;case"error":this.reportError(l.data);break;case"log":window.console&&console.log&&console.log.apply(console,l.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return h.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,l){this.$worker.postMessage({command:c,args:l})},this.call=function(c,l,d){if(d){var m=this.callbackId++;this.callbacks[m]=d,l.push(m)}this.send(c,l)},this.emit=function(c,l){try{l.data&&l.data.err&&(l.data.err={message:l.data.err.message,stack:l.data.err.stack,code:l.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:l.data}})}catch(d){console.error(d.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(i.prototype);var a=function(c,l,d){var m=null,v=!1,y=Object.create(g),A=[],S=new i({messageBuffer:A,terminate:function(){},postMessage:function(b){A.push(b),m&&(v?setTimeout(C):C())}});S.setEmitSync=function(b){v=b};var C=function(){var b=A.shift();b.command?m[b.command].apply(m,b.args):b.event&&y._signal(b.event,b.data)};return y.postMessage=function(b){S.onMessage({data:b})},y.callback=function(b,x){this.postMessage({type:"call",id:x,data:b})},y.emit=function(b,x){this.postMessage({type:"event",name:b,data:x})},s.loadModule(["worker",l],function(b){for(m=new b[d](y);A.length;)C()}),S};r.UIWorkerClient=a,r.WorkerClient=i,r.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,f){var u=n("./range").Range,h=n("./lib/event_emitter").EventEmitter,g=n("./lib/oop"),s=function(){function p(o,i,a,c,l,d){var m=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=l,this.othersClass=d,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=a;var v=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var o=this,i=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=a.addMarker(new u(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(l){var d=i.createAnchor(l.row,l.column);d.$insertRight=!0,d.detach(),o.others.push(d)}),a.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=o.addMarker(new u(a.row,a.column,a.row,a.column+i.length),i.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},p.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var i=o;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var a=o.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,c=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,l=i.start.column-this.pos.column;if(this.updateAnchors(o),c&&(this.length+=a),c&&!this.session.$fromUndo){if(o.action==="insert")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],v={row:m.row,column:m.column+l};this.doc.insertMergedLines(v,o.lines)}else if(o.action==="remove")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],v={row:m.row,column:m.column+l};this.doc.remove(new u(v.row,v.column,v.row,v.column-a))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,a=function(l,d){i.removeMarker(l.markerId),l.markerId=i.addMarker(new u(l.row,l.column,l.row,l.column+o.length),d,null,!1)};a(this.pos,this.mainClass);for(var c=this.others.length;c--;)a(this.others[c],this.othersClass)}},p.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,a=0;a<i;a++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p}();g.implement(s.prototype,h),r.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent");function g(p,o){return p.row==o.row&&p.column==o.column}function s(p){var o=p.domEvent,i=o.altKey,a=o.shiftKey,c=o.ctrlKey,l=p.getAccelKey(),d=p.getButton();if(c&&h.isMac&&(d=o.button),p.editor.inMultiSelectMode&&d==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!c&&!i&&!l){d===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(d===0){var m=p.editor,v=m.selection,y=m.inMultiSelectMode,A=p.getDocumentPosition(),S=v.getCursor(),C=p.inSelection()||v.isEmpty()&&g(A,S),b=p.x,x=p.y,L=function(W){b=W.clientX,x=W.clientY},E=m.session,M=m.renderer.pixelToScreenCoordinates(b,x),$=M,k;if(m.$mouseHandler.$enableJumpToDef)c&&i||l&&i?k=a?"block":"add":i&&m.$blockSelectEnabled&&(k="block");else if(l&&!i){if(k="add",!y&&a)return}else i&&m.$blockSelectEnabled&&(k="block");if(k&&h.isMac&&o.ctrlKey&&m.$mouseHandler.cancelContextMenu(),k=="add"){if(!y&&C)return;if(!y){var _=v.toOrientedRange();m.addSelectionMarker(_)}var w=v.rangeList.rangeAtPoint(A);m.inVirtualSelectionMode=!0,a&&(w=null,_=v.ranges[0]||_,m.removeSelectionMarker(_)),m.once("mouseup",function(){var W=v.toOrientedRange();w&&W.isEmpty()&&g(w.cursor,W.cursor)?v.substractPoint(W.cursor):(a?v.substractPoint(_.cursor):_&&(m.removeSelectionMarker(_),v.addRange(_)),v.addRange(W)),m.inVirtualSelectionMode=!1})}else if(k=="block"){p.stop(),m.inVirtualSelectionMode=!0;var R,T=[],O=function(){var W=m.renderer.pixelToScreenCoordinates(b,x),j=E.screenToDocumentPosition(W.row,W.column,W.offsetX);g($,W)&&g(j,v.lead)||($=W,m.selection.moveToPosition(j),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(T),T=v.rectangularRangeBlock($,M),m.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=m.$mouseHandler.$clickSelection.clone()),T.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};y&&!l?v.toSingleRange():!y&&l&&(R=v.toOrientedRange(),m.addSelectionMarker(R)),a?M=E.documentToScreenPosition(v.lead):v.moveToPosition(A),$={row:-1,column:-1};var I=function(W){O(),clearInterval(P),m.removeSelectionMarkers(T),T.length||(T=[v.toOrientedRange()]),R&&(m.removeSelectionMarker(R),v.toSingleRange(R));for(var j=0;j<T.length;j++)v.addRange(T[j]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},F=O;u.capture(m.container,L,I);var P=setInterval(function(){F()},20);return p.preventDefault()}}}r.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,f){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(h){h.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(h){h.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(h){h.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(h){h.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(h){h.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(h){h.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(h){h.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(h){h.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(h){h.multiSelect.rangeCount>1?h.multiSelect.joinSelections():h.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(h){h.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(h){h.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(h){h.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(h){h.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(h){return h&&h.inMultiSelectMode}}];var u=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new u(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,f){var u=n("./range_list").RangeList,h=n("./range").Range,g=n("./selection").Selection,s=n("./mouse/multi_select_handler").onMouseDown,p=n("./lib/event"),o=n("./lib/lang"),i=n("./commands/multi_select_commands");r.commands=i.defaultCommands.concat(i.multiSelectCommands);var a=n("./search").Search,c=new a;function l(S,C,b){return c.$options.wrap=!0,c.$options.needle=C,c.$options.backwards=b==-1,c.find(S)}var d=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(S,C){if(S){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(S),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(S);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}S.cursor||(S.cursor=S.end);var x=this.rangeList.add(S);return this.$onAddRange(S),x.length&&this.$onRemoveRange(x),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(S)}},this.toSingleRange=function(S){S=S||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),S&&this.fromOrientedRange(S)},this.substractPoint=function(S){var C=this.rangeList.substractPoint(S);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var S=this.rangeList.merge();S.length&&this.$onRemoveRange(S)},this.$onAddRange=function(S){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(S),this._signal("addRange",{range:S})},this.$onRemoveRange=function(S){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();S.push(C),this.rangeCount=0}for(var b=S.length;b--;){var x=this.ranges.indexOf(S[b]);this.ranges.splice(x,1)}this._signal("removeRange",{ranges:S}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new u,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var S=this.ranges.length?this.ranges:[this.getRange()],C=[],b=0;b<S.length;b++){var x=S[b],L=x.start.row,E=x.end.row;if(L===E)C.push(x.clone());else{for(C.push(new h(L,x.start.column,L,this.session.getLine(L).length));++L<E;)C.push(this.getLineRange(L,!0));C.push(new h(E,0,E,x.end.column))}b==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var b=C.length;b--;)this.addRange(C[b])},this.joinSelections=function(){var S=this.rangeList.ranges,C=S[S.length-1],b=h.fromPoints(S[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var S=this.rangeList.ranges,C=S[S.length-1],b=h.fromPoints(S[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)}else{var x=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(x,L);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(S,C,b){var x=[],L=S.column<C.column;if(L)var E=S.column,M=C.column,$=S.offsetX,k=C.offsetX;else var E=C.column,M=S.column,$=C.offsetX,k=S.offsetX;var _=S.row<C.row;if(_)var w=S.row,R=C.row;else var w=C.row,R=S.row;E<0&&(E=0),w<0&&(w=0),w==R&&(b=!0);for(var T,O=w;O<=R;O++){var I=h.fromPoints(this.session.screenToDocumentPosition(O,E,$),this.session.screenToDocumentPosition(O,M,k));if(I.isEmpty()){if(T&&v(I.end,T))break;T=I.end}I.cursor=L?I.start:I.end,x.push(I)}if(_&&x.reverse(),!b){for(var F=x.length-1;x[F].isEmpty()&&F>0;)F--;if(F>0)for(var P=0;x[P].isEmpty();)P++;for(var W=F;W>=P;W--)x[W].isEmpty()&&x.splice(W,1)}return x}}).call(g.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(S){S.cursor||(S.cursor=S.end);var C=this.getSelectionStyle();return S.marker=this.session.addMarker(S,"ace_selection",C),this.session.$selectionMarkers.push(S),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,S},this.removeSelectionMarker=function(S){if(S.marker){this.session.removeMarker(S.marker);var C=this.session.$selectionMarkers.indexOf(S);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(S){for(var C=this.session.$selectionMarkers,b=S.length;b--;){var x=S[b];if(x.marker){this.session.removeMarker(x.marker);var L=C.indexOf(x);L!=-1&&C.splice(L,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(S){this.addSelectionMarker(S.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(S){this.removeSelectionMarkers(S.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(S){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(S){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(S){var C=S.command,b=S.editor;if(b.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?x=b.forEachSelection(C,S.args):C.multiSelectAction=="forEachLine"?x=b.forEachSelection(C,S.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),x=C.exec(b,S.args||{})):x=C.multiSelectAction(b,S.args||{});else{var x=C.exec(b,S.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return x}},this.forEachSelection=function(S,C,b){if(!this.inVirtualSelectionMode){var x=b&&b.keepOrder,L=b==!0||b&&b.$byLines,E=this.session,M=this.selection,$=M.rangeList,k=(x?M:$).ranges,_;if(!k.length)return S.exec?S.exec(this,C||{}):S(this,C||{});var w=M._eventRegistry;M._eventRegistry={};var R=new g(E);this.inVirtualSelectionMode=!0;for(var T=k.length;T--;){if(L)for(;T>0&&k[T].start.row==k[T-1].end.row;)T--;R.fromOrientedRange(k[T]),R.index=T,this.selection=E.selection=R;var O=S.exec?S.exec(this,C||{}):S(this,C||{});!_&&O!==void 0&&(_=O),R.toOrientedRange(k[T])}R.detach(),this.selection=E.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=w,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var I=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),_}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var S="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,b=[],x=0;x<C.length;x++)b.push(this.session.getTextRange(C[x]));var L=this.session.getDocument().getNewLineCharacter();S=b.join(L),S.length==(b.length-1)*L.length&&(S="")}else this.selection.isEmpty()||(S=this.session.getTextRange(this.getSelectionRange()));return S},this.$checkMultiselectChange=function(S,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var x=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;x.row!=C.row||this.session.$clipPositionToDocument(x.row,x.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(S,C,b){if(C=C||{},C.needle=S||C.needle,C.needle==null){var x=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(x)}this.$search.set(C);var L=this.$search.findAll(this.session);if(!L.length)return 0;var E=this.multiSelect;b||E.toSingleRange(L[0]);for(var M=L.length;M--;)E.addRange(L[M],!0);return x&&E.rangeList.rangeAtPoint(x.start)&&E.addRange(x,!0),L.length},this.selectMoreLines=function(S,C){var b=this.selection.toOrientedRange(),x=b.cursor==b.end,L=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(L.row+S,L.column);if(b.isEmpty())var $=E;else var M=this.session.documentToScreenPosition(x?b.end:b.start),$=this.session.screenToDocumentPosition(M.row+S,M.column);if(x){var k=h.fromPoints(E,$);k.cursor=k.start}else{var k=h.fromPoints($,E);k.cursor=k.end}if(k.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var _=b.cursor;this.selection.addRange(k),_&&this.selection.substractPoint(_)},this.transposeSelections=function(S){for(var C=this.session,b=C.multiSelect,x=b.ranges,L=x.length;L--;){var E=x[L];if(E.isEmpty()){var M=C.getWordRange(E.start.row,E.start.column);E.start.row=M.start.row,E.start.column=M.start.column,E.end.row=M.end.row,E.end.column=M.end.column}}b.mergeOverlappingRanges();for(var $=[],L=x.length;L--;){var E=x[L];$.unshift(C.getTextRange(E))}S<0?$.unshift($.pop()):$.push($.shift());for(var L=x.length;L--;){var E=x[L],k=E.clone();C.replace(E,$[L]),E.start.row=k.start.row,E.start.column=k.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(S,C,b){var x=this.session,L=x.multiSelect,E=L.toOrientedRange();if(!(E.isEmpty()&&(E=x.getWordRange(E.start.row,E.start.column),E.cursor=S==-1?E.start:E.end,this.multiSelect.addRange(E),b))){var M=x.getTextRange(E),$=l(x,M,S);$&&($.cursor=S==-1?$.start:$.end,this.session.unfold($),this.multiSelect.addRange($),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var S=this.session,C=S.multiSelect,b=C.ranges,x=-1,L=b.filter(function(F){if(F.cursor.row==x)return!0;x=F.cursor.row});if(!b.length||L.length==b.length-1){var E=this.selection.getRange(),M=E.start.row,$=E.end.row,k=M==$;if(k){var _=this.session.getLength(),w;do w=this.session.getLine($);while(/[=:]/.test(w)&&++$<_);do w=this.session.getLine(M);while(/[=:]/.test(w)&&--M>0);M<0&&(M=0),$>=_&&($=_-1)}var R=this.session.removeFullLines(M,$);R=this.$reAlignText(R,k),this.session.insert({row:M,column:0},R.join(`
|
1721
|
+
`),row:k.row,column:k.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var w=this.$cursorLayer.getPixelPosition(k,!0),x=this.container,T=x.getBoundingClientRect().height,O=_.length*this.lineHeight,I=O<T-w.top;if(I)return;O<T?this.scrollBy(0,(_.length-1)*this.lineHeight):this.scrollBy(0,w.top)}},L.prototype.removeGhostText=function(){if(this.$ghostText){var E=this.$ghostText.position;this.removeExtraToken(E.row,E.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},L.prototype.addToken=function(E,M,$,k){var _=this.session;_.bgTokenizer.lines[$]=null;var w={type:M,value:E},x=_.getTokens($);if(k==null||!x.length)x.push(w);else for(var T=0,O=0;O<x.length;O++){var I=x[O];if(T+=I.value.length,k<=T){var F=I.value.length-(T-k),P=I.value.slice(0,F),W=I.value.slice(F);x.splice(O,1,{type:I.type,value:P},w,{type:I.type,value:W});break}}this.updateLines($,$)},L.prototype.removeExtraToken=function(E,M){this.session.bgTokenizer.lines[E]=null,this.updateLines(E,E)},L.prototype.setTheme=function(E,M){var $=this;if(this.$themeId=E,$._dispatchEvent("themeChange",{theme:E}),!E||typeof E=="string"){var k=E||this.$options.theme.initialValue;s.loadModule(["theme",k],_)}else _(E);function _(w){if($.$themeId!=E)return M&&M();if(!w||!w.cssClass)throw new Error("couldn't load module "+E+" or it didn't call define");w.$id&&($.$themeId=w.$id),h.importCssString(w.cssText,w.cssClass,$.container),$.theme&&h.removeCssClass($.container,$.theme.cssClass);var x="padding"in w?w.padding:"padding"in($.theme||{})?4:$.$padding;$.$padding&&x!=$.$padding&&$.setPadding(x),$.$theme=w.cssClass,$.theme=w,h.addCssClass($.container,w.cssClass),h.setCssClass($.container,"ace_dark",w.isDark),$.$size&&($.$size.width=0,$.$updateSizeAsync()),$._dispatchEvent("themeLoaded",{theme:w}),M&&M()}},L.prototype.getTheme=function(){return this.$themeId},L.prototype.setStyle=function(E,M){h.setCssClass(this.container,E,M!==!1)},L.prototype.unsetStyle=function(E){h.removeCssClass(this.container,E)},L.prototype.setCursorStyle=function(E){h.setStyle(this.scroller.style,"cursor",E)},L.prototype.setMouseCursor=function(E){h.setStyle(this.scroller.style,"cursor",E)},L.prototype.attachToShadowRoot=function(){h.importCssString(S,"ace_editor.css",this.container)},L.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},L.prototype.$updateCustomScrollbar=function(E){var M=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,E===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollTop($.data-M.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollLeft($.data-M.scrollMargin.left)}),this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new l(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollTop($.data-M.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function($){M.$scrollAnimation||M.session.setScrollLeft($.data-M.scrollMargin.left)}))},L.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var E=this;this.$resizeTimer=g.delayedCall(function(){E.destroyed||E.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(M){var $=M[0].contentRect.width,k=M[0].contentRect.height;Math.abs(E.$size.width-$)>1||Math.abs(E.$size.height-k)>1?E.$resizeTimer.delay():E.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},L}();R.prototype.CHANGE_CURSOR=1,R.prototype.CHANGE_MARKER=2,R.prototype.CHANGE_GUTTER=4,R.prototype.CHANGE_SCROLL=8,R.prototype.CHANGE_LINES=16,R.prototype.CHANGE_TEXT=32,R.prototype.CHANGE_SIZE=64,R.prototype.CHANGE_MARKER_BACK=128,R.prototype.CHANGE_MARKER_FRONT=256,R.prototype.CHANGE_FULL=512,R.prototype.CHANGE_H_SCROLL=1024,R.prototype.$changes=0,R.prototype.$padding=null,R.prototype.$frozen=!1,R.prototype.STEPS=8,u.implement(R.prototype,A),s.defineOptions(R.prototype,"renderer",{useResizeObserver:{set:function(L){!L&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):L&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(L){this.$textLayer.setShowInvisibles(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(L){typeof L=="number"&&(this.$printMarginColumn=L),this.$showPrintMargin=!!L,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(L){this.$gutter.style.display=L?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(L){this.$gutterLayer.$useSvgGutterIcons=L},initialValue:!1},showFoldedAnnotations:{set:function(L){this.$gutterLayer.$showFoldedAnnotations=L},initialValue:!1},fadeFoldWidgets:{set:function(L){h.setCssClass(this.$gutter,"ace_fade-fold-widgets",L)},initialValue:!1},showFoldWidgets:{set:function(L){this.$gutterLayer.setShowFoldWidgets(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(L){this.$textLayer.setDisplayIndentGuides(L)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(L){this.$textLayer.setHighlightIndentGuides(L)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(L){this.$gutterLayer.setHighlightGutterLine(L),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(L){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(L){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(L){typeof L=="number"&&(L=L+"px"),this.container.style.fontSize=L,this.updateFontSize()},initialValue:12},fontFamily:{set:function(L){this.container.style.fontFamily=L,this.updateFontSize()}},maxLines:{set:function(L){this.updateFull()}},minLines:{set:function(L){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(L){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(L){L=+L||0,this.$scrollPastEnd!=L&&(this.$scrollPastEnd=L,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(L){this.$gutterLayer.$fixedWidth=!!L,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(L){this.$updateCustomScrollbar(L)},initialValue:!1},theme:{set:function(L){this.setTheme(L)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),r.VirtualRenderer=R}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,f){var u=n("../lib/oop"),h=n("../lib/net"),g=n("../lib/event_emitter").EventEmitter,s=n("../config");function p(c){var l="importScripts('"+h.qualifyURL(c)+"');";try{return new Blob([l],{type:"application/javascript"})}catch{var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new d;return m.append(l),m.getBlob("application/javascript")}}function o(c){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var l=p(c),d=window.URL||window.webkitURL,m=d.createObjectURL(l);return new Worker(m)}return new Worker(c)}var i=function(c){c.postMessage||(c=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=c,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){u.implement(this,g),this.$createWorkerFromOldConfig=function(c,l,d,m,v){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),s.get("packaged")||!n.toUrl)m=m||s.moduleUrl(l,"worker");else{var y=this.$normalizePath;m=m||y(n.toUrl("ace/worker/worker.js",null,"_"));var A={};c.forEach(function(S){A[S]=y(n.toUrl(S,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(m),v&&this.send("importScripts",v),this.$worker.postMessage({init:!0,tlns:A,module:l,classname:d}),this.$worker},this.onMessage=function(c){var l=c.data;switch(l.type){case"event":this._signal(l.name,{data:l.data});break;case"call":var d=this.callbacks[l.id];d&&(d(l.data),delete this.callbacks[l.id]);break;case"error":this.reportError(l.data);break;case"log":window.console&&console.log&&console.log.apply(console,l.data);break}},this.reportError=function(c){window.console&&console.error&&console.error(c)},this.$normalizePath=function(c){return h.qualifyURL(c)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(c){c.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(c,l){this.$worker.postMessage({command:c,args:l})},this.call=function(c,l,d){if(d){var m=this.callbackId++;this.callbacks[m]=d,l.push(m)}this.send(c,l)},this.emit=function(c,l){try{l.data&&l.data.err&&(l.data.err={message:l.data.err.message,stack:l.data.err.stack,code:l.data.err.code}),this.$worker&&this.$worker.postMessage({event:c,data:{data:l.data}})}catch(d){console.error(d.stack)}},this.attachToDocument=function(c){this.$doc&&this.terminate(),this.$doc=c,this.call("setValue",[c.getValue()]),c.on("change",this.changeListener,!0)},this.changeListener=function(c){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),c.action=="insert"?this.deltaQueue.push(c.start,c.lines):this.deltaQueue.push(c.start,c.end)},this.$sendDeltaQueue=function(){var c=this.deltaQueue;c&&(this.deltaQueue=null,c.length>50&&c.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:c}))}}).call(i.prototype);var a=function(c,l,d){var m=null,v=!1,y=Object.create(g),A=[],S=new i({messageBuffer:A,terminate:function(){},postMessage:function(b){A.push(b),m&&(v?setTimeout(C):C())}});S.setEmitSync=function(b){v=b};var C=function(){var b=A.shift();b.command?m[b.command].apply(m,b.args):b.event&&y._signal(b.event,b.data)};return y.postMessage=function(b){S.onMessage({data:b})},y.callback=function(b,R){this.postMessage({type:"call",id:R,data:b})},y.emit=function(b,R){this.postMessage({type:"event",name:b,data:R})},s.loadModule(["worker",l],function(b){for(m=new b[d](y);A.length;)C()}),S};r.UIWorkerClient=a,r.WorkerClient=i,r.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,f){var u=n("./range").Range,h=n("./lib/event_emitter").EventEmitter,g=n("./lib/oop"),s=function(){function p(o,i,a,c,l,d){var m=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=l,this.othersClass=d,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=c,this.$onCursorChange=function(){setTimeout(function(){m.onCursorChange()})},this.$pos=a;var v=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=v.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return p.prototype.setup=function(){var o=this,i=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var c=this.pos;c.$insertRight=!0,c.detach(),c.markerId=a.addMarker(new u(c.row,c.column,c.row,c.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(l){var d=i.createAnchor(l.row,l.column);d.$insertRight=!0,d.detach(),o.others.push(d)}),a.setUndoSelect(!1)},p.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(a){a.markerId=o.addMarker(new u(a.row,a.column,a.row,a.column+i.length),i.othersClass,null,!1)})}},p.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},p.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var i=o;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var a=o.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,c=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,l=i.start.column-this.pos.column;if(this.updateAnchors(o),c&&(this.length+=a),c&&!this.session.$fromUndo){if(o.action==="insert")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],v={row:m.row,column:m.column+l};this.doc.insertMergedLines(v,o.lines)}else if(o.action==="remove")for(var d=this.others.length-1;d>=0;d--){var m=this.others[d],v={row:m.row,column:m.column+l};this.doc.remove(new u(v.row,v.column,v.row,v.column-a))}}this.$updating=!1,this.updateMarkers()}},p.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},p.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,a=function(l,d){i.removeMarker(l.markerId),l.markerId=i.addMarker(new u(l.row,l.column,l.row,l.column+o.length),d,null,!1)};a(this.pos,this.mainClass);for(var c=this.others.length;c--;)a(this.others[c],this.othersClass)}},p.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},p.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},p.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,a=0;a<i;a++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},p}();g.implement(s.prototype,h),r.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,f){var u=n("../lib/event"),h=n("../lib/useragent");function g(p,o){return p.row==o.row&&p.column==o.column}function s(p){var o=p.domEvent,i=o.altKey,a=o.shiftKey,c=o.ctrlKey,l=p.getAccelKey(),d=p.getButton();if(c&&h.isMac&&(d=o.button),p.editor.inMultiSelectMode&&d==2){p.editor.textInput.onContextMenu(p.domEvent);return}if(!c&&!i&&!l){d===0&&p.editor.inMultiSelectMode&&p.editor.exitMultiSelectMode();return}if(d===0){var m=p.editor,v=m.selection,y=m.inMultiSelectMode,A=p.getDocumentPosition(),S=v.getCursor(),C=p.inSelection()||v.isEmpty()&&g(A,S),b=p.x,R=p.y,L=function(W){b=W.clientX,R=W.clientY},E=m.session,M=m.renderer.pixelToScreenCoordinates(b,R),$=M,k;if(m.$mouseHandler.$enableJumpToDef)c&&i||l&&i?k=a?"block":"add":i&&m.$blockSelectEnabled&&(k="block");else if(l&&!i){if(k="add",!y&&a)return}else i&&m.$blockSelectEnabled&&(k="block");if(k&&h.isMac&&o.ctrlKey&&m.$mouseHandler.cancelContextMenu(),k=="add"){if(!y&&C)return;if(!y){var _=v.toOrientedRange();m.addSelectionMarker(_)}var w=v.rangeList.rangeAtPoint(A);m.inVirtualSelectionMode=!0,a&&(w=null,_=v.ranges[0]||_,m.removeSelectionMarker(_)),m.once("mouseup",function(){var W=v.toOrientedRange();w&&W.isEmpty()&&g(w.cursor,W.cursor)?v.substractPoint(W.cursor):(a?v.substractPoint(_.cursor):_&&(m.removeSelectionMarker(_),v.addRange(_)),v.addRange(W)),m.inVirtualSelectionMode=!1})}else if(k=="block"){p.stop(),m.inVirtualSelectionMode=!0;var x,T=[],O=function(){var W=m.renderer.pixelToScreenCoordinates(b,R),j=E.screenToDocumentPosition(W.row,W.column,W.offsetX);g($,W)&&g(j,v.lead)||($=W,m.selection.moveToPosition(j),m.renderer.scrollCursorIntoView(),m.removeSelectionMarkers(T),T=v.rectangularRangeBlock($,M),m.$mouseHandler.$clickSelection&&T.length==1&&T[0].isEmpty()&&(T[0]=m.$mouseHandler.$clickSelection.clone()),T.forEach(m.addSelectionMarker,m),m.updateSelectionMarkers())};y&&!l?v.toSingleRange():!y&&l&&(x=v.toOrientedRange(),m.addSelectionMarker(x)),a?M=E.documentToScreenPosition(v.lead):v.moveToPosition(A),$={row:-1,column:-1};var I=function(W){O(),clearInterval(P),m.removeSelectionMarkers(T),T.length||(T=[v.toOrientedRange()]),x&&(m.removeSelectionMarker(x),v.toSingleRange(x));for(var j=0;j<T.length;j++)v.addRange(T[j]);m.inVirtualSelectionMode=!1,m.$mouseHandler.$clickSelection=null},F=O;u.capture(m.container,L,I);var P=setInterval(function(){F()},20);return p.preventDefault()}}}r.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,f){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(h){h.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(h){h.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(h){h.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(h){h.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(h){h.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(h){h.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(h){h.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(h){h.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(h){h.multiSelect.rangeCount>1?h.multiSelect.joinSelections():h.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(h){h.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(h){h.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(h){h.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(h){h.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(h){return h&&h.inMultiSelectMode}}];var u=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new u(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,f){var u=n("./range_list").RangeList,h=n("./range").Range,g=n("./selection").Selection,s=n("./mouse/multi_select_handler").onMouseDown,p=n("./lib/event"),o=n("./lib/lang"),i=n("./commands/multi_select_commands");r.commands=i.defaultCommands.concat(i.multiSelectCommands);var a=n("./search").Search,c=new a;function l(S,C,b){return c.$options.wrap=!0,c.$options.needle=C,c.$options.backwards=b==-1,c.find(S)}var d=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(d.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(S,C){if(S){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(S),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),C||this.fromOrientedRange(S);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}S.cursor||(S.cursor=S.end);var R=this.rangeList.add(S);return this.$onAddRange(S),R.length&&this.$onRemoveRange(R),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),C||this.fromOrientedRange(S)}},this.toSingleRange=function(S){S=S||this.ranges[0];var C=this.rangeList.removeAll();C.length&&this.$onRemoveRange(C),S&&this.fromOrientedRange(S)},this.substractPoint=function(S){var C=this.rangeList.substractPoint(S);if(C)return this.$onRemoveRange(C),C[0]},this.mergeOverlappingRanges=function(){var S=this.rangeList.merge();S.length&&this.$onRemoveRange(S)},this.$onAddRange=function(S){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(S),this._signal("addRange",{range:S})},this.$onRemoveRange=function(S){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var C=this.rangeList.ranges.pop();S.push(C),this.rangeCount=0}for(var b=S.length;b--;){var R=this.ranges.indexOf(S[b]);this.ranges.splice(R,1)}this._signal("removeRange",{ranges:S}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),C=C||this.ranges[0],C&&!C.isEqual(this.getRange())&&this.fromOrientedRange(C)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new u,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var S=this.ranges.length?this.ranges:[this.getRange()],C=[],b=0;b<S.length;b++){var R=S[b],L=R.start.row,E=R.end.row;if(L===E)C.push(R.clone());else{for(C.push(new h(L,R.start.column,L,this.session.getLine(L).length));++L<E;)C.push(this.getLineRange(L,!0));C.push(new h(E,0,E,R.end.column))}b==0&&!this.isBackwards()&&(C=C.reverse())}this.toSingleRange();for(var b=C.length;b--;)this.addRange(C[b])},this.joinSelections=function(){var S=this.rangeList.ranges,C=S[S.length-1],b=h.fromPoints(S[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var S=this.rangeList.ranges,C=S[S.length-1],b=h.fromPoints(S[0].start,C.end);this.toSingleRange(),this.setSelectionRange(b,C.cursor==C.start)}else{var R=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),E=this.rectangularRangeBlock(R,L);E.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(S,C,b){var R=[],L=S.column<C.column;if(L)var E=S.column,M=C.column,$=S.offsetX,k=C.offsetX;else var E=C.column,M=S.column,$=C.offsetX,k=S.offsetX;var _=S.row<C.row;if(_)var w=S.row,x=C.row;else var w=C.row,x=S.row;E<0&&(E=0),w<0&&(w=0),w==x&&(b=!0);for(var T,O=w;O<=x;O++){var I=h.fromPoints(this.session.screenToDocumentPosition(O,E,$),this.session.screenToDocumentPosition(O,M,k));if(I.isEmpty()){if(T&&v(I.end,T))break;T=I.end}I.cursor=L?I.start:I.end,R.push(I)}if(_&&R.reverse(),!b){for(var F=R.length-1;R[F].isEmpty()&&F>0;)F--;if(F>0)for(var P=0;R[P].isEmpty();)P++;for(var W=F;W>=P;W--)R[W].isEmpty()&&R.splice(W,1)}return R}}).call(g.prototype);var m=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(S){S.cursor||(S.cursor=S.end);var C=this.getSelectionStyle();return S.marker=this.session.addMarker(S,"ace_selection",C),this.session.$selectionMarkers.push(S),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,S},this.removeSelectionMarker=function(S){if(S.marker){this.session.removeMarker(S.marker);var C=this.session.$selectionMarkers.indexOf(S);C!=-1&&this.session.$selectionMarkers.splice(C,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(S){for(var C=this.session.$selectionMarkers,b=S.length;b--;){var R=S[b];if(R.marker){this.session.removeMarker(R.marker);var L=C.indexOf(R);L!=-1&&C.splice(L,1)}}this.session.selectionMarkerCount=C.length},this.$onAddRange=function(S){this.addSelectionMarker(S.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(S){this.removeSelectionMarkers(S.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(S){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(S){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(S){var C=S.command,b=S.editor;if(b.multiSelect){if(C.multiSelectAction)C.multiSelectAction=="forEach"?R=b.forEachSelection(C,S.args):C.multiSelectAction=="forEachLine"?R=b.forEachSelection(C,S.args,!0):C.multiSelectAction=="single"?(b.exitMultiSelectMode(),R=C.exec(b,S.args||{})):R=C.multiSelectAction(b,S.args||{});else{var R=C.exec(b,S.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return R}},this.forEachSelection=function(S,C,b){if(!this.inVirtualSelectionMode){var R=b&&b.keepOrder,L=b==!0||b&&b.$byLines,E=this.session,M=this.selection,$=M.rangeList,k=(R?M:$).ranges,_;if(!k.length)return S.exec?S.exec(this,C||{}):S(this,C||{});var w=M._eventRegistry;M._eventRegistry={};var x=new g(E);this.inVirtualSelectionMode=!0;for(var T=k.length;T--;){if(L)for(;T>0&&k[T].start.row==k[T-1].end.row;)T--;x.fromOrientedRange(k[T]),x.index=T,this.selection=E.selection=x;var O=S.exec?S.exec(this,C||{}):S(this,C||{});!_&&O!==void 0&&(_=O),x.toOrientedRange(k[T])}x.detach(),this.selection=E.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=w,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var I=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),I&&I.from==I.to&&this.renderer.animateScrolling(I.from),_}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var S="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var C=this.multiSelect.rangeList.ranges,b=[],R=0;R<C.length;R++)b.push(this.session.getTextRange(C[R]));var L=this.session.getDocument().getNewLineCharacter();S=b.join(L),S.length==(b.length-1)*L.length&&(S="")}else this.selection.isEmpty()||(S=this.session.getTextRange(this.getSelectionRange()));return S},this.$checkMultiselectChange=function(S,C){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&C==this.multiSelect.anchor)return;var R=C==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;R.row!=C.row||this.session.$clipPositionToDocument(R.row,R.column).column!=C.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(S,C,b){if(C=C||{},C.needle=S||C.needle,C.needle==null){var R=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();C.needle=this.session.getTextRange(R)}this.$search.set(C);var L=this.$search.findAll(this.session);if(!L.length)return 0;var E=this.multiSelect;b||E.toSingleRange(L[0]);for(var M=L.length;M--;)E.addRange(L[M],!0);return R&&E.rangeList.rangeAtPoint(R.start)&&E.addRange(R,!0),L.length},this.selectMoreLines=function(S,C){var b=this.selection.toOrientedRange(),R=b.cursor==b.end,L=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var E=this.session.screenToDocumentPosition(L.row+S,L.column);if(b.isEmpty())var $=E;else var M=this.session.documentToScreenPosition(R?b.end:b.start),$=this.session.screenToDocumentPosition(M.row+S,M.column);if(R){var k=h.fromPoints(E,$);k.cursor=k.start}else{var k=h.fromPoints($,E);k.cursor=k.end}if(k.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(C)var _=b.cursor;this.selection.addRange(k),_&&this.selection.substractPoint(_)},this.transposeSelections=function(S){for(var C=this.session,b=C.multiSelect,R=b.ranges,L=R.length;L--;){var E=R[L];if(E.isEmpty()){var M=C.getWordRange(E.start.row,E.start.column);E.start.row=M.start.row,E.start.column=M.start.column,E.end.row=M.end.row,E.end.column=M.end.column}}b.mergeOverlappingRanges();for(var $=[],L=R.length;L--;){var E=R[L];$.unshift(C.getTextRange(E))}S<0?$.unshift($.pop()):$.push($.shift());for(var L=R.length;L--;){var E=R[L],k=E.clone();C.replace(E,$[L]),E.start.row=k.start.row,E.start.column=k.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(S,C,b){var R=this.session,L=R.multiSelect,E=L.toOrientedRange();if(!(E.isEmpty()&&(E=R.getWordRange(E.start.row,E.start.column),E.cursor=S==-1?E.start:E.end,this.multiSelect.addRange(E),b))){var M=R.getTextRange(E),$=l(R,M,S);$&&($.cursor=S==-1?$.start:$.end,this.session.unfold($),this.multiSelect.addRange($),this.renderer.scrollCursorIntoView(null,.5)),C&&this.multiSelect.substractPoint(E.cursor)}},this.alignCursors=function(){var S=this.session,C=S.multiSelect,b=C.ranges,R=-1,L=b.filter(function(F){if(F.cursor.row==R)return!0;R=F.cursor.row});if(!b.length||L.length==b.length-1){var E=this.selection.getRange(),M=E.start.row,$=E.end.row,k=M==$;if(k){var _=this.session.getLength(),w;do w=this.session.getLine($);while(/[=:]/.test(w)&&++$<_);do w=this.session.getLine(M);while(/[=:]/.test(w)&&--M>0);M<0&&(M=0),$>=_&&($=_-1)}var x=this.session.removeFullLines(M,$);x=this.$reAlignText(x,k),this.session.insert({row:M,column:0},x.join(`
|
1722
1722
|
`)+`
|
1723
|
-
`),k||(E.start.column=0,E.end.column=
|
1723
|
+
`),k||(E.start.column=0,E.end.column=x[x.length-1].length),this.selection.setRange(E)}else{L.forEach(function(F){C.substractPoint(F.cursor)});var T=0,O=1/0,I=b.map(function(F){var P=F.cursor,W=S.getLine(P.row),j=W.substr(P.column).search(/\S/g);return j==-1&&(j=0),P.column>T&&(T=P.column),j<O&&(O=j),j});b.forEach(function(F,P){var W=F.cursor,j=T-W.column,H=I[P]-O;j>H?S.insert(W,o.stringRepeat(" ",j-H)):S.remove(new h(W.row,W.column,W.row,W.column-j+H)),F.start.column=F.end.column=T,F.start.row=F.end.row=W.row,F.cursor=F.end}),C.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(S,C){var b=!0,R=!0,L,E,M;return S.map(function(x){var T=x.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?L==null?(L=T[1].length,E=T[2].length,M=T[3].length,T):(L+E+M!=T[1].length+T[2].length+T[3].length&&(R=!1),L!=T[1].length&&(b=!1),L>T[1].length&&(L=T[1].length),E<T[2].length&&(E=T[2].length),M>T[3].length&&(M=T[3].length),T):[x]}).map(C?k:b?R?_:k:w);function $(x){return o.stringRepeat(" ",x)}function k(x){return x[2]?$(L)+x[2]+$(E-x[2].length+M)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function _(x){return x[2]?$(L+E-x[2].length)+x[2]+$(M)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}function w(x){return x[2]?$(L)+x[2]+$(M)+x[4].replace(/^([=:])\s+/,"$1 "):x[0]}}}).call(m.prototype);function v(S,C){return S.row==C.row&&S.column==C.column}r.onSessionChange=function(S){var C=S.session;C&&!C.multiSelect&&(C.$selectionMarkers=[],C.selection.$initRangeList(),C.multiSelect=C.selection),this.multiSelect=C&&C.multiSelect;var b=S.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),C&&(C.multiSelect.on("addRange",this.$onAddRange),C.multiSelect.on("removeRange",this.$onRemoveRange),C.multiSelect.on("multiSelect",this.$onMultiSelect),C.multiSelect.on("singleSelect",this.$onSingleSelect),C.multiSelect.lead.on("change",this.$checkMultiselectChange),C.multiSelect.anchor.on("change",this.$checkMultiselectChange)),C&&this.inMultiSelectMode!=C.selection.inMultiSelectMode&&(C.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function y(S){S.$multiselectOnSessionChange||(S.$onAddRange=S.$onAddRange.bind(S),S.$onRemoveRange=S.$onRemoveRange.bind(S),S.$onMultiSelect=S.$onMultiSelect.bind(S),S.$onSingleSelect=S.$onSingleSelect.bind(S),S.$multiselectOnSessionChange=r.onSessionChange.bind(S),S.$checkMultiselectChange=S.$checkMultiselectChange.bind(S),S.$multiselectOnSessionChange(S),S.on("changeSession",S.$multiselectOnSessionChange),S.on("mousedown",s),S.commands.addCommands(i.defaultCommands),A(S))}function A(S){if(!S.textInput)return;var C=S.textInput.getElement(),b=!1;p.addListener(C,"keydown",function(L){var E=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);S.$blockSelectEnabled&&E?b||(S.renderer.setMouseCursor("crosshair"),b=!0):b&&R()},S),p.addListener(C,"keyup",R,S),p.addListener(C,"blur",R,S);function R(L){b&&(S.renderer.setMouseCursor(""),b=!1)}}r.MultiSelect=y,n("./config").defineOptions(m.prototype,"editor",{enableMultiselect:{set:function(S){y(this),S?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(S){this.$blockSelectEnabled=S},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,f){var u=n("../../range").Range,h=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(g,s,p){var o=g.getLine(p);return this.foldingStartMarker.test(o)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(g,s,p){return null},this.indentationBlock=function(g,s,p){var o=/\S/,i=g.getLine(s),a=i.search(o);if(a!=-1){for(var c=p||i.length,l=g.getLength(),d=s,m=s;++s<l;){var v=g.getLine(s).search(o);if(v!=-1){if(v<=a){var y=g.getTokenAt(s,0);if(!y||y.type!=="string")break}m=s}}if(m>d){var A=g.getLine(m).length;return new u(d,c,m,A)}}},this.openingBracketBlock=function(g,s,p,o,i){var a={row:p,column:o+1},c=g.$findClosingBracket(s,a,i);if(c){var l=g.foldWidgets[c.row];return l==null&&(l=g.getFoldWidget(c.row)),l=="start"&&c.row>a.row&&(c.row--,c.column=g.getLine(c.row).length),u.fromPoints(a,c)}},this.closingBracketBlock=function(g,s,p,o,i){var a={row:p,column:o},c=g.$findOpeningBracket(s,a);if(c)return c.column++,a.column--,u.fromPoints(c,a)}}).call(h.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,f){var u=n("../line_widgets").LineWidgets,h=n("../lib/dom"),g=n("../range").Range,s=n("../config").nls;function p(i,a,c){for(var l=0,d=i.length-1;l<=d;){var m=l+d>>1,v=c(a,i[m]);if(v>0)l=m+1;else if(v<0)d=m-1;else return m}return-(l+1)}function o(i,a,c){var l=i.getAnnotations().sort(g.comparePoints);if(l.length){var d=p(l,{row:a,column:-1},g.comparePoints);d<0&&(d=-d-1),d>=l.length?d=c>0?0:l.length-1:d===0&&c<0&&(d=l.length-1);var m=l[d];if(!(!m||!c)){if(m.row===a){do m=l[d+=c];while(m&&m.row===a);if(!m)return l.slice()}var v=[];a=m.row;do v[c<0?"unshift":"push"](m),m=l[d+=c];while(m&&m.row==a);return v.length&&v}}}r.showErrorMarker=function(i,a){var c=i.session;c.widgetManager||(c.widgetManager=new u(c),c.widgetManager.attach(i));var l=i.getCursorPosition(),d=l.row,m=c.widgetManager.getWidgetsAtRow(d).filter(function(E){return E.type=="errorMarker"})[0];m?m.destroy():d-=a;var v=o(c,d,a),y;if(v){var A=v[0];l.column=(A.pos&&typeof A.column!="number"?A.pos.sc:A.column)||0,l.row=A.row,y=i.renderer.$gutterLayer.$annotations[l.row]}else{if(m)return;y={text:[s("Looks good!")],className:"ace_ok"}}i.session.unfold(l.row),i.selection.moveToPosition(l);var S={row:l.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},C=S.el.appendChild(h.createElement("div")),b=S.el.appendChild(h.createElement("div"));b.className="error_widget_arrow "+y.className;var R=i.renderer.$cursorLayer.getPixelPosition(l).left;b.style.left=R+i.renderer.gutterWidth-5+"px",S.el.className="error_widget_wrapper",C.className="error_widget "+y.className,C.innerHTML=y.text.join("<br>"),C.appendChild(h.createElement("div"));var L=function(E,M,$){if(M===0&&($==="esc"||$==="return"))return S.destroy(),{command:"null"}};S.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(L),c.widgetManager.removeLineWidget(S),i.off("changeSelection",S.destroy),i.off("changeSession",S.destroy),i.off("mouseup",S.destroy),i.off("change",S.destroy))},i.keyBinding.addKeyboardHandler(L),i.on("changeSelection",S.destroy),i.on("changeSession",S.destroy),i.on("mouseup",S.destroy),i.on("change",S.destroy),i.session.widgetManager.addLineWidget(S),S.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:S.el.offsetHeight})},h.importCssString(`
|
1724
1724
|
.error_widget_wrapper {
|
1725
1725
|
background: inherit;
|
1726
1726
|
color: inherit;
|
@@ -1753,14 +1753,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
1753
1753
|
border-left-color: transparent!important;
|
1754
1754
|
top: -5px;
|
1755
1755
|
}
|
1756
|
-
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,f){n("./loader_build")(r);var u=n("./lib/dom"),h=n("./range").Range,g=n("./editor").Editor,s=n("./edit_session").EditSession,p=n("./undomanager").UndoManager,o=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(i,a){if(typeof i=="string"){var c=i;if(i=document.getElementById(c),!i)throw new Error("ace.edit can't find div #"+c)}if(i&&i.env&&i.env.editor instanceof g)return i.env.editor;var l="";if(i&&/input|textarea/i.test(i.tagName)){var d=i;l=d.value,i=u.createElement("pre"),d.parentNode.replaceChild(i,d)}else i&&(l=i.textContent,i.innerHTML="");var m=r.createEditSession(l),v=new g(new o(i),m,a),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return d&&(y.textarea=d),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},r.createEditSession=function(i,a){var c=new s(i,a);return c.setUndoManager(new p),c},r.Range=h,r.Editor=g,r.EditSession=s,r.UndoManager=p,r.VirtualRenderer=o,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var f in n)n.hasOwnProperty(f)&&(r.ace[f]=n[f]);r.ace.default=r.ace,e&&(e.exports=r.ace)})}()})(dp);var ME=dp.exports;const Ml=rr(ME),OE="/assets/mode-yaml-BC4MIiYj.js",IE="data:application/javascript;base64,YWNlLmRlZmluZSgiYWNlL3RoZW1lL21vbm9rYWktY3NzIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIl0sZnVuY3Rpb24oZSx0LG4pe24uZXhwb3J0cz0iLmFjZS1tb25va2FpIC5hY2VfZ3V0dGVyIHtcbiAgYmFja2dyb3VuZDogIzJGMzEyOTtcbiAgY29sb3I6ICM4RjkwOEFcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfcHJpbnQtbWFyZ2luIHtcbiAgd2lkdGg6IDFweDtcbiAgYmFja2dyb3VuZDogIzU1NTY1MVxufVxuXG4uYWNlLW1vbm9rYWkge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyODIyO1xuICBjb2xvcjogI0Y4RjhGMlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jdXJzb3Ige1xuICBjb2xvcjogI0Y4RjhGMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zZWxlY3Rpb24ge1xuICBiYWNrZ3JvdW5kOiAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaS5hY2VfbXVsdGlzZWxlY3QgLmFjZV9zZWxlY3Rpb24uYWNlX3N0YXJ0IHtcbiAgYm94LXNoYWRvdzogMCAwIDNweCAwcHggIzI3MjgyMjtcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfbWFya2VyLWxheWVyIC5hY2Vfc3RlcCB7XG4gIGJhY2tncm91bmQ6IHJnYigxMDIsIDgyLCAwKVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9icmFja2V0IHtcbiAgbWFyZ2luOiAtMXB4IDAgMCAtMXB4O1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX2FjdGl2ZS1saW5lIHtcbiAgYmFja2dyb3VuZDogIzIwMjAyMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9ndXR0ZXItYWN0aXZlLWxpbmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyNzI3XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX3NlbGVjdGVkLXdvcmQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2ludmlzaWJsZSB7XG4gIGNvbG9yOiAjNTI1MjRkXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfdGFnLFxuLmFjZS1tb25va2FpIC5hY2Vfa2V5d29yZCxcbi5hY2UtbW9ub2thaSAuYWNlX21ldGEuYWNlX3RhZyxcbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2Uge1xuICBjb2xvcjogI0Y5MjY3MlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9wdW5jdHVhdGlvbixcbi5hY2UtbW9ub2thaSAuYWNlX3B1bmN0dWF0aW9uLmFjZV90YWcge1xuICBjb2xvcjogI2ZmZlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2VfY2hhcmFjdGVyLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX2xhbmd1YWdlLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX251bWVyaWMsXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2Vfb3RoZXIge1xuICBjb2xvcjogI0FFODFGRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbnZhbGlkIHtcbiAgY29sb3I6ICNGOEY4RjA7XG4gIGJhY2tncm91bmQtY29sb3I6ICNGOTI2NzJcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfaW52YWxpZC5hY2VfZGVwcmVjYXRlZCB7XG4gIGNvbG9yOiAjRjhGOEYwO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjQUU4MUZGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX2NvbnN0YW50LFxuLmFjZS1tb25va2FpIC5hY2Vfc3VwcG9ydC5hY2VfZnVuY3Rpb24ge1xuICBjb2xvcjogIzY2RDlFRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9mb2xkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI0E2RTIyRTtcbiAgYm9yZGVyLWNvbG9yOiAjRjhGOEYyXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2UuYWNlX3R5cGUsXG4uYWNlLW1vbm9rYWkgLmFjZV9zdXBwb3J0LmFjZV9jbGFzcyxcbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX3R5cGUge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjNjZEOUVGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfZnVuY3Rpb24sXG4uYWNlLW1vbm9rYWkgLmFjZV9lbnRpdHkuYWNlX290aGVyLFxuLmFjZS1tb25va2FpIC5hY2VfZW50aXR5LmFjZV9vdGhlci5hY2VfYXR0cmlidXRlLW5hbWUsXG4uYWNlLW1vbm9rYWkgLmFjZV92YXJpYWJsZSB7XG4gIGNvbG9yOiAjQTZFMjJFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3ZhcmlhYmxlLmFjZV9wYXJhbWV0ZXIge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjRkQ5NzFGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0cmluZyB7XG4gIGNvbG9yOiAjRTZEQjc0XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2NvbW1lbnQge1xuICBjb2xvcjogIzc1NzE1RVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbmRlbnQtZ3VpZGUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJbVdQUTBGRDBaWEJ6ZC93UEFBalZBb3hlU2dOZUFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2luZGVudC1ndWlkZS1hY3RpdmUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJVzJQUTFkWDl6ekJ6NXN6L0FCQ2NCRkZlbnRMbEFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15O1xufVxuIn0pLGFjZS5kZWZpbmUoImFjZS90aGVtZS9tb25va2FpIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIiwiYWNlL3RoZW1lL21vbm9rYWktY3NzIiwiYWNlL2xpYi9kb20iXSxmdW5jdGlvbihlLHQsbil7dC5pc0Rhcms9ITAsdC5jc3NDbGFzcz0iYWNlLW1vbm9rYWkiLHQuY3NzVGV4dD1lKCIuL21vbm9rYWktY3NzIik7dmFyIHI9ZSgiLi4vbGliL2RvbSIpO3IuaW1wb3J0Q3NzU3RyaW5nKHQuY3NzVGV4dCx0LmNzc0NsYXNzLCExKX0pOyAgICAgICAgICAgICAgICAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgYWNlLnJlcXVpcmUoWyJhY2UvdGhlbWUvbW9ub2thaSJdLCBmdW5jdGlvbihtKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbW9kdWxlID09ICJvYmplY3QiICYmIHR5cGVvZiBleHBvcnRzID09ICJvYmplY3QiICYmIG1vZHVsZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBtOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KSgpOwogICAgICAgICAgICA=";Ml.config.setModuleUrl("ace/mode/yaml",OE);Ml.config.setModuleUrl("ace/theme/monokai",IE);var pp=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(f,u){return f[0]===n?(r=u,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),f=this.__entries__[r];return f&&f[1]},t.prototype.set=function(n,r){var f=e(this.__entries__,n);~f?this.__entries__[f][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,f=e(r,n);~f&&r.splice(f,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var f=0,u=this.__entries__;f<u.length;f++){var h=u[f];n.call(r,h[1],h[0])}},t}()}(),ka=typeof window<"u"&&typeof document<"u"&&window.document===document,_o=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),FE=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(_o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),NE=2;function DE(e,t){var n=!1,r=!1,f=0;function u(){n&&(n=!1,e()),r&&g()}function h(){FE(u)}function g(){var s=Date.now();if(n){if(s-f<NE)return;r=!0}else n=!0,r=!1,setTimeout(h,t);f=s}return g}var PE=20,BE=["top","right","bottom","left","width","height","size","weight"],WE=typeof MutationObserver<"u",HE=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=DE(this.refresh.bind(this),PE)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!ka||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),WE?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!ka||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,f=BE.some(function(u){return!!~r.indexOf(u)});f&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),gp=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var f=r[n];Object.defineProperty(e,f,{value:t[f],enumerable:!1,writable:!1,configurable:!0})}return e},Sr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||_o},mp=us(0,0,0,0);function So(e){return parseFloat(e)||0}function xu(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,f){var u=e["border-"+f+"-width"];return r+So(u)},0)}function UE(e){for(var t=["top","right","bottom","left"],n={},r=0,f=t;r<f.length;r++){var u=f[r],h=e["padding-"+u];n[u]=So(h)}return n}function zE(e){var t=e.getBBox();return us(0,0,t.width,t.height)}function VE(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return mp;var r=Sr(e).getComputedStyle(e),f=UE(r),u=f.left+f.right,h=f.top+f.bottom,g=So(r.width),s=So(r.height);if(r.boxSizing==="border-box"&&(Math.round(g+u)!==t&&(g-=xu(r,"left","right")+u),Math.round(s+h)!==n&&(s-=xu(r,"top","bottom")+h)),!GE(e)){var p=Math.round(g+u)-t,o=Math.round(s+h)-n;Math.abs(p)!==1&&(g-=p),Math.abs(o)!==1&&(s-=o)}return us(f.left,f.top,g,s)}var jE=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Sr(e).SVGGraphicsElement}:function(e){return e instanceof Sr(e).SVGElement&&typeof e.getBBox=="function"}}();function GE(e){return e===Sr(e).document.documentElement}function KE(e){return ka?jE(e)?zE(e):VE(e):mp}function YE(e){var t=e.x,n=e.y,r=e.width,f=e.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,h=Object.create(u.prototype);return gp(h,{x:t,y:n,width:r,height:f,top:n,right:t+r,bottom:f+n,left:t}),h}function us(e,t,n,r){return{x:e,y:t,width:n,height:r}}var XE=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=us(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=KE(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),ZE=function(){function e(t,n){var r=YE(n);gp(this,{target:t,contentRect:r})}return e}(),qE=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new pp,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new XE(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new ZE(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),vp=typeof WeakMap<"u"?new WeakMap:new pp,yp=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=HE.getInstance(),r=new qE(t,n,this);vp.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){yp.prototype[e]=function(){var t;return(t=vp.get(this))[e].apply(t,arguments)}});var JE=function(){return typeof _o.ResizeObserver<"u"?_o.ResizeObserver:yp}();const Ru=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],bp=be({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Ru],render(){return Tr("div")},mounted(){const e=this._editor=Fo(Ml.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,e.on("change",()=>{if(this._isSettingContent)return;const t=e.getValue();this._contentBackup=t,this.$emit("update:value",t)}),Ru.forEach(t=>{const n="on"+kr(t);typeof this.$.vnode.props[n]=="function"&&e.on(t,this.$emit.bind(this,t))}),this._ro=new JE(()=>e.resize()),this._ro.observe(this.$el),this.$emit("init",e)},beforeUnmount(){var e,t;(e=this._ro)===null||e===void 0||e.disconnect(),(t=this._editor)===null||t===void 0||t.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(e){if(this._contentBackup!==e){try{this._isSettingContent=!0,this._editor.setValue(e,1)}finally{this._isSettingContent=!1}this._contentBackup=e}},theme(e){this._editor.setTheme("ace/theme/"+e)},options(e){this._editor.setOptions(e)},readonly(e){this._editor.setReadOnly(e)},placeholder(e){this._editor.setOption("placeholder",e)},wrap(e){this._editor.setWrapBehavioursEnabled(e)},printMargin(e){this._editor.setOption("printMargin",e)},lang(e){this._editor.setOption("mode","ace/mode/"+e)},minLines(e){this._editor.setOption("minLines",e)},maxLines(e){this._editor.setOption("maxLines",e)}}}),QE=be({name:"RuleInputForm",components:{VAceEditor:bp},props:{yaml:{type:String,required:!0}},emits:["update-yaml"],setup(e,t){const n=Do(e,"yaml");return Ph(()=>{t.emit("update-yaml",n.value)}),{yamlInput:n}}}),ex={class:"block"};function tx(e,t,n,r,f,u){const h=oe("VAceEditor");return Z(),ie("div",ex,[ae(h,{class:"vue-ace-editor",value:e.yamlInput,"onUpdate:value":t[0]||(t[0]=g=>e.yamlInput=g),lang:"yaml",theme:"monokai",options:{fontSize:16,minLines:6,maxLines:1e4}},null,8,["value"])])}const wp=Se(QE,[["render",tx]]),nx=be({name:"EditRule",components:{InputForm:wp,ErrorMessage:lt},props:{rule:{type:Object,required:!0}},setup(e){const t=Lr(),n=Do(e.rule.yaml),r=C$();return{edit:async()=>{const h=await r.perform({yaml:n.value});t.push({name:"Rule",params:{id:h.id}})},yaml:n,updateYAML:h=>{n.value=h},updateRuleTask:r}}}),rx={class:"block"},ix={class:"is-size-2 block"},ox={class:"field is-grouped is-grouped-centered"},sx={class:"control"},ax={class:"icon is-small"},lx=N("span",null,"Edit",-1),cx={key:0,class:"block"},ux=N("hr",null,null,-1);function hx(e,t,n,r,f,u){var p,o;const h=oe("InputForm"),g=oe("font-awesome-icon"),s=oe("ErrorMessage");return Z(),ie(xe,null,[N("div",rx,[N("h2",ix,"Edit rule: "+ye(e.rule.id),1),ae(h,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=i=>e.yaml=i),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),N("div",ox,[N("p",sx,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...i)=>e.edit&&e.edit(...i))},[N("span",ax,[ae(g,{icon:"edit"})]),lx])])])]),(p=e.updateRuleTask.last)!=null&&p.error?(Z(),ie("div",cx,[ux,ae(s,{error:(o=e.updateRuleTask.last)==null?void 0:o.error},null,8,["error"])])):de("",!0)],64)}const fx=Se(nx,[["render",hx]]),dx=be({name:"EditRuleWrapper",components:{EditRule:fx,Loading:cn,ErrorMessage:lt},props:{id:{type:String,required:!0}},setup(e){const t=zd(),n=async()=>{await t.perform(e.id)};return Ye(async()=>{await n()}),qe(e,async()=>{await n()}),{getRuleTask:t}}});function px(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("EditRule");return Z(),ie(xe,null,[e.getRuleTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getRuleTask.isError?(Z(),_e(g,{key:1,error:(p=e.getRuleTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getRuleTask.last)!=null&&o.value?(Z(),_e(s,{key:2,rule:e.getRuleTask.last.value},null,8,["rule"])):de("",!0)],64)}const gx=Se(dx,[["render",px]]),mx=be({name:"EditRuleView",components:{EditRule:gx},props:{id:{type:String,required:!0}},setup(e){const t=()=>{ln(`Edit rule:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function vx(e,t,n,r,f,u){const h=oe("EditRule",!0);return Z(),_e(h,{id:e.id},null,8,["id"])}const yx=Se(mx,[["render",vx]]);function bx(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e=="string"?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var f=r.reduce(function(g,s){var p=s.match(/\n([\t ]+|(?!\s).)/g);return p?g.concat(p.map(function(o){var i,a;return(a=(i=o.match(/[\t ]/g))===null||i===void 0?void 0:i.length)!==null&&a!==void 0?a:0})):g},[]);if(f.length){var u=new RegExp(`
|
1756
|
+
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,f){n("./loader_build")(r);var u=n("./lib/dom"),h=n("./range").Range,g=n("./editor").Editor,s=n("./edit_session").EditSession,p=n("./undomanager").UndoManager,o=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(i,a){if(typeof i=="string"){var c=i;if(i=document.getElementById(c),!i)throw new Error("ace.edit can't find div #"+c)}if(i&&i.env&&i.env.editor instanceof g)return i.env.editor;var l="";if(i&&/input|textarea/i.test(i.tagName)){var d=i;l=d.value,i=u.createElement("pre"),d.parentNode.replaceChild(i,d)}else i&&(l=i.textContent,i.innerHTML="");var m=r.createEditSession(l),v=new g(new o(i),m,a),y={document:m,editor:v,onResize:v.resize.bind(v,null)};return d&&(y.textarea=d),v.on("destroy",function(){y.editor.container.env=null}),v.container.env=v.env=y,v},r.createEditSession=function(i,a){var c=new s(i,a);return c.setUndoManager(new p),c},r.Range=h,r.Editor=g,r.EditSession=s,r.UndoManager=p,r.VirtualRenderer=o,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=function(){return this}();!r&&typeof window<"u"&&(r=window),!r&&typeof self<"u"&&(r=self),r.ace||(r.ace=n);for(var f in n)n.hasOwnProperty(f)&&(r.ace[f]=n[f]);r.ace.default=r.ace,e&&(e.exports=r.ace)})}()})(dp);var ME=dp.exports;const Ol=nr(ME),OE="/assets/mode-yaml-BC4MIiYj.js",IE="data:application/javascript;base64,YWNlLmRlZmluZSgiYWNlL3RoZW1lL21vbm9rYWktY3NzIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIl0sZnVuY3Rpb24oZSx0LG4pe24uZXhwb3J0cz0iLmFjZS1tb25va2FpIC5hY2VfZ3V0dGVyIHtcbiAgYmFja2dyb3VuZDogIzJGMzEyOTtcbiAgY29sb3I6ICM4RjkwOEFcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfcHJpbnQtbWFyZ2luIHtcbiAgd2lkdGg6IDFweDtcbiAgYmFja2dyb3VuZDogIzU1NTY1MVxufVxuXG4uYWNlLW1vbm9rYWkge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyODIyO1xuICBjb2xvcjogI0Y4RjhGMlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jdXJzb3Ige1xuICBjb2xvcjogI0Y4RjhGMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zZWxlY3Rpb24ge1xuICBiYWNrZ3JvdW5kOiAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaS5hY2VfbXVsdGlzZWxlY3QgLmFjZV9zZWxlY3Rpb24uYWNlX3N0YXJ0IHtcbiAgYm94LXNoYWRvdzogMCAwIDNweCAwcHggIzI3MjgyMjtcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfbWFya2VyLWxheWVyIC5hY2Vfc3RlcCB7XG4gIGJhY2tncm91bmQ6IHJnYigxMDIsIDgyLCAwKVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9icmFja2V0IHtcbiAgbWFyZ2luOiAtMXB4IDAgMCAtMXB4O1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX2FjdGl2ZS1saW5lIHtcbiAgYmFja2dyb3VuZDogIzIwMjAyMFxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9ndXR0ZXItYWN0aXZlLWxpbmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjMjcyNzI3XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX21hcmtlci1sYXllciAuYWNlX3NlbGVjdGVkLXdvcmQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjNDk0ODNFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2ludmlzaWJsZSB7XG4gIGNvbG9yOiAjNTI1MjRkXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfdGFnLFxuLmFjZS1tb25va2FpIC5hY2Vfa2V5d29yZCxcbi5hY2UtbW9ub2thaSAuYWNlX21ldGEuYWNlX3RhZyxcbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2Uge1xuICBjb2xvcjogI0Y5MjY3MlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9wdW5jdHVhdGlvbixcbi5hY2UtbW9ub2thaSAuYWNlX3B1bmN0dWF0aW9uLmFjZV90YWcge1xuICBjb2xvcjogI2ZmZlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2VfY2hhcmFjdGVyLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX2xhbmd1YWdlLFxuLmFjZS1tb25va2FpIC5hY2VfY29uc3RhbnQuYWNlX251bWVyaWMsXG4uYWNlLW1vbm9rYWkgLmFjZV9jb25zdGFudC5hY2Vfb3RoZXIge1xuICBjb2xvcjogI0FFODFGRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbnZhbGlkIHtcbiAgY29sb3I6ICNGOEY4RjA7XG4gIGJhY2tncm91bmQtY29sb3I6ICNGOTI2NzJcbn1cblxuLmFjZS1tb25va2FpIC5hY2VfaW52YWxpZC5hY2VfZGVwcmVjYXRlZCB7XG4gIGNvbG9yOiAjRjhGOEYwO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjQUU4MUZGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX2NvbnN0YW50LFxuLmFjZS1tb25va2FpIC5hY2Vfc3VwcG9ydC5hY2VfZnVuY3Rpb24ge1xuICBjb2xvcjogIzY2RDlFRlxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9mb2xkIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI0E2RTIyRTtcbiAgYm9yZGVyLWNvbG9yOiAjRjhGOEYyXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0b3JhZ2UuYWNlX3R5cGUsXG4uYWNlLW1vbm9rYWkgLmFjZV9zdXBwb3J0LmFjZV9jbGFzcyxcbi5hY2UtbW9ub2thaSAuYWNlX3N1cHBvcnQuYWNlX3R5cGUge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjNjZEOUVGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2VudGl0eS5hY2VfbmFtZS5hY2VfZnVuY3Rpb24sXG4uYWNlLW1vbm9rYWkgLmFjZV9lbnRpdHkuYWNlX290aGVyLFxuLmFjZS1tb25va2FpIC5hY2VfZW50aXR5LmFjZV9vdGhlci5hY2VfYXR0cmlidXRlLW5hbWUsXG4uYWNlLW1vbm9rYWkgLmFjZV92YXJpYWJsZSB7XG4gIGNvbG9yOiAjQTZFMjJFXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3ZhcmlhYmxlLmFjZV9wYXJhbWV0ZXIge1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG4gIGNvbG9yOiAjRkQ5NzFGXG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX3N0cmluZyB7XG4gIGNvbG9yOiAjRTZEQjc0XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2NvbW1lbnQge1xuICBjb2xvcjogIzc1NzE1RVxufVxuXG4uYWNlLW1vbm9rYWkgLmFjZV9pbmRlbnQtZ3VpZGUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJbVdQUTBGRDBaWEJ6ZC93UEFBalZBb3hlU2dOZUFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15XG59XG5cbi5hY2UtbW9ub2thaSAuYWNlX2luZGVudC1ndWlkZS1hY3RpdmUge1xuICBiYWNrZ3JvdW5kOiB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUVrbEVRVlFJVzJQUTFkWDl6ekJ6NXN6L0FCQ2NCRkZlbnRMbEFBQUFBRWxGVGtTdVFtQ0MpIHJpZ2h0IHJlcGVhdC15O1xufVxuIn0pLGFjZS5kZWZpbmUoImFjZS90aGVtZS9tb25va2FpIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIiwiYWNlL3RoZW1lL21vbm9rYWktY3NzIiwiYWNlL2xpYi9kb20iXSxmdW5jdGlvbihlLHQsbil7dC5pc0Rhcms9ITAsdC5jc3NDbGFzcz0iYWNlLW1vbm9rYWkiLHQuY3NzVGV4dD1lKCIuL21vbm9rYWktY3NzIik7dmFyIHI9ZSgiLi4vbGliL2RvbSIpO3IuaW1wb3J0Q3NzU3RyaW5nKHQuY3NzVGV4dCx0LmNzc0NsYXNzLCExKX0pOyAgICAgICAgICAgICAgICAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgYWNlLnJlcXVpcmUoWyJhY2UvdGhlbWUvbW9ub2thaSJdLCBmdW5jdGlvbihtKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbW9kdWxlID09ICJvYmplY3QiICYmIHR5cGVvZiBleHBvcnRzID09ICJvYmplY3QiICYmIG1vZHVsZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlLmV4cG9ydHMgPSBtOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9KSgpOwogICAgICAgICAgICA=";Ol.config.setModuleUrl("ace/mode/yaml",OE);Ol.config.setModuleUrl("ace/theme/monokai",IE);var pp=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(f,u){return f[0]===n?(r=u,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),f=this.__entries__[r];return f&&f[1]},t.prototype.set=function(n,r){var f=e(this.__entries__,n);~f?this.__entries__[f][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,f=e(r,n);~f&&r.splice(f,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var f=0,u=this.__entries__;f<u.length;f++){var h=u[f];n.call(r,h[1],h[0])}},t}()}(),Ea=typeof window<"u"&&typeof document<"u"&&window.document===document,_o=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),FE=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(_o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),NE=2;function DE(e,t){var n=!1,r=!1,f=0;function u(){n&&(n=!1,e()),r&&g()}function h(){FE(u)}function g(){var s=Date.now();if(n){if(s-f<NE)return;r=!0}else n=!0,r=!1,setTimeout(h,t);f=s}return g}var PE=20,BE=["top","right","bottom","left","width","height","size","weight"],WE=typeof MutationObserver<"u",HE=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=DE(this.refresh.bind(this),PE)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Ea||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),WE?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Ea||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,f=BE.some(function(u){return!!~r.indexOf(u)});f&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),gp=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var f=r[n];Object.defineProperty(e,f,{value:t[f],enumerable:!1,writable:!1,configurable:!0})}return e},_r=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||_o},mp=us(0,0,0,0);function So(e){return parseFloat(e)||0}function Ru(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,f){var u=e["border-"+f+"-width"];return r+So(u)},0)}function UE(e){for(var t=["top","right","bottom","left"],n={},r=0,f=t;r<f.length;r++){var u=f[r],h=e["padding-"+u];n[u]=So(h)}return n}function zE(e){var t=e.getBBox();return us(0,0,t.width,t.height)}function VE(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return mp;var r=_r(e).getComputedStyle(e),f=UE(r),u=f.left+f.right,h=f.top+f.bottom,g=So(r.width),s=So(r.height);if(r.boxSizing==="border-box"&&(Math.round(g+u)!==t&&(g-=Ru(r,"left","right")+u),Math.round(s+h)!==n&&(s-=Ru(r,"top","bottom")+h)),!GE(e)){var p=Math.round(g+u)-t,o=Math.round(s+h)-n;Math.abs(p)!==1&&(g-=p),Math.abs(o)!==1&&(s-=o)}return us(f.left,f.top,g,s)}var jE=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof _r(e).SVGGraphicsElement}:function(e){return e instanceof _r(e).SVGElement&&typeof e.getBBox=="function"}}();function GE(e){return e===_r(e).document.documentElement}function KE(e){return Ea?jE(e)?zE(e):VE(e):mp}function YE(e){var t=e.x,n=e.y,r=e.width,f=e.height,u=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,h=Object.create(u.prototype);return gp(h,{x:t,y:n,width:r,height:f,top:n,right:t+r,bottom:f+n,left:t}),h}function us(e,t,n,r){return{x:e,y:t,width:n,height:r}}var XE=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=us(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=KE(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),ZE=function(){function e(t,n){var r=YE(n);gp(this,{target:t,contentRect:r})}return e}(),qE=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new pp,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof _r(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new XE(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof _r(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new ZE(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),vp=typeof WeakMap<"u"?new WeakMap:new pp,yp=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=HE.getInstance(),r=new qE(t,n,this);vp.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){yp.prototype[e]=function(){var t;return(t=vp.get(this))[e].apply(t,arguments)}});var JE=function(){return typeof _o.ResizeObserver<"u"?_o.ResizeObserver:yp}();const xu=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],bp=be({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...xu],render(){return xr("div")},mounted(){const e=this._editor=Fo(Ol.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,e.on("change",()=>{if(this._isSettingContent)return;const t=e.getValue();this._contentBackup=t,this.$emit("update:value",t)}),xu.forEach(t=>{const n="on"+Ar(t);typeof this.$.vnode.props[n]=="function"&&e.on(t,this.$emit.bind(this,t))}),this._ro=new JE(()=>e.resize()),this._ro.observe(this.$el),this.$emit("init",e)},beforeUnmount(){var e,t;(e=this._ro)===null||e===void 0||e.disconnect(),(t=this._editor)===null||t===void 0||t.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(e){if(this._contentBackup!==e){try{this._isSettingContent=!0,this._editor.setValue(e,1)}finally{this._isSettingContent=!1}this._contentBackup=e}},theme(e){this._editor.setTheme("ace/theme/"+e)},options(e){this._editor.setOptions(e)},readonly(e){this._editor.setReadOnly(e)},placeholder(e){this._editor.setOption("placeholder",e)},wrap(e){this._editor.setWrapBehavioursEnabled(e)},printMargin(e){this._editor.setOption("printMargin",e)},lang(e){this._editor.setOption("mode","ace/mode/"+e)},minLines(e){this._editor.setOption("minLines",e)},maxLines(e){this._editor.setOption("maxLines",e)}}}),QE=be({name:"RuleInputForm",components:{VAceEditor:bp},props:{yaml:{type:String,required:!0}},emits:["update-yaml"],setup(e,t){const n=Do(e,"yaml");return Ph(()=>{t.emit("update-yaml",n.value)}),{yamlInput:n}}}),eR={class:"block"};function tR(e,t,n,r,f,u){const h=oe("VAceEditor");return Z(),ie("div",eR,[ae(h,{class:"vue-ace-editor",value:e.yamlInput,"onUpdate:value":t[0]||(t[0]=g=>e.yamlInput=g),lang:"yaml",theme:"monokai",options:{fontSize:16,minLines:6,maxLines:1e4}},null,8,["value"])])}const wp=Se(QE,[["render",tR]]),nR=be({name:"EditRule",components:{InputForm:wp,ErrorMessage:lt},props:{rule:{type:Object,required:!0}},setup(e){const t=Tr(),n=Do(e.rule.yaml),r=C$();return{edit:async()=>{const h=await r.perform({yaml:n.value});t.push({name:"Rule",params:{id:h.id}})},yaml:n,updateYAML:h=>{n.value=h},updateRuleTask:r}}}),rR={class:"block"},iR={class:"is-size-2 block"},oR={class:"field is-grouped is-grouped-centered"},sR={class:"control"},aR={class:"icon is-small"},lR=N("span",null,"Edit",-1),cR={key:0,class:"block"},uR=N("hr",null,null,-1);function hR(e,t,n,r,f,u){var p,o;const h=oe("InputForm"),g=oe("font-awesome-icon"),s=oe("ErrorMessage");return Z(),ie(Re,null,[N("div",rR,[N("h2",iR,"Edit rule: "+ye(e.rule.id),1),ae(h,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=i=>e.yaml=i),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),N("div",oR,[N("p",sR,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...i)=>e.edit&&e.edit(...i))},[N("span",aR,[ae(g,{icon:"edit"})]),lR])])])]),(p=e.updateRuleTask.last)!=null&&p.error?(Z(),ie("div",cR,[uR,ae(s,{error:(o=e.updateRuleTask.last)==null?void 0:o.error},null,8,["error"])])):de("",!0)],64)}const fR=Se(nR,[["render",hR]]),dR=be({name:"EditRuleWrapper",components:{EditRule:fR,Loading:ln,ErrorMessage:lt},props:{id:{type:String,required:!0}},setup(e){const t=zd(),n=async()=>{await t.perform(e.id)};return Ye(async()=>{await n()}),qe(e,async()=>{await n()}),{getRuleTask:t}}});function pR(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("EditRule");return Z(),ie(Re,null,[e.getRuleTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getRuleTask.isError?(Z(),_e(g,{key:1,error:(p=e.getRuleTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getRuleTask.last)!=null&&o.value?(Z(),_e(s,{key:2,rule:e.getRuleTask.last.value},null,8,["rule"])):de("",!0)],64)}const gR=Se(dR,[["render",pR]]),mR=be({name:"EditRuleView",components:{EditRule:gR},props:{id:{type:String,required:!0}},setup(e){const t=()=>{an(`Edit rule:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function vR(e,t,n,r,f,u){const h=oe("EditRule",!0);return Z(),_e(h,{id:e.id},null,8,["id"])}const yR=Se(mR,[["render",vR]]);function bR(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e=="string"?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,"");var f=r.reduce(function(g,s){var p=s.match(/\n([\t ]+|(?!\s).)/g);return p?g.concat(p.map(function(o){var i,a;return(a=(i=o.match(/[\t ]/g))===null||i===void 0?void 0:i.length)!==null&&a!==void 0?a:0})):g},[]);if(f.length){var u=new RegExp(`
|
1757
1757
|
[ ]{`+Math.min.apply(Math,f)+"}","g");r=r.map(function(g){return g.replace(u,`
|
1758
1758
|
`)})}r[0]=r[0].replace(/^\r?\n/,"");var h=r[0];return t.forEach(function(g,s){var p=h.match(/(?:^|\n)( *)$/),o=p?p[1]:"",i=g;typeof g=="string"&&g.includes(`
|
1759
1759
|
`)&&(i=String(g).split(`
|
1760
1760
|
`).map(function(a,c){return c===0?a:""+o+a}).join(`
|
1761
|
-
`)),h+=i+r[s+1]}),h}var Xi,
|
1761
|
+
`)),h+=i+r[s+1]}),h}var Xi,wR=new Uint8Array(16);function $R(){if(!Xi&&(Xi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Xi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xi(wR)}const _R=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function SR(e){return typeof e=="string"&&_R.test(e)}var it=[];for(var Fs=0;Fs<256;++Fs)it.push((Fs+256).toString(16).substr(1));function CR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(it[e[t+0]]+it[e[t+1]]+it[e[t+2]]+it[e[t+3]]+"-"+it[e[t+4]]+it[e[t+5]]+"-"+it[e[t+6]]+it[e[t+7]]+"-"+it[e[t+8]]+it[e[t+9]]+"-"+it[e[t+10]]+it[e[t+11]]+it[e[t+12]]+it[e[t+13]]+it[e[t+14]]+it[e[t+15]]).toLowerCase();if(!SR(n))throw TypeError("Stringified UUID is invalid");return n}function AR(e,t,n){e=e||{};var r=e.random||(e.rng||$R)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var f=0;f<16;++f)t[n+f]=r[f];return t}return CR(r)}function kR(){const e=AR(),t=Mr();return bR`---
|
1762
1762
|
id: ${e}
|
1763
1763
|
title: Title goes here
|
1764
1764
|
description: Description goes here
|
1765
1765
|
created_on: ${t.format("YYYY-MM-DD")}
|
1766
|
-
queries: []`}const Ex=be({name:"NewRule",components:{InputForm:wp,ErrorMessage:lt},setup(){const e=Lr(),t=Fe(kx()),n=S$();return{yaml:t,create:async()=>{const u=await n.perform({yaml:t.value});e.push({name:"Rule",params:{id:u.id}})},updateYAML:u=>{t.value=u},createRuleTask:n}}}),xx={class:"block"},Rx=N("h2",{class:"is-size-2 block"},"New rule",-1),Tx={class:"field is-grouped is-grouped-centered"},Lx={class:"control"},Mx={class:"icon is-small"},Ox=N("span",null,"Create",-1),Ix={key:0,class:"block"},Fx=N("hr",null,null,-1);function Nx(e,t,n,r,f,u){var p,o;const h=oe("InputForm"),g=oe("font-awesome-icon"),s=oe("ErrorMessage");return Z(),ie(xe,null,[N("div",xx,[Rx,ae(h,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=i=>e.yaml=i),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),N("div",Tx,[N("p",Lx,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...i)=>e.create&&e.create(...i))},[N("span",Mx,[ae(g,{icon:"plus"})]),Ox])])])]),(p=e.createRuleTask.last)!=null&&p.error?(Z(),ie("div",Ix,[Fx,ae(s,{error:(o=e.createRuleTask.last)==null?void 0:o.error},null,8,["error"])])):de("",!0)],64)}const Dx=Se(Ex,[["render",Nx]]),Px=be({name:"NewRuleView",components:{NewRule:Dx},setup(){const e=()=>{ln("New rule - Mihari")};Ye(()=>{e()})}});function Bx(e,t,n,r,f,u){const h=oe("NewRule",!0);return Z(),_e(h)}const Wx=Se(Px,[["render",Bx]]),Hx=be({name:"RuleActionButtons",props:{rule:{type:Object,required:!0}},emits:["set-message","set-error","delete"],setup(e,t){const n=ke(()=>`/api/rules/${e.rule.id}`),r=ke(()=>`rule.id:"${e.rule.id}"`),f=$$(),u=_$(),h=ki(),g=kl(),s=async()=>{if(window.confirm(`Are you sure you want to delete ${e.rule.id}?`))try{await f.perform(e.rule.id),t.emit("delete")}catch(i){Ue.isAxiosError(i)&&t.emit("set-error")}},p=async()=>{try{const o=await u.perform(e.rule.id);t.emit("set-message",o)}catch(o){Ue.isAxiosError(o)&&t.emit("set-error",o)}};return Ye(()=>{h.perform({q:r.value,page:1,limit:0}),g.perform({q:r.value,page:1,limit:0})}),{deleteRule:s,searchRule:p,searchRuleTask:u,href:n,getAlertsTask:h,getArtifactsTask:g,q:r}}}),Ux={class:"buttons is-pulled-right"},zx=N("span",null,"Alerts:",-1),Vx={class:"button is-small is-success is-rounded"},jx=N("span",null,"Artifacts:",-1),Gx=["href"],Kx=N("span",null,"JSON",-1),Yx={class:"icon is-small"},Xx=N("span",null,"Search",-1),Zx={class:"icon is-small"},qx=N("span",null,"Edit",-1),Jx={class:"icon is-small"},Qx=N("span",null,"Delete",-1),eR={class:"icon is-small"};function tR(e,t,n,r,f,u){var s,p;const h=oe("router-link"),g=oe("font-awesome-icon");return Z(),ie("span",Ux,[ae(h,{class:"button is-warning is-small is-rounded",to:{name:"Alerts",query:{q:e.q}}},{default:Je(()=>{var o,i;return[zx,N("span",null,ye((i=(o=e.getAlertsTask.last)==null?void 0:o.value)==null?void 0:i.total),1)]}),_:1},8,["to"]),N("a",Vx,[jx,N("span",null,ye((p=(s=e.getArtifactsTask.last)==null?void 0:s.value)==null?void 0:p.total),1)]),N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[Kx,N("span",Yx,[ae(g,{icon:"barcode"})])],8,Gx),N("button",{class:"button is-primary is-light is-small",onClick:t[0]||(t[0]=(...o)=>e.searchRule&&e.searchRule(...o))},[Xx,N("span",Zx,[e.searchRuleTask.isRunning?(Z(),_e(g,{key:0,icon:"spinner",spin:""})):(Z(),_e(g,{key:1,icon:"magnifying-glass"}))])]),ae(h,{class:"button is-info is-light is-small",to:{name:"EditRule",params:{id:e.rule.id}}},{default:Je(()=>[qx,N("span",Jx,[ae(g,{icon:"edit"})])]),_:1},8,["to"]),N("button",{class:"button is-light is-small",onClick:t[1]||(t[1]=(...o)=>e.deleteRule&&e.deleteRule(...o))},[Qx,N("span",eR,[ae(g,{icon:"times"})])])])}const $p=Se(Hx,[["render",tR]]),nR=be({name:"YAML",components:{VAceEditor:bp},props:{yaml:{type:String,required:!0}},setup(){}}),rR={class:"block"};function iR(e,t,n,r,f,u){const h=oe("VAceEditor");return Z(),ie("div",rR,[ae(h,{class:"vue-ace-editor",value:e.yaml,lang:"yaml",theme:"monokai",options:{readOnly:!0,fontSize:16,maxLines:1e4,minLines:6}},null,8,["value"])])}const oR=Se(nR,[["render",iR]]),sR=be({name:"RuleDetailItem",props:{rule:{type:Object,required:!0}},components:{YAML:oR,Alerts:rp,ErrorMessage:lt,Message:cs,ActionButtons:$p},emits:["delete","refresh"],setup(e,t){const n=Fe(),r=Fe();return{onSetMessage:o=>{o.queued?r.value=o:t.emit("refresh")},onDisposeMessage:()=>{r.value=void 0},message:r,onSetError:o=>{n.value=o},error:n,onDisposeError:()=>{n.value=void 0},onDelete:()=>{t.emit("delete")},onRefresh:()=>{t.emit("refresh")}}}}),aR={class:"block"},lR={class:"is-size-2 block"},cR={class:"block is-clearfix"},uR=N("hr",null,null,-1),hR={class:"block"},fR=N("h2",{class:"is-size-2 block"},"Alerts",-1);function dR(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("YAML"),o=oe("Alerts");return Z(),ie(xe,null,[N("div",aR,[N("h2",lR,ye(e.rule.id),1),e.error?(Z(),_e(h,{key:0,class:"mt-3 mb-3",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("p",cR,[ae(s,{rule:e.rule,onSetMessage:e.onSetMessage,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["rule","onSetMessage","onDelete","onSetError"])]),ae(p,{yaml:e.rule.yaml},null,8,["yaml"])]),uR,N("div",hR,[fR,ae(o,{ruleId:e.rule.id},null,8,["ruleId"])])],64)}const pR=Se(sR,[["render",dR]]),gR=be({name:"RuleDetailWrapper",components:{Rule:pR,Loading:cn,ErrorMessage:lt},props:{id:{type:String,required:!0}},setup(e){const t=zd(),n=Lr(),r=async()=>{await t.perform(e.id)},f=async()=>{await r()},u=()=>{n.push("/")};return Ye(async()=>{await r()}),qe(e,async()=>{await r()}),{getRuleTask:t,onRefresh:f,onDelete:u}}});function mR(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Rule");return Z(),ie(xe,null,[e.getRuleTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getRuleTask.isError?(Z(),_e(g,{key:1,error:(p=e.getRuleTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getRuleTask.last)!=null&&o.value?(Z(),_e(s,{key:2,rule:e.getRuleTask.last.value,onRefresh:e.onRefresh,onDelete:e.onDelete},null,8,["rule","onRefresh","onDelete"])):de("",!0)],64)}const vR=Se(gR,[["render",mR]]),yR=be({name:"RuleView",components:{Rule:vR},props:{id:{type:String,required:!0}},setup(e){const t=()=>{ln(`Rule:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function bR(e,t,n,r,f,u){const h=oe("Rule",!0);return Z(),_e(h,{id:e.id},null,8,["id"])}const wR=Se(yR,[["render",bR]]),$R=be({name:"RuleItem",props:{rule:{type:Object,required:!0}},components:{ActionButtons:$p,Tags:El,ErrorMessage:lt,Message:cs},emits:["delete"],setup(e,t){const n=Fe(),r=Fe();return{onSetError:p=>{n.value=p},onDisposeError:()=>{n.value=void 0},onSetMessage:p=>{r.value=p},onDelete:()=>{t.emit("delete")},error:n,message:r,onDisposeMessage:()=>{r.value=void 0}}}}),_R={class:"box"},SR={class:"block"},CR={class:"table is-fullwidth is-completely-borderless"},AR=N("th",null,"Title",-1),kR=N("th",null,"Description",-1),ER={key:0},xR=N("th",null,"Tags",-1),RR=N("p",{class:"block is-clearfix"},null,-1),TR={class:"help"};function LR(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("router-link"),o=oe("Tags");return Z(),ie("div",_R,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",SR,[N("p",null,[ae(s,{rule:e.rule,onSetError:e.onSetError,onDelete:e.onDelete,onSetMessage:e.onSetMessage},null,8,["rule","onSetError","onDelete","onSetMessage"])]),ae(p,{class:"is-size-4",to:{name:"Rule",params:{id:e.rule.id}}},{default:Je(()=>[et(ye(e.rule.id),1)]),_:1},8,["to"])]),N("table",CR,[N("tr",null,[AR,N("td",null,ye(e.rule.title),1)]),N("tr",null,[kR,N("td",null,ye(e.rule.description),1)]),e.rule.tags.length>0?(Z(),ie("tr",ER,[xR,N("td",null,[ae(o,{tags:e.rule.tags},null,8,["tags"])])])):de("",!0)]),RR,N("p",TR,"Created at: "+ye(e.rule.createdAt),1)])}const MR=Se($R,[["render",LR]]),OR=be({name:"RulesItem",props:{rules:{type:Object,required:!0}},components:{Pagination:xl,Rule:MR},emits:["update-page","refresh"],setup(e,t){const n=Fe(),r=h=>{t.emit("update-page",h)},f=()=>{t.emit("update-page",1)},u=ke(()=>e.rules.results.length>0);return{onUpdatePage:r,onRefresh:f,hasRules:u,error:n}}}),IR={key:0,class:"block"},FR={class:"help"},NR={key:1,class:"block"},DR=N("div",{class:"notification is-warning is-light"},"There is no alert to show",-1),PR=[DR];function BR(e,t,n,r,f,u){const h=oe("Rule"),g=oe("Pagination");return e.hasRules?(Z(),ie("div",IR,[(Z(!0),ie(xe,null,$t(e.rules.results,s=>(Z(),_e(h,{rule:s,key:s.id,onRefresh:e.onRefresh,onDelete:e.onRefresh},null,8,["rule","onRefresh","onDelete"]))),128)),ae(g,{currentPage:e.rules.currentPage,total:e.rules.total,pageSize:e.rules.pageSize,onUpdatePage:e.onUpdatePage},null,8,["currentPage","total","pageSize","onUpdatePage"]),N("p",FR,"("+ye(e.rules.total)+" results in total, "+ye(e.rules.results.length)+" shown)",1)])):(Z(),ie("div",NR,PR))}const WR=Se(OR,[["render",BR]]),HR=be({name:"RulesWrapper",components:{Rules:WR,Loading:cn,ErrorMessage:lt},setup(){const e=_r("page","1"),t=_r("q",""),n=Fe(!1),r=Ud(),f=async()=>{const s={q:t.value,page:parseInt(e.value)};return await r.perform(s)},u=s=>{e.value=s.toString()},h=async()=>{e.value="1",await f()},g=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getRulesTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:g,onUpdatePage:u}}}),UR={class:"block"},zR={class:"field has-addons"},VR={class:"control is-expanded"},jR={class:"control"},GR={class:"icon is-small"},KR=N("span",null,"Search",-1),YR={class:"control"},XR={class:"icon is-small"},ZR=N("span",null,"Help",-1),qR={key:0,class:"content mt-3"},JR=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li> Searchable fields are <code>id</code>, <code>title</code>, <code>description</code>, <code>tag</code>, <code>created_at</code> and <code>updated_at</code>. </li></ul><h4 class="is-size-4">Examples</h4>',3),QR={key:0,class:"block"};function eT(e,t,n,r,f,u){var i,a;const h=oe("font-awesome-icon"),g=oe("router-link"),s=oe("Loading"),p=oe("ErrorMessage"),o=oe("Rules");return Z(),ie(xe,null,[N("div",UR,[N("div",zR,[N("p",VR,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=c=>e.q=c)},null,512),[[qn,e.q]])]),N("p",jR,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...c)=>e.search&&e.search(...c))},[N("span",GR,[ae(h,{icon:"search"})]),KR])]),N("p",YR,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...c)=>e.toggleShowHelp&&e.toggleShowHelp(...c))},[N("span",XR,[ae(h,{icon:"question"})]),ZR])])]),e.showHelp?(Z(),ie("div",qR,[JR,N("ul",null,[N("li",null,[ae(g,{to:{name:"Rules",query:{q:"title:foo AND created_at >= 2020-01-01"}}},{default:Je(()=>[et("title:foo AND created_at >= 2020-01-01")]),_:1})])])])):de("",!0)]),e.getRulesTask.performCount>0?(Z(),ie("div",QR,[e.getRulesTask.isRunning?(Z(),_e(s,{key:0})):de("",!0),e.getRulesTask.isError?(Z(),_e(p,{key:1,error:(i=e.getRulesTask.last)==null?void 0:i.error},null,8,["error"])):de("",!0),(a=e.getRulesTask.last)!=null&&a.value?(Z(),_e(o,{key:2,rules:e.getRulesTask.last.value,onUpdatePage:e.onUpdatePage},null,8,["rules","onUpdatePage"])):de("",!0)])):de("",!0)],64)}const tT=Se(HR,[["render",eT]]),nT=be({name:"RulesView",components:{Rules:tT},setup(){ln("Rules - Mihari")}});function rT(e,t,n,r,f,u){const h=oe("Rules",!0);return Z(),_e(h)}const iT=Se(nT,[["render",rT]]),oT=[{path:"/",name:"Alerts",component:CC},{path:"/alerts/:id",name:"Alert",component:_S,props:!0},{path:"/config",name:"Config",component:LE},{path:"/artifacts/",name:"Artifacts",component:cE},{path:"/artifacts/:id",name:"Artifact",component:Ck,props:!0},{path:"/rules",name:"Rules",component:iT},{path:"/rules/new",name:"NewRule",component:Wx},{path:"/rules/:id",name:"Rule",component:wR,props:!0},{path:"/rules/:id/edit",name:"EditRule",component:yx,props:!0}],sT=v1({history:Ob(),routes:oT});rm.add(cm,Sm,wm,am,_m,hm,om,mm,gm,bm,ym,lm,rh,pm,dm,fm,$m);const _p=jf(pb);_p.component("font-awesome-icon",Q0);_p.use(sT).mount("#app");
|
1766
|
+
queries: []`}const ER=be({name:"NewRule",components:{InputForm:wp,ErrorMessage:lt},setup(){const e=Tr(),t=Fe(kR()),n=S$();return{yaml:t,create:async()=>{const u=await n.perform({yaml:t.value});e.push({name:"Rule",params:{id:u.id}})},updateYAML:u=>{t.value=u},createRuleTask:n}}}),RR={class:"block"},xR=N("h2",{class:"is-size-2 block"},"New rule",-1),TR={class:"field is-grouped is-grouped-centered"},LR={class:"control"},MR={class:"icon is-small"},OR=N("span",null,"Create",-1),IR={key:0,class:"block"},FR=N("hr",null,null,-1);function NR(e,t,n,r,f,u){var p,o;const h=oe("InputForm"),g=oe("font-awesome-icon"),s=oe("ErrorMessage");return Z(),ie(Re,null,[N("div",RR,[xR,ae(h,{yaml:e.yaml,"onUpdate:yaml":t[0]||(t[0]=i=>e.yaml=i),onUpdateYaml:e.updateYAML},null,8,["yaml","onUpdateYaml"]),N("div",TR,[N("p",LR,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...i)=>e.create&&e.create(...i))},[N("span",MR,[ae(g,{icon:"plus"})]),OR])])])]),(p=e.createRuleTask.last)!=null&&p.error?(Z(),ie("div",IR,[FR,ae(s,{error:(o=e.createRuleTask.last)==null?void 0:o.error},null,8,["error"])])):de("",!0)],64)}const DR=Se(ER,[["render",NR]]),PR=be({name:"NewRuleView",components:{NewRule:DR},setup(){const e=()=>{an("New rule - Mihari")};Ye(()=>{e()})}});function BR(e,t,n,r,f,u){const h=oe("NewRule",!0);return Z(),_e(h)}const WR=Se(PR,[["render",BR]]),HR=be({name:"RuleActionButtons",props:{rule:{type:Object,required:!0}},emits:["set-message","set-error","delete"],setup(e,t){const n=ke(()=>`/api/rules/${e.rule.id}`),r=ke(()=>`rule.id:"${e.rule.id}"`),f=$$(),u=_$(),h=ki(),g=El(),s=async()=>{if(window.confirm(`Are you sure you want to delete ${e.rule.id}?`))try{await f.perform(e.rule.id),t.emit("delete")}catch(i){Ue.isAxiosError(i)&&t.emit("set-error")}},p=async()=>{try{const o=await u.perform(e.rule.id);t.emit("set-message",o)}catch(o){Ue.isAxiosError(o)&&t.emit("set-error",o)}};return Ye(()=>{h.perform({q:r.value,page:1,limit:0}),g.perform({q:r.value,page:1,limit:0})}),{deleteRule:s,searchRule:p,searchRuleTask:u,href:n,getAlertsTask:h,getArtifactsTask:g,q:r}}}),UR={class:"buttons is-pulled-right"},zR=N("span",null,"Alerts:",-1),VR={class:"button is-small is-success is-rounded"},jR=N("span",null,"Artifacts:",-1),GR=["href"],KR=N("span",null,"JSON",-1),YR={class:"icon is-small"},XR=N("span",null,"Search",-1),ZR={class:"icon is-small"},qR=N("span",null,"Edit",-1),JR={class:"icon is-small"},QR=N("span",null,"Delete",-1),ex={class:"icon is-small"};function tx(e,t,n,r,f,u){var s,p;const h=oe("router-link"),g=oe("font-awesome-icon");return Z(),ie("span",UR,[ae(h,{class:"button is-warning is-small is-rounded",to:{name:"Alerts",query:{q:e.q}}},{default:Je(()=>{var o,i;return[zR,N("span",null,ye((i=(o=e.getAlertsTask.last)==null?void 0:o.value)==null?void 0:i.total),1)]}),_:1},8,["to"]),N("a",VR,[jR,N("span",null,ye((p=(s=e.getArtifactsTask.last)==null?void 0:s.value)==null?void 0:p.total),1)]),N("a",{class:"button is-link is-light is-small",href:e.href,target:"_blank"},[KR,N("span",YR,[ae(g,{icon:"barcode"})])],8,GR),N("button",{class:"button is-primary is-light is-small",onClick:t[0]||(t[0]=(...o)=>e.searchRule&&e.searchRule(...o))},[XR,N("span",ZR,[e.searchRuleTask.isRunning?(Z(),_e(g,{key:0,icon:"spinner",spin:""})):(Z(),_e(g,{key:1,icon:"magnifying-glass"}))])]),ae(h,{class:"button is-info is-light is-small",to:{name:"EditRule",params:{id:e.rule.id}}},{default:Je(()=>[qR,N("span",JR,[ae(g,{icon:"edit"})])]),_:1},8,["to"]),N("button",{class:"button is-light is-small",onClick:t[1]||(t[1]=(...o)=>e.deleteRule&&e.deleteRule(...o))},[QR,N("span",ex,[ae(g,{icon:"times"})])])])}const $p=Se(HR,[["render",tx]]),nx=be({name:"YAML",components:{VAceEditor:bp},props:{yaml:{type:String,required:!0}},setup(){}}),rx={class:"block"};function ix(e,t,n,r,f,u){const h=oe("VAceEditor");return Z(),ie("div",rx,[ae(h,{class:"vue-ace-editor",value:e.yaml,lang:"yaml",theme:"monokai",options:{readOnly:!0,fontSize:16,maxLines:1e4,minLines:6}},null,8,["value"])])}const ox=Se(nx,[["render",ix]]),sx=be({name:"RuleDetailItem",props:{rule:{type:Object,required:!0}},components:{YAML:ox,Alerts:rp,ErrorMessage:lt,Message:cs,ActionButtons:$p},emits:["delete","refresh"],setup(e,t){const n=Fe(),r=Fe();return{onSetMessage:o=>{o.queued?r.value=o:t.emit("refresh")},onDisposeMessage:()=>{r.value=void 0},message:r,onSetError:o=>{n.value=o},error:n,onDisposeError:()=>{n.value=void 0},onDelete:()=>{t.emit("delete")},onRefresh:()=>{t.emit("refresh")}}}}),ax={class:"block"},lx={class:"is-size-2 block"},cx={class:"block is-clearfix"},ux=N("hr",null,null,-1),hx={class:"block"},fx=N("h2",{class:"is-size-2 block"},"Alerts",-1);function dx(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("YAML"),o=oe("Alerts");return Z(),ie(Re,null,[N("div",ax,[N("h2",lx,ye(e.rule.id),1),e.error?(Z(),_e(h,{key:0,class:"mt-3 mb-3",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("p",cx,[ae(s,{rule:e.rule,onSetMessage:e.onSetMessage,onDelete:e.onDelete,onSetError:e.onSetError},null,8,["rule","onSetMessage","onDelete","onSetError"])]),ae(p,{yaml:e.rule.yaml},null,8,["yaml"])]),ux,N("div",hx,[fx,ae(o,{ruleId:e.rule.id},null,8,["ruleId"])])],64)}const px=Se(sx,[["render",dx]]),gx=be({name:"RuleDetailWrapper",components:{Rule:px,Loading:ln,ErrorMessage:lt},props:{id:{type:String,required:!0}},setup(e){const t=zd(),n=Tr(),r=async()=>{await t.perform(e.id)},f=async()=>{await r()},u=()=>{n.push("/")};return Ye(async()=>{await r()}),qe(e,async()=>{await r()}),{getRuleTask:t,onRefresh:f,onDelete:u}}});function mx(e,t,n,r,f,u){var p,o;const h=oe("Loading"),g=oe("ErrorMessage"),s=oe("Rule");return Z(),ie(Re,null,[e.getRuleTask.isRunning?(Z(),_e(h,{key:0})):de("",!0),e.getRuleTask.isError?(Z(),_e(g,{key:1,error:(p=e.getRuleTask.last)==null?void 0:p.error},null,8,["error"])):de("",!0),(o=e.getRuleTask.last)!=null&&o.value?(Z(),_e(s,{key:2,rule:e.getRuleTask.last.value,onRefresh:e.onRefresh,onDelete:e.onDelete},null,8,["rule","onRefresh","onDelete"])):de("",!0)],64)}const vx=Se(gx,[["render",mx]]),yx=be({name:"RuleView",components:{Rule:vx},props:{id:{type:String,required:!0}},setup(e){const t=()=>{an(`Rule:${e.id} - Mihari`)};Ye(()=>{t()}),qe(()=>e.id,()=>{t()})}});function bx(e,t,n,r,f,u){const h=oe("Rule",!0);return Z(),_e(h,{id:e.id},null,8,["id"])}const wx=Se(yx,[["render",bx]]),$x=be({name:"RuleItem",props:{rule:{type:Object,required:!0}},components:{ActionButtons:$p,Tags:Rl,ErrorMessage:lt,Message:cs},emits:["delete"],setup(e,t){const n=Fe(),r=Fe();return{onSetError:p=>{n.value=p},onDisposeError:()=>{n.value=void 0},onSetMessage:p=>{r.value=p},onDelete:()=>{t.emit("delete")},error:n,message:r,onDisposeMessage:()=>{r.value=void 0}}}}),_x={class:"box"},Sx={class:"block"},Cx={class:"table is-fullwidth is-completely-borderless"},Ax=N("th",null,"Title",-1),kx=N("th",null,"Description",-1),Ex={key:0},Rx=N("th",null,"Tags",-1),xx=N("p",{class:"block is-clearfix"},null,-1),Tx={class:"help"};function Lx(e,t,n,r,f,u){const h=oe("ErrorMessage"),g=oe("Message"),s=oe("ActionButtons"),p=oe("router-link"),o=oe("Tags");return Z(),ie("div",_x,[e.error?(Z(),_e(h,{key:0,class:"block",error:e.error,disposable:!0,onDispose:e.onDisposeError},null,8,["error","onDispose"])):de("",!0),e.message?(Z(),_e(g,{key:1,class:"block",message:e.message,disposable:!0,onDispose:e.onDisposeMessage},null,8,["message","onDispose"])):de("",!0),N("div",Sx,[N("p",null,[ae(s,{rule:e.rule,onSetError:e.onSetError,onDelete:e.onDelete,onSetMessage:e.onSetMessage},null,8,["rule","onSetError","onDelete","onSetMessage"])]),ae(p,{class:"is-size-4",to:{name:"Rule",params:{id:e.rule.id}}},{default:Je(()=>[Qe(ye(e.rule.id),1)]),_:1},8,["to"])]),N("table",Cx,[N("tr",null,[Ax,N("td",null,ye(e.rule.title),1)]),N("tr",null,[kx,N("td",null,ye(e.rule.description),1)]),e.rule.tags.length>0?(Z(),ie("tr",Ex,[Rx,N("td",null,[ae(o,{tags:e.rule.tags},null,8,["tags"])])])):de("",!0)]),xx,N("p",Tx,"Created at: "+ye(e.rule.createdAt),1)])}const Mx=Se($x,[["render",Lx]]),Ox=be({name:"RulesItem",props:{rules:{type:Object,required:!0}},components:{Pagination:xl,Rule:Mx},emits:["update-page","refresh"],setup(e,t){const n=Fe(),r=h=>{t.emit("update-page",h)},f=()=>{t.emit("refresh")},u=ke(()=>e.rules.results.length>0);return{onUpdatePage:r,onRefresh:f,hasRules:u,error:n}}}),Ix={key:0,class:"block"},Fx={class:"help"},Nx={key:1,class:"block"},Dx=N("div",{class:"notification is-warning is-light"},"There is no alert to show",-1),Px=[Dx];function Bx(e,t,n,r,f,u){const h=oe("Rule"),g=oe("Pagination");return e.hasRules?(Z(),ie("div",Ix,[(Z(!0),ie(Re,null,$t(e.rules.results,s=>(Z(),_e(h,{rule:s,key:s.id,onRefresh:e.onRefresh,onDelete:e.onRefresh},null,8,["rule","onRefresh","onDelete"]))),128)),ae(g,{currentPage:e.rules.currentPage,total:e.rules.total,pageSize:e.rules.pageSize,onUpdatePage:e.onUpdatePage},null,8,["currentPage","total","pageSize","onUpdatePage"]),N("p",Fx,"("+ye(e.rules.total)+" results in total, "+ye(e.rules.results.length)+" shown)",1)])):(Z(),ie("div",Nx,Px))}const Wx=Se(Ox,[["render",Bx]]),Hx=be({name:"RulesWrapper",components:{Rules:Wx,Loading:ln,ErrorMessage:lt},setup(){const e=$r("page","1"),t=$r("q",""),n=Fe(!1),r=Ud(),f=async()=>{const p={q:t.value,page:parseInt(e.value)};return await r.perform(p)},u=p=>{e.value=p.toString()},h=async()=>{e.value="1",await f()},g=h,s=()=>{n.value=!n.value};return Ye(async()=>{await f()}),qe(e,async()=>{await f()}),{getRulesTask:r,page:e,q:t,search:h,showHelp:n,toggleShowHelp:s,onUpdatePage:u,onRefresh:g}}}),Ux={class:"block"},zx={class:"field has-addons"},Vx={class:"control is-expanded"},jx={class:"control"},Gx={class:"icon is-small"},Kx=N("span",null,"Search",-1),Yx={class:"control"},Xx={class:"icon is-small"},Zx=N("span",null,"Help",-1),qx={key:0,class:"content mt-3"},Jx=Xo('<h4 class="is-size-4">Help</h4><ul><li> Search query supports <code>AND</code>, <code>OR</code>, <code>:</code>, <code>=</code>, <code>!=</code>, <code><</code>, <code><=</code>, <code>></code>, <code>>=</code>, <code>NOT</code> and <code>()</code>. </li><li> Searchable fields are <code>id</code>, <code>title</code>, <code>description</code>, <code>tag</code>, <code>created_at</code> and <code>updated_at</code>. </li></ul><h4 class="is-size-4">Examples</h4>',3),Qx={key:0,class:"block"};function eT(e,t,n,r,f,u){var i,a;const h=oe("font-awesome-icon"),g=oe("router-link"),s=oe("Loading"),p=oe("ErrorMessage"),o=oe("Rules");return Z(),ie(Re,null,[N("div",Ux,[N("div",zx,[N("p",Vx,[zo(N("input",{class:"input",type:"text","onUpdate:modelValue":t[0]||(t[0]=c=>e.q=c)},null,512),[[Zn,e.q]])]),N("p",jx,[N("a",{class:"button is-primary",onClick:t[1]||(t[1]=(...c)=>e.search&&e.search(...c))},[N("span",Gx,[ae(h,{icon:"search"})]),Kx])]),N("p",Yx,[N("a",{class:"button is-info",onClick:t[2]||(t[2]=(...c)=>e.toggleShowHelp&&e.toggleShowHelp(...c))},[N("span",Xx,[ae(h,{icon:"question"})]),Zx])])]),e.showHelp?(Z(),ie("div",qx,[Jx,N("ul",null,[N("li",null,[ae(g,{to:{name:"Rules",query:{q:"title:foo AND created_at >= 2020-01-01"}}},{default:Je(()=>[Qe("title:foo AND created_at >= 2020-01-01")]),_:1})])])])):de("",!0)]),e.getRulesTask.performCount>0?(Z(),ie("div",Qx,[e.getRulesTask.isRunning?(Z(),_e(s,{key:0})):de("",!0),e.getRulesTask.isError?(Z(),_e(p,{key:1,error:(i=e.getRulesTask.last)==null?void 0:i.error},null,8,["error"])):de("",!0),(a=e.getRulesTask.last)!=null&&a.value?(Z(),_e(o,{key:2,rules:e.getRulesTask.last.value,onUpdatePage:e.onUpdatePage,onRefresh:e.onRefresh},null,8,["rules","onUpdatePage","onRefresh"])):de("",!0)])):de("",!0)],64)}const tT=Se(Hx,[["render",eT]]),nT=be({name:"RulesView",components:{Rules:tT},setup(){an("Rules - Mihari")}});function rT(e,t,n,r,f,u){const h=oe("Rules",!0);return Z(),_e(h)}const iT=Se(nT,[["render",rT]]),oT=[{path:"/",name:"Alerts",component:CC},{path:"/alerts/:id",name:"Alert",component:_S,props:!0},{path:"/config",name:"Config",component:LE},{path:"/artifacts/",name:"Artifacts",component:cE},{path:"/artifacts/:id",name:"Artifact",component:Ck,props:!0},{path:"/rules",name:"Rules",component:iT},{path:"/rules/new",name:"NewRule",component:WR},{path:"/rules/:id",name:"Rule",component:wx,props:!0},{path:"/rules/:id/edit",name:"EditRule",component:yR,props:!0}],sT=v1({history:Ob(),routes:oT});rm.add(cm,Sm,wm,am,_m,hm,om,mm,gm,bm,ym,lm,rh,pm,dm,fm,$m);const _p=jf(pb);_p.component("font-awesome-icon",Q0);_p.use(sT).mount("#app");
|